20 #include <vstgui4/vstgui/lib/cview.h> 33 using namespace VSTGUI;
34 using namespace Params;
110 void setBackColor(CColor
const &iColor);
118 void setEditorMode(
bool iEditorMode);
119 bool getEditorMode()
const;
125 virtual void onEditorModeChanged() {}
132 void draw(CDrawContext *iContext)
override;
137 virtual void drawBackColor(CDrawContext *iContext);
142 void drawStyleChanged();
147 void onParameterChange(ParamID iParamID)
override;
156 using CView::sizeToFit;
163 CRect vs(getViewSize());
165 vs.setHeight(iHeight);
166 setViewSize(vs,
true);
167 setMouseableArea(vs);
177 sizeToFit(iBitmap->getWidth(), iBitmap->getHeight() / iFrameCount);
192 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
211 template<
typename TView,
typename TGUIPluginState>
222 TView::initState(iGUIState);
233 template<
typename TGUIPluginState>
242 template<
typename TView>
247 template<
typename... Args>
248 explicit CustomViewAdapter(
const CRect &iSize, Args... args) : TView(iSize, args...), fTag{-1} {}
269 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
284 template<
typename TView,
typename TGUIPluginState>
289 template<
typename... Args>
CColor const & getBackColor() const
Definition: CustomView.h:111
bool sizeToFit(BitmapPtr iBitmap, int iFrameCount=1)
Definition: CustomView.h:173
Definition: GUIState.h:39
void initState(GUIState *iGUIState) override
Definition: CustomView.h:220
int32_t getCustomViewTag() const
Definition: CustomView.h:115
void registerTagAttribute(std::string const &iName, typename TagAttribute::Getter iGetter, typename TagAttribute::Setter iSetter)
Definition: CustomViewCreator.h:807
void markDirty()
Definition: CustomView.h:251
CBitmap * BitmapPtr
Definition: Types.h:35
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: CustomView.h:192
Definition: CustomView.h:100
void initState(GUIState *iGUIState) override
Definition: CustomView.h:294
void markDirty()
Definition: CustomView.h:150
bool getEditorMode() const
Definition: CustomView.cpp:113
int32_t getCustomViewTag() const
Definition: CustomView.h:255
Definition: CustomView.h:266
PluginView(const CRect &iSize)
Definition: CustomView.h:216
virtual void initState(GUIState *iGUIState)
Definition: PluginAccessor.h:37
void setCustomViewTag(int32_t iTag)
Definition: CustomView.h:114
Definition: CustomView.h:285
int32_t fTag
Definition: CustomView.h:184
Definition: PluginAccessor.h:33
Definition: CustomView.h:212
Definition: CustomView.h:243
Definition: CustomView.h:189
Definition: GUIParamCxAware.h:38
void sizeToFit(CCoord iWidth, CCoord iHeight)
Definition: CustomView.h:161
virtual void initState(GUIState *iGUIState)
Definition: GUIParamCxAware.cpp:37
void setEditorMode(bool iEditorMode)
Definition: CustomView.cpp:97
void setBackColor(CColor const &iColor)
Definition: CustomView.cpp:68
CustomViewAdapter(const CRect &iSize, Args... args)
Definition: CustomView.h:248
CColor fBackColor
Definition: CustomView.h:186
Definition: CustomViewCreator.h:121
bool fEditorMode
Definition: CustomView.h:185
PluginCustomViewAdapter(const CRect &iSize, Args... args)
Definition: CustomView.h:290
void onParameterChange(ParamID iParamID) override
Definition: CustomView.h:260
void setCustomViewTag(int32_t iTag)
Definition: CustomView.h:254
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: CustomView.h:269