16 #define GETTEXT_DOMAIN "wesnoth-lib" 28 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 29 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 49 for(std::size_t
i = 0;
i < sz;
i++) {
86 for(std::size_t
i = 0;
i < sz;
i++) {
105 static const std::string
type =
"password_box";
119 builder_password_box::builder_password_box(
const config& cfg)
126 auto widget = std::make_unique<password_box>(*this);
132 DBG_GUI_G <<
"Window builder: placed password box '" <<
id 133 <<
"' with definition '" <<
definition <<
"'.";
Define the common log macros for the gui toolkit.
void insert_char(const std::string &unicode) override
Inserts a character at the cursor.
std::string copy_from_clipboard(const bool)
Copies text from the clipboard.
void paste_selection(const bool mouse) override
Pastes the current selection.
Class for a single line text area.
std::size_t get_selection_length() const
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
This file contains the settings handling of the widget library.
EXIT_STATUS start(const std::string &filename, bool take_screenshot, const std::string &screenshot_filename)
Main interface for launching the editor from the title screen.
virtual void set_value(const std::string &text) override
Inherited from text_box_base.
void delete_selection() override
Deletes the current selection.
virtual void insert_char(const std::string &unicode)
Inserts a character at the cursor.
virtual std::unique_ptr< widget > build() const override
std::string & insert(std::string &str, const std::size_t pos, const std::string &insert)
Insert a UTF-8 string at the specified position.
const std::string unicode_bullet
std::string & erase(std::string &str, const std::size_t start, const std::size_t len)
Erases a portion of a UTF-8 string.
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
const std::string & text() const
virtual const std::string & get_control_type() const override
See styled_widget::get_control_type.
std::size_t get_selection_start() const
void set_cursor(const std::size_t offset, const bool select)
Moves the cursor at the wanted position.
text_history history_
The history text for this widget.
A config object defines a single node in a WML file, with access to child nodes.
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
Contains the implementation details for lexical_cast and shouldn't be used directly.
Key Type Default Description label t_string"" The initial text of the password box.