The Battle for Wesnoth  1.19.5+dev
gamestate_inspector.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2024
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 
28 {
29 public:
30  class model;
31  class view;
32  class controller;
33  gamestate_inspector(const config& vars, const game_events::manager& events, const display_context& dc, const std::string& title = "");
34 
36 
37 private:
38  virtual void pre_show() override;
39 
40  virtual const std::string& window_id() const override;
41 
42  std::shared_ptr<view> view_;
43  std::shared_ptr<model> model_;
44  std::shared_ptr<controller> controller_;
45  std::string title_;
46  const config& vars_;
49 };
50 } // namespace dialogs
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:172
Abstract class for exposing game data that doesn't depend on the GUI, however which for historical re...
The game event manager loads the scenario configuration object, and ensures that events are handled a...
Definition: manager.hpp:45
const game_events::manager & events_
virtual const std::string & window_id() const override
The ID of the window to build.
virtual void pre_show() override
Actions to be taken before showing the window.
std::shared_ptr< controller > controller_
DEFINE_SIMPLE_DISPLAY_WRAPPER(gamestate_inspector)
gamestate_inspector(const config &vars, const game_events::manager &events, const display_context &dc, const std::string &title="")
Abstract base class for all modal dialogs.
Handling of system events.
Domain specific events.