7 #ifndef CAFU_CHILDFRAME_HPP_INCLUDED
8 #define CAFU_CHILDFRAME_HPP_INCLUDED
10 #include "../CommandHistory.hpp"
12 #include "Math3D/Angles.hpp"
13 #include "Math3D/Vector3.hpp"
14 #include "Templates/Array.hpp"
18 #include "wx/aui/framemanager.h"
21 namespace cf {
namespace TypeSys {
class TypeInfoT; } }
22 namespace MapEditor {
class EntityHierarchyPanelT; }
50 wxString m_AutoSaveName;
65 ID_MENU_FILE_CLOSE=wxID_HIGHEST+1+2000,
74 ID_MENU_EDIT_PASTE_SPECIAL,
76 ID_MENU_EDIT_SELECT_NONE,
78 ID_MENU_SELECTION_ASSIGN_TO_ENTITY,
79 ID_MENU_SELECTION_GROUP,
80 ID_MENU_SELECTION_HIDE,
81 ID_MENU_SELECTION_HIDE_OTHER,
83 ID_MENU_MAP_SNAP_TO_GRID,
84 ID_MENU_MAP_SHOW_GRID_2D,
85 ID_MENU_MAP_GRID_SETTINGS,
86 ID_MENU_MAP_FINER_GRID,
87 ID_MENU_MAP_COARSER_GRID,
88 ID_MENU_MAP_AUTO_GROUP_ENTITIES,
89 ID_MENU_MAP_GOTO_PRIMITIVE,
90 ID_MENU_MAP_SHOW_INFO,
91 ID_MENU_MAP_CHECK_FOR_PROBLEMS,
92 ID_MENU_MAP_LOAD_POINTFILE,
93 ID_MENU_MAP_UNLOAD_POINTFILE,
95 ID_MENU_VIEW_TOOLBARS,
96 ID_MENU_VIEW_TOOLBARS_FILE,
97 ID_MENU_VIEW_TOOLBARS_TOOLS,
98 ID_MENU_VIEW_TOOLBARS_TOOLOPTIONS,
99 ID_MENU_VIEW_PANELS_ENTITY_HIERARCHY,
100 ID_MENU_VIEW_PANELS_ENTITY_INSPECTOR,
101 ID_MENU_VIEW_PANELS_MATERIALS,
102 ID_MENU_VIEW_PANELS_GROUPS,
103 ID_MENU_VIEW_PANELS_CONSOLE,
104 ID_MENU_VIEW_NEW_2D_VIEW,
105 ID_MENU_VIEW_NEW_3D_VIEW,
106 ID_MENU_VIEW_LOAD_DEFAULT_PERSPECTIVE,
107 ID_MENU_VIEW_LOAD_USER_PERSPECTIVE,
108 ID_MENU_VIEW_SAVE_USER_PERSPECTIVE,
109 ID_MENU_VIEW_CENTER_2D_VIEWS,
110 ID_MENU_VIEW_CENTER_3D_VIEWS,
111 ID_MENU_VIEW_SHOW_ENTITY_INFO,
112 ID_MENU_VIEW_SHOW_ENTITY_TARGETS,
114 ID_MENU_TOOLS_TOOL_SELECTION,
115 ID_MENU_TOOLS_TOOL_CAMERA,
116 ID_MENU_TOOLS_TOOL_NEWBRUSH,
117 ID_MENU_TOOLS_TOOL_NEWENTITY,
118 ID_MENU_TOOLS_TOOL_NEWBEZIERPATCH,
119 ID_MENU_TOOLS_TOOL_NEWTERRAIN,
120 ID_MENU_TOOLS_TOOL_NEWDECAL,
121 ID_MENU_TOOLS_TOOL_EDITSURFACEPROPERTIES,
122 ID_MENU_TOOLS_TOOL_TERRAINEDITOR,
123 ID_MENU_TOOLS_TOOL_CLIP,
124 ID_MENU_TOOLS_TOOL_EDITVERTICES,
126 ID_MENU_TOOLS_MAKE_HOLLOW,
127 ID_MENU_TOOLS_APPLY_MATERIAL,
128 ID_MENU_TOOLS_REPLACE_MATERIALS,
129 ID_MENU_TOOLS_MATERIAL_LOCK,
130 ID_MENU_TOOLS_TRANSFORM,
132 ID_MENU_TOOLS_ALIGN_LEFT,
133 ID_MENU_TOOLS_ALIGN_RIGHT,
134 ID_MENU_TOOLS_ALIGN_HOR_CENTER,
135 ID_MENU_TOOLS_ALIGN_TOP,
136 ID_MENU_TOOLS_ALIGN_BOTTOM,
137 ID_MENU_TOOLS_ALIGN_VERT_CENTER,
138 ID_MENU_TOOLS_MIRROR,
139 ID_MENU_TOOLS_MIRROR_HOR,
140 ID_MENU_TOOLS_MIRROR_VERT,
142 ID_MENU_COMPONENTS_FIRST,
143 ID_MENU_COMPONENTS_MAX = ID_MENU_COMPONENTS_FIRST + 100,
145 ID_MENU_PREFABS_LOAD,
146 ID_MENU_PREFABS_SAVE,
147 ID_MENU_PREFABS_PATH_FIRST,
148 ID_MENU_PREFABS_PATH_LAST = ID_MENU_PREFABS_PATH_FIRST + 31,
150 ID_MENU_COMPILE_FLAG_SAVE_MAP,
151 ID_MENU_COMPILE_FLAG_RUN_BSP,
152 ID_MENU_COMPILE_FLAG_RUN_PVS,
153 ID_MENU_COMPILE_FLAG_RUN_LIGHT,
154 ID_MENU_COMPILE_FLAG_RUN_ENGINE,
155 ID_MENU_COMPILE_QUICK,
156 ID_MENU_COMPILE_NORMAL,
157 ID_MENU_COMPILE_QUALITY,
158 ID_MENU_COMPILE_CUSTOM,
159 ID_MENU_COMPILE_ABORT
200 void All2DViews_Zoom(
float ZoomFactor);
201 void All2DViews_Center(
const Vector3fT& CenterPoint);
205 void ShowPane(wxWindow* Pane,
bool DoShow=
true);
206 void SetCaption(wxWindow* Pane,
const wxString& Caption);
222 wxAuiManager m_AUIManager;
223 wxString m_AUIDefaultPerspective;
226 unsigned long m_LastSavedAtCommandNr;
238 wxMenu* m_ComponentsMenu;
239 wxMenu* m_PrefabsMenu;
243 wxProcess* CurrentProcess;
244 int CurrentProcessID;
253 void UpdatePrefabsMenu();
256 void LoadPrefab(
const wxString& FileName);
260 void EndCompiling(
const wxString& ConsoleMessage,
const wxColour* Colour=wxGREEN);
263 void PaneToggleShow(wxAuiPaneInfo& PaneInfo);
266 void OnClose (wxCloseEvent& CE);
267 void OnIdle (wxIdleEvent& IE);
268 void OnProcessEnd (wxProcessEvent& PE);
269 void OnMenuFile (wxCommandEvent& CE);
270 void OnMenuFileUpdate (wxUpdateUIEvent& UE);
272 void OnMenuEditUndoRedo (wxCommandEvent& CE);
273 void OnMenuEditCut (wxCommandEvent& CE);
274 void OnMenuEditCopy (wxCommandEvent& CE);
275 void OnMenuEditPaste (wxCommandEvent& CE);
276 void OnMenuEditDelete (wxCommandEvent& CE);
277 void OnMenuEditSelectNone (wxCommandEvent& CE);
278 void OnMenuEditSelectAll (wxCommandEvent& CE);
279 void OnMenuEditUpdate (wxUpdateUIEvent& UE);
281 void OnMenuView (wxCommandEvent& CE);
282 void OnMenuViewUpdate (wxUpdateUIEvent& UE);
283 void OnMenuTools (wxCommandEvent& CE);
284 void OnMenuToolsUpdate(wxUpdateUIEvent& UE);
285 void OnMenuComponents (wxCommandEvent& CE);
286 void OnMenuPrefabs (wxCommandEvent& CE);
287 void OnMenuCompile (wxCommandEvent& CE);
288 void OnWindowActivate (wxActivateEvent& AE);
289 void OnAuiPaneClose (wxAuiManagerEvent& AE);
291 DECLARE_EVENT_TABLE()
Vector3fT GuessUserVisiblePoint() const
Based on the most recently used views (2D or 3D), this method figures out a point in space that the u...
Definition: ChildFrame.cpp:765
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
void ShowPane(wxWindow *Pane, bool DoShow=true)
Shows or hides the given pane (one of our toolbars or dialogs that is managed by wxAUI).
Definition: ChildFrame.cpp:837
This class represents the CaWE parent (main) frame.
Definition: ParentFrame.hpp:33
Definition: DialogInspector.hpp:22
Definition: DialogEntityHierarchy.hpp:153
A class that acts as an observer of the map document and the tools for the child frame.
Definition: ChildFrame.cpp:103
ToolManagerT & GetToolManager()
Returns our tool manager.
Definition: ChildFrame.hpp:208
Definition: DialogTerrainEdit.hpp:19
Definition: CommandHistory.hpp:13
This class represents a child frame.
Definition: ChildFrame.hpp:55
bool IsPaneShown(wxWindow *Pane)
Tells if the given pane (one of our toolbars or dialogs that is managed by wxAUI) is currently shown...
Definition: ChildFrame.cpp:827
~ChildFrameT()
The destructor.
Definition: ChildFrame.cpp:710
MaterialsToolbarT * GetMaterialsToolbar()
Returns the Materials toolbar.
Definition: ChildFrame.hpp:209
ChildFrameT(ParentFrameT *Parent, MapDocumentT *MapDoc)
The constructor.
Definition: ChildFrame.cpp:323
Definition: ChildFrame.hpp:37
MapDocumentT * GetDoc() const
Returns this child frames document.
Definition: ChildFrame.hpp:187
This class represents a (superclass of a) 2D or 3D map view window.
Definition: ChildFrameViewWin.hpp:21
GroupsToolbarT * GetGroupsToolbar()
Returns the Groups toolbar.
Definition: ChildFrame.hpp:210
InspectorDialogT * GetInspectorDialog()
Returns the Entity Inspector dialog.
Definition: ChildFrame.hpp:213
EditSurfacePropsDialogT * GetSurfacePropsDialog()
Returns the Surface Properties dialog.
Definition: ChildFrame.hpp:211
Definition: DialogConsole.hpp:11
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
The "Edit Surface Properties" dialog is the counterpart of the ToolEditSurfaceT tool.
Definition: DialogEditSurfaceProps.hpp:33
const ArrayT< ViewWindowT * > & GetViewWindows() const
Returns the list of all (2D and 3D) view windows that are currently open in this frame.
Definition: ChildFrame.hpp:195
StatusBarPaneIDs
Constants for use with SetStatusText, to give the individual panes a name.
Definition: ChildFrame.hpp:163
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
bool SubmitCommand(CommandT *Command)
[...] All(!) commands for modifying the document must be submitted via this method.
Definition: ChildFrame.cpp:753
TerrainEditorDialogT * GetTerrainEditorDialog()
Returns the Terrain Editor dialog.
Definition: ChildFrame.hpp:212
void SetCaption(wxWindow *Pane, const wxString &Caption)
Sets the caption of the AUI pane for the given window.
Definition: ChildFrame.cpp:852