29 #ifndef _CEGUIEditbox_h_
30 #define _CEGUIEditbox_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/Window.h"
34 #include "CEGUI/RegexMatcher.h"
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
63 virtual size_t getTextIndexFromPosition(
const Vector2f& pt)
const = 0;
157 bool hasInputFocus(
void)
const;
167 bool isReadOnly(
void)
const
179 bool isTextMasked(
void)
const
201 MatchState getTextMatchState()
const;
221 const String& getValidationString(
void)
const
222 {
return d_validationString;}
231 size_t getCaretIndex(
void)
const;
242 size_t getSelectionStartIndex(
void)
const;
252 size_t getSelectionEndIndex(
void)
const;
263 size_t getSelectionLength(
void)
const;
275 {
return d_maskCodePoint; }
290 size_t getMaxTextLength(
void)
const
291 {
return d_maxTextLen;}
304 void setReadOnly(
bool setting);
318 void setTextMasked(
bool setting);
341 void setValidationString(
const String& validation_string);
355 void setCaretIndex(
size_t caret_pos);
374 void setSelection(
size_t start_pos,
size_t end_pos);
387 void setSelectionStart(
size_t start_pos);
399 void setSelectionLength(
size_t length);
431 void setMaxTextLength(
size_t max_len);
453 virtual bool performCopy(
Clipboard& clipboard);
456 virtual bool performCut(
Clipboard& clipboard);
459 virtual bool performPaste(
Clipboard& clipboard);
480 size_t getTextIndexFromPosition(
const Vector2f& pt)
const;
483 void clearSelection(
void);
493 void eraseSelectedText(
bool modify_text =
true);
500 MatchState getStringMatchState(
const String& str)
const;
510 bool handleValidityChangeForString(
const String& str);
513 void handleBackspace(
void);
516 void handleDelete(
void);
519 void handleCharLeft(uint sysKeys);
522 void handleWordLeft(uint sysKeys);
525 void handleCharRight(uint sysKeys);
528 void handleWordRight(uint sysKeys);
531 void handleHome(uint sysKeys);
534 void handleEnd(uint sysKeys);
537 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
646 void addEditboxProperties(
void);
651 #if defined(_MSC_VER)
652 # pragma warning(pop)
655 #endif // end of guard _CEGUIEditbox_h_