#include <glwx.h>
Public Member Functions | |
GUISlider (const std::string &callback="", const int orientation=OR_HORIZONTAL) | |
virtual const Tuple4i & | getWindowBounds () |
virtual void | checkMouseEvents (MouseEvent &evt, int extreaInfo, bool reservedBits=false) |
virtual bool | loadXMLSettings (const TiXmlElement *element) |
virtual void | render (float clockTick) |
float | getProgress () |
void | setProgress (float zeroToOne) |
void | setDiscDimensions (const Tuple2i &dimensions) |
void | setDiscDimensions (int width, int height) |
int | getOrientation () |
const Tuple2i & | getDiscDimensions () |
Private Member Functions | |
void | renderVertical () |
Private Attributes | |
Tuple4i | realWindowBounds |
Tuple2i | discDimensions |
float | progress |
int | orientation |
int | offset |
Definition at line 811 of file glwx.h.
GUISlider::GUISlider | ( | const std::string & | callback = "" , |
|
const int | orientation = OR_HORIZONTAL | |||
) |
Definition at line 3 of file GUISlider.cpp.
References offset, OR_HORIZONTAL, OR_VERTICAL, orientation, GUIRectangle::setDimensions(), setDiscDimensions(), setProgress(), GUIRectangle::widgetType, and WT_SLIDER.
const Tuple4i & GUISlider::getWindowBounds | ( | ) | [virtual] |
Reimplemented from GUIRectangle.
Definition at line 188 of file GUISlider.cpp.
References GUIText::computeDimensions(), GUIRectangle::computeWindowBounds(), discDimensions, GUIText::getHeight(), GUIRectangle::getWidth(), GUIText::getWidth(), GUIAlphaElement::label, offset, OR_HORIZONTAL, orientation, GUIRectangle::parent, realWindowBounds, GUIRectangle::update, and GUIRectangle::windowBounds.
void GUISlider::checkMouseEvents | ( | MouseEvent & | evt, | |
int | extreaInfo, | |||
bool | reservedBits = false | |||
) | [virtual] |
Reimplemented from GUIRectangle.
Definition at line 223 of file GUISlider.cpp.
References GUIEventListener::actionPerformed(), GUIRectangle::checkMouseEvents(), GUIRectangle::getEventsListener(), MouseEvent::getX(), MouseEvent::getY(), offset, OR_HORIZONTAL, orientation, GUIRectangle::pressed, progress, GUIRectangle::released, and GUIRectangle::windowBounds.
bool GUISlider::loadXMLSettings | ( | const TiXmlElement * | element | ) | [virtual] |
Reimplemented from GUIAlphaElement.
Definition at line 15 of file GUISlider.cpp.
References discDimensions, GUIAlphaElement::loadXMLSettings(), OR_HORIZONTAL, OR_VERTICAL, orientation, progress, GUIRectangle::setDimensions(), setDiscDimensions(), setProgress(), and Logger::writeErrorLog().
Referenced by GUIPanel::loadXMLSettings().
void GUISlider::render | ( | float | clockTick | ) | [virtual] |
Implements GUIAlphaElement.
Definition at line 60 of file GUISlider.cpp.
References GUIAlphaElement::color, GUIRectangle::disableGUITexture(), discDimensions, GUIRectangle::enableGUITexture(), GUIRectangle::getCenter(), GUITexCoordDescriptor::getTexCoords(), GUIRectangle::getTexCoordsInfo(), GUIAlphaElement::label, GUIAlphaElement::modifyCurrentAlpha(), offset, OR_VERTICAL, orientation, GUIRectangle::parent, GUIText::printCenteredX(), progress, renderVertical(), GUIRectangle::visible, GUIRectangle::windowBounds, and WT_SLIDER.
float GUISlider::getProgress | ( | ) |
Definition at line 55 of file GUISlider.cpp.
References progress.
Referenced by DemoEventHandler::actionPerformed().
void GUISlider::setProgress | ( | float | zeroToOne | ) |
Definition at line 49 of file GUISlider.cpp.
References GUIRectangle::pressed, and progress.
Referenced by GUISlider(), and loadXMLSettings().
void GUISlider::setDiscDimensions | ( | const Tuple2i & | dimensions | ) |
void GUISlider::setDiscDimensions | ( | int | width, | |
int | height | |||
) |
Definition at line 37 of file GUISlider.cpp.
References GUIRectangle::dimensions, discDimensions, OR_HORIZONTAL, orientation, and GUIRectangle::setDimensions().
int GUISlider::getOrientation | ( | ) |
const Tuple2i & GUISlider::getDiscDimensions | ( | ) |
void GUISlider::renderVertical | ( | ) | [private] |
Definition at line 130 of file GUISlider.cpp.
References GUIAlphaElement::color, GUIRectangle::disableGUITexture(), discDimensions, GUIRectangle::enableGUITexture(), GUIRectangle::getCenter(), GUIRectangle::getHeight(), GUITexCoordDescriptor::getTexCoords(), GUIRectangle::getTexCoordsInfo(), offset, GUIRectangle::parent, progress, GUIRectangle::windowBounds, and WT_SLIDER.
Referenced by render().
Tuple4i GUISlider::realWindowBounds [private] |
Tuple2i GUISlider::discDimensions [private] |
Definition at line 833 of file glwx.h.
Referenced by getDiscDimensions(), getWindowBounds(), loadXMLSettings(), render(), renderVertical(), and setDiscDimensions().
float GUISlider::progress [private] |
Definition at line 834 of file glwx.h.
Referenced by checkMouseEvents(), getProgress(), loadXMLSettings(), render(), renderVertical(), and setProgress().
int GUISlider::orientation [private] |
Definition at line 835 of file glwx.h.
Referenced by checkMouseEvents(), getWindowBounds(), GUISlider(), loadXMLSettings(), render(), and setDiscDimensions().
int GUISlider::offset [private] |
Definition at line 835 of file glwx.h.
Referenced by checkMouseEvents(), getWindowBounds(), GUISlider(), render(), and renderVertical().