cc_item: add signsl OnBeforePaintInit()

This commit is contained in:
2022-01-13 19:35:11 +01:00
parent 9ed525d199
commit 3eaa88141f
2 changed files with 5 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ void CComponentsItem::initParent(CComponentsForm* parent)
// If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this! // If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this!
void CComponentsItem::paintInit(const bool &do_save_bg) void CComponentsItem::paintInit(const bool &do_save_bg)
{ {
OnBeforePaintInit();
if (cc_parent) if (cc_parent)
{ //use defined background color and background images in dependency of focus mode { //use defined background color and background images in dependency of focus mode
if (cc_parent->hasFocus()){ if (cc_parent->hasFocus()){

View File

@@ -161,6 +161,9 @@ class CComponentsItem : public CComponents
void setHeightP(const uint8_t& h_percent); void setHeightP(const uint8_t& h_percent);
///set item width, parameter as uint8_t, as percent value related to current width of parent form or screen ///set item width, parameter as uint8_t, as percent value related to current width of parent form or screen
void setWidthP(const uint8_t& w_percent); void setWidthP(const uint8_t& w_percent);
///signal on before init fb layers, called before init fb layers inside paintInit()
sigc::signal<void> OnBeforePaintInit;
}; };
#endif #endif