X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fbb7d80f84efc87dc996a49c6da97cda9048f86..c3e54dee9173954a7f18a88632fbc263695938f6:/include/wx/aui/auibook.h diff --git a/include/wx/aui/auibook.h b/include/wx/aui/auibook.h index 479fb20c67..15eae356c0 100644 --- a/include/wx/aui/auibook.h +++ b/include/wx/aui/auibook.h @@ -156,10 +156,8 @@ public: virtual void DrawTab(wxDC& dc, wxWindow* wnd, + const wxAuiNotebookPage& pane, const wxRect& in_rect, - const wxString& caption, - const wxBitmap& bitmap, - bool active, int close_button_state, wxRect* out_tab_rect, wxRect* out_button_rect, @@ -172,11 +170,8 @@ public: int bitmap_id, int button_state, int orientation, - const wxBitmap& bitmap_override, wxRect* out_rect) = 0; - - virtual int GetIndentSize() = 0; - + virtual wxSize GetTabSize( wxDC& dc, wxWindow* wnd, @@ -186,14 +181,17 @@ public: int close_button_state, int* x_extent) = 0; - virtual int ShowWindowList( + virtual int ShowDropDown( wxWindow* wnd, - const wxArrayString& items, + const wxAuiNotebookPageArray& items, int active_idx) = 0; + + virtual int GetIndentSize() = 0; - virtual int GetBestTabCtrlSize(wxWindow* wnd, - wxAuiNotebookPageArray& pages, - const wxSize& required_bmp_size) = 0; + virtual int GetBestTabCtrlSize( + wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& required_bmp_size) = 0; }; @@ -221,10 +219,8 @@ public: void DrawTab(wxDC& dc, wxWindow* wnd, + const wxAuiNotebookPage& pane, const wxRect& in_rect, - const wxString& caption, - const wxBitmap& bitmap, - bool active, int close_button_state, wxRect* out_tab_rect, wxRect* out_button_rect, @@ -237,7 +233,6 @@ public: int bitmap_id, int button_state, int orientation, - const wxBitmap& bitmap_override, wxRect* out_rect); int GetIndentSize(); @@ -251,13 +246,13 @@ public: int close_button_state, int* x_extent); - int ShowWindowList( + int ShowDropDown( wxWindow* wnd, - const wxArrayString& items, + const wxAuiNotebookPageArray& items, int active_idx); int GetBestTabCtrlSize(wxWindow* wnd, - wxAuiNotebookPageArray& pages, + const wxAuiNotebookPageArray& pages, const wxSize& required_bmp_size); protected: @@ -309,10 +304,8 @@ public: void DrawTab(wxDC& dc, wxWindow* wnd, + const wxAuiNotebookPage& pane, const wxRect& in_rect, - const wxString& caption, - const wxBitmap& bitmap, - bool active, int close_button_state, wxRect* out_tab_rect, wxRect* out_button_rect, @@ -325,7 +318,6 @@ public: int bitmap_id, int button_state, int orientation, - const wxBitmap& bitmap_override, wxRect* out_rect); int GetIndentSize(); @@ -339,13 +331,13 @@ public: int close_button_state, int* x_extent); - int ShowWindowList( + int ShowDropDown( wxWindow* wnd, - const wxArrayString& items, + const wxAuiNotebookPageArray& items, int active_idx); int GetBestTabCtrlSize(wxWindow* wnd, - wxAuiNotebookPageArray& pages, + const wxAuiNotebookPageArray& pages, const wxSize& required_bmp_size); protected: @@ -406,6 +398,7 @@ public: int GetIdxFromWindow(wxWindow* page) const; size_t GetPageCount() const; wxAuiNotebookPage& GetPage(size_t idx); + const wxAuiNotebookPage& GetPage(size_t idx) const; wxAuiNotebookPageArray& GetPages(); void SetNormalFont(const wxFont& normal_font); void SetSelectedFont(const wxFont& selected_font); @@ -501,7 +494,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); - + + void SetWindowStyleFlag(long style); + void SetArtProvider(wxAuiTabArt* art); + wxAuiTabArt* GetArtProvider() const; + + virtual void SetUniformBitmapSize(const wxSize& size); + virtual void SetTabCtrlHeight(int height); + bool AddPage(wxWindow* page, const wxString& caption, bool select = false, @@ -516,26 +516,25 @@ public: bool DeletePage(size_t page); bool RemovePage(size_t page); - void SetWindowStyleFlag(long style); + size_t GetPageCount() const; + wxWindow* GetPage(size_t page_idx) const; + int GetPageIndex(wxWindow* page_wnd) const; bool SetPageText(size_t page, const wxString& text); + wxString GetPageText(size_t page_idx) const; + bool SetPageBitmap(size_t page, const wxBitmap& bitmap); + wxBitmap GetPageBitmap(size_t page_idx) const; + size_t SetSelection(size_t new_page); int GetSelection() const; - size_t GetPageCount() const; - wxWindow* GetPage(size_t page_idx) const; - - int GetPageIndex(wxWindow* page_wnd) const; - - void SetArtProvider(wxAuiTabArt* art); - wxAuiTabArt* GetArtProvider() const; - - virtual void SetUniformBitmapSize(const wxSize& size); - virtual void SetTabCtrlHeight(int height); + virtual void Split(size_t page, int direction); + protected: // these can be overridden + virtual void UpdateTabCtrlHeight(); virtual int CalculateTabCtrlHeight(); virtual wxSize CalculateNewSplitSize(); @@ -554,7 +553,6 @@ protected: void OnChildFocus(wxChildFocusEvent& evt); void OnRender(wxAuiManagerEvent& evt); - void OnEraseBackground(wxEraseEvent& evt); void OnSize(wxSizeEvent& evt); void OnTabClicked(wxCommandEvent& evt); void OnTabBeginDrag(wxCommandEvent& evt); @@ -571,6 +569,7 @@ protected: wxWindow* m_dummy_wnd; wxSize m_requested_bmp_size; + int m_requested_tabctrl_height; wxFont m_selected_font; wxFont m_normal_font; int m_tab_ctrl_height;