a2dFrameViewConnector Class Reference

uses a wxFrame to hold new views or to create child wxFrame's to hold new views. More...

#include <docviewref.h>

Inheritance diagram for a2dFrameViewConnector:

Inheritance graph
[legend]
Collaboration diagram for a2dFrameViewConnector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dFrameViewConnector ()
 Constructor.
virtual ~a2dFrameViewConnector ()
 destructor
 a2dFrameViewConnector (const a2dFrameViewConnector &other)
void Init (wxFrame *docframe, bool createChildframe=true)
 The pointer m_docframe will be initialized.
wxFrame * GetFrame ()
 get the frame
void SetFrame (wxFrame *docframe)
 set the frame
void SetCreateChild (bool createChildframe)
bool GetCreateChild ()

Protected Attributes

wxFrame * m_docframe
 the frame which receives events and often redirect those to the document manager.
bool m_createChildframe


Detailed Description

uses a wxFrame to hold new views or to create child wxFrame's to hold new views.

If createChildframe == true Creates for every new view reported by wxEVT_POST_CREATE_VIEW a new a2dDocumentFrame as child of GetDocFrame() else Switches every new view reported by wxEVT_POST_CREATE_VIEW into an existing a2dDocumentFrame GetDocFrame() The old a2dView for that a2dDocumentFrame stays on the wxDocument.

GetFrame() / m_docframe can be the Top Frame in a window application or Any other Child Frame.

Definition at line 3165 of file docviewref.h.


Member Function Documentation

void a2dFrameViewConnector::Init ( wxFrame *  docframe,
bool  createChildframe = true 
)

The pointer m_docframe will be initialized.

An application can have only one Parent a2dDocumentFrame in the application, which is the Frame which other Child a2dDocumentFrame(s) have as Parent. The Parent Frame is in general created in bool wxApp::OnInit(void).

Depending on the derived connector the a2dDocumentFrame may be used in a parent fashion or in a child fashion. The derived a2dFrameViewConnector may use the parent frame to generate new child frames for it. And in another derived a2dFrameViewConnector, the same frame may be used to switch views.

The docframe can display a document using a a2dView.

Parameters:
docframe The parent frame of the whole application OR a child frame
createChildframe new views will get its own frame as child of m_docframe

Definition at line 2441 of file docviewref.cpp.

void a2dFrameViewConnector::SetFrame ( wxFrame *  docframe  )  [inline]

set the frame

The wxFrame can be the parent/top frame in the application or a Child Frame of this application. See a2dDocumentFrame how to create a parent or child frame.

Definition at line 3206 of file docviewref.h.


The documentation for this class was generated from the following files:
a2dFrameViewConnector Class Reference -- Tue Aug 31 18:27:33 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation