#include <GLWButton.h>

Public Types | |
| enum | { ButtonFlagOk = 1, ButtonFlagCancel = 2, ButtonFlagCenterX = 4, ButtonSquare = 8 } |
Public Member Functions | |
| GLWButton (float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f, GLWButtonI *handler=0, unsigned flags=0) | |
| virtual | ~GLWButton () |
| virtual void | draw () |
| virtual void | simulate (float frameTime) |
| virtual void | mouseDown (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 | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | keyDown (char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest) |
| bool & | getPressed () |
| bool | getEnabled () |
| void | setEnabled (bool enabled) |
| void | setFlags (unsigned f) |
| unsigned int | getFlags () |
| virtual void | setHandler (GLWButtonI *handler) |
| void | setRepeatMode () |
| REGISTER_CLASS_HEADER (GLWButton) | |
Protected Attributes | |
| GLWButtonI * | handler_ |
| unsigned | flags_ |
| bool | startdrag_ |
| bool | pressed_ |
| bool | repeatMode_ |
| bool | enabled_ |
| float | repeatTime_ |
Definition at line 34 of file GLWButton.h.
| anonymous enum |
Definition at line 37 of file GLWButton.h.
| GLWButton::GLWButton | ( | float | x = 0.0f, |
|
| float | y = 0.0f, |
|||
| float | w = 0.0f, |
|||
| float | h = 0.0f, |
|||
| GLWButtonI * | handler = 0, |
|||
| unsigned | flags = 0 | |||
| ) |
Definition at line 32 of file GLWButton.cpp.
| GLWButton::~GLWButton | ( | ) | [virtual] |
Definition at line 43 of file GLWButton.cpp.
| void GLWButton::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Reimplemented in GLWIconButton, and GLWTextButton.
Definition at line 58 of file GLWButton.cpp.
References ButtonFlagOk, ButtonSquare, GLWidget::draw(), GLWidget::drawBox(), GLWidget::drawShadedRoundBox(), flags_, GL_LINE_LOOP, glBegin(), glEnd(), glLineWidth(), GLWidget::h_, pressed_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWTextButton::draw(), GLWSpinBox::draw(), GLWScrollW::draw(), and GLWDropDown::draw().
| void GLWButton::simulate | ( | float | frameTime | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 82 of file GLWButton.cpp.
References GLWButtonI::buttonDown(), GLWidget::getId(), handler_, pressed_, repeatMode_, and repeatTime_.
Referenced by GLWScrollW::simulate(), and GLWChannelText::simulate().
| void GLWButton::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Reimplemented in GLWPushButton, and GLWScrollButton.
Definition at line 96 of file GLWButton.cpp.
References GLWButtonI::buttonDown(), enabled_, GLWidget::getId(), GLWidget::h_, handler_, GLWidget::inBox(), pressed_, repeatMode_, repeatTime_, startdrag_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWSpinBox::mouseDown(), GLWScrollW::mouseDown(), GLWScrollButton::mouseDown(), GLWIconTable::mouseDown(), GLWChannelView::mouseDown(), and GLWChannelText::mouseDown().
| void GLWButton::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Reimplemented in GLWScrollButton.
Definition at line 113 of file GLWButton.cpp.
References GLWidget::h_, GLWidget::inBox(), pressed_, startdrag_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWSpinBox::mouseDrag(), GLWScrollW::mouseDrag(), GLWIconTable::mouseDrag(), GLWChannelView::mouseDrag(), and GLWChannelText::mouseDrag().
| void GLWButton::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Reimplemented in GLWPushButton.
Definition at line 129 of file GLWButton.cpp.
References GLWButtonI::buttonDown(), GLWidget::getId(), handler_, pressed_, repeatMode_, and startdrag_.
Referenced by GLWSpinBox::mouseUp(), GLWScrollW::mouseUp(), GLWIconTable::mouseUp(), GLWChannelView::mouseUp(), and GLWChannelText::mouseUp().
| void GLWButton::keyDown | ( | char * | buffer, | |
| unsigned int | keyState, | |||
| KeyboardHistory::HistoryElement * | history, | |||
| int | hisCount, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 144 of file GLWButton.cpp.
References GLWButtonI::buttonDown(), ButtonFlagCancel, ButtonFlagOk, enabled_, flags_, GLWidget::getId(), handler_, and KeyboardHistory::HistoryElement::sdlKey.
| bool& GLWButton::getPressed | ( | ) | [inline] |
Definition at line 59 of file GLWButton.h.
References pressed_.
Referenced by GLWDropDown::buttonDown(), GLWSpinBox::draw(), GLWScrollW::draw(), GLWDropDown::draw(), GLWDropDown::itemSelected(), GLWDropDown::mouseDown(), and GLWDropDown::noItemSelected().
| bool GLWButton::getEnabled | ( | ) | [inline] |
Definition at line 61 of file GLWButton.h.
References enabled_.
Referenced by NetworkSelectDialog::rowChosenGames().
| void GLWButton::setEnabled | ( | bool | enabled | ) |
Definition at line 48 of file GLWButton.cpp.
References enabled_.
Referenced by SaveSelectDialog::display(), QuitDialog::display(), SaveSelectDialog::selected(), and NetworkSelectDialog::textChanged().
| void GLWButton::setFlags | ( | unsigned | f | ) | [inline] |
| unsigned int GLWButton::getFlags | ( | ) | [inline] |
| void GLWButton::setHandler | ( | GLWButtonI * | handler | ) | [virtual] |
Definition at line 53 of file GLWButton.cpp.
References handler_.
Referenced by GLWChannelText::GLWChannelText(), GLWChannelView::GLWChannelView(), GLWDropDown::GLWDropDown(), GLWPushButton::GLWPushButton(), GLWScrollW::GLWScrollW(), and GLWSpinBox::GLWSpinBox().
| void GLWButton::setRepeatMode | ( | ) | [inline] |
Definition at line 68 of file GLWButton.h.
References repeatMode_.
Referenced by GLWScrollW::GLWScrollW().
| GLWButton::REGISTER_CLASS_HEADER | ( | GLWButton | ) |
GLWButtonI* GLWButton::handler_ [protected] |
Definition at line 73 of file GLWButton.h.
Referenced by keyDown(), GLWPushButton::mouseDown(), mouseDown(), mouseUp(), setHandler(), and simulate().
unsigned GLWButton::flags_ [protected] |
Definition at line 74 of file GLWButton.h.
Referenced by GLWTextButton::draw(), draw(), getFlags(), keyDown(), and setFlags().
bool GLWButton::startdrag_ [protected] |
bool GLWButton::pressed_ [protected] |
Definition at line 75 of file GLWButton.h.
Referenced by GLWTextButton::draw(), GLWIconButton::draw(), draw(), getPressed(), GLWPushButton::mouseDown(), mouseDown(), GLWScrollButton::mouseDrag(), mouseDrag(), mouseUp(), and simulate().
bool GLWButton::repeatMode_ [protected] |
Definition at line 76 of file GLWButton.h.
Referenced by mouseDown(), mouseUp(), setRepeatMode(), and simulate().
bool GLWButton::enabled_ [protected] |
Definition at line 77 of file GLWButton.h.
Referenced by GLWTextButton::draw(), getEnabled(), keyDown(), mouseDown(), and setEnabled().
float GLWButton::repeatTime_ [protected] |
1.5.3