mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
components: use const bool& parameter in paint methodes
This commit is contained in:
@@ -88,7 +88,7 @@ CComponentsDetailsLine::~CComponentsDetailsLine()
|
|||||||
|
|
||||||
|
|
||||||
//paint details line with current parameters
|
//paint details line with current parameters
|
||||||
void CComponentsDetailsLine::paint(bool do_save_bg)
|
void CComponentsDetailsLine::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
if (hasChanges())
|
if (hasChanges())
|
||||||
|
@@ -77,7 +77,7 @@ class CComponentsDetailsLine : public CComponents
|
|||||||
void setLineWidth(const int& w){dl_w = w;}
|
void setLineWidth(const int& w){dl_w = w;}
|
||||||
|
|
||||||
///paint all to screen
|
///paint all to screen
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -498,7 +498,7 @@ void CCDraw::enablePaintCache(bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//paint framebuffer layers
|
//paint framebuffer layers
|
||||||
void CCDraw::paintFbItems(bool do_save_bg)
|
void CCDraw::paintFbItems(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//Pick up signal if filled and execute slots.
|
//Pick up signal if filled and execute slots.
|
||||||
OnBeforePaintLayers();
|
OnBeforePaintLayers();
|
||||||
|
@@ -156,7 +156,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
|||||||
///rendering of framebuffer elements at once,
|
///rendering of framebuffer elements at once,
|
||||||
///elements are contained in v_fbdata, presumes added frambuffer elements with paintInit(),
|
///elements are contained in v_fbdata, presumes added frambuffer elements with paintInit(),
|
||||||
///parameter do_save_bg=true, saves background of element to pixel buffer, this can be restore with hide()
|
///parameter do_save_bg=true, saves background of element to pixel buffer, this can be restore with hide()
|
||||||
void paintFbItems(bool do_save_bg = true);
|
void paintFbItems(const bool &do_save_bg = true);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///basic component class constructor.
|
///basic component class constructor.
|
||||||
@@ -306,7 +306,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
|||||||
int getColBodyGradientMode(){return cc_body_gradient_enable;}
|
int getColBodyGradientMode(){return cc_body_gradient_enable;}
|
||||||
|
|
||||||
///abstract: paint item, arg: do_save_bg see paintInit() above
|
///abstract: paint item, arg: do_save_bg see paintInit() above
|
||||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0;
|
virtual void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES) = 0;
|
||||||
///paint item, same like paint(CC_SAVE_SCREEN_NO) but without any argument
|
///paint item, same like paint(CC_SAVE_SCREEN_NO) but without any argument
|
||||||
void paint0(){paint(CC_SAVE_SCREEN_NO);}
|
void paint0(){paint(CC_SAVE_SCREEN_NO);}
|
||||||
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
|
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
|
||||||
|
@@ -341,7 +341,7 @@ void CComponentsForm::exchangeCCItem(CComponentsItem* item_a, CComponentsItem* i
|
|||||||
exchangeCCItem(getCCItemId(item_a), getCCItemId(item_b));
|
exchangeCCItem(getCCItemId(item_a), getCCItemId(item_b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsForm::paintForm(bool do_save_bg)
|
void CComponentsForm::paintForm(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//paint body
|
//paint body
|
||||||
if (!is_painted || force_paint_bg || shadow_force)
|
if (!is_painted || force_paint_bg || shadow_force)
|
||||||
@@ -351,7 +351,7 @@ void CComponentsForm::paintForm(bool do_save_bg)
|
|||||||
paintCCItems();
|
paintCCItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsForm::paint(bool do_save_bg)
|
void CComponentsForm::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if(is_painted)
|
if(is_painted)
|
||||||
OnBeforeRePaint();
|
OnBeforeRePaint();
|
||||||
@@ -368,7 +368,7 @@ bool CComponentsForm::isPageChanged()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsForm::paintPage(const uint8_t& page_number, bool do_save_bg)
|
void CComponentsForm::paintPage(const uint8_t& page_number, const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
cur_page = page_number;
|
cur_page = page_number;
|
||||||
paint(do_save_bg);
|
paint(do_save_bg);
|
||||||
@@ -724,3 +724,4 @@ int CComponentsForm::getUsedDX()
|
|||||||
|
|
||||||
return x_res;
|
return x_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@ class CComponentsForm : public CComponentsItem
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
std::vector<CComponentsItem*> v_cc_items;
|
std::vector<CComponentsItem*> v_cc_items;
|
||||||
void paintForm(bool do_save_bg);
|
void paintForm(const bool &do_save_bg);
|
||||||
///generates next possible index for an item, see also cc_item_index, getIndex(), setIndex()
|
///generates next possible index for an item, see also cc_item_index, getIndex(), setIndex()
|
||||||
int genIndex();
|
int genIndex();
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ class CComponentsForm : public CComponentsItem
|
|||||||
virtual ~CComponentsForm();
|
virtual ~CComponentsForm();
|
||||||
|
|
||||||
///paints current form on screen, for paint a page use paintPage()
|
///paints current form on screen, for paint a page use paintPage()
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
///same like CComponentsItem::kill(), but erases all embedded items inside of parent at once, this = parent
|
///same like CComponentsItem::kill(), but erases all embedded items inside of parent at once, this = parent
|
||||||
///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!
|
||||||
@@ -170,7 +170,7 @@ class CComponentsForm : public CComponentsItem
|
|||||||
///get current page
|
///get current page
|
||||||
uint8_t getCurrentPage(){return cur_page;};
|
uint8_t getCurrentPage(){return cur_page;};
|
||||||
///paint defined page number 0...n
|
///paint defined page number 0...n
|
||||||
void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO);
|
void paintPage(const uint8_t& page_number, const bool &do_save_bg = CC_SAVE_SCREEN_NO);
|
||||||
///enum page scroll modes
|
///enum page scroll modes
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@@ -288,7 +288,7 @@ void CComponentsButton::initCCBtnItems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CComponentsButton::paint(bool do_save_bg)
|
void CComponentsButton::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items before paint
|
//prepare items before paint
|
||||||
initCCBtnItems();
|
initCCBtnItems();
|
||||||
|
@@ -173,7 +173,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen
|
|||||||
void Refresh(){initCCBtnItems();};
|
void Refresh(){initCCBtnItems();};
|
||||||
|
|
||||||
///paint button object
|
///paint button object
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns a single event msg value to button object
|
* Assigns a single event msg value to button object
|
||||||
|
@@ -381,7 +381,7 @@ bool CComponentsFrmClock::Stop()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsFrmClock::paint(bool do_save_bg)
|
void CComponentsFrmClock::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items before paint
|
//prepare items before paint
|
||||||
initCCLockItems();
|
initCCLockItems();
|
||||||
|
@@ -159,7 +159,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
|
|||||||
void setClockInterval(const int& seconds){cl_interval = seconds;}
|
void setClockInterval(const int& seconds){cl_interval = seconds;}
|
||||||
|
|
||||||
///show clock on screen
|
///show clock on screen
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
///hide clock on screen
|
///hide clock on screen
|
||||||
void hide(){Stop(); CComponentsForm::hide();}
|
void hide(){Stop(); CComponentsForm::hide();}
|
||||||
///does the same like kill() from base class, but stopping clock before kill
|
///does the same like kill() from base class, but stopping clock before kill
|
||||||
|
@@ -229,7 +229,7 @@ void CComponentsExtTextForm::setLabelWidthPercent(const uint8_t& percent_val)
|
|||||||
initCCTextItems();
|
initCCTextItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsExtTextForm::paint(bool do_save_bg)
|
void CComponentsExtTextForm::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items before paint
|
//prepare items before paint
|
||||||
initCCTextItems();
|
initCCTextItems();
|
||||||
|
@@ -152,7 +152,7 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen
|
|||||||
Font* getFont(){return ccx_font;}
|
Font* getFont(){return ccx_font;}
|
||||||
|
|
||||||
///paint this item/form
|
///paint this item/form
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -381,7 +381,7 @@ void CComponentsFooter::paintButtons(const int& x_pos,
|
|||||||
const int& label_width,
|
const int& label_width,
|
||||||
const int& context_buttons,
|
const int& context_buttons,
|
||||||
Font* font,
|
Font* font,
|
||||||
bool do_save_bg)
|
const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
this->setDimensionsAll(x_pos, y_pos, w, h);
|
this->setDimensionsAll(x_pos, y_pos, w, h);
|
||||||
this->setButtonFont(font);
|
this->setButtonFont(font);
|
||||||
|
@@ -143,7 +143,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect
|
|||||||
const int& label_width = 0,
|
const int& label_width = 0,
|
||||||
const int& context_buttons = 0,
|
const int& context_buttons = 0,
|
||||||
Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT],
|
Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT],
|
||||||
bool do_save_bg = CC_SAVE_SCREEN_NO
|
const bool &do_save_bg = CC_SAVE_SCREEN_NO
|
||||||
);
|
);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@@ -707,7 +707,7 @@ void CComponentsHeader::initCCItems()
|
|||||||
initLogo();
|
initLogo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsHeader::paint(bool do_save_bg)
|
void CComponentsHeader::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items
|
//prepare items
|
||||||
initCCItems();
|
initCCItems();
|
||||||
|
@@ -328,7 +328,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
|||||||
void disableClock();
|
void disableClock();
|
||||||
|
|
||||||
///paint header
|
///paint header
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const 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(); CComponentsForm::hide();}
|
void hide(){disableClock(); CComponentsForm::hide();}
|
||||||
|
@@ -233,7 +233,7 @@ void CSignalBar::paintScale()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSignalBar::paint(bool do_save_bg)
|
void CSignalBar::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//initialize before and paint frame and body
|
//initialize before and paint frame and body
|
||||||
if (!is_painted){
|
if (!is_painted){
|
||||||
@@ -353,7 +353,7 @@ void CSignalBox::paintScale()
|
|||||||
snrbar->paint/*Scale*/(false);
|
snrbar->paint/*Scale*/(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSignalBox::paint(bool do_save_bg)
|
void CSignalBox::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//paint frame and body
|
//paint frame and body
|
||||||
if (!is_painted)
|
if (!is_painted)
|
||||||
|
@@ -146,7 +146,7 @@ class CSignalBar : public CComponentsForm, public CCTextScreen
|
|||||||
virtual int getScaleWidth(){ return sb_scale_width;};
|
virtual int getScaleWidth(){ return sb_scale_width;};
|
||||||
|
|
||||||
///paint this items
|
///paint this items
|
||||||
virtual void paint(bool do_save_bg);
|
virtual void paint(const bool &do_save_bg);
|
||||||
|
|
||||||
//returns the current signal value
|
//returns the current signal value
|
||||||
uint16_t getValue(void) { return sb_signal; }
|
uint16_t getValue(void) { return sb_signal; }
|
||||||
@@ -329,7 +329,7 @@ class CSignalBox : public CComponentsForm, public CCTextScreen
|
|||||||
fb_pixel_t getPassiveColor(){return sbx_passive_color;};
|
fb_pixel_t getPassiveColor(){return sbx_passive_color;};
|
||||||
|
|
||||||
///paint items
|
///paint items
|
||||||
void paint(bool do_save_bg);
|
void paint(const bool &do_save_bg);
|
||||||
|
|
||||||
///return current signal value
|
///return current signal value
|
||||||
uint16_t getSignalValue(void) { return sbar->getValue();}
|
uint16_t getSignalValue(void) { return sbar->getValue();}
|
||||||
|
@@ -157,7 +157,7 @@ void CComponentsSlider::setSliderIcon(const std::string &icon_name)
|
|||||||
initCCSlSlider();
|
initCCSlSlider();
|
||||||
}
|
}
|
||||||
|
|
||||||
// void CComponentsSlider::paint(bool do_save_bg)
|
// void CComponentsSlider::paint(const bool &do_save_bg)
|
||||||
// {
|
// {
|
||||||
// //prepare items before paint
|
// //prepare items before paint
|
||||||
// initCCSlItems();
|
// initCCSlItems();
|
||||||
|
@@ -76,7 +76,7 @@ class CComponentsSlider : public CComponentsForm
|
|||||||
void setValueScale(const int& min_value, const int& max_value);
|
void setValueScale(const int& min_value, const int& max_value);
|
||||||
void setSliderIcon(const std::string &icon_name);
|
void setSliderIcon(const std::string &icon_name);
|
||||||
|
|
||||||
// void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
// void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -432,7 +432,7 @@ void CComponentsWindow::enablePageScroll(const int& mode)
|
|||||||
ccw_body->enablePageScroll(mode);
|
ccw_body->enablePageScroll(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsWindow::paintCurPage(bool do_save_bg)
|
void CComponentsWindow::paintCurPage(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if (is_painted) //ensure that we have painted already the parent form before paint body
|
if (is_painted) //ensure that we have painted already the parent form before paint body
|
||||||
ccw_body->paint(do_save_bg);
|
ccw_body->paint(do_save_bg);
|
||||||
@@ -440,13 +440,13 @@ void CComponentsWindow::paintCurPage(bool do_save_bg)
|
|||||||
paint(do_save_bg);
|
paint(do_save_bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsWindow::paintPage(const uint8_t& page_number, bool do_save_bg)
|
void CComponentsWindow::paintPage(const uint8_t& page_number, const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
CComponentsWindow::setCurrentPage(page_number);
|
CComponentsWindow::setCurrentPage(page_number);
|
||||||
CComponentsWindow::paintCurPage(do_save_bg);
|
CComponentsWindow::paintCurPage(do_save_bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsWindow::paint(bool do_save_bg)
|
void CComponentsWindow::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items before paint
|
//prepare items before paint
|
||||||
initCCWItems();
|
initCCWItems();
|
||||||
|
@@ -385,7 +385,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
|
|||||||
* @param[in] do_save_bg
|
* @param[in] do_save_bg
|
||||||
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
|
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
|
||||||
*/
|
*/
|
||||||
void paintCurPage(bool do_save_bg = CC_SAVE_SCREEN_NO);
|
void paintCurPage(const bool &do_save_bg = CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paints defined page of body, parameter number 0...n
|
* Paints defined page of body, parameter number 0...n
|
||||||
@@ -394,7 +394,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
|
|||||||
* @param[in] do_save_bg
|
* @param[in] do_save_bg
|
||||||
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
|
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
|
||||||
*/
|
*/
|
||||||
void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO);
|
void paintPage(const uint8_t& page_number, const bool &do_save_bg = CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enable/disable page scroll
|
* enable/disable page scroll
|
||||||
@@ -420,7 +420,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
|
|||||||
* @param[in] do_save_bg
|
* @param[in] do_save_bg
|
||||||
* @li optional: expects type bool, sets background save mode
|
* @li optional: expects type bool, sets background save mode
|
||||||
*/
|
*/
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
|
* Adds an additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
|
||||||
|
@@ -65,7 +65,7 @@ void CComponentsItem::initParent(CComponentsForm* parent)
|
|||||||
// init container properties in cc-items for shadow, background and frame.
|
// init container properties in cc-items for shadow, background and frame.
|
||||||
// This member must be called first in all paint() members before paint other items into the container.
|
// This member must be called first in all paint() members before paint other items into the container.
|
||||||
// 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(bool do_save_bg)
|
void CComponentsItem::paintInit(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if (hasChanges()){
|
if (hasChanges()){
|
||||||
clearFbData();
|
clearFbData();
|
||||||
|
@@ -59,7 +59,7 @@ class CComponentsItem : public CComponents
|
|||||||
///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!
|
||||||
///arg do_save_bg=false avoids using of unnecessary pixel memory, eg. if no hide with restore is provided. This is mostly the case whenever
|
///arg do_save_bg=false avoids using of unnecessary pixel memory, eg. if no hide with restore is provided. This is mostly the case whenever
|
||||||
///an item will be hide or overpainted with other methods, or it's embedded (bound) in a parent form.
|
///an item will be hide or overpainted with other methods, or it's embedded (bound) in a parent form.
|
||||||
void paintInit(bool do_save_bg);
|
void paintInit(const bool &do_save_bg);
|
||||||
|
|
||||||
///add "this" current item to parent
|
///add "this" current item to parent
|
||||||
void initParent(CComponentsForm* parent);
|
void initParent(CComponentsForm* parent);
|
||||||
|
@@ -138,7 +138,7 @@ void CComponentsInfoBox::paintPicture()
|
|||||||
pic->paint(CC_SAVE_SCREEN_NO);
|
pic->paint(CC_SAVE_SCREEN_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsInfoBox::paint(bool do_save_bg)
|
void CComponentsInfoBox::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
paintPicture();
|
paintPicture();
|
||||||
|
@@ -88,7 +88,7 @@ class CComponentsInfoBox : public CComponentsText
|
|||||||
///retur internal picture object
|
///retur internal picture object
|
||||||
CComponentsPicture * getPictureObject(){return pic;}
|
CComponentsPicture * getPictureObject(){return pic;}
|
||||||
///paint item
|
///paint item
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -343,7 +343,7 @@ void CComponentsPicture::paintPicture()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsPicture::paint(bool do_save_bg)
|
void CComponentsPicture::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if (pic_name.empty())
|
if (pic_name.empty())
|
||||||
return;
|
return;
|
||||||
|
@@ -179,7 +179,7 @@ class CComponentsPicture : public CComponentsItem
|
|||||||
void SetTransparent(int t){ image_transparent = t; }
|
void SetTransparent(int t){ image_transparent = t; }
|
||||||
|
|
||||||
///paint item
|
///paint item
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
///hide item, see also CComponents::hide();
|
///hide item, see also CComponents::hide();
|
||||||
void hide();
|
void hide();
|
||||||
|
|
||||||
|
@@ -371,7 +371,7 @@ void CProgressBarCache::pbcApplyGradient(fb_pixel_t *b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProgressBar::paintProgress(bool do_save_bg)
|
void CProgressBar::paintProgress(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if (*pb_design == PB_OFF) {
|
if (*pb_design == PB_OFF) {
|
||||||
paintInit(false);
|
paintInit(false);
|
||||||
@@ -416,7 +416,7 @@ void CProgressBar::paintProgress(bool do_save_bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CProgressBar::paint(bool do_save_bg)
|
void CProgressBar::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
paintProgress(do_save_bg);
|
paintProgress(do_save_bg);
|
||||||
}
|
}
|
||||||
|
@@ -150,7 +150,7 @@ class CProgressBar : public CComponentsItem
|
|||||||
void initDimensions();
|
void initDimensions();
|
||||||
|
|
||||||
///paints graph
|
///paints graph
|
||||||
void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO);
|
void paintProgress(const bool &do_save_bg = CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///parameters:
|
///parameters:
|
||||||
@@ -198,7 +198,7 @@ class CProgressBar : public CComponentsItem
|
|||||||
|
|
||||||
///force update on next paint
|
///force update on next paint
|
||||||
void reset() { pb_last_width = -1; }
|
void reset() { pb_last_width = -1; }
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_NO);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
enum pb_color_t {
|
enum pb_color_t {
|
||||||
PB_OFF = -2, /* -2 */
|
PB_OFF = -2, /* -2 */
|
||||||
|
@@ -56,7 +56,7 @@ CComponentsShapeSquare::CComponentsShapeSquare( const int x_pos, const int y_pos
|
|||||||
initParent(parent);
|
initParent(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsShapeSquare::paint(bool do_save_bg)
|
void CComponentsShapeSquare::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
|
|||||||
//
|
//
|
||||||
// + - +
|
// + - +
|
||||||
|
|
||||||
void CComponentsShapeCircle::paint(bool do_save_bg)
|
void CComponentsShapeCircle::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ class CComponentsShapeCircle : public CComponentsItem
|
|||||||
inline int getDiam() const {return d;};
|
inline int getDiam() const {return d;};
|
||||||
|
|
||||||
///paint item
|
///paint item
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CComponentsShapeSquare : public CComponentsItem
|
class CComponentsShapeSquare : public CComponentsItem
|
||||||
@@ -70,7 +70,7 @@ class CComponentsShapeSquare : public CComponentsItem
|
|||||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
||||||
|
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -278,7 +278,7 @@ bool CComponentsText::setTextFromFile(const string& path_to_textfile, const int
|
|||||||
return setText(txt, mode, font_text, color_text, style);
|
return setText(txt, mode, font_text, color_text, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsText::paintText(bool do_save_bg)
|
void CComponentsText::paintText(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
if (cc_parent){
|
if (cc_parent){
|
||||||
if(!cc_parent->OnAfterPaintBg.empty())
|
if(!cc_parent->OnAfterPaintBg.empty())
|
||||||
@@ -300,7 +300,7 @@ void CComponentsText::paintText(bool do_save_bg)
|
|||||||
ct_text_sent = false;
|
ct_text_sent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsText::paint(bool do_save_bg)
|
void CComponentsText::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
OnBeforePaint();
|
OnBeforePaint();
|
||||||
paintText(do_save_bg);
|
paintText(do_save_bg);
|
||||||
|
@@ -96,7 +96,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem
|
|||||||
void initCBox();
|
void initCBox();
|
||||||
|
|
||||||
///paint CCItem backckrond (if paint_bg=true), apply initCCText() and send paint() to the CTextBox object
|
///paint CCItem backckrond (if paint_bg=true), apply initCCText() and send paint() to the CTextBox object
|
||||||
void paintText(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paintText(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
FONT_STYLE_REGULAR = 0,
|
FONT_STYLE_REGULAR = 0,
|
||||||
@@ -136,7 +136,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem
|
|||||||
///remove textbox from screen
|
///remove textbox from screen
|
||||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES);
|
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES);
|
||||||
///paint text box, parameter do_save_bg: default = true, causes fill of backckrond pixel buffer
|
///paint text box, parameter do_save_bg: default = true, causes fill of backckrond pixel buffer
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
///send options for text font (size and type), color and mode (allignment)
|
///send options for text font (size and type), color and mode (allignment)
|
||||||
void setTextFont(Font* font_text);
|
void setTextFont(Font* font_text);
|
||||||
|
@@ -77,7 +77,7 @@ CComponentsPIP::~CComponentsPIP()
|
|||||||
// videoDecoder->Pig(-1, -1, -1, -1);
|
// videoDecoder->Pig(-1, -1, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsPIP::paint(bool do_save_bg)
|
void CComponentsPIP::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//NOTE: real values are reqiured, if we paint not bound items or an own render methodes
|
//NOTE: real values are reqiured, if we paint not bound items or an own render methodes
|
||||||
int pig_x = (cc_parent ? cc_xr : x) + fr_thickness;
|
int pig_x = (cc_parent ? cc_xr : x) + fr_thickness;
|
||||||
|
@@ -65,7 +65,7 @@ class CComponentsPIP : public CComponentsItem
|
|||||||
void setPicture(const std::string& image){pic_name = image;};
|
void setPicture(const std::string& image){pic_name = image;};
|
||||||
|
|
||||||
///show tv box
|
///show tv box
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
///remove tv box from screen
|
///remove tv box from screen
|
||||||
void hide();
|
void hide();
|
||||||
};
|
};
|
||||||
|
@@ -247,7 +247,7 @@ void CVolumeBar::paintVolScale()
|
|||||||
vb_pb->paint(CC_SAVE_SCREEN_NO);
|
vb_pb->paint(CC_SAVE_SCREEN_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVolumeBar::paint(bool do_save_bg)
|
void CVolumeBar::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
//prepare items
|
//prepare items
|
||||||
initVolumeBarItems();
|
initVolumeBarItems();
|
||||||
|
@@ -89,7 +89,7 @@ class CVolumeBar : public CComponentsForm
|
|||||||
// ~CVolumeBar(); inherited from CComponentsForm
|
// ~CVolumeBar(); inherited from CComponentsForm
|
||||||
|
|
||||||
void repaintVolScale();
|
void repaintVolScale();
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ public:
|
|||||||
const char* Icon = NEUTRINO_ICON_INFO);
|
const char* Icon = NEUTRINO_ICON_INFO);
|
||||||
|
|
||||||
///show = paint, for compatibility
|
///show = paint, for compatibility
|
||||||
void show(bool do_save_bg = true){ paint(do_save_bg) ;}
|
void show(const bool &do_save_bg = true){ paint(do_save_bg) ;}
|
||||||
|
|
||||||
|
|
||||||
/**Adds an item with pre defined text
|
/**Adds an item with pre defined text
|
||||||
|
@@ -115,7 +115,7 @@ void CNaviBar::initCCItems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CNaviBar::paint(bool do_save_bg)
|
void CNaviBar::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
hideCCItems();
|
hideCCItems();
|
||||||
nb_lText->hide();
|
nb_lText->hide();
|
||||||
|
@@ -162,7 +162,7 @@ class CNaviBar : public CComponentsFrmChain
|
|||||||
* @param[in] do_save_bg
|
* @param[in] do_save_bg
|
||||||
* @li optional: expects type bool, default = CC_SAVE_SCREEN_YES.
|
* @li optional: expects type bool, default = CC_SAVE_SCREEN_YES.
|
||||||
*/
|
*/
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -211,7 +211,7 @@ int CProgressWindow::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProgressWindow::paint(bool do_save_bg)
|
void CProgressWindow::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
fitItems();
|
fitItems();
|
||||||
CComponentsWindow::paint(do_save_bg);
|
CComponentsWindow::paint(do_save_bg);
|
||||||
|
@@ -285,7 +285,7 @@ class CProgressWindow : public CComponentsWindow, public CMenuTarget
|
|||||||
* @param[in] do_save_bg
|
* @param[in] do_save_bg
|
||||||
* @li optional: expects type bool, sets background save mode
|
* @li optional: expects type bool, sets background save mode
|
||||||
*/
|
*/
|
||||||
void paint(bool do_save_bg = true);
|
void paint(const bool &do_save_bg = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CProgressSignals : public sigc::trackable
|
class CProgressSignals : public sigc::trackable
|
||||||
|
Reference in New Issue
Block a user