backport wxDocManager::MakeNewDocumentName() from the trunk for forward-compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -324,14 +324,31 @@ construct wxDocManager with no arguments.
|
||||
|
||||
\func{bool}{MakeDefaultName}{\param{const wxString\& }{buf}}
|
||||
|
||||
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.
|
||||
This method is preserved for backwards compatibility in wxWidgets 2.8 but is
|
||||
renamed to \helpref{MakeNewDocumentName}{wxdocmanagermakenewdocumentname} in
|
||||
wxWidgets 3.0, please see its description for the details.
|
||||
|
||||
This function simply copies the value returned by MakeNewDocumentName() into
|
||||
the provided \arg{buf} and returns \true.
|
||||
|
||||
\perlnote{In wxPerl this function must return the modified name rather
|
||||
than just modifying the argument.}
|
||||
|
||||
|
||||
\membersection{wxDocManager::MakeNewDocumentName}\label{wxdocmanagermakenewdocumentname}
|
||||
|
||||
\func{wxString}{MakeNewDocumentName}{\void}
|
||||
|
||||
Returns the name to be used for a new document. The default implementation
|
||||
appends an integer counter to the string {\bf unnamed} and increments the
|
||||
counter. To customize this behaviour, you need to override the virtual
|
||||
\helpref{MakeNewDocumentName}{wxdocmanagermakedefaultname} method but if you
|
||||
only need to call this method, an not to override it, please use this method
|
||||
which is forward-compatible with wxWidgets 3.0.
|
||||
|
||||
\wxsince{2.8.8}
|
||||
|
||||
|
||||
\membersection{wxDocManager::OnCreateFileHistory}\label{wxdocmanageroncreatefilehistory}
|
||||
|
||||
\func{wxFileHistory *}{OnCreateFileHistory}{\void}
|
||||
|
@@ -408,8 +408,22 @@ public:
|
||||
wxList& GetTemplates() { return m_templates; }
|
||||
|
||||
// Make a default document name
|
||||
//
|
||||
// NB: this method is renamed to MakeNewDocumentName() in wx 3.0, you still
|
||||
// need to override it if your code needs to customize the default name
|
||||
// generation but if you just use it from your code, prefer the version
|
||||
// below which is forward-compatible with wx 3.0
|
||||
virtual bool MakeDefaultName(wxString& buf);
|
||||
|
||||
#if wxABI_VERSION >= 20808
|
||||
wxString MakeNewDocumentName() const
|
||||
{
|
||||
wxString s;
|
||||
MakeDefaultName(s);
|
||||
return s;
|
||||
}
|
||||
#endif // wx ABI >= 2.8.8
|
||||
|
||||
// Make a frame title (override this to do something different)
|
||||
virtual wxString MakeFrameTitle(wxDocument* doc);
|
||||
|
||||
|
@@ -30,7 +30,8 @@
|
||||
*wxApp*MacHideApp*;
|
||||
*TimeZone*Make*;
|
||||
*wxBitmapButton*OnFocusChange*;
|
||||
*wxGridBagSizer*AdjustForOverflow*;
|
||||
*wxDocManager*MakeNewDocumentName*;
|
||||
*wxGridBagSizer*AdjustForOverflow*;
|
||||
*wxRemotelyScrolledTreeCtrl*DoCalcScrolledPosition*;
|
||||
*wxRemotelyScrolledTreeCtrl*SetScrollbar*;
|
||||
*wxRenderer_Draw*;
|
||||
|
Reference in New Issue
Block a user