]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/aui/auibook.h
changed wxFDIODispatcher::UnregisterFD() to take only fd, without flags, and unregist...
[wxWidgets.git] / include / wx / aui / auibook.h
index 28358f7d0c508de457a594dc46928107926dad83..b06ca41e9bc6fcb564c67c530a9a825252ba8e75 100644 (file)
@@ -45,13 +45,14 @@ enum wxAuiNotebookOption
     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
 };
 
 
@@ -445,6 +446,10 @@ public:
 
     ~wxAuiTabCtrl();
 
+#if wxABI_VERSION >= 20805
+    bool IsDragging() const { return m_is_dragging; }
+#endif
+
 protected:
 
     void OnPaint(wxPaintEvent& evt);
@@ -452,6 +457,10 @@ protected:
     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);
@@ -533,6 +542,24 @@ public:
 
     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
@@ -561,6 +588,10 @@ protected:
     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)
@@ -609,6 +640,10 @@ BEGIN_DECLARE_EVENT_TYPES()
     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&);
@@ -632,6 +667,14 @@ 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