GUI::EditationWindowBase Class Reference

Base editation window abstract class. More...

#include <EditationWindowBase.h>

Inheritance diagram for GUI::EditationWindowBase:

GUI::EditationWindowApplication GUI::EditationWindowCanvas GUI::EditationWindowObject GUI::EditationWindowObjectAgent GUI::EditationWindowObjectFixed GUI::EditationWindowObjectTrail GUI::EditationWindowObjectTransferable List of all members.

Public Member Functions

virtual void OnWindowClose (wxCloseEvent &event)
virtual void OnOkButton (wxCommandEvent &event)=0
virtual void OnCancelButton (wxCommandEvent &event)
 EditationWindowBase (wxWindow *parent, EditableInWindowConfig &editedConfig, const string &windowTitle="Editation window")
 Constructor.
virtual ~EditationWindowBase ()
 Destructor.
void SetModalEventLoop (wxModalEventLoop *eventLoop)
 Sets current event loop.
void ExitModalEventLoop ()
 Exits modal event loop, so application flow will be restored.

Protected Types

 ID_OkButton = 11000
 ID_CancelButton
enum  { ID_OkButton = 11000, ID_CancelButton }
 Event IDs. More...

Protected Member Functions

virtual void CreateBasicForm ()=0
 Creates basic form.
virtual void CreateHorizontalLine ()
 Creates horizontal line.
virtual void CreateButtons ()
 Creates OK/Cancel buttons.
virtual bool SaveConfig ()=0
 Saves edited info into config.
wxBoxSizer * GetMainSizer ()
 Returns pointer to the main sizer.
wxPanel * GetMainPanel ()
 Returns pointer to the main panel.

Static Protected Attributes

static const int HLINE_SIZE = 3
static const int BUTTON_BORDER_SIZE = 7
static const int GRIDER_BASIC_FORM_COLS = 2
static const int MAIN_SIZER_BORDER_SIZE = 5
static const wxSize FORM_TEXT_BOX_SIZE = wxSize(200, 25)

Private Member Functions

void BeginBaseWindowCreation ()
 Begins creating main panel/window.
void EndBaseWindowCreation ()
 Ends main panel/window creation.

Private Attributes

EditableInWindowConfigconfig
 Config that will be edited.
wxPanel * p
 Main panel.
wxBoxSizer * topsizer
 Main sizer.
wxModalEventLoop * loop
 Event loop - pause the application flow until the window is closed.

Detailed Description

Base editation window abstract class.

Every config editation window should be driven from this class.


Member Enumeration Documentation

anonymous enum [protected]

Event IDs.

Enumerator:
ID_OkButton 
ID_CancelButton 


Constructor & Destructor Documentation

GUI::EditationWindowBase::EditationWindowBase ( wxWindow *  parent,
EditableInWindowConfig editedConfig,
const string &  windowTitle = "Editation window" 
)

Constructor.

Parameters:
parent Parent window
editedConfig Config that wil be edited
windowTitle Title of the window

GUI::EditationWindowBase::~EditationWindowBase (  )  [virtual]

Destructor.


Member Function Documentation

void GUI::EditationWindowBase::BeginBaseWindowCreation (  )  [private]

Begins creating main panel/window.

This method must be called before anything else.

virtual void GUI::EditationWindowBase::CreateBasicForm (  )  [protected, pure virtual]

Creates basic form.

Implemented in GUI::EditationWindowApplication, GUI::EditationWindowCanvas, GUI::EditationWindowObject, and GUI::EditationWindowObjectAgent.

void GUI::EditationWindowBase::CreateButtons (  )  [protected, virtual]

Creates OK/Cancel buttons.

void GUI::EditationWindowBase::CreateHorizontalLine (  )  [protected, virtual]

Creates horizontal line.

void GUI::EditationWindowBase::EndBaseWindowCreation (  )  [private]

Ends main panel/window creation.

void GUI::EditationWindowBase::ExitModalEventLoop (  ) 

Exits modal event loop, so application flow will be restored.

wxPanel* GUI::EditationWindowBase::GetMainPanel (  )  [inline, protected]

Returns pointer to the main panel.

wxBoxSizer* GUI::EditationWindowBase::GetMainSizer (  )  [inline, protected]

Returns pointer to the main sizer.

void GUI::EditationWindowBase::OnCancelButton ( wxCommandEvent &  event  )  [virtual]

virtual void GUI::EditationWindowBase::OnOkButton ( wxCommandEvent &  event  )  [pure virtual]

Implemented in GUI::EditationWindowApplication, GUI::EditationWindowCanvas, GUI::EditationWindowObject, and GUI::EditationWindowObjectAgent.

void GUI::EditationWindowBase::OnWindowClose ( wxCloseEvent &  event  )  [virtual]

virtual bool GUI::EditationWindowBase::SaveConfig (  )  [protected, pure virtual]

Saves edited info into config.

Returns:
Returns true if everything was saved ok

Implemented in GUI::EditationWindowApplication, GUI::EditationWindowCanvas, GUI::EditationWindowObject, and GUI::EditationWindowObjectAgent.

void GUI::EditationWindowBase::SetModalEventLoop ( wxModalEventLoop *  eventLoop  ) 

Sets current event loop.

Parameters:
eventLoop Event loop
This member function _must_ be called after window creation with appropirate wxModalEventLoop if you want to pause the application flow until the window is closed.


Member Data Documentation

const int GUI::EditationWindowBase::BUTTON_BORDER_SIZE = 7 [static, protected]

EditableInWindowConfig& GUI::EditationWindowBase::config [private]

Config that will be edited.

Reimplemented in GUI::EditationWindowApplication, GUI::EditationWindowCanvas, GUI::EditationWindowObject, and GUI::EditationWindowObjectAgent.

const wxSize GUI::EditationWindowBase::FORM_TEXT_BOX_SIZE = wxSize(200, 25) [static, protected]

const int GUI::EditationWindowBase::GRIDER_BASIC_FORM_COLS = 2 [static, protected]

const int GUI::EditationWindowBase::HLINE_SIZE = 3 [static, protected]

wxModalEventLoop* GUI::EditationWindowBase::loop [private]

Event loop - pause the application flow until the window is closed.

const int GUI::EditationWindowBase::MAIN_SIZER_BORDER_SIZE = 5 [static, protected]

wxPanel* GUI::EditationWindowBase::p [private]

Main panel.

wxBoxSizer* GUI::EditationWindowBase::topsizer [private]

Main sizer.


The documentation for this class was generated from the following files:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7