From 45416752623a6ac0df3a8f5f55c1933ff52e1dbb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Mar 2013 19:53:22 +0000 Subject: [PATCH] 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 --- interface/wx/docview.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.47.2