SdiTemplate::SdiTemplate Class Reference

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

Public Member Functions

 SdiTemplate ()
 Default Constructor.
 SdiTemplate (SdiMainForm mainForm)
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

SdiDoc Doc [get, set]
 Property that returns the document, as SdiDoc.
SdiMainForm MainForm [get, set]
 Property that returns the accesses the main form.

Detailed Description

Application context for Sdi application.
Call CreateDocument from main form of application.
Call SetView for each view to be added to main form.
The doc can be accessed through this context.
The active view can be accessed through this context.


Constructor & Destructor Documentation

SdiTemplate::SdiTemplate::SdiTemplate (  )  [inline]

Default Constructor.

The default constructor does not do anything, but it is safer to always create a default constructor: the designer calls them at the strangest times.

SdiTemplate::SdiTemplate::SdiTemplate ( SdiMainForm  mainForm  )  [inline]

Constructor that sets the main form.

Call this constructor from the main form to create the SDI template for this main form.


Member Function Documentation

SdiView SdiTemplate::SdiTemplate::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.

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::SdiTemplate::CreateDocument ( Type  type  )  [inline]

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

Parameters:
type The type of the document class.
Returns:
The document that was created, as SdiDoc.

SdiView SdiTemplate::SdiTemplate::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::SdiTemplate::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::SdiTemplate::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

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

Property that returns the document, as SdiDoc.

SdiMainForm SdiTemplate::SdiTemplate::MainForm [get, set]

Property that returns the accesses the main form.


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