20 #include <vstgui4/vstgui/lib/controls/ccontrol.h> 21 #include <vstgui4/vstgui/lib/cdrawcontext.h> 52 void draw(CDrawContext *iContext)
override;
55 virtual void drawHeldButton(CDrawContext *iContext);
58 virtual void drawReleasedButton(CDrawContext *iContext);
61 CMouseEventResult onMouseDown(CPoint &where,
const CButtonState &buttons)
override;
62 CMouseEventResult onMouseUp(CPoint &where,
const CButtonState &buttons)
override;
63 CMouseEventResult onMouseCancel()
override;
64 int32_t onKeyDown(VstKeyCode &keyCode)
override;
65 int32_t onKeyUp(VstKeyCode &keyCode)
override;
68 bool isHeld()
const {
return fHeld; }
72 void setHeldColor(CColor
const &iColor) { fHeldColor = iColor; markDirty(); }
100 void setStepIncrement(
double iStepIncrement) { fStepIncrement = iStepIncrement; fButtonPolygon =
nullptr; }
115 void setWrap(
bool iFlag) { fWrap = iFlag; markDirty(); }
119 void registerParameters()
override;
127 virtual ParamValue computeNextValue(
double iIncrement)
const;
132 virtual CDrawContext::PointList *getButtonPolygon();
135 void setViewSize(
const CRect &rect,
bool invalid)
override;
143 double fStepIncrement{1.0};
144 double fShiftStepIncrement{0.0};
146 CColor fHeldColor{kRedCColor};
147 CColor fReleasedColor{kGreyCColor};
149 std::unique_ptr<CDrawContext::PointList> fButtonPolygon{};
155 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
Definition: CustomViewCreator.h:981
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:50
CBitmap * BitmapPtr
Definition: Types.h:49
Definition: CustomControlView.h:63