Jamba  3.1.0
pongasoft::VST::GUI::Views::ViewAttribute Class Referenceabstract

#include <CustomViewCreator.h>

Inherited by pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >.

Public Member Functions

virtual bool apply (CView *iView, const UIAttributes &iAttributes, const IUIDescription *iDescription)=0
 
virtual bool getAttributeValue (CView *iView, const IUIDescription *iDescription, std::string &oStringValue) const =0
 
std::string getName () const
 
virtual IViewCreator::AttrType getType ()=0
 
 ViewAttribute (std::string iName)
 

Private Attributes

std::string fName
 

Detailed Description

Base abstract class for an attribute of a view

Constructor & Destructor Documentation

◆ ViewAttribute()

pongasoft::VST::GUI::Views::ViewAttribute::ViewAttribute ( std::string  iName)
inlineexplicit

Member Function Documentation

◆ apply()

virtual bool pongasoft::VST::GUI::Views::ViewAttribute::apply ( CView *  iView,
const UIAttributes &  iAttributes,
const IUIDescription *  iDescription 
)
pure virtual

Extracts the value from iAttributes for getName() attribute and "apply" it on the view provided. Subclass will handle the extraction based on type.

Returns
false if view is not of the right type or could not extract

Implemented in pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >.

◆ getAttributeValue()

virtual bool pongasoft::VST::GUI::Views::ViewAttribute::getAttributeValue ( CView *  iView,
const IUIDescription *  iDescription,
std::string &  oStringValue 
) const
pure virtual

Extracts the value from the view for this attribute (getName()) and store it in oStringValue. Subclass will handle the extraction based on type.

Returns
false if view is not of the right type or could not extract

Implemented in pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >.

◆ getName()

std::string pongasoft::VST::GUI::Views::ViewAttribute::getName ( ) const
inline

Name of the attribute (which ends up being an attribute in the xml file) Ex: <view back-color="~ BlackCColor" .../> => back-color

◆ getType()

Member Data Documentation

◆ fName

std::string pongasoft::VST::GUI::Views::ViewAttribute::fName
private

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