mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
CComponentsFooter: use chain object in global scope of class
This commit is contained in:
@@ -84,6 +84,7 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const
|
|||||||
|
|
||||||
btn_contour = false;
|
btn_contour = false;
|
||||||
ccf_btn_font = NULL;
|
ccf_btn_font = NULL;
|
||||||
|
chain = NULL;
|
||||||
|
|
||||||
addContextButton(buttons);
|
addContextButton(buttons);
|
||||||
initCCItems();
|
initCCItems();
|
||||||
@@ -114,8 +115,12 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont
|
|||||||
//initialize container (chain object) as button label container: this contains all passed (as interleaved) button label items, with this container we can work inside
|
//initialize container (chain object) as button label container: this contains all passed (as interleaved) button label items, with this container we can work inside
|
||||||
//footer as primary container (in this context '=this') and the parent for the button label container (chain object),
|
//footer as primary container (in this context '=this') and the parent for the button label container (chain object),
|
||||||
//button label container (chain object) itself is concurrent the parent object for button objects.
|
//button label container (chain object) itself is concurrent the parent object for button objects.
|
||||||
CComponentsFrmChain *chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this);
|
if (chain == NULL){
|
||||||
chain->doPaintBg(false);
|
chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this);
|
||||||
|
chain->doPaintBg(false);
|
||||||
|
}
|
||||||
|
if (!chain->empty())
|
||||||
|
chain->clear();
|
||||||
|
|
||||||
//calculate default static width of button labels inside button object container related to available width of chain object
|
//calculate default static width of button labels inside button object container related to available width of chain object
|
||||||
int w_btn_fix = chain->getWidth() / label_count;
|
int w_btn_fix = chain->getWidth() / label_count;
|
||||||
|
@@ -63,8 +63,10 @@ class CComponentsFooter : public CComponentsHeader
|
|||||||
///property: set font for label caption, see also setButtonFont()
|
///property: set font for label caption, see also setButtonFont()
|
||||||
Font* ccf_btn_font;
|
Font* ccf_btn_font;
|
||||||
|
|
||||||
|
///container for button objects
|
||||||
|
CComponentsFrmChain *chain;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CComponentsFooter(CComponentsForm *parent = NULL);
|
CComponentsFooter(CComponentsForm *parent = NULL);
|
||||||
CComponentsFooter( const int& x_pos, const int& y_pos, const int& w, const int& h = 0,
|
CComponentsFooter( const int& x_pos, const int& y_pos, const int& w, const int& h = 0,
|
||||||
const int& buttons = 0,
|
const int& buttons = 0,
|
||||||
|
Reference in New Issue
Block a user