wxRuby Documentation Home

Wx::DocMDIParentFrame

The DocMDIParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for MDI parent frames.

It cooperates with the View, Document,
DocManager and DocTemplates classes.

See the example application in samples/docview.

Derived from

MDIParentFrame

Frame

Window

EvtHandler

Object

See also

Document/view overview, MDIParentFrame

Methods

DocMDIParentFrame.new

DocMDIParentFrame.new(%(arg-type)DocManager% manager, Frame parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_FRAME_STYLE, String name = “frame”)

Constructor.

destructor()

Destructor.

DocMDIParentFrame.new

Boolean create(%(arg-type)DocManager% manager, Frame parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_FRAME_STYLE, String name = “frame”)

Creates the window.

DocMDIParentFrame#on_close_window

on_close_window(%(arg-type)CloseEvent% event)

Deletes all views and documents. If no user input cancelled the
operation, the frame will be destroyed and the application will exit.

Since understanding how document/view clean-up takes place can be difficult,
the implementation of this function is shown below.

void DocParentFrame::OnCloseWindow(CloseEvent& event) { if (m_docManager→Clear(!event.CanVeto())) { this→Destroy(); } else event.Veto(); }

[This page automatically generated from the Textile source at 2023-06-09 00:45:28 +0000]