TinyMaterialDesign
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SettingRow< RGB_T > Class Template Reference

Common part of the rows: caption and background. More...

#include <SettingRows.h>

Inheritance diagram for SettingRow< RGB_T >:
Inheritance graph
[legend]
Collaboration diagram for SettingRow< RGB_T >:
Collaboration graph
[legend]

Public Member Functions

void setCaption (const char *caption)
 
const std::string & caption () const
 
void setOnSurface (bool onSurface)
 Draw on a surface (e.g. inside a Card) instead of the page background.
 
- Public Member Functions inherited from Widget< RGB_T >
virtual ~Widget ()=default
 
virtual void setTheme (const MaterialTheme< RGB_T > &theme)
 
virtual void draw (tinygpu::ISurface< RGB_T > &target)=0
 
virtual bool onGesture (const tinygpu::GestureEvent &event)
 Handles one gesture event. Returns true if this widget consumed it.
 
virtual bool update (uint32_t nowMs)
 
virtual bool isDraggable () const
 
virtual bool isDraggableAt (int32_t x, int32_t y) const
 
virtual int childCount () const
 
virtual Widget< RGB_T > * child (int index)
 
virtual void drawBackground (tinygpu::ISurface< RGB_T > &target)
 
virtual void setThemeTint (RGB_T background, RGB_T foreground)
 
virtual bool isContainer () const
 Provides true if the widget is a container.
 

Protected Member Functions

RGB_T background () const
 
void text (tinygpu::ISurface< RGB_T > &target, tinygpu::IFont< RGB_T > &font, int32_t x, int32_t y, const char *s, RGB_T color)
 
RGB_T dimmed (RGB_T color) const
 
- Protected Member Functions inherited from Widget< RGB_T >
const MaterialTheme< RGB_T > & theme () const
 Convenience accessor for draw() overrides - see theme_.
 

Protected Attributes

std::string caption_
 
bool onSurface_ = false
 
- Protected Attributes inherited from Widget< RGB_T >
const MaterialTheme< RGB_T > * theme_ = nullptr
 

Additional Inherited Members

- Public Attributes inherited from Widget< RGB_T >
Bounds bounds
 
bool visible = true
 
bool enabled = true
 

Detailed Description

template<typename RGB_T = TINYMD_DEFAULT_RGB_T>
class tinymd::SettingRow< RGB_T >

Common part of the rows: caption and background.

Member Function Documentation

◆ background()

RGB_T background ( ) const
inlineprotected

◆ caption()

const std::string & caption ( ) const
inline

◆ dimmed()

RGB_T dimmed ( RGB_T  color) const
inlineprotected

◆ setCaption()

void setCaption ( const char *  caption)
inline

◆ setOnSurface()

void setOnSurface ( bool  onSurface)
inline

Draw on a surface (e.g. inside a Card) instead of the page background.

◆ text()

void text ( tinygpu::ISurface< RGB_T > &  target,
tinygpu::IFont< RGB_T > &  font,
int32_t  x,
int32_t  y,
const char *  s,
RGB_T  color 
)
inlineprotected

Member Data Documentation

◆ caption_

std::string caption_
protected

◆ onSurface_

bool onSurface_ = false
protected

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