-
-public:
-
- wxWindow* window; // item's associated window
- wxString label; // label displayed on the item
- wxBitmap bitmap; // item's bitmap
- wxBitmap disabled_bitmap; // item's disabled bitmap
- wxBitmap hover_bitmap; // item's hover bitmap
- wxString short_help; // short help (for tooltip)
- 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 id; // item's id
- int kind; // item's kind
- int state; // state
- int proportion; // proportion
- bool active; // true if the item is currently active
- bool dropdown; // true if the item has a dropdown button
- bool sticky; // overrides button states if true (always active)
- long user_data; // user-specified data
+
+
+ void SetWindow(wxWindow* w) { m_window = w; }
+ wxWindow* GetWindow() { return m_window; }
+
+ void SetId(int newId) { m_toolId = newId; }
+ int GetId() const { return m_toolId; }
+
+ void SetKind(int newKind) { m_kind = newKind; }
+ int GetKind() const { return m_kind; }
+
+ void SetState(int newState) { m_state = newState; }
+ int GetState() const { return m_state; }
+
+ void SetSizerItem(wxSizerItem* s) { m_sizerItem = s; }
+ wxSizerItem* GetSizerItem() const { return m_sizerItem; }
+
+ void SetLabel(const wxString& s) { m_label = s; }
+ const wxString& GetLabel() const { return m_label; }
+
+ void SetBitmap(const wxBitmap& bmp) { m_bitmap = bmp; }
+ const wxBitmap& GetBitmap() const { return m_bitmap; }
+
+ void SetDisabledBitmap(const wxBitmap& bmp) { m_disabledBitmap = bmp; }
+ const wxBitmap& GetDisabledBitmap() const { return m_disabledBitmap; }
+
+ void SetHoverBitmap(const wxBitmap& bmp) { m_hoverBitmap = bmp; }
+ const wxBitmap& GetHoverBitmap() const { return m_hoverBitmap; }
+
+ void SetShortHelp(const wxString& s) { m_shortHelp = s; }
+ const wxString& GetShortHelp() const { return m_shortHelp; }
+
+ void SetLongHelp(const wxString& s) { m_longHelp = s; }
+ const wxString& GetLongHelp() const { return m_longHelp; }
+
+ void SetMinSize(const wxSize& s) { m_minSize = s; }
+ const wxSize& GetMinSize() const { return m_minSize; }
+
+ void SetSpacerPixels(int s) { m_spacerPixels = s; }
+ int GetSpacerPixels() const { return m_spacerPixels; }
+
+ void SetProportion(int p) { m_proportion = p; }
+ int GetProportion() const { return m_proportion; }
+
+ void SetActive(bool b) { m_active = b; }
+ bool IsActive() const { return m_active; }
+
+ void SetHasDropDown(bool b)
+ {
+ wxCHECK_RET( !b || m_kind == wxITEM_NORMAL,
+ wxS("Only normal tools can have drop downs") );
+
+ m_dropDown = b;
+ }
+
+ bool HasDropDown() const { return m_dropDown; }
+
+ void SetSticky(bool b) { m_sticky = b; }
+ bool IsSticky() const { return m_sticky; }
+
+ void SetUserData(long l) { m_userData = l; }
+ long GetUserData() const { return m_userData; }
+
+ void SetAlignment(int l) { m_alignment = l; }
+ int GetAlignment() const { return m_alignment; }
+
+private:
+
+ wxWindow* m_window; // item's associated window
+ wxString m_label; // label displayed on the item
+ wxBitmap m_bitmap; // item's bitmap
+ wxBitmap m_disabledBitmap; // item's disabled bitmap
+ wxBitmap m_hoverBitmap; // item's hover bitmap
+ wxString m_shortHelp; // short help (for tooltip)
+ wxString m_longHelp; // long help (for status bar)
+ wxSizerItem* m_sizerItem; // sizer item
+ wxSize m_minSize; // item's minimum size
+ int m_spacerPixels; // size of a spacer
+ int m_toolId; // item's id
+ int m_kind; // item's kind
+ int m_state; // state
+ int m_proportion; // proportion
+ bool m_active; // true if the item is currently active
+ bool m_dropDown; // true if the item has a dropdown button
+ bool m_sticky; // overrides button states if true (always active)
+ long m_userData; // user-specified data
+ int m_alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other