The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
screenshot_notification.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 - 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_SCREENSHOT_NOTIFICATION_HPP_INCLUDED
16 #define GUI_DIALOGS_SCREENSHOT_NOTIFICATION_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 namespace gui2
21 {
22 
24 {
25 public:
26  /**
27  * Constructor.
28  *
29  * @param path Path to the screenshot file created. The caller should
30  * ensure the file exists, otherwise it will be displayed
31  * with size 0.
32  */
34 
35  /**
36  * The display function.
37  *
38  * See @ref tdialog for more information.
39  */
40  static void display(const std::string& path, CVideo& video)
41  {
42  tscreenshot_notification(path).show(video);
43  }
44 
45 private:
48 
49  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const;
51 
52  /** Inherited from tdialog. */
53  void pre_show(twindow& window);
54 };
55 }
56 
57 #endif /* ! GUI_DIALOGS_SCREENSHOT_NOTIFICATION_HPP_INCLUDED */
Definition: video.hpp:58
tscreenshot_notification(const std::string &path)
Constructor.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
GLsizei const char ** path
Definition: glew.h:4654
Abstract base class for all dialogs.
Definition: dialog.hpp:121
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
void pre_show(twindow &window)
Inherited from tdialog.
GLsizei const GLcharARB ** string
Definition: glew.h:4503
static void display(const std::string &path, CVideo &video)
The display function.