wxDocChildFrame Class Reference
[Document/View Framework]

#include <wx/docview.h>

Inheritance diagram for wxDocChildFrame:
Inheritance graph
[legend]

Detailed Description

The wxDocChildFrame class provides a default frame for displaying documents on separate windows.

This class can only be used for SDI (not MDI) child frames.

The class is part of the document/view framework supported by wxWidgets, and cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate classes.

Library:  wxCore
Category:  Document/View Framework
See also:
Document/View Framework, Document/View Sample, wxFrame

Public Member Functions

 wxDocChildFrame (wxDocument *doc, wxView *view, wxFrame *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
 Constructor.
virtual ~wxDocChildFrame ()
 Destructor.
wxDocumentGetDocument () const
 Returns the document associated with this frame.
wxViewGetView () const
 Returns the view associated with this frame.
void OnActivate (wxActivateEvent &event)
 Sets the currently active view to be the frame's view.
void OnCloseWindow (wxCloseEvent &event)
 Closes and deletes the current view and document.
void SetDocument (wxDocument *doc)
 Sets the document for this frame.
void SetView (wxView *view)
 Sets the view for this frame.

Public Attributes

wxDocumentm_childDocument
 The document associated with the frame.
wxViewm_childView
 The view associated with the frame.

List of all members.


Constructor & Destructor Documentation

wxDocChildFrame::wxDocChildFrame ( wxDocument doc,
wxView view,
wxFrame parent,
wxWindowID  id,
const wxString title,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxDEFAULT_FRAME_STYLE,
const wxString name = wxFrameNameStr 
)

Constructor.

virtual wxDocChildFrame::~wxDocChildFrame (  )  [virtual]

Destructor.


Member Function Documentation

wxDocument* wxDocChildFrame::GetDocument (  )  const

Returns the document associated with this frame.

wxView* wxDocChildFrame::GetView (  )  const

Returns the view associated with this frame.

void wxDocChildFrame::OnActivate ( wxActivateEvent event  ) 

Sets the currently active view to be the frame's view.

You may need to override (but still call) this function in order to set the keyboard focus for your subwindow.

void wxDocChildFrame::OnCloseWindow ( wxCloseEvent event  ) 

Closes and deletes the current view and document.

void wxDocChildFrame::SetDocument ( wxDocument doc  ) 

Sets the document for this frame.

void wxDocChildFrame::SetView ( wxView view  ) 

Sets the view for this frame.


Member Data Documentation

The document associated with the frame.

The view associated with the frame.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]