Add wxDocManager::FindTemplate() method.
This allows to find the template corresponding to the document of the given class. Closes #12170. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -363,6 +363,27 @@ public:
|
||||
*/
|
||||
void AssociateTemplate(wxDocTemplate* temp);
|
||||
|
||||
/**
|
||||
Search for a particular document template.
|
||||
|
||||
Example:
|
||||
@code
|
||||
// creating a document instance of the specified document type:
|
||||
m_doc = (MyDoc*)docManager->FindTemplate(CLASSINFO(MyDoc))->
|
||||
CreateDocument(wxEmptyString, wxDOC_SILENT);
|
||||
@endcode
|
||||
|
||||
@param classinfo
|
||||
Class info of a document class for which a wxDocTemplate had been
|
||||
previously created.
|
||||
|
||||
@return
|
||||
Pointer to a wxDocTemplate, or @NULL if none found.
|
||||
|
||||
@since 2.9.2
|
||||
*/
|
||||
wxDocTemplate* FindTemplate(const wxClassInfo* classinfo);
|
||||
|
||||
/**
|
||||
Closes the specified document.
|
||||
|
||||
|
Reference in New Issue
Block a user