replace wxDocument::GetPrintableName(wxString&) and wxDocManager::MakeDefaultName(wxString&) with GetUserReadableName() and MakeNewDocumentName() which return wxStrings directly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-06-16 12:49:56 +00:00
parent 6ae3ead6f0
commit 724b119a15
5 changed files with 97 additions and 49 deletions

View File

@@ -79,6 +79,9 @@ Deprecated methods and their replacements
or wxStringBufferLength instead.
- wxDIRCTRL_SHOW_FILTERS style is deprecated, filters are alwsys shown if
specified so this style should simply be removed
- wxDocManager::MakeDefaultName() replaced by MakeNewDocumentName() and
wxDocument::GetPrintableName() with GetUserReadableName() which are simpler
to use
Major new features in this release

View File

@@ -320,16 +320,14 @@ The bottom line: if you're not deriving from Initialize, forget it and
construct wxDocManager with no arguments.
\membersection{wxDocManager::MakeDefaultName}\label{wxdocmanagermakedefaultname}
\membersection{wxDocManager::MakeNewDocumentName}\label{wxdocmanagermakenewdocumentname}
\func{bool}{MakeDefaultName}{\param{const wxString\& }{buf}}
\func{wxString}{MakeNewDocumentName}{\void}
Copies a suitable default name into {\it buf}. This is implemented by
appending an integer counter to the string {\bf unnamed} and incrementing
the counter.
\perlnote{In wxPerl this function must return the modified name rather
than just modifying the argument.}
Return a string containing a suitable default name for a new document. By
default this is implemented by appending an integer counter to the string
{\bf unnamed} but can be overridden in the derived classes to do something more
appropriate.
\membersection{wxDocManager::OnCreateFileHistory}\label{wxdocmanageroncreatefilehistory}

View File

@@ -153,16 +153,13 @@ in many cases a document will only have a single view.
See also: \helpref{GetViews}{wxdocumentgetviews}
\membersection{wxDocument::GetPrintableName}\label{wxdocumentgetprintablename}
\membersection{wxDocument::GetUserReadableName}\label{wxdocumentgetuserreadablentablename}
\constfunc{virtual void}{GetPrintableName}{\param{wxString\& }{name}}
\constfunc{virtual wxString}{GetUserReadableName}{\void}
Copies a suitable document name into the supplied {\it name} buffer. The default
function uses the title, or if there is no title, uses the filename; or if no
filename, the string {\bf unnamed}.
\perlnote{In wxPerl this function must return the modified name rather
than just modifying the argument.}
Return the document name suitable to be shown to the user. The default
implementation uses the document title, if any, of the name part of the
document filename if it was set or, otherwise, the string {\bf unnamed}.
\membersection{wxDocument::GetTitle}\label{wxdocumentgettitle}