bWidgets
Core widget toolkit designed for Blender
bWidgets::bwStyleProperties Class Reference

Manage a list of properties (bwStyleProperty instances). More...

#include <bwStyleProperties.h>

Public Types

using PropertyList = std::vector< std::unique_ptr< bwStyleProperty > >
 
using iterator = PropertyList::iterator
 
using const_iterator = PropertyList::const_iterator
 

Public Member Functions

auto lookup (const std::string_view &name) const -> const bwStyleProperty *
 
auto begin () -> iterator
 
auto end () -> iterator
 
auto begin () const -> const_iterator
 
auto end () const -> const_iterator
 
Property registration
auto addBool (const std::string_view &name, bool &reference) -> bwStyleProperty &
 
auto addBool (const std::string_view &name) -> bwStyleProperty &
 
auto addInteger (const std::string_view &name, int &reference) -> bwStyleProperty &
 
auto addInteger (const std::string_view &name) -> bwStyleProperty &
 
auto addFloat (const std::string_view &name, float &reference) -> bwStyleProperty &
 
auto addFloat (const std::string_view &name) -> bwStyleProperty &
 
auto addColor (const std::string_view &name, class bwColor &reference) -> bwStyleProperty &
 
auto addColor (const std::string_view &name) -> bwStyleProperty &
 
auto addProperty (const std::string_view &name, const bwStyleProperty::Type prop_type) -> bwStyleProperty &
 

Detailed Description

Manage a list of properties (bwStyleProperty instances).

This class can be used to do the following:

  • Add/register new properties (addFoo() functions).
  • Lookup a property from its identifier (lookup() function).
  • Get iterators to iterate over all properties.

Member Typedef Documentation

◆ const_iterator

using bWidgets::bwStyleProperties::const_iterator = PropertyList::const_iterator

◆ iterator

using bWidgets::bwStyleProperties::iterator = PropertyList::iterator

◆ PropertyList

using bWidgets::bwStyleProperties::PropertyList = std::vector<std::unique_ptr<bwStyleProperty> >

Member Function Documentation

◆ addBool() [1/2]

auto bWidgets::bwStyleProperties::addBool ( const std::string_view &  name) -> bwStyleProperty&

◆ addBool() [2/2]

auto bWidgets::bwStyleProperties::addBool ( const std::string_view &  name,
bool &  reference 
) -> bwStyleProperty&

◆ addColor() [1/2]

auto bWidgets::bwStyleProperties::addColor ( const std::string_view &  name) -> bwStyleProperty&

◆ addColor() [2/2]

auto bWidgets::bwStyleProperties::addColor ( const std::string_view &  name,
class bwColor reference 
) -> bwStyleProperty&

◆ addFloat() [1/2]

auto bWidgets::bwStyleProperties::addFloat ( const std::string_view &  name) -> bwStyleProperty&

◆ addFloat() [2/2]

auto bWidgets::bwStyleProperties::addFloat ( const std::string_view &  name,
float &  reference 
) -> bwStyleProperty&

◆ addInteger() [1/2]

auto bWidgets::bwStyleProperties::addInteger ( const std::string_view &  name) -> bwStyleProperty&

◆ addInteger() [2/2]

auto bWidgets::bwStyleProperties::addInteger ( const std::string_view &  name,
int &  reference 
) -> bwStyleProperty&

◆ addProperty()

auto bWidgets::bwStyleProperties::addProperty ( const std::string_view &  name,
const bwStyleProperty::Type  prop_type 
) -> bwStyleProperty&

◆ begin() [1/2]

auto bWidgets::bwStyleProperties::begin ( ) -> iterator

◆ begin() [2/2]

auto bWidgets::bwStyleProperties::begin ( ) const -> const_iterator

◆ end() [1/2]

auto bWidgets::bwStyleProperties::end ( ) -> iterator

◆ end() [2/2]

auto bWidgets::bwStyleProperties::end ( ) const -> const_iterator

◆ lookup()

auto bWidgets::bwStyleProperties::lookup ( const std::string_view &  name) const -> const bwStyleProperty*

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