7#ifndef MYGUI_EDIT_BOX_H_
8#define MYGUI_EDIT_BOX_H_
36 size_t getTextSelectionStart()
const;
39 size_t getTextSelectionEnd()
const;
42 size_t getTextSelectionLength()
const;
52 void setTextSelection(
size_t _start,
size_t _end);
55 void deleteTextSelection();
58 UString getTextSelection()
const;
61 bool isTextSelection()
const;
67 void setTextCursor(
size_t _index);
69 size_t getTextCursor()
const;
75 const UString& getCaption()
const override;
86 size_t getTextLength()
const;
89 void setOverflowToTheLeft(
bool _value);
91 bool getOverflowToTheLeft()
const;
94 void setMaxTextLength(
size_t _value);
96 size_t getMaxTextLength()
const;
109 void setEditReadOnly(
bool _value);
111 bool getEditReadOnly()
const;
119 bool getEditPassword()
const;
126 void setEditMultiLine(
bool _value);
128 bool getEditMultiLine()
const;
134 void setEditStatic(
bool _value);
136 bool getEditStatic()
const;
143 Char getPasswordChar()
const;
150 void setEditWordWrap(
bool _value);
152 bool getEditWordWrap()
const;
159 void setTabPrinting(
bool _value);
161 bool getTabPrinting()
const;
164 bool getInvertSelected()
const;
168 void setInvertSelected(
bool _value);
177 using Widget::setPosition;
178 using Widget::setSize;
179 using Widget::setCoord;
182 void setVisibleVScroll(
bool _value);
184 bool isVisibleVScroll()
const;
191 size_t getVScrollRange()
const;
193 size_t getVScrollPosition()
const;
195 void setVScrollPosition(
size_t _index);
198 void setVisibleHScroll(
bool _value);
200 bool isVisibleHScroll()
const;
206 size_t getHScrollRange()
const;
208 size_t getHScrollPosition()
const;
210 void setHScrollPosition(
size_t _index);
214 void setFontName(std::string_view
_value)
override;
216 void setFontHeight(
int _value)
override;
218 int getFontHeight()
const override;
226 IntCoord getTextRegion()
const override;
229 IntSize getTextSize()
const override;
232 void setTextShadowColour(
const Colour&
_value)
override;
235 void setTextShadow(
bool _value)
override;
251 void initialiseOverride()
override;
252 void shutdownOverride()
override;
272 void updateViewWithCursor();
276 void setPropertyOverride(std::string_view
_key, std::string_view
_value)
override;
282 bool deleteTextSelect(
bool _history);
292 void frameEntered(
float _frame);
294 void updateEditState();
297 void updateSelectText();
310 void commandResetRedo();
311 void commandResetHistory();
316 void commandCopy()
const;
319 const UString& getRealString()
const;
323 void updateCursorPosition();
326 IntSize getContentSize()
const override;
328 IntPoint getContentPosition()
const override;
331 IntSize getViewSize()
const override;
333 size_t getVScrollPage()
const override;
334 size_t getHScrollPage()
const override;
336 Align getContentAlign()
const override;
340 bool mIsPressed{
false};
342 bool mIsFocus{
false};
344 bool mCursorActive{
false};
345 float mCursorTimer{0};
346 float mActionMouseTimer{0};
349 size_t mCursorPosition{0};
351 size_t mTextLength{0};
355 size_t mEndSelect{0};
361 bool mMouseLeftPressed{
false};
363 bool mModeReadOnly{
false};
364 bool mModePassword{
false};
365 bool mModeMultiline{
false};
366 bool mModeStatic{
false};
367 bool mModeWordWrap{
false};
369 bool mTabPrinting{
false};
379 bool mOverflowToTheLeft{
false};
#define MYGUI_RTTI_DERIVED(DerivedType)
widget description should be here.
DequeUndoRedoInfo mVectorUndoChangeInfo
EventPair< EventHandle_WidgetVoid, EventHandle_EditPtr > eventEditTextChange
DequeUndoRedoInfo mVectorRedoChangeInfo
std::string mOriginalPointer
EventPair< EventHandle_WidgetVoid, EventHandle_EditPtr > eventEditSelectAccept
widget description should be here.
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
std::vector< TextCommandInfo > VectorChangeInfo
constexpr size_t ITEM_NONE
std::deque< VectorChangeInfo > DequeUndoRedoInfo