The Battle for Wesnoth  1.19.5+dev
generator_settings.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2024
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
19 
20 namespace gui2
21 {
22 
23 
24 namespace dialogs
25 {
26 
28 {
29 public:
31 
32  /** The execute function. See @ref modal_dialog for more information. */
34 
35 private:
36  virtual void pre_show() override;
37 
39 
40  virtual const std::string& window_id() const override;
41 
42  /** We need to own these fields to access the underlying widget */
46 
47  std::function<void()> update_width_label_, update_height_label_;
48 };
49 
50 } // namespace dialogs
51 } // namespace gui2
virtual void pre_show() override
The execute function.
generator_settings(generator_data &data)
std::function< void()> update_height_label_
virtual const std::string & window_id() const override
The ID of the window to build.
std::function< void()> update_width_label_
field_integer * players_
We need to own these fields to access the underlying widget.
Abstract base class for all modal dialogs.
Template class to implement the generic field implementation.
Definition: field.hpp:245
#define DEFINE_SIMPLE_EXECUTE_WRAPPER(dialog)
Adds a bare-bonesstatic execute function to a dialog class that immediately invokes and return the re...
Various uncategorised dialogs.
Generic file dialog.
std::string_view data
Definition: picture.cpp:178