The Battle for Wesnoth  1.15.12+dev
gamestate_inspector.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Yurii Chernyi <terraninfo@terraninfo.net>
3  Part of the Battle for Wesnoth Project https://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 #pragma once
16 
18 #include "variable.hpp"
19 
20 namespace game_events {class manager; }
21 class display_context;
22 
23 namespace gui2::dialogs
24 {
25 
26 /**
27  * @ingroup GUIWindowDefinitionWML
28  *
29  * This shows the gamestate inspector.
30  * Key |Type |Mandatory|Description
31  * ------------------|--------------|---------|-----------
32  * inspector_name | control |yes |Name of the inspector.
33  * stuff_list | control |yes |List of various stuff that can be viewed.
34  * inspect | control |yes |The state of the variable or event.
35  * copy | @ref button |yes |A button to copy the state to clipboard.
36  */
38 {
39 public:
40  class model;
41  class view;
42  class controller;
43  gamestate_inspector(const config& vars, const game_events::manager& events, const display_context& dc, const std::string& title = "");
44 
46 
47 private:
48  virtual void pre_show(window& window) override;
49 
50  virtual const std::string& window_id() const override;
51 
52  std::shared_ptr<view> view_;
53  std::shared_ptr<model> model_;
54  std::shared_ptr<controller> controller_;
55  std::string title_;
56  const config& vars_;
59 };
60 } // namespace dialogs
const game_events::manager & events_
This shows the gamestate inspector.
Domain specific events.
Definition: action_wml.cpp:86
The game event manager loads the scenario configuration object, and ensures that events are handled a...
Definition: manager.hpp:43
Handling of system events.
Definition: manager.hpp:42
Abstract base class for all modal dialogs.
std::shared_ptr< controller > controller_
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:59
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64