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

Specialization for an float attribute (which can be a double or a float, etc..). More...

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

Public Types

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

Public Member Functions

 FloatAttribute (std::string const &iName, Getter iGetter, Setter iSetter)
bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, TFloat &oValue) const override
IViewCreator::AttrType getType () override
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)
virtual bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, T &oValue) const
 Subclasses need to implement this method to convert a string (iAttributeValue) to a T.
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)

Detailed Description

template<typename TView>
template<typename TFloat>
class pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::FloatAttribute< TFloat >

Specialization for an float attribute (which can be a double or a float, etc..).

The view must have getter and setter as defined by the types below.

Member Typedef Documentation

◆ Getter

template<typename TView>
template<typename TFloat>
using Getter = typename ByValAttribute<TFloat>::Getter

◆ Setter

template<typename TView>
template<typename TFloat>
using Setter = typename ByValAttribute<TFloat>::Setter

Constructor & Destructor Documentation

◆ FloatAttribute()

template<typename TView>
template<typename TFloat>
FloatAttribute ( std::string const & iName,
Getter iGetter,
Setter iSetter )
inline

Member Function Documentation

◆ fromString()

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

◆ getType()

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

Implements ViewAttribute.


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