The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
game_save.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2016 by Jörg Hinrichs <[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_SAVE_GAME_HPP_INCLUDED
16 #define GUI_DIALOGS_SAVE_GAME_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 namespace gui2
21 {
22 
23 class tgame_save : public tdialog
24 {
25 public:
26  tgame_save(std::string& filename, const std::string& title);
27 
28  static bool
29  execute(std::string& filename, const std::string& title, CVideo& video)
30  {
31  return tgame_save(filename, title).show(video);
32  }
33 
34 private:
35  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
36  virtual const std::string& window_id() const;
37 };
38 
40 {
41 public:
43  const std::string& title,
44  const std::string& message);
45 
46  static bool execute(std::string& filename,
47  const std::string& title,
48  const std::string& message,
49  CVideo& video)
50  {
51  return tgame_save_message(filename, title, message).show(video);
52  }
53 
54 private:
55  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
56  virtual const std::string& window_id() const;
57 };
58 
59 class tgame_save_oos : public tdialog
60 {
61 public:
62  tgame_save_oos(bool& ignore_all,
63  std::string& filename,
64  const std::string& title,
65  const std::string& message);
66 
67  static bool execute(bool& ignore_all,
68  std::string& filename,
69  const std::string& title,
70  const std::string& message,
71  CVideo& video)
72  {
73  return tgame_save_oos(ignore_all, filename, title, message).show(video);
74  }
75 
76 private:
77  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
78  virtual const std::string& window_id() const;
79 };
80 }
81 
82 #endif
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
Definition: video.hpp:58
static bool execute(std::string &filename, const std::string &title, const std::string &message, CVideo &video)
Definition: game_save.hpp:46
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
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
tgame_save_message(std::string &filename, const std::string &title, const std::string &message)
Definition: game_save.cpp:60
tgame_save(std::string &filename, const std::string &title)
Definition: game_save.cpp:52
static bool execute(bool &ignore_all, std::string &filename, const std::string &title, const std::string &message, CVideo &video)
Definition: game_save.hpp:67
tgame_save_oos(bool &ignore_all, std::string &filename, const std::string &title, const std::string &message)
Definition: game_save.cpp:73
static bool execute(std::string &filename, const std::string &title, CVideo &video)
Definition: game_save.hpp:29
GLsizei GLenum GLuint GLuint GLsizei char * message
Definition: glew.h:2499
GLsizei const GLcharARB ** string
Definition: glew.h:4503