SdiTemplate::SdiView Class Reference

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

Public Member Functions

 SdiView ()
 Default Constructor.
 SdiView (String name, SdiMainForm parent)
 Create a constructor in all views with this signature.
virtual void Update (Object sender)
 Override in derived class for actions to perform when doc changes.
virtual void SdiView_Paint (object sender, PaintEventArgs e)
 Override this method in the extended class.

Protected Member Functions

void SdiInitializeComponent ()
 Default appearance of view.

Detailed Description

All views should extend from this class.


Constructor & Destructor Documentation

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

Default Constructor.

The default constructor is required for the visual studio designer. The default constructor should not be called when a new view is created in an application.

Even though the SdiView is a user control, do not add it to the toolbox. The designer will call the default contructor. It is necessary to call the constructor that has parameters, instead.

SdiTemplate::SdiView::SdiView ( String  name,
SdiMainForm  parent 
) [inline]

Create a constructor in all views with this signature.

To create a class for the SdiView, create an empty class and extend it from SdiView. Call the SetView method to add the view to a container control.

Use this constructor to create your user control. Do not use the designer to add the SdiView to your project. The designer will call the default constructor, which will cause errors in your application.

Be sure to call the base class constructor with the same arguments.

            public ExtendedView(String name, SdiMainForm parent)
                : base(name, parent)
            {
            	...
            }
            
If you modify the extended view in the designer, be sure to call InitializeComponent in the extended view from the view's constructor. InitializeComponent will not be created until you modify the extended view in the designer.
            public ExtendedView(String name, SdiApplicationContext context)
                : base(name, parent)
            {
            	...
                InitializeComponent();
                ...
            }
            

Parameters:
name The name to be used to retrieve the view
context The main form that will show this view


Member Function Documentation

virtual void SdiTemplate::SdiView::Update ( Object  sender  )  [inline, virtual]

Override in derived class for actions to perform when doc changes.

Be sure to call the base class Doc_Update or call Invalidate(true) in the overriden method.

Parameters:
sender The view that initiated the change to the doc.

virtual void SdiTemplate::SdiView::SdiView_Paint ( object  sender,
PaintEventArgs  e 
) [inline, virtual]

Override this method in the extended class.

Each view that is created with SdiApplication.SetView is subscribed to the paint event. Override this method in the extended class to handled painting. It is not necessary to subscribe to the paint handler in the extended class.

Parameters:
sender Object that initiated paint.
e Normal event args for paint

void SdiTemplate::SdiView::SdiInitializeComponent (  )  [inline, protected]

Default appearance of view.

This is the default appearance of view before any changes are made in the extended class. This method should not be changed or overridden. Make all changes in extended view class. Any changes made to the extended class in the designer will be reflected in IntializeComponent in the extended class.


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