ImageButton Class Reference
[2D Graphical User Inteface]

Image Button Class

This class create a button with an image. More...

#include <Button.hh>

Inheritance diagram for ImageButton:

Inheritance graph
[legend]
List of all members.

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.

Detailed Description

Image Button Class

This class create a button with an image.

Author:
poltuiu
Date:
2006-03-27


Member Function Documentation

void ImageButton::draw (  )  [virtual]

Method to draw the button.

Note:
in this method coordinates are in the window and not in the father element

Implements Widget.

ushort ImageButton::mousebuttondown ( const uint  mousex = 0,
const uint  mousey = 0 
) [virtual]

Public method to get the action.

Returns:
the action of the Button

Reimplemented from Widget.

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

Parameters:
mousex is the coordinate x of the mouse pointer
mousey is the coordinate y of the mouse pointer

Implements Widget.


The documentation for this class was generated from the following files:
Generated on Sat Jun 23 16:10:49 2007 for Stechec/TBT by  doxygen 1.4.7