Classes | |
struct | LineInfo |
struct used to store information about a formatted line within the paragraph. More... | |
Public Types | |
typedef std::vector< LineInfo > | LineList |
Type for collection of LineInfos. | |
Public Member Functions | |
bool | hasInputFocus (void) const |
return true if the edit box has input focus. | |
bool | isReadOnly (void) const |
return true if the edit box is read-only. | |
size_t | getCaratIndex (void) const |
return the current position of the carat. | |
size_t | getSelectionStartIndex (void) const |
return the current selection start point. | |
size_t | getSelectionEndIndex (void) const |
return the current selection end point. | |
size_t | getSelectionLength (void) const |
return the length of the current selection (in code points / characters). | |
size_t | getMaxTextLength (void) const |
return the maximum text length set for this edit box. | |
bool | isWordWrapped (void) const |
Return whether the text in the edit box will be word-wrapped. | |
Scrollbar * | getVertScrollbar () const |
Return a pointer to the vertical scrollbar component widget for this MultiLineEditbox. | |
bool | isVertScrollbarAlwaysShown (void) const |
Return whether the vertical scroll bar is always shown. | |
Scrollbar * | getHorzScrollbar () const |
Return a pointer to the horizontal scrollbar component widget for this MultiLineEditbox. | |
Rect | getTextRenderArea (void) const |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to. | |
const LineList & | getFormattedLines (void) const |
size_t | getLineNumberFromIndex (size_t index) const |
Return the line number a given index falls on with the current formatting. Will return last line if index is out of range. | |
virtual void | initialiseComponents (void) |
Initialise the Window based object ready for use. | |
void | setReadOnly (bool setting) |
Specify whether the edit box is read-only. | |
void | setCaratIndex (size_t carat_pos) |
Set the current position of the carat. | |
void | setSelection (size_t start_pos, size_t end_pos) |
Define the current selection for the edit box. | |
void | setMaxTextLength (size_t max_len) |
set the maximum text length for this edit box. | |
void | ensureCaratIsVisible (void) |
Scroll the view so that the current carat position is visible. | |
void | setWordWrapping (bool setting) |
Set whether the text will be word wrapped or not. | |
void | setShowVertScrollbar (bool setting) |
Set whether the vertical scroll bar should always be shown. | |
void | setSelectionBrushImage (const Image *image) |
const Image * | getSelectionBrushImage () const |
MultiLineEditbox (const String &type, const String &name) | |
Constructor for the MultiLineEditbox base class. | |
virtual | ~MultiLineEditbox (void) |
Destructor for the MultiLineEditbox base class. | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | WidgetTypeName |
Window factory name. | |
static const String | EventReadOnlyModeChanged |
The read-only mode for the edit box has been changed. | |
static const String | EventWordWrapModeChanged |
The word wrap mode of the text box has been changed. | |
static const String | EventMaximumTextLengthChanged |
The maximum allowable string length has been changed. | |
static const String | EventCaratMoved |
The text carat (insert point) has changed. | |
static const String | EventTextSelectionChanged |
The current text selection has changed. | |
static const String | EventEditboxFull |
The number of characters in the edit box has reached the current maximum. | |
static const String | EventVertScrollbarModeChanged |
Event triggered when the vertical scroll bar 'force' setting changes. | |
static const String | EventHorzScrollbarModeChanged |
Event triggered when the horizontal scroll bar 'force' setting changes. | |
static const String | VertScrollbarNameSuffix |
Widget name suffix for the vertical scrollbar component. | |
static const String | HorzScrollbarNameSuffix |
Widget name suffix for the horizontal scrollbar component. | |
Protected Member Functions | |
void | formatText (void) |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to. | |
size_t | getNextTokenLength (const String &text, size_t start_idx) const |
Return the length of the next token in String text starting at index start_idx. | |
void | configureScrollbars (void) |
display required integrated scroll bars according to current state of the edit box and update their values. | |
size_t | getTextIndexFromPosition (const Point &pt) const |
Return the text code point index that is rendered closest to screen position pt. | |
void | clearSelection (void) |
Clear the current selection setting. | |
void | eraseSelectedText (bool modify_text=true) |
Erase the currently selected text. | |
void | handleBackspace (void) |
Processing for backspace key. | |
void | handleDelete (void) |
Processing for Delete key. | |
void | handleCharLeft (uint sysKeys) |
Processing to move carat one character left. | |
void | handleWordLeft (uint sysKeys) |
Processing to move carat one word left. | |
void | handleCharRight (uint sysKeys) |
Processing to move carat one character right. | |
void | handleWordRight (uint sysKeys) |
Processing to move carat one word right. | |
void | handleDocHome (uint sysKeys) |
Processing to move carat to the start of the text. | |
void | handleDocEnd (uint sysKeys) |
Processing to move carat to the end of the text. | |
void | handleLineHome (uint sysKeys) |
Processing to move carat to the start of the current line. | |
void | handleLineEnd (uint sysKeys) |
Processing to move carat to the end of the current line. | |
void | handleLineUp (uint sysKeys) |
Processing to move carat up a line. | |
void | handleLineDown (uint sysKeys) |
Processing to move carat down a line. | |
void | handleNewLine (uint sysKeys) |
Processing to insert a new line / paragraph. | |
void | handlePageUp (uint sysKeys) |
Processing to move caret one page up. | |
void | handlePageDown (uint sysKeys) |
Processing to move caret one page down. | |
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 hierarchy. | |
bool | handle_scrollChange (const EventArgs &args) |
Internal handler that is triggered when the user interacts with the scrollbars. | |
virtual bool | validateWindowRenderer (const String &name) const |
Function used in checking if a WindowRenderer is valid for this window. | |
void | onReadOnlyChanged (WindowEventArgs &e) |
Handler called when the read-only state of the edit box changes. | |
void | onWordWrapModeChanged (WindowEventArgs &e) |
Handler called when the word wrap mode for the the edit box changes. | |
void | onMaximumTextLengthChanged (WindowEventArgs &e) |
Handler called when the maximum text length for the edit box changes. | |
void | onCaratMoved (WindowEventArgs &e) |
Handler called when the carat moves. | |
void | onTextSelectionChanged (WindowEventArgs &e) |
Handler called when the text selection changes. | |
void | onEditboxFullEvent (WindowEventArgs &e) |
Handler called when the edit box is full. | |
void | onVertScrollbarModeChanged (WindowEventArgs &e) |
Handler called when the 'always show' setting for the vertical scroll bar changes. | |
void | onHorzScrollbarModeChanged (WindowEventArgs &e) |
Handler called when 'always show' setting for the horizontal scroll bar changes. | |
virtual void | onMouseButtonDown (MouseEventArgs &e) |
Handler called when a mouse button has been depressed within this window's area. | |
virtual void | onMouseButtonUp (MouseEventArgs &e) |
Handler called when a mouse button has been released within this window's area. | |
virtual void | onMouseDoubleClicked (MouseEventArgs &e) |
Handler called when a mouse button has been double-clicked within this window's area. | |
virtual void | onMouseTripleClicked (MouseEventArgs &e) |
Handler called when a mouse button has been triple-clicked within this window's area. | |
virtual void | onMouseMove (MouseEventArgs &e) |
Handler called when the mouse cursor has been moved within this window's area. | |
virtual void | onCaptureLost (WindowEventArgs &e) |
Handler called when this window loses capture of mouse inputs. | |
virtual void | onCharacter (KeyEventArgs &e) |
Handler called when a character-key has been pressed while this window has input focus. | |
virtual void | onKeyDown (KeyEventArgs &e) |
Handler called when a key as been depressed while this window has input focus. | |
virtual void | onTextChanged (WindowEventArgs &e) |
Handler called when the window's text is changed. | |
virtual void | onSized (WindowEventArgs &e) |
Handler called when the window's size changes. | |
virtual void | onMouseWheel (MouseEventArgs &e) |
Handler called when the mouse wheel (z-axis) position changes within this window's area. | |
Protected Attributes | |
bool | d_readOnly |
true if the edit box is in read-only mode | |
size_t | d_maxTextLen |
Maximum number of characters for this Editbox. | |
size_t | d_caratPos |
Position of the carat / insert-point. | |
size_t | d_selectionStart |
Start of selection area. | |
size_t | d_selectionEnd |
End of selection area. | |
bool | d_dragging |
true when a selection is being dragged. | |
size_t | d_dragAnchorIdx |
Selection index for drag selection anchor point. | |
bool | d_wordWrap |
true when formatting uses word-wrapping. | |
LineList | d_lines |
Holds the lines for the current formatting. | |
float | d_widestExtent |
Holds the extent of the widest line as calculated in the last formatting pass. | |
bool | d_forceVertScroll |
true if vertical scrollbar should always be displayed | |
bool | d_forceHorzScroll |
true if horizontal scrollbar should always be displayed | |
const Image * | d_selectionBrush |
Image to use as the selection brush (should be set by derived class). | |
Static Protected Attributes | |
static String | d_lineBreakChars |
Holds what we consider to be line break characters. |
void CEGUI::MultiLineEditbox::eraseSelectedText | ( | bool | modify_text = true |
) | [protected] |
Erase the currently selected text.
modify_text | when true, the actual text will be modified. When false, everything is done except erasing the characters. |
References clearSelection(), CEGUI::Window::d_text, CEGUI::String::erase(), getSelectionLength(), getSelectionStartIndex(), onTextChanged(), and setCaratIndex().
Referenced by handleBackspace(), handleDelete(), handleNewLine(), and onCharacter().
void CEGUI::MultiLineEditbox::formatText | ( | void | ) | [protected] |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to.
Format the text into lines as needed by the current formatting options.
References configureScrollbars(), CEGUI::MultiLineEditbox::LineInfo::d_extent, CEGUI::MultiLineEditbox::LineInfo::d_length, d_lineBreakChars, d_lines, CEGUI::MultiLineEditbox::LineInfo::d_startIdx, CEGUI::Window::d_text, d_widestExtent, d_wordWrap, CEGUI::String::find_first_of(), CEGUI::Font::getCharAtPixel(), CEGUI::Window::getFont(), getNextTokenLength(), CEGUI::Font::getTextExtent(), getTextRenderArea(), CEGUI::Rect::getWidth(), CEGUI::String::length(), CEGUI::String::npos, CEGUI::Window::requestRedraw(), and CEGUI::String::substr().
Referenced by initialiseComponents(), onSized(), onTextChanged(), and setWordWrapping().
size_t CEGUI::MultiLineEditbox::getCaratIndex | ( | void | ) | const [inline] |
return the current position of the carat.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheCaratImagery(), handleDelete(), handleNewLine(), handleWordLeft(), handleWordRight(), onCharacter(), onKeyDown(), and onTextChanged().
Scrollbar * CEGUI::MultiLineEditbox::getHorzScrollbar | ( | ) | const |
Return a pointer to the horizontal scrollbar component widget for this MultiLineEditbox.
UnknownObjectException | Thrown if the horizontal Scrollbar component does not exist. |
References CEGUI::Window::getName(), and HorzScrollbarNameSuffix.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheCaratImagery(), CEGUI::FalagardMultiLineEditbox::cacheTextLines(), configureScrollbars(), ensureCaratIsVisible(), getTextIndexFromPosition(), CEGUI::FalagardMultiLineEditbox::getTextRenderArea(), initialiseComponents(), and onMouseWheel().
size_t CEGUI::MultiLineEditbox::getMaxTextLength | ( | void | ) | const [inline] |
return the maximum text length set for this edit box.
size_t CEGUI::MultiLineEditbox::getNextTokenLength | ( | const String & | text, | |
size_t | start_idx | |||
) | const [protected] |
Return the length of the next token in String text starting at index start_idx.
References CEGUI::TextUtils::DefaultWrapDelimiters, CEGUI::String::find_first_of(), CEGUI::String::length(), and CEGUI::String::npos.
Referenced by formatText().
size_t CEGUI::MultiLineEditbox::getSelectionEndIndex | ( | void | ) | const |
return the current selection end point.
References d_caratPos, d_selectionEnd, and d_selectionStart.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheTextLines().
size_t CEGUI::MultiLineEditbox::getSelectionLength | ( | void | ) | const |
return the length of the current selection (in code points / characters).
References d_selectionEnd, and d_selectionStart.
Referenced by clearSelection(), eraseSelectedText(), handleBackspace(), handleDelete(), onKeyDown(), and CEGUI::MultiLineEditboxProperties::SelectionStart::set().
size_t CEGUI::MultiLineEditbox::getSelectionStartIndex | ( | void | ) | const |
return the current selection start point.
References d_caratPos, d_selectionEnd, and d_selectionStart.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheTextLines(), eraseSelectedText(), and CEGUI::MultiLineEditboxProperties::SelectionLength::set().
size_t CEGUI::MultiLineEditbox::getTextIndexFromPosition | ( | const Point & | pt | ) | const [protected] |
Return the text code point index that is rendered closest to screen position pt.
pt | Point object describing a position on the screen in pixels. |
References CEGUI::Rect::d_left, d_lines, CEGUI::Window::d_text, CEGUI::Rect::d_top, CEGUI::Vector2::d_x, CEGUI::Vector2::d_y, CEGUI::Font::getCharAtPixel(), CEGUI::Window::getFont(), getHorzScrollbar(), CEGUI::Font::getLineSpacing(), CEGUI::Scrollbar::getScrollPosition(), getTextRenderArea(), getVertScrollbar(), CEGUI::CoordConverter::screenToWindow(), and CEGUI::String::substr().
Referenced by onMouseButtonDown(), and onMouseMove().
Rect CEGUI::MultiLineEditbox::getTextRenderArea | ( | void | ) | const |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to.
References CEGUI::Window::d_windowRenderer, and CEGUI::MultiLineEditboxWindowRenderer::getTextRenderArea().
Referenced by configureScrollbars(), ensureCaratIsVisible(), formatText(), getTextIndexFromPosition(), handlePageDown(), and handlePageUp().
Scrollbar * CEGUI::MultiLineEditbox::getVertScrollbar | ( | ) | const |
Return a pointer to the vertical scrollbar component widget for this MultiLineEditbox.
UnknownObjectException | Thrown if the vertical Scrollbar component does not exist. |
References CEGUI::Window::getName(), and VertScrollbarNameSuffix.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheCaratImagery(), CEGUI::FalagardMultiLineEditbox::cacheTextLines(), configureScrollbars(), ensureCaratIsVisible(), getTextIndexFromPosition(), CEGUI::FalagardMultiLineEditbox::getTextRenderArea(), initialiseComponents(), and onMouseWheel().
bool CEGUI::MultiLineEditbox::hasInputFocus | ( | void | ) | const |
return true if the edit box has input focus.
References CEGUI::Window::isActive().
Referenced by CEGUI::FalagardMultiLineEditbox::cacheTextLines(), onCharacter(), onKeyDown(), and CEGUI::FalagardMultiLineEditbox::render().
void CEGUI::MultiLineEditbox::initialiseComponents | ( | void | ) | [virtual] |
Initialise the Window based object ready for use.
Reimplemented from CEGUI::Window.
References CEGUI::Scrollbar::EventScrollPositionChanged, formatText(), getHorzScrollbar(), getVertScrollbar(), handle_scrollChange(), CEGUI::Window::performChildWindowLayout(), and CEGUI::EventSet::subscribeEvent().
bool CEGUI::MultiLineEditbox::isReadOnly | ( | void | ) | const [inline] |
return true if the edit box is read-only.
Referenced by CEGUI::FalagardMultiLineEditbox::cacheEditboxBaseImagery(), handleBackspace(), handleDelete(), handleNewLine(), onCharacter(), onKeyDown(), and CEGUI::FalagardMultiLineEditbox::render().
bool CEGUI::MultiLineEditbox::isVertScrollbarAlwaysShown | ( | void | ) | const |
Return whether the vertical scroll bar is always shown.
References d_forceVertScroll.
bool CEGUI::MultiLineEditbox::isWordWrapped | ( | void | ) | const |
Return whether the text in the edit box will be word-wrapped.
References d_wordWrap.
void CEGUI::MultiLineEditbox::onCaptureLost | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when this window loses capture of mouse inputs.
e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'. |
Reimplemented from CEGUI::Window.
References d_dragging, and CEGUI::EventArgs::handled.
void CEGUI::MultiLineEditbox::onCharacter | ( | KeyEventArgs & | e | ) | [protected, virtual] |
Handler called when a character-key has been pressed while this window has input focus.
e | KeyEventArgs object whose 'codepoint' field is set to the Unicode code point (encoded as utf32) for the character typed, and whose 'sysKeys' field represents the combination of SystemKey that were active when the event was generated. All other fields should be considered as 'junk'. |
Reimplemented from CEGUI::Window.
References CEGUI::KeyEventArgs::codepoint, d_caratPos, d_maxTextLen, CEGUI::Window::d_text, eraseSelectedText(), getCaratIndex(), CEGUI::Window::getFont(), CEGUI::EventArgs::handled, hasInputFocus(), CEGUI::String::insert(), isReadOnly(), CEGUI::String::length(), onEditboxFullEvent(), and onTextChanged().
void CEGUI::MultiLineEditbox::onKeyDown | ( | KeyEventArgs & | e | ) | [protected, virtual] |
Handler called when a key as been depressed while this window has input focus.
e | KeyEventArgs object whose 'scancode' field is set to the Key::Scan value representing the key that was pressed, and whose 'sysKeys' field represents the combination of SystemKey that were active when the event was generated. |
Reimplemented from CEGUI::Window.
References CEGUI::Control, d_dragAnchorIdx, getCaratIndex(), getSelectionLength(), handleBackspace(), handleCharLeft(), handleCharRight(), CEGUI::EventArgs::handled, handleDelete(), handleDocEnd(), handleDocHome(), handleLineDown(), handleLineEnd(), handleLineHome(), handleLineUp(), handleNewLine(), handlePageDown(), handlePageUp(), handleWordLeft(), handleWordRight(), hasInputFocus(), isReadOnly(), CEGUI::KeyEventArgs::scancode, and CEGUI::KeyEventArgs::sysKeys.
void CEGUI::MultiLineEditbox::onMouseButtonDown | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been depressed within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References CEGUI::MouseEventArgs::button, CEGUI::Window::captureInput(), clearSelection(), d_dragAnchorIdx, d_dragging, getTextIndexFromPosition(), CEGUI::EventArgs::handled, CEGUI::LeftButton, CEGUI::MouseEventArgs::position, and setCaratIndex().
void CEGUI::MultiLineEditbox::onMouseButtonUp | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been released within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References CEGUI::MouseEventArgs::button, CEGUI::EventArgs::handled, CEGUI::LeftButton, and CEGUI::Window::releaseInput().
void CEGUI::MultiLineEditbox::onMouseDoubleClicked | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been double-clicked within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References CEGUI::MouseEventArgs::button, d_caratPos, d_dragAnchorIdx, CEGUI::Window::d_text, CEGUI::TextUtils::getNextWordStartIdx(), CEGUI::TextUtils::getWordStartIdx(), CEGUI::EventArgs::handled, CEGUI::LeftButton, CEGUI::String::length(), and setSelection().
void CEGUI::MultiLineEditbox::onMouseMove | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when the mouse cursor has been moved within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References d_caratPos, d_dragAnchorIdx, d_dragging, getTextIndexFromPosition(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::position, setCaratIndex(), and setSelection().
void CEGUI::MultiLineEditbox::onMouseTripleClicked | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been triple-clicked within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References CEGUI::String::append(), CEGUI::MouseEventArgs::button, d_caratPos, d_dragAnchorIdx, d_lineBreakChars, d_lines, CEGUI::Window::d_text, CEGUI::String::find_first_of(), CEGUI::String::find_last_of(), getLineNumberFromIndex(), CEGUI::EventArgs::handled, CEGUI::LeftButton, CEGUI::String::length(), CEGUI::String::npos, setCaratIndex(), and setSelection().
void CEGUI::MultiLineEditbox::onMouseWheel | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when the mouse wheel (z-axis) position changes within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
References CEGUI::Scrollbar::getDocumentSize(), getHorzScrollbar(), CEGUI::Scrollbar::getPageSize(), CEGUI::Scrollbar::getScrollPosition(), CEGUI::Scrollbar::getStepSize(), getVertScrollbar(), CEGUI::EventArgs::handled, CEGUI::Window::isVisible(), CEGUI::Scrollbar::setScrollPosition(), and CEGUI::MouseEventArgs::wheelChange.
void CEGUI::MultiLineEditbox::onSized | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when the window's size changes.
e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'. |
Reimplemented from CEGUI::Window.
References formatText(), and CEGUI::EventArgs::handled.
void CEGUI::MultiLineEditbox::onTextChanged | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when the window's text is changed.
e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'. |
Reimplemented from CEGUI::Window.
References CEGUI::String::append(), clearSelection(), CEGUI::Window::d_text, ensureCaratIsVisible(), formatText(), getCaratIndex(), CEGUI::EventArgs::handled, CEGUI::String::length(), CEGUI::Window::performChildWindowLayout(), and setCaratIndex().
Referenced by eraseSelectedText(), handleBackspace(), handleDelete(), handleNewLine(), onCharacter(), and setMaxTextLength().
void CEGUI::MultiLineEditbox::setCaratIndex | ( | size_t | carat_pos | ) |
Set the current position of the carat.
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 edit box, the carat is positioned at the end of the text. |
References d_caratPos, CEGUI::Window::d_text, ensureCaratIsVisible(), CEGUI::String::length(), and onCaratMoved().
Referenced by eraseSelectedText(), handleBackspace(), handleCharLeft(), handleCharRight(), handleDocEnd(), handleDocHome(), handleLineDown(), handleLineEnd(), handleLineHome(), handleLineUp(), handlePageDown(), handlePageUp(), handleWordLeft(), handleWordRight(), onMouseButtonDown(), onMouseMove(), onMouseTripleClicked(), and onTextChanged().
void CEGUI::MultiLineEditbox::setMaxTextLength | ( | size_t | max_len | ) |
set the maximum text length for this edit box.
max_len | The maximum number of code points (characters) that can be entered into this Editbox. |
References d_maxTextLen, CEGUI::Window::d_text, CEGUI::String::length(), onMaximumTextLengthChanged(), onTextChanged(), and CEGUI::String::resize().
void CEGUI::MultiLineEditbox::setReadOnly | ( | bool | setting | ) |
Specify whether the edit box is read-only.
setting |
|
References d_readOnly, and onReadOnlyChanged().
void CEGUI::MultiLineEditbox::setSelection | ( | size_t | start_pos, | |
size_t | end_pos | |||
) |
Define the current selection for the edit box.
start_pos | Index of the starting point for the selection. If this value is greater than the number of characters in the edit box, 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 edit box, the selection start will be set to the end of the text. |
References d_selectionEnd, d_selectionStart, CEGUI::Window::d_text, CEGUI::String::length(), and onTextSelectionChanged().
Referenced by clearSelection(), handleCharLeft(), handleCharRight(), handleDocEnd(), handleDocHome(), handleLineDown(), handleLineEnd(), handleLineHome(), handleLineUp(), handlePageDown(), handlePageUp(), handleWordLeft(), handleWordRight(), onMouseDoubleClicked(), onMouseMove(), onMouseTripleClicked(), CEGUI::MultiLineEditboxProperties::SelectionLength::set(), and CEGUI::MultiLineEditboxProperties::SelectionStart::set().
void CEGUI::MultiLineEditbox::setShowVertScrollbar | ( | bool | setting | ) |
Set whether the vertical scroll bar should always be shown.
setting | true if the vertical scroll bar should be shown even when it is not required. false if the vertical scroll bar should only be shown when it is required. |
References configureScrollbars(), d_forceVertScroll, and onVertScrollbarModeChanged().
void CEGUI::MultiLineEditbox::setWordWrapping | ( | bool | setting | ) |
Set whether the text will be word wrapped or not.
setting |
|
References d_wordWrap, formatText(), and onWordWrapModeChanged().
virtual bool CEGUI::MultiLineEditbox::testClassName_impl | ( | const String & | class_name | ) | const [inline, protected, virtual] |
Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
class_name | The class name that is to be checked. |
Reimplemented from CEGUI::Window.
References CEGUI::Window::testClassName_impl().
virtual bool CEGUI::MultiLineEditbox::validateWindowRenderer | ( | const String & | name | ) | const [inline, protected, virtual] |
Function used in checking if a WindowRenderer is valid for this window.
Reimplemented from CEGUI::Window.