Android-cuttlefish cvd tool
Classes | Namespaces | Macros | Enumerations
label.h File Reference
#include "utf8range.h"
#include "utils.h"
Include dependency graph for label.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  teeui::FontBuffer
 
class  teeui::LabelImpl
 
struct  teeui::LabelImpl::LineInfo
 
struct  teeui::LabelImpl::LineInfo::info_t
 
class  teeui::Label< Derived >
 

Namespaces

namespace  teeui
 

Macros

#define FontSize(fs)   static const constexpr auto label_font_size = fs
 
#define DefaultText(text)   static const constexpr char label_text[] = text
 
#define LineHeight(height)   static const constexpr auto label_line_height = height
 
#define NumberOfLines(lines)   static const constexpr auto label_number_of_lines = lines
 
#define HeightFromLines   (label_line_height * pxs(label_number_of_lines))
 
#define HorizontalTextAlignment(horizontalAligment)    static const constexpr Alignment label_horizontal_text_alignment = horizontalAligment;
 
#define LeftJustified   HorizontalTextAlignment(Alignment::LEFT)
 
#define CenterJustified   HorizontalTextAlignment(Alignment::CENTER)
 
#define RightJustified   HorizontalTextAlignment(Alignment::RIGHT)
 
#define VerticalTextAlignment(verticalAligment)    static const constexpr Alignment label_vertical_text_alignment = verticalAligment;
 
#define VerticallyTop   VerticalTextAlignment(Alignment::TOP)
 
#define VerticallyCentered   VerticalTextAlignment(Alignment::CENTER)
 
#define TextColor(color)   static const constexpr auto label_text_color = color
 
#define FONT(name)   TEEUI_FONT_##name()
 
#define DECLARE_FONT_BUFFER(name, buffer, ...)
 
#define Font(fontbuffer)   static const constexpr auto label_font = fontbuffer
 
#define TextID(tid)   static const constexpr uint64_t text_id = tid
 

Enumerations

enum class  teeui::Alignment : int8_t {
  teeui::LEFT , teeui::CENTER , teeui::RIGHT , teeui::TOP ,
  teeui::BOTTOM
}
 

Macro Definition Documentation

◆ CenterJustified

#define CenterJustified   HorizontalTextAlignment(Alignment::CENTER)

◆ DECLARE_FONT_BUFFER

#define DECLARE_FONT_BUFFER (   name,
  buffer,
  ... 
)
Value:
struct TEEUI_FONT_##name {}; \
inline FontBuffer getFont(TEEUI_FONT_##name) { return FontBuffer(buffer, ##__VA_ARGS__); }

◆ DefaultText

#define DefaultText (   text)    static const constexpr char label_text[] = text

◆ Font

#define Font (   fontbuffer)    static const constexpr auto label_font = fontbuffer

◆ FONT

#define FONT (   name)    TEEUI_FONT_##name()

◆ FontSize

#define FontSize (   fs)    static const constexpr auto label_font_size = fs

◆ HeightFromLines

#define HeightFromLines   (label_line_height * pxs(label_number_of_lines))

◆ HorizontalTextAlignment

#define HorizontalTextAlignment (   horizontalAligment)     static const constexpr Alignment label_horizontal_text_alignment = horizontalAligment;

◆ LeftJustified

#define LeftJustified   HorizontalTextAlignment(Alignment::LEFT)

◆ LineHeight

#define LineHeight (   height)    static const constexpr auto label_line_height = height

◆ NumberOfLines

#define NumberOfLines (   lines)    static const constexpr auto label_number_of_lines = lines

◆ RightJustified

#define RightJustified   HorizontalTextAlignment(Alignment::RIGHT)

◆ TextColor

#define TextColor (   color)    static const constexpr auto label_text_color = color

◆ TextID

#define TextID (   tid)    static const constexpr uint64_t text_id = tid

◆ VerticallyCentered

#define VerticallyCentered   VerticalTextAlignment(Alignment::CENTER)

◆ VerticallyTop

#define VerticallyTop   VerticalTextAlignment(Alignment::TOP)

◆ VerticalTextAlignment

#define VerticalTextAlignment (   verticalAligment)     static const constexpr Alignment label_vertical_text_alignment = verticalAligment;