This class create a button with an image. More...
#include <Button.hh>
Inheritance diagram for ImageButton:

Public Member Functions | |
| ImageButton (const uint x, const uint y, const uint w, const uint h, SDL_Surface *screen, Widget *father, const string filename, const ushort action=CLOSE) | |
| ImageButton (const uint w, const uint h, SDL_Surface *screen, Widget *father, const string filename, const ushort action=CLOSE) | |
| ImageButton (SDL_Surface *screen, Widget *father, const string filename, const ushort action=CLOSE) | |
| void | draw () |
| Method to draw the button. | |
| void | refresh () |
| virtual method to refresh the widget | |
| void | mousemotion (const uint mousex, const uint mousey) |
| Method to do an action when mouse is moved. | |
| ushort | mousebuttondown (const uint mousex=0, const uint mousey=0) |
| Public method to get the action. | |
This class create a button with an image.
| void ImageButton::draw | ( | ) | [virtual] |
Method to draw the button.
Implements Widget.
| ushort ImageButton::mousebuttondown | ( | const uint | mousex = 0, |
|
| const uint | mousey = 0 | |||
| ) | [virtual] |
| void ImageButton::mousemotion | ( | const uint | mousex, | |
| const uint | mousey | |||
| ) | [virtual] |
Method to do an action when mouse is moved.
if the mouse pointer is inside the button if the button is visible -> invisible if the button is invisible -> visible
| mousex | is the coordinate x of the mouse pointer | |
| mousey | is the coordinate y of the mouse pointer |
Implements Widget.
1.4.7