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