X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0eefa6597938743c8fa12bdbfc88c7e41c5a2e6b..c6ea1fdaf924be4ee49a19d12f76e4fcd257bb0a:/include/wx/aui/auibar.h?ds=inline diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index b8f6ff453b..b185a995cf 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -20,7 +20,8 @@ #include "wx/sizer.h" #include "wx/pen.h" -//class WXDLLIMPEXP_FWD_CORE wxSizerItem; +class WXDLLIMPEXP_FWD_CORE wxClientDC; +class WXDLLIMPEXP_FWD_AUI wxAuiPaneInfo; enum wxAuiToolBarStyle { @@ -29,9 +30,17 @@ enum wxAuiToolBarStyle wxAUI_TB_NO_AUTORESIZE = 1 << 2, wxAUI_TB_GRIPPER = 1 << 3, wxAUI_TB_OVERFLOW = 1 << 4, + // using this style forces the toolbar to be vertical and + // be only dockable to the left or right sides of the window + // whereas by default it can be horizontal or vertical and + // be docked anywhere wxAUI_TB_VERTICAL = 1 << 5, wxAUI_TB_HORZ_LAYOUT = 1 << 6, + // analogous to wxAUI_TB_VERTICAL, but forces the toolbar + // to be horizontal + wxAUI_TB_HORIZONTAL = 1 << 7, wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT), + wxAUI_ORIENTATION_MASK = (wxAUI_TB_VERTICAL | wxAUI_TB_HORIZONTAL), wxAUI_TB_DEFAULT_STYLE = 0 }; @@ -86,7 +95,7 @@ public: void SetItemRect(const wxRect& r) { rect = r; } int GetToolId() const { return tool_id; } - void SetToolId(int id) { tool_id = id; } + void SetToolId(int toolid) { tool_id = toolid; } private: @@ -111,7 +120,7 @@ public: window = NULL; sizer_item = NULL; spacer_pixels = 0; - id = 0; + toolid = 0; kind = wxITEM_NORMAL; state = 0; // normal, enabled proportion = 0; @@ -145,7 +154,7 @@ public: sizer_item = c.sizer_item; min_size = c.min_size; spacer_pixels = c.spacer_pixels; - id = c.id; + toolid = c.toolid; kind = c.kind; state = c.state; proportion = c.proportion; @@ -160,8 +169,8 @@ public: void SetWindow(wxWindow* w) { window = w; } wxWindow* GetWindow() { return window; } - void SetId(int new_id) { id = new_id; } - int GetId() const { return id; } + void SetId(int new_id) { toolid = new_id; } + int GetId() const { return toolid; } void SetKind(int new_kind) { kind = new_kind; } int GetKind() const { return kind; } @@ -226,7 +235,7 @@ private: wxSizerItem* sizer_item; // sizer item wxSize min_size; // item's minimum size int spacer_pixels; // size of a spacer - int id; // item's id + int toolid; // item's id int kind; // item's kind int state; // state int proportion; // proportion @@ -564,6 +573,10 @@ public: void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend, const wxAuiToolBarItemArray& append); + // get size of hint rectangle for a particular dock location + wxSize GetHintSize(int dock_direction) const; + bool IsPaneValid(const wxAuiPaneInfo& pane) const; + protected: virtual void OnCustomRender(wxDC& WXUNUSED(dc), @@ -603,6 +616,7 @@ protected: // handlers void OnMiddleUp(wxMouseEvent& evt); void OnMotion(wxMouseEvent& evt); void OnLeaveWindow(wxMouseEvent& evt); + void OnCaptureLost(wxMouseCaptureLostEvent& evt); void OnSetCursor(wxSetCursorEvent& evt); protected: @@ -636,6 +650,18 @@ protected: bool m_overflow_visible; long m_style; + bool RealizeHelper(wxClientDC& dc, bool horizontal); + static bool IsPaneValid(long style, const wxAuiPaneInfo& pane); + bool IsPaneValid(long style) const; + void SetArtFlags() const; + wxOrientation m_orientation; + wxSize m_horzHintSize; + wxSize m_vertHintSize; + +private: + // Common part of OnLeaveWindow() and OnCaptureLost(). + void DoResetMouseState(); + DECLARE_EVENT_TABLE() DECLARE_CLASS(wxAuiToolBar) };