CComponents: add members to handle object tags

This can help to handle some useful values for any functions


Origin commit data
------------------
Branch: ni/coolstream
Commit: 67a42c3e96
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-08-25 (Mon, 25 Aug 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-08-25 17:23:11 +02:00
committed by [CST] Focus
parent 9961798df3
commit 0fc4b61fc9
2 changed files with 8 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ CComponents::CComponents() : COSDFader(g_settings.theme.menu_Content_alpha)
col_frame_sel = COL_MENUCONTENTSELECTED_PLUS_0; col_frame_sel = COL_MENUCONTENTSELECTED_PLUS_0;
corner_type = CORNER_ALL; corner_type = CORNER_ALL;
corner_rad = 0; corner_rad = 0;
cc_tag = NULL;
shadow = CC_SHADOW_OFF; shadow = CC_SHADOW_OFF;
shadow_w = SHADOW_OFFSET; shadow_w = SHADOW_OFFSET;
fr_thickness = 0; fr_thickness = 0;

View File

@@ -67,7 +67,8 @@ class CComponents : public CComponentsSignals, public COSDFader
int corner_type; int corner_type;
///property: defined radius of corner, without effect, if corner_type=0 ///property: defined radius of corner, without effect, if corner_type=0
int corner_rad; int corner_rad;
///property: tag for component, can contain any value if required, default value is NULL, you can fill with a cast, see also setTag() and getTag()
void *cc_tag;
///property: color of body ///property: color of body
fb_pixel_t col_body; fb_pixel_t col_body;
///property: color of shadow ///property: color of shadow
@@ -164,6 +165,11 @@ class CComponents : public CComponentsSignals, public COSDFader
///return/set (pass through) position and dimensions of component at once ///return/set (pass through) position and dimensions of component at once
inline virtual void getDimensions(int* xpos, int* ypos, int* w, int* h){*xpos=x; *ypos=y; *w=width; *h=height;}; inline virtual void getDimensions(int* xpos, int* ypos, int* w, int* h){*xpos=x; *ypos=y; *w=width; *h=height;};
///sets tag as void*, see also cc_tag
virtual void setTag(void* tag){cc_tag = tag;};
///gets tag as void*, see also cc_tag
inline virtual void* getTag(){return cc_tag;};
///set frame color ///set frame color
inline virtual void setColorFrame(fb_pixel_t color){col_frame = color;}; inline virtual void setColorFrame(fb_pixel_t color){col_frame = color;};
///set selected frame color ///set selected frame color