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