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);
72 void onDpiChanged()
override;
76 void invalidateFont()
override;
79 if (mVerticalAlign == verticalAlign) {
82 mVerticalAlign = verticalAlign;
87 if (mTextOverflow == textOverflow) {
90 mTextOverflow = textOverflow;
91 markMinContentSizeInvalid();
95 if (mTextTransform == textTransform) {
98 mTextTransform = textTransform;
102 void setSize(glm::ivec2 size)
override;
113 void commitStyle()
override;
118 int mTextLeftOffset = 0;
119 bool mIsTextTooLarge =
false;
127 AColor mIconColor = {1, 1, 1, 1};
129 glm::ivec2 getIconSize()
const;
136 AString getTransformedText();
138 void processTextOverflow(AString& text);
140 template<
class Iterator>
141 Iterator findFirstOverflowedIndex(
const Iterator& begin,
const Iterator& end,
int overflowingWidth);
143 template<
class Iterator>
144 void processTextOverflow(Iterator begin, Iterator end,
int overflowingWidth);
163 return &AAbstractLabel::setText;
Represents an abstract text display view.
Definition AAbstractLabel.h:30
AString toString() const override
bool consumesClick(const glm::ivec2 &pos) override
Determines whether this AView processes this click or passes it thru.
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:572
Defines how View handles properties of FieldType type.
Definition ADataBinding.h:37
static void(View::*)(const FieldType &v) getSetter()
Returns setter for ADataBinding (deprecated)
Definition ADataBinding.h:63
static void setup(const _< View > &view)
Called then view linked with field.
Definition ADataBinding.h:43
static auto property(const _< View > &view)
Returns property definition for FieldType.
Definition ADataBinding.h:49
static ASignal< FieldType >View::* getGetter()
Returns getter for ADataBinding (deprecated)
Definition ADataBinding.h:55
Property implementation to use with custom getter/setter.
Definition AProperty.h:234
Render context passed to AView::render.
Definition ARenderContext.h:43