| 1 |
#include "aui_notebook_wrapper.h" |
| 2 |
#include "allocator_mgr.h" |
| 3 |
#include "wxgui_defs.h" |
| 4 |
#include <wx/aui/auibook.h> |
| 5 |
|
| 6 |
AuiNotebookWrapper::AuiNotebookWrapper() |
| 7 |
: NotebookBaseWrapper(ID_WXAUINOTEBOOK) |
| 8 |
{ |
| 9 |
PREPEND_STYLE_FALSE(wxAUI_NB_TAB_EXTERNAL_MOVE); |
| 10 |
PREPEND_STYLE_FALSE(wxAUI_NB_TAB_SPLIT); |
| 11 |
PREPEND_STYLE_FALSE(wxAUI_NB_TAB_FIXED_WIDTH); |
| 12 |
PREPEND_STYLE_FALSE(wxAUI_NB_SCROLL_BUTTONS); |
| 13 |
PREPEND_STYLE_FALSE(wxAUI_NB_WINDOWLIST_BUTTON); |
| 14 |
PREPEND_STYLE_FALSE(wxAUI_NB_CLOSE_ON_ACTIVE_TAB); |
| 15 |
PREPEND_STYLE_FALSE(wxAUI_NB_CLOSE_ON_ALL_TABS); |
| 16 |
PREPEND_STYLE_FALSE(wxAUI_NB_CLOSE_BUTTON); |
| 17 |
PREPEND_STYLE_FALSE(wxAUI_NB_TAB_MOVE); |
| 18 |
PREPEND_STYLE_FALSE(wxAUI_NB_TOP); |
| 19 |
PREPEND_STYLE_FALSE(wxAUI_NB_BOTTOM); |
| 20 |
PREPEND_STYLE_TRUE(wxAUI_NB_DEFAULT_STYLE); |
| 21 |
|
| 22 |
SetPropertyString(_("Common Settings"), "wxAuiNotebook"); |
| 23 |
m_properties.Item(PROP_SIZE)->SetValue(wxT("250,250")); |
| 24 |
|
| 25 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE"), wxT("wxAuiNotebookEvent"), |
| 26 |
_("A page is about to be closed")); |
| 27 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED"), wxT("wxAuiNotebookEvent"), _("A page has been closed")); |
| 28 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED"), wxT("wxAuiNotebookEvent"), |
| 29 |
_("The page selection was changed")); |
| 30 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING"), wxT("wxAuiNotebookEvent"), |
| 31 |
_("The page selection is about to be changed.\nThis event can be vetoed")); |
| 32 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_BUTTON"), wxT("wxAuiNotebookEvent"), |
| 33 |
_("The window list button has been pressed")); |
| 34 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG"), wxT("wxAuiNotebookEvent"), |
| 35 |
_("Dragging is about to begin")); |
| 36 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_END_DRAG"), wxT("wxAuiNotebookEvent"), _("Dragging has ended")); |
| 37 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION"), wxT("wxAuiNotebookEvent"), |
| 38 |
_("Emitted during a drag and drop operation")); |
| 39 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND"), wxT("wxAuiNotebookEvent"), |
| 40 |
_("Whether to allow a tab to be dropped. This event must be specially allowed")); |
| 41 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE"), wxT("wxAuiNotebookEvent"), |
| 42 |
_("Notify that the tab has been dragged")); |
| 43 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK"), wxT("wxAuiNotebookEvent"), |
| 44 |
_("Double clicked on the tabs background area")); |
| 45 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN"), wxT("wxAuiNotebookEvent"), |
| 46 |
_("The middle mouse button is pressed on a tab")); |
| 47 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP"), wxT("wxAuiNotebookEvent"), |
| 48 |
_("The middle mouse button is released on a tab")); |
| 49 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN"), wxT("wxAuiNotebookEvent"), |
| 50 |
_("The right mouse button is pressed on a tab")); |
| 51 |
RegisterEvent(wxT("wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP"), wxT("wxAuiNotebookEvent"), |
| 52 |
_("The right mouse button is released on a tab")); |
| 53 |
m_namePattern = wxT("m_auiBook"); |
| 54 |
SetName(GenerateName()); |
| 55 |
} |
| 56 |
|
| 57 |
AuiNotebookWrapper::~AuiNotebookWrapper() {} |
| 58 |
|
| 59 |
wxString AuiNotebookWrapper::GetXRCPageClass() const { return wxT("notebookpage"); } |
| 60 |
|
| 61 |
wxcWidget* AuiNotebookWrapper::Clone() const { return new AuiNotebookWrapper(); } |
| 62 |
|
| 63 |
void AuiNotebookWrapper::GetIncludeFile(wxArrayString& headers) const |
| 64 |
{ |
| 65 |
headers.Add(wxT("#include <wx/aui/auibook.h>")); |
| 66 |
} |
| 67 |
|
| 68 |
wxString AuiNotebookWrapper::GetWxClassName() const { return wxT("wxAuiNotebook"); } |