Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CAUGuiButton Class Reference

CAUGuiButton - PushButtons, OnOffButtons, RadioButtons, Inc/DecButtons. More...

#include <CAUGuiButton.h>

Inheritance diagram for CAUGuiButton:

CAUGuiCtrl CAUGuiItem PoofButton List of all members.

Public Member Functions

 CAUGuiButton (CAUGuiMan *, CAAUParameter &, eRect *where, CAUGuiGraphic *fore, CAUGuiGraphic *back, CAUGuiBottonMode)
 constructor for a button that controls a Parameter

 CAUGuiButton (CAUGuiMan *, UInt32 theRange, eRect *, CAUGuiGraphic *, CAUGuiGraphic *, CAUGuiBottonMode)
 constructor for a button with CarbonControl of range theRange, no Parameter but arbitrary purpose

virtual ~CAUGuiButton ()
 destructor

virtual void draw (CGContextRef context, UInt32 portHeight)
 drawing

virtual void mouseDown (Point *P, bool, bool)
 mousing

virtual void mouseTrack (Point *P, bool, bool)
 mousing

virtual void mouseUp (Point *P, bool, bool)
 mousing

virtual void setUserProcedure (buttonUserProcedure theProc, void *theUserData)
 set callback to be called on mouse clicks

virtual void setOnValue (UInt32 v)
 set a value for radioButtons to build switchable groups


Detailed Description

CAUGuiButton - PushButtons, OnOffButtons, RadioButtons, Inc/DecButtons.

Buttons have several uses.

They can either manipulate Parameters or drive GUI specific functions

Incremental/Decremental buttons can be used to step through values within a Parameter's range

RadioButtons work in groups and interact by Carbon's notification scheme, just like they should do.

For any sort of button, callbacks can be installed to customize behaviour.

Definition at line 55 of file CAUGuiButton.h.


Constructor & Destructor Documentation

CAUGuiButton::CAUGuiButton CAUGuiMan ,
CAAUParameter &  ,
eRect where,
CAUGuiGraphic fore,
CAUGuiGraphic back,
CAUGuiBottonMode 
 

constructor for a button that controls a Parameter

Parameters:
where the region of the button
fore CAUGuiGraphic for foreground
back CAUGuiGraphic for foreground, can be NULL
If width and/or height of where are set to 0, they'll be set from background graphic or - if that is NULL - from foreground...

Definition at line 12 of file CAUGuiButton.cpp.

References kCAUGui_res_1.

CAUGuiButton::CAUGuiButton CAUGuiMan ,
UInt32  theRange,
eRect ,
CAUGuiGraphic ,
CAUGuiGraphic ,
CAUGuiBottonMode 
 

constructor for a button with CarbonControl of range theRange, no Parameter but arbitrary purpose

Definition at line 37 of file CAUGuiButton.cpp.

CAUGuiButton::~CAUGuiButton  )  [virtual]
 

destructor

Definition at line 63 of file CAUGuiButton.cpp.


Member Function Documentation

void CAUGuiButton::draw CGContextRef  context,
UInt32  portHeight
[virtual]
 

drawing

Reimplemented from CAUGuiCtrl.

Definition at line 75 of file CAUGuiButton.cpp.

References CAUGuiGraphic::draw(), CAUGuiCtrl::getBounds(), CAUGuiCtrl::getCarbonControl(), CAUGuiGraphic::getImage(), kOnOffButton, kPushButton, kRadioButton, and eRect::to().

void CAUGuiButton::mouseDown Point *  P,
bool  ,
bool 
[virtual]
 

mousing

Reimplemented from CAUGuiCtrl.

Reimplemented in PoofButton.

Definition at line 134 of file CAUGuiButton.cpp.

References CAUGuiCtrl::getCarbonControl(), kDecButton, kIncButton, kOnOffButton, kPushButton, and kRadioButton.

Referenced by PoofButton::mouseDown().

void CAUGuiButton::mouseTrack Point *  P,
bool  ,
bool 
[virtual]
 

mousing

Reimplemented from CAUGuiCtrl.

Definition at line 186 of file CAUGuiButton.cpp.

void CAUGuiButton::mouseUp Point *  P,
bool  ,
bool 
[virtual]
 

mousing

Reimplemented from CAUGuiCtrl.

Reimplemented in PoofButton.

Definition at line 191 of file CAUGuiButton.cpp.

References CAUGuiCtrl::getCarbonControl(), kDecButton, kIncButton, kPushButton, and kRadioButton.

Referenced by PoofButton::mouseUp().

virtual void CAUGuiButton::setOnValue UInt32  v  )  [inline, virtual]
 

set a value for radioButtons to build switchable groups

Definition at line 93 of file CAUGuiButton.h.

void CAUGuiButton::setUserProcedure buttonUserProcedure  theProc,
void *  theUserData
[virtual]
 

set callback to be called on mouse clicks

Definition at line 221 of file CAUGuiButton.cpp.

References buttonUserProcedure.


The documentation for this class was generated from the following files:
(c) 2002 - 2003 by Urs Heckmann www.u-he.com
Generated on Thu May 6 15:13:14 2004 for CAUGui by doxygen 1.3.6