Add a seperate macro to register a window.
The code for the tooltips can use one dialog for several windows. This means the current register window macros won't work so split the main macro in two parts: - register the window - 'write' the code for the dialog
This commit is contained in:
parent
6bb642890b
commit
0d0b685661
65 changed files with 117 additions and 96 deletions
|
@ -71,7 +71,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(addon_description)
|
||||
REGISTER_DIALOG(addon_description)
|
||||
|
||||
void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
taddon_description(const addon_info& ainfo)
|
||||
: ainfo_(ainfo) {}
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(addon_connect)
|
||||
REGISTER_DIALOG(addon_connect)
|
||||
|
||||
void taddon_connect::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
bool allow_updates_;
|
||||
bool allow_remove_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(addon_list)
|
||||
REGISTER_DIALOG(addon_list)
|
||||
|
||||
void taddon_list::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(campaign_difficulty)
|
||||
REGISTER_DIALOG(campaign_difficulty)
|
||||
|
||||
tcampaign_difficulty::tcampaign_difficulty(const std::vector<std::string>& items)
|
||||
: index_(-1), items_()
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
int index_;
|
||||
std::vector<legacy_menu_item> items_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(campaign_selection)
|
||||
REGISTER_DIALOG(campaign_selection)
|
||||
|
||||
void tcampaign_selection::campaign_selected(twindow& window)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ private:
|
|||
/** Called when another campaign is selected. */
|
||||
void campaign_selected(twindow& window);
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
namespace gui2 {
|
||||
|
||||
|
||||
REGISTER_WINDOW(data_manage)
|
||||
REGISTER_DIALOG(data_manage)
|
||||
|
||||
tdata_manage::tdata_manage(const config& cache_config)
|
||||
: txtFilter_(register_text("txtFilter", false))
|
||||
|
|
|
@ -40,7 +40,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
bool filter_text_changed(ttext_* textbox, const std::string& text);
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(debug_clock)
|
||||
REGISTER_DIALOG(debug_clock)
|
||||
|
||||
void tdebug_clock::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ private:
|
|||
*/
|
||||
ttime time_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -28,53 +28,74 @@ namespace gui2 {
|
|||
/**
|
||||
* Registers a window.
|
||||
*
|
||||
* Call this function to register a window. In the header of the class add the
|
||||
* following code:
|
||||
* This function registers a window. The registration is used to validate
|
||||
* whether the config for the window exists when starting Wesnoth.
|
||||
*
|
||||
* @note Most of the time you want to call @ref REGISTER_DIALOG instead of this
|
||||
* function. It also directly adds the code for the dialog's id function.
|
||||
*
|
||||
* @todo Rename the function to its full name once the old name has been unused
|
||||
* for a while.
|
||||
*
|
||||
* @param id Id of the window, multiple dialogs can use
|
||||
* the same window so the id doesn't need to be
|
||||
* unique.
|
||||
*/
|
||||
#define REGISTER_WND( \
|
||||
id) \
|
||||
namespace { \
|
||||
\
|
||||
namespace ns_##id { \
|
||||
\
|
||||
struct tregister_helper { \
|
||||
tregister_helper() \
|
||||
{ \
|
||||
register_window(#id); \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
tregister_helper register_helper; \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a window for a dialog.
|
||||
*
|
||||
* Call this function to register a window. In the header of the class it adds
|
||||
* the following code:
|
||||
*@code
|
||||
* // Inherited from tdialog, implemented by REGISTER_WINDOW.
|
||||
* // Inherited from tdialog, implemented by REGISTER_DIALOG.
|
||||
* virtual const std::string& id() const;
|
||||
*@endcode
|
||||
* Then use this macro in the implementation, inside the gui2 namespace.
|
||||
*
|
||||
* @note When the @ref id is "foo" and the type tfoo it's easier to use
|
||||
* REGISTER_WINDOW(foo).
|
||||
* REGISTER_DIALOG(foo).
|
||||
*
|
||||
* @param type Class type of the window to register.
|
||||
* @param id Id of the window, multiple dialogs can use
|
||||
* the same window so the id doesn't need to be
|
||||
* unique.
|
||||
*/
|
||||
#define REGISTER_WINDOW2( \
|
||||
#define REGISTER_DIALOG2( \
|
||||
type \
|
||||
, id) \
|
||||
namespace { \
|
||||
\
|
||||
namespace ns_##type { \
|
||||
\
|
||||
struct tregister_helper { \
|
||||
tregister_helper() \
|
||||
{ \
|
||||
register_window(id); \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
tregister_helper register_helper; \
|
||||
} \
|
||||
} \
|
||||
REGISTER_WND(id) \
|
||||
\
|
||||
const std::string& \
|
||||
type::window_id() const \
|
||||
{ \
|
||||
static const std::string result(id); \
|
||||
static const std::string result(#id); \
|
||||
return result; \
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for REGISTER_WINDOW2.
|
||||
* Wrapper for REGISTER_DIALOG2.
|
||||
*
|
||||
* "Calls" REGISTER_WINDOW2(twindow_id, "window_id")
|
||||
* "Calls" REGISTER_DIALOG2(twindow_id, window_id)
|
||||
*/
|
||||
#define REGISTER_WINDOW(window_id) REGISTER_WINDOW2(t##window_id, #window_id)
|
||||
#define REGISTER_DIALOG(window_id) REGISTER_DIALOG2(t##window_id, window_id)
|
||||
|
||||
/**
|
||||
* Abstract base class for all dialogs.
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(edit_label)
|
||||
REGISTER_DIALOG(edit_label)
|
||||
|
||||
tedit_label::tedit_label(const std::string& label, bool team_only)
|
||||
: team_only_(team_only)
|
||||
|
|
|
@ -51,7 +51,7 @@ private:
|
|||
|
||||
tfield_text* label_field_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(editor_generate_map)
|
||||
REGISTER_DIALOG(editor_generate_map)
|
||||
|
||||
teditor_generate_map::teditor_generate_map()
|
||||
: map_generators_()
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(editor_new_map)
|
||||
REGISTER_DIALOG(editor_new_map)
|
||||
|
||||
teditor_new_map::teditor_new_map() :
|
||||
map_width_(register_integer("width", false)),
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
tfield_integer* map_width_;
|
||||
tfield_integer* map_height_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(editor_resize_map)
|
||||
REGISTER_DIALOG(editor_resize_map)
|
||||
|
||||
/**
|
||||
* @todo Test whether the slider can be changed to an interger selector.
|
||||
|
|
|
@ -73,7 +73,7 @@ private:
|
|||
|
||||
EXPAND_DIRECTION expand_direction_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
void pre_show(CVideo& video, twindow& window);
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(editor_settings)
|
||||
REGISTER_DIALOG(editor_settings)
|
||||
|
||||
teditor_settings::teditor_settings()
|
||||
: redraw_callback_()
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
void set_use_mdi(bool value);
|
||||
|
||||
private:
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(formula_debugger)
|
||||
REGISTER_DIALOG(formula_debugger)
|
||||
|
||||
void tformula_debugger::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ private:
|
|||
/** Inherited from tdialog. */
|
||||
void pre_show(CVideo& video, twindow& window);
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/***** ***** button callbacks ***** *****/
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(game_delete)
|
||||
REGISTER_DIALOG(game_delete)
|
||||
|
||||
tgame_delete::tgame_delete()
|
||||
: chk_dont_ask_again_(register_bool("dont_ask_again"))
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
/** Inherited from tdialog. */
|
||||
void post_show(twindow& window);
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
tfield_bool* chk_dont_ask_again_;
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(game_load)
|
||||
REGISTER_DIALOG(game_load)
|
||||
|
||||
tgame_load::tgame_load(const config& cache_config)
|
||||
: txtFilter_(register_text("txtFilter", false))
|
||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
bool filter_text_changed(ttext_* textbox, const std::string& text);
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(game_save)
|
||||
REGISTER_DIALOG(game_save)
|
||||
|
||||
tgame_save::tgame_save(const std::string& title, const std::string& filename) :
|
||||
txtFilename_(register_text("txtFilename", false)),
|
||||
|
@ -70,7 +70,7 @@ void tgame_save::post_show(twindow& window)
|
|||
}
|
||||
|
||||
|
||||
REGISTER_WINDOW(game_save_message)
|
||||
REGISTER_DIALOG(game_save_message)
|
||||
|
||||
tgame_save_message::tgame_save_message(const std::string& title, const std::string& filename, const std::string& message)
|
||||
: tgame_save(title, filename),
|
||||
|
@ -84,7 +84,7 @@ void tgame_save_message::pre_show(CVideo& video, twindow& window)
|
|||
tgame_save::pre_show(video, window);
|
||||
}
|
||||
|
||||
REGISTER_WINDOW(game_save_oos)
|
||||
REGISTER_DIALOG(game_save_oos)
|
||||
|
||||
tgame_save_oos::tgame_save_oos(const std::string& title, const std::string& filename, const std::string& message)
|
||||
: tgame_save_message(title, filename, message),
|
||||
|
|
|
@ -37,7 +37,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
tfield_text* txtFilename_;
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
tgame_save_message(const std::string& title, const std::string& filename="", const std::string& message="");
|
||||
|
||||
private:
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tgame_save. */
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
bool ignore_all() const { return ignore_all_; }
|
||||
|
||||
private:
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -554,7 +554,7 @@ private:
|
|||
};
|
||||
|
||||
|
||||
REGISTER_WINDOW(gamestate_inspector)
|
||||
REGISTER_DIALOG(gamestate_inspector)
|
||||
|
||||
tgamestate_inspector::tgamestate_inspector(const vconfig &cfg)
|
||||
: view_()
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
boost::shared_ptr<view> get_view();
|
||||
|
||||
private:
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
boost::shared_ptr<view> view_;
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(language_selection)
|
||||
REGISTER_DIALOG(language_selection)
|
||||
|
||||
void tlanguage_selection::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -72,7 +72,7 @@ static lg::log_domain log_lobby("lobby");
|
|||
|
||||
namespace gui2 {
|
||||
|
||||
REGISTER_WINDOW(lobby_main)
|
||||
REGISTER_DIALOG(lobby_main)
|
||||
|
||||
void tsub_player_list::init(gui2::twindow &w, const std::string &id)
|
||||
{
|
||||
|
|
|
@ -325,7 +325,7 @@ private:
|
|||
|
||||
void skip_replay_changed_callback(twidget* w);
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
namespace gui2 {
|
||||
|
||||
REGISTER_WINDOW(lobby_player_info)
|
||||
REGISTER_DIALOG(lobby_player_info)
|
||||
|
||||
tlobby_player_info::tlobby_player_info(events::chat_handler& chat, user_info& info, const lobby_info& li)
|
||||
: chat_(chat), info_(info), reason_(NULL), time_(NULL), relation_(NULL),
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace gui2 {
|
||||
|
||||
REGISTER_WINDOW(message)
|
||||
REGISTER_DIALOG(message)
|
||||
|
||||
/**
|
||||
* Helper to implement private functions without modifying the header.
|
||||
|
|
|
@ -125,7 +125,7 @@ private:
|
|||
/** Holds a pointer to the buttons. */
|
||||
std::vector<tbutton_status> buttons_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(mp_cmd_wrapper)
|
||||
REGISTER_DIALOG(mp_cmd_wrapper)
|
||||
|
||||
tmp_cmd_wrapper::tmp_cmd_wrapper(const t_string& user) :
|
||||
message_(), reason_(), time_(), user_(user) { }
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
private:
|
||||
std::string host_name_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
@ -82,7 +82,7 @@ private:
|
|||
void post_show(twindow& window);
|
||||
};
|
||||
|
||||
REGISTER_WINDOW(mp_server_list)
|
||||
REGISTER_DIALOG(mp_server_list)
|
||||
|
||||
void tmp_server_list::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ void tmp_server_list::post_show(twindow& window)
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(mp_connect)
|
||||
REGISTER_DIALOG(mp_connect)
|
||||
|
||||
tmp_connect::tmp_connect() :
|
||||
video_(0),
|
||||
|
@ -218,7 +218,7 @@ void tmp_connect::show_server_list(twindow& window)
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(mp_login)
|
||||
REGISTER_DIALOG(mp_login)
|
||||
|
||||
tmp_login::tmp_login(const t_string& label, const bool focus_password) :
|
||||
label_(label), focus_password_(focus_password) { }
|
||||
|
|
|
@ -31,7 +31,7 @@ private:
|
|||
/** Used in show in order to show list. */
|
||||
CVideo* video_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#endif
|
||||
namespace gui2 {
|
||||
|
||||
REGISTER_WINDOW(mp_create_game)
|
||||
REGISTER_DIALOG(mp_create_game)
|
||||
|
||||
tmp_create_game::tmp_create_game(const config& cfg) :
|
||||
cfg_(cfg),
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(mp_create_game_set_password)
|
||||
REGISTER_DIALOG(mp_create_game_set_password)
|
||||
|
||||
tmp_create_game_set_password::tmp_create_game_set_password(const std::string& password)
|
||||
: password_(password)
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
std::string password_;
|
||||
tfield_text* password_field_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(mp_method_selection)
|
||||
REGISTER_DIALOG(mp_method_selection)
|
||||
|
||||
void tmp_method_selection::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ private:
|
|||
int choice_;
|
||||
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(simple_item_selector)
|
||||
REGISTER_DIALOG(simple_item_selector)
|
||||
|
||||
tsimple_item_selector::tsimple_item_selector(const std::string& title, const std::string& message, list_type const& items, bool title_uses_markup, bool message_uses_markup)
|
||||
: index_(-1)
|
||||
|
|
|
@ -65,7 +65,7 @@ private:
|
|||
|
||||
std::string ok_label_, cancel_label_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(title_screen)
|
||||
REGISTER_DIALOG(title_screen)
|
||||
|
||||
bool show_debug_clock_button = false;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace gui2 {
|
||||
|
||||
REGISTER_WINDOW(transient_message)
|
||||
REGISTER_DIALOG(transient_message)
|
||||
|
||||
void ttransient_message::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ private:
|
|||
/** An optional image to show at the left of the text. */
|
||||
std::string image_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(unit_attack)
|
||||
REGISTER_DIALOG(unit_attack)
|
||||
|
||||
tunit_attack::tunit_attack(
|
||||
const unit_map::iterator& attacker_itor
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace gui2 {
|
|||
* @end{table}
|
||||
*/
|
||||
|
||||
REGISTER_WINDOW(unit_create)
|
||||
REGISTER_DIALOG(unit_create)
|
||||
|
||||
tunit_create::tunit_create()
|
||||
: gender_(last_gender)
|
||||
|
|
|
@ -44,7 +44,7 @@ private:
|
|||
std::string choice_;
|
||||
std::vector<std::string> type_ids_;
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
|
||||
/** Inherited from tdialog. */
|
||||
|
|
|
@ -156,9 +156,9 @@ void twml_message_::post_show(twindow& window)
|
|||
}
|
||||
}
|
||||
|
||||
REGISTER_WINDOW(wml_message_left)
|
||||
REGISTER_DIALOG(wml_message_left)
|
||||
|
||||
REGISTER_WINDOW(wml_message_right)
|
||||
REGISTER_DIALOG(wml_message_right)
|
||||
|
||||
int show_wml_message(const bool left_side
|
||||
, CVideo& video
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
};
|
||||
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/** Inherited from tdialog, implemented by REGISTER_WINDOW. */
|
||||
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
|
||||
virtual const std::string& window_id() const;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue