WoopsiUI::BitmapButton Class Reference

#include <bitmapbutton.h>

Inheritance diagram for WoopsiUI::BitmapButton:
WoopsiUI::Gadget

List of all members.

Public Member Functions

 BitmapButton (s16 x, s16 y, u16 width, u16 height, u16 bitmapX, u16 bitmapY, const BitmapBase *bitmapNormal, const BitmapBase *bitmapClicked)
virtual void draw (Rect clipRect)
virtual bool click (s16 x, s16 y)
virtual bool release (s16 x, s16 y)

Protected Member Functions

virtual ~BitmapButton ()
 BitmapButton (const BitmapButton &bitmapButton)

Protected Attributes

const BitmapBase_bitmapNormal
const BitmapBase_bitmapClicked
u16 _bitmapX
u16 _bitmapY

Detailed Description

Class representing a clickable button that contains a bitmap image instead of text. Displays two bitmaps, one when the button is clicked, and one when it isn't. The bitmaps should be the same size.


Constructor & Destructor Documentation

WoopsiUI::BitmapButton::BitmapButton ( s16  x,
s16  y,
u16  width,
u16  height,
u16  bitmapX,
u16  bitmapY,
const BitmapBase bitmapNormal,
const BitmapBase bitmapClicked 
)

Constructor.

Parameters:
x The x co-ordinate of the button.
y The y co-ordinate of the button.
width The width of the button.
height The height of the button.
bitmapX The x co-ordinate at which the bitmaps will be drawn.
bitmapY The y co-ordinate at which the bitmaps will be drawn.
bitmapNormal Pointer to the unclicked bitmap.
bitmapClicked Pointer to the clicked bitmap.
virtual WoopsiUI::BitmapButton::~BitmapButton (  )  [inline, protected, virtual]

Destructor.

WoopsiUI::BitmapButton::BitmapButton ( const BitmapButton bitmapButton  )  [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

virtual bool WoopsiUI::BitmapButton::click ( s16  x,
s16  y 
) [virtual]

Click this gadget at the supplied co-ordinates.

Parameters:
x X co-ordinate of the click.
y Y co-ordinate of the click.
Returns:
True if the click was successful.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::BitmapButton::draw ( Rect  clipRect  )  [virtual]

Draw the region of the button that falls within the clipRect.

Parameters:
clipRect The clipping region to draw within.

Reimplemented from WoopsiUI::Gadget.

virtual bool WoopsiUI::BitmapButton::release ( s16  x,
s16  y 
) [virtual]

Release this gadget at the supplied co-ordinates

Parameters:
x X co-ordinate of the release.
y Y co-ordinate of the release.
Returns:
True if the release was successful.

Reimplemented from WoopsiUI::Gadget.


Member Data Documentation

Bitmap to display when button is clicked

Bitmap to display when button is not clicked

X co-ordinate of the bitmaps

Y co-ordinate of the bitmaps


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

Generated on Sun Nov 15 11:35:36 2009 for Woopsi by  doxygen 1.6.1