CComponentsItem: add properties for stats enabled/selected

This commit is contained in:
2013-04-13 23:04:23 +02:00
parent f01a9071d2
commit 4f623b822f
2 changed files with 10 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ class CComponentsItem : public CComponents
protected: protected:
int cc_item_type; int cc_item_type;
int cc_item_index; int cc_item_index;
bool cc_item_enabled, cc_item_selected;
///contains real position and dimensions on screen, ///contains real position and dimensions on screen,
int cc_item_xr, cc_item_yr; int cc_item_xr, cc_item_yr;
@@ -119,6 +120,13 @@ class CComponentsItem : public CComponents
virtual void kill(); virtual void kill();
virtual int getItemType(); virtual int getItemType();
virtual void syncSysColors(); 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 class CComponentsPicture : public CComponentsItem

View File

@@ -55,6 +55,8 @@ void CComponentsItem::initVarItem()
initVarBasic(); initVarBasic();
cc_item_index = CC_NO_INDEX; cc_item_index = CC_NO_INDEX;
cc_item_xr = cc_item_yr = -1; 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. // Paint container background in cc-items with shadow, background and frame.