diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index 65c47712d..0e60cd00f 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -775,7 +775,7 @@ void CCDraw::kill(const fb_pixel_t& bg_color, const int& corner_radius, const in v_fbdata[i].rtype); } }else - dprintf(DEBUG_DEBUG, "\033[33m[CCDraw][%s - %d], WARNING! render with bad dimensions [dx = %d dy = %d]\033[0m\n", __func__, __LINE__, v_fbdata[i].dx, v_fbdata[i].dy ); + dprintf(DEBUG_DEBUG, "\033[33m[CCDraw]\t[%s - %d] WARNING! render with bad dimensions [dx = %d dy = %d]\033[0m\n", __func__, __LINE__, v_fbdata[i].dx, v_fbdata[i].dy ); v_fbdata[i].is_painted = false; } diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index a62df72ee..b5ae0d15c 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -45,7 +45,8 @@ CComponentsForm::CComponentsForm( const int x_pos, const int y_pos, const int w, fb_pixel_t color_shadow) :CComponentsItem(parent) { - cc_item_type = CC_ITEMTYPE_FRM; + cc_item_type.id = CC_ITEMTYPE_FRM; + cc_item_type.name= "cc_base_form"; Init(x_pos, y_pos, w, h, color_frame, color_body, color_shadow); cc_xr = x; @@ -186,7 +187,7 @@ void CComponentsForm::clear() for(size_t i=0; igetItemType(), v_cc_items[i]); + dprintf(DEBUG_DEBUG, "[CComponentsForm]\t[%s-%d] delete form cc-item %d of %d address = %p \033[33m\t type = [%d] [%s]\033[0m\n", __func__, __LINE__, (int)i+1, (int)v_cc_items.size(), v_cc_items[i], v_cc_items[i]->getItemType(), v_cc_items[i]->getItemName().c_str()); delete v_cc_items[i]; v_cc_items[i] = NULL; } @@ -198,12 +199,12 @@ void CComponentsForm::clear() int CComponentsForm::addCCItem(CComponentsItem* cc_Item) { if (cc_Item){ - dprintf(DEBUG_DEBUG, "[CComponentsForm] %s-%d try to add cc_Item [type %d] to form [current index=%d] \n", __func__, __LINE__, cc_Item->getItemType(), cc_item_index); + dprintf(DEBUG_DEBUG, "[CComponentsForm]\t[%s-%d] try to add cc_Item \033[33m\t type = [%d] [%s]\033[0m to form [%s -> current index=%d] \n", __func__, __LINE__, cc_Item->getItemType(), cc_Item->getItemName().c_str(), getItemName().c_str(), cc_item_index); cc_Item->setParent(this); v_cc_items.push_back(cc_Item); - dprintf(DEBUG_DEBUG, "\tadded cc_Item [type %d] to form [current index=%d] \n", cc_Item->getItemType(), cc_item_index); + dprintf(DEBUG_DEBUG, "\tadded cc_Item (type = [%d] [%s] to form [current index=%d] \n", cc_Item->getItemType(), cc_Item->getItemName().c_str(), cc_item_index); //assign item index int new_index = genIndex(); @@ -434,9 +435,9 @@ void CComponentsForm::paintCCItems() //check item for corrupt position, skip current item if found problems if (ypos > height || xpos > this_w){ - dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] [type=%d] WARNING: item position is out of form size:\ndefinied x=%d, defined this_w=%d \ndefinied y=%d, defined height=%d \n", - __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), xpos, this_w, ypos, height); - if (this->cc_item_type != CC_ITEMTYPE_FRM_CHAIN) + dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] \033[33m\t type = [%d] [%s]\033[0m WARNING: item position is out of form size:\ndefinied x=%d, defined this_w=%d \ndefinied y=%d, defined height=%d \n", + __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), cc_item->getItemName().c_str(), xpos, this_w, ypos, height); + if (this->cc_item_type.id != CC_ITEMTYPE_FRM_CHAIN) continue; } @@ -497,8 +498,8 @@ void CComponentsForm::paintCCItems() right_item -= (new_w%2); w_item -= (new_w%2); if (right_item > right_frm){ - dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] [type=%d] this_w is too large, definied width=%d, possible width=%d \n", - __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), w_item, new_w); + dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] \033[33m\t type = [%d] [%s]\033[0m this_w is too large, definied width=%d, possible width=%d \n", + __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), cc_item->getItemName().c_str(), w_item, new_w); cc_item->setWidth(new_w); } @@ -511,8 +512,8 @@ void CComponentsForm::paintCCItems() bottom_item -= (new_h%2); h_item -= (new_h%2); if (bottom_item > bottom_frm){ - dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] [type=%d] height is too large, definied height=%d, possible height=%d \n", - __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), h_item, new_h); + dprintf(DEBUG_INFO, "[CComponentsForm] %s: [form: %d] [item-index %d] \033[33m\t type = [%d] [%s]\033[0m height is too large, definied height=%d, possible height=%d \n", + __func__, cc_item_index, cc_item->getIndex(), cc_item->getItemType(), cc_item->getItemName().c_str(), h_item, new_h); cc_item->setHeight(new_h); } diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index c11a43b1d..2de1468d8 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -94,7 +94,8 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const int shadow_mode, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_BUTTON; + cc_item_type.id = CC_ITEMTYPE_BUTTON; + cc_item_type.name = "cc_base_button"; x = x_pos; y = y_pos; diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index 0e9e4eca2..c4b68543b 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -249,7 +249,8 @@ class CComponentsButtonRed : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_RED; + cc_item_type.name = "cc_base_red_button"; }; CComponentsButtonRed( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -260,7 +261,8 @@ class CComponentsButtonRed : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_RED; + cc_item_type.name = "cc_base_localized_red_button"; }; }; @@ -280,7 +282,8 @@ class CComponentsButtonGreen : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_GREEN; + cc_item_type.name = "cc_base_green_button"; }; CComponentsButtonGreen( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -292,7 +295,8 @@ class CComponentsButtonGreen : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_GREEN; + cc_item_type.name = "cc_base_localized_green_button"; }; }; @@ -312,7 +316,8 @@ class CComponentsButtonYellow : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_YELLOW; + cc_item_type.name = "cc_base_yellow_button"; }; CComponentsButtonYellow( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -323,7 +328,8 @@ class CComponentsButtonYellow : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_YELLOW; + cc_item_type.name = "cc_base_localized_yellow_button"; }; }; @@ -343,7 +349,8 @@ class CComponentsButtonBlue : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_BLUE; + cc_item_type.name = "cc_base_blue_button"; }; CComponentsButtonBlue( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -354,7 +361,8 @@ class CComponentsButtonBlue : public CComponentsButton fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :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; + cc_item_type.id = CC_ITEMTYPE_BUTTON_BLUE; + cc_item_type.name = "cc_base_localized_blue_button"; }; }; diff --git a/src/gui/components/cc_frm_chain.cpp b/src/gui/components/cc_frm_chain.cpp index dcc261265..432122cc5 100644 --- a/src/gui/components/cc_frm_chain.cpp +++ b/src/gui/components/cc_frm_chain.cpp @@ -70,7 +70,8 @@ void CComponentsFrmChain::initVarChain( const int& x_pos, const int& y_pos, cons fb_pixel_t& color_body, fb_pixel_t& color_shadow) { - cc_item_type = CC_ITEMTYPE_FRM_CHAIN; + cc_item_type.id = CC_ITEMTYPE_FRM_CHAIN; + cc_item_type.name = "cc_chain"; corner_rad = 0; x = x_pos; diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index d49276dfd..008a18660 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -57,7 +57,8 @@ CComponentsFrmClock::CComponentsFrmClock( const int& x_pos, ) { - cc_item_type = CC_ITEMTYPE_FRM_CLOCK; + cc_item_type.id = CC_ITEMTYPE_FRM_CLOCK; + cc_item_type.name = "cc_clock"; x = cc_xr = x_old = x_pos; y = cc_yr = y_old = y_pos; diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 0587d90db..239ba383a 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -80,7 +80,8 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p fb_pixel_t text_color, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_FRM_EXT_TEXT; + cc_item_type.id = CC_ITEMTYPE_FRM_EXT_TEXT; + cc_item_type.name = "cc_extended_text"; x = x_pos; y = y_pos; diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 1f6630980..edc4c320a 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -61,7 +61,8 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const fb_pixel_t color_body, fb_pixel_t color_shadow ) { - cc_item_type = CC_ITEMTYPE_FOOTER; + cc_item_type.id = CC_ITEMTYPE_FOOTER; + cc_item_type.name = "cc_footer"; x = x_old = x_pos; y = y_old = y_pos; diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 6cc883ae1..471ed6827 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -88,7 +88,8 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_FRM_HEADER; + cc_item_type.id = CC_ITEMTYPE_FRM_HEADER; + cc_item_type.name = "cc_header"; clear(); cc_txt_save_screen = false; x = cc_xr = x_old = x_pos; diff --git a/src/gui/components/cc_frm_icons.cpp b/src/gui/components/cc_frm_icons.cpp index e7e47a860..915930110 100644 --- a/src/gui/components/cc_frm_icons.cpp +++ b/src/gui/components/cc_frm_icons.cpp @@ -53,7 +53,8 @@ void CComponentsIconForm::initVarIconForm( const int &x_pos, const int &y_pos, c int shadow_mode, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_FRM_ICONFORM; + cc_item_type.id = CC_ITEMTYPE_FRM_ICONFORM; + cc_item_type.name = "cc_icon_container"; x = x_pos; y = y_pos; diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index 56891add4..8a4a8137a 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -84,7 +84,9 @@ CComponentsScrollBar::CComponentsScrollBar( const int &x_pos, const int &y_pos, void CComponentsScrollBar::initVarSbForm(const int& count, const fb_pixel_t& color_select, const fb_pixel_t& color_passive) { - cc_item_type = CC_ITEMTYPE_FRM_SCROLLBAR; + cc_item_type.id = CC_ITEMTYPE_FRM_SCROLLBAR; + cc_item_type.name = "cc_scrollbar"; + fr_thickness = 0; append_x_offset = OFFSET_INNER_MIN; diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 1ef19cbd4..c9476d7bc 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -51,7 +51,8 @@ CSignalBar::CSignalBar(const int& xpos, const int& ypos, const int& w, const int void CSignalBar::initVarSigBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& sbname, CComponentsForm *parent) { - cc_item_type = CC_ITEMTYPE_FRM_SIGNALBAR; + cc_item_type.id = CC_ITEMTYPE_FRM_SIGNALBAR; + cc_item_type.name = "cc_signal_bar"; corner_rad = 0; corner_type = 0; diff --git a/src/gui/components/cc_frm_slider.cpp b/src/gui/components/cc_frm_slider.cpp index 29f06fefb..9c022cad3 100644 --- a/src/gui/components/cc_frm_slider.cpp +++ b/src/gui/components/cc_frm_slider.cpp @@ -39,7 +39,8 @@ CComponentsSlider::CComponentsSlider( const int& x_pos, const int& y_pos, const fb_pixel_t& color_body, fb_pixel_t& color_shadow) { - cc_item_type = CC_ITEMTYPE_SLIDER; + cc_item_type.id = CC_ITEMTYPE_SLIDER; + cc_item_type.name = "cc_slider"; corner_rad = 0; x = x_pos; diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 8e39ec97b..d8b154538 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -95,7 +95,11 @@ CComponentsWindowMax::CComponentsWindowMax( const string& caption, fb_pixel_t color_body, fb_pixel_t color_shadow) :CComponentsWindow(0, 0, 0, 0, caption, - iconname, parent, shadow_mode, color_frame, color_body, color_shadow){}; + iconname, parent, shadow_mode, color_frame, color_body, color_shadow) +{ + cc_item_type.id = CC_ITEMTYPE_FRM_WINDOW_MAX; + cc_item_type.name = "cc_window_max"; +} CComponentsWindowMax::CComponentsWindowMax( neutrino_locale_t locale_caption, const string& iconname, @@ -106,7 +110,11 @@ CComponentsWindowMax::CComponentsWindowMax( neutrino_locale_t locale_caption, fb_pixel_t color_shadow) :CComponentsWindow(0, 0, 0, 0, locale_caption != NONEXISTANT_LOCALE ? g_Locale->getText(locale_caption) : "", - iconname, parent, shadow_mode, color_frame, color_body, color_shadow){}; + iconname, parent, shadow_mode, color_frame, color_body, color_shadow) +{ + cc_item_type.id = CC_ITEMTYPE_FRM_WINDOW_MAX; + cc_item_type.name = "cc_window_max_localized"; +} void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const int& w, const int& h, const string& caption, @@ -118,7 +126,8 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const fb_pixel_t color_shadow) { //CComponentsForm - cc_item_type = CC_ITEMTYPE_FRM_WINDOW; + cc_item_type.id = CC_ITEMTYPE_FRM_WINDOW; + cc_item_type.name = "cc_base_window"; //using current screen settings for default dimensions, //do use full screen (from osd-settings) if default values for width/height = 0 diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 33b595b2d..41ba19a89 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -44,7 +44,8 @@ using namespace std; //abstract sub class CComponentsItem from CComponents CComponentsItem::CComponentsItem(CComponentsForm* parent) { - cc_item_type = CC_ITEMTYPE_GENERIC; + cc_item_type.id = CC_ITEMTYPE_GENERIC; + cc_item_type.name = "cc_base_item"; cc_item_index = CC_NO_INDEX; cc_item_enabled = true; cc_item_selected = false; @@ -213,6 +214,7 @@ void CComponentsItem::paintInit(bool do_save_bg) } } } + dprintf(DEBUG_DEBUG, "\033[1;32m[CComponentsItem]\t[%s - %d], init and paint item type = %d [%s]...\033[0m\n", __func__, __LINE__, cc_item_type.id, cc_item_type.name.c_str()); paintFbItems(do_save_bg); } @@ -243,7 +245,7 @@ void CComponentsItem::syncSysColors() int CComponentsItem::getItemType() { for(int i =0; i< (CC_ITEMTYPES) ;i++){ - if (i == cc_item_type) + if (i == cc_item_type.id) return i; } @@ -329,3 +331,13 @@ void CComponentsItem::setSelected(bool selected, const fb_pixel_t& sel_frame_col col_body = cc_item_selected ? sel_body_col : body_col; col_frame = cc_item_selected ? sel_frame_col : frame_col; } + +void CComponentsItem::setItemName(const std::string& name) +{ + cc_item_type.name = name; +} + +std::string CComponentsItem::getItemName() +{ + return cc_item_type.name; +} diff --git a/src/gui/components/cc_item.h b/src/gui/components/cc_item.h index d76684020..01007fb30 100644 --- a/src/gui/components/cc_item.h +++ b/src/gui/components/cc_item.h @@ -41,7 +41,7 @@ class CComponentsItem : public CComponents ///see also getIndex(), setIndex() int cc_item_index; ///property: define of item type, see cc_types.h for possible types - int cc_item_type; + cc_type_t cc_item_type; ///property: default enabled bool cc_item_enabled; ///property: default not selected @@ -103,7 +103,12 @@ class CComponentsItem : public CComponents virtual void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, bool ignore_parent = false, const int& fblayer_type = ~CC_FBDATA_TYPES); ///get the current item type, see attribute cc_item_type above - virtual int getItemType(); + int getItemType(); + //sets item name + void setItemName(const std::string& name); + //gets item name + std::string getItemName(); + ///syncronizes item colors with current color settings if required, NOTE: overwrites internal values! virtual void syncSysColors(); diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index 3961a10d9..f1df156d1 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -49,7 +49,8 @@ CComponentsInfoBox::CComponentsInfoBox( const int& x_pos, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_TEXT_INFOBOX; + cc_item_type.id = CC_ITEMTYPE_TEXT_INFOBOX; + cc_item_type.name = "cc_info_box"; x = x_old = x_pos; y = y_old = y_pos; diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 63eb85bfc..6d8eacca3 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -69,7 +69,8 @@ void CComponentsPicture::init( const int &x_pos, const int &y_pos, const int &w, bool allow_scale) { //CComponents, CComponentsItem - cc_item_type = CC_ITEMTYPE_PICTURE; + cc_item_type.id = CC_ITEMTYPE_PICTURE; + cc_item_type.name = "cc_image_box"; //CComponents x = x_old = x_pos; @@ -399,7 +400,8 @@ CComponentsChannelLogo::CComponentsChannelLogo( const int &x_pos, const int &y_p void CComponentsChannelLogo::init(const uint64_t& channelId, const std::string& channelName, bool allow_scale) { - cc_item_type = CC_ITEMTYPE_CHANNEL_LOGO; + cc_item_type.id = CC_ITEMTYPE_CHANNEL_LOGO; + cc_item_type.name = "cc_channel_logo_box"; channel_name = ""; channel_id = 0; alt_pic_name = ""; diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index c96c4e221..e7d0177ba 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -209,7 +209,10 @@ class CComponentsPictureScalable : public CComponentsPicture fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE) : CComponentsPicture(x_pos, y_pos, 0, 0, image_name, parent, shadow_mode, color_frame, color_background, color_shadow, transparent) - {cc_item_type = CC_ITEMTYPE_PICTURE_SCALABLE;}; + { + cc_item_type.id = CC_ITEMTYPE_PICTURE_SCALABLE; + cc_item_type.name = "cc_scalable_image_box"; + }; }; class CComponentsChannelLogo : public CComponentsPicture @@ -294,7 +297,10 @@ class CComponentsChannelLogoScalable : public CComponentsChannelLogo fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK) : CComponentsChannelLogo(x_pos, y_pos, 0, 0, channelName, channelId, parent, shadow_mode, color_frame, color_background, color_shadow, transparent) - {cc_item_type = CC_ITEMTYPE_CHANNEL_LOGO_SCALABLE;}; + { + cc_item_type.id = CC_ITEMTYPE_CHANNEL_LOGO_SCALABLE; + cc_item_type.name = "cc_scalable_channellogo_box"; + }; }; #endif diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index e61454638..4b2b90f6b 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -58,7 +58,8 @@ CProgressBar::CProgressBar( const int x_pos, CComponentsForm *parent) { //CComponentsItem - cc_item_type = CC_ITEMTYPE_PROGRESSBAR; + cc_item_type.id = CC_ITEMTYPE_PROGRESSBAR; + cc_item_type.name ="cc_progressbar"; //CComponents x = x_old = x_pos; diff --git a/src/gui/components/cc_item_shapes.cpp b/src/gui/components/cc_item_shapes.cpp index 66b4be5e9..f2fef094a 100644 --- a/src/gui/components/cc_item_shapes.cpp +++ b/src/gui/components/cc_item_shapes.cpp @@ -41,7 +41,8 @@ CComponentsShapeSquare::CComponentsShapeSquare( const int x_pos, const int y_pos fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { //CComponentsItem - cc_item_type = CC_ITEMTYPE_SHAPE_SQUARE; + cc_item_type.id = CC_ITEMTYPE_SHAPE_SQUARE; + cc_item_type.name ="cc_box"; x = x_old = x_pos; y = y_old = y_pos; @@ -69,7 +70,8 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { //CComponents, CComponentsItem - cc_item_type = CC_ITEMTYPE_SHAPE_CIRCLE; + cc_item_type.id = CC_ITEMTYPE_SHAPE_CIRCLE; + cc_item_type.name ="cc_circle"; //CComponents x = x_pos; diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 4ca37258c..1ee1df66c 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -80,7 +80,9 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w int shadow_mode, fb_pixel_t color_text, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_item_type = CC_ITEMTYPE_TEXT; + cc_item_type.id = CC_ITEMTYPE_TEXT; + cc_item_type.name ="cc_text_box"; + ct_font = font_text; ct_textbox = NULL; ct_text = text; diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 8f716dc0b..a557cb14f 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -277,7 +277,8 @@ class CComponentsLabel : public CComponentsText fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsText(x_pos, y_pos, w, h, text, mode, font_text, font_style, parent, shadow_mode, color_text, color_frame, color_body, color_shadow) { - cc_item_type = CC_ITEMTYPE_LABEL; + cc_item_type.id = CC_ITEMTYPE_LABEL; + cc_item_type.name ="cc_label_box"; }; CComponentsLabel( CComponentsForm *parent, @@ -293,7 +294,8 @@ class CComponentsLabel : public CComponentsText fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsText(x_pos, y_pos, w, h, text, mode, font_text, font_style, parent, shadow_mode, color_text, color_frame, color_body, color_shadow) { - cc_item_type = CC_ITEMTYPE_LABEL; + cc_item_type.id = CC_ITEMTYPE_LABEL; + cc_item_type.name ="cc_label_box"; }; }; diff --git a/src/gui/components/cc_item_tvpic.cpp b/src/gui/components/cc_item_tvpic.cpp index e682a5cd4..36418ed93 100644 --- a/src/gui/components/cc_item_tvpic.cpp +++ b/src/gui/components/cc_item_tvpic.cpp @@ -46,7 +46,8 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { //CComponents, CComponentsItem - cc_item_type = CC_ITEMTYPE_PIP; + cc_item_type.id = CC_ITEMTYPE_PIP; + cc_item_type.name ="cc_pip_box"; //CComponentsPIP screen_w = frameBuffer->getScreenWidth(true); diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index 3c32c0275..4e929c660 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -37,6 +37,12 @@ class CComponentsScrollBar; class CCButtonSelect; ///cc item types +typedef struct cc_type_t +{ + int id; + std::string name; +} cc_type_struct_t; + typedef enum { CC_ITEMTYPE_GENERIC, @@ -57,6 +63,7 @@ typedef enum CC_ITEMTYPE_FOOTER, CC_ITEMTYPE_FRM_ICONFORM, CC_ITEMTYPE_FRM_WINDOW, + CC_ITEMTYPE_FRM_WINDOW_MAX, CC_ITEMTYPE_FRM_EXT_TEXT, CC_ITEMTYPE_LABEL, CC_ITEMTYPE_PROGRESSBAR, diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 59ca8e831..e4a4f65f9 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -46,6 +46,7 @@ CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1 tmp_mode = MODE_HIDE; m_restore = false; mp_time_forced = false; + cc_item_type.name = "time_osd_box"; Init(); }