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

Public Member Functions | |
| CAUGuiSlider (CAUGuiMan *theChief, CAAUParameter &theAuvp, eRect *theWhere, UInt32 theOrientation, CAUGuiResolution theRes, CAUGuiGraphic *theForeGround, CAUGuiGraphic *theBackground) | |
| constructor for a slider control (aka fader) | |
| virtual | ~CAUGuiSlider () |
| 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 | |
Sliders can be more than just Faders. You can also build switches with 2 or more values upon them.
They are commonly used with a CAUGuiHandleImage to draw the faderhandle above its background. To achieve this in a proper manner, just create your foreBounds accordingly.
An example:
Assume you have a background image h_slider_back that is 120x20 pixels and a 10x10 pixel handle image h_slider_image the value should be adjustable in 100 steps (or better 101, taking 0-100 into account) where each pixel of the fader way should represent 1 step. The handle furthermore should be centered in a way to have a 5 pixel border at each side of the fader. You'd have to do this
eRect where;
|
This sets the eRect passed to the handle image to a size of 100x10 pixels that perfectly lays centered in our fader's bounds.
Definition at line 44 of file CAUGuiSlider.h.
|
||||||||||||||||||||||||||||||||
|
constructor for a slider control (aka fader)
Definition at line 14 of file CAUGuiSlider.cpp. References CAUGuiGraphic::getHeight(), CAUGuiGraphic::getWidth(), eRect::h, kCAUGui_Slider, CAUGuiCtrl::setBounds(), CAUGuiCtrl::setTolerance(), CAUGuiItem::setType(), and eRect::w. |
|
|
destructor
Definition at line 77 of file CAUGuiSlider.cpp. |
|
||||||||||||
|
receives draws from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 89 of file CAUGuiSlider.cpp. References CAUGuiGraphic::draw(), CAUGuiCtrl::getBounds(), CAUGuiCtrl::getCarbonControl(), CAUGuiCtrl::getForeBounds(), CAUGuiGraphic::getImage(), eRect::to(), and val. |
|
||||||||||||||||
|
receives Mouse clicks from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 120 of file CAUGuiSlider.cpp. References mouseTrack(), sldr_X, and sldr_Y. |
|
||||||||||||||||
|
receives MouseTracking from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 131 of file CAUGuiSlider.cpp. References CAUGuiCtrl::getBounds(), CAUGuiCtrl::getCarbonControl(), CAUGuiCtrl::getForeBounds(), eRect::h, eRect::set(), sldr_X, sldr_Y, val, eRect::w, eRect::x, and eRect::y. Referenced by mouseDown(), and mouseUp(). |
|
||||||||||||||||
|
receives Mouse ups from CAUGuiControlHandler
Reimplemented from CAUGuiCtrl. Definition at line 218 of file CAUGuiSlider.cpp. References mouseTrack(). |
| (c) 2002 - 2003 by Urs Heckmann www.u-he.com |
1.3.6