The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
placer.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://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 "asserts.hpp"
22 
23 
24 namespace gui2
25 {
26 
27 tplacer_* tplacer_::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::tplacer_horizontal_list(parallel_items);
33  case tgrow_direction::vertical:
34  return new implementation::tplacer_vertical_list(parallel_items);
35  };
36 
38 }
39 
41 {
42 }
43 
44 } // namespace gui2
Base class for the placement helper.
virtual MAKE_ENUM(tgrow_direction,(horizontal,"horizontal")(vertical,"vertical")) public ~tplacer_()
The direction the placer should grow towards.
Definition: placer.cpp:40
Placement helper for the horizontal list.
twindow * build(CVideo &video, const twindow_builder::tresolution *definition)
Builds a window.
Placement helper for the vertical list.
#define UNREACHABLE_CODE
Marker for code that should be unreachable.
Definition: asserts.hpp:58
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23