19 CCoord heightOfOneImage, int32_t iMaxPositions,
CBitmap* background,
31 void setNumSubPixmaps (int32_t numSubPixmaps)
override 33 IMultiBitmapControl::setNumSubPixmaps (numSubPixmaps);
36 const CPoint& getOffset ()
const {
return offset; }
38 double getCoef ()
const {
return coef; }
39 int32_t normalizedToIndex (
float norm)
const 41 return static_cast<int32_t
> (norm * (getNumSubPixmaps () - 1) + 0.5f);
44 float indexToNormalized (int32_t index)
const 46 return static_cast<float> (index) / static_cast<float> (getNumSubPixmaps () - 1);
49 virtual double calculateCoef ()
const = 0;
50 virtual float calcNormFromPoint (
const CPoint& where)
const = 0;
55 float mouseStartValue;
76 double calculateCoef ()
const override;
77 float calcNormFromPoint (
const CPoint& where)
const override;
99 double calculateCoef ()
const override;
100 float calcNormFromPoint (
const CPoint& where)
const override;
128 void setNumSubPixmaps (int32_t numSubPixmaps)
override { IMultiBitmapControl::setNumSubPixmaps (numSubPixmaps);
invalid (); }
134 CMessageResult notify (
CBaseObject* sender, IdStringPtr message)
override;
141 float mouseStartValue;
bool sizeToFit() override
resize view to optimal size
Definition: cswitch.cpp:594
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: cswitch.cpp:71
a horizontal switch control
Definition: cswitch.h:86
void draw(CDrawContext *) override
called if the view should draw itself
Definition: cswitch.cpp:42
int32_t onKeyDown(VstKeyCode &keyCode) override
called if a key down event occurs and this view has focus
Definition: cswitch.cpp:199
Rect structure.
Definition: crect.h:17
bool onWheel(const CPoint &where, const float &distance, const CButtonState &buttons) override
called if a mouse wheel event is happening over this view
Definition: cswitch.cpp:545
CMouseEventResult onMouseUp(CPoint &where, const CButtonState &buttons) override
called when a mouse up event occurs
Definition: cswitch.cpp:90
CHorizontalSwitch(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, const CPoint &offset=CPoint(0, 0))
Definition: cswitch.cpp:247
Definition: xmlparse.c:181
Definition: vstkeycode.h:12
CMouseEventResult onMouseCancel() override
called when mouse tracking should be canceled
Definition: cswitch.cpp:446
CMouseEventResult onMouseMoved(CPoint &where, const CButtonState &buttons) override
called when a mouse move event occurs
Definition: cswitch.cpp:462
int32_t onKeyDown(VstKeyCode &keyCode) override
called if a key down event occurs and this view has focus
Definition: cswitch.cpp:502
CMouseEventResult onMouseUp(CPoint &where, const CButtonState &buttons) override
called when a mouse up event occurs
Definition: cswitch.cpp:433
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
Base Object with reference counter.
Definition: vstguibase.h:276
a switch control with 3 sub bitmaps
Definition: cswitch.h:109
CMouseEventResult onMouseMoved(CPoint &where, const CButtonState &buttons) override
called when a mouse move event occurs
Definition: cswitch.cpp:114
a vertical switch control
Definition: cswitch.h:63
bool sizeToFit() override
resize view to optimal size
Definition: cswitch.cpp:56
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
CVerticalSwitch(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, const CPoint &offset=CPoint(0, 0))
Definition: cswitch.cpp:150
base class of all VSTGUI controls
Definition: ccontrol.h:76
A timer class, which posts timer messages to CBaseObjects or calls a lambda function (c++11 only)...
Definition: cvstguitimer.h:18
void draw(CDrawContext *) override
called if the view should draw itself
Definition: cswitch.cpp:406
int32_t onKeyUp(VstKeyCode &keyCode) override
called if a key up event occurs and this view has focus
Definition: cswitch.cpp:527
int32_t onKeyDown(VstKeyCode &keyCode) override
called if a key down event occurs and this view has focus
Definition: cswitch.cpp:296
virtual void invalid()
mark whole view as invalid
Definition: cview.h:63
Point structure.
Definition: cpoint.h:17
CMouseEventResult onMouseCancel() override
called when mouse tracking should be canceled
Definition: cswitch.cpp:98
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: cswitch.cpp:423
Definition: icontrollistener.h:14
interface for controls with sub images
Definition: ccontrol.h:182
CRockerSwitch(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, const CPoint &offset=CPoint(0, 0), const int32_t style=kHorizontal)
Definition: cswitch.cpp:347