#include <GLWDropDown.h>

Public Member Functions | |
| GLWDropDown (float x=0.0f, float y=0.0f, float w=0.0f) | |
| virtual | ~GLWDropDown () |
| void | setHandler (GLWDropDownI *handler) |
| void | addEntry (GLWSelectorEntry text) |
| void | setCurrentPosition (int pos) |
| int | getCurrentPosition () |
| GLWSelectorEntry * | getCurrentEntry () |
| virtual void | draw () |
| virtual void | mouseDown (int button, float x, float y, bool &skipRest) |
| virtual void | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | setX (float x) |
| virtual void | setY (float y) |
| virtual void | itemSelected (GLWSelectorEntry *entry, int position) |
| virtual void | noItemSelected () |
| virtual void | buttonDown (unsigned int id) |
| virtual void | buttonUp (unsigned int id) |
| void | clear () |
| REGISTER_CLASS_HEADER (GLWDropDown) | |
Protected Attributes | |
| std::list < GLWSelectorEntry > | texts_ |
| GLWSelectorEntry * | current_ |
| GLWPushButton | button_ |
| GLWDropDownI * | handler_ |
Definition at line 38 of file GLWDropDown.h.
| GLWDropDown::GLWDropDown | ( | float | x = 0.0f, |
|
| float | y = 0.0f, |
|||
| float | w = 0.0f | |||
| ) |
| GLWDropDown::~GLWDropDown | ( | ) | [virtual] |
Definition at line 41 of file GLWDropDown.cpp.
| void GLWDropDown::setHandler | ( | GLWDropDownI * | handler | ) |
Definition at line 46 of file GLWDropDown.cpp.
References handler_.
Referenced by AutoDefenseDialog::AutoDefenseDialog(), BuyAccessoryDialog::BuyAccessoryDialog(), InventoryDialog::display(), BuyAccessoryDialog::display(), GLWTankViewer::GLWTankViewer(), InventoryDialog::InventoryDialog(), NetworkSelectDialog::NetworkSelectDialog(), and PlayerDialog::PlayerDialog().
| void GLWDropDown::addEntry | ( | GLWSelectorEntry | text | ) |
Definition at line 99 of file GLWDropDown.cpp.
References current_, and texts_.
Referenced by GLWDropDownColor::addColor(), GLWDropDownText::addText(), AdminDialog::AdminDialog(), PlayerDialog::display(), GiftMoneyDialog::display(), and AutoDefenseDialog::displayCurrent().
| void GLWDropDown::setCurrentPosition | ( | int | pos | ) |
Definition at line 80 of file GLWDropDown.cpp.
References current_, handler_, GLWidget::id_, GLWDropDownI::select(), and texts_.
Referenced by PlayerDialog::draw(), and GLWTankViewer::GLWTankViewer().
| int GLWDropDown::getCurrentPosition | ( | ) |
Definition at line 62 of file GLWDropDown.cpp.
References current_, and texts_.
Referenced by AutoDefenseDialog::buttonDown(), and PlayerDialog::getCurrentTeam().
| GLWSelectorEntry * GLWDropDown::getCurrentEntry | ( | ) |
Definition at line 57 of file GLWDropDown.cpp.
References current_.
Referenced by GiftMoneyDialog::buttonDown(), AdminDialog::buttonDown(), GLWDropDownText::draw(), GLWDropDownColor::draw(), GLWDropDownColor::getCurrentColor(), GLWDropDownText::getCurrentDataText(), GLWDropDownText::getCurrentText(), and GLWTankViewer::GLWTankViewer().
| void GLWDropDown::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Reimplemented in GLWDropDownColor, and GLWDropDownText.
Definition at line 108 of file GLWDropDown.cpp.
References button_, GLWButton::draw(), GLWidget::draw(), GLWidget::drawShadedRoundBox(), GLWTranslate::getPosX(), GLWTranslate::getPosY(), GLWButton::getPressed(), GL_LINE_LOOP, GL_TRIANGLES, glBegin(), glColor3f(), glEnd(), glVertex2d(), GLWidget::h_, ScorchedClient::instance(), GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWDropDownText::draw(), and GLWDropDownColor::draw().
| void GLWDropDown::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 151 of file GLWDropDown.cpp.
References button_, buttonDown(), GLWButton::getPressed(), GLWidget::h_, GLWidget::inBox(), GLWPushButton::mouseDown(), GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWTankViewer::mouseDown().
| void GLWDropDown::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 203 of file GLWDropDown.cpp.
References button_, and GLWPushButton::mouseUp().
| void GLWDropDown::setX | ( | float | x | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 165 of file GLWDropDown.cpp.
References button_, GLWidget::setX(), and GLWidget::w_.
| void GLWDropDown::setY | ( | float | y | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 171 of file GLWDropDown.cpp.
References button_, and GLWidget::setY().
| void GLWDropDown::itemSelected | ( | GLWSelectorEntry * | entry, | |
| int | position | |||
| ) | [virtual] |
Implements GLWSelectorI.
Definition at line 177 of file GLWDropDown.cpp.
References button_, current_, GLWButton::getPressed(), handler_, GLWidget::id_, GLWDropDownI::select(), and texts_.
| void GLWDropDown::noItemSelected | ( | ) | [virtual] |
Reimplemented from GLWSelectorI.
Definition at line 198 of file GLWDropDown.cpp.
References button_, and GLWButton::getPressed().
| void GLWDropDown::buttonDown | ( | unsigned int | id | ) | [virtual] |
Implements GLWButtonI.
Definition at line 133 of file GLWDropDown.cpp.
References button_, GLWTranslate::getPosX(), GLWTranslate::getPosY(), GLWButton::getPressed(), GLWSelector::instance(), GLWSelector::showSelector(), texts_, GLWidget::x_, and GLWidget::y_.
Referenced by mouseDown().
| void GLWDropDown::buttonUp | ( | unsigned int | id | ) | [virtual] |
| void GLWDropDown::clear | ( | ) |
Definition at line 51 of file GLWDropDown.cpp.
References current_, and texts_.
Referenced by PlayerDialog::display(), GiftMoneyDialog::display(), AutoDefenseDialog::displayCurrent(), and PlayerDialog::nextPlayer().
| GLWDropDown::REGISTER_CLASS_HEADER | ( | GLWDropDown | ) |
std::list<GLWSelectorEntry> GLWDropDown::texts_ [protected] |
Definition at line 70 of file GLWDropDown.h.
Referenced by addEntry(), buttonDown(), clear(), getCurrentPosition(), itemSelected(), GLWDropDownColor::setCurrentColor(), setCurrentPosition(), and GLWDropDownText::setCurrentText().
GLWSelectorEntry* GLWDropDown::current_ [protected] |
Definition at line 71 of file GLWDropDown.h.
Referenced by addEntry(), clear(), getCurrentEntry(), getCurrentPosition(), itemSelected(), GLWDropDownColor::setCurrentColor(), setCurrentPosition(), and GLWDropDownText::setCurrentText().
GLWPushButton GLWDropDown::button_ [protected] |
Definition at line 72 of file GLWDropDown.h.
Referenced by buttonDown(), draw(), GLWDropDown(), itemSelected(), mouseDown(), mouseUp(), noItemSelected(), setX(), and setY().
GLWDropDownI* GLWDropDown::handler_ [protected] |
Definition at line 73 of file GLWDropDown.h.
Referenced by itemSelected(), GLWDropDownColor::setCurrentColor(), setCurrentPosition(), GLWDropDownText::setCurrentText(), and setHandler().
1.5.3