#include <GLMenuEntry.h>

Public Member Functions | |
| GLMenuEntry (const LangString &menuName, char *menuNameInternal, const LangString &menuDescription, float width, unsigned int state, GLMenuI *callback, Image *icon, unsigned int flags) | |
| virtual | ~GLMenuEntry () |
| bool | click (float currentTop, int x, int y) |
| bool | inMenu (float currentTop, int x, int y) |
| unsigned int | getState () |
| void | draw (float currentTop, float currentLeft) |
| void | addMenuItem (GLMenuItem &item) |
| float | getX () |
| float | getY () |
| float | getW () |
| float | getH () |
| bool | getSelected () |
| LangString & | getName () |
| const char * | getNameInternal () |
| GLMenuI * | getCallback () |
| ToolTip & | getToolTip () |
| unsigned int | getFlags () |
| virtual void | itemSelected (GLWSelectorEntry *entry, int position) |
| virtual void | noItemSelected () |
| virtual void | populateCalled (unsigned int id) |
Protected Member Functions | |
| void | drawText () |
| void | drawIcon () |
Protected Attributes | |
| bool | selected_ |
| float | left_ |
| float | top_ |
| float | width_ |
| float | height_ |
| unsigned int | state_ |
| unsigned int | flags_ |
| GLMenuI * | callback_ |
| GLTexture * | texture_ |
| ToolTip | toolTip_ |
| Image * | icon_ |
| std::list< GLMenuItem > | menuItems_ |
| LangString | menuName_ |
| LangString | menuDescription_ |
| std::string | menuNameInternal_ |
Definition at line 29 of file GLMenuEntry.h.
| GLMenuEntry::GLMenuEntry | ( | const LangString & | menuName, | |
| char * | menuNameInternal, | |||
| const LangString & | menuDescription, | |||
| float | width, | |||
| unsigned int | state, | |||
| GLMenuI * | callback, | |||
| Image * | icon, | |||
| unsigned int | flags | |||
| ) |
| GLMenuEntry::~GLMenuEntry | ( | ) | [virtual] |
| bool GLMenuEntry::click | ( | float | currentTop, | |
| int | x, | |||
| int | y | |||
| ) |
Definition at line 151 of file GLMenuEntry.cpp.
References callback_, GLMenuI::getMenuItems(), GLMenuItem::getSelected(), GLMenuItem::getSeperator(), GLMenuItem::getText(), GLMenuItem::getTexture(), GLMenuItem::getToolTip(), GLMenuItem::getUserData(), icon_, GLWSelector::instance(), left_, menuItemHeight, menuItems_, menuNameInternal_, GLMenuI::menuOpened(), selected_, GLWSelector::showSelector(), state_, and width_.
Referenced by GLMenu::mouseDown().
| bool GLMenuEntry::inMenu | ( | float | currentTop, | |
| int | x, | |||
| int | y | |||
| ) |
Definition at line 139 of file GLMenuEntry.cpp.
References icon_, left_, menuItemHeight, and width_.
Referenced by GLMenu::draw().
| unsigned int GLMenuEntry::getState | ( | ) | [inline] |
Definition at line 45 of file GLMenuEntry.h.
References state_.
Referenced by GLMenu::draw(), and GLMenu::mouseDown().
| void GLMenuEntry::draw | ( | float | currentTop, | |
| float | currentLeft | |||
| ) |
Definition at line 60 of file GLMenuEntry.cpp.
References drawIcon(), drawText(), height_, icon_, left_, and top_.
Referenced by GLMenu::draw(), and drawText().
| void GLMenuEntry::addMenuItem | ( | GLMenuItem & | item | ) |
Definition at line 201 of file GLMenuEntry.cpp.
References menuItems_.
Referenced by GLMenu::addMenuItem().
| float GLMenuEntry::getX | ( | ) | [inline] |
Definition at line 49 of file GLMenuEntry.h.
References left_.
Referenced by GLMenu::draw(), and TutorialDialog::processMenu().
| float GLMenuEntry::getY | ( | ) | [inline] |
Definition at line 50 of file GLMenuEntry.h.
References top_.
Referenced by GLMenu::draw(), and TutorialDialog::processMenu().
| float GLMenuEntry::getW | ( | ) | [inline] |
Definition at line 51 of file GLMenuEntry.h.
References width_.
Referenced by GLMenu::draw(), and TutorialDialog::processMenu().
| float GLMenuEntry::getH | ( | ) | [inline] |
Definition at line 52 of file GLMenuEntry.h.
References height_.
Referenced by TutorialDialog::processMenu().
| bool GLMenuEntry::getSelected | ( | ) | [inline] |
| LangString& GLMenuEntry::getName | ( | ) | [inline] |
| const char* GLMenuEntry::getNameInternal | ( | ) | [inline] |
Definition at line 55 of file GLMenuEntry.h.
References menuNameInternal_.
Referenced by GLMenu::draw().
| GLMenuI* GLMenuEntry::getCallback | ( | ) | [inline] |
| ToolTip& GLMenuEntry::getToolTip | ( | ) | [inline] |
| unsigned int GLMenuEntry::getFlags | ( | ) | [inline] |
| void GLMenuEntry::itemSelected | ( | GLWSelectorEntry * | entry, | |
| int | position | |||
| ) | [virtual] |
Implements GLWSelectorI.
Definition at line 211 of file GLMenuEntry.cpp.
References callback_, LANG_RESOURCE, menuItems_, menuNameInternal_, GLMenuI::menuSelection(), and selected_.
| void GLMenuEntry::noItemSelected | ( | ) | [virtual] |
Reimplemented from GLWSelectorI.
Definition at line 206 of file GLMenuEntry.cpp.
References selected_.
| void GLMenuEntry::populateCalled | ( | unsigned int | id | ) | [virtual] |
Implements ToolTipI.
Definition at line 231 of file GLMenuEntry.cpp.
References callback_, GLMenuI::getMenuToolTip(), menuName_, menuNameInternal_, ToolTip::setText(), toolTip_, and ToolTip::ToolTipHelp.
| void GLMenuEntry::drawText | ( | ) | [protected] |
Definition at line 101 of file GLMenuEntry.cpp.
References GLState::BLEND_ON, callback_, draw(), GLWidget::drawRoundBox(), GLWFont::getGameFont(), GLMenuI::getMenuText(), GL_LINE_LOOP, GL_TRIANGLE_FAN, glBegin(), glColor4f(), glEnd(), glLineWidth(), glVertex2f(), height_, GLWFont::instance(), itemcolor, left_, menuItemHeight, menuName_, menuNameInternal_, selected_, top_, and width_.
Referenced by draw().
| void GLMenuEntry::drawIcon | ( | ) | [protected] |
Definition at line 76 of file GLMenuEntry.cpp.
References GLState::BLEND_ON, GLTexture::create(), GLState::DEPTH_OFF, GLTexture::draw(), GL_QUADS, glBegin(), glColor4f(), glEnd(), glTexCoord2f(), glVertex2f(), height_, icon_, left_, selected_, texture_, GLState::TEXTURE_ON, and top_.
Referenced by draw().
bool GLMenuEntry::selected_ [protected] |
Definition at line 66 of file GLMenuEntry.h.
Referenced by click(), drawIcon(), drawText(), getSelected(), itemSelected(), and noItemSelected().
float GLMenuEntry::left_ [protected] |
Definition at line 67 of file GLMenuEntry.h.
Referenced by click(), draw(), drawIcon(), drawText(), getX(), and inMenu().
float GLMenuEntry::top_ [protected] |
Definition at line 67 of file GLMenuEntry.h.
Referenced by draw(), drawIcon(), drawText(), and getY().
float GLMenuEntry::width_ [protected] |
Definition at line 68 of file GLMenuEntry.h.
Referenced by click(), drawText(), getW(), and inMenu().
float GLMenuEntry::height_ [protected] |
Definition at line 68 of file GLMenuEntry.h.
Referenced by draw(), drawIcon(), drawText(), and getH().
unsigned int GLMenuEntry::state_ [protected] |
unsigned int GLMenuEntry::flags_ [protected] |
GLMenuI* GLMenuEntry::callback_ [protected] |
Definition at line 71 of file GLMenuEntry.h.
Referenced by click(), drawText(), getCallback(), itemSelected(), and populateCalled().
GLTexture* GLMenuEntry::texture_ [protected] |
ToolTip GLMenuEntry::toolTip_ [protected] |
Definition at line 73 of file GLMenuEntry.h.
Referenced by getToolTip(), GLMenuEntry(), and populateCalled().
Image* GLMenuEntry::icon_ [protected] |
Definition at line 74 of file GLMenuEntry.h.
Referenced by click(), draw(), drawIcon(), inMenu(), and ~GLMenuEntry().
std::list<GLMenuItem> GLMenuEntry::menuItems_ [protected] |
Definition at line 75 of file GLMenuEntry.h.
Referenced by addMenuItem(), click(), and itemSelected().
LangString GLMenuEntry::menuName_ [protected] |
Definition at line 76 of file GLMenuEntry.h.
Referenced by drawText(), getName(), and populateCalled().
LangString GLMenuEntry::menuDescription_ [protected] |
Definition at line 76 of file GLMenuEntry.h.
std::string GLMenuEntry::menuNameInternal_ [protected] |
Definition at line 77 of file GLMenuEntry.h.
Referenced by click(), drawText(), getNameInternal(), itemSelected(), and populateCalled().
1.5.3