]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/aui/auibook.h
Removed redundant code
[wxWidgets.git] / include / wx / aui / auibook.h
index 0d1dd76910ae2cb25829ec55242eaf153810cc36..15eae356c0925c5567981b12fe3bda10fd80583b 100644 (file)
@@ -156,10 +156,8 @@ public:
 
     virtual void DrawTab(wxDC& dc,
                          wxWindow* wnd,
 
     virtual void DrawTab(wxDC& dc,
                          wxWindow* wnd,
+                         const wxAuiNotebookPage& pane,
                          const wxRect& in_rect,
                          const wxRect& in_rect,
-                         const wxString& caption,
-                         const wxBitmap& bitmap,
-                         bool active,
                          int close_button_state,
                          wxRect* out_tab_rect,
                          wxRect* out_button_rect,
                          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,
                          int bitmap_id,
                          int button_state,
                          int orientation,
-                         const wxBitmap& bitmap_override,
                          wxRect* out_rect) = 0;
                          wxRect* out_rect) = 0;
-               
-    virtual int GetIndentSize() = 0;
-  
+    
     virtual wxSize GetTabSize(
                          wxDC& dc,
                          wxWindow* wnd,
     virtual wxSize GetTabSize(
                          wxDC& dc,
                          wxWindow* wnd,
@@ -186,13 +181,17 @@ public:
                          int close_button_state,
                          int* x_extent) = 0;
                          
                          int close_button_state,
                          int* x_extent) = 0;
                          
-    virtual int ShowWindowList(
+    virtual int ShowDropDown(
                          wxWindow* wnd,
                          wxWindow* wnd,
-                         const wxArrayString& items,
+                         const wxAuiNotebookPageArray& items,
                          int active_idx) = 0;
                          int active_idx) = 0;
+                         
+    virtual int GetIndentSize() = 0;
     
     
-    virtual int GetBestTabCtrlSize(wxWindow* wnd,
-                                   wxAuiNotebookPageArray& pages) = 0;    
+    virtual int GetBestTabCtrlSize(
+                         wxWindow* wnd,
+                         const wxAuiNotebookPageArray& pages,
+                         const wxSize& required_bmp_size) = 0;    
 };
 
 
 };
 
 
@@ -220,10 +219,8 @@ public:
                      
     void DrawTab(wxDC& dc,
                  wxWindow* wnd,
                      
     void DrawTab(wxDC& dc,
                  wxWindow* wnd,
+                 const wxAuiNotebookPage& pane,
                  const wxRect& in_rect,
                  const wxRect& in_rect,
-                 const wxString& caption,
-                 const wxBitmap& bitmap,
-                 bool active,
                  int close_button_state,
                  wxRect* out_tab_rect,
                  wxRect* out_button_rect,
                  int close_button_state,
                  wxRect* out_tab_rect,
                  wxRect* out_button_rect,
@@ -236,7 +233,6 @@ public:
                  int bitmap_id,
                  int button_state,
                  int orientation,
                  int bitmap_id,
                  int button_state,
                  int orientation,
-                 const wxBitmap& bitmap_override,
                  wxRect* out_rect);
     
     int GetIndentSize();
                  wxRect* out_rect);
     
     int GetIndentSize();
@@ -250,24 +246,24 @@ public:
                  int close_button_state,
                  int* x_extent);
                   
                  int close_button_state,
                  int* x_extent);
                   
-    int ShowWindowList(
+    int ShowDropDown(
                  wxWindow* wnd,
                  wxWindow* wnd,
-                 const wxArrayString& items,
+                 const wxAuiNotebookPageArray& items,
                  int active_idx);
 
     int GetBestTabCtrlSize(wxWindow* wnd,
                  int active_idx);
 
     int GetBestTabCtrlSize(wxWindow* wnd,
-                 wxAuiNotebookPageArray& pages);  
+                 const wxAuiNotebookPageArray& pages,
+                 const wxSize& required_bmp_size);  
 
 protected:
 
     wxFont m_normal_font;
     wxFont m_selected_font;
     wxFont m_measuring_font;
 
 protected:
 
     wxFont m_normal_font;
     wxFont m_selected_font;
     wxFont m_measuring_font;
-    wxPen m_normal_bkpen;
-    wxPen m_selected_bkpen;
-    wxBrush m_normal_bkbrush;
-    wxBrush m_selected_bkbrush;
-    wxBrush m_bkbrush;
+    wxColour m_base_colour;
+    wxPen m_base_colour_pen;
+    wxPen m_border_pen;
+    wxBrush m_base_colour_brush;
     wxBitmap m_active_close_bmp;
     wxBitmap m_disabled_close_bmp;
     wxBitmap m_active_left_bmp;
     wxBitmap m_active_close_bmp;
     wxBitmap m_disabled_close_bmp;
     wxBitmap m_active_left_bmp;
