20 #include <vstgui4/vstgui/lib/cview.h> 34 using namespace Params;
54 void setBackColor(CColor
const &iColor);
62 void setEditorMode(
bool iEditorMode);
63 bool getEditorMode()
const;
69 virtual void onEditorModeChanged() {}
76 void draw(CDrawContext *iContext)
override;
81 virtual void drawBackColor(CDrawContext *iContext);
86 void drawStyleChanged();
91 void onParameterChange(ParamID iParamID)
override;
100 using CView::sizeToFit;
107 CRect vs(getViewSize());
109 vs.setHeight(iHeight);
110 setViewSize(vs,
true);
111 setMouseableArea(vs);
121 sizeToFit(iBitmap->getWidth(), iBitmap->getHeight() / iFrameCount);
136 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
155 template<
typename TView,
typename TGUIPluginState>
166 TView::initState(iGUIState);
177 template<
typename TGUIPluginState>
186 template<
typename TView>
191 template<
typename... Args>
192 explicit CustomViewAdapter(
const CRect &iSize, Args... args) : TView(iSize, args...), fTag{-1} {}
213 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
228 template<
typename TView,
typename TGUIPluginState>
233 template<
typename... Args>
CColor const & getBackColor() const
Definition: CustomView.h:55
bool sizeToFit(BitmapPtr iBitmap, int iFrameCount=1)
Definition: CustomView.h:117
Definition: GUIState.h:39
void initState(GUIState *iGUIState) override
Definition: CustomView.h:164
int32_t getCustomViewTag() const
Definition: CustomView.h:59
void registerTagAttribute(std::string const &iName, typename TagAttribute::Getter iGetter, typename TagAttribute::Setter iSetter)
Definition: CustomViewCreator.h:874
void markDirty()
Definition: CustomView.h:195
CBitmap * BitmapPtr
Definition: Types.h:49
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: CustomView.h:136
Definition: CustomView.h:44
void initState(GUIState *iGUIState) override
Definition: CustomView.h:238
void markDirty()
Definition: CustomView.h:94
bool getEditorMode() const
Definition: CustomView.cpp:112
int32_t getCustomViewTag() const
Definition: CustomView.h:199
Definition: CustomView.h:210
PluginView(const CRect &iSize)
Definition: CustomView.h:160
virtual void initState(GUIState *iGUIState)
Definition: PluginAccessor.h:37
void setCustomViewTag(int32_t iTag)
Definition: CustomView.h:58
Definition: CustomView.h:229
int32_t fTag
Definition: CustomView.h:128
Definition: PluginAccessor.h:33
Definition: CustomView.h:156
Definition: CustomView.h:187
Definition: CustomView.h:133
Definition: GUIParamCxAware.h:38
void sizeToFit(CCoord iWidth, CCoord iHeight)
Definition: CustomView.h:105
virtual void initState(GUIState *iGUIState)
Definition: GUIParamCxAware.cpp:37
void setEditorMode(bool iEditorMode)
Definition: CustomView.cpp:96
void setBackColor(CColor const &iColor)
Definition: CustomView.cpp:67
CustomViewAdapter(const CRect &iSize, Args... args)
Definition: CustomView.h:192
CColor fBackColor
Definition: CustomView.h:130
Definition: CustomViewCreator.h:123
bool fEditorMode
Definition: CustomView.h:129
PluginCustomViewAdapter(const CRect &iSize, Args... args)
Definition: CustomView.h:234
void onParameterChange(ParamID iParamID) override
Definition: CustomView.h:204
void setCustomViewTag(int32_t iTag)
Definition: CustomView.h:198
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: CustomView.h:213