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. |
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.
name | The name to be used to retrieve this view. | |
type | The type of the class that for this view. |
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.
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.
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. |
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.
key | The name of the view to retrieve. | |
type | The type of the view to retrieve. | |
container | The container that contains the view. |
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.
container | The container that contains the active view. |
SdiView SdiTemplate::SdiMainForm::CurrentView [get] |
Retrieve the most recent view.
Every time that SetView is called, the view is saved in this property.