Button Class Reference
[Toolkit classes]

#include <Button.h>

Inherits Graphic, and MouseListener.

Inherited by Bucket, and LearningSpot.

Collaboration diagram for Button:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Button ()
 Button (int normalType, int hoverType, int clickType, Point location, Point size)
 Button (int normalType, int hoverType, int clickType, Point location, Point size, PriorityEnum priority)
virtual ~Button ()
void draw (BITMAP *canvas, Point offset)
 This is the main reason for this class.
void mouseClick (MouseEvent *)
 Called when the mouse clicks on a MouseListener.
void mouseDrag (MouseEvent *)
 Called while the MouseListener is being dragged around, to give it updates on position.
void mouseRelease (MouseEvent *)
 Called when a MouseListener was being dragged, and it is let go of.
void mouseHover (MouseEvent *)
 Called when a MouseListener is being hovered on by the mouse.
void mouseExit (MouseEvent *)
 Called when a MouseListener was being hovered on and is suddenly no longer so.
void addClickListener (ClickListener *l)
void setImage (int type)
PriorityEnum priority ()
void setPriority (PriorityEnum priority)
Point getSize ()
bool containsPoint (Point p)

Protected Attributes

int normalType
int hoverType
int clickType
PriorityEnum buttonPriority
Point size
BITMAP * currentImage
std::list< ClickListener * > * clickListeners


Detailed Description


Constructor & Destructor Documentation

Button::Button (  ) 

Button::Button ( int  normalType,
int  hoverType,
int  clickType,
Point  location,
Point  size 
)

Button::Button ( int  normalType,
int  hoverType,
int  clickType,
Point  location,
Point  size,
PriorityEnum  priority 
)

Button::~Button (  )  [virtual]


Member Function Documentation

void Button::addClickListener ( ClickListener l  ) 

bool Button::containsPoint ( Point  p  )  [virtual]

Reimplemented from MouseListener.

void Button::draw ( BITMAP *  canvas,
Point  offset 
) [virtual]

This is the main reason for this class.

Implements Graphic.

Point Button::getSize (  )  [inline]

void Button::mouseClick ( MouseEvent  )  [virtual]

Called when the mouse clicks on a MouseListener.

Reimplemented from MouseListener.

Reimplemented in Bucket.

void Button::mouseDrag ( MouseEvent  )  [virtual]

Called while the MouseListener is being dragged around, to give it updates on position.

Reimplemented from MouseListener.

void Button::mouseExit ( MouseEvent  )  [virtual]

Called when a MouseListener was being hovered on and is suddenly no longer so.

Reimplemented from MouseListener.

void Button::mouseHover ( MouseEvent  )  [virtual]

Called when a MouseListener is being hovered on by the mouse.

Reimplemented from MouseListener.

void Button::mouseRelease ( MouseEvent  )  [virtual]

Called when a MouseListener was being dragged, and it is let go of.

Reimplemented from MouseListener.

PriorityEnum Button::priority (  )  [virtual]

Reimplemented from MouseListener.

Reimplemented in Bucket.

void Button::setImage ( int  type  ) 

void Button::setPriority ( PriorityEnum  priority  ) 


Member Data Documentation

std::list<ClickListener*>* Button::clickListeners [protected]

int Button::clickType [protected]

BITMAP* Button::currentImage [protected]

int Button::hoverType [protected]

int Button::normalType [protected]

Point Button::size [protected]


The documentation for this class was generated from the following files:

Generated on Mon Mar 16 14:33:06 2009 for LearningGaming by  doxygen 1.5.7.1