Cafu Engine
ParentFrameT Class Reference

This class represents the CaWE parent (main) frame. More...

#include "ParentFrame.hpp"

Inheritance diagram for ParentFrameT:

Public Types

enum  {
  ID_MENU_FILE_NEW_MAP =wxID_HIGHEST+1+1000, ID_MENU_FILE_NEW_MODEL, ID_MENU_FILE_NEW_GUI, ID_MENU_FILE_NEW_FONT,
  ID_MENU_FILE_OPEN, ID_MENU_FILE_OPEN_CMDLINE, ID_MENU_FILE_CONFIGURE, ID_MENU_FILE_EXIT,
  ID_MENU_HELP_CONTENTS, ID_MENU_HELP_CAFU_WEBSITE, ID_MENU_HELP_CAFU_FORUM, ID_MENU_HELP_SET_FRAME_SIZE,
  ID_MENU_HELP_D3_MTR_CONVERTER, ID_MENU_HELP_ABOUT
}
 IDs for the controls whose events we are interested in. More...
 

Public Member Functions

 ParentFrameT (wxCmdLineParser &Parser)
 The constructor. More...
 
 ~ParentFrameT ()
 The destructor. More...
 
ChildFrameTGetActiveMapChildFrame () const
 Returns the currently active child frame or NULL if no map childframe is active (e.g. no map open or GUI editor is active). More...
 
MapDocumentTGetActiveMapDoc () const
 Returns the document of the currently active map child frame or NULL if no map document is active. More...
 

Public Attributes

wxGLCanvas * m_GLCanvas
 Our persistent "home" of the shared GL context. Used whenever there is no view. More...
 
wxGLContext * m_GLContext
 The OpenGL rendering context that represents our app-global OpenGL state. More...
 
MatSys::TextureMapIm_WhiteTexture
 A white texture map that is set as default lightmap whenever nothing else is available. More...
 
wxFileHistory m_FileHistory
 The file history of our and all our childrens "File" menu. More...
 
ArrayT< ChildFrameT * > m_ChildFrames
 The list where all map child frames register themselves on construction and unregister on destruction. More...
 
ArrayT
< ModelEditor::ChildFrameT * > 
m_MdlChildFrames
 The list where all model child frames register themselves on construction and unregister on destruction. More...
 
ArrayT< GuiEditor::ChildFrameT * > m_GuiChildFrames
 The list where all GUI child frames register themselves on construction and unregister on destruction. More...
 
ArrayT< IntrusivePtrT
< cf::GuiSys::WindowT > > 
m_GuiClipboard
 The common clipboard for all GUI Editor child frames. More...
 

Static Public Attributes

static int OpenGLAttributeList []
 The OpenGL attribute list for this window. The same list must be used for all child windows, so that they get identical pixel formats! More...
 

Detailed Description

This class represents the CaWE parent (main) frame.

Member Enumeration Documentation

anonymous enum

IDs for the controls whose events we are interested in.

This is a public enum so that our children (and possibly grandchildren) can have controls that trigger these events as well, e.g. child frames that duplicate our menu items or dialogs (any children of the child frames) that provide buttons for the same events. The IDs that the ParentFrameT class uses start at wxID_HIGHEST+1+1000 and the IDs that the various ChildFrameT classes (map, gui, and model editors) use start at wxID_HIGHEST+1+2000. This way, the children of the child frames (dialogs, panes, toolbars, ...) can start their own ID enumerations at wxID_HIGHEST+1. This keeps all IDs nicely unique when events bubble up from the dialogs, pane and toolbars first to the child frame and finally to the parent frame. See the "Events and Event Handling: How Events are Processed" in the wx documentation for more details.

Constructor & Destructor Documentation

ParentFrameT::ParentFrameT ( wxCmdLineParser &  Parser)

The constructor.

ParentFrameT::~ParentFrameT ( )

The destructor.

Member Function Documentation

ChildFrameT * ParentFrameT::GetActiveMapChildFrame ( ) const

Returns the currently active child frame or NULL if no map childframe is active (e.g. no map open or GUI editor is active).

MapDocumentT * ParentFrameT::GetActiveMapDoc ( ) const

Returns the document of the currently active map child frame or NULL if no map document is active.

Member Data Documentation

ArrayT<ChildFrameT*> ParentFrameT::m_ChildFrames

The list where all map child frames register themselves on construction and unregister on destruction.

wxFileHistory ParentFrameT::m_FileHistory

The file history of our and all our childrens "File" menu.

wxGLCanvas* ParentFrameT::m_GLCanvas

Our persistent "home" of the shared GL context. Used whenever there is no view.

wxGLContext* ParentFrameT::m_GLContext

The OpenGL rendering context that represents our app-global OpenGL state.

ArrayT<GuiEditor::ChildFrameT*> ParentFrameT::m_GuiChildFrames

The list where all GUI child frames register themselves on construction and unregister on destruction.

ArrayT< IntrusivePtrT<cf::GuiSys::WindowT> > ParentFrameT::m_GuiClipboard

The common clipboard for all GUI Editor child frames.

ArrayT<ModelEditor::ChildFrameT*> ParentFrameT::m_MdlChildFrames

The list where all model child frames register themselves on construction and unregister on destruction.

MatSys::TextureMapI* ParentFrameT::m_WhiteTexture

A white texture map that is set as default lightmap whenever nothing else is available.

int ParentFrameT::OpenGLAttributeList
static
Initial value:
=
{
WX_GL_RGBA,
WX_GL_DOUBLEBUFFER,
WX_GL_MIN_RED, 8,
WX_GL_MIN_GREEN, 8,
WX_GL_MIN_BLUE, 8,
WX_GL_MIN_ALPHA, 8,
WX_GL_DEPTH_SIZE, 16,
WX_GL_STENCIL_SIZE, 8,
0
}

The OpenGL attribute list for this window. The same list must be used for all child windows, so that they get identical pixel formats!


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