Cafu Engine
ChildFrameT Class Reference

This class represents a child frame. More...

#include "ChildFrame.hpp"

Inheritance diagram for ChildFrameT:

Classes

class  UpdaterT
 A class that acts as an observer of the map document and the tools for the child frame. More...
 

Public Types

enum  {
  ID_MENU_FILE_CLOSE =wxID_HIGHEST+1+2000, ID_MENU_FILE_SAVE, ID_MENU_FILE_SAVEAS, ID_MENU_EDIT_PASTE_SPECIAL,
  ID_MENU_EDIT_DELETE, ID_MENU_EDIT_SELECT_NONE, ID_MENU_SELECTION_ASSIGN_TO_ENTITY, ID_MENU_SELECTION_GROUP,
  ID_MENU_SELECTION_HIDE, ID_MENU_SELECTION_HIDE_OTHER, ID_MENU_MAP_SNAP_TO_GRID, ID_MENU_MAP_SHOW_GRID_2D,
  ID_MENU_MAP_GRID_SETTINGS, ID_MENU_MAP_FINER_GRID, ID_MENU_MAP_COARSER_GRID, ID_MENU_MAP_AUTO_GROUP_ENTITIES,
  ID_MENU_MAP_GOTO_PRIMITIVE, ID_MENU_MAP_SHOW_INFO, ID_MENU_MAP_CHECK_FOR_PROBLEMS, ID_MENU_MAP_LOAD_POINTFILE,
  ID_MENU_MAP_UNLOAD_POINTFILE, ID_MENU_VIEW_TOOLBARS, ID_MENU_VIEW_TOOLBARS_FILE, ID_MENU_VIEW_TOOLBARS_TOOLS,
  ID_MENU_VIEW_TOOLBARS_TOOLOPTIONS, ID_MENU_VIEW_PANELS_ENTITY_HIERARCHY, ID_MENU_VIEW_PANELS_ENTITY_INSPECTOR, ID_MENU_VIEW_PANELS_MATERIALS,
  ID_MENU_VIEW_PANELS_GROUPS, ID_MENU_VIEW_PANELS_CONSOLE, ID_MENU_VIEW_NEW_2D_VIEW, ID_MENU_VIEW_NEW_3D_VIEW,
  ID_MENU_VIEW_LOAD_DEFAULT_PERSPECTIVE, ID_MENU_VIEW_LOAD_USER_PERSPECTIVE, ID_MENU_VIEW_SAVE_USER_PERSPECTIVE, ID_MENU_VIEW_CENTER_2D_VIEWS,
  ID_MENU_VIEW_CENTER_3D_VIEWS, ID_MENU_VIEW_SHOW_ENTITY_INFO, ID_MENU_VIEW_SHOW_ENTITY_TARGETS, ID_MENU_TOOLS_TOOL_SELECTION,
  ID_MENU_TOOLS_TOOL_CAMERA, ID_MENU_TOOLS_TOOL_NEWBRUSH, ID_MENU_TOOLS_TOOL_NEWENTITY, ID_MENU_TOOLS_TOOL_NEWBEZIERPATCH,
  ID_MENU_TOOLS_TOOL_NEWTERRAIN, ID_MENU_TOOLS_TOOL_NEWDECAL, ID_MENU_TOOLS_TOOL_EDITSURFACEPROPERTIES, ID_MENU_TOOLS_TOOL_TERRAINEDITOR,
  ID_MENU_TOOLS_TOOL_CLIP, ID_MENU_TOOLS_TOOL_EDITVERTICES, ID_MENU_TOOLS_CARVE, ID_MENU_TOOLS_MAKE_HOLLOW,
  ID_MENU_TOOLS_APPLY_MATERIAL, ID_MENU_TOOLS_REPLACE_MATERIALS, ID_MENU_TOOLS_MATERIAL_LOCK, ID_MENU_TOOLS_TRANSFORM,
  ID_MENU_TOOLS_ALIGN, ID_MENU_TOOLS_ALIGN_LEFT, ID_MENU_TOOLS_ALIGN_RIGHT, ID_MENU_TOOLS_ALIGN_HOR_CENTER,
  ID_MENU_TOOLS_ALIGN_TOP, ID_MENU_TOOLS_ALIGN_BOTTOM, ID_MENU_TOOLS_ALIGN_VERT_CENTER, ID_MENU_TOOLS_MIRROR,
  ID_MENU_TOOLS_MIRROR_HOR, ID_MENU_TOOLS_MIRROR_VERT, ID_MENU_COMPONENTS_FIRST, ID_MENU_COMPONENTS_MAX = ID_MENU_COMPONENTS_FIRST + 100,
  ID_MENU_PREFABS_LOAD, ID_MENU_PREFABS_SAVE, ID_MENU_PREFABS_PATH_FIRST, ID_MENU_PREFABS_PATH_LAST = ID_MENU_PREFABS_PATH_FIRST + 31,
  ID_MENU_COMPILE_FLAG_SAVE_MAP, ID_MENU_COMPILE_FLAG_RUN_BSP, ID_MENU_COMPILE_FLAG_RUN_PVS, ID_MENU_COMPILE_FLAG_RUN_LIGHT,
  ID_MENU_COMPILE_FLAG_RUN_ENGINE, ID_MENU_COMPILE_QUICK, ID_MENU_COMPILE_NORMAL, ID_MENU_COMPILE_QUALITY,
  ID_MENU_COMPILE_CUSTOM, ID_MENU_COMPILE_ABORT
}
 IDs for the controls whose events we are interested in. More...
 
