34 virtual void setDrawTransparentHandle (
bool val) { bDrawTransparentEnabled = val; }
35 virtual bool getDrawTransparentHandle ()
const {
return bDrawTransparentEnabled; }
36 virtual void setMode (Mode newMode) { mode = newMode; }
37 virtual Mode getMode ()
const {
return mode; }
38 virtual void setOffsetHandle (
const CPoint& val);
39 virtual CPoint getOffsetHandle ()
const {
return offsetHandle; }
40 virtual void setOffset (
const CPoint& val) { offset = val; }
41 virtual CPoint getOffset ()
const {
return offset; }
43 virtual void setStyle (int32_t style);
44 virtual int32_t getStyle ()
const {
return style; }
46 virtual void setHandle (
CBitmap* pHandle);
47 virtual CBitmap* getHandle ()
const {
return pHandle; }
49 virtual void setZoomFactor (
float val) { zoomFactor = val; }
50 virtual float getZoomFactor ()
const {
return zoomFactor; }
61 kDrawValueFromCenter = 1 << 3,
62 kDrawInverted = 1 << 4
65 virtual void setDrawStyle (int32_t style);
66 virtual void setFrameWidth (CCoord width);
67 virtual void setFrameColor (
CColor color);
68 virtual void setBackColor (
CColor color);
69 virtual void setValueColor (
CColor color);
71 int32_t getDrawStyle ()
const {
return drawStyle; }
72 CCoord getFrameWidth ()
const {
return frameWidth; }
73 CColor getFrameColor ()
const {
return frameColor; }
74 CColor getBackColor ()
const {
return backColor; }
75 CColor getValueColor ()
const {
return valueColor; }
91 static bool kAlwaysUseZoomFactor;
98 float calculateDelta (
const CPoint& where,
CRect* handleRect =
nullptr)
const;
108 CCoord widthOfSlider;
109 CCoord heightOfSlider;
115 CCoord heightControl;
116 CCoord frameWidth {1.};
119 bool bDrawTransparentEnabled;
121 int32_t drawStyle {0};
122 CColor frameColor {kGreyCColor};
123 CColor backColor {kBlackCColor};
124 CColor valueColor {kWhiteCColor};
void setViewSize(const CRect &rect, bool invalid) override
set views size
Definition: cslider.cpp:174
Rect structure.
Definition: crect.h:17
Definition: xmlparse.c:181
CMouseEventResult onMouseCancel() override
called when mouse tracking should be canceled
Definition: cslider.cpp:449
Definition: vstkeycode.h:12
bool sizeToFit() override
resize view to optimal size
Definition: cslider.cpp:195
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
RGBA Color structure.
Definition: ccolor.h:15
CMouseEventResult onMouseMoved(CPoint &where, const CButtonState &buttons) override
called when a mouse move event occurs
Definition: cslider.cpp:477
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: cslider.cpp:420
a slider control
Definition: cslider.h:18
a vertical slider control
Definition: cslider.h:138
CVerticalSlider(const CRect &size, IControlListener *listener, int32_t tag, int32_t iMinPos, int32_t iMaxPos, CBitmap *handle, CBitmap *background, const CPoint &offset=CPoint(0, 0), const int32_t style=kBottom)
Definition: cslider.cpp:713
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
a horizontal slider control
Definition: cslider.h:151
Definition: customcontrols.cpp:8
base class of all VSTGUI controls
Definition: ccontrol.h:76
CMouseEventResult onMouseUp(CPoint &where, const CButtonState &buttons) override
called when a mouse up event occurs
Definition: cslider.cpp:466
CSlider(const CRect &size, IControlListener *listener, int32_t tag, int32_t iMinPos, int32_t iMaxPos, CBitmap *handle, CBitmap *background, const CPoint &offset=CPoint(0, 0), const int32_t style=kLeft|kHorizontal)
Definition: cslider.cpp:38
CHorizontalSlider(const CRect &size, IControlListener *listener, int32_t tag, int32_t iMinPos, int32_t iMaxPos, CBitmap *handle, CBitmap *background, const CPoint &offset=CPoint(0, 0), const int32_t style=kRight)
Definition: cslider.cpp:755
virtual void invalid()
mark whole view as invalid
Definition: cview.h:63
Point structure.
Definition: cpoint.h:17
int32_t onKeyDown(VstKeyCode &keyCode) override
called if a key down event occurs and this view has focus
Definition: cslider.cpp:583
bool onWheel(const CPoint &where, const float &distance, const CButtonState &buttons) override
called if a mouse wheel event is happening over this view
Definition: cslider.cpp:550
Definition: icontrollistener.h:14
void draw(CDrawContext *) override
called if the view should draw itself
Definition: cslider.cpp:227