A document class. Encapsulates an MFC CDocument
class
-
Call the MFC DeleteContents method.
-
Save the file. If necessary, prompt for file name.
-
Check file attributes, and save the file.
-
Returns the PyCDocTemplate for the document.
-
Returns a list of all views for the current document.
-
Returns the first view object attached to this document.
-
Returns the full path name of the current document.
-
Returns the title of the current document.
-
Return a flag indicating if the document has been modified.
-
Informs the document when a view is added or removed.
-
Call the MFC OnCloseDocument handler.
-
Call the MFC OnNewDocument handler.
-
Call the MFC OnOpenDocument handler.
-
Call the MFC OnSaveDocument handler.
-
Set the "dirty" flag for the document.
-
Call the underlying MFC method.
-
Set the full path name for the document.
-
Set the title of the document.
-
Informs each view when a document changes.
sentinel
PyCDocument.DeleteContents
DeleteContents() Call the MFC DeleteContents method.
This routine is provided so a document object which overrides this method
can call the original MFC version if required.
- PyCDocument.DeleteContents virtual method
- CDocument::DeleteContents
PyCDocument.DeleteContents Virtual
DeleteContents() Called by the MFC architecture when a document is newly created or closed.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
PyCDocument.DoFileSave
DoFileSave() Checks the file attributes.
If the file is read only, a new name is prompted, else the
file is saved (by calling DoSave)
- PyCDocument.DoFileSave virtual method
- CDocument::DoFileSave
PyCDocument.DoFileSave Virtual
DoFileSave() Called by the MFC architecture.
If a handler is defined for this function, it must call the
base class PyCDocument::DoFileSave method.
TRUE if the document could be saved, else FALSE.
PyCDocument.DoSave
DoSave(fileName, bReplace) Calls the underlying MFC DoSave method.
-
fileName : string
The name of the file to save to.
-
bReplace=1 : int
Should an existing file be silently replaced?.
If invalid or no filename, will prompt for a name, else
will perform the actual saving of the document.
- PyCDocument.DoSave virtual method
- CDocument::DoSave
PyCDocument.DoSave Virtual
DoSave(fileName, bReplace
) Called by the MFC architecture to save a document.
-
fileName : string
The name of the file being saved.
-
bReplace : int
TRUE if the file should be replaced.
If a handler is defined for this function, it must call the
base class PyCDocument::DoSave method.
TRUE if the document could be saved, else FALSE.
PyCDocument.GetAllViews
[PyCView,...] = GetAllViews() Returns a list of all views for the current document.
-
CDocument::GetFirstViewPosition
-
CDocument::GetNextView
PyCDocument.GetDocTemplate
PyCDocTemplate = GetDocTemplate() Returns the template for the document.
- CDocument::GetDocTemplate
PyCDocument.GetFirstView
PyCView = GetFirstView() Returns the first view object attached to this document.
For more info, see PyCDocument::GetAllViews
shouldnt be possible.
-
CDocument::GetFirstViewPosition
-
CDocument::GetNextView
PyCDocument.GetPathName
string = GetPathName() Returns the full path name of the current document.
The string will be empty if no path name has been set.
- CDocument::GetPathName
PyCDocument.GetTitle
string = GetTitle() Returns the title of the current document.
This will often be the file name portion of the path name.
- CDocument::GetTitle
PyCDocument.IsModified
int = IsModified() Return a flag indicating if the document has been modified.
- CDocument::IsModified
PyCDocument.OnChangedViewList
OnChangedViewList() Informs the document when a view is added or removed.
PyCDocument.OnChangedViewList Virtual
OnChangedViewList() Called by the MFC architecture when after a view is attached.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
PyCDocument.OnCloseDocument
OnCloseDocument() Call the MFC OnCloseDocument handler.
This routine is provided so a document object which overrides this method
can call the original MFC version if required.
- PyCDocument.OnCloseDocument virtual method
- CDocument::OnCloseDocument
PyCDocument.OnCloseDocument Virtual
OnCloseDocument() Called by the MFC architecture.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
PyCDocument.OnNewDocument
OnNewDocument() Call the MFC OnNewDocument handler.
This routine is provided so a document object which overrides this method
can call the original MFC version if required.
- PyCDocument.OnNewDocument virtual method
- CDocument::OnNewDocument
PyCDocument.OnNewDocument Virtual
OnNewDocument() Called by the MFC architecture.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
TRUE if a new document could be created, else FALSE.
PyCDocument.OnOpenDocument
OnOpenDocument(pathName) Call the MFC OnOpenDocument handler.
This routine is provided so a document object which overrides this method
can call the original MFC version if required.
-
pathName : string
The full path of the file to open.
- CDocument::OnOpenDocument
PyCDocument.OnOpenDocument Virtual
OnOpenDocument(fileName) Called by the MFC architecture.
-
fileName : string
The name of the file being opened.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
TRUE if the document could be opened, else FALSE.
PyCDocument.OnSaveDocument
OnSaveDocument(pathName) Call the MFC OnSaveDocument handler.
This routine is provided so a document object which overrides this method
can call the original MFC version if required.
-
pathName : string
The full path of the file to save.
- CDocument::OnSaveDocument
PyCDocument.OnSaveDocument Virtual
OnSaveDocument(fileName) Called by the MFC architecture.
-
fileName : string
The name of the file being saved.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
TRUE if the document could be saved, else FALSE.
PyCDocument.PreCloseFrame Virtual
PreCloseFrame() Called before the frame window is closed.
The MFC base implementation is always called after the Python handler returns.
PyCDocument.SaveModified
int = SaveModified() Call the underlying MFC method.
- PyCDocument.SaveModified virtual method
- CDocument::SaveModified
Nonzero if it is safe to continue and close the document; 0 if the document should not be closed.
PyCDocument.SaveModified Virtual
SaveModified() Called by the MFC architecture when a document is closed.
If a handler is defined for this function, the base (MFC) function will not
be called. If necessary, the handler must call this function explicitely.
The handler should return TRUE if it is safe to continue and close
the document; 0 if the document should not be closed.
PyCDocument.SetModifiedFlag
SetModifiedFlag(bModified) Set the "dirty" flag for the document.
-
bModified=1 : int
Set dirty flag
- CDocument::SetModifiedFlag
PyCDocument.SetPathName
SetPathName(path) Set the full path name for the document.
-
path : string
The full path of the file.
- CDocument::SetPathName
PyCDocument.SetTitle
SetTitle(title) Set the title of the document (ie, the name
to appear in the window caption for the document.
-
title : string
The new title.
- CDocument::SetTitle
PyCDocument.UpdateAllViews
UpdateAllViews(sender, hint) Informs each view when a document changes.
-
sender : PyCView
The view who initiated the update
-
hint=None : object
A hint for the update.
- CDocument::UpdateAllViews