ToolbarButton Class Reference

A type of button designed to go on a toolbar. More...

Inherits ToolbarItemComponent.

List of all members.

Public Member Functions

 ToolbarButton (int itemId, const String &labelText, Drawable *normalImage, Drawable *toggledOnImage)
 Creates a ToolbarButton.
 ~ToolbarButton ()
 Destructor.
bool getToolbarItemSizes (int toolbarDepth, bool isToolbarVertical, int &preferredSize, int &minSize, int &maxSize)
void paintButtonArea (Graphics &g, int width, int height, bool isMouseOver, bool isMouseDown)
void contentAreaChanged (const Rectangle< int > &newBounds)

Detailed Description

A type of button designed to go on a toolbar.

This simple button can have two Drawable objects specified - one for normal use and another one (optionally) for the button's "on" state if it's a toggle button.

See also:
Toolbar, ToolbarItemFactory, ToolbarItemComponent, Drawable, Button

Constructor & Destructor Documentation

ToolbarButton::ToolbarButton ( int  itemId,
const String labelText,
Drawable normalImage,
Drawable toggledOnImage 
)

Creates a ToolbarButton.

Parameters:
itemId the ID for this toolbar item type. This is passed through to the ToolbarItemComponent constructor
labelText the text to display on the button (if the toolbar is using a style that shows text labels). This is passed through to the ToolbarItemComponent constructor
normalImage a drawable object that the button should use as its icon. The object that is passed-in here will be kept by this object and will be deleted when no longer needed or when this button is deleted.
toggledOnImage a drawable object that the button can use as its icon if the button is in a toggled-on state (see the Button::getToggleState() method). If 0 is passed-in here, then the normal image will be used instead, regardless of the toggle state. The object that is passed-in here will be kept by this object and will be deleted when no longer needed or when this button is deleted.
ToolbarButton::~ToolbarButton (  ) 

Destructor.


Member Function Documentation

bool ToolbarButton::getToolbarItemSizes ( int  toolbarDepth,
bool  isToolbarVertical,
int &  preferredSize,
int &  minSize,
int &  maxSize 
) [virtual]

For internal use only.

Implements ToolbarItemComponent.

void ToolbarButton::paintButtonArea ( Graphics g,
int  width,
int  height,
bool  isMouseOver,
bool  isMouseDown 
) [virtual]

For internal use only.

Implements ToolbarItemComponent.

void ToolbarButton::contentAreaChanged ( const Rectangle< int > &  newBounds  )  [virtual]

For internal use only.

Implements ToolbarItemComponent.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:20 2010 for JUCE by  doxygen 1.6.3