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>
52 void setIconColor(
const AColor& iconColor) {
53 mIconColor = iconColor;
60 void onDpiChanged()
override;
69 void invalidateFont()
override;
72 if (mVerticalAlign == verticalAlign) {
75 mVerticalAlign = verticalAlign;
80 if (mTextOverflow == textOverflow) {
83 mTextOverflow = textOverflow;
84 markMinContentSizeInvalid();
88 if (mTextTransform == textTransform) {
91 mTextTransform = textTransform;
95 void setSize(glm::ivec2 size)
override;
106 void commitStyle()
override;
111 int mTextLeftOffset = 0;
112 bool mIsTextTooLarge =
false;
119 AColor mIconColor = {1, 1, 1, 1};
121 glm::ivec2 getIconSize()
const;
132 template<
class Iterator>
133 Iterator findFirstOverflowedIndex(
const Iterator& begin,
const Iterator& end,
int overflowingWidth);
135 template<
class Iterator>
136 void processTextOverflow(Iterator begin, Iterator end,
int overflowingWidth);
145 static auto getGetter() {
149 static auto getSetter() {
150 return &AAbstractLabel::setText;
Represents an abstract text display view.
Definition: AAbstractLabel.h:30
Represents a 4-component floating point color.
Definition: AColor.h:27
Represents a Unicode character string.
Definition: AString.h:37
Base class of all UI objects.
Definition: AView.h:77
virtual int getContentMinimumHeight()
Definition: AView.cpp:252
virtual bool consumesClick(const glm::ivec2 &pos)
Determines whether this AView processes this click or passes it thru.
Definition: AView.cpp:534
void redraw()
Request window manager to redraw this AView.
Definition: AView.cpp:68
virtual int getContentMinimumWidth()
Definition: AView.cpp:248
virtual void render(ARenderContext ctx)
Draws this AView. Noone should call this function except rendering routine.
Definition: AView.cpp:142
virtual void invalidateAllStyles()
Invalidates all styles, causing to iterate over all rules in global and parent stylesheets.
Definition: AView.cpp:179
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
virtual AString toString() const =0
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
VerticalAlign
Controls the text vertical alignment of AView.
Definition: VerticalAlign.h:24
TextTransform
Controls the text transform of AView.
Definition: TextTransform.h:24
ATextOverflow
Controls behavior of the overflowed text. Relevant to AAbstractLabel and its derivatives only.
Definition: AOverflow.h:49
Definition: ADataBinding.h:24
static void setup(const _< View > &view)
Definition: ADataBinding.h:30
Render context passed to AView::render.
Definition: ARenderContext.h:43