22 kLegacyHandleLineDrawing = 0,
23 kHandleCircleDrawing = 1 << 0,
24 kCoronaDrawing = 1 << 1,
25 kCoronaFromCenter = 1 << 2,
26 kCoronaInverted = 1 << 3,
27 kCoronaLineDashDot = 1 << 4,
28 kCoronaOutline = 1 << 5,
29 kCoronaLineCapButt = 1 << 6,
30 kSkipHandleDrawing = 1 << 7,
40 virtual void setStartAngle (
float val);
41 virtual float getStartAngle ()
const {
return startAngle; }
43 virtual void setRangeAngle (
float val);
44 virtual float getRangeAngle ()
const {
return rangeAngle; }
46 virtual void valueToPoint (
CPoint& point)
const;
47 virtual float valueFromPoint (
CPoint& point)
const;
49 virtual CCoord getInsetValue ()
const {
return inset; }
50 virtual void setInsetValue (CCoord val) { inset = val; }
52 virtual int32_t getDrawStyle ()
const {
return drawStyle; }
53 virtual void setDrawStyle (int32_t style);
55 virtual CColor getCoronaColor ()
const {
return coronaColor; }
56 virtual void setCoronaColor (
CColor color);
58 virtual CCoord getCoronaInset ()
const {
return coronaInset; }
59 virtual void setCoronaInset (CCoord inset);
61 virtual CColor getColorShadowHandle ()
const {
return colorShadowHandle; }
62 virtual void setColorShadowHandle (
CColor color);
64 virtual CColor getColorHandle ()
const {
return colorHandle; }
65 virtual void setColorHandle (
CColor color);
67 virtual CCoord getHandleLineWidth ()
const {
return handleLineWidth; }
68 virtual void setHandleLineWidth (CCoord width);
70 virtual CCoord getCoronaOutlineWidthAdd ()
const {
return coronaOutlineWidthAdd; }
71 virtual void setCoronaOutlineWidthAdd (CCoord width);
73 virtual CBitmap* getHandleBitmap ()
const {
return pHandle; }
74 virtual void setHandleBitmap (
CBitmap* bitmap);
76 virtual void setZoomFactor (
float val) { zoomFactor = val; }
77 virtual float getZoomFactor ()
const {
return zoomFactor; }
86 void setMin (
float val)
override;
87 void setMax (
float val)
override;
98 ~
CKnob () noexcept
override;
100 virtual void drawCoronaOutline (
CDrawContext* pContext)
const;
102 virtual void drawHandleAsCircle (
CDrawContext* pContext)
const;
103 virtual void drawHandleAsLine (
CDrawContext* pContext)
const;
105 void addArc (
CGraphicsPath* path,
const CRect& r,
double startAngle,
double sweepAngle)
const;
110 CColor colorHandle, colorShadowHandle, coronaColor;
111 CCoord handleLineWidth;
114 CCoord coronaOutlineWidthAdd;
117 float startAngle, rangeAngle;
148 void setInverseBitmap (
bool val) { bInverseBitmap = val; }
149 bool getInverseBitmap ()
const {
return bInverseBitmap; }
155 void setHeightOfOneImage (
const CCoord& height)
override;
157 void setNumSubPixmaps (int32_t numSubPixmaps)
override { IMultiBitmapControl::setNumSubPixmaps (numSubPixmaps);
invalid (); }
161 ~
CAnimKnob () noexcept
override =
default;
void draw(CDrawContext *pContext) override
called if the view should draw itself
Definition: cknob.cpp:749
void draw(CDrawContext *pContext) override
called if the view should draw itself
Definition: cknob.cpp:144
CMouseEventResult onMouseUp(CPoint &where, const CButtonState &buttons) override
called when a mouse up event occurs
Definition: cknob.cpp:347
Rect structure.
Definition: crect.h:17
CAnimKnob(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, const CPoint &offset=CPoint(0, 0))
Definition: cknob.cpp:676
a bitmap knob control
Definition: cknob.h:137
Definition: xmlparse.c:181
Definition: vstkeycode.h:12
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
RGBA Color structure.
Definition: ccolor.h:15
a knob control
Definition: cknob.h:18
Graphics Path Object.
Definition: cgraphicspath.h:19
CMouseEventResult onMouseMoved(CPoint &where, const CButtonState &buttons) override
called when a mouse move event occurs
Definition: cknob.cpp:371
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
base class of all VSTGUI controls
Definition: ccontrol.h:76
bool drawFocusOnTop() override
Definition: cknob.cpp:120
bool sizeToFit() override
resize view to optimal size
Definition: cknob.cpp:716
CMouseEventResult onMouseCancel() override
called when mouse tracking should be canceled
Definition: cknob.cpp:355
virtual void invalid()
mark whole view as invalid
Definition: cview.h:63
bool sizeToFit() override
resize view to optimal size
Definition: cknob.cpp:105
CKnob(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, CBitmap *handle, const CPoint &offset=CPoint(0, 0), int32_t drawStyle=kLegacyHandleLineDrawing)
Definition: cknob.cpp:40
bool onWheel(const CPoint &where, const float &distance, const CButtonState &buttons) override
called if a mouse wheel event is happening over this view
Definition: cknob.cpp:419
int32_t onKeyDown(VstKeyCode &keyCode) override
called if a key down event occurs and this view has focus
Definition: cknob.cpp:447
Point structure.
Definition: cpoint.h:17
bool getFocusPath(CGraphicsPath &outPath) override
Definition: cknob.cpp:130
void setBackground(CBitmap *background) override
set the background image of this view
Definition: cknob.cpp:739
void setViewSize(const CRect &rect, bool invalid=true) override
set views size
Definition: cknob.cpp:98
Definition: icontrollistener.h:14
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: cknob.cpp:292
interface for controls with sub images
Definition: ccontrol.h:182