wxRuby Documentation Home

# Wx::DocChildFrame

The DocChildFrame 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 Widgets,
and cooperates with the View, Document,
DocManager and DocTemplate classes.

See the example application in `samples/docview`.

## Derived from

Frame

Window

EvtHandler

Object

## Methods

- DocChildFrame.new
- DocChildFrame#get_document
- DocChildFrame#get_view
- DocChildFrame#on_activate
- DocChildFrame#on_close_window
- DocChildFrame#set_document
- DocChildFrame#set_view

## See also

Document/view overview, Frame

### DocChildFrame.new

DocChildFrame.new(%(arg-type)Document% doc, View view, Frame parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_FRAME_STYLE, String name = “frame”)

Constructor.

### DocChildFrame#get_document

Document get_document()

Returns the document associated with this frame.

### DocChildFrame#get_view

View get_view()

Returns the view associated with this frame.

### DocChildFrame#on_activate

on_activate(%(arg-type)ActivateEvent% 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.

### DocChildFrame#on_close_window

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

Closes and deletes the current view and document.

### DocChildFrame#set_document

set_document(%(arg-type)Document% doc)

Sets the document for this frame.

### DocChildFrame#set_view

set_view(%(arg-type)View% view)

Sets the view for this frame.

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