enum  StatusBarPaneIDs {
  SBP_MENU_HELP =0, SBP_SELECTION, SBP_MOUSE_POS, SBP_SELECTION_DIMS,
  SBP_GRID_ZOOM, SBP_GRID_SNAP
}
 Constants for use with SetStatusText, to give the individual panes a name. More...
 

Public Member Functions

 ChildFrameT (ParentFrameT *Parent, MapDocumentT *MapDoc)
 The constructor. More...
 
 ~ChildFrameT ()
 The destructor. More...
 
MapDocumentTGetDoc () const
 Returns this child frames document. More...
 
bool SubmitCommand (CommandT *Command)
 [...] All(!) commands for modifying the document must be submitted via this method. More...
 
const ArrayT< ViewWindowT * > & GetViewWindows () const
 Returns the list of all (2D and 3D) view windows that are currently open in this frame. More...
 
Vector3fT GuessUserVisiblePoint () const
 Based on the most recently used views (2D or 3D), this method figures out a point in space that the user can see well. More...
 
void All2DViews_Zoom (float ZoomFactor)
 
void All2DViews_Center (const Vector3fT &CenterPoint)
 
bool IsPaneShown (wxWindow *Pane)
 Tells if the given pane (one of our toolbars or dialogs that is managed by wxAUI) is currently shown. More...
 
void ShowPane (wxWindow *Pane, bool DoShow=true)
 Shows or hides the given pane (one of our toolbars or dialogs that is managed by wxAUI). More...
 
void SetCaption (wxWindow *Pane, const wxString &Caption)
 Sets the caption of the AUI pane for the given window. More...
 
ToolManagerTGetToolManager ()
 Returns our tool manager. More...
 
MaterialsToolbarTGetMaterialsToolbar ()
 Returns the Materials toolbar. More...
 
GroupsToolbarTGetGroupsToolbar ()
 Returns the Groups toolbar. More...
 
EditSurfacePropsDialogTGetSurfacePropsDialog ()
 Returns the Surface Properties dialog. More...
 
TerrainEditorDialogTGetTerrainEditorDialog ()
 Returns the Terrain Editor dialog. More...
 
InspectorDialogTGetInspectorDialog ()
 Returns the Entity Inspector dialog. More...
 

Friends

class ViewWindowT
 An observer of the map document and the tools that updates this child frame (its status bar, tool options bar, etc.). More...
 

Detailed Description

This class represents a child frame.

Member Enumeration Documentation

anonymous enum

IDs for the controls whose events we are interested in.

Some of the IDs below are commented out. This is usually because there already exists a wx-defined ID for the same purpose, which works well with the wx model-view-controler framework. See the ParentFrameT class header and documentation for additional information.

Constants for use with SetStatusText, to give the individual panes a name.

Constructor & Destructor Documentation

ChildFrameT::ChildFrameT ( ParentFrameT Parent,
MapDocumentT MapDoc 
)

The constructor.

Parameters
ParentThe parent frame.
MapDocThis frame's document. The frame becomes the owner of the document, i.e. it is responsible for destructing it. MapDoc is created externally so that this constructor doesn't have to deal with problems constructing it.
ChildFrameT::~ChildFrameT ( )

The destructor.

Notifies the dependent ViewWindowTs that we're being destroyed before them. See documentation of ViewWindowT::NotifyChildFrameDies() for full details.

Member Function Documentation

MapDocumentT* ChildFrameT::GetDoc ( ) const
inline

Returns this child frames document.

GroupsToolbarT* ChildFrameT::GetGroupsToolbar ( )
inline

Returns the Groups toolbar.

InspectorDialogT* ChildFrameT::GetInspectorDialog ( )
inline

Returns the Entity Inspector dialog.

MaterialsToolbarT* ChildFrameT::GetMaterialsToolbar ( )
inline

Returns the Materials toolbar.

EditSurfacePropsDialogT* ChildFrameT::GetSurfacePropsDialog ( )
inline

Returns the Surface Properties dialog.

TerrainEditorDialogT* ChildFrameT::GetTerrainEditorDialog ( )
inline

Returns the Terrain Editor dialog.

ToolManagerT& ChildFrameT::GetToolManager ( )
inline

Returns our tool manager.

const ArrayT<ViewWindowT*>& ChildFrameT::GetViewWindows ( ) const
inline

Returns the list of all (2D and 3D) view windows that are currently open in this frame.

The returned list is always sorted in MRU (most-recently-used) order.

Vector3fT ChildFrameT::GuessUserVisiblePoint ( ) const

Based on the most recently used views (2D or 3D), this method figures out a point in space that the user can see well.

bool ChildFrameT::IsPaneShown ( wxWindow *  Pane)

Tells if the given pane (one of our toolbars or dialogs that is managed by wxAUI) is currently shown.

void ChildFrameT::SetCaption ( wxWindow *  Pane,
const wxString &  Caption 
)

Sets the caption of the AUI pane for the given window.

void ChildFrameT::ShowPane ( wxWindow *  Pane,
bool  DoShow = true 
)

Shows or hides the given pane (one of our toolbars or dialogs that is managed by wxAUI).

bool ChildFrameT::SubmitCommand ( CommandT Command)

[...] All(!) commands for modifying the document must be submitted via this method.

Friends And Related Function Documentation

friend class ViewWindowT
friend

An observer of the map document and the tools that updates this child frame (its status bar, tool options bar, etc.).

Friend class so that our ViewWindowT children can manage/maintain the m_ViewWindows list themselves.


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