BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
bugui::color_converter< T, Value_t > Struct Template Reference

Povides convertion of color objects to device specific integer values. More...

#include <color_converter.hpp>

Inheritance diagram for bugui::color_converter< T, Value_t >:
bugui::base_converter< uint8_t > bugui::base_palette< T >

Public Member Functions

void set (const color &color) override
 Sets the original color.
void clear () override
 Resets the original and the device specific colour to their initial value.
bool is_clear () override
 Checks that the original and device specific colour are set to their initial value.
Public Member Functions inherited from bugui::base_converter< uint8_t >
bool operator== (const color &other) const
 Determines equality between the original color and another.
uint8_t get () const
 Retrives the main device specific colour value.
uint8_t get_secondary () const
 Retrives the secondary device specific colour value.
uint8_t get_state () const
 Retrives the current state.

Additional Inherited Members

Public Types inherited from bugui::base_converter< uint8_t >
using color_value_t
Protected Attributes inherited from bugui::base_converter< uint8_t >
uint8_t value
uint8_t secondary
color original
Static Protected Attributes inherited from bugui::base_palette< T >
static constexpr auto palette {make_rgb()}

Detailed Description

template<has_color_palette T, typename Value_t = uint8_t>
struct bugui::color_converter< T, Value_t >

Povides convertion of color objects to device specific integer values.

Member Function Documentation

◆ clear()

template<has_color_palette T, typename Value_t = uint8_t>
void bugui::color_converter< T, Value_t >::clear ( )
inlineoverridevirtual

Resets the original and the device specific colour to their initial value.

Implements bugui::base_converter< uint8_t >.

◆ is_clear()

template<has_color_palette T, typename Value_t = uint8_t>
bool bugui::color_converter< T, Value_t >::is_clear ( )
inlineoverridevirtual

Checks that the original and device specific colour are set to their initial value.

Implements bugui::base_converter< uint8_t >.

◆ set()

template<has_color_palette T, typename Value_t = uint8_t>
void bugui::color_converter< T, Value_t >::set ( const color & color)
inlineoverridevirtual

Sets the original color.

Implements bugui::base_converter< uint8_t >.


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