]> git.saurik.com Git - wxWidgets.git/commitdiff
Added optional parameter to SelectDocumentType() and SelectViewType() to allow the...
authorGeorge Tasker <gtasker@allenbrook.com>
Wed, 24 Jan 2001 11:04:30 +0000 (11:04 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Wed, 24 Jan 2001 11:04:30 +0000 (11:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/docmanag.tex
include/wx/docview.h
src/common/docview.cpp

index b2eecb5e3917fde5ab4257f4984356aa9f1ab27e..4f501d1708c89299493183e7b0af7034360023f5 100644 (file)
@@ -348,21 +348,39 @@ This function is used in wxDocManager::CreateDocument.
 \membersection{wxDocManager::SelectDocumentType}
 
 \func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
 \membersection{wxDocManager::SelectDocumentType}
 
 \func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
- \param{int}{ noTemplates}}
+ \param{int}{ noTemplates}, \param{bool}{ sort=FALSE}}
 
 Returns a document template by asking the user (if there is more than one template).
 This function is used in wxDocManager::CreateDocument.
 
 
 Returns a document template by asking the user (if there is more than one template).
 This function is used in wxDocManager::CreateDocument.
 
+\wxheading{Parameters}
+
+\docparam{templates}{Pointer to an array of templates from which to choose a desired template.}
+\docparam{noTemplates}{Number of templates being pointed to by the {\it templates} pointer.}
+\docparam{sort}{If more than one template is passed in in {\it 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.}
+
 \membersection{wxDocManager::SelectViewType}
 
 \func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
 \membersection{wxDocManager::SelectViewType}
 
 \func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
- \param{int}{ noTemplates}}
+ \param{int}{ noTemplates}, \param{bool}{ sort=FALSE}}
 
 Returns a document template by asking the user (if there is more than one template),
 displaying a list of valid views. This function is used in wxDocManager::CreateView.
 
 Returns a document template by asking the user (if there is more than one template),
 displaying a list of valid views. This function is used in wxDocManager::CreateView.
-The dialog normally won't appear because the array of templates only contains
+The dialog normally will not appear because the array of templates only contains
 those relevant to the document in question, and often there will only be one such.
 
 those relevant to the document in question, and often there will only be one such.
 
+\wxheading{Parameters}
+
+\docparam{templates}{Pointer to an array of templates from which to choose a desired template.}
+\docparam{noTemplates}{Number of templates being pointed to by the {\it templates} pointer.}
+\docparam{sort}{If more than one template is passed in in {\it 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.}
+
 \membersection{wxDocManager::SetLastDirectory}\label{wxdocmanagersetlastdirectory}
 
 \func{void}{SetLastDirectory}{\param{const wxString\&}{ dir}}
 \membersection{wxDocManager::SetLastDirectory}\label{wxdocmanagersetlastdirectory}
 
 \func{void}{SetLastDirectory}{\param{const wxString\&}{ dir}}
index de1f8ed36a1dc44b401604c46eb0388e7e2c82ab..1672e1c02899318eefee91c9e8bc1e26eed4249b 100644 (file)
@@ -348,9 +348,9 @@ public:
     virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
             int noTemplates, wxString& path, long flags, bool save = FALSE);
     virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
     virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
             int noTemplates, wxString& path, long flags, bool save = FALSE);
     virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
-            int noTemplates);
+            int noTemplates, bool sort = FALSE);
     virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
     virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
-            int noTemplates);
+            int noTemplates, bool sort = FALSE);
     virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
 
     void AssociateTemplate(wxDocTemplate *temp);
     virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
 
     void AssociateTemplate(wxDocTemplate *temp);
index a49ef09a9bfa5a1cabe68d4425f24bb8ad2b656b..02fdca8fe46e8164b25e0fd330ad1bd7c6855ae3 100644 (file)
@@ -1435,9 +1435,9 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 }
 
 wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
 }
 
 wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
-                                                int noTemplates)
+                                                int noTemplates, bool sort)
 {
 {
-    wxArrayString strings;
+    wxArrayString strings(sort);
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;
@@ -1483,9 +1483,9 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
 }
 
 wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
 }
 
 wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
-                                            int noTemplates)
+                                            int noTemplates, bool sort)
 {
 {
-    wxArrayString strings;
+    wxArrayString strings(sort);
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;