20 #include <vstgui4/vstgui/lib/controls/cbuttons.h> 26 using namespace Params;
56 virtual void setTitleTag(ParamID iValue);
75 void setMouseEnabled(
bool bEnable)
override;
78 void draw(CDrawContext *context)
override;
81 void registerParameters()
override;
84 void valueChanged()
override;
90 virtual void unClick();
93 virtual void onClick();
145 virtual void drawButtonText(CDrawContext *context);
152 virtual void drawButtonImage(CDrawContext *context);
163 int32 fPrecisionOverride{-1};
169 bool fImageHasDisabledState{
false};
178 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:1314
int32 getPrecisionOverride() const
Allow to override the precision of the parameter.
Definition: TextButtonView.h:138
GradientPtr getDisabledGradient() const
Gradient used to draw the button when no image is provided and the button is disabled.
Definition: TextButtonView.h:70
void setOnClickListener(OnClickListener iListener)
Definition: TextButtonView.h:96
CColor fDisabledTextColor
Definition: TextButtonView.h:159
SharedPointer< CGradient > GradientSPtr
Definition: Types.h:58
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: TextButtonView.h:178
Extension of the CTextButton view to add more functionality.
Definition: TextButtonView.h:47
void setImage(BitmapPtr iImage)
Definition: TextButtonView.h:121
virtual void setTitleTag(ParamID iValue)
Attribute title-tag.
Definition: TextButtonView.cpp:40
GradientSPtr fDisabledGradient
Definition: TextButtonView.h:160
BitmapPtr getImage() const
The image for the button.
Definition: TextButtonView.h:120
This class can be used to extend VSTGUI classes directly while still benefiting from the extensions a...
Definition: CustomView.h:335
virtual void setDisabledTextColor(CColor const &iColor)
Attribute disabled-text-color.
Definition: TextButtonView.h:67
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:50
std::function< void()> OnClickListener
Definition: TextButtonView.h:50
Definition: CustomController.h:24
ParamID getTitleTag() const
Optional id of the parameter whose string representation (IGUIParameter::toUTF8String()) will be used...
Definition: TextButtonView.h:61
void setImageHasDisabledState(bool iValue)
Definition: TextButtonView.h:128
virtual void setDisabledGradient(GradientPtr iGradient)
Attribute disabled-gradient.
Definition: TextButtonView.h:73
void setPrecisionOverride(int32 iPrecisionOverride)
Definition: TextButtonView.h:139
CColor const & getDisabledTextColor() const
Color used to draw the title when no image is provided and the button is disabled.
Definition: TextButtonView.h:64
CBitmap * BitmapPtr
Definition: Types.h:49
bool getImageHasDisabledState() const
Used when drawing the image.
Definition: TextButtonView.h:127
Definition: TextButtonView.h:175
constexpr ParamID UNDEFINED_PARAM_ID
Constant used throughout the code to test whether the ParamID represents a valid id or an undefined o...
Definition: Types.h:47
TextButtonView(const CRect &iSize)
Definition: TextButtonView.h:53
CGradient * GradientPtr
Definition: Types.h:57