The Battle for Wesnoth  1.15.2+dev
generator_settings.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2018 by the Battle for Wesnoth Project https://www.wesnoth.org/
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY.
10 
11  See the COPYING file for more details.
12 */
13 
14 #pragma once
15 
18 
19 namespace gui2
20 {
21 
22 class label;
23 
24 namespace dialogs
25 {
26 
28 {
29 public:
30  explicit generator_settings(generator_data& data);
31 
32  /** The execute function. See @ref modal_dialog for more information. */
34 
35 private:
36  virtual void pre_show(window& window) override;
37 
38  void adjust_minimum_size_by_players(window& window);
39 
40  /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
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)
field_integer * players_
We need to own these fields to access the underlying widget.
virtual void pre_show(window &window) override
The execute function.
void adjust_minimum_size_by_players(window &window)
Generic file dialog.
Definition: field-fwd.hpp:22
std::function< void()> update_width_label_
std::function< void()> update_height_label_
Various uncategorised dialogs.
virtual const std::string & window_id() const override
Inherited from modal_dialog, implemented by REGISTER_DIALOG.
Abstract base class for all modal dialogs.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:63
Template class to implement the generic field implementation.
Definition: field-fwd.hpp:35