Root/
| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2006 by Massimiliano Torromeo * |
| 3 | * massimiliano.torromeo@gmail.com * |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 2 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program; if not, write to the * |
| 17 | * Free Software Foundation, Inc., * |
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 19 | ***************************************************************************/ |
| 20 | |
| 21 | #include "menusetting.h" |
| 22 | |
| 23 | #include "font.h" |
| 24 | #include "gmenu2x.h" |
| 25 | #include "surface.h" |
| 26 | |
| 27 | using std::string; |
| 28 | |
| 29 | MenuSetting::MenuSetting(GMenu2X *gmenu2x, const string &name, |
| 30 | const string &description) |
| 31 | : gmenu2x(gmenu2x) |
| 32 | , buttonBox(gmenu2x) |
| 33 | , name(name) |
| 34 | , description(description) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | MenuSetting::~MenuSetting() |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | void MenuSetting::draw(int y) |
| 43 | { |
| 44 | gmenu2x->s->write( gmenu2x->font, name, 5, y, Font::HAlignLeft, Font::VAlignTop ); |
| 45 | } |
| 46 | |
| 47 | void MenuSetting::handleTS() |
| 48 | { |
| 49 | buttonBox.handleTS(); |
| 50 | } |
| 51 | |
| 52 | void MenuSetting::drawSelected(int /*y*/) |
| 53 | { |
| 54 | buttonBox.paint(5); |
| 55 | } |
| 56 |
Branches:
install_locations
master
opkrun
packages
