#include <docmdiref.h>

Public Member Functions | |
| a2dDocumentMDIChildFrame () | |
| Constructor for two-step creation. Call a2dDocumentMDIChildFrame::Create later. | |
| a2dDocumentMDIChildFrame (wxMDIParentFrame *frame, a2dView *view=NULL, wxWindowID id=-1, const wxString &title=wxT("a2dDocumentMDIChildFrame"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxT("a2dDocumentMDIChildFrame")) | |
| Constructor. | |
| bool | Create (wxMDIParentFrame *frame, a2dView *view=NULL, wxWindowID id=-1, const wxString &title=wxT("a2dDocumentMDIChildFrame"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxT("a2dDocumentMDIChildFrame")) |
| Constructor for two-step creation (2nd step). | |
| ~a2dDocumentMDIChildFrame () | |
| Destructor. | |
| void | SetView (a2dView *view) |
| set a pointer to a a2dView to sent view events to. | |
| a2dView * | GetView (void) const |
| get the pointer to a a2dView to which view events are sent | |
| void | SetDestroyOnCloseView (bool destroyOnCloseView) |
| virtual bool | ProcessEvent (wxEvent &event) |
| Extend event processing to search the view's event table. | |
| void | OnActivate (wxActivateEvent &event) |
| void | OnCloseWindow (wxCloseEvent &event) |
| bool | Destroy () |
| virtual void | OnDraw (wxDC &dc) |
| Override this function to draw the graphic (or just process EVT_PAINT). | |
| void | AddCmdMenu (wxMenu *parentMenu, const a2dMenuIdItem &cmdId) |
| add a command menu to the parent menu, and connect it to the eventhandler of the frame | |
| void | AddCmdMenu (wxMenu *parentMenu, wxMenuItem *item) |
| void | RemoveCmdMenu (wxMenu *parentMenu, const a2dMenuIdItem &cmdId) |
| remove a command menu from the parent menu. | |
| void | AddCmdToToolbar (const a2dMenuIdItem &cmdId) |
| add items to toolbar using a predefined command ID. | |
Protected Member Functions | |
| void | OnCmdMenuId (wxCommandEvent &event) |
| void | OnPaint (wxPaintEvent &event) |
| default handler for paint events, it calls OnDraw(). | |
| void | OnCloseView (a2dCloseViewEvent &event) |
| default for closing a view in this frame | |
| void | OnActivateViewSentFromChild (a2dViewEvent &viewevent) |
| sets m_view to the current active view, generate by a2dView::Activate() | |
Protected Attributes | |
| a2dSmrtPtr< a2dView > | m_view |
| bool | m_destroyOnCloseView |
| when closing the view the frame will be destroyed. | |
In case of a wxEVT_CLOSE_WINDOW event, it is first redirected to the window, and if not vetod to the view.
Definition at line 150 of file docmdiref.h.
| a2dDocumentMDIChildFrame::a2dDocumentMDIChildFrame | ( | wxMDIParentFrame * | frame, | |
| a2dView * | view = NULL, |
|||
| wxWindowID | id = -1, |
|||
| const wxString & | title = wxT("a2dDocumentMDIChildFrame"), |
|||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxDEFAULT_FRAME_STYLE, |
|||
| const wxString & | name = wxT("a2dDocumentMDIChildFrame") | |||
| ) |
Constructor.
| frame | The parent frame. This should not be NULL | |
| view | The view for the document ( can be NULL ) | |
| id | The window identifier. It may take a value of -1 to indicate a default value. | |
| title | The caption to be displayed on the frame's title bar. | |
| pos | The window position. | |
| size | The window size. | |
| style | Window style, please look into wxWindows docs for an overview. | |
| name | The name of the window. |
Definition at line 198 of file docmdiref.cpp.
| bool a2dDocumentMDIChildFrame::Create | ( | wxMDIParentFrame * | frame, | |
| a2dView * | view = NULL, |
|||
| wxWindowID | id = -1, |
|||
| const wxString & | title = wxT("a2dDocumentMDIChildFrame"), |
|||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxDEFAULT_FRAME_STYLE, |
|||
| const wxString & | name = wxT("a2dDocumentMDIChildFrame") | |||
| ) |
Constructor for two-step creation (2nd step).
| frame | The parent frame. This should not be NULL | |
| view | The view for the document ( can be NULL ) | |
| id | The window identifier. It may take a value of -1 to indicate a default value. | |
| title | The caption to be displayed on the frame's title bar. | |
| pos | The window position. | |
| size | The window size. | |
| style | Window style, please look into wxWindows docs for an overview. | |
| name | The name of the window. |
Definition at line 210 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::SetView | ( | a2dView * | view | ) |
set a pointer to a a2dView to sent view events to.
Normally set via OnActivateViewSentFromChild()
The m_view is used to redirect the frame event for closing the window, and the activate event for the frame, to the view. Only if the m_view->GetDisplayWindow() is the a2dDocumentFrame itself, it will also be used for drawing the view ( See OnDraw() )
Definition at line 267 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::OnDraw | ( | wxDC & | dc | ) | [virtual] |
Override this function to draw the graphic (or just process EVT_PAINT).
The default handler for EVT_PAINT is OnPaint, and it calls OnDraw(). OnDraw its default implementation is calling the m_view its OnDraw().
Definition at line 425 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::AddCmdMenu | ( | wxMenu * | parentMenu, | |
| const a2dMenuIdItem & | cmdId | |||
| ) |
add a command menu to the parent menu, and connect it to the eventhandler of the frame
Many commands which can be submitted to a commandprocessor in the following manner:
commandprocessor->Submit( new a2dCommand_SomeCommand() )
void a2dDocumentCommandProcessor::OnMenu( wxCommandEvent& event )
Definition at line 245 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::AddCmdMenu | ( | wxMenu * | parentMenu, | |
| wxMenuItem * | item | |||
| ) |
same as for a2dMenuIdItem, Id in wxMenuItem must be a valid id from one a2dMenuIdItem used in XRC files
Definition at line 239 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::RemoveCmdMenu | ( | wxMenu * | parentMenu, | |
| const a2dMenuIdItem & | cmdId | |||
| ) |
remove a command menu from the parent menu.
See AddCmdMenu()
Definition at line 251 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::OnCmdMenuId | ( | wxCommandEvent & | event | ) | [protected] |
used by AddCmdMenu() to dynamically connect menu to function. The function just Skippes the event, so it will be handled by a command processor in the end.
Definition at line 234 of file docmdiref.cpp.
| void a2dDocumentMDIChildFrame::OnCloseView | ( | a2dCloseViewEvent & | event | ) | [protected] |
default for closing a view in this frame
Close the view of the current m_window and destroy the frame.
Definition at line 371 of file docmdiref.cpp.
a2dSmrtPtr<a2dView> a2dDocumentMDIChildFrame::m_view [protected] |
used for redirecting close and activate events to the view which has the focus. See SetView()
Definition at line 299 of file docmdiref.h.