Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
TCustomViewCreator< TView >::ListAttribute< T > Class Template Reference

Specialization for a list of possible values defined by the AttributeMap. More...

Inherits TCustomViewCreator< TView >::TAttribute< T, T(TView::*)() const, void(TView::*)(T)>.

Public Member Functions

bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, T &oValue) const override
 Subclasses need to implement this method to convert a string (iAttributeValue) to a T.
IViewCreator::AttrType getType () override
 ListAttribute (std::string const &iName, typename super_type::Getter iGetter, typename super_type::Setter iSetter, AttrValInitList< T > const &iAttributeValues)
Public Member Functions inherited from TCustomViewCreator< TView >::TAttribute< T, T(TView::*)() const, void(TView::*)(T)>
bool apply (CView *iView, const UIAttributes &iAttributes, const IUIDescription *iDescription) override
 apply => calls the setter on the view to set the attribute (use fromString)
IViewCreator::AttrType getType () override
 TAttribute (std::string const &iName, Getter iGetter, Setter iSetter)
Public Member Functions inherited from ViewAttribute
std::string getName () const
 Name of the attribute (which ends up being an attribute in the xml file) Ex: <view back-color="~ BlackCColor" .../> => back-color.
 ViewAttribute (std::string iName)

Protected Attributes

AttrValMap< T > const fAttributeValuesMap

Private Types

using super_type = ByValAttribute<T>

Additional Inherited Members

Public Types inherited from TCustomViewCreator< TView >::TAttribute< T, T(TView::*)() const, void(TView::*)(T)>
using Getter
using Setter

Detailed Description

template<typename TView>
template<typename T>
class pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::ListAttribute< T >

Specialization for a list of possible values defined by the AttributeMap.

Member Typedef Documentation

◆ super_type

template<typename TView>
template<typename T>
using super_type = ByValAttribute<T>
private

Constructor & Destructor Documentation

◆ ListAttribute()

template<typename TView>
template<typename T>
ListAttribute ( std::string const & iName,
typename super_type::Getter iGetter,
typename super_type::Setter iSetter,
AttrValInitList< T > const & iAttributeValues )
inline

Member Function Documentation

◆ fromString()

template<typename TView>
template<typename T>
bool fromString ( IUIDescription const * iDescription,
std::string const & iAttributeValue,
T & oValue ) const
inlineoverridevirtual

Subclasses need to implement this method to convert a string (iAttributeValue) to a T.

Returns true if the conversion is possible in which case the result is written to oValue, false otherwise.

Reimplemented from TCustomViewCreator< TView >::TAttribute< T, T(TView::*)() const, void(TView::*)(T)>.

◆ getType()

template<typename TView>
template<typename T>
IViewCreator::AttrType getType ( )
inlineoverridevirtual
Returns
the type of this attribute => subclass will define it

Implements ViewAttribute.

Member Data Documentation

◆ fAttributeValuesMap

template<typename TView>
template<typename T>
AttrValMap<T> const fAttributeValuesMap
protected

The documentation for this class was generated from the following file: