CComponentsItem: add members getItemType(), cc_item_type

Small helper for detection of item types.
This could be useful, if it is necessary, to track these at runtime or
debugging, because it's not really detectable, which items just be used.
e.g forms could contain very much items, but many of these items
are inherited from CComponentsItem and an assignment to a certain subclass.
This commit is contained in:
2012-12-04 19:11:01 +01:00
parent 9605d7438f
commit 6175fd989d
2 changed files with 43 additions and 1 deletions

View File

@@ -172,17 +172,35 @@ class CComponents
class CComponentsItem : public CComponents
{
protected:
int cc_item_type;
void hideCCItem(bool no_restore = false);
void paintInit(bool do_save_bg);
void initVarItem();
public:
enum
{
CC_ITEMTYPE_BASE,
CC_ITEMTYPE_PICTURE,
CC_ITEMTYPE_TEXT,
CC_ITEMTYPE_TEXT_INFOBOX,
CC_ITEMTYPE_SHAPE_SQUARE,
CC_ITEMTYPE_SHAPE_CIRCLE,
CC_ITEMTYPE_PIP,
CC_ITEMTYPE_FRM,
CC_ITEMTYPE_FRM_HERADER,
CC_ITEMTYPE_FRM_ICONFORM,
CC_ITEMTYPE_FRM_WINDOW,
CC_ITEMTYPES
};
CComponentsItem();
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0;
virtual void hide(bool no_restore = false);
virtual void kill();
virtual int getItemType();
virtual void syncSysColors();
};