The Battle for Wesnoth  1.17.0-dev
placer.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2021
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 #define GETTEXT_DOMAIN "wesnoth-lib"
17 
18 #include "gui/core/placer.hpp"
19 
20 #include <cassert>
23 
24 
25 namespace gui2
26 {
27 
28 placer_base* placer_base::build(const grow_direction grow_direction,
29  const unsigned parallel_items)
30 {
31  switch(grow_direction.v) {
32  case grow_direction::horizontal:
33  return new implementation::placer_horizontal_list(parallel_items);
34  case grow_direction::vertical:
35  return new implementation::placer_vertical_list(parallel_items);
36  };
37 
38  throw "UNREACHABLE CODE REACHED";
39 }
40 
42 {
43 }
44 
45 } // namespace gui2
Base class for the placement helper.
Base class for the placement helper.
Definition: placer.hpp:51
Placement helper for the horizontal list.
Placement helper for the vertical list.
The placement class for a vertical list.
Generic file dialog.
Definition: field-fwd.hpp:23
virtual ~placer_base()
Definition: placer.cpp:41
The placement class for a horizontal list.
static placer_base * build(const grow_direction grow_direction, const unsigned parallel_items)
Builder function.
Definition: placer.cpp:28