mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
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
Origin commit data
------------------
Commit: 0146511f38
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-11-18 (Wed, 18 Nov 2015)
Origin message was:
------------------
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:
@@ -31,6 +31,7 @@
|
||||
#include "cc_frm_chain.h"
|
||||
#include "cc_item_picture.h"
|
||||
#include "cc_item_text.h"
|
||||
#include <gui/widget/icons.h>
|
||||
#include <string>
|
||||
#include <driver/neutrinofonts.h>
|
||||
#include <driver/rcinput.h>
|
||||
@@ -43,7 +44,7 @@
|
||||
/*!
|
||||
Shows a button box with caption and optional icon.
|
||||
*/
|
||||
class CComponentsButton : public CComponentsFrmChain
|
||||
class CComponentsButton : public CComponentsFrmChain, public CCTextScreen
|
||||
{
|
||||
protected:
|
||||
///object: picture object
|
||||
@@ -58,7 +59,7 @@ class CComponentsButton : public CComponentsFrmChain
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow);
|
||||
|
||||
///property: button text as string, see also setCaption() and getCaptionString()
|
||||
@@ -101,7 +102,7 @@ class CComponentsButton : public CComponentsFrmChain
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -110,7 +111,7 @@ class CComponentsButton : public CComponentsFrmChain
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -119,7 +120,7 @@ class CComponentsButton : public CComponentsFrmChain
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -128,7 +129,7 @@ class CComponentsButton : public CComponentsFrmChain
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
///set text color
|
||||
@@ -181,9 +182,9 @@ class CComponentsButtonRed : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_RED;
|
||||
};
|
||||
@@ -192,9 +193,9 @@ class CComponentsButtonRed : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_RED;
|
||||
};
|
||||
@@ -212,9 +213,9 @@ class CComponentsButtonGreen : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_GREEN;
|
||||
};
|
||||
@@ -223,9 +224,9 @@ class CComponentsButtonGreen : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_GREEN;
|
||||
};
|
||||
@@ -243,9 +244,9 @@ class CComponentsButtonYellow : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW;
|
||||
};
|
||||
@@ -254,9 +255,9 @@ class CComponentsButtonYellow : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW;
|
||||
};
|
||||
@@ -274,9 +275,9 @@ class CComponentsButtonBlue : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_BLUE;
|
||||
};
|
||||
@@ -285,9 +286,9 @@ class CComponentsButtonBlue : public CComponentsButton
|
||||
CComponentsForm *parent = NULL,
|
||||
bool selected = false,
|
||||
bool enabled = true,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow)
|
||||
:CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON_BLUE;
|
||||
};
|
||||
|
Reference in New Issue
Block a user