]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/listbook.h
Removed my copy of distutils from the wxPython source tree.
[wxWidgets.git] / include / wx / listbook.h
index 1c4c5ae51342b18b16ca731bbe333f91efe186f7..a9120755025686ad752f2bbca89cb992b42601c3 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     19.08.03
 // RCS-ID:      $Id$
-// Copyright:   (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
+// Copyright:   (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 
 #if wxUSE_LISTBOOK
 
+// this can be defined to put a static line as separator between the list
+// control and the page area; but I think it finally looks better without it so
+// it is not enabled by default
+//#define wxUSE_LINE_IN_LISTBOOK 1
+
+#if !wxUSE_STATLINE
+    #undef wxUSE_LINE_IN_LISTBOOK
+    #define wxUSE_LINE_IN_LISTBOOK 0
+#endif
+
 #include "wx/bookctrl.h"
 
 class WXDLLEXPORT wxListView;
 class WXDLLEXPORT wxListEvent;
-class WXDLLEXPORT wxStaticLine;;
+
+#if wxUSE_LINE_IN_LISTBOOK
+class WXDLLEXPORT wxStaticLine;
+#endif // wxUSE_LINE_IN_LISTBOOK
 
 // ----------------------------------------------------------------------------
 // constants
@@ -96,6 +109,8 @@ public:
     // returns true if we have wxLB_TOP or wxLB_BOTTOM style
     bool IsVertical() const { return HasFlag(wxLB_BOTTOM | wxLB_TOP); }
 
+    virtual bool DeleteAllPages();
+
 protected:
     virtual wxWindow *DoRemovePage(size_t page);
 
@@ -117,8 +132,10 @@ private:
     // the list control we use for showing the pages index
     wxListView *m_list;
 
+#if wxUSE_LINE_IN_LISTBOOK
     // the line separating it from the page area
     wxStaticLine *m_line;
+#endif // wxUSE_LINE_IN_LISTBOOK
 
     // the currently selected page or wxNOT_FOUND if none
     int m_selection;
@@ -155,7 +172,7 @@ typedef void (wxEvtHandler::*wxListbookEventFunction)(wxListbookEvent&);
     wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,                                    \
     id,                                                                     \
     -1,                                                                     \
-    (wxObjectEventFunction)(wxEventFunction)(wxListbookEventFunction) &fn,  \
+    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
     NULL                                                                    \
   ),
 
@@ -164,7 +181,7 @@ typedef void (wxEvtHandler::*wxListbookEventFunction)(wxListbookEvent&);
     wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,                                   \
     id,                                                                     \
     -1,                                                                     \
-    (wxObjectEventFunction)(wxEventFunction)(wxListbookEventFunction) &fn,  \
+    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
     NULL                                                                    \
   ),