25#define Opencc_BUILT_AS_STATIC
71 void draw(NVGcontext* vg,
float x,
float y,
float width,
float height,
Style style,
FrameContext* ctx)
override;
Definition animation.hpp:42
Definition frame_context.hpp:30
void onTextScaleChanged() override
bool setFontFamily(const std::string &name)
virtual void setText(const std::string &text)
Time cursor_blink
Definition label.hpp:248
float fittedWidth
the text's width at that scale
Definition label.hpp:230
enum NVGalign getNVGHorizontalAlign()
bool shrinkToFit
Definition label.hpp:227
bool getStyleProperty(const std::string &name, StyleValue *value) override
void setAnimated(bool animated)
enum NVGalign getNVGVerticalAlign()
void onFocusGained() override
bool setBoundText(const std::string &text) override
static void setFontScale(float scale)
void setVerticalAlign(VerticalAlign align)
bool isTruncated()
The text as laid out does not fit: it is drawn cut, with an ellipsis.
int cursor
Definition label.hpp:247
void setRequiredWidth(float requiredWidth)
Set by the measure function: the width the text needs on one line.
void setCursor(int cursor)
Draws a blinking edit cursor before the byte cursor (CursorPosition::END: at the end; UNSET: none).
float shrinkMin
setShrinkToFitMin
Definition label.hpp:228
float fontSize
Definition label.hpp:224
Timer scrollingTimer
Definition label.hpp:250
static float FONT_SCALE
Definition label.hpp:212
bool isSingleLine()
See setSingleLine().
bool singleLine
Definition label.hpp:241
void onParentFocusLost(View *focusedView) override
void setShrinkToFitMin(float size)
unsigned ellipsisWidth
Definition label.hpp:238
AccessibilityRole getDefaultAccessibilityRole() override
Definition label.hpp:217
void draw(NVGcontext *vg, float x, float y, float width, float height, Style style, FrameContext *ctx) override
static bool OPENCC_ON
STConverter() applied to Traditional Chinese text.
Definition label.hpp:211
float fontScaleMax
Definition label.hpp:226
void setFontScaled(bool scaled)
false: this label keeps its size whatever the font scale.
void setSingleLine(bool singleLine)
bool animated
should it animate?
Definition label.hpp:245
void onFocusLost() override
size_t stringLength
Definition label.hpp:239
std::string truncatedText
Definition label.hpp:220
static std::string STConverter(const std::string &text)
std::string getFullText()
The whole text, as set (not cut to fit).
int font
Definition label.hpp:223
void bindText(Observable< std::string > &text)
float requiredWidth
Definition label.hpp:237
std::string fullText
Definition label.hpp:221
void setShrinkToFit(bool shrink)
void stopScrollingAnimation()
void onParentFocusGained(View *focusedView) override
void onScrollTimerFinished()
void setFontSize(float value)
The font size asked, in layout units (drawn times the font scale).
float fitScale
from onLayout, when shrinkToFit
Definition label.hpp:229
NVGcolor textColor
Definition label.hpp:235
static float getFontScale()
See setFontScale().
bool autoAnimate
Definition label.hpp:244
bool setStyleProperty(const std::string &name, const StyleValue &value) override
bool fontScaled
Definition label.hpp:225
Label()
An empty label in the default font, size and colour.
std::string getDefaultAccessibilityLabel() override
Definition label.hpp:218
void setAutoAnimate(bool autoAnimate)
void resetScrollingAnimation()
void setHorizontalAlign(HorizontalAlign align)
void setEllipsisWidth(float ellipsisWidth)
Set by the measure function: the width of the ellipsis.
int getFont()
The font id the label draws with.
VerticalAlign verticalAlign
Definition label.hpp:260
void setLineHeight(float value)
The height of a line, as a multiple of the font size.
void setTextColor(NVGcolor color)
The text's colour (setThemeColor follows a theme key instead).
float lineHeight
Definition label.hpp:232
bool isShrinkingToFit()
See setShrinkToFit().
static View * create()
Makes a label for XML (<aurore:Label>).
float fontQuality
Definition label.hpp:233
HorizontalAlign horizontalAlign
Definition label.hpp:259
bool animating
currently animating?
Definition label.hpp:246
float textWidth()
the text's width as drawn
void setFontScaleMax(float max)
bool isWrapping
Definition label.hpp:242
Animatable scrollingAnimation
Definition label.hpp:251
float getFontSize()
The font size asked, before the font scale.
void setIsWrapping(bool isWrapping)
void setFontQuality(float value)
nanovg's quality for the glyphs (1 by default).
Definition observable.hpp:100
Simple wrapper around StyleValues for the array operator.
Definition style.hpp:115
Definition actions.hpp:25
AccessibilityRole
Definition view_style.hpp:78
HorizontalAlign
Where a label's lines sit across its width.
Definition label.hpp:34
VerticalAlign
Where a label's text sits in its height.
Definition label.hpp:42
CursorPosition
An edit cursor's place in a label's text (Label::setCursor).
Definition label.hpp:51
@ BOTTOM
decor.bottom: along its bottom edge
@ TOP
decor.top: a strip along the top edge of the screen
retro_time_t Time
Definition time.hpp:31
Definition view_style.hpp:41