1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-27 12:18:57 +02:00

The ButtonBox now features a clear() function which empties the list of buttons.

This commit is contained in:
Ayla 2011-09-15 20:12:02 +02:00
parent 6ac012348d
commit fdee206d93
2 changed files with 7 additions and 2 deletions

View File

@ -10,8 +10,7 @@ ButtonBox::ButtonBox(GMenu2X *gmenu2x) : gmenu2x(gmenu2x)
ButtonBox::~ButtonBox()
{
for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
delete *it;
clear();
}
void ButtonBox::add(Button *button)
@ -19,6 +18,11 @@ void ButtonBox::add(Button *button)
buttons.push_back(button);
}
void ButtonBox::clear()
{
buttons.clear();
}
void ButtonBox::paint(unsigned int posX)
{
for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)

View File

@ -13,6 +13,7 @@ public:
~ButtonBox();
void add(Button *button);
void clear();
void paint(unsigned int posX);
void handleTS();