30 #ifndef _CEGUIEditbox_h_
31 #define _CEGUIEditbox_h_
33 #include "../CEGUIBase.h"
34 #include "../CEGUIWindow.h"
35 #include "CEGUIEditboxProperties.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
64 virtual size_t getTextIndexFromPosition(
const Point& pt)
const = 0;
108 bool hasInputFocus(
void)
const;
118 bool isReadOnly(
void)
const
130 bool isTextMasked(
void)
const
153 bool isTextValid(
void)
const;
167 const String& getValidationString(
void)
const
168 {
return d_validationString;}
177 size_t getCaratIndex(
void)
const;
188 size_t getSelectionStartIndex(
void)
const;
198 size_t getSelectionEndIndex(
void)
const;
209 size_t getSelectionLength(
void)
const;
219 utf32 getMaskCodePoint(
void)
const
220 {
return d_maskCodePoint;}
235 size_t getMaxTextLength(
void)
const
236 {
return d_maxTextLen;}
249 void setReadOnly(
bool setting);
263 void setTextMasked(
bool setting);
280 void setValidationString(
const String& validation_string);
294 void setCaratIndex(
size_t carat_pos);
313 void setSelection(
size_t start_pos,
size_t end_pos);
326 void setMaskCodePoint(utf32 code_point);
344 void setMaxTextLength(
size_t max_len);
365 size_t getTextIndexFromPosition(
const Point& pt)
const;
368 void clearSelection(
void);
378 void eraseSelectedText(
bool modify_text =
true);
385 bool isStringValid(
const String& str)
const;
388 void handleBackspace(
void);
391 void handleDelete(
void);
394 void handleCharLeft(uint sysKeys);
397 void handleWordLeft(uint sysKeys);
400 void handleCharRight(uint sysKeys);
403 void handleWordRight(uint sysKeys);
406 void handleHome(uint sysKeys);
409 void handleEnd(uint sysKeys);
423 virtual bool testClassName_impl(
const String& class_name)
const
425 if (class_name==
"Editbox")
return true;
430 virtual bool validateWindowRenderer(
const String& name)
const
432 return (name ==
"Editbox");
554 void addEditboxProperties(
void);
559 #if defined(_MSC_VER)
560 # pragma warning(pop)
563 #endif // end of guard _CEGUIEditbox_h_