The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
lua_interpreter.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2014 - 2025
3 by Chris Beck <render787@gmail.com>
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
20class lua_kernel_base;
21
22namespace gui2::dialogs
23{
24
26{
27public:
28 class lua_model;
29 class input_model;
30 class view;
31 class controller;
32
34
35 virtual void pre_show() override;
36
38 static void display(lua_kernel_base * lk);
39 static void display(WHICH_KERNEL which);
40private:
41 const std::unique_ptr<controller> controller_;
42
43 virtual const std::string& window_id() const override;
44};
45
46} // namespace dialogs
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
Definition display.hpp:88
The controller is responsible to hold all the input widgets, and a pointer to the model and view.
The input_model keeps track of what commands were executed before, and figures out what should be dis...
The lua model is responsible to interact with the lua kernel base and keep track of what should be di...
virtual const std::string & window_id() const override
The ID of the window to build.
virtual void pre_show() override
Bind the controller, initialize one of the static labels with info about this kernel,...
const std::unique_ptr< controller > controller_
Abstract base class for all modal dialogs.