X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b19b28c8fca9815949753ed0c68097efe8943b18..5cbda74b6606482f5286a5599fc60f3f91995a52:/interface/wx/docview.h diff --git a/interface/wx/docview.h b/interface/wx/docview.h index 6c294b46ae..20ad3423a8 100644 --- a/interface/wx/docview.h +++ b/interface/wx/docview.h @@ -3,7 +3,7 @@ // Purpose: interface of various doc/view framework classes // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -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. @@ -662,7 +683,7 @@ public: @param noTemplates Number of templates being pointed to by the templates pointer. @param sort - If more than one template is passed in in templates, then this + If more than one template is passed into templates, then this parameter indicates whether the list of templates that the user will have to choose from is sorted or not when shown the choice box dialog. Default is @false. @@ -688,7 +709,7 @@ public: @param noTemplates Number of templates being pointed to by the templates pointer. @param sort - If more than one template is passed in in templates, then this + If more than one template is passed into templates, then this parameter indicates whether the list of templates that the user will have to choose from is sorted or not when shown the choice box dialog. Default is @false.