CComponents: move variable cc_gradientData, paintGradient into base class

Variable now usable via g_settings in all subclasses. enable/disable.
TODO: gradient type handling


Origin commit data
------------------
Commit: 64c84fb490
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-09-20 (Sat, 20 Sep 2014)
This commit is contained in:
2014-09-20 21:34:43 +02:00
committed by [CST] Focus
parent be25b2345e
commit def1a3c5b9
7 changed files with 21 additions and 15 deletions

View File

@@ -78,6 +78,13 @@ class CComponents : public CComponentsSignals, public COSDFader
///property: color of frame if component is selected, Note: fr_thickness_sel must be set
fb_pixel_t col_frame_sel;
///property: contains data for gradiant handling
gradientData_t cc_gradientData;
///gradiant pixel buffer
fb_pixel_t *gradientBuf;
///property: true component can paint gradient, see also setPaintGradient()
bool paintGradient;
///property: true=component has shadow
bool shadow;
///property: width of shadow
@@ -179,6 +186,8 @@ class CComponents : public CComponentsSignals, public COSDFader
///set all basic framebuffer element colors at once
///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h"
inline virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;};
///set color gradient on/off
virtual void setPaintGradient(bool do_paint_gradient);
///get frame color
inline virtual fb_pixel_t getColorFrame(){return col_frame;};
@@ -186,7 +195,7 @@ class CComponents : public CComponentsSignals, public COSDFader
inline virtual fb_pixel_t getColorBody(){return col_body;};
///get shadow color
inline virtual fb_pixel_t getColorShadow(){return col_shadow;};
///set corner types
///Possible corner types are defined in CFrameBuffer (see: driver/framebuffer.h)
///Note: default values are given from settings
@@ -249,8 +258,6 @@ class CComponentsItem : public CComponents
///Is typically the type CComponentsForm or derived classes, default intialized with NULL
CComponentsForm *cc_parent;
gradientData_t cc_gradientData;
///hides item, arg: no_restore=true causes no restore of background, but clean up pixel buffer if required
void hideCCItem(bool no_restore = false);