#include <CAUGuiKnob.h>
Inheritance diagram for CAUGuiKnob:

Public Member Functions | |
| CAUGuiKnob (CAUGuiMan *theChief, CAAUParameter &theAuvp, eRect *theWhere, CAUGuiResolution theRes, CAUGuiGraphic *theForeGround, CAUGuiGraphic *theBackground) | |
| constructor for a knob control | |
| virtual | ~CAUGuiKnob () |
| destructor | |
| virtual void | draw (CGContextRef context, UInt32 portHeight) |
| receives draws from CAUGuiControlHandler | |
| virtual void | mouseDown (Point *P, bool, bool) |
| receives Mouse clicks from CAUGuiControlHandler | |
| virtual void | mouseTrack (Point *P, bool, bool) |
| receives MouseTracking from CAUGuiControlHandler | |
| virtual void | mouseUp (Point *P, bool, bool) |
| receives Mouse ups from CAUGuiControlHandler | |
| virtual void | setCenter (SInt32 x, SInt32 y) |
| center of rotation/mouse stirring in relative coordinates | |
Knobs take either CAUGuiSpinImages or multiframed CAUGuiGraphics
CAUGuiSpinImages can be either rotating or trailing along a circular path.
a typical rotating knob:
CAUGuiGraphic* fore = new CAUGuiSpinImage ( "fore.png", -0.375f, 0.375f, 0, 0, false );
|
kMyParameter should have a range like 0.0 - 100.0
myCAUGuiMan is the View's CAUGuiMan (you can add controls directly to it, but you'll most likely get along better using CAUGuiPane or CAUGuiLayeredPane to manage controls...
now, for orbital behaviour, it get's a little tricky. You have to set the foreBounds in a way that the Pivot of the orbitting image sits at the top most position. It will then orbit around the center of the Knob control. You can displace the center with setCenter().
A bit of experimantation will be necessary, though...
Definition at line 66 of file CAUGuiKnob.h.
|
||||||||||||||||||||||||||||
|
constructor for a knob control
Definition at line 13 of file CAUGuiKnob.cpp. References CAUGuiGraphic::getHeight(), CAUGuiGraphic::getWidth(), eRect::h, kCAUGui_Knob, CAUGuiCtrl::setBounds(), CAUGuiCtrl::setTolerance(), CAUGuiItem::setType(), and eRect::w. |
|
|
destructor
Definition at line 58 of file CAUGuiKnob.cpp. |
|
||||||||||||
|
receives draws from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 70 of file CAUGuiKnob.cpp. References CAUGuiGraphic::draw(), CAUGuiCtrl::getBounds(), CAUGuiCtrl::getCarbonControl(), CAUGuiCtrl::getForeBounds(), CAUGuiGraphic::getImage(), CAUGuiItem::getType(), eRect::h, kCAUGui_SpinImage, eRect::to(), val, eRect::w, eRect::x, and eRect::y. |
|
||||||||||||||||
|
receives Mouse clicks from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 117 of file CAUGuiKnob.cpp. References cent_X, cent_Y, CAUGuiCtrl::getCarbonControl(), mouseTrack(), tmp, and val. |
|
||||||||||||||||
|
receives MouseTracking from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 132 of file CAUGuiKnob.cpp. References cent_X, cent_Y, CAUGuiCtrl::getCarbonControl(), CAUGuiCtrl::getRange(), CAUGuiCtrl::getResolution(), tmp, and val. Referenced by mouseDown(), and mouseUp(). |
|
||||||||||||||||
|
receives Mouse ups from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 159 of file CAUGuiKnob.cpp. References mouseTrack(). |
|
||||||||||||
|
center of rotation/mouse stirring in relative coordinates
Definition at line 100 of file CAUGuiKnob.h. |
| (c) 2002 - 2003 by Urs Heckmann www.u-he.com |
1.3.6