X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/954b8ae60391d18b87a604e7919c87c0c6ae208b..a977709b11432e05af48e205cc02c0a0ad4ecf16:/docs/latex/wx/document.tex diff --git a/docs/latex/wx/document.tex b/docs/latex/wx/document.tex index fc50326630..03b3b82240 100644 --- a/docs/latex/wx/document.tex +++ b/docs/latex/wx/document.tex @@ -141,16 +141,18 @@ dialog boxes. By default, uses the frame associated with the first view. \constfunc{wxString}{GetFilename}{\void} -Gets the filename associated with this document, or NULL if none is +Gets the filename associated with this document, or "" if none is associated. -\membersection{wxDocument::GetFirstView} +\membersection{wxDocument::GetFirstView}\label{wxdocumentgetfirstview} -\constfunc{wxView*}{GetFirstView}{\void} +\constfunc{wxView *}{GetFirstView}{\void} A convenience function to get the first view for a document, because in many cases a document will only have a single view. +See also: \helpref{GetViews}{wxdocumentgetviews} + \membersection{wxDocument::GetPrintableName} \constfunc{virtual void}{GetPrintableName}{\param{wxString\& }{name}} @@ -167,6 +169,14 @@ Gets the title for this document. The document title is used for an associated frame (if any), and is usually constructed by the framework from the filename. +\membersection{wxDocument::GetViews}\label{wxdocumentgetviews} + +\constfunc{wxList \&}{GetViews}{\void} + +Returns the list whose elements are the views on the document. + +See also: \helpref{GetFirstView}{wxdocumentgetfirstview} + \membersection{wxDocument::IsModified}\label{wxdocumentismodified} \constfunc{virtual bool}{IsModified}{\void} @@ -181,10 +191,15 @@ See also \helpref{Modify}{wxdocumentmodify}. \func{virtual istream\&}{LoadObject}{\param{istream\& }{stream}} +\func{virtual wxInputStream\&}{LoadObject}{\param{wxInputStream\& }{stream}} + Override this function and call it from your own LoadObject before streaming your own data. LoadObject is called by the framework automatically when the document contents need to be loaded. +Note that only one of these forms exists, depending on how wxWindows +was configured. + \membersection{wxDocument::Modify}\label{wxdocumentmodify} \func{virtual void}{Modify}{\param{bool}{ modify}} @@ -241,7 +256,7 @@ document, and notifies the views that the filename (in fact, the title) has chan \func{virtual bool}{OnOpenDocument}{\param{const wxString\& }{filename}} -Constructs an input file stream for the given filename (which must not be NULL), +Constructs an input file stream for the given filename (which must not be empty), and calls LoadObject. If LoadObject returns TRUE, the document is set to unmodified; otherwise, an error message box is displayed. The document's views are notified that the filename has changed, to give windows an opportunity @@ -251,7 +266,7 @@ to update their titles. All of the document's views are then updated. \func{virtual bool}{OnSaveDocument}{\param{const wxString\& }{filename}} -Constructs an output file stream for the given filename (which must not be NULL), +Constructs an output file stream for the given filename (which must not be empty), and calls SaveObject. If SaveObject returns TRUE, the document is set to unmodified; otherwise, an error message box is displayed. @@ -287,10 +302,15 @@ Prompts the user for a file to save to, and then calls OnSaveDocument. \func{virtual ostream\&}{SaveObject}{\param{ostream\& }{stream}} +\func{virtual wxOutputStream\&}{SaveObject}{\param{wxOutputStream\& }{stream}} + Override this function and call it from your own SaveObject before streaming your own data. SaveObject is called by the framework automatically when the document contents need to be saved. +Note that only one of these forms exists, depending on how wxWindows +was configured. + \membersection{wxDocument::SetCommandProcessor} \func{virtual void}{SetCommandProcessor}{\param{wxCommandProcessor *}{processor}} @@ -316,10 +336,12 @@ framework. \membersection{wxDocument::SetFilename} -\func{void}{SetFilename}{\param{const wxString\& }{filename}} +\func{void}{SetFilename}{\param{const wxString\& }{filename}, \param{bool}{ notifyViews = FALSE}} Sets the filename for this document. Usually called by the framework. +If {\it notifyViews} is TRUE, wxView::OnChangeFilename is called for all views. + \membersection{wxDocument::SetTitle} \func{void}{SetTitle}{\param{const wxString\& }{title}} @@ -330,7 +352,9 @@ the filename. \membersection{wxDocument::UpdateAllViews}\label{wxdocumentupdateallviews} -\func{void}{UpdateAllViews}{\param{wxView* }{sender = NULL}} +\func{void}{UpdateAllViews}{\param{wxView* }{sender = NULL}, \param{wxObject*}{ hint = NULL}} Updates all views. If {\it sender} is non-NULL, does not update this view. +{\it hint} represents optional information to allow a view to optimize its update. +