20 #include <vstgui4/vstgui/lib/controls/ccontrol.h> 29 using namespace VSTGUI;
58 fBackColor = CColor{200,200,200};
62 void draw(CDrawContext *iContext)
override;
65 virtual void drawOn(CDrawContext *iContext);
68 virtual void drawOff(CDrawContext *iContext);
71 CMouseEventResult onMouseDown(CPoint &where,
const CButtonState &buttons)
override;
72 CMouseEventResult onMouseUp(CPoint &where,
const CButtonState &buttons)
override;
73 CMouseEventResult onMouseCancel()
override;
74 int32_t onKeyDown(VstKeyCode &keyCode)
override;
75 int32_t onKeyUp(VstKeyCode &keyCode)
override;
78 bool sizeToFit()
override;
81 bool isOn()
const {
return getControlValue(); }
82 bool isOff()
const {
return !isOn(); }
86 void setOnColor(CColor
const &iColor) { fOnColor = iColor; }
101 CColor fOnColor{kRedCColor};
108 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
Definition: CustomViewCreator.h:981
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:36
CBitmap * BitmapPtr
Definition: Types.h:35
Definition: CustomControlView.h:63