25 const std::unique_ptr<Impl> pimpl;
31 std::string
text()
const;
35 void set_text(
const std::string& text);
52 #ifndef GOSU_IS_IPHONE 60 virtual std::string
filter(std::string text)
const
bool feed_sdl_event(void *event)
void set_text(const std::string &text)
Replaces the current text by the given string and positions the cursor at the end of the text...
unsigned caret_pos() const
Index of the character that comes after the caret.
void delete_forward()
Deletes the current selection, if any, or the next character.
void set_selection_start(unsigned pos)
Sets the start of the selection as returned by selection_start.
TextInput instances are invisible objects that build a text string from input, using the current oper...
void insert_text(std::string text)
Replaces the current selection (if any) and inserts the given string at the current caret position...
void set_caret_pos(unsigned pos)
Sets the caret position as returned by caret_pos.
virtual std::string filter(std::string text) const
Overridable filter that is applied to all new text that is entered.
unsigned selection_start() const
If there is a selection, the selection_start() member yields its beginning, using the same indexing s...
void delete_backward()
Deletes the current selection, if any, or the previous character.