X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9da38912d3503ae504f4110c5a3c7080cd513105..020b004113a8ab9b9c42a9a56716f3a27b0a8621:/include/wx/aui/auibar.h diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index 4c24ded4df..b4a0792d5d 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -17,6 +17,10 @@ #if wxUSE_AUI #include "wx/control.h" +#include "wx/sizer.h" +#include "wx/pen.h" + +//class WXDLLIMPEXP_FWD_CORE wxSizerItem; enum wxAuiToolBarStyle { @@ -26,7 +30,8 @@ enum wxAuiToolBarStyle wxAUI_TB_GRIPPER = 1 << 3, wxAUI_TB_OVERFLOW = 1 << 4, wxAUI_TB_VERTICAL = 1 << 5, - wxAUI_TB_HORZ_TEXT = ((1 << 6) | wxAUI_TB_TEXT), + wxAUI_TB_HORZ_LAYOUT = 1 << 6, + wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT), wxAUI_TB_DEFAULT_STYLE = 0 }; @@ -83,28 +88,29 @@ public: int GetToolId() const { return tool_id; } void SetToolId(int id) { tool_id = id; } -public: +private: + bool is_dropdown_clicked; wxPoint click_pt; wxRect rect; int tool_id; -#ifndef SWIG private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent) -#endif }; class WXDLLIMPEXP_AUI wxAuiToolBarItem { + friend class wxAuiToolBar; + public: wxAuiToolBarItem() { window = NULL; sizer_item = NULL; - space_pixels = 0; + spacer_pixels = 0; id = 0; kind = wxITEM_NORMAL; state = 0; // normal, enabled @@ -137,7 +143,7 @@ public: long_help = c.long_help; sizer_item = c.sizer_item; min_size = c.min_size; - space_pixels = c.space_pixels; + spacer_pixels = c.spacer_pixels; id = c.id; kind = c.kind; state = c.state; @@ -148,7 +154,62 @@ public: user_data = c.user_data; } -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 SetKind(int new_kind) { kind = new_kind; } + int GetKind() const { return kind; } + + void SetState(int new_state) { state = new_state; } + int GetState() const { return state; } + + void SetSizerItem(wxSizerItem* s) { sizer_item = s; } + wxSizerItem* GetSizerItem() const { return sizer_item; } + + void SetLabel(const wxString& s) { label = s; } + const wxString& GetLabel() const { return label; } + + void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; } + const wxBitmap& GetBitmap() const { return bitmap; } + + void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; } + const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; } + + void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; } + const wxBitmap& GetHoverBitmap() const { return hover_bitmap; } + + void SetShortHelp(const wxString& s) { short_help = s; } + const wxString& GetShortHelp() const { return short_help; } + + void SetLongHelp(const wxString& s) { long_help = s; } + const wxString& GetLongHelp() const { return long_help; } + + void SetMinSize(const wxSize& s) { min_size = s; } + const wxSize& GetMinSize() const { return min_size; } + + void SetSpacerPixels(int s) { spacer_pixels = s; } + int GetSpacerPixels() const { return spacer_pixels; } + + void SetProportion(int p) { proportion = p; } + int GetProportion() const { return proportion; } + + void SetActive(bool b) { active = b; } + bool IsActive() const { return active; } + + void SetHasDropDown(bool b) { dropdown = b; } + bool HasDropDown() const { return dropdown; } + + void SetSticky(bool b) { sticky = b; } + bool IsSticky() const { return sticky; } + + void SetUserData(long l) { user_data = l; } + long GetUserData() const { return user_data; } + +private: wxWindow* window; // item's associated window wxString label; // label displayed on the item @@ -159,7 +220,7 @@ public: wxString long_help; // long help (for status bar) wxSizerItem* sizer_item; // sizer item wxSize min_size; // item's minimum size - int space_pixels; // size of a spacer + int spacer_pixels; // size of a spacer int id; // item's id int kind; // item's kind int state; // state