73 virtual void afterCreate(IUIDescription
const *iDescription, IController *iController);
117 explicit Creator(
char const *iViewName =
nullptr,
char const *iDisplayName =
nullptr) :
132 const UIAttributes &iAttributes,
133 const IUIDescription *iDescription);
ParamID getSwitchControlTag() const
id for the parameter tied to switching.
Definition: SwitchViewContainer.h:59
Inherit from this class to provide the factory for a custom view.
Definition: CustomViewCreator.h:1312
SwitchViewContainer(const CRect &iSize)
Definition: SwitchViewContainer.cpp:26
virtual void switchCurrentView()
Called whenever something has changed to switch to a new current view.
Definition: SwitchViewContainer.cpp:67
const std::vector< std::string > & getTemplateNames() const
A comma separated list of template names.
Definition: SwitchViewContainer.h:66
This view offers dynamic switching between multiple views.
Definition: SwitchViewContainer.h:46
std::string fCurrentTemplateName
Definition: SwitchViewContainer.h:111
void viewContainerViewAdded(CViewContainer *container, CView *view) override
The only purpose of this callback (from IViewContainerListenerAdapter) is to catch the unavoidable ca...
Definition: SwitchViewContainer.cpp:112
IController * fUIController
Definition: SwitchViewContainer.h:103
GUIOptionalParam< int32 > fControlSwitch
Definition: SwitchViewContainer.h:106
void registerTagAttribute(std::string const &iName, typename TagAttribute::Getter iGetter, typename TagAttribute::Setter iSetter)
Registers a tag attribute with the given name and getter/setter.
Definition: CustomViewCreator.h:1048
virtual void setSwitchControlTag(ParamID iTag)
Attribute switch-control-tag
Definition: SwitchViewContainer.h:54
Definition: SwitchViewContainer.h:114
virtual void setCurrentView(CView *iCurrentView)
Sets the current view to the one provided (remove previous view from container children and add this ...
Definition: SwitchViewContainer.cpp:95
This class can be used to extend VSTGUI classes directly while still benefiting from the extensions a...
Definition: CustomView.h:335
virtual void afterCreate(IUIDescription const *iDescription, IController *iController)
Definition: SwitchViewContainer.cpp:43
IUIDescription const * fUIDescription
Definition: SwitchViewContainer.h:102
~SwitchViewContainer() override
Definition: SwitchViewContainer.cpp:34
ParamID fSwitchControlTag
Definition: SwitchViewContainer.h:105
Definition: CustomController.h:24
void registerParameters() override
Subclasses should override this method to register each parameter.
Definition: SwitchViewContainer.cpp:52
std::vector< std::string > fTemplateNames
Definition: SwitchViewContainer.h:108
Creator(char const *iViewName=nullptr, char const *iDisplayName=nullptr)
Definition: SwitchViewContainer.h:117
SwitchViewContainer * createCustomView< SwitchViewContainer >(CRect const &iSize, const UIAttributes &iAttributes, const IUIDescription *iDescription)
This specialization is required to inject the IUIDescription object used to dynamically create a view...
Definition: SwitchViewContainer.cpp:137
void onParameterChange(ParamID iParamID) override
This is the callback that should be implemented to handle parameter changes.
Definition: SwitchViewContainer.cpp:85
void registerVectorStringAttribute(std::string const &iName, typename VectorStringAttribute::Getter iGetter, typename VectorStringAttribute::Setter iSetter, char iDelimiter=',', bool iSkipEmptyEntries=false)
Registers a Range attribute with the given name and getter/setter.
Definition: CustomViewCreator.h:1011
void setTemplateNames(const std::vector< std::string > &iNames)
Definition: SwitchViewContainer.h:67
CView * fCurrentView
Definition: SwitchViewContainer.h:110
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
virtual std::string computeTemplateName(int iIndex)
Lookup the name of the template in the vector.
Definition: SwitchViewContainer.cpp:124