30 #ifndef _CEGUIEditbox_h_
31 #define _CEGUIEditbox_h_
33 #include "CEGUI/Base.h"
34 #include "CEGUI/Window.h"
35 #include "CEGUI/RegexMatcher.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
64 virtual size_t getTextIndexFromPosition(
const Vector2f& pt)
const = 0;
158 bool hasInputFocus(
void)
const;
168 bool isReadOnly(
void)
const
180 bool isTextMasked(
void)
const
202 MatchState getTextMatchState()
const;
222 const String& getValidationString(
void)
const
223 {
return d_validationString;}
232 size_t getCaretIndex(
void)
const;
243 size_t getSelectionStartIndex(
void)
const;
253 size_t getSelectionEndIndex(
void)
const;
264 size_t getSelectionLength(
void)
const;
276 {
return d_maskCodePoint; }
291 size_t getMaxTextLength(
void)
const
292 {
return d_maxTextLen;}
305 void setReadOnly(
bool setting);
319 void setTextMasked(
bool setting);
342 void setValidationString(
const String& validation_string);
356 void setCaretIndex(
size_t caret_pos);
375 void setSelection(
size_t start_pos,
size_t end_pos);
388 void setSelectionStart(
size_t start_pos);
400 void setSelectionLength(
size_t length);
432 void setMaxTextLength(
size_t max_len);
454 virtual bool performCopy(
Clipboard& clipboard);
457 virtual bool performCut(
Clipboard& clipboard);
460 virtual bool performPaste(
Clipboard& clipboard);
481 size_t getTextIndexFromPosition(
const Vector2f& pt)
const;
484 void clearSelection(
void);
494 void eraseSelectedText(
bool modify_text =
true);
501 MatchState getStringMatchState(
const String& str)
const;
511 bool handleValidityChangeForString(
const String& str);
514 void handleBackspace(
void);
517 void handleDelete(
void);
520 void handleCharLeft(uint sysKeys);
523 void handleWordLeft(uint sysKeys);
526 void handleCharRight(uint sysKeys);
529 void handleWordRight(uint sysKeys);
532 void handleHome(uint sysKeys);
535 void handleEnd(uint sysKeys);
538 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
647 void addEditboxProperties(
void);
652 #if defined(_MSC_VER)
653 # pragma warning(pop)
656 #endif // end of guard _CEGUIEditbox_h_