The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
folder_create.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2016 by Ignacio Riquelme Morelle <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GUI_DIALOGS_FOLDER_CREATE_HPP_INCLUDED
16 #define GUI_DIALOGS_FOLDER_CREATE_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 namespace gui2
21 {
22 
23 class tfolder_create : public tdialog
24 {
25 public:
26  /**
27  * Constructor.
28  *
29  * @param [in, out] folder_name
30  * The parameter's usage is:
31  * - Input: A suggested folder name.
32  * - Output: The folder name the user actually
33  * entered if the dialog returns @ref
34  * twindow::OK; undefined otherwise.
35  */
36  tfolder_create(std::string& folder_name);
37 
38  /** The execute function; see @ref tdialog for more information. */
39  static bool execute(std::string& folder_name, CVideo& video)
40  {
41  return tfolder_create(folder_name).show(video);
42  }
43 
44 private:
45  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
46  virtual const std::string& window_id() const;
47 };
48 }
49 
50 #endif /* ! GUI_DIALOGS_EDIT_LABEL_INCLUDED */
Definition: video.hpp:58
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
Abstract base class for all dialogs.
Definition: dialog.hpp:121
static bool execute(std::string &folder_name, CVideo &video)
The execute function; see tdialog for more information.
tfolder_create(std::string &folder_name)
Constructor.
GLsizei const GLcharARB ** string
Definition: glew.h:4503