mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +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
This commit is contained in:
@@ -37,32 +37,32 @@ using namespace std;
|
||||
CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::string& label_text, const std::string& text,
|
||||
CComponentsForm* parent,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t label_color,
|
||||
fb_pixel_t text_color,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, parent, has_shadow, label_color, text_color, color_frame, color_body, color_shadow);
|
||||
initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow);
|
||||
initCCTextItems();
|
||||
}
|
||||
|
||||
CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const neutrino_locale_t& locale_label_text, const neutrino_locale_t& locale_text,
|
||||
CComponentsForm* parent,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t label_color,
|
||||
fb_pixel_t text_color,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
: CComponentsExtTextForm( x_pos, y_pos, w, h,
|
||||
g_Locale->getText(locale_label_text), g_Locale->getText(locale_text),
|
||||
parent,
|
||||
has_shadow,
|
||||
shadow_mode,
|
||||
label_color, text_color, color_frame, color_body, color_shadow){};
|
||||
|
||||
void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::string& label_text, const std::string& text,
|
||||
CComponentsForm* parent,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t label_color,
|
||||
fb_pixel_t text_color,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
@@ -82,7 +82,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p
|
||||
|
||||
ccx_label_text = label_text;
|
||||
ccx_text = text;
|
||||
shadow = has_shadow;
|
||||
shadow = shadow_mode;
|
||||
ccx_label_color = label_color;
|
||||
ccx_text_color = text_color;
|
||||
col_frame = color_frame;
|
||||
@@ -105,7 +105,7 @@ void CComponentsExtTextForm::initLabel()
|
||||
if (ccx_label_obj == NULL){
|
||||
ccx_label_obj = new CComponentsLabel();
|
||||
ccx_label_obj->doPaintBg(false);
|
||||
ccx_label_obj->enableTboxSaveScreen(save_tbox_screen);
|
||||
ccx_label_obj->enableTboxSaveScreen(cc_txt_save_screen);
|
||||
}
|
||||
|
||||
//add label object
|
||||
@@ -128,7 +128,7 @@ void CComponentsExtTextForm::initText()
|
||||
if (ccx_text_obj == NULL){
|
||||
ccx_text_obj = new CComponentsText();
|
||||
ccx_text_obj->doPaintBg(false);
|
||||
ccx_text_obj->enableTboxSaveScreen(save_tbox_screen);
|
||||
ccx_text_obj->enableTboxSaveScreen(cc_txt_save_screen);
|
||||
}
|
||||
|
||||
//add text object
|
||||
@@ -161,12 +161,12 @@ void CComponentsExtTextForm::setLabelAndText(const neutrino_locale_t& locale_lab
|
||||
setLabelAndText(g_Locale->getText(locale_label_text), g_Locale->getText(locale_text), font_text);
|
||||
}
|
||||
|
||||
void CComponentsExtTextForm::setLabelAndTexts(const string_ext_txt_t& texts)
|
||||
void CComponentsExtTextForm::setLabelAndTexts(const cc_string_ext_txt_t& texts)
|
||||
{
|
||||
setLabelAndText(texts.label_text, texts.text, texts.font);
|
||||
}
|
||||
|
||||
void CComponentsExtTextForm::setLabelAndTexts(const locale_ext_txt_t& locale_texts)
|
||||
void CComponentsExtTextForm::setLabelAndTexts(const cc_locale_ext_txt_t& locale_texts)
|
||||
{
|
||||
setLabelAndText(g_Locale->getText(locale_texts.label_text), g_Locale->getText(locale_texts.text), locale_texts.font);
|
||||
}
|
||||
|
Reference in New Issue
Block a user