wxAUI_NB_CLOSE_BUTTON = 1 << 10,
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
-
+ wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
wxAUI_NB_TAB_SPLIT |
wxAUI_NB_TAB_MOVE |
wxAUI_NB_SCROLL_BUTTONS |
- wxAUI_NB_CLOSE_ON_ACTIVE_TAB
+ wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
+ wxAUI_NB_MIDDLE_CLICK_CLOSE
};
~wxAuiTabCtrl();
+#if wxABI_VERSION >= 20805
+ bool IsDragging() const { return m_is_dragging; }
+#endif
+
protected:
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
void OnLeftDown(wxMouseEvent& evt);
void OnLeftUp(wxMouseEvent& evt);
+ void OnMiddleDown(wxMouseEvent& evt);
+ void OnMiddleUp(wxMouseEvent& evt);
+ void OnRightDown(wxMouseEvent& evt);
+ void OnRightUp(wxMouseEvent& evt);
void OnMotion(wxMouseEvent& evt);
void OnLeaveWindow(wxMouseEvent& evt);
void OnButton(wxAuiNotebookEvent& evt);
const wxAuiManager& GetAuiManager() const { return m_mgr; }
+ // Sets the normal font
+ void SetNormalFont(const wxFont& font);
+
+ // Sets the selected tab font
+ void SetSelectedFont(const wxFont& font);
+
+ // Sets the measuring font
+ void SetMeasuringFont(const wxFont& font);
+
+ // Sets the tab font
+ virtual bool SetFont(const wxFont& font);
+
+ // Gets the tab control height
+ int GetTabCtrlHeight() const;
+
+ // Gets the height of the notebook for a given page height
+ int GetHeightForPageHeight(int pageHeight);
+
protected:
// these can be overridden
void OnTabDragMotion(wxCommandEvent& evt);
void OnTabEndDrag(wxCommandEvent& evt);
void OnTabButton(wxCommandEvent& evt);
+ void OnTabMiddleDown(wxCommandEvent& evt);
+ void OnTabMiddleUp(wxCommandEvent& evt);
+ void OnTabRightDown(wxCommandEvent& evt);
+ void OnTabRightUp(wxCommandEvent& evt);
+
+ // set selection to the given window (which must be non-NULL and be one of
+ // our pages, otherwise an assert is raised)
+ void SetSelectionToWindow(wxWindow *win);
+ void SetSelectionToPage(const wxAuiNotebookPage& page)
+ {
+ SetSelectionToWindow(page.window);
+ }
protected:
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 0)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
#else