21#include <vstgui4/vstgui/lib/controls/ccontrol.h>
22#include <vstgui4/vstgui/lib/cdrawcontext.h>
28using namespace VSTGUI;
80 void draw(CDrawContext *iContext)
override;
89 CMouseEventResult
onMouseDown(CPoint &where,
const CButtonState &buttons)
override;
90 CMouseEventResult
onMouseMoved(CPoint &where,
const CButtonState &buttons)
override;
91 CMouseEventResult
onMouseUp(CPoint &where,
const CButtonState &buttons)
override;
222 virtual CMouseEventResult
setNextValue(CPoint &iWhere,
const CButtonState &iButtons);
255 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
std::unique_ptr< EditorType > Editor
Definition GUIOptionalParam.h:59
CustomDiscreteControlView(const CRect &iSize)
Definition CustomControlView.h:157
CustomViewCreator(char const *iViewName=nullptr, char const *iDisplayName=nullptr, char const *iBaseViewName=VSTGUI::UIViewCreator::kCView)
Definition CustomViewCreator.h:1318
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition StepPadView.h:255
bool fWrap
Definition StepPadView.h:236
int32 fStepIncrement
Definition StepPadView.h:232
int32 fShiftStepIncrement
Definition StepPadView.h:233
bool getImageHasDisabledState() const
Flag to determine whether the image contains a disabled state (3 frames) or not (2 frames).
Definition StepPadView.h:143
EPositiveDirection getDirection() const
Defines the direction in which the mouse needs to be dragged in order to increase the value.
Definition StepPadView.h:212
void setDirection(EPositiveDirection iDirection)
Attribute positive-direction.
Definition StepPadView.h:214
EPositiveDirection fDirection
Definition StepPadView.h:242
void registerParameters() override
Registers the optional parameter using getControlTag() as its id.
Definition StepPadView.cpp:179
bool getInverse() const
Inverses the meaning of "held" and "released" in regards to drawing the view/image.
Definition StepPadView.h:195
CMouseEventResult onMouseUp(CPoint &where, const CButtonState &buttons) override
Definition StepPadView.cpp:145
void setWrap(bool iFlag)
Attribute wrap.
Definition StepPadView.h:187
int32 getStepIncrement() const
Value by which this pad will increment (positive) or decrement (negative) the parameter.
Definition StepPadView.h:149
bool fInverse
Definition StepPadView.h:241
void setHeldColor(CColor const &iColor)
attribute held-color
Definition StepPadView.h:104
CColor fHeldColor
Definition StepPadView.h:238
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
Definition StepPadView.cpp:116
void draw(CDrawContext *iContext) override
Definition StepPadView.cpp:30
bool sizeToFit() override
Definition StepPadView.cpp:199
virtual void drawHeldPad(CDrawContext *iContext)
Definition StepPadView.cpp:49
void setImage(BitmapPtr iImage)
Attribute pad-image.
Definition StepPadView.h:137
bool fHeld
State of the pad (true for held, false for released).
Definition StepPadView.h:230
double getShiftDragFactor() const
Defines how many pixels the mouse needs to move to go through the range of values when shift is being...
Definition StepPadView.h:178
CMouseEventResult onMouseCancel() override
Definition StepPadView.cpp:163
BitmapPtr getImage() const
The image to use to draw the pad.
Definition StepPadView.h:134
EPositiveDirection
Represents the direction the mouse needs to be moved to register a change.
Definition StepPadView.h:67
@ kLeft
Definition StepPadView.h:71
@ kRight
Definition StepPadView.h:70
@ kDown
Definition StepPadView.h:69
@ kUp
Definition StepPadView.h:68
StepPadView(const CRect &iSize)
Definition StepPadView.h:75
CColor const & getDisabledColor() const
When no image is provided and the control is disabled, this color is used instead.
Definition StepPadView.h:108
CPoint fMousePosition
Definition StepPadView.h:249
bool getWrap() const
Defines what happens when the value reaches its end of range after being incremented (resp.
Definition StepPadView.h:185
void setDisabledColor(CColor const &iColor)
attribute disabled-color
Definition StepPadView.h:110
GUIOptionalParam< int32 >::Editor fEditor
Definition StepPadView.h:248
double fShiftDragFactor
Definition StepPadView.h:235
void setStepIncrement(int32 iStepIncrement)
Attribute step-increment.
Definition StepPadView.h:151
BitmapSPtr fImage
Definition StepPadView.h:240
bool fImageHasDisabledState
Definition StepPadView.h:245
void setShiftDragFactor(double iShiftDragFactor)
Attribute shift-drag-factor.
Definition StepPadView.h:180
int32 getShiftStepIncrement() const
Value by which this pad will increment (positive) or decrement (negative) the parameter when the shif...
Definition StepPadView.h:157
void setImageHasDisabledState(bool iValue)
Attribute button-image.
Definition StepPadView.h:145
CColor const & getHeldColor() const
When no image is provided, the "released" color is the back color.
Definition StepPadView.h:102
void setDragFactor(double iDragFactor)
Attribute drag-factor.
Definition StepPadView.h:171
bool isHeld() const
Definition StepPadView.h:95
double fDragFactor
Definition StepPadView.h:234
void setInverse(bool iInverse)
Attribute inverse.
Definition StepPadView.h:197
virtual CMouseEventResult setNextValue(CPoint &iWhere, const CButtonState &iButtons)
Compute mouse movement and determine the next value for the control.
Definition StepPadView.cpp:208
CColor fDisabledColor
Definition StepPadView.h:239
CMouseEventResult onMouseMoved(CPoint &where, const CButtonState &buttons) override
Definition StepPadView.cpp:132
double getDragFactor() const
Defines how many pixels the mouse needs to move to go through the range of values.
Definition StepPadView.h:169
virtual void drawReleasedPad(CDrawContext *iContext)
Definition StepPadView.cpp:81
void setShiftStepIncrement(int32 iStepIncrement)
Attribute shift-step-increment.
Definition StepPadView.h:160
void registerColorAttribute(std::string const &iName, typename ColorAttribute::Getter iGetter, typename ColorAttribute::Setter iSetter)
Definition CustomViewCreator.h:952
void registerBitmapAttribute(std::string const &iName, typename BitmapAttribute::Getter iGetter, typename BitmapAttribute::Setter iSetter)
Definition CustomViewCreator.h:972
void registerIntegerAttribute(std::string const &iName, typename IntegerAttribute< TInt >::Getter iGetter, typename IntegerAttribute< TInt >::Setter iSetter)
Definition CustomViewCreator.h:1060
void registerBooleanAttribute(std::string const &iName, typename BooleanAttribute::Getter iGetter, typename BooleanAttribute::Setter iSetter)
Definition CustomViewCreator.h:1100
void registerListAttribute(std::string const &iName, typename ListAttribute< T >::Getter iGetter, typename ListAttribute< T >::Setter iSetter, AttrValInitList< T > const &iAttributeValues)
Definition CustomViewCreator.h:1038
void registerDoubleAttribute(std::string const &iName, typename FloatAttribute< double >::Getter iGetter, typename FloatAttribute< double >::Setter iSetter)
Definition CustomViewCreator.h:1090
Definition CustomController.h:25
CBitmap * BitmapPtr
Definition Types.h:50
SharedPointer< CBitmap > BitmapSPtr
Definition Types.h:51