X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9578058d4e0d08f0f08b3d76bc2cfa2effc7e3b4..3039ade95dbad1ee5a5ed03c25e3ed9241907850:/include/wx/aui/auibar.h?ds=sidebyside diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index 658fc7b324..13d6015cdf 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -4,7 +4,7 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2008-08-04 -// RCS-ID: $Id: framemanager.h 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id$ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -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 { @@ -91,17 +95,15 @@ private: wxRect rect; int tool_id; -#ifndef SWIG private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent) -#endif }; class WXDLLIMPEXP_AUI wxAuiToolBarItem { friend class wxAuiToolBar; - + public: wxAuiToolBarItem() @@ -151,50 +153,59 @@ public: sticky = c.sticky; user_data = c.user_data; } - - + + + 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; } @@ -413,7 +424,7 @@ public: const wxPoint& position = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAUI_TB_DEFAULT_STYLE); - ~wxAuiToolBar(); + virtual ~wxAuiToolBar(); void SetWindowStyleFlag(long style); @@ -423,13 +434,13 @@ public: bool SetFont(const wxFont& font); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxString& label, const wxBitmap& bitmap, const wxString& short_help_string = wxEmptyString, wxItemKind kind = wxITEM_NORMAL); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& disabled_bitmap, @@ -438,7 +449,7 @@ public: const wxString& long_help_string, wxObject* client_data); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxBitmap& bitmap, const wxBitmap& disabled_bitmap, bool toggle = false, @@ -446,7 +457,7 @@ public: const wxString& short_help_string = wxEmptyString, const wxString& long_help_string = wxEmptyString) { - AddTool(tool_id, + return AddTool(tool_id, wxEmptyString, bitmap, disabled_bitmap, @@ -456,14 +467,14 @@ public: client_data); } - void AddLabel(int tool_id, + wxAuiToolBarItem* AddLabel(int tool_id, const wxString& label = wxEmptyString, const int width = -1); - void AddControl(wxControl* control, + wxAuiToolBarItem* AddControl(wxControl* control, const wxString& label = wxEmptyString); - void AddSeparator(); - void AddSpacer(int pixels); - void AddStretchSpacer(int proportion = 1); + wxAuiToolBarItem* AddSeparator(); + wxAuiToolBarItem* AddSpacer(int pixels); + wxAuiToolBarItem* AddStretchSpacer(int proportion = 1); bool Realize();