14#include <AUI/Enum/VerticalAlign.h>
15#include <AUI/Enum/TextTransform.h>
16#include "AUI/Platform/AWindowBase.h"
18#include "AUI/Render/IRenderer.h"
19#include "AUI/Common/AString.h"
20#include "AUI/Image/IDrawable.h"
21#include "AUI/Enum/WordBreak.h"
22#include "AUI/Font/IFontView.h"
23#include <AUI/Util/ADataBinding.h>
24#include <AUI/Common/IStringable.h>
25#include <AUI/Util/Declarative.h>
40 &AAbstractLabel::mText,
41 &AAbstractLabel::setText,
64 void setIconColor(
const AColor& iconColor) {
65 mIconColor = iconColor;
68 void doPrerender(IRenderer& render);
70 void onDpiChanged()
override;
72 void setText(AString newText);
74 void invalidateFont()
override;
77 if (mVerticalAlign == verticalAlign) {
80 mVerticalAlign = verticalAlign;
85 if (mTextOverflow == textOverflow) {
88 mTextOverflow = textOverflow;
89 markMinContentSizeInvalid();
93 if (mTextTransform == textTransform) {
96 mTextTransform = textTransform;
100 void setSize(glm::ivec2 size)
override;
111 void commitStyle()
override;
116 int mTextLeftOffset = 0;
117 bool mIsTextTooLarge =
false;
125 AColor mIconColor = {1, 1, 1, 1};
127 glm::ivec2 getIconSize()
const;
134 AString getTransformedText();
136 void processTextOverflow(AString& text);
138 template<
class Iterator>
139 Iterator findFirstOverflowedIndex(
const Iterator& begin,
const Iterator& end,
int overflowingWidth);
141 template<
class Iterator>
142 void processTextOverflow(Iterator begin, Iterator end,
int overflowingWidth);
161 return &AAbstractLabel::setText;
Represents an abstract text display view.
Definition AAbstractLabel.h:30
AString toString() const override
auto text() const
Label's text property.
Definition AAbstractLabel.h:37
void invalidateAllStyles() override
Invalidates all styles, causing to iterate over all rules in global and parent stylesheets.
void render(ARenderContext context) override
Draws this AView. Noone should call this function except rendering routine.
int getContentMinimumHeight() override
int getContentMinimumWidth() override
Represents a 4-component floating point color (RGBA).
Definition AColor.h:26
Represents a Unicode character string.
Definition AString.h:38
void redraw()
Request window manager to redraw this AView.
Interface of a AView that works with fonts (i.e., ALabel, ATextField, AText, etc.....
Definition IFontView.h:19
Base class for rendering.
Definition IRenderer.h:149
Object that can be converted to string.
Definition IStringable.h:29
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
VerticalAlign
Controls the text vertical alignment of AView.
Definition VerticalAlign.h:24
TextTransform
Controls the text transform of AView.
Definition TextTransform.h:23
ATextOverflow
Controls behavior of the overflowed text. Relevant to AAbstractLabel and its derivatives only.
Definition AOverflow.h:47
ASignal< Args... > emits
A signal declaration.
Definition ASignal.h:577
Defines how View handles properties of FieldType type.
Definition ADataBinding.h:38
static void(View::*)(const FieldType &v) getSetter()
Returns setter for ADataBinding (deprecated)
Definition ADataBinding.h:64
static void setup(const _< View > &view)
Called then view linked with field.
Definition ADataBinding.h:44
static auto property(const _< View > &view)
Returns property definition for FieldType.
Definition ADataBinding.h:50
static ASignal< FieldType >View::* getGetter()
Returns getter for ADataBinding (deprecated)
Definition ADataBinding.h:56
Property implementation to use with custom getter/setter.
Definition APropertyDef.h:23
Render context passed to AView::render.
Definition ARenderContext.h:43