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;
155 bool hasInputFocus(
void)
const;
165 bool isReadOnly(
void)
const
177 bool isTextMasked(
void)
const
200 bool isTextValid(
void)
const;
214 const String& getValidationString(
void)
const
215 {
return d_validationString;}
224 size_t getCaratIndex(
void)
const;
235 size_t getSelectionStartIndex(
void)
const;
245 size_t getSelectionEndIndex(
void)
const;
256 size_t getSelectionLength(
void)
const;
266 utf32 getMaskCodePoint(
void)
const
267 {
return d_maskCodePoint;}
282 size_t getMaxTextLength(
void)
const
283 {
return d_maxTextLen;}
296 void setReadOnly(
bool setting);
310 void setTextMasked(
bool setting);
327 void setValidationString(
const String& validation_string);
341 void setCaratIndex(
size_t carat_pos);
360 void setSelection(
size_t start_pos,
size_t end_pos);
373 void setMaskCodePoint(utf32 code_point);
391 void setMaxTextLength(
size_t max_len);
412 size_t getTextIndexFromPosition(
const Point& pt)
const;
415 void clearSelection(
void);
425 void eraseSelectedText(
bool modify_text =
true);
432 bool isStringValid(
const String& str)
const;
435 void handleBackspace(
void);
438 void handleDelete(
void);
441 void handleCharLeft(uint sysKeys);
444 void handleWordLeft(uint sysKeys);
447 void handleCharRight(uint sysKeys);
450 void handleWordRight(uint sysKeys);
453 void handleHome(uint sysKeys);
456 void handleEnd(uint sysKeys);
470 virtual bool testClassName_impl(
const String& class_name)
const
472 if (class_name==
"Editbox")
return true;
477 virtual bool validateWindowRenderer(
const String& name)
const
479 return (name ==
"Editbox");
601 void addEditboxProperties(
void);
606 #if defined(_MSC_VER)
607 # pragma warning(pop)
610 #endif // end of guard _CEGUIEditbox_h_