DigitalSpaces::DICEGUIEditbox Struct Reference
[CEGUI]

#include <CEGUIInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

bool hasInputFocus ()
 return true if the Editbox has input focus.
bool isReadOnly ()
 return true if the Editbox is read-only.
bool isTextMasked ()
 return true if the text for the Editbox will be rendered masked.
bool isTextValid ()
 return true if the Editbox text is valid given the currently set validation string.
const char * getValidationString ()
 return the currently set validation string
unsigned long getCaratIndex ()
 return the current position of the carat.
unsigned long getSelectionStartIndex ()
 return the current selection start point.
unsigned long getSelectionEndIndex ()
 return the current selection end point.
unsigned long getSelectionLength ()
 return the length of the current selection (in code points / characters).
unsigned long getMaskCodePoint ()
 return the utf32 code point used when rendering masked text.
unsigned long getMaxTextLength ()
 return the maximum text length set for this Editbox.
void setReadOnly (bool setting)
 Specify whether the Editbox is read-only.
void setTextMasked (bool setting)
 Specify whether the text for the Editbox will be rendered masked.
void setValidationString (const char *validation_string)
 Set the text validation string.
void setCaratIndex (unsigned long carat_pos)
 Set the current position of the carat.
void setSelection (unsigned long start_pos, unsigned long end_pos)
 Define the current selection for the Editbox.
void setMaskCodePoint (unsigned long code_point)
 set the utf32 code point used when rendering masked text.
void setMaxTextLength (unsigned long max_len)
 set the maximum text length for this Editbox.

Member Function Documentation

bool DigitalSpaces::DICEGUIEditbox::hasInputFocus (  ) 

return true if the Editbox has input focus.

Returns:
true if the Editbox has keyboard input focus, false if the Editbox does not have keyboard input focus.

bool DigitalSpaces::DICEGUIEditbox::isReadOnly (  ) 

return true if the Editbox is read-only.

Returns:
true if the Editbox is read only and can't be edited by the user, false if the Editbox is not read only and may be edited by the user.

bool DigitalSpaces::DICEGUIEditbox::isTextMasked (  ) 

return true if the text for the Editbox will be rendered masked.

Returns:
true if the Editbox text will be rendered masked using the currently set mask code point, false if the Editbox text will be rendered as plain text.

bool DigitalSpaces::DICEGUIEditbox::isTextValid (  ) 

return true if the Editbox text is valid given the currently set validation string.

Note:
It is possible to programmatically set 'invalid' text for the Editbox by calling setText. This has certain implications since if invalid text is set, whatever the user types into the box will be rejected when the input is validated.

Validation is performed by means of a regular expression. If the text matches the regex, the text is said to have passed validation. If the text does not match with the regex then the text fails validation.

Returns:
true if the current Editbox text passes validation, false if the text does not pass validation.

const char* DigitalSpaces::DICEGUIEditbox::getValidationString (  ) 

return the currently set validation string

Note:
Validation is performed by means of a regular expression. If the text matches the regex, the text is said to have passed validation. If the text does not match with the regex then the text fails validation.
Returns:
String object containing the current validation regex data

unsigned long DigitalSpaces::DICEGUIEditbox::getCaratIndex (  ) 

return the current position of the carat.

Returns:
Index of the insert carat relative to the start of the text.

unsigned long DigitalSpaces::DICEGUIEditbox::getSelectionStartIndex (  ) 

return the current selection start point.

Returns:
Index of the selection start point relative to the start of the text. If no selection is defined this function returns the position of the carat.

unsigned long DigitalSpaces::DICEGUIEditbox::getSelectionEndIndex (  ) 

return the current selection end point.

Returns:
Index of the selection end point relative to the start of the text. If no selection is defined this function returns the position of the carat.

unsigned long DigitalSpaces::DICEGUIEditbox::getSelectionLength (  ) 

return the length of the current selection (in code points / characters).

Returns:
Number of code points (or characters) contained within the currently defined selection.

unsigned long DigitalSpaces::DICEGUIEditbox::getMaskCodePoint (  ) 

return the utf32 code point used when rendering masked text.

Returns:
utf32 code point value representing the Unicode code point that will be rendered instead of the Editbox text when rendering in masked mode.

unsigned long DigitalSpaces::DICEGUIEditbox::getMaxTextLength (  ) 

return the maximum text length set for this Editbox.

Returns:
The maximum number of code points (characters) that can be entered into this Editbox.
Note:
Depending on the validation string set, the actual length of text that can be entered may be less than the value returned here (it will never be more).

void DigitalSpaces::DICEGUIEditbox::setReadOnly ( bool  setting  ) 

Specify whether the Editbox is read-only.

Parameters:
setting true if the Editbox is read only and can't be edited by the user, false if the Editbox is not read only and may be edited by the user.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setTextMasked ( bool  setting  ) 

Specify whether the text for the Editbox will be rendered masked.

Parameters:
setting true if the Editbox text should be rendered masked using the currently set mask code point, false if the Editbox text should be rendered as plain text.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setValidationString ( const char *  validation_string  ) 

Set the text validation string.

Note:
Validation is performed by means of a regular expression. If the text matches the regex, the text is said to have passed validation. If the text does not match with the regex then the text fails validation.
Parameters:
validation_string String object containing the validation regex data to be used.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setCaratIndex ( unsigned long  carat_pos  ) 

Set the current position of the carat.

Parameters:
carat_pos New index for the insert carat relative to the start of the text. If the value specified is greater than the number of characters in the Editbox, the carat is positioned at the end of the text.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setSelection ( unsigned long  start_pos,
unsigned long  end_pos 
)

Define the current selection for the Editbox.

Parameters:
start_pos Index of the starting point for the selection. If this value is greater than the number of characters in the Editbox, the selection start will be set to the end of the text.
end_pos Index of the ending point for the selection. If this value is greater than the number of characters in the Editbox, the selection end will be set to the end of the text.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setMaskCodePoint ( unsigned long  code_point  ) 

set the utf32 code point used when rendering masked text.

Parameters:
code_point utf32 code point value representing the Unicode code point that should be rendered instead of the Editbox text when rendering in masked mode.
Returns:
Nothing.

void DigitalSpaces::DICEGUIEditbox::setMaxTextLength ( unsigned long  max_len  ) 

set the maximum text length for this Editbox.

Parameters:
max_len The maximum number of code points (characters) that can be entered into this Editbox.
Note:
Depending on the validation string set, the actual length of text that can be entered may be less than the value set here (it will never be more).
Returns:
Nothing.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:30 2008 for Digital Spaces by  doxygen 1.5.6