mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsForm: add member hideCCItems()
In case of items with cached background it is useful to have possibility to restore their background. (eg. items are painted outside of form).
This commit is contained in:
@@ -532,6 +532,12 @@ void CComponentsForm::killCCItems(const fb_pixel_t& bg_color, bool ignore_parent
|
|||||||
v_cc_items[i]->kill(bg_color, ignore_parent);
|
v_cc_items[i]->kill(bg_color, ignore_parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsForm::hideCCItems()
|
||||||
|
{
|
||||||
|
for(size_t i=0; i<v_cc_items.size(); i++)
|
||||||
|
v_cc_items[i]->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsForm::setPageCount(const u_int8_t& pageCount)
|
void CComponentsForm::setPageCount(const u_int8_t& pageCount)
|
||||||
{
|
{
|
||||||
u_int8_t new_val = pageCount;
|
u_int8_t new_val = pageCount;
|
||||||
|
@@ -81,6 +81,16 @@ class CComponentsForm : public CComponentsItem
|
|||||||
///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color!
|
///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color!
|
||||||
virtual void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent);
|
virtual void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Removes possible contained items and finally removes
|
||||||
|
current form from screen and
|
||||||
|
restores last displayed background before form was painted.
|
||||||
|
*/
|
||||||
|
void hide(){hideCCItems(); CCDraw::hide();}
|
||||||
|
|
||||||
|
///restore background for all items inside form,
|
||||||
|
void hideCCItems();
|
||||||
|
|
||||||
///add an item to form collection, returns id
|
///add an item to form collection, returns id
|
||||||
virtual int addCCItem(CComponentsItem* cc_Item);
|
virtual int addCCItem(CComponentsItem* cc_Item);
|
||||||
///add items from a vector to form collection, returns size/count of items
|
///add items from a vector to form collection, returns size/count of items
|
||||||
|
@@ -299,7 +299,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
|
|||||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
///hides item, arg: no_restore see hideCCItem()
|
///hides item, arg: no_restore see hideCCItem()
|
||||||
void hide(){disableClock(); CComponents::hide();}
|
void hide(){disableClock(); CComponentsForm::hide();}
|
||||||
///erase current screen without restore of background, it's similar to paintBackgroundBoxRel() from CFrameBuffer
|
///erase current screen without restore of background, it's similar to paintBackgroundBoxRel() from CFrameBuffer
|
||||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES, bool disable_clock = true);
|
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES, bool disable_clock = true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user