15 #ifndef GUI_WIDGETS_TEXT_BOX_HPP_INCLUDED
16 #define GUI_WIDGETS_TEXT_BOX_HPP_INCLUDED
269 const tpoint& coordinate);
void handle_key_clear_line(SDLMod modifier, bool &handled)
Inherited from ttext_.
void set_enabled(bool enabled=true)
unsigned pos_
The current position in the history.
tformula< unsigned > text_y_offset
Class for text input history.
bool dragging_
Is the mouse in dragging mode, this affects selection in mouse move.
GLenum GLsizei const GLuint GLboolean enabled
void handle_key_up_arrow(SDLMod, bool &)
Inherited from ttext_.
ttext_history history_
The history text for this widget.
unsigned text_y_offset_
The y offset in the widget where the text starts.
unsigned text_x_offset_
The x offset in the widget where the text starts.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
std::string up(const std::string &text="")
One step up in the history.
bool history_up()
Goes one item up in the history.
void load_config_extra()
Inherited from tcontrol.
void goto_start_of_line(const bool select=false)
Inherited from ttext_.
static ttext_history get_history(const std::string &id, const bool enabled)
Gets history that matches id.
void signal_handler_left_button_down(const event::tevent event, bool &handled)
Class for a single line text area.
unsigned text_height_
The height of the text itself.
std::string get_value() const
void update_offsets()
Updates text_x_offset_ and text_y_offset_.
virtual void set_value(const std::string &text)
The set_value is virtual for the tpassword_box class.
virtual void update_canvas() override
See tcontrol::update_canvas.
Base class of a resolution, contains the common keys for a resolution.
GLuint GLsizei GLsizei * length
A class inherited from ttext_box that displays its input as stars.
tformula< unsigned > text_x_offset
std::string get_value() const
Gets the current history value.
void goto_end_of_data(const bool select=false)
Moves the cursor to the end of all text.
void goto_start_of_data(const bool select=false)
Moves the cursor to the beginning of the data.
void push(const std::string &text)
Push string into the history.
void signal_handler_left_button_double_click(const event::tevent event, bool &handled)
tevent
The event send to the dispatcher.
void handle_key_default(bool &handled, SDLKey key, SDLMod modifier, const utf8::string &unicode)
Inherited from ttext_.
void goto_end_of_line(const bool select=false)
Inherited from ttext_.
ttext_box_definition(const config &cfg)
bool enabled_
Is the history enabled.
void save_to_history()
Saves the text in the widget to the history.
void handle_mouse_selection(tpoint mouse, const bool start_selection)
void delete_selection()
Inherited from ttext_.
std::string down(const std::string &text="")
One step down in the history.
tresolution(const config &cfg)
void set_max_input_length(const size_t length)
tbuilder_text_box(const config &cfg)
void set_history(const std::string &id)
void handle_key_down_arrow(SDLMod, bool &)
Inherited from ttext_.
void signal_handler_mouse_motion(const event::tevent event, bool &handled, const tpoint &coordinate)
std::vector< std::string > * history_
The items in the history.
void signal_handler_left_button_up(const event::tevent event, bool &handled)
void delete_char(const bool before_cursor)
Inherited from ttext_.
ttext_history(std::vector< std::string > *history, const bool enabled)
A config object defines a single node in a WML file, with access to child nodes.
size_t max_input_length_
The maximum length of the text input.
GLsizei const GLcharARB ** string
Abstract base class for text items.
Contains the implementation details for lexical_cast and shouldn't be used directly.
bool history_down()
Goes one item down in the history.
virtual const std::string & get_control_type() const override
See tcontrol::get_control_type.