The Battle for Wesnoth  1.19.5+dev
game_cache_options.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2024
3  by Iris Morelle <shadowm2006@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 
20 namespace gui2
21 {
22 class label;
23 class button;
24 namespace dialogs
25 {
26 
28 {
29 public:
30  /** Constructor. */
32 
33  /**
34  * The display function.
35  *
36  * See @ref modal_dialog for more information.
37  */
39 
40 private:
41  std::string cache_path_;
42 
46 
47  void clean_cache_callback();
48  bool clean_cache();
49 
50  void purge_cache_callback();
51  bool purge_cache();
52 
54 
55  void browse_cache_callback();
56 
58 
59  virtual const std::string& window_id() const override;
60 
61  virtual void pre_show() override;
62 
63  virtual void post_show() override;
64 };
65 
66 } // namespace dialogs
67 } // namespace gui2
Simple push button.
Definition: button.hpp:36
virtual const std::string & window_id() const override
The ID of the window to build.
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
std::string cache_path_
The display function.
Abstract base class for all modal dialogs.
std::string label
What to show in the filter's drop-down list.
Definition: manager.cpp:200
#define DEFINE_SIMPLE_DISPLAY_WRAPPER(dialog)
Adds a bare-bones static display function to a dialog class that immediately invokes the dialogs's mo...
Various uncategorised dialogs.
Generic file dialog.