The Battle for Wesnoth  1.17.0-dev
placer.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2018 by Mark de Wever <koraq@xs4all.nl>
3  Part of the Battle for Wesnoth Project https://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 #define GETTEXT_DOMAIN "wesnoth-lib"
16 
17 #include "gui/core/placer.hpp"
18 
19 #include <cassert>
22 
23 
24 namespace gui2
25 {
26 
27 placer_base* placer_base::build(const grow_direction grow_direction,
28  const unsigned parallel_items)
29 {
30  switch(grow_direction.v) {
31  case grow_direction::horizontal:
32  return new implementation::placer_horizontal_list(parallel_items);
33  case grow_direction::vertical:
34  return new implementation::placer_vertical_list(parallel_items);
35  };
36 
37  throw "UNREACHABLE CODE REACHED";
38 }
39 
41 {
42 }
43 
44 } // namespace gui2
Base class for the placement helper.
Base class for the placement helper.
Definition: placer.hpp:50
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:22
virtual ~placer_base()
Definition: placer.cpp:40
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:27