7#ifndef MYGUI_EDIT_BOX_H_
8#define MYGUI_EDIT_BOX_H_
36 void setTextIntervalColour(
size_t _start,
size_t _count,
const Colour& _colour);
39 size_t getTextSelectionStart()
const;
42 size_t getTextSelectionEnd()
const;
45 size_t getTextSelectionLength()
const;
49 UString getTextInterval(
size_t _start,
size_t _count)
const;
55 void setTextSelection(
size_t _start,
size_t _end);
58 void deleteTextSelection();
61 UString getTextSelection()
const;
64 bool isTextSelection()
const;
67 void setTextSelectionColour(
const Colour& _value);
70 void setTextCursor(
size_t _index);
72 size_t getTextCursor()
const;
76 void setCaption(
const UString& _value)
override;
78 const UString& getCaption()
const override;
81 void setOnlyText(
const UString& _value);
89 size_t getTextLength()
const;
92 void setOverflowToTheLeft(
bool _value);
94 bool getOverflowToTheLeft()
const;
97 void setMaxTextLength(
size_t _value);
99 size_t getMaxTextLength()
const;
104 void addText(
const UString& _text);
106 void eraseText(
size_t _start,
size_t _count = 1);
112 void setEditReadOnly(
bool _value);
114 bool getEditReadOnly()
const;
120 void setEditPassword(
bool _value);
122 bool getEditPassword()
const;
129 void setEditMultiLine(
bool _value);
131 bool getEditMultiLine()
const;
137 void setEditStatic(
bool _value);
139 bool getEditStatic()
const;
142 void setPasswordChar(
Char _value);
144 void setPasswordChar(
const UString& _char);
146 Char getPasswordChar()
const;
153 void setEditWordWrap(
bool _value);
155 bool getEditWordWrap()
const;
162 void setTabPrinting(
bool _value);
164 bool getTabPrinting()
const;
167 bool getInvertSelected()
const;
171 void setInvertSelected(
bool _value);
174 void setPosition(
const IntPoint& _value)
override;
176 void setSize(
const IntSize& _value)
override;
178 void setCoord(
const IntCoord& _value)
override;
185 void setVisibleVScroll(
bool _value);
187 bool isVisibleVScroll()
const;
194 size_t getVScrollRange()
const;
196 size_t getVScrollPosition()
const;
198 void setVScrollPosition(
size_t _index);
201 void setVisibleHScroll(
bool _value);
203 bool isVisibleHScroll()
const;
209 size_t getHScrollRange()
const;
211 size_t getHScrollPosition()
const;
213 void setHScrollPosition(
size_t _index);
217 void setFontName(
const std::string& _value)
override;
219 void setFontHeight(
int _value)
override;
221 int getFontHeight()
const override;
224 void setTextAlign(
Align _value)
override;
226 void setTextColour(
const Colour& _value)
override;
229 IntCoord getTextRegion()
const override;
232 IntSize getTextSize()
const override;
235 void setTextShadowColour(
const Colour& _value)
override;
238 void setTextShadow(
bool _value)
override;
254 void initialiseOverride()
override;
255 void shutdownOverride()
override;
257 void onMouseDrag(
int _left,
int _top,
MouseButton _id)
override;
258 void onKeyLostFocus(
Widget* _new)
override;
259 void onKeySetFocus(
Widget* _old)
override;
260 void onKeyButtonPressed(
KeyCode _key,
Char _char)
override;
263 void notifyMouseSetFocus(
Widget* _sender,
Widget* _old);
264 void notifyMouseLostFocus(
Widget* _sender,
Widget* _new);
268 void notifyMouseButtonDoubleClick(
Widget* _sender);
270 void notifyScrollChangePosition(
ScrollBar* _sender,
size_t _position);
271 void notifyMouseWheel(
Widget* _sender,
int _rel);
275 void updateViewWithCursor();
279 void setPropertyOverride(
const std::string& _key,
const std::string& _value)
override;
283 void setText(
const UString& _text,
bool _history);
285 bool deleteTextSelect(
bool _history);
287 void insertText(
const UString& _text,
size_t _index,
bool _history);
289 void eraseText(
size_t _start,
size_t _count,
bool _history);
291 void setTextSelectColour(
const Colour& _colour,
bool _history);
293 void _setTextColour(
size_t _start,
size_t _count,
const Colour& _colour,
bool _history);
295 void frameEntered(
float _frame);
297 void updateEditState();
300 void updateSelectText();
305 void commandPosition(
size_t _undo,
size_t _redo,
size_t _length,
VectorChangeInfo* _info =
nullptr);
313 void commandResetRedo();
314 void commandResetHistory();
322 const UString& getRealString()
const;
324 void setRealString(
const UString& _caption);
326 void updateCursorPosition();
329 IntSize getContentSize()
const override;
331 IntPoint getContentPosition()
const override;
332 void setContentPosition(
const IntPoint& _point)
override;
334 IntSize getViewSize()
const override;
336 size_t getVScrollPage()
const override;
337 size_t getHScrollPage()
const override;
339 Align getContentAlign()
const override;
#define MYGUI_RTTI_DERIVED(DerivedType)
widget description should be here.
DequeUndoRedoInfo mVectorUndoChangeInfo
ISubWidgetText * mClientText
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.
delegates::CMultiDelegate1< EditBox * > EventHandle_EditPtr
std::deque< VectorChangeInfo > DequeUndoRedoInfo
std::vector< TextCommandInfo > VectorChangeInfo