The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
instance.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2017 by Mark de Wever <koraq@xs4all.nl>
3  Part of the Battle for Wesnoth Project http://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 
18 
19 #include "config.hpp"
20 
21 namespace gui2
22 {
23 
24 namespace implementation
25 {
26 
28 {
29  explicit builder_instance(const config& cfg);
30 
31  widget* build() const;
32 
33  widget* build(const replacements_map& replacements) const;
34 
35  /**
36  * Holds a copy of the cfg parameter in the constructor.
37  *
38  * This is used when instantiating a spacer, it can still use the
39  * parameters originally sent.
40  */
42 };
43 
44 } // namespace implementation
45 
46 } // namespace gui2
Contains the info needed to instantiate a widget.
Base class for all widgets.
Definition: widget.hpp:48
Definitions for the interface to Wesnoth Markup Language (WML).
Generic file dialog.
Definition: field-fwd.hpp:22
std::map< std::string, std::shared_ptr< builder_widget > > replacements_map
The replacements type is used to define replacement types.
config configuration
Holds a copy of the cfg parameter in the constructor.
Definition: instance.hpp:41
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:93
Contains the implementation details for lexical_cast and shouldn't be used directly.