added wxTBK_HORZ_LAYOUT (heavily modified patch 1855678)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-01-14 22:17:46 +00:00
parent e45080c10b
commit 050d159c4a
3 changed files with 16 additions and 6 deletions

View 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}

View 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
// ----------------------------------------------------------------------------

View 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
);
}