____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

CEditor Class Reference

#include <editor.h>

List of all members.

Public Member Functions

 CEditor ()
 ~CEditor ()
void Init ()

Public Attributes

std::vector< std::string > UnitTypes
 Sorted editor unit-type table.
std::vector< const CUnitType * > ShownUnitTypes
 Shown editor unit-type table.
std::vector< CPatchIconShownPatchTypes
 Shown editor patch-type table.
IconConfig Select
 Editor's select icon.
IconConfig Units
 Editor's units icon.
IconConfig Patch
 Editor's patch icon.
std::string StartUnitName
 name of the Unit used to display the start location.
const CUnitTypeStartUnit
 Unit used to display the start location.
int UnitIndex
 Unit icon draw index.
int CursorUnitIndex
 Unit icon under cursor.
int SelectedUnitIndex
 Unit type to draw.
int PatchIndex
 Patch icon draw index.
int CursorPatchIndex
 Patch icon under cursor.
int SelectedPatchIndex
 Patch type to draw.
int CursorPlayer
 Player under the cursor.
int SelectedPlayer
 Player selected for draw.
bool MapLoaded
 Map loaded in editor.
bool ShowPatchOutlines
 Show outlines around patches.
Uint32 PatchOutlineColor
 Patch outline color.
EditorRunningType Running
 Editor is running.
EditorStateType State
 Current editor state.


Detailed Description

Definition at line 68 of file editor.h.


Constructor & Destructor Documentation

CEditor::CEditor (  )  [inline]

Definition at line 70 of file editor.h.

CEditor::~CEditor (  )  [inline]

Definition at line 76 of file editor.h.


Member Function Documentation

void CEditor::Init (  ) 

Create editor.

Definition at line 1728 of file editloop.cpp.

References ButtonPanelHeight, ButtonPanelWidth, _event_callback_::ButtonPressed, _event_callback_::ButtonReleased, CalculateMaxIconSize(), CalculateVisibleIcons(), CclGarbageCollect(), CL_OPEN_READ, CFile::close(), ColorBlack, CreateGame(), CreatePatchIcons(), CreatePlayer(), CurrentMapPath, EditorCallbackButtonDown(), EditorCallbackButtonUp(), EditorCallbackExit(), EditorCallbackKeyDown(), EditorCallbackKeyRepeated(), EditorCallbackKeyUp(), EditorCallbackMouse(), EditorCallbacks, EditorRedoActions, EditorStartFile, EditorUndoActions, CMap::Fields, FlagRevealMap, GameSettings, CVideo::Height, IconConfig::Icon, CMap::Info, CUnitCache::Init(), InitPlayers(), InitUnitTypes(), _event_callback_::KeyPressed, _event_callback_::KeyReleased, _event_callback_::KeyRepeated, LibraryFileName(), IconConfig::Load(), LuaLoadFile(), Map, CMapInfo::MapHeight, CMapInfo::MapWidth, _event_callback_::MouseExit, _event_callback_::MouseMoved, NetworkEvent(), _event_callback_::NetworkEvent, CMap::NoFogOfWar, CFile::open(), Patch, PatchOutlineColor, PlayerMax, PlayerNeutral, PlayerNobody, PlayerNumNeutral, Players, CMapInfo::PlayerSide, CMapInfo::PlayerType, RecalculateShownUnits(), ReplayRevealMap, Settings::Resources, Select, SelectedPatchIndex, SelectedPlayer, SettingsPresetMapDefault, ShowLoadProgress(), StartUnit, StartUnitName, ThisPlayer, UnitCache, Units, UnitTypeByIdent(), Video, CMap::Visible, and VisibleIcons.

Referenced by EditorMainLoop().


Member Data Documentation

std::vector<std::string> CEditor::UnitTypes

Sorted editor unit-type table.

Definition at line 80 of file editor.h.

Referenced by CalculateMaxIconSize(), and RecalculateShownUnits().

std::vector<const CUnitType *> CEditor::ShownUnitTypes

Editor's select icon.

Definition at line 85 of file editor.h.

Referenced by DrawEditorPanel(), Init(), and SetEditorSelectIcon().

Editor's units icon.

Definition at line 86 of file editor.h.

Referenced by DrawEditorPanel(), Init(), and SetEditorUnitsIcon().

Editor's patch icon.

Definition at line 87 of file editor.h.

Referenced by DrawEditorPanel(), Init(), and SetEditorPatchIcon().

name of the Unit used to display the start location.

Definition at line 88 of file editor.h.

Referenced by Init(), and SetEditorStartUnit().

Unit used to display the start location.

Definition at line 89 of file editor.h.

Referenced by DrawEditorPanel(), DrawMapCursor(), DrawStartLocations(), and Init().

Unit icon draw index.

Definition at line 91 of file editor.h.

Referenced by EditorUnitSliderListener::action(), DrawUnitIcons(), EditorCallbackMouse(), and RecalculateShownUnits().

Unit icon under cursor.

Definition at line 92 of file editor.h.

Referenced by DrawUnitIcons(), EditorCallbackButtonDown(), EditorCallbackMouse(), and RecalculateShownUnits().

Unit type to draw.

Definition at line 93 of file editor.h.

Referenced by DrawMapCursor(), DrawUnitIcons(), EditorCallbackButtonDown(), and RecalculateShownUnits().

Patch icon draw index.

Definition at line 95 of file editor.h.

Referenced by EditorPatchSliderListener::action(), DrawPatchIcons(), and EditorCallbackMouse().

Patch icon under cursor.

Definition at line 96 of file editor.h.

Referenced by DrawPatchIcons(), EditorCallbackButtonDown(), and EditorCallbackMouse().

Patch type to draw.

Definition at line 97 of file editor.h.

Referenced by DrawMapCursor(), DrawPatchIcons(), EditorCallbackButtonDown(), and Init().

Player under the cursor.

Definition at line 99 of file editor.h.

Referenced by DrawPlayers(), EditorCallbackButtonDown(), and EditorCallbackMouse().

Player selected for draw.

Definition at line 100 of file editor.h.

Referenced by DrawPlayers(), DrawUnitIcons(), EditorCallbackButtonDown(), EditorCallbackMouse(), and Init().

Map loaded in editor.

Definition at line 102 of file editor.h.

Referenced by EditorMainLoop().

Show outlines around patches.

Definition at line 104 of file editor.h.

Referenced by CViewport::DrawMapBackgroundInViewport(), and EditorCallbackButtonDown().

Patch outline color.

Definition at line 105 of file editor.h.

Referenced by CViewport::DrawMapBackgroundInViewport(), and Init().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:23 2009 for Bos Wars by  doxygen 1.5.6