The Battle for Wesnoth  1.19.5+dev
chat_log.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 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 class replay;
22 
23 namespace gui2::dialogs
24 {
25 
26 class chat_log : public modal_dialog
27 {
28 public:
29  class model;
30  class view;
31  class controller;
32  chat_log(const vconfig& cfg, const replay& replay);
33 
35 
36  virtual void pre_show() override;
37 
38  std::shared_ptr<view> get_view() const;
39 
40 private:
41  virtual const std::string& window_id() const override;
42 
43  std::shared_ptr<view> view_;
44 };
45 } // namespace dialogs
std::shared_ptr< view > get_view() const
Definition: chat_log.cpp:412
virtual void pre_show() override
Actions to be taken before showing the window.
Definition: chat_log.cpp:417
chat_log(const vconfig &cfg, const replay &replay)
Definition: chat_log.cpp:403
virtual const std::string & window_id() const override
The ID of the window to build.
std::shared_ptr< view > view_
Definition: chat_log.hpp:43
Abstract base class for all modal dialogs.
A variable-expanding proxy for the config class.
Definition: variable.hpp:45
#define DEFINE_SIMPLE_DISPLAY_WRAPPER(dialog)
Adds a bare-bones static display function to a dialog class that immediately invokes the dialogs's mo...