]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxTBK_HORZ_LAYOUT (heavily modified patch 1855678)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 14 Jan 2008 22:17:46 +0000 (22:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 14 Jan 2008 22:17:46 +0000 (22:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/toolbook.tex
include/wx/toolbook.h
src/generic/toolbkg.cpp

index 2abc1684686934f75beb3385b673db24bc7d34ae..dd6d93b0bda2432d66a957172c9a54f1a5976058 100644 (file)
@@ -41,9 +41,11 @@ wxBookCtrlBase (see \helpref{wxBookCtrl overview}{wxbookctrloverview})\\
 
 \twocolwidtha{5cm}
 \begin{twocollist}\itemsep=0pt
-
 \twocolitem{\windowstyle{wxBK\_DEFAULT}}{Choose the default location for the
 labels depending on the current platform (currently always the top).}
+\twocolitem{\windowstyle{wxTBK\_HORZ\_LAYOUT}}{Shows the text and the icons
+alongside, not vertically stacked (only implement under Windows and GTK 2
+platforms as it relies on \texttt{wxTB\_HORZ\_LAYOUT} flag support).}
 \end{twocollist}
 
 \wxheading{See also}
index 404933ee501a62eabe3aab103dcc7364cfcfc952..e54c2e6056d02a2b2fdaf693d8dfde39035a8cb4 100644 (file)
@@ -28,6 +28,9 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING;
 // Use wxButtonToolBar
 #define wxBK_BUTTONBAR            0x0100
 
+// Use wxTB_HORZ_LAYOUT style for the controlling toolbar
+#define wxTBK_HORZ_LAYOUT          0x8000
+
 // ----------------------------------------------------------------------------
 // wxToolbook
 // ----------------------------------------------------------------------------
index 3ba71c29ab4f225d0169360645b5420dcc887e5f..960387ef0a8989805fe65e2dea9462580d5b53e7 100644 (file)
@@ -87,9 +87,14 @@ bool wxToolbook::Create(wxWindow *parent,
                             wxDefaultValidator, name) )
         return false;
 
-    int orient = wxTB_HORIZONTAL;
-    if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0)
-        orient = wxTB_VERTICAL;
+    int tbFlags = wxTB_TEXT | wxTB_FLAT | wxBORDER_NONE;
+    if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0 )
+        tbFlags |= wxTB_VERTICAL;
+    else
+        tbFlags |= wxTB_HORIZONTAL;
+
+    if ( style & wxTBK_HORZ_LAYOUT )
+        tbFlags |= wxTB_HORZ_LAYOUT;
 
     // TODO: make more configurable
 
@@ -102,7 +107,7 @@ bool wxToolbook::Create(wxWindow *parent,
                     wxID_ANY,
                     wxDefaultPosition,
                     wxDefaultSize,
-                    orient|wxTB_TEXT|wxTB_FLAT|wxNO_BORDER
+                    tbFlags
                  );
     }
     else
@@ -114,7 +119,7 @@ bool wxToolbook::Create(wxWindow *parent,
                     wxID_ANY,
                     wxDefaultPosition,
                     wxDefaultSize,
-                    orient|wxTB_TEXT|wxTB_FLAT|wxTB_NODIVIDER|wxNO_BORDER
+                    tbFlags | wxTB_NODIVIDER
                  );
     }