20 #include <vstgui4/vstgui/lib/controls/ccontrol.h> 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; }
116 CColor fOnColor{kRedCColor};
117 CColor fDisabledColor{kBlackCColor};
121 bool fImageHasDisabledState{
false};
127 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
Definition: CustomViewCreator.h:1049
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:50
CBitmap * BitmapPtr
Definition: Types.h:49
Definition: CustomControlView.h:63