Crazy Eddie's GUI System
0.8.7
|
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)
222 {
return d_validationString;}
275 {
return d_maskCodePoint; }
291 {
return d_maxTextLen;}
646 void addEditboxProperties(
void);
651 #if defined(_MSC_VER)
652 # pragma warning(pop)
655 #endif // end of guard _CEGUIEditbox_h_
Defines a clipboard handling class.
Definition: Clipboard.h:84
void onCharacter(KeyEventArgs &e)
Handler called when a character-key has been pressed while this window has input focus.
bool isTextMasked(void) const
return true if the text for the Editbox will be rendered masked.
Definition: widgets/Editbox.h:179
String::value_type getMaskCodePoint(void) const
return the code point used when rendering masked text.
Definition: widgets/Editbox.h:274
size_t d_caretPos
Position of the caret / insert-point.
Definition: widgets/Editbox.h:624
void handleHome(uint sysKeys)
Processing to move caret to the start of the text.
bool d_dragging
true when a selection is being dragged.
Definition: widgets/Editbox.h:636
bool d_maskText
True if the editbox text should be rendered masked.
Definition: widgets/Editbox.h:618
size_t getSelectionEndIndex(void) const
return the current selection end point.
virtual void onValidationStringChanged(WindowEventArgs &e)
Event fired internally when the validation string is changed.
void setCaretIndex(size_t caret_pos)
Set the current position of the caret.
Base class for the EditboxWindowRenderer class.
Definition: widgets/Editbox.h:46
void onMouseMove(MouseEventArgs &e)
Handler called when the mouse cursor has been moved within this window's area.
void setMaskCodePoint(String::value_type code_point)
set the code point used when rendering masked text.
void handleWordLeft(uint sysKeys)
Processing to move caret one word left.
size_t getTextIndexFromPosition(const Vector2f &pt) const
Return the text code point index that is rendered closest to screen position pt.
const String & getValidationString(void) const
return the currently set validation string
Definition: widgets/Editbox.h:221
virtual void onCaretMoved(WindowEventArgs &e)
Handler called when the caret (insert point) position changes.
static const String WidgetTypeName
Window factory name.
Definition: widgets/Editbox.h:77
void handleBackspace(void)
Processing for backspace key.
void setSelectionStart(size_t start_pos)
Define the current selection start for the Editbox.
EditboxWindowRenderer(const String &name)
Constructor.
void setMaxTextLength(size_t max_len)
set the maximum text length for this Editbox.
void setValidationString(const String &validation_string)
Set the text validation string.
void handleEnd(uint sysKeys)
Processing to move caret to the end of the text.
void onMouseButtonUp(MouseEventArgs &e)
Handler called when a mouse button has been released within this window's area.
void setSelection(size_t start_pos, size_t end_pos)
Define the current selection for the Editbox.
MatchState d_validatorMatchState
Current match state of EditboxText.
Definition: widgets/Editbox.h:640
RegexMatcher * d_validator
Pointer to class used for validation of text.
Definition: widgets/Editbox.h:632
String::value_type d_maskCodePoint
Code point to use when rendering masked text.
Definition: widgets/Editbox.h:620
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
MatchState getTextMatchState() const
return the validation MatchState for the current Editbox text, given the currently set validation str...
virtual void onTextSelectionChanged(WindowEventArgs &e)
Handler called when the current text selection changes.
virtual bool performPaste(Clipboard &clipboard)
Asks the widget to perform a clipboard paste from the provided clipboard.
bool hasInputFocus(void) const
return true if the Editbox has input focus.
static const String EventTextSelectionChanged
Definition: widgets/Editbox.h:134
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition: InputEvent.h:281
void setTextMasked(bool setting)
Specify whether the text for the Editbox will be rendered masked.
static const String EventEditboxFull
Definition: widgets/Editbox.h:140
Interface for Regex matching support classes.
Definition: RegexMatcher.h:41
MatchState getStringMatchState(const String &str) const
return the match state of the given string for the validation regular expression.
bool isReadOnly(void) const
return true if the Editbox is read-only.
Definition: widgets/Editbox.h:167
Definition: RegexMatcher.h:70
size_t getCaretIndex(void) const
return the current position of the caret.
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:252
virtual void onEditboxFullEvent(WindowEventArgs &e)
Handler called when the edit box text has reached the set maximum length.
virtual void onTextAcceptedEvent(WindowEventArgs &e)
Handler called when the user accepts the edit box text by pressing Return, Enter, or Tab.
virtual void onReadOnlyChanged(WindowEventArgs &e)
Handler called when the read only state of the Editbox has been changed.
virtual void onMaskCodePointChanged(WindowEventArgs &e)
Handler called when the code point to use for masked rendering has been changed.
void handleDelete(void)
Processing for Delete key.
bool d_weOwnValidator
specifies whether validator was created by us, or supplied by user.
Definition: widgets/Editbox.h:634
bool d_readOnly
True if the editbox is in read-only mode.
Definition: widgets/Editbox.h:616
Base class for an Editbox widget.
Definition: widgets/Editbox.h:70
EventArgs based class that is used for objects passed to input event handlers concerning keyboard inp...
Definition: InputEvent.h:315
void clearSelection(void)
Clear the currently defined selection (just the region, not the text).
void eraseSelectedText(bool modify_text=true)
Erase the currently selected text.
size_t d_maxTextLen
Maximum number of characters for this Editbox.
Definition: widgets/Editbox.h:622
bool handleValidityChangeForString(const String &str)
MatchState
Enumeration of possible states when cosidering a regex match.
Definition: RegexMatcher.h:45
size_t d_dragAnchorIdx
Selection index for drag selection anchor point.
Definition: widgets/Editbox.h:638
utf32 value_type
Basic 'code point' type used for String (utf32)
Definition: String.h:69
size_t getSelectionStartIndex(void) const
return the current selection start point.
virtual bool performCopy(Clipboard &clipboard)
Asks the widget to perform a clipboard copy to the provided clipboard.
Editbox(const String &type, const String &name)
Constructor for Editbox class.
static const String EventReadOnlyModeChanged
Definition: widgets/Editbox.h:83
virtual void onMaximumTextLengthChanged(WindowEventArgs &e)
Handler called when the maximum text length for the edit box is changed.
void handleCharRight(uint sysKeys)
Processing to move caret one character right.
static const String EventTextAccepted
Definition: widgets/Editbox.h:147
void onMouseTripleClicked(MouseEventArgs &e)
Handler called when a mouse button has been triple-clicked within this window's area.
size_t getSelectionLength(void) const
return the length of the current selection (in code points / characters).
static const String EventMaximumTextLengthChanged
Definition: widgets/Editbox.h:108
void onTextChanged(WindowEventArgs &e)
Handler called when the window's text is changed.
void onCaptureLost(WindowEventArgs &e)
Handler called when this window loses capture of mouse inputs.
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:151
void onKeyDown(KeyEventArgs &e)
Handler called when a key as been depressed while this window has input focus.
virtual ~Editbox(void)
Destructor for Editbox class.
void onMouseButtonDown(MouseEventArgs &e)
Handler called when a mouse button has been depressed within this window's area.
size_t getMaxTextLength(void) const
return the maximum text length set for this Editbox.
Definition: widgets/Editbox.h:290
Base-class for the assignable WindowRenderer object.
Definition: WindowRenderer.h:52
void setValidator(RegexMatcher *matcher)
Set the RegexMatcher based validator for this Editbox.
static const String EventMaskedRenderingModeChanged
Definition: widgets/Editbox.h:89
static const String EventValidationStringChanged
Definition: widgets/Editbox.h:102
static const String EventTextValidityChanged
Definition: widgets/Editbox.h:122
bool d_previousValidityChangeResponse
Previous match state change response.
Definition: widgets/Editbox.h:642
virtual bool performCut(Clipboard &clipboard)
Asks the widget to perform a clipboard cut to the provided clipboard.
String class used within the GUI system.
Definition: String.h:64
virtual size_t getTextIndexFromPosition(const Vector2f &pt) const =0
Return the text code point index that is rendered closest to screen position pt.
virtual void onMaskedRenderingModeChanged(WindowEventArgs &e)
Handler called when the masked rendering mode (password mode) has been changed.
static const String EventMaskCodePointChanged
Definition: widgets/Editbox.h:96
String d_validationString
Copy of validation reg-ex string.
Definition: widgets/Editbox.h:630
void handleCharLeft(uint sysKeys)
Processing to move caret one character left.
void setSelectionLength(size_t length)
Define the current selection for the Editbox.
void onMouseDoubleClicked(MouseEventArgs &e)
Handler called when a mouse button has been double-clicked within this window's area.
void handleWordRight(uint sysKeys)
Processing to move caret one word right.
static const String EventNamespace
Namespace for global events.
Definition: widgets/Editbox.h:75
virtual bool validateWindowRenderer(const WindowRenderer *renderer) const
validate window renderer
void setReadOnly(bool setting)
Specify whether the Editbox is read-only.
virtual void onTextValidityChanged(RegexMatchStateEventArgs &e)
Handler called when something has caused the validity state of the current text to change.
size_t d_selectionEnd
End of selection area.
Definition: widgets/Editbox.h:628
size_t d_selectionStart
Start of selection area.
Definition: widgets/Editbox.h:626
static const String EventCaretMoved
Definition: widgets/Editbox.h:128