30 #ifndef _CEGUIMultiLineEditbox_h_
31 #define _CEGUIMultiLineEditbox_h_
34 #include "../Window.h"
40 # pragma warning(push)
41 # pragma warning(disable : 4251)
69 virtual Rectf getTextRenderArea(
void)
const = 0;
73 void onLookNFeelAssigned();
177 bool hasInputFocus(
void)
const;
209 size_t getSelectionStartIndex(
void)
const;
220 size_t getSelectionEndIndex(
void)
const;
230 size_t getSelectionLength(
void)
const;
251 bool isWordWrapped(
void)
const;
275 bool isVertScrollbarAlwaysShown(
void)
const;
299 Rectf getTextRenderArea(
void)
const;
302 const LineList& getFormattedLines(
void)
const {
return d_lines;}
309 size_t getLineNumberFromIndex(
size_t index)
const;
324 virtual void initialiseComponents(
void);
338 void setReadOnly(
bool setting);
352 void setCaretIndex(
size_t caret_pos);
370 void setSelection(
size_t start_pos,
size_t end_pos);
384 void setSelectionStart(
size_t start_pos);
396 void setSelectionLength(
size_t length);
408 void setMaxTextLength(
size_t max_len);
415 void ensureCaretIsVisible(
void);
429 void setWordWrapping(
bool setting);
442 void setShowVertScrollbar(
bool setting);
445 void setSelectionBrushImage(
const Image* image);
446 const Image* getSelectionBrushImage()
const;
449 virtual bool performCopy(Clipboard& clipboard);
452 virtual bool performCut(Clipboard& clipboard);
455 virtual bool performPaste(Clipboard& clipboard);
465 void formatText(
const bool update_scrollbars);
474 MultiLineEditbox(
const String& type,
const String& name);
481 virtual ~MultiLineEditbox(
void);
508 void formatText(
void);
520 size_t getNextTokenLength(
const String& text,
size_t start_idx)
const;
527 void configureScrollbars(
void);
540 size_t getTextIndexFromPosition(
const Vector2f& pt)
const;
547 void clearSelection(
void);
557 void eraseSelectedText(
bool modify_text =
true);
564 void handleBackspace(
void);
571 void handleDelete(
void);
578 void handleCharLeft(uint sysKeys);
585 void handleWordLeft(uint sysKeys);
592 void handleCharRight(uint sysKeys);
599 void handleWordRight(uint sysKeys);
606 void handleDocHome(uint sysKeys);
613 void handleDocEnd(uint sysKeys);
620 void handleLineHome(uint sysKeys);
627 void handleLineEnd(uint sysKeys);
634 void handleLineUp(uint sysKeys);
641 void handleLineDown(uint sysKeys);
648 void handleNewLine(uint sysKeys);
655 void handlePageUp(uint sysKeys);
662 void handlePageDown(uint sysKeys);
668 bool handle_scrollChange(
const EventArgs& args);
671 bool handle_vertScrollbarVisibilityChanged(
const EventArgs&);
674 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
683 void onReadOnlyChanged(WindowEventArgs& e);
690 void onWordWrapModeChanged(WindowEventArgs& e);
697 void onMaximumTextLengthChanged(WindowEventArgs& e);
704 void onCaretMoved(WindowEventArgs& e);
711 void onTextSelectionChanged(WindowEventArgs& e);
718 void onEditboxFullEvent(WindowEventArgs& e);
725 void onVertScrollbarModeChanged(WindowEventArgs& e);
732 void onHorzScrollbarModeChanged(WindowEventArgs& e);
738 virtual void onMouseButtonDown(MouseEventArgs& e);
739 virtual void onMouseButtonUp(MouseEventArgs& e);
740 virtual void onMouseDoubleClicked(MouseEventArgs& e);
741 virtual void onMouseTripleClicked(MouseEventArgs& e);
742 virtual void onMouseMove(MouseEventArgs& e);
743 virtual void onCaptureLost(WindowEventArgs& e);
744 virtual void onCharacter(KeyEventArgs& e);
745 virtual void onKeyDown(KeyEventArgs& e);
746 virtual void onTextChanged(WindowEventArgs& e);
747 virtual void onSized(ElementEventArgs& e);
748 virtual void onMouseWheel(MouseEventArgs& e);
749 virtual void onFontChanged(WindowEventArgs& e);
780 void addMultiLineEditboxProperties(
void);
785 #if defined(_MSC_VER)
786 # pragma warning(pop)
789 #endif // end of guard _CEGUIMultiLineEditbox_h_