Root/
| 1 | |
| 2 | #include "button.h" |
| 3 | #include "gmenu2x.h" |
| 4 | |
| 5 | #include "buttonbox.h" |
| 6 | |
| 7 | ButtonBox::ButtonBox(GMenu2X *gmenu2x) : gmenu2x(gmenu2x) |
| 8 | { |
| 9 | } |
| 10 | |
| 11 | ButtonBox::~ButtonBox() |
| 12 | { |
| 13 | for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it) |
| 14 | delete *it; |
| 15 | } |
| 16 | |
| 17 | void ButtonBox::add(Button *button) |
| 18 | { |
| 19 | buttons.push_back(button); |
| 20 | } |
| 21 | |
| 22 | void ButtonBox::paint(unsigned int posX) |
| 23 | { |
| 24 | for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it) |
| 25 | posX = gmenu2x->drawButton(*it, posX); |
| 26 | } |
| 27 | |
| 28 | void ButtonBox::handleTS() |
| 29 | { |
| 30 | for (ButtonList::iterator it = buttons.begin(); it != buttons.end(); ++it) |
| 31 | (*it)->handleTS(); |
| 32 | } |
| 33 |
Branches:
install_locations
master
opkrun
packages
