21#include <vstgui4/vstgui/uidescription/iviewcreator.h>
22#include <vstgui4/vstgui/uidescription/uiviewcreator.h>
23#include <vstgui4/vstgui/uidescription/uiviewfactory.h>
24#include <vstgui4/vstgui/uidescription/uiattributes.h>
25#include <vstgui4/vstgui/uidescription/detail/uiviewcreatorattributes.h>
26#include <vstgui4/vstgui/lib/crect.h>
27#include <vstgui4/vstgui/lib/ccolor.h>
28#include <vstgui4/vstgui/lib/cbitmap.h>
32#include <pongasoft/logging/logging.h>
41using namespace VSTGUI;
57 fName(std::move(iName))
63 virtual IViewCreator::AttrType
getType() = 0;
80 virtual bool apply(CView *iView,
const UIAttributes &iAttributes,
const IUIDescription *iDescription) = 0;
89 virtual bool getAttributeValue(CView *iView,
const IUIDescription *iDescription, std::string &oStringValue)
const = 0;
94 virtual bool getPossibleListValues(std::list<const std::string *> &iValues)
const
108template<
typename TView>
110 const UIAttributes &iAttributes,
111 const IUIDescription * ) {
return new TView(iSize); }
156template<
typename TView>
165 template<
typename T,
typename TGetter,
typename TSetter>
184 return IViewCreator::kUnknownType;
191 virtual bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue, T &oValue)
const
197 bool apply(CView *iView,
const UIAttributes &iAttributes,
const IUIDescription *iDescription)
override
199 auto *tv =
dynamic_cast<TView *
>(iView);
202 auto attributeValue = iAttributes.getAttributeValue(
getName());
206 if(
fromString(iDescription, *attributeValue, value))
208 std::invoke(
fSetter, tv, value);
221 virtual bool toString(IUIDescription
const *iDescription, T
const &iValue, std::string &oStringValue)
const
228 bool getAttributeValue(CView *iView,
const IUIDescription *iDescription, std::string &oStringValue)
const override
230 auto *tv =
dynamic_cast<TView *
>(iView);
233 auto value = std::invoke(fGetter, tv);
234 return toString(iDescription, value, oStringValue);
257 using ByRefAttribute = TAttribute<T, T
const &(TView::*)() const,
void (TView::*)(T const &)>;
274 return IViewCreator::kTagType;
278 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
TagID &oValue)
const override
280 if(iAttributeValue.length() != 0)
282 auto tag =
static_cast<TagID>(iDescription->getTagForName(iAttributeValue.c_str()));
285 char *endPtr =
nullptr;
286 tag =
static_cast<TagID>(strtol(iAttributeValue.c_str(), &endPtr, 10));
287 if(endPtr == iAttributeValue.c_str())
303 bool toString(IUIDescription
const *iDescription,
const TagID &iValue, std::string &oStringValue)
const override
307 UTF8StringPtr controlTag = iDescription->lookupControlTagName(iValue);
310 oStringValue = controlTag;
324 template<
typename TInt>
338 return IViewCreator::kIntegerType;
342 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue, TInt &oValue)
const override
344 char *endPtr =
nullptr;
345 auto value =
static_cast<TInt
>(strtol(iAttributeValue.c_str(), &endPtr, 10));
346 if(endPtr == iAttributeValue.c_str())
348 DLOG_F(WARNING,
"could not convert <%s> to an integer", iAttributeValue.c_str());
357 bool toString(IUIDescription
const *iDescription,
const TInt &iValue, std::string &oStringValue)
const override
359 std::stringstream str;
361 oStringValue = str.str();
371 template<
typename TFloat>
385 return IViewCreator::kFloatType;
389 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue, TFloat &oValue)
const override
397 DLOG_F(WARNING,
"could not convert <%s> to a float", iAttributeValue.c_str());
403 bool toString(IUIDescription
const *iDescription,
const TFloat &iValue, std::string &oStringValue)
const override
405 std::stringstream str;
407 oStringValue = str.str();
430 return IViewCreator::kColorType;
434 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue, CColor &oValue)
const override
437 if(UIViewCreator::stringToColor(&iAttributeValue, color, iDescription))
447 bool toString(IUIDescription
const *iDescription,
const CColor &iValue, std::string &oStringValue)
const override
449 return UIViewCreator::colorToString(iValue, oStringValue, iDescription);
471 return IViewCreator::kGradientType;
475 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
GradientPtr &oValue)
const override
477 auto gradient = iDescription->getGradient(iAttributeValue.c_str());
488 bool toString(IUIDescription
const *iDescription,
GradientPtr const &iValue, std::string &oStringValue)
const override
492 auto name = iDescription->lookupGradientName(iValue);
521 return IViewCreator::kBooleanType;
525 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
bool &oValue)
const override
527 if(iAttributeValue ==
"true")
533 if(iAttributeValue ==
"false")
544 bool toString(IUIDescription
const *iDescription,
const bool &iValue, std::string &oStringValue)
const override
546 oStringValue = iValue ?
"true" :
"false";
568 return IViewCreator::kBitmapType;
572 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
BitmapPtr &oValue)
const override
575 if(UIViewCreator::stringToBitmap(&iAttributeValue, bitmap, iDescription))
585 bool toString(IUIDescription
const *iDescription,
BitmapPtr const &iValue, std::string &oStringValue)
const override
588 return UIViewCreator::bitmapToString(iValue, oStringValue, iDescription);
611 return IViewCreator::kFontType;
615 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
FontPtr &oValue)
const override
617 auto font = iDescription->getFont(iAttributeValue.c_str());
628 bool toString(IUIDescription
const *iDescription,
FontPtr const &iValue, std::string &oStringValue)
const override
632 auto fontName = iDescription->lookupFontName(iValue);
635 oStringValue = fontName;
657 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
Margin &oValue)
const override
665 if(std::find_if(parts.cbegin(), parts.cend(), [] (
auto f) {return std::isnan(f);}) != parts.cend())
668 if(parts.size() == 1)
670 oValue =
Margin{parts[0]};
677 oValue =
Margin{parts[0], parts[1], parts[2], parts[3]};
685 bool toString(IUIDescription
const *iDescription,
const Margin &iValue, std::string &oStringValue)
const override
687 std::stringstream str;
700 oStringValue = str.str();
719 bool fromString(IUIDescription
const *iDescription, std::string
const &iAttributeValue,
Range &oValue)
const override
727 if(std::find_if(parts.cbegin(), parts.cend(), [] (
auto f) {return std::isnan(f);}) != parts.cend())
730 if(parts.size() == 1)
731 oValue =
Range{parts[0]};
733 oValue =
Range{parts[0], parts[1]};
740 bool toString(IUIDescription
const *iDescription,
const Range &iValue, std::string &oStringValue)
const override
742 std::stringstream str;
751 oStringValue = str.str();
769 char iDelimiter =
',',
770 bool iSkipEmptyEntries =
false) :
778 std::string
const &iAttributeValue,
779 std::vector<std::string> &oValue)
const override
787 bool toString(IUIDescription
const *iDescription,
788 const std::vector<std::string> &iValue,
789 std::string &oStringValue)
const override
791 oStringValue.clear();
793 for(
auto &entry : iValue)
799 oStringValue += entry;
829 ,fAttributeValuesList{iAttributeValues}
837 return IViewCreator::kListType;
842 std::string
const &iAttributeValue,
843 T &oValue)
const override
851 DLOG_F(WARNING,
"Attribute value '%s' is not valid for '%s'", iAttributeValue.c_str(),
ViewAttribute::getName().c_str());
857 bool toString(IUIDescription
const *iDescription,
859 std::string &oStringValue)
const override
861 auto pos = std::find_if(std::begin(fAttributeValuesList),
862 std::end(fAttributeValuesList),
863 [&iValue](
auto entry) ->
bool {
864 return entry.second == iValue;
866 if(pos != std::end(fAttributeValuesList))
868 oStringValue = pos->first;
876 bool getPossibleListValues(std::list<const std::string *> &iValues)
const override
878 for(
auto const &p : fAttributeValuesList)
880 iValues.emplace_back(&p.first);
889 std::vector<typename AttrValMap<T>::value_type>
const fAttributeValuesList;
896 char const *iDisplayName =
nullptr,
897 char const *iBaseViewName = VSTGUI::UIViewCreator::kCView) :
904 if(iViewName !=
nullptr && iDisplayName !=
nullptr)
905 VSTGUI::UIViewFactory::registerViewCreator(*
this);
937 template<
typename XView>
945 if(std::string(
fBaseViewName) == std::string(VSTGUI::UIViewCreator::kCView))
1015 char iDelimiter =
',',
1016 bool iSkipEmptyEntries =
false)
1037 template<
typename T>
1039 typename ListAttribute<T>::Getter iGetter,
1040 typename ListAttribute<T>::Setter iSetter,
1059 template<
typename TInt>
1110 CView *
create(
const UIAttributes &attributes,
const IUIDescription *description)
const override
1112#ifdef JAMBA_DEBUG_LOGGING
1113 DLOG_F(INFO,
"CustomViewCreator<%s>::create()",
getViewName());
1123 bool apply(CView *view,
const UIAttributes &attributes,
const IUIDescription *description)
const override
1125 auto *tv =
dynamic_cast<TView *
>(view);
1132 attribute.second->apply(tv, attributes, description);
1143 attributeNames.emplace_back(attribute.first);
1154 return iter->second->getType();
1156 return kUnknownType;
1163 bool getAttributeValue(CView *iView,
1164 const std::string &iAttributeName,
1165 std::string &oStringValue,
1166 const IUIDescription *iDescription)
const override
1168 auto *cdv =
dynamic_cast<TView *
>(iView);
1176 return iter->second->getAttributeValue(cdv, iDescription, oStringValue);
1185 bool getPossibleListValues(
const std::string &iAttributeName, std::list<const std::string *> &iValues)
const override
1190 return iter->second->getPossibleListValues(iValues);
1199 template<
typename XView>
1211 fAttributes[iAttribute->getName()] = std::move(iAttribute);
1217 template<
typename TViewAttribute,
typename... Args>
1219 typename TViewAttribute::Getter iGetter,
1220 typename TViewAttribute::Setter iSetter,
1223 std::shared_ptr<ViewAttribute> cva;
1224 cva.reset(
new TViewAttribute(iName, iGetter, iSetter, std::forward<Args>(iArgs)...));
1238 template<
typename T>
1241 template<
typename T>
1314template<
typename TView,
typename TBaseView =
void>
1319 char const *iDisplayName =
nullptr,
1320 char const *iBaseViewName = VSTGUI::UIViewCreator::kCView) :
CustomViewCreator(char const *iViewName=nullptr, char const *iDisplayName=nullptr, char const *iBaseViewName=VSTGUI::UIViewCreator::kCView)
Definition CustomViewCreator.h:1318
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:566
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, BitmapPtr &oValue) const override
Definition CustomViewCreator.h:572
BitmapAttribute(std::string const &iName, typename ByValAttribute< BitmapPtr >::Getter iGetter, typename ByValAttribute< BitmapPtr >::Setter iSetter)
Definition CustomViewCreator.h:560
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:519
BooleanAttribute(std::string const &iName, typename ByValAttribute< bool >::Getter iGetter, typename ByValAttribute< bool >::Setter iSetter)
Definition CustomViewCreator.h:513
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, bool &oValue) const override
Definition CustomViewCreator.h:525
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, CColor &oValue) const override
Definition CustomViewCreator.h:434
ColorAttribute(std::string const &iName, typename ByRefAttribute< CColor >::Getter iGetter, typename ByRefAttribute< CColor >::Setter iSetter)
Definition CustomViewCreator.h:422
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:428
FloatAttribute(std::string const &iName, Getter iGetter, Setter iSetter)
Definition CustomViewCreator.h:379
typename ByValAttribute< TFloat >::Setter Setter
Definition CustomViewCreator.h:376
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:383
typename ByValAttribute< TFloat >::Getter Getter
Definition CustomViewCreator.h:375
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, TFloat &oValue) const override
Definition CustomViewCreator.h:389
FontAttribute(std::string const &iName, typename ByValAttribute< FontPtr >::Getter iGetter, typename ByValAttribute< FontPtr >::Setter iSetter)
Definition CustomViewCreator.h:603
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:609
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, FontPtr &oValue) const override
Definition CustomViewCreator.h:615
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:469
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, GradientPtr &oValue) const override
Definition CustomViewCreator.h:475
GradientAttribute(std::string const &iName, typename ByValAttribute< GradientPtr >::Getter iGetter, typename ByValAttribute< GradientPtr >::Setter iSetter)
Definition CustomViewCreator.h:463
typename ByValAttribute< TInt >::Setter Setter
Definition CustomViewCreator.h:329
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:336
typename ByValAttribute< TInt >::Getter Getter
Definition CustomViewCreator.h:328
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, TInt &oValue) const override
Definition CustomViewCreator.h:342
IntegerAttribute(std::string const &iName, Getter iGetter, Setter iSetter)
Definition CustomViewCreator.h:332
ListAttribute(std::string const &iName, typename super_type::Getter iGetter, typename super_type::Setter iSetter, AttrValInitList< T > const &iAttributeValues)
Definition CustomViewCreator.h:822
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.
Definition CustomViewCreator.h:841
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:835
ByValAttribute< T > super_type
Definition CustomViewCreator.h:818
AttrValMap< T > const fAttributeValuesMap
Definition CustomViewCreator.h:887
MarginAttribute(std::string const &iName, typename ByRefAttribute< Margin >::Getter iGetter, typename ByRefAttribute< Margin >::Setter iSetter)
Definition CustomViewCreator.h:651
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, Margin &oValue) const override
Definition CustomViewCreator.h:657
RangeAttribute(std::string const &iName, typename ByRefAttribute< Range >::Getter iGetter, typename ByRefAttribute< Range >::Setter iSetter)
Definition CustomViewCreator.h:713
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, Range &oValue) const override
Definition CustomViewCreator.h:719
Setter fSetter
Definition CustomViewCreator.h:244
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:182
TAttribute(std::string const &iName, Getter iGetter, Setter iSetter)
Definition CustomViewCreator.h:173
TGetter Getter
Definition CustomViewCreator.h:169
virtual bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, T &oValue) const
Definition CustomViewCreator.h:191
TSetter Setter
Definition CustomViewCreator.h:170
bool apply(CView *iView, const UIAttributes &iAttributes, const IUIDescription *iDescription) override
Definition CustomViewCreator.h:197
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, TagID &oValue) const override
Definition CustomViewCreator.h:278
TagAttribute(std::string const &iName, typename ByValAttribute< TagID >::Getter iGetter, typename ByValAttribute< TagID >::Setter iSetter)
Definition CustomViewCreator.h:266
IViewCreator::AttrType getType() override
Definition CustomViewCreator.h:272
bool fSkipEmptyEntries
Definition CustomViewCreator.h:809
bool fromString(IUIDescription const *iDescription, std::string const &iAttributeValue, std::vector< std::string > &oValue) const override
Definition CustomViewCreator.h:777
VectorStringAttribute(std::string const &iName, typename super_type::Getter iGetter, typename super_type::Setter iSetter, char iDelimiter=',', bool iSkipEmptyEntries=false)
Definition CustomViewCreator.h:766
ByRefAttribute< std::vector< std::string > > super_type
Definition CustomViewCreator.h:762
char fDelimiter
Definition CustomViewCreator.h:808
TAttribute< T, T const &(CustomViewAdapter::*)() const, void(CustomViewAdapter::*)(T const &)> ByRefAttribute
Definition CustomViewCreator.h:257
void registerColorAttribute(std::string const &iName, typename ColorAttribute::Getter iGetter, typename ColorAttribute::Setter iSetter)
Registers a color attribute with the given name and getter/setter.
Definition CustomViewCreator.h:952
char const * fBaseViewName
Definition CustomViewCreator.h:1231
void registerAttribute(std::string const &iName, typename TViewAttribute::Getter iGetter, typename TViewAttribute::Setter iSetter, Args &&...iArgs)
Generic register attribute.
Definition CustomViewCreator.h:1218
UTF8StringPtr getDisplayName() const override
Definition CustomViewCreator.h:923
CView * create(const UIAttributes &attributes, const IUIDescription *description) const override
This is the factory method which will instantiate the view.
Definition CustomViewCreator.h:1110
void registerFloatAttribute(std::string const &iName, typename FloatAttribute< float >::Getter iGetter, typename FloatAttribute< float >::Setter iSetter)
Registers a float attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1080
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:1012
~TCustomViewCreator() override
Definition CustomViewCreator.h:909
IdStringPtr getViewName() const override
Definition CustomViewCreator.h:917
void registerAttributes(TCustomViewCreator< XView > const &iOther)
This method is called to register all the attributes from another CustomViewCreator (used in case of ...
Definition CustomViewCreator.h:938
void registerIntAttribute(std::string const &iName, typename IntegerAttribute< int32_t >::Getter iGetter, typename IntegerAttribute< int32_t >::Setter iSetter)
Registers an int attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1070
friend class TCustomViewCreator
Definition CustomViewCreator.h:1200
void registerBitmapAttribute(std::string const &iName, typename BitmapAttribute::Getter iGetter, typename BitmapAttribute::Setter iSetter)
Registers a bitmap attribute with the given name and getter/setter.
Definition CustomViewCreator.h:972
bool getAttributeNames(std::list< std::string > &attributeNames) const override
Definition CustomViewCreator.h:1139
void registerIntegerAttribute(std::string const &iName, typename IntegerAttribute< TInt >::Getter iGetter, typename IntegerAttribute< TInt >::Setter iSetter)
Registers an Integer (any kind) attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1060
IdStringPtr getBaseViewName() const override
Definition CustomViewCreator.h:929
AttrType getAttributeType(const std::string &attributeName) const override
Definition CustomViewCreator.h:1149
void registerFontAttribute(std::string const &iName, typename FontAttribute::Getter iGetter, typename FontAttribute::Setter iSetter)
Registers a font attribute with the given name and getter/setter.
Definition CustomViewCreator.h:982
void registerAttribute(std::shared_ptr< ViewAttribute > iAttribute)
Internal method to register an attribute... check that names are not duplicate!
Definition CustomViewCreator.h:1205
void registerGradientAttribute(std::string const &iName, typename GradientAttribute::Getter iGetter, typename GradientAttribute::Setter iSetter)
Registers a gradient attribute with the given name and getter/setter.
Definition CustomViewCreator.h:962
TAttribute< T, T(CustomViewAdapter::*)() const, void(CustomViewAdapter::*)(T)> ByValAttribute
Definition CustomViewCreator.h:251
std::map< std::string, std::shared_ptr< ViewAttribute > > fAttributes
Definition CustomViewCreator.h:1234
void registerRangeAttribute(std::string const &iName, typename RangeAttribute::Getter iGetter, typename RangeAttribute::Setter iSetter)
Registers a Range attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1002
void registerBooleanAttribute(std::string const &iName, typename BooleanAttribute::Getter iGetter, typename BooleanAttribute::Setter iSetter)
Registers a boolean attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1100
char const * fViewName
Definition CustomViewCreator.h:1229
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:1049
char const * fDisplayName
Definition CustomViewCreator.h:1230
TCustomViewCreator(char const *iViewName=nullptr, char const *iDisplayName=nullptr, char const *iBaseViewName=VSTGUI::UIViewCreator::kCView)
Definition CustomViewCreator.h:895
void registerListAttribute(std::string const &iName, typename ListAttribute< T >::Getter iGetter, typename ListAttribute< T >::Setter iSetter, AttrValInitList< T > const &iAttributeValues)
Registers a list attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1038
void registerDoubleAttribute(std::string const &iName, typename FloatAttribute< double >::Getter iGetter, typename FloatAttribute< double >::Setter iSetter)
Registers a double attribute with the given name and getter/setter.
Definition CustomViewCreator.h:1090
bool apply(CView *view, const UIAttributes &attributes, const IUIDescription *description) const override
Extract all the attribute values and apply them to the view.
Definition CustomViewCreator.h:1123
void registerMarginAttribute(std::string const &iName, typename MarginAttribute::Getter iGetter, typename MarginAttribute::Setter iSetter)
Registers a Margin attribute with the given name and getter/setter.
Definition CustomViewCreator.h:992
Base abstract class for an attribute of a view.
Definition CustomViewCreator.h:53
std::string fName
Definition CustomViewCreator.h:101
virtual bool apply(CView *iView, const UIAttributes &iAttributes, const IUIDescription *iDescription)=0
Extracts the value from iAttributes for getName() attribute and "apply" it on the view provided.
std::string getName() const
Name of the attribute (which ends up being an attribute in the xml file) Ex: <view back-color="~ Blac...
Definition CustomViewCreator.h:69
virtual IViewCreator::AttrType getType()=0
ViewAttribute(std::string iName)
Definition CustomViewCreator.h:56
constexpr bool is_detected_v
Definition Cpp17.h:63
bool stringToFloat(const std::string &iString, TFloat &oValue)
Converts the string to a TFloat (float or double).
Definition StringUtils.h:71
std::vector< std::string > splitString(const std::string &iString, char iDelimiter, bool iSkipEmptyEntries)
Split a string according to a delimiter and returns a vector.
Definition StringUtils.cpp:31
std::vector< TFloat > splitFloats(const std::string &iString, char iDelimiter, bool iSkipEmptyEntries=false)
Converts the string to a an array of floats.
Definition StringUtils.h:104
Definition CustomViewCreator.h:1237
decltype(typename T::Creator()) creator_ctor_t
Definition CustomViewCreator.h:1239
constexpr auto is_creator_ctor_detected
Definition CustomViewCreator.h:1242
Definition CustomController.h:25
std::initializer_list< typename AttrValMap< T >::value_type > AttrValInitList
Defines the type to initialize an [AttrValMap], for an example check [TCustomViewCreator::registerLis...
Definition CustomViewCreator.h:122
std::map< std::string, T > AttrValMap
Defines a map of string to attribute value.
Definition CustomViewCreator.h:116
TView * createCustomView(CRect const &iSize, const UIAttributes &iAttributes, const IUIDescription *)
Factory method which creates the actual view.
Definition CustomViewCreator.h:109
CGradient * GradientPtr
Definition Types.h:58
CFontDesc * FontPtr
Definition Types.h:54
CBitmap * BitmapPtr
Definition Types.h:50
Utils::Range< CCoord > Range
Defines a Range.
Definition Types.h:64
ParamID TagID
Defining a type for tags.
Definition Types.h:58
constexpr TagID UNDEFINED_TAG_ID
Constant used to test whether the TagID represents a valid id or an undefined one.
Definition Types.h:62
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:48
T fFrom
Definition Lerp.h:341
T fTo
Definition Lerp.h:342
Margin is a similar concept to css: used to create space around elements, outside of any defined bord...
Definition LookAndFeel.h:34
CCoord fLeft
Definition LookAndFeel.h:62
CCoord fTop
Definition LookAndFeel.h:59
CCoord fRight
Definition LookAndFeel.h:60
CCoord fBottom
Definition LookAndFeel.h:61