Skip to content

Latest commit

 

History

History
251 lines (125 loc) · 5.63 KB

PyCDocTemplate.md

File metadata and controls

251 lines (125 loc) · 5.63 KB

PyCDocTemplate

PyCDocTemplate Object

A document template class. Encapsulates an MFC CDocTemplate

class

Methods

CreateNewDocument() Called to create a new document object.

CreateNewFrame() Called to create a new frame window.

PyCDocTemplate.DoCreateDoc

PyCDocument = DoCreateDoc(fileName) Creates an underlying document object.

Parameters

  • fileName=None : string

    The name of the file to load.

PyCDocTemplate.FindOpenDocument

PyCDocument = FindOpenDocument(fileName) Returns an existing document with the specified file name.

Parameters

  • fileName : string

    The fully qualified filename to search for.

PyCDocTemplate.GetDocString

string = GetDocString(docIndex) Retrieves a specific substring describing the document type.

Parameters

  • docIndex : int

    The document index. Must be one of the win32ui.CDocTemplate_* constants.

Comments

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.

MFC References

  • CWnd::m_hMenuShared

PyCDocTemplate.InitialUpdateFrame

InitialUpdateFrame(frame, doc, bMakeVisible) Calls the default OnInitialFrame handler.

Parameters

  • frame=None : PyCFrameWnd

    The frame window.

  • doc=None : PyCDocument

    A document for the frame.

  • bMakeVisible=1 : int

    Indicates of the frame should be shown.

See Also

InitialUpdateFrame(frame, frame

, bMakeVisible

) Called to perform the initial frame update.

The default behaviour is to call OnInitialUpdate on all views.

Parameters

  • frame : PyCFrameWnd

    The frame window.

  • frame : PyCDocument

    The document attached to the frame.

  • bMakeVisible : int

    Indicates if the frame should be made visible.

MatchDocType(fileName, fileType

) Queries if the template can open the specified file name.

Parameters

  • fileName : string

    The name of the file to open.

  • fileType : int

    Only used on the mac.

Comments

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.

Parameters

  • filename : string

    Name of file to open, or None

  • bMakeVisible=1 : int

    Indicates if the document should be created visible.

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.

Parameters

  • id : int

    The resource ID.

PyCDocTemplate.SetDocStrings

SetDocStrings(docStrings) Assigns the document strings for the template.

Parameters

  • docStrings : string

    The document strings.

Comments

The string must be a \\n seperated list of docstrings.

The elements are: