X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..cd72551c2b6cbf67a4a5caf0ba00ba64e41183b2:/docs/latex/wx/docmanag.tex

diff --git a/docs/latex/wx/docmanag.tex b/docs/latex/wx/docmanag.tex
index 1cfbfbe0b7..7194f9e0a8 100644
--- a/docs/latex/wx/docmanag.tex
+++ b/docs/latex/wx/docmanag.tex
@@ -9,10 +9,14 @@ and \helpref{wxDocTemplate}{wxdoctemplate} classes.
 \helpref{wxEvtHandler}{wxevthandler}\\
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/docview.h>
+
 \wxheading{See also}
 
 \helpref{wxDocManager overview}{wxdocmanageroverview}, \helpref{wxDocument}{wxdocument},\rtfsp
-\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}
+\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxFileHistory}{wxfilehistory}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -54,6 +58,12 @@ A list of all documents.
 
 Stores the flags passed to the constructor.
 
+\membersection{wxDocManager::m\_lastDirectory}
+
+The directory last selected by the user when opening a file.
+
+\member{wxFileHistory*}{m\_fileHistory}
+
 \membersection{wxDocManager::m\_templates}
 
 \member{wxList}{mnTemplates}
@@ -104,6 +114,12 @@ Adds a file to the file history list, if we have a pointer to an appropriate fil
 
 Adds the template to the document manager's template list.
 
+\membersection{wxDocManager::CloseDocuments}
+
+\func{bool}{CloseDocuments}{\param{bool }{force = TRUE}}
+
+Closes all currentled opened documents.
+
 \membersection{wxDocManager::CreateDocument}
 
 \func{wxDocument*}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags}}
@@ -139,28 +155,54 @@ of view is presented to the user.
 
 Removes the template from the list of templates.
 
-\membersection{wxDocManager::FileHistoryLoad}
+\membersection{wxDocManager::FileHistoryAddFilesToMenu}\label{wxdocmanagerfilehistoryaddfilestomenu}
 
-\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+\func{void}{FileHistoryAddFilesToMenu}{\void}
 
-Loads the file history from a resource file, using the given section. This must be called
-explicitly by the application.
+Appends the files in the history list, to all menus managed by the file history object.
+
+\func{void}{FileHistoryAddFilesToMenu}{\param{wxMenu*}{ menu}}
+
+Appends the files in the history list, to the given menu only.
+
+\membersection{wxDocManager::FileHistoryLoad}\label{wxdocmanagerfilehistoryload}
+
+\func{void}{FileHistoryLoad}{\param{wxConfigBase\& }{config}}
+
+Loads the file history from a config object.
+
+\wxheading{See also}
+
+\helpref{wxConfig}{wxconfigbase}
+
+\membersection{wxDocManager::FileHistoryRemoveMenu}\label{wxdocmanagerfilehistoryremovemenu}
 
-\membersection{wxDocManager::FileHistorySave}
+\func{void}{FileHistoryRemoveMenu}{\param{wxMenu*}{ menu}}
 
-\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+Removes the given menu from the list of menus managed by the file history object.
 
-Saves the file history into a resource file, using the given section. This must be called
+\membersection{wxDocManager::FileHistorySave}\label{wxdocmanagerfilehistorysave}
+
+\func{void}{FileHistorySave}{\param{wxConfigBase\& }{resourceFile}}
+
+Saves the file history into a config object. This must be called
 explicitly by the application.
 
-\membersection{wxDocManager::FileHistoryUseMenu}
+\wxheading{See also}
+
+\helpref{wxConfig}{wxconfigbase}
+
+\membersection{wxDocManager::FileHistoryUseMenu}\label{wxdocmanagerfilehistoryusemenu}
 
-\func{void}{FileHistoryUseMenu}{\param{wxMenu *}{menu}}
+\func{void}{FileHistoryUseMenu}{\param{wxMenu*}{ menu}}
 
 Use this menu for appending recently-visited document filenames, for convenient
 access. Calling this function with a valid menu pointer enables the history
 list functionality.
 
+Note that you can add multiple menus using this function, to be managed by the
+file history object.
+
 \membersection{wxDocManager::FindTemplateForPath}
 
 \func{wxDocTemplate *}{FindTemplateForPath}{\param{const wxString\& }{path}}
@@ -192,6 +234,12 @@ Returns a reference to the list of documents.
 
 Returns a pointer to file history.
 
+\membersection{wxDocManager::GetLastDirectory}\label{wxdocmanagergetlastdirectory}
+
+\constfunc{wxString}{GetLastDirectory}{\void}
+
+Returns the directory last selected by the user when opening a file. Initially empty.
+
 \membersection{wxDocManager::GetMaxDocsOpen}
 
 \func{int}{GetMaxDocsOpen}{\void}
@@ -242,6 +290,12 @@ from \helpref{Initialize}{wxdocmanagerinitialize}.
 
 Closes and deletes the currently active document.
 
+\membersection{wxDocManager::OnFileCloseAll}
+
+\func{void}{OnFileCloseAll}{\void}
+
+Closes and deletes all the currently opened documents.
+
 \membersection{wxDocManager::OnFileNew}
 
 \func{void}{OnFileNew}{\void}
@@ -276,6 +330,7 @@ with the following predefined menu item identifiers:
 \begin{itemize}\itemsep=0pt
 \item wxID\_OPEN Creates a new document and opens a file into it.
 \item wxID\_CLOSE Closes the current document.
+\item wxID\_CLOSE\_ALL Closes all documents.
 \item wxID\_NEW Creates a new document.
 \item wxID\_SAVE Saves the document.
 \item wxID\_SAVE\_AS Saves the document into a specified filename.
@@ -306,21 +361,45 @@ This function is used in wxDocManager::CreateDocument.
 \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.
 
+\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},
- \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.
-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.
 
+\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}}
+
+Sets the directory to be displayed to the user when opening a file. Initially this is empty.
+
 \membersection{wxDocManager::SetMaxDocsOpen}
 
 \func{void}{SetMaxDocsOpen}{\param{int}{ n}}
