A document template class. Encapsulates an MFC CDocTemplate
class
-
Creates an underlying document object.
-
Returns an existing document with the specified file name.
-
Retrieves a specific substring describing the document type.
-
Return a list of all open documents.
-
Returns the resource ID in use.
-
Returns the shared menu object for all frames using this template.
-
Calls the default OnInitialFrame handler.
-
Sets the resources to be used when an OLE 2 object is in-place activated.
-
Assigns the document strings for the template.
-
Opens a document file, creating a view and frame.
PyCDocTemplate.CreateNewDocument Virtual
CreateNewDocument() Called to create a new document object.
PyCDocTemplate.CreateNewFrame Virtual
CreateNewFrame() Called to create a new frame window.
PyCDocTemplate.DoCreateDoc
PyCDocument = DoCreateDoc(fileName) Creates an underlying document object.
-
fileName=None : string
The name of the file to load.
PyCDocTemplate.FindOpenDocument
PyCDocument = FindOpenDocument(fileName) Returns an existing document with the specified file name.
-
fileName : string
The fully qualified filename to search for.
PyCDocTemplate.GetDocString
string = GetDocString(docIndex) Retrieves a specific substring describing the document type.
-
docIndex : int
The document index. Must be one of the win32ui.CDocTemplate_* constants.
For more information on the doc strings, please see PyCDocTemplate::SetDocStrings
PyCDocTemplate.GetDocumentList
list = GetDocumentList() Return a list of all open documents.
PyCDocTemplate.GetResourceID
GetResourceID() Returns the resource ID in use.
PyCDocTemplate.GetSharedMenu
PyCMenu = GetSharedMenu() Returns the shared menu object for all frames using this template.
- CWnd::m_hMenuShared
PyCDocTemplate.InitialUpdateFrame
InitialUpdateFrame(frame, doc, bMakeVisible) Calls the default OnInitialFrame handler.
-
frame=None : PyCFrameWnd
The frame window.
-
doc=None : PyCDocument
A document for the frame.
-
bMakeVisible=1 : int
Indicates of the frame should be shown.
- PyCDocTemplate.InitialUpdateFrame virtual method
InitialUpdateFrame(frame, frame
, bMakeVisible
) Called to perform the initial frame update.
The default behaviour is to call OnInitialUpdate on all views.
-
frame : PyCFrameWnd
The frame window.
-
frame : PyCDocument
The document attached to the frame.
-
bMakeVisible : int
Indicates if the frame should be made visible.
PyCDocTemplate.MatchDocType Virtual
MatchDocType(fileName, fileType
) Queries if the template can open the specified file name.
-
fileName : string
The name of the file to open.
-
fileType : int
Only used on the mac.
This method should call PyCDocTemplate.FindOpenDocument to return an already open
document if one exists, else it should return one of the win32ui.CDocTemplate_Confidence_* constants.
PyCDocTemplate.OpenDocumentFile
OpenDocumentFile(filename, bMakeVisible) Opens a document file, creating a view and frame.
-
filename : string
Name of file to open, or None
-
bMakeVisible=1 : int
Indicates if the document should be created visible.
PyCDocTemplate.OpenDocumentFile Virtual
OpenDocumentFile() Called when a document file is to be opened.
PyCDocTemplate.SetContainerInfo
SetContainerInfo(id) Sets the resources to be used when an OLE 2 object is in-place activated.
-
id : int
The resource ID.
PyCDocTemplate.SetDocStrings
SetDocStrings(docStrings) Assigns the document strings for the template.
-
docStrings : string
The document strings.
The string must be a \\n seperated list of docstrings.
The elements are: