26 using namespace Params;
59 fBackColor = CColor{200, 200, 200};
63 void draw(CDrawContext *iContext)
override;
66 CMouseEventResult onMouseDown(CPoint &where,
const CButtonState &buttons)
override;
68 CMouseEventResult onMouseUp(CPoint &where,
const CButtonState &buttons)
override;
70 CMouseEventResult onMouseCancel()
override;
72 int32_t onKeyDown(VstKeyCode &keyCode)
override;
74 int32_t onKeyUp(VstKeyCode &keyCode)
override;
77 bool sizeToFit()
override;
84 void setOffStep(int32 iStep) { fOffStep = iStep; markDirty(); }
97 void setOnStep(int32 iStep) { fOnStep = iStep; markDirty(); }
103 int32 getComputedOnStep()
const;
106 bool isOff()
const {
return getControlValue() == getComputedOffStep(); }
116 bool isOn()
const {
return !isOff(); }
119 inline void setOff() { setControlValue(getComputedOffStep()); }
122 inline void setOn() { setControlValue(getComputedOnStep()); }
125 inline void setOnOrOff(
bool iOnOrOff) { iOnOrOff ? setOn() : setOff(); }
132 int32 toggleControlValue();
141 void setFrames(
int iFrames);
189 CColor fOnColor{kRedCColor};
191 bool fInverse{
false};
193 bool fPressed{
false};
199 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
Inherit from this class to provide the factory for a custom view.
Definition: CustomViewCreator.h:1311
constexpr auto ZERO_INT32
Definition: Constants.h:24
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:50
Definition: CustomController.h:24
Specialization of TCustomControlView for discrete values.
Definition: CustomControlView.h:152
CBitmap * BitmapPtr
Definition: Types.h:49