7#ifndef MYGUI_EDIT_TEXT_H_
8#define MYGUI_EDIT_TEXT_H_
32 void setVisible(
bool _visible)
override;
35 void updateRawData()
const;
37 void doRender()
override;
39 void setCaption(
const UString& _value)
override;
40 const UString& getCaption()
const override;
42 void setTextColour(
const Colour& _value)
override;
43 const Colour& getTextColour()
const override;
45 void setAlpha(
float _value)
override;
47 void setFontName(std::string_view _value)
override;
48 std::string_view getFontName()
const override;
50 void setFontHeight(
int _value)
override;
51 int getFontHeight()
const override;
53 void createDrawItem(ITexture* _texture, ILayerNode* _node)
override;
54 void destroyDrawItem()
override;
56 void setTextAlign(Align _value)
override;
57 Align getTextAlign()
const override;
59 size_t getTextSelectionStart()
const override;
60 size_t getTextSelectionEnd()
const override;
61 void setTextSelection(
size_t _start,
size_t _end)
override;
63 bool getSelectBackground()
const override;
64 void setSelectBackground(
bool _normal)
override;
66 bool isVisibleCursor()
const override;
67 void setVisibleCursor(
bool _value)
override;
70 bool getInvertSelected()
const override;
74 void setInvertSelected(
bool _value)
override;
76 size_t getCursorPosition()
const override;
77 void setCursorPosition(
size_t _index)
override;
79 IntSize getTextSize()
const override;
81 void setViewOffset(
const IntPoint& _point)
override;
82 IntPoint getViewOffset()
const override;
84 size_t getCursorPosition(
const IntPoint& _point)
const override;
86 IntCoord getCursorCoord(
size_t _position)
const override;
88 bool getShadow()
const override;
89 void setShadow(
bool _value)
override;
91 void setShiftText(
bool _value)
override;
93 void setWordWrap(
bool _value)
override;
95 void setStateData(IStateInfo* _data)
override;
97 void setShadowColour(
const Colour& _value)
override;
98 const Colour& getShadowColour()
const override;
101 void _invalidateTextLayout()
override;
102 void _updateView()
override;
103 void _correctView()
override;
105 void _setAlign(
const IntSize& _oldsize)
override;
110 void _setTextColour(
const Colour& _value);
111 void checkVertexSize();
112 unsigned int getMixedNativeAlpha(
float secondAlpha)
const;
116 size_t& _vertexCount,
117 const FloatRect& _vertexRect,
119 const FloatRect& _textureRect,
120 uint32 _colour)
const;
123 const RenderTargetInfo& renderTargetInfo,
125 size_t& _vertexCount,
126 FloatRect _vertexRect,
127 FloatRect _textureRect,
128 uint32 _colour)
const;
131 bool mEmptyView{
false};
132 uint32 mCurrentColourNative{0xFFFFFFFF};
133 uint32 mInverseColourNative{0xFF000000};
134 uint32 mShadowColourNative{0xFF000000};
138 mutable bool mTextOutDate{
false};
139 Align mTextAlign{Align::Default};
141 Colour mColour{Colour::White};
142 Colour mShadowColour{Colour::Black};
144 VertexColourType mVertexFormat;
146 IFont* mFont{
nullptr};
147 ITexture* mTexture{
nullptr};
149 int mCustomFontHeight = 0;
151 bool mBackgroundNormal{
true};
152 size_t mStartSelect{0};
153 size_t mEndSelect{0};
154 size_t mCursorPosition{0};
155 bool mVisibleCursor{
false};
156 bool mInvertSelect{
true};
161 ILayerNode* mNode{
nullptr};
162 RenderItem* mRenderItem{
nullptr};
164 bool mIsAddCursorWidth{
true};
166 bool mShiftText{
false};
167 bool mWordWrap{
false};
168 bool mManualColour{
false};
171 mutable TextView mTextView;
#define MYGUI_RTTI_DERIVED(DerivedType)
std::vector< LineInfo > VectorLineInfo
constexpr float ALPHA_MAX
types::TPoint< int > IntPoint
types::TCoord< int > IntCoord
types::TSize< int > IntSize