@@ -308,10 +304,8 @@ public:
                                           
     void DrawTab(wxDC& dc,
                  wxWindow* wnd,
                                           
     void DrawTab(wxDC& dc,
                  wxWindow* wnd,
+                 const wxAuiNotebookPage& pane,
                  const wxRect& in_rect,
                  const wxRect& in_rect,
-                 const wxString& caption,
-                 const wxBitmap& bitmap,
-                 bool active,
                  int close_button_state,
                  wxRect* out_tab_rect,
                  wxRect* out_button_rect,
                  int close_button_state,
                  wxRect* out_tab_rect,
                  wxRect* out_button_rect,
@@ -324,7 +318,6 @@ public:
                  int bitmap_id,
                  int button_state,
                  int orientation,
                  int bitmap_id,
                  int button_state,
                  int orientation,
-                 const wxBitmap& bitmap_override,
                  wxRect* out_rect);
              
     int GetIndentSize();
                  wxRect* out_rect);
              
     int GetIndentSize();
@@ -338,13 +331,14 @@ public:
                  int close_button_state,
                  int* x_extent);
                   
                  int close_button_state,
                  int* x_extent);
                   
-    int ShowWindowList(
+    int ShowDropDown(
                  wxWindow* wnd,
                  wxWindow* wnd,
-                 const wxArrayString& items,
+                 const wxAuiNotebookPageArray& items,
                  int active_idx);
 
     int GetBestTabCtrlSize(wxWindow* wnd,
                  int active_idx);
 
     int GetBestTabCtrlSize(wxWindow* wnd,
-                 wxAuiNotebookPageArray& pages);  
+                 const wxAuiNotebookPageArray& pages,
+                 const wxSize& required_bmp_size);  
 
 protected:
 
 
 protected:
 
@@ -385,7 +379,7 @@ public:
     virtual ~wxAuiTabContainer();
 
     void SetArtProvider(wxAuiTabArt* art);
     virtual ~wxAuiTabContainer();
 
     void SetArtProvider(wxAuiTabArt* art);
-    wxAuiTabArt* GetArtProvider();
+    wxAuiTabArt* GetArtProvider() const;
 
     void SetFlags(unsigned int flags);
     unsigned int GetFlags() const;
 
     void SetFlags(unsigned int flags);
     unsigned int GetFlags() const;
@@ -404,6 +398,7 @@ public:
     int GetIdxFromWindow(wxWindow* page) const;
     size_t GetPageCount() const;
     wxAuiNotebookPage& GetPage(size_t idx);
     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);
     wxAuiNotebookPageArray& GetPages();
     void SetNormalFont(const wxFont& normal_font);
     void SetSelectedFont(const wxFont& selected_font);
@@ -499,7 +494,14 @@ public:
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0);
                 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,
     bool AddPage(wxWindow* page,
                  const wxString& caption,
                  bool select = false,
@@ -514,22 +516,27 @@ public:
     bool DeletePage(size_t page);
     bool RemovePage(size_t page);
     
     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);
 
     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 SetSelection(size_t new_page);
     int GetSelection() const;
-    size_t GetPageCount() const;
-    wxWindow* GetPage(size_t page_idx) const;
-
-    void SetArtProvider(wxAuiTabArt* art);
-    wxAuiTabArt* GetArtProvider();
 
 
+    virtual void Split(size_t page, int direction);
+   
 protected:
 
     // these can be overridden
 protected:
 
     // these can be overridden
-    virtual void SetTabCtrlHeight(int height);
+    virtual void UpdateTabCtrlHeight();
     virtual int CalculateTabCtrlHeight();
     virtual int CalculateTabCtrlHeight();
+    virtual wxSize CalculateNewSplitSize();
     
 protected:
 
     
 protected:
 
@@ -540,13 +547,12 @@ protected:
     wxAuiTabCtrl* GetActiveTabCtrl();
     bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
     void RemoveEmptyTabFrames();
     wxAuiTabCtrl* GetActiveTabCtrl();
     bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
     void RemoveEmptyTabFrames();
-
+    void UpdateHintWindowSize();
+    
 protected:
 
 protected:
 
-
     void OnChildFocus(wxChildFocusEvent& evt);
     void OnRender(wxAuiManagerEvent& evt);
     void OnChildFocus(wxChildFocusEvent& evt);
     void OnRender(wxAuiManagerEvent& evt);
-    void OnEraseBackground(wxEraseEvent& evt);
     void OnSize(wxSizeEvent& evt);
     void OnTabClicked(wxCommandEvent& evt);
     void OnTabBeginDrag(wxCommandEvent& evt);
     void OnSize(wxSizeEvent& evt);
     void OnTabClicked(wxCommandEvent& evt);
     void OnTabBeginDrag(wxCommandEvent& evt);
@@ -562,10 +568,12 @@ protected:
     int m_tab_id_counter;
     wxWindow* m_dummy_wnd;
 
     int m_tab_id_counter;
     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;
     wxFont m_selected_font;
     wxFont m_normal_font;
     int m_tab_ctrl_height;
-    
+        
     int m_last_drag_x;
     unsigned int m_flags;
 
     int m_last_drag_x;
     unsigned int m_flags;