27using namespace VSTGUI;
65 void draw(CDrawContext *iContext)
override;
134 void setViewSize(
const CRect &rect,
bool invalid =
true)
override;
143 CMouseEventResult
onMouseDown(CPoint &where,
const CButtonState &buttons)
override;
146 CMouseEventResult
onMouseMoved(CPoint &where,
const CButtonState &buttons)
override;
149 CMouseEventResult
onMouseUp(CPoint &where,
const CButtonState &buttons)
override;
167 static constexpr auto kEqualCoord = [](
double a,
double b) {
return std::abs(a - b) < 0.01; };
323 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
Represents an optional parameter (Jmb, Vst or no param at all).
Definition GUIOptionalParam.h:48
Definition DrawContext.h:67
CustomViewCreator(char const *iViewName=nullptr, char const *iDisplayName=nullptr, char const *iBaseViewName=VSTGUI::UIViewCreator::kCView)
Definition CustomViewCreator.h:1330
Class you should inherit from if you want to write a custom view.
Definition CustomView.h:61
CustomView(const CRect &iSize)
Definition CustomView.cpp:30
void markDirty()
Marks this view dirty which will (at the appropriate time in the rendering lifecycle) trigger a call ...
Definition CustomView.h:177
void registerBooleanAttribute(std::string const &iName, BooleanAttribute::Getter iGetter, BooleanAttribute::Setter iSetter)
Definition CustomViewCreator.h:1114
void registerMarginAttribute(std::string const &iName, MarginAttribute::Getter iGetter, MarginAttribute::Setter iSetter)
Definition CustomViewCreator.h:1006
void registerColorAttribute(std::string const &iName, ColorAttribute::Getter iGetter, ColorAttribute::Setter iSetter)
Definition CustomViewCreator.h:966
void registerDoubleAttribute(std::string const &iName, FloatAttribute< double >::Getter iGetter, FloatAttribute< double >::Setter iSetter)
Definition CustomViewCreator.h:1104
void registerRangeAttribute(std::string const &iName, RangeAttribute::Getter iGetter, RangeAttribute::Setter iSetter)
Definition CustomViewCreator.h:1016
void registerTagAttribute(std::string const &iName, TagAttribute::Getter iGetter, TagAttribute::Setter iSetter)
Definition CustomViewCreator.h:1063
void registerListAttribute(std::string const &iName, ListAttribute< T >::Getter iGetter, ListAttribute< T >::Setter iSetter, AttrValInitList< T > const &iAttributeValues)
Definition CustomViewCreator.h:1052
static constexpr T clamp(const U &iValue, const T &iLower, const T &iUpper)
Make sure that the value remains within its bounds.
Definition Misc.h:34
static constexpr double mapValueDP(double iValue, double iFromLow, double iFromHigh, double iToLow, double iToHigh, bool iClamp=true)
Convenient shortcut for single precision.
Definition Lerp.h:230
std::unique_ptr< typename GUIOptionalParam< T >::EditorType > GUIOptionalParamEditor
Definition GUIOptionalParam.h:174
Definition CustomController.h:26
CRect AbsoluteRect
Definition DrawContext.h:64
CCoord RelativeCoord
Definition DrawContext.h:59
Utils::Range< CCoord > Range
Defines a Range.
Definition Types.h:62
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:48
Margin is a similar concept to css: used to create space around elements, outside of any defined bord...
Definition LookAndFeel.h:34