Public Member Functions | Protected Member Functions

ArrowButton Class Reference

A button with an arrow in it. More...

Inherits Button.

List of all members.

Public Member Functions

 ArrowButton (const String &buttonName, float arrowDirection, const Colour &arrowColour)
 Creates an ArrowButton.
 ~ArrowButton ()
 Destructor.

Protected Member Functions

void paintButton (Graphics &g, bool isMouseOverButton, bool isButtonDown)
 Subclasses should override this to actually paint the button's contents.
void buttonStateChanged ()
 Called when the button's up/down/over state changes.

Detailed Description

A button with an arrow in it.

See also:
Button

Constructor & Destructor Documentation

ArrowButton::ArrowButton ( const String buttonName,
float  arrowDirection,
const Colour arrowColour 
)

Creates an ArrowButton.

Parameters:
buttonNamethe name to give the button
arrowDirectionthe direction the arrow should point in, where 0.0 is pointing right, 0.25 is down, 0.5 is left, 0.75 is up
arrowColourthe colour to use for the arrow
ArrowButton::~ArrowButton (  )

Destructor.


Member Function Documentation

void ArrowButton::paintButton ( Graphics g,
bool  isMouseOverButton,
bool  isButtonDown 
) [protected, virtual]

Subclasses should override this to actually paint the button's contents.

It's better to use this than the paint method, because it gives you information about the over/down state of the button.

Parameters:
gthe graphics context to use
isMouseOverButtontrue if the button is either in the 'over' or 'down' state
isButtonDowntrue if the button should be drawn in the 'down' position

Implements Button.

void ArrowButton::buttonStateChanged (  ) [protected, virtual]

Called when the button's up/down/over state changes.

Subclasses can override this if they need to do something special when the button goes up or down.

See also:
isDown, isOver

Reimplemented from Button.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines