22 #ifndef GUI_WIDGETS_EDITABLE_H 23 #define GUI_WIDGETS_EDITABLE_H 25 #include "common/keyboard.h" 26 #include "common/str.h" 27 #include "gui/widget.h" 28 #include "gui/ThemeEngine.h" 29 #include "gui/object.h" 53 int _editScrollOffset;
59 bool _disableSelection;
79 void handleTickle()
override;
80 void handleMouseDown(
int x,
int y,
int button,
int clickCount)
override;
81 void handleMouseUp(
int x,
int y,
int button,
int clickCount)
override;
82 void handleMouseMoved(
int x,
int y,
int button)
override;
86 void reflowLayout()
override;
88 void moveCaretToStart(
bool shiftPressed);
89 void moveCaretToEnd(
bool shiftPressed);
90 bool setCaretPos(
int newPos);
91 void setSelectionOffset(
int newOffset);
94 void drawWidget()
override;
96 virtual void startEditMode() = 0;
97 virtual void endEditMode() = 0;
98 virtual void abortEditMode() = 0;
105 virtual int getCaretOffset()
const;
106 virtual int getSelectionCarretOffset()
const;
107 void drawCaret(
bool erase,
bool useRelativeCoordinates =
false);
109 void makeCaretVisible();
111 void defaultKeyDownHandler(
Common::KeyState &state,
bool &dirty,
bool &forcecaret,
bool &handled);
118 int caretVisualPos(
int logicalPos)
const;
119 int caretLogicalPos()
const;
121 void clearSelection();
TextAlign
Definition: font.h:48
TextInversionState
Text inversion state of the text to be draw.
Definition: ThemeEngine.h:259
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: algorithm.h:29
FontStyle
Font style selector.
Definition: ThemeEngine.h:274
char32_t u32char_type_t
Definition: ustr.h:41
Definition: keyboard.h:294