]> git.saurik.com Git - wxWidgets.git/commitdiff
added HasMultiplePages()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Jul 2006 23:46:32 +0000 (23:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Jul 2006 23:46:32 +0000 (23:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/window.tex
include/wx/bookctrl.h
include/wx/window.h

index 019e5b90b1f2d60712cc221acf67daf555d4bdda..f30b18f3660568ee65ba7b251887f5cc7fe4ad24 100644 (file)
@@ -1400,6 +1400,18 @@ Returns {\tt true} if this window has the current mouse capture.
 Returns \texttt{true} if the window has the given \arg{flag} bit set.
 
 
+\membersection{wxWindow::HasMultiplePages}\label{wxwindowhasmultiplepages}
+
+\constfunc{virtual bool}{HasMultiplePages}{\void}
+
+This method should be overridden to return \texttt{true} if this window has
+multiple pages. All standard class with multiple pages such as 
+\helpref{wxNotebook}{wxnotebook}, \helpref{wxListbook}{wxlistbook} and 
+\helpref{wxTreebook}{wxtreebook} already override it to return \texttt{true}
+and user-defined classes with similar behaviour should do it as well to allow
+the library to handle such windows appropriately.
+
+
 \membersection{wxWindow::HasScrollbar}\label{wxwindowhasscrollbar}
 
 \constfunc{virtual bool}{HasScrollbar}{\param{int }{orient}}
index 50b6dcdf13fda9bc67442df7b8de0777e1273687..6d3c80b67017f7dd82685e58efad8b73184fadd3 100644 (file)
@@ -213,6 +213,10 @@ public:
         return wxNOT_FOUND;
     }
 
+
+    // we do have multiple pages
+    virtual bool HasMultiplePages() const { return true; }
+
 protected:
     // Should we accept NULL page pointers in Add/InsertPage()?
     //
index 9f852eec40fec708ad517c03b366d231b647c880..8f76c9e7e7fc2cad7e11a3bbcbf4802bc7f9337f 100644 (file)
@@ -865,6 +865,10 @@ public:
         { return DoPopupMenu(menu, x, y); }
 #endif // wxUSE_MENUS
 
+    // override this method to return true for controls having multiple pages
+    virtual bool HasMultiplePages() const { return false; }
+
+
     // scrollbars
     // ----------