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;
200 bool isTextValid(
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;
267 {
return d_maskCodePoint;}
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);
472 if (class_name==
"Editbox")
return true;
479 return (name ==
"Editbox");
601 void addEditboxProperties(
void);
606 #if defined(_MSC_VER)
607 # pragma warning(pop)
610 #endif // end of guard _CEGUIEditbox_h_
size_t d_dragAnchorIdx
Selection index for drag selection anchor point.
Definition: CEGUIEditbox.h:589
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
size_t d_caratPos
Position of the carat / insert-point.
Definition: CEGUIEditbox.h:577
Property to access the mask text setting of the edit box.
Definition: CEGUIEditboxProperties.h:116
size_t d_maxTextLen
Maximum number of characters for this Editbox.
Definition: CEGUIEditbox.h:575
Property to access the current carat index.
Definition: CEGUIEditboxProperties.h:166
static const String EventReadOnlyModeChanged
Definition: CEGUIEditbox.h:82
const String & getValidationString(void) const
return the currently set validation string
Definition: CEGUIEditbox.h:214
static const String EventTextAccepted
Definition: CEGUIEditbox.h:145
static const String EventMaskedRenderingModeChanged
Definition: CEGUIEditbox.h:88
utf32 getMaskCodePoint(void) const
return the utf32 code point used when rendering masked text.
Definition: CEGUIEditbox.h:266
static const String EventValidationStringChanged
Definition: CEGUIEditbox.h:101
static const String EventMaximumTextLengthChanged
Definition: CEGUIEditbox.h:107
static const String EventInvalidEntryAttempted
Definition: CEGUIEditbox.h:120
static const String EventTextInvalidated
Definition: CEGUIEditbox.h:113
Base class for the EditboxWindowRenderer class.
Definition: CEGUIEditbox.h:46
virtual bool testClassName_impl(const String &class_name) const
Return whether this window was inherited from the given class name at some point in the inheritance h...
Definition: CEGUIWindow.h:3928
Property to access the mask text setting of the edit box.
Definition: CEGUIEditboxProperties.h:89
Property to access the current selection start index.
Definition: CEGUIEditboxProperties.h:191
static const String EventMaskCodePointChanged
Definition: CEGUIEditbox.h:95
Interface for Regex matching support classes.
Definition: CEGUIRegexMatcher.h:37
virtual bool testClassName_impl(const String &class_name) const
Return whether this window was inherited from the given class name at some point in the inheritance h...
Definition: CEGUIEditbox.h:470
static const String EventNamespace
Namespace for global events.
Definition: CEGUIEditbox.h:74
Base-class for the assignable WindowRenderer object.
Definition: CEGUIWindowRenderer.h:51
String d_validationString
Copy of validation reg-ex string.
Definition: CEGUIEditbox.h:583
size_t getMaxTextLength(void) const
return the maximum text length set for this Editbox.
Definition: CEGUIEditbox.h:282
Property to access the maximum text length for the edit box.
Definition: CEGUIEditboxProperties.h:241
EventArgs based class that is used for objects passed to input event handlers concerning keyboard inp...
Definition: CEGUIInputEvent.h:308
Property to access the string used for regular expression validation of the edit box text...
Definition: CEGUIEditboxProperties.h:141
size_t d_selectionStart
Start of selection area.
Definition: CEGUIEditbox.h:579
size_t d_selectionEnd
End of selection area.
Definition: CEGUIEditbox.h:581
bool isTextMasked(void) const
return true if the text for the Editbox will be rendered masked.
Definition: CEGUIEditbox.h:177
bool d_dragging
true when a selection is being dragged.
Definition: CEGUIEditbox.h:587
utf32 d_maskCodePoint
Code point to use when rendering masked text.
Definition: CEGUIEditbox.h:573
bool d_maskText
True if the editbox text should be rendered masked.
Definition: CEGUIEditbox.h:571
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: CEGUIWindow.h:138
Base class for an Editbox widget.
Definition: CEGUIEditbox.h:70
bool isReadOnly(void) const
return true if the Editbox is read-only.
Definition: CEGUIEditbox.h:165
static const String EventCaratMoved
Definition: CEGUIEditbox.h:126
static const String WidgetTypeName
Window factory name.
Definition: CEGUIEditbox.h:76
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: CEGUIInputEvent.h:245
virtual bool validateWindowRenderer(const String &name) const
validate window renderer
Definition: CEGUIEditbox.h:477
Property to access the current selection length.
Definition: CEGUIEditboxProperties.h:216
static const String EventEditboxFull
Definition: CEGUIEditbox.h:138
EventArgs based class that is used for objects passed to input event handlers concerning mouse input...
Definition: CEGUIInputEvent.h:274
RegexMatcher * d_validator
Pointer to class used for validation of text.
Definition: CEGUIEditbox.h:585
static const String EventTextSelectionChanged
Definition: CEGUIEditbox.h:132
bool d_readOnly
True if the editbox is in read-only mode.
Definition: CEGUIEditbox.h:569
Property to access the read-only setting of the edit box.
Definition: CEGUIEditboxProperties.h:61
String class used within the GUI system.
Definition: CEGUIString.h:57