#include <GLWIconList.h>
Public Types | |
| enum | Flags { eNoDrawSelected = 1 } |
Public Member Functions | |
| GLWIconList (float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f, float squaresHeight=40.0f, unsigned int flags=0) | |
| virtual | ~GLWIconList () |
| void | addItem (GLWIconListItem *item) |
| void | clear () |
| void | setFlags (unsigned int flags) |
| void | setHandler (GLWIconListI *handler) |
| GLWIconListItem * | getSelected () |
| std::vector < GLWIconListItem * > & | getItems () |
| virtual void | draw () |
| virtual void | simulate (float frameTime) |
| virtual void | mouseDown (int button, float x, float y, bool &skipRest) |
| virtual void | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | mouseDrag (int button, float mx, float my, float x, float y, bool &skipRest) |
| virtual void | mouseWheel (float x, float y, float z, bool &skipRest) |
| REGISTER_CLASS_HEADER (GLWIconList) | |
Protected Attributes | |
| GLWScrollWBackwards | scrollBar_ |
| GLWIconListI * | handler_ |
| unsigned int | flags_ |
| float | squaresHeight_ |
| int | selected_ |
| std::vector < GLWIconListItem * > | items_ |
Private Member Functions | |
| GLWIconList (const GLWIconList &) | |
| const GLWIconList & | operator= (const GLWIconList &) |
Definition at line 41 of file GLWIconList.h.
| enum GLWIconList::Flags |
| GLWIconList::GLWIconList | ( | float | x = 0.0f, |
|
| float | y = 0.0f, |
|||
| float | w = 0.0f, |
|||
| float | h = 0.0f, |
|||
| float | squaresHeight = 40.0f, |
|||
| unsigned int | flags = 0 | |||
| ) |
Definition at line 25 of file GLWIconList.cpp.
| GLWIconList::~GLWIconList | ( | ) | [virtual] |
Definition at line 36 of file GLWIconList.cpp.
| GLWIconList::GLWIconList | ( | const GLWIconList & | ) | [private] |
| void GLWIconList::addItem | ( | GLWIconListItem * | item | ) |
Definition at line 40 of file GLWIconList.cpp.
References GLWidget::getId(), handler_, items_, scrollBar_, GLWIconListI::selected(), selected_, GLWScrollWBackwards::setCurrent(), and GLWScrollW::setMax().
Referenced by SaveSelectDialog::display(), ModSubSelectDialog::display(), ModSelectDialog::display(), and SettingsSubSelectDialog::displayLand().
| void GLWIconList::clear | ( | ) |
Definition at line 53 of file GLWIconList.cpp.
References items_, and selected_.
Referenced by SaveSelectDialog::display(), ModSubSelectDialog::display(), ModSelectDialog::display(), and SettingsSubSelectDialog::displayLand().
| void GLWIconList::setFlags | ( | unsigned int | flags | ) | [inline] |
| void GLWIconList::setHandler | ( | GLWIconListI * | handler | ) | [inline] |
Definition at line 59 of file GLWIconList.h.
References handler_.
Referenced by SettingsSubSelectDialog::displayLand(), ModSelectDialog::ModSelectDialog(), ModSubSelectDialog::ModSubSelectDialog(), and SaveSelectDialog::SaveSelectDialog().
| GLWIconListItem * GLWIconList::getSelected | ( | ) |
Definition at line 64 of file GLWIconList.cpp.
References items_, and selected_.
Referenced by SaveSelectDialog::buttonDown(), ModSubSelectDialog::buttonDown(), and ModSelectDialog::buttonDown().
| std::vector<GLWIconListItem *>& GLWIconList::getItems | ( | ) | [inline] |
Definition at line 62 of file GLWIconList.h.
References items_.
Referenced by SettingsSubSelectDialog::buttonDown(), and SettingsSubSelectDialog::selected().
| void GLWIconList::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 75 of file GLWIconList.cpp.
References GLWIconListItem::draw(), GLWScrollW::draw(), GLWidget::draw(), GLWidget::drawShadedRoundBox(), eNoDrawSelected, flags_, GLWScrollWBackwards::getCurrent(), GLWScrollW::getSee(), GL_LINE_LOOP, glBegin(), glColor3f(), glEnd(), glVertex2f(), GLWidget::h_, items_, MIN, scrollBar_, selected_, squaresHeight_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| void GLWIconList::simulate | ( | float | frameTime | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 70 of file GLWIconList.cpp.
References scrollBar_, and GLWScrollW::simulate().
| void GLWIconList::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 111 of file GLWIconList.cpp.
References GLWIconListI::chosen(), GLWScrollWBackwards::getCurrent(), GLWidget::getId(), GLWidget::h_, handler_, GLWidget::inBox(), int(), items_, GameState::MouseButtonLeftDoubleClick, GLWScrollW::mouseDown(), scrollBar_, GLWIconListI::selected(), selected_, squaresHeight_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| void GLWIconList::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 141 of file GLWIconList.cpp.
References GLWScrollW::mouseUp(), and scrollBar_.
| void GLWIconList::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 136 of file GLWIconList.cpp.
References GLWScrollW::mouseDrag(), and scrollBar_.
| void GLWIconList::mouseWheel | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 146 of file GLWIconList.cpp.
References GLWidget::getX(), GLWidget::getY(), GLWidget::h_, GLWidget::inBox(), GLWScrollWBackwards::mouseWheel(), scrollBar_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| GLWIconList::REGISTER_CLASS_HEADER | ( | GLWIconList | ) |
| const GLWIconList& GLWIconList::operator= | ( | const GLWIconList & | ) | [private] |
GLWScrollWBackwards GLWIconList::scrollBar_ [protected] |
Definition at line 75 of file GLWIconList.h.
Referenced by addItem(), draw(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), and simulate().
GLWIconListI* GLWIconList::handler_ [protected] |
Definition at line 76 of file GLWIconList.h.
Referenced by addItem(), mouseDown(), and setHandler().
unsigned int GLWIconList::flags_ [protected] |
float GLWIconList::squaresHeight_ [protected] |
int GLWIconList::selected_ [protected] |
Definition at line 79 of file GLWIconList.h.
Referenced by addItem(), clear(), draw(), getSelected(), and mouseDown().
std::vector<GLWIconListItem *> GLWIconList::items_ [protected] |
Definition at line 80 of file GLWIconList.h.
Referenced by addItem(), clear(), draw(), getItems(), getSelected(), and mouseDown().
1.5.3