mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-10-04 02:47:37 +03:00
37 lines
582 B
C++
37 lines
582 B
C++
|
|
#include "button.h"
|
|
#include "gmenu2x.h"
|
|
|
|
#include "buttonbox.h"
|
|
|
|
ButtonBox::ButtonBox(GMenu2X *gmenu2x) : gmenu2x(gmenu2x)
|
|
{
|
|
}
|
|
|
|
ButtonBox::~ButtonBox()
|
|
{
|
|
clear();
|
|
}
|
|
|
|
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)
|
|
posX = gmenu2x->drawButton(*it, posX);
|
|
}
|
|
|
|
void ButtonBox::handleTS()
|
|
{
|
|
for (ButtonList::iterator it = buttons.begin(); it != buttons.end(); ++it)
|
|
(*it)->handleTS();
|
|
}
|