SdiTemplate::SdiMainForm Class Reference

Collaboration diagram for SdiTemplate::SdiMainForm:
[legend]
List of all members.

Public Member Functions

SdiDoc CreateDocument (Type type)
 Call this method from the main form of an Sdi application to create the document for the application.
SdiView SetView (String strViewName, Type type, Control control)
 Make a view active in a container.
SdiView GetView (String key, Type type, Control container)
 Retrieve a view by name.
SdiView GetActiveView (Control container)
 Returns the current view that is active in a container in the main form.

Protected Member Functions

SdiView CreateView (String name, Type type)
 Calls constructor of type, using reflection.

Properties

SdiView CurrentView [get]
 Retrieve the most recent view.
SdiDoc Doc [get, set]
 Property that returns the document, as SdiDoc.

Detailed Description

Extend main form for Sdi app from this class. Modify the extended form in the GUI designer.


Member Function Documentation

SdiView SdiTemplate::SdiMainForm::CreateView ( String  name,
Type  type 
) [inline, protected]

Calls constructor of type, using reflection.

If a view has not been created, then it can be created in the base class using reflection. This saves the programmer from having to construct each view before adding it to a container.

This method is only used internally.

Parameters:
name The name to be used to retrieve this view.
type The type of the class that for this view.
Returns:
Returns the view that is created as SdiView.

SdiDoc SdiTemplate::SdiMainForm::CreateDocument ( Type  type  )  [inline]

Call this method from the main form of an Sdi application to create the document for the application.

Returns:
The document that was created, as SdiDoc.

SdiView SdiTemplate::SdiMainForm::SetView ( String  strViewName,
Type  type,
Control  control 
) [inline]

Make a view active in a container.

This will construct the view if it has not already been constructed.
Call it for each view that will be displayed.
This method will make this view active and hide the previous view.

Parameters:
strViewName The name used to retrieve the view.
type The type of the view class.
control The container control that the view should be added to.
Returns:
The view that was activated; returned as SdiView.

SdiView SdiTemplate::SdiMainForm::GetView ( String  key,
Type  type,
Control  container 
) [inline]

Retrieve a view by name.

Uses the name that was sent to the SetView method.

Parameters:
key The name of the view to retrieve.
type The type of the view to retrieve.
container The container that contains the view.
Returns:
The view; returned as SdiView.

SdiView SdiTemplate::SdiMainForm::GetActiveView ( Control  container  )  [inline]

Returns the current view that is active in a container in the main form.

Uses the name that was sent to the SetView method.

Parameters:
container The container that contains the active view.
Returns:
The view; returned as SdiView.


Property Documentation

SdiView SdiTemplate::SdiMainForm::CurrentView [get]

Retrieve the most recent view.

Every time that SetView is called, the view is saved in this property.

Returns:
The view; returned as SdiView.

SdiDoc SdiTemplate::SdiMainForm::Doc [get, set]

Property that returns the document, as SdiDoc.


The documentation for this class was generated from the following file:
Generated on Tue Mar 6 10:15:59 2007 for SdiTemplate by  doxygen 1.5.1-p1