The Battle for Wesnoth  1.17.17+dev
generator_settings.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2023
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 class label;
24 
25 namespace dialogs
26 {
27 
29 {
30 public:
32 
33  /** The execute function. See @ref modal_dialog for more information. */
35 
36 private:
37  virtual void pre_show(window& window) override;
38 
40 
41  virtual const std::string& window_id() const override;
42 
43  /** We need to own these fields to access the underlying widget */
47 
48  std::function<void()> update_width_label_, update_height_label_;
49 };
50 
51 } // namespace dialogs
52 } // namespace gui2
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_
virtual void pre_show(window &window) override
The execute function.
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:246
base class of top level items, the only item which needs to store the final canvases to draw on.
Definition: window.hpp:67
std::string label
What to show in the filter's drop-down list.
Definition: manager.cpp:217
#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:199