16 #define GETTEXT_DOMAIN "wesnoth-lib"
33 , focus_password_(focus_password)
35 register_label(
"login_label",
false,
label);
36 username_ = register_text(
"user_name",
true,
41 register_bool(
"remember_password",
false,
48 text_box& pwd = find_widget<text_box>(
"password");
54 password_box& pwd = find_widget<password_box>(
"password");
60 text_box& login = find_widget<text_box>(
"user_name");
Abstract base class for all modal dialogs.
int get_retval() const
Returns the cached window exit code.
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
void connect_signal(const F &func, const queue_position position=back_child)
Adds a callback to the appropriate queue based on event type.
T get_widget_value()
Gets the value of the field.
std::string get_real_value() const
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
A widget that allows the user to input text in single line.
void keyboard_capture(widget *widget)
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
void set_remember_password(bool remember)
void set_login(const std::string &login)
void set_password(const std::string &server, const std::string &login, const std::string &key)
Implements some helper classes to ease adding fields to a dialog and hide the synchronization needed.
REGISTER_DIALOG(editor_edit_unit)
@ OK
Dialog was closed with the OK button.