components: rework classes

- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h
- added extra methodes for simple use of some basic components extra.cpp/h
- rework clock handling: use timer class, reworked members for
  enable/disable clock with external timer events,
  tryed to fix some display issues related with infoclock and
  time osd clock in moviebrowser, channellist, menuus
- reworked hide/kill handling, removed parameter for hide(), try to use
  cached backgrounds for other constallations, paint cache, image cache (all beta)
- reworked shadow/frame handling, add shadow modes for left/right
  arrangement, TODO: repaint for existant instances required
- reworked color gradient assignment (beta)

... Note: I had a data crash in my local git tree
and i tryed to restore my historie, but most was lost. Therefore here
the commit is large
This commit is contained in:
2015-11-18 18:08:23 +01:00
parent a2171dad4a
commit 0146511f38
68 changed files with 3207 additions and 1682 deletions

View File

@@ -34,7 +34,7 @@ CComponentsSlider::CComponentsSlider( const int& x_pos, const int& y_pos, const
const int& min_value,
const int& max_value,
CComponentsForm *parent,
bool has_shadow,
int shadow_mode,
fb_pixel_t& color_frame,
fb_pixel_t& color_body,
fb_pixel_t& color_shadow)
@@ -51,7 +51,7 @@ CComponentsSlider::CComponentsSlider( const int& x_pos, const int& y_pos, const
csl_min_value = min_value;
csl_max_value = max_value;
shadow = has_shadow;
shadow = shadow_mode;
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;
@@ -88,8 +88,9 @@ void CComponentsSlider::initCCSlBody()
{
if (!csl_body_icon.empty()){
if (csl_body_obj == NULL){
csl_body_obj = new CComponentsPicture(0, 0, 0, 0, csl_body_icon);
csl_body_obj->doPaintBg(false);
csl_body_obj = new CComponentsPicture(0, 0, width-2*fr_thickness, 16, csl_body_icon);
csl_body_obj->setColorBody(this->col_body); //FIXME: Background handling during current instance of slider object
csl_body_obj->doPaintBg(true);
addCCItem(csl_body_obj);
}
else
@@ -118,8 +119,9 @@ void CComponentsSlider::initCCSlSlider()
{
if (!csl_slider_icon.empty()){
if (csl_slider_obj == NULL){
csl_slider_obj = new CComponentsPicture(0, 0, 0, 0, csl_slider_icon);
csl_slider_obj->doPaintBg(false);
csl_slider_obj = new CComponentsPicture(0, 0, csl_slider_icon);
csl_slider_obj->setColorBody(this->col_body); //FIXME: Background handling during current instance of slider object
csl_slider_obj->doPaintBg(true);
addCCItem(csl_slider_obj);
}
else
@@ -135,7 +137,7 @@ void CComponentsSlider::initCCSlSlider()
int slider_h = csl_slider_obj->getHeight();
//position of slider icon
int slider_x = csl_body_obj->getXPos() - slider_w/2 + csl_body_obj->getWidth() * (abs(csl_min_value) + csl_current_value) / (abs(csl_min_value) + abs(csl_max_value));
int slider_x = csl_body_obj->getXPos() + (csl_body_obj->getWidth()-slider_w) * (abs(csl_min_value) + csl_current_value) / (abs(csl_min_value) + abs(csl_max_value));
int slider_y = height/2-slider_h/2;
if (csl_slider_obj)