mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-28 04:46:26 +02:00
The ButtonBox now features a clear() function which empties the list of buttons.
This commit is contained in:
parent
6ac012348d
commit
fdee206d93
@ -10,8 +10,7 @@ ButtonBox::ButtonBox(GMenu2X *gmenu2x) : gmenu2x(gmenu2x)
|
|||||||
|
|
||||||
ButtonBox::~ButtonBox()
|
ButtonBox::~ButtonBox()
|
||||||
{
|
{
|
||||||
for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
|
clear();
|
||||||
delete *it;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonBox::add(Button *button)
|
void ButtonBox::add(Button *button)
|
||||||
@ -19,6 +18,11 @@ void ButtonBox::add(Button *button)
|
|||||||
buttons.push_back(button);
|
buttons.push_back(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ButtonBox::clear()
|
||||||
|
{
|
||||||
|
buttons.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void ButtonBox::paint(unsigned int posX)
|
void ButtonBox::paint(unsigned int posX)
|
||||||
{
|
{
|
||||||
for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
|
for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
|
||||||
|
@ -13,6 +13,7 @@ public:
|
|||||||
~ButtonBox();
|
~ButtonBox();
|
||||||
|
|
||||||
void add(Button *button);
|
void add(Button *button);
|
||||||
|
void clear();
|
||||||
|
|
||||||
void paint(unsigned int posX);
|
void paint(unsigned int posX);
|
||||||
void handleTS();
|
void handleTS();
|
||||||
|
Loading…
Reference in New Issue
Block a user