From 90c0f63a835e4ac6bf73d8671edcf85ff063731f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 20 Oct 2006 09:16:41 +0000 Subject: [PATCH] define bookctrl (and -derived) classes flags in their headers instead of defs.h; don't deprecate the control-specific flags git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/choicebk.h | 7 ++++++ include/wx/defs.h | 54 ------------------------------------------- include/wx/listbook.h | 8 +++++++ include/wx/notebook.h | 17 +++++++++++--- 4 files changed, 29 insertions(+), 57 deletions(-) diff --git a/include/wx/choicebk.h b/include/wx/choicebk.h index 0414d0d2f0..d3e0ae14f7 100644 --- a/include/wx/choicebk.h +++ b/include/wx/choicebk.h @@ -24,6 +24,13 @@ class WXDLLEXPORT wxChoice; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; +// wxChoicebook flags +#define wxCHB_DEFAULT wxBK_DEFAULT +#define wxCHB_TOP wxBK_TOP +#define wxCHB_BOTTOM wxBK_BOTTOM +#define wxCHB_LEFT wxBK_LEFT +#define wxCHB_RIGHT wxBK_RIGHT +#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK // ---------------------------------------------------------------------------- // wxChoicebook diff --git a/include/wx/defs.h b/include/wx/defs.h index efcb76c04d..bdc630b91d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1545,60 +1545,6 @@ enum wxBorder #define wxSP_ARROW_KEYS 0x1000 #define wxSP_WRAP 0x2000 -/* - * wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook) - */ - -#define wxBK_DEFAULT 0x0000 -#define wxBK_TOP 0x0010 -#define wxBK_BOTTOM 0x0020 -#define wxBK_LEFT 0x0040 -#define wxBK_RIGHT 0x0080 -#define wxBK_ALIGN_MASK ( wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT ) - -/* - * wxNotebook flags - */ -#if WXWIN_COMPATIBILITY_2_6 -/* Use common book wxBK_* flags for describing alignment */ -#define wxNB_DEFAULT wxBK_DEFAULT -#define wxNB_TOP wxBK_TOP -#define wxNB_BOTTOM wxBK_BOTTOM -#define wxNB_LEFT wxBK_LEFT -#define wxNB_RIGHT wxBK_RIGHT -#endif - -#define wxNB_FIXEDWIDTH 0x0100 -#define wxNB_MULTILINE 0x0200 -#define wxNB_NOPAGETHEME 0x0400 -#define wxNB_FLAT 0x0800 - -/* - * wxListbook flags - */ -#if WXWIN_COMPATIBILITY_2_6 -/* Use common book wxBK_* flags for describing alignment */ -#define wxLB_DEFAULT wxBK_DEFAULT -#define wxLB_TOP wxBK_TOP -#define wxLB_BOTTOM wxBK_BOTTOM -#define wxLB_LEFT wxBK_LEFT -#define wxLB_RIGHT wxBK_RIGHT -#define wxLB_ALIGN_MASK wxBK_ALIGN_MASK -#endif - -/* - * wxChoicebook flags - */ -#if WXWIN_COMPATIBILITY_2_6 -/* Use common book wxBK_* flags for describing alignment */ -#define wxCHB_DEFAULT wxBK_DEFAULT -#define wxCHB_TOP wxBK_TOP -#define wxCHB_BOTTOM wxBK_BOTTOM -#define wxCHB_LEFT wxBK_LEFT -#define wxCHB_RIGHT wxBK_RIGHT -#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK -#endif - /* * wxTabCtrl flags */ diff --git a/include/wx/listbook.h b/include/wx/listbook.h index 056fc64bbc..fedd45ab55 100644 --- a/include/wx/listbook.h +++ b/include/wx/listbook.h @@ -24,6 +24,14 @@ class WXDLLEXPORT wxListEvent; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; +// wxListbook flags +#define wxLB_DEFAULT wxBK_DEFAULT +#define wxLB_TOP wxBK_TOP +#define wxLB_BOTTOM wxBK_BOTTOM +#define wxLB_LEFT wxBK_LEFT +#define wxLB_RIGHT wxBK_RIGHT +#define wxLB_ALIGN_MASK wxBK_ALIGN_MASK + // ---------------------------------------------------------------------------- // wxListbook // ---------------------------------------------------------------------------- diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 7fdb284892..4e929b60e9 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -26,8 +26,6 @@ // constants // ---------------------------------------------------------------------------- -#if WXWIN_COMPATIBILITY_2_6 - // wxNotebook hit results, use wxBK_HITTEST so other book controls can share them // if wxUSE_NOTEBOOK is disabled enum @@ -39,7 +37,20 @@ enum wxNB_HITTEST_ONPAGE = wxBK_HITTEST_ONPAGE }; -#endif // WXWIN_COMPATIBILITY_2_6 +// wxNotebook flags + +// use common book wxBK_* flags for describing alignment +#define wxNB_DEFAULT wxBK_DEFAULT +#define wxNB_TOP wxBK_TOP +#define wxNB_BOTTOM wxBK_BOTTOM +#define wxNB_LEFT wxBK_LEFT +#define wxNB_RIGHT wxBK_RIGHT + +#define wxNB_FIXEDWIDTH 0x0100 +#define wxNB_MULTILINE 0x0200 +#define wxNB_NOPAGETHEME 0x0400 +#define wxNB_FLAT 0x0800 + typedef wxWindow wxNotebookPage; // so far, any window can be a page -- 2.45.2