The Battle for Wesnoth  1.19.7+dev
window_private.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2024
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 
18 /**
19  * @file
20  * Helper for header for the window.
21  *
22  * @note This file should only be included by window.cpp.
23  *
24  * This file is being used for a small experiment similar like
25  * gui/widgets/grid_private.hpp.
26  */
27 
28 #include "gui/widgets/window.hpp"
29 
30 namespace gui2
31 {
32 
33 /**
34  * Helper to implement private functions without modifying the header.
35  *
36  * The class is a helper to avoid recompilation and only has static
37  * functions.
38  */
40 {
41  /**
42  * Layouts the window.
43  *
44  * This part handles the actual layouting of the window.
45  *
46  * See @ref layout_algorithm for more information.
47  *
48  * @param window The window to operate upon.
49  * @param maximum_width The maximum width of the window.
50  * @param maximum_height The maximum height of the window.
51  */
52  static void layout(window& window,
53  const unsigned maximum_width,
54  const unsigned maximum_height);
55 };
56 
57 } // namespace gui2
base class of top level items, the only item which needs to store the final canvases to draw on.
Definition: window.hpp:61
This file contains the window object, this object is a top level container which has the event manage...
Generic file dialog.
Helper to implement private functions without modifying the header.
static void layout(window &window, const unsigned maximum_width, const unsigned maximum_height)
Layouts the window.
Definition: window.cpp:1128