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);
55 void setTextSelection(
size_t _start,
size_t _end);
58 void deleteTextSelection();
64 bool isTextSelection() const;
67 void setTextSelectionColour(const
Colour& _value);
70 void setTextCursor(
size_t _index);
72 size_t getTextCursor() const;
76 virtual
void setCaption(const
UString& _value);
78 virtual const
UString& getCaption();
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();
171 void setInvertSelected(
bool _value);
174 virtual
void setPosition(const
IntPoint& _value);
176 virtual
void setSize(const
IntSize& _value);
178 virtual
void setCoord(const
IntCoord& _value);
181 void setPosition(
int _left,
int _top);
183 void setSize(
int _width,
int _height);
185 void setCoord(
int _left,
int _top,
int _width,
int _height);
188 void setVisibleVScroll(
bool _value);
190 bool isVisibleVScroll() const;
197 size_t getVScrollRange() const;
199 size_t getVScrollPosition();
201 void setVScrollPosition(
size_t _index);
204 void setVisibleHScroll(
bool _value);
206 bool isVisibleHScroll() const;
212 size_t getHScrollRange() const;
214 size_t getHScrollPosition();
216 void setHScrollPosition(
size_t _index);
220 virtual
void setFontName(const std::
string& _value);
222 virtual
void setFontHeight(
int _value);
225 virtual
void setTextAlign(
Align _value);
227 virtual
void setTextColour(const
Colour& _value);
236 virtual
void setTextShadowColour(const
Colour& _value);
239 virtual
void setTextShadow(
bool _value);
255 virtual
void initialiseOverride();
256 virtual
void shutdownOverride();
258 virtual
void onMouseDrag(
int _left,
int _top,
MouseButton _id);
259 virtual
void onKeyLostFocus(
Widget* _new);
260 virtual
void onKeySetFocus(
Widget* _old);
261 virtual
void onKeyButtonPressed(
KeyCode _key,
Char _char);
264 void notifyMouseSetFocus(
Widget* _sender,
Widget* _old);
265 void notifyMouseLostFocus(
Widget* _sender,
Widget* _new);
269 void notifyMouseButtonDoubleClick(
Widget* _sender);
271 void notifyScrollChangePosition(
ScrollBar* _sender,
size_t _position);
272 void notifyMouseWheel(
Widget* _sender,
int _rel);
276 void updateViewWithCursor();
280 virtual
void setPropertyOverride(const std::
string& _key, const std::
string& _value);
284 void setText(const
UString& _text,
bool _history);
286 bool deleteTextSelect(
bool _history);
288 void insertText(const
UString& _text,
size_t _index,
bool _history);
290 void eraseText(
size_t _start,
size_t _count,
bool _history);
292 void setTextSelectColour(const
Colour& _colour,
bool _history);
294 void _setTextColour(
size_t _start,
size_t _count, const
Colour& _colour,
bool _history);
296 void frameEntered(
float _frame);
298 void updateEditState();
301 void updateSelectText();
306 void commandPosition(
size_t _undo,
size_t _redo,
size_t _length,
VectorChangeInfo* _info =
nullptr);
314 void commandResetRedo();
315 void commandResetHistory();
323 const
UString& getRealString();
325 void setRealString(const
UString& _caption);
327 void updateCursorPosition();
330 virtual
IntSize getContentSize();
332 virtual
IntPoint getContentPosition();
333 virtual
void setContentPosition(const
IntPoint& _point);
337 virtual
size_t getVScrollPage();
338 virtual
size_t getHScrollPage();
340 virtual
Align getContentAlign();
350 float mActionMouseTimer;
353 size_t mCursorPosition;
365 bool mMouseLeftPressed;
379 std::
string mOriginalPointer;
383 bool mOverflowToTheLeft;
384 size_t mMaxTextLength;
391 #endif // __MYGUI_EDIT_BOX_H__