The Battle for Wesnoth  1.15.1+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 tgrow_direction grow_direction,
28  const unsigned parallel_items)
29 {
30  switch(grow_direction.v) {
31  case tgrow_direction::horizontal:
32  return new implementation::placer_horizontal_list(parallel_items);
33  case tgrow_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.
Placement helper for the horizontal list.
Placement helper for the vertical list.
Generic file dialog.
Definition: field-fwd.hpp:22
virtual MAKE_ENUM(tgrow_direction,(horizontal, "horizontal")(vertical, "vertical")) public ~placer_base()
The direction the placer should grow towards.
Definition: placer.cpp:40
window * build(const builder_window::window_resolution *definition)
Builds a window.