1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-02 18:32:20 +03:00
gmenu2x/src/buttonbox.cpp

37 lines
582 B
C++
Raw Normal View History

#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();
}