From: Vadim Zeitlin Date: Fri, 29 Mar 2013 19:53:22 +0000 (+0000) Subject: Mention the relationship of wxDocument::Activate() with Raise(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/45416752623a6ac0df3a8f5f55c1933ff52e1dbb Mention the relationship of wxDocument::Activate() with Raise(). Also provide an example of a custom overridden Raise(). See #15120. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/docview.h b/interface/wx/docview.h index 7f5a5ee99e..224c2ad298 100644 --- a/interface/wx/docview.h +++ b/interface/wx/docview.h @@ -1256,6 +1256,20 @@ public: /** Activate the first view of the document if any. + This function simply calls the Raise() method of the frame of the first + view. You may need to override the Raise() method to get the desired + effect if you are not using a standard wxFrame for your view. For + instance, if your document is inside its own notebook tab you could + implement Raise() like this: + + @code + void MyNotebookPage::Raise() + { + wxNotebook* notebook = wxStaticCast(GetParent(), wxNotebook); + notebook->SetSelection(notebook->FindPage(this)); + } + @endcode + @see GetFirstView() @since 2.9.5