diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 6d6dd1035..20db52260 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -98,6 +98,7 @@ class CComponentsItem : public CComponents protected: int cc_item_type; int cc_item_index; + bool cc_item_enabled, cc_item_selected; ///contains real position and dimensions on screen, int cc_item_xr, cc_item_yr; @@ -119,6 +120,13 @@ class CComponentsItem : public CComponents virtual void kill(); virtual int getItemType(); virtual void syncSysColors(); + + ///setters for item select stats + virtual void setSelected(bool selected){cc_item_selected = selected;}; + virtual void setEnable(bool enabled){cc_item_enabled = enabled;}; + ///getters for item enable stats + virtual bool isSelected(){return cc_item_selected;}; + virtual bool isEnabled(){return cc_item_enabled;}; }; class CComponentsPicture : public CComponentsItem diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 88587f14c..16fe3d803 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -55,6 +55,8 @@ void CComponentsItem::initVarItem() initVarBasic(); cc_item_index = CC_NO_INDEX; cc_item_xr = cc_item_yr = -1; + cc_item_enabled = true; + cc_item_selected = false; } // Paint container background in cc-items with shadow, background and frame.