Public Member Functions | |
SdiDoc () | |
Each derived class SHOULD create a default constructor and call the base class default constructor. | |
virtual void | DeleteContents () |
Override this method in the extended doc to reset content. | |
void | UpdateAllViews (Object sender) |
Call this method everytime the document changes. | |
Public Attributes | |
event UpdateEvent | Update |
Each view is subscribed to this event. | |
Properties | |
bool | Modified [get, set] |
A property that can be used to keep track if the document has changed. |
Base class for document in Sdi application.
There will be one doc for entire app.
Whenever the doc changes, call UpdateAllViews.
Override DeleteContents to reset extended class to initial state.
Set Modified whenever the doc changes. There is no built in functionality for Modified. All use of Modified must be implemented in extended class.
SdiTemplate::SdiDoc::SdiDoc | ( | ) | [inline] |
Each derived class SHOULD create a default constructor and call the base class default constructor.
public ExtendedDoc() : base() {}
virtual void SdiTemplate::SdiDoc::DeleteContents | ( | ) | [inline, virtual] |
Override this method in the extended doc to reset content.
Each derived class will have its own data. Override this method to reset the data to its initial state.
Be sure to call the base class UpdateAllViews in the overridden method or call it directly in the overridden method.
void SdiTemplate::SdiDoc::UpdateAllViews | ( | Object | sender | ) | [inline] |
Call this method everytime the document changes.
This method will fire the Update event. All views that have been created with SdiApplicationContext.SetView will be notified of this event.
sender | If the sender is not null, then it should be the current, active view. The Update handler in that view can test the parameter to see if it is the view that initiated the change. This is useful if the view already updated itself, before the document was notified of the change. |
event UpdateEvent SdiTemplate::SdiDoc::Update |
Each view is subscribed to this event.
As part of the Sdi framework, each view will subscribe to this event when the Application:SetView method is called.
bool SdiTemplate::SdiDoc::Modified [get, set] |
A property that can be used to keep track if the document has changed.
There is no built in functionality for this property. It is up to the user to set this whenever the document changes and to clear it when the document is new or has been saved.