The Battle for Wesnoth  1.19.5+dev
folder_create.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024
3  by Iris Morelle <shadowm2006@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #define GETTEXT_DOMAIN "wesnoth-lib"
17 
19 
20 #include "gettext.hpp"
22 #include "gui/widgets/window.hpp"
23 
24 namespace gui2::dialogs
25 {
26 
27 REGISTER_DIALOG(folder_create)
28 
29 folder_create::folder_create(std::string& folder_name)
30  : modal_dialog(window_id())
31  , bookmark_mode_(false)
32 {
33  register_text("name", true, folder_name, true);
34 }
35 
37 {
38  if(bookmark_mode_) {
39  find_widget<styled_widget>("title").set_label(_("New Bookmark"));
40  }
41 }
42 
43 } // namespace dialogs
virtual void pre_show() override
Actions to be taken before showing the window.
Abstract base class for all modal dialogs.
static std::string _(const char *str)
Definition: gettext.hpp:93
This file contains the window object, this object is a top level container which has the event manage...
REGISTER_DIALOG(editor_edit_unit)