#include <Button.h>

Public Member Functions | |
| Button () | |
| Standard Constructor. | |
| Button (const Button &src) | |
| Copy Constructor. | |
| Button (const Label &label, const float &width, const float &height, const Texture &sTexture, const Texture &hTexture, const Texture &pTexture) | |
| Constructor for Initialization by value. | |
| ~Button () | |
| Destructor. | |
| void | registerListener (ButtonListener *listener) |
| Register a new listener. | |
| void | unregisterListener (ButtonListener *listener) |
| Unregister a new listener. | |
| void | pressLeft (const GLuint &id, const GLuint &x, const GLuint &y, const GLint &xRel, const GLint &yRel) |
| Action to be performed if left click occurs. | |
| void | releaseLeft (const GLuint &id, const GLuint &x, const GLuint &y, const GLint &xRel, const GLint &yRel) |
| Action to be performed if left click occurs. | |
| void | move (const GLuint &id, const GLuint &x, const GLuint &y, const GLint &xRel, const GLint &yRel) |
| Action to be performed if mouse motion occurs. | |
| void | renderGl () |
| The rendering function to be used with OpenGL. | |
| void | selectGl () |
| The selection mode rendering function for OpenGL. | |
| Label & | getLabel () |
| GLfloat & | getWidth () |
| GLfloat & | getHeight () |
| Texture & | getSTexture () |
| Texture & | getHTexture () |
| Texture & | getPTexture () |
| void | setLabel (const Label &label) |
| void | setWidth (const GLfloat &width) |
| void | setHeight (const GLfloat &height) |
| void | setSTexture (const Texture &texture) |
| void | setHTexture (const Texture &texture) |
| void | setPTexture (const Texture &texture) |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Private Attributes | |
| vector< ButtonListener * > | listeners |
| The list of ActionListeners. | |
| Label | label |
| The Label that is written on the button. | |
| Color | color |
| The Color of the button. | |
| GLfloat | width |
| The width of the button. | |
| GLfloat | height |
| The height of the button. | |
| bool | active |
| Indicates the state of the button. | |
| Texture | sTexture |
| The standard texture. | |
| Texture | hTexture |
| The hover texture. | |
| Texture | pTexture |
| The pressed texture. | |
| enum mouseState | state |
| The state of the mouse. | |
| struct buttonState | buttons |
| the state of the mouse buttons | |
This class creates a button.
| Button::Button | ( | ) |
Standard Constructor.
The Standard Constructor
| Button::Button | ( | const Button & | src | ) |
Copy Constructor.
| Button::Button | ( | const Label & | label, | |
| const float & | width, | |||
| const float & | height, | |||
| const Texture & | sTexture, | |||
| const Texture & | hTexture, | |||
| const Texture & | pTexture | |||
| ) |
Constructor for Initialization by value.
| Button::~Button | ( | ) |
Destructor.
The Destructor
| void Button::registerListener | ( | ButtonListener * | listener | ) |
Register a new listener.
| void Button::unregisterListener | ( | ButtonListener * | listener | ) |
Unregister a new listener.
| void Button::pressLeft | ( | const GLuint & | id, | |
| const GLuint & | x, | |||
| const GLuint & | y, | |||
| const GLint & | xRel, | |||
| const GLint & | yRel | |||
| ) | [virtual] |
| void Button::releaseLeft | ( | const GLuint & | id, | |
| const GLuint & | x, | |||
| const GLuint & | y, | |||
| const GLint & | xRel, | |||
| const GLint & | yRel | |||
| ) | [virtual] |
| void Button::move | ( | const GLuint & | id, | |
| const GLuint & | x, | |||
| const GLuint & | y, | |||
| const GLint & | xRel, | |||
| const GLint & | yRel | |||
| ) | [virtual] |
| void Button::renderGl | ( | ) | [virtual] |
| void Button::selectGl | ( | ) | [virtual] |
| Label & Button::getLabel | ( | ) |
| GLfloat & Button::getWidth | ( | ) |
| GLfloat & Button::getHeight | ( | ) |
| Texture & Button::getSTexture | ( | ) |
| Texture & Button::getHTexture | ( | ) |
| Texture & Button::getPTexture | ( | ) |
| void Button::setLabel | ( | const Label & | label | ) |
| void Button::setWidth | ( | const GLfloat & | width | ) |
| void Button::setHeight | ( | const GLfloat & | height | ) |
| void Button::setSTexture | ( | const Texture & | texture | ) |
| void Button::setHTexture | ( | const Texture & | texture | ) |
| void Button::setPTexture | ( | const Texture & | texture | ) |
| string Button::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from MouseAdapterLeft.
| string Button::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from MouseAdapterLeft.
| enum classId Button::classId | ( | ) | const [virtual] |
Returns the class id of the object.
Reimplemented from MouseAdapterLeft.
vector<ButtonListener*> Button::listeners [private] |
The list of ActionListeners.
Label Button::label [private] |
Color Button::color [private] |
The Color of the button.
GLfloat Button::width [private] |
The width of the button.
GLfloat Button::height [private] |
The height of the button.
bool Button::active [private] |
Indicates the state of the button.
Texture Button::sTexture [private] |
The standard texture.
Texture Button::hTexture [private] |
The hover texture.
Texture Button::pTexture [private] |
The pressed texture.
enum mouseState Button::state [private] |
The state of the mouse.
struct buttonState Button::buttons [read, private] |
the state of the mouse buttons
1.5.6