The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
scrollbar_panel.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2009 - 2025
3 by Mark de Wever <koraq@xs4all.nl>
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
22
23namespace gui2
24{
25
26// ------------ WIDGET -----------{
27
28namespace implementation
29{
30struct builder_scrollbar_panel;
31}
32
34{
36
37public:
38 /**
39 * Constructor.
40 */
42
43 /** See @ref styled_widget::get_active. */
44 virtual bool get_active() const override;
45
46 /** See @ref styled_widget::get_state. */
47 virtual unsigned get_state() const override;
48
49 /** Static type getter that does not rely on the widget being constructed. */
50 static const std::string& type();
51
52private:
53 /** Inherited from styled_widget, implemented by REGISTER_WIDGET. */
54 virtual const std::string& get_control_type() const override;
55
56 /** See @ref container_base::set_self_active. */
57 virtual void set_self_active(const bool active) override;
58};
59
60// }---------- DEFINITION ---------{
61
63{
64
65 explicit scrollbar_panel_definition(const config& cfg);
66
68 {
69 explicit resolution(const config& cfg);
70
72 };
73};
74
75// }---------- BUILDER -----------{
76
77namespace implementation
78{
79
81{
82 explicit builder_scrollbar_panel(const config& cfg);
83
85
86 virtual std::unique_ptr<widget> build() const override;
87
89};
90
91} // namespace implementation
92
93// }------------ END --------------
94
95} // namespace gui2
A config object defines a single node in a WML file, with access to child nodes.
Definition config.hpp:157
Base class for creating containers with one or two scrollbar(s).
virtual void set_self_active(const bool active) override
See container_base::set_self_active.
virtual bool get_active() const override
See styled_widget::get_active.
virtual const std::string & get_control_type() const override
Inherited from styled_widget, implemented by REGISTER_WIDGET.
virtual unsigned get_state() const override
See styled_widget::get_state.
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
const config * cfg
Generic file dialog.
std::shared_ptr< builder_grid > builder_grid_ptr
Contains the implementation details for lexical_cast and shouldn't be used directly.
virtual std::unique_ptr< widget > build() const override
virtual std::unique_ptr< widget > build() const=0