Android-cuttlefish cvd tool
Public Member Functions | Static Public Attributes | List of all members
teeui::Label< Derived > Class Template Reference

#include <label.h>

Inheritance diagram for teeui::Label< Derived >:
Inheritance graph
[legend]
Collaboration diagram for teeui::Label< Derived >:
Collaboration graph
[legend]

Public Member Functions

 Label ()=default
 
template<typename Context >
 Label (const Context &context)
 
Error draw (const PixelDrawer &drawPixel)
 
Error hit (const Event &event)
 
- Public Member Functions inherited from teeui::LayoutElement< Derived >
 LayoutElement ()=default
 
template<typename Context >
 LayoutElement (const Context &context)
 
Error draw (const PixelDrawer &)
 
Error hit (const Event &)
 
- Public Member Functions inherited from teeui::LabelImpl
 LabelImpl ()
 
 LabelImpl (pxs fontSize, pxs lineHeight, text_t text, Alignment horizontal, Alignment verticalJustified, Color textColor, FontBuffer font, uint64_t textId)
 
pxs fontSize () const
 
void setText (text_t text)
 
void setTextColor (Color color)
 
text_t text () const
 
uint64_t textId () const
 
Error draw (const PixelDrawer &drawPixel, const Box< pxs > &bounds, LineInfo *lineInfo)
 
void setCB (CallbackEvent cbEvent)
 
optional< CallbackEventgetCB ()
 
Error hit (const Event &event, const Box< pxs > &bounds)
 

Static Public Attributes

static const constexpr Alignment label_horizontal_text_alignment = Alignment::LEFT
 
static const constexpr Alignment label_vertical_text_alignment = Alignment::TOP
 
static const constexpr Color label_text_color = 0xff000000
 
static const constexpr int label_font = 0
 
static const constexpr uint64_t text_id = 0
 

Additional Inherited Members

- Public Attributes inherited from teeui::LayoutElement< Derived >
Box< pxsbounds_
 

Detailed Description

template<typename Derived>
class teeui::Label< Derived >

Label is a LayoutElement and should be used as second argument in the BEGIN_ELEMENT() macro. The template argument Derived is the new class derived from Label, that is created by the BEGIN_ELEMENT() macro.

Constructor & Destructor Documentation

◆ Label() [1/2]

template<typename Derived >
teeui::Label< Derived >::Label ( )
default

◆ Label() [2/2]

template<typename Derived >
template<typename Context >
teeui::Label< Derived >::Label ( const Context &  context)
inline

Member Function Documentation

◆ draw()

template<typename Derived >
Error teeui::Label< Derived >::draw ( const PixelDrawer drawPixel)
inline

◆ hit()

template<typename Derived >
Error teeui::Label< Derived >::hit ( const Event event)
inline

Member Data Documentation

◆ label_font

template<typename Derived >
const constexpr int teeui::Label< Derived >::label_font = 0
staticconstexpr

◆ label_horizontal_text_alignment

template<typename Derived >
const constexpr Alignment teeui::Label< Derived >::label_horizontal_text_alignment = Alignment::LEFT
staticconstexpr

◆ label_text_color

template<typename Derived >
const constexpr Color teeui::Label< Derived >::label_text_color = 0xff000000
staticconstexpr

◆ label_vertical_text_alignment

template<typename Derived >
const constexpr Alignment teeui::Label< Derived >::label_vertical_text_alignment = Alignment::TOP
staticconstexpr

◆ text_id

template<typename Derived >
const constexpr uint64_t teeui::Label< Derived >::text_id = 0
staticconstexpr

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