| 1 |
#include "tool_book_wrapper.h" |
| 2 |
#include "allocator_mgr.h" |
| 3 |
#include "wxgui_defs.h" |
| 4 |
#include <wx/notebook.h> |
| 5 |
#include <wx/toolbook.h> |
| 6 |
|
| 7 |
ToolBookWrapper::ToolBookWrapper() |
| 8 |
: NotebookBaseWrapper(ID_WXTOOLBOOK) |
| 9 |
{ |
| 10 |
SetPropertyString(_("Common Settings"), "wxToolbook"); |
| 11 |
#if wxVERSION_NUMBER > 2900 |
| 12 |
PREPEND_STYLE_TRUE(wxTBK_BUTTONBAR); |
| 13 |
PREPEND_STYLE_FALSE(wxTBK_HORZ_LAYOUT); |
| 14 |
#endif |
| 15 |
|
| 16 |
RegisterEvent(wxT("wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED"), wxT("wxToolbookEvent"), |
| 17 |
_("The page selection was changed")); |
| 18 |
RegisterEvent(wxT("wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING"), wxT("wxToolbookEvent"), |
| 19 |
_("The page selection is about to be changed. This event can be vetoed")); |
| 20 |
m_namePattern = wxT("m_toolbook"); |
| 21 |
SetName(GenerateName()); |
| 22 |
} |
| 23 |
|
| 24 |
ToolBookWrapper::~ToolBookWrapper() {} |
| 25 |
|
| 26 |
wxcWidget* ToolBookWrapper::Clone() const { return new ToolBookWrapper(); } |
| 27 |
|
| 28 |
void ToolBookWrapper::GetIncludeFile(wxArrayString& headers) const { headers.Add(wxT("#include <wx/toolbook.h>")); } |
| 29 |
|
| 30 |
wxString ToolBookWrapper::GetWxClassName() const { return wxT("wxToolbook"); } |
| 31 |
|
| 32 |
wxString ToolBookWrapper::GetXRCPageClass() const { return wxT("toolbookpage"); } |