16 #define GETTEXT_DOMAIN "wesnoth-lib"
38 , focus_password_(focus_password)
40 register_label(
"login_label",
false,
label);
41 username_ = register_text(
"user_name",
true,
46 register_bool(
"remember_password",
false,
53 text_box& pwd = find_widget<text_box>(
this,
"password",
false);
59 password_box& pwd = find_widget<password_box>(
this,
"password",
false);
65 text_box&
login = find_widget<text_box>(&win,
"user_name",
false);
Abstract base class for all modal dialogs.
int get_retval() const
Returns the cached window exit code.
This shows the dialog to log in to the MP server.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
T get_widget_value()
Gets the value of the field.
A label displays text that can be wrapped but no scrollbars are provided.
std::string get_real_value() const
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
Class for a single line text area.
base class of top level items, the only item which needs to store the final canvases to draw on.
void keyboard_capture(widget *widget)
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
Implements some helper classes to ease adding fields to a dialog and hide the synchronization needed.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
@ OK
Dialog was closed with the OK button.
void set_remember_password(bool remember)
std::string password(const std::string &server, const std::string &login)
void set_login(const std::string &login)
void set_password(const std::string &server, const std::string &login, const std::string &key)
This file contains the settings handling of the widget library.