← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/ui_align into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/ui_align into lp:widelands.

Commit message:
UI::Align is now an enum class. Got rid of align aliases in UI::Box.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1367725 in widelands: "Consistent naming of enum members"
  https://bugs.launchpad.net/widelands/+bug/1367725

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/ui_align/+merge/284353

Just scratching a code style itch.

UI::Align is now an enum class. Got rid of align aliases in UI::Box.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ui_align into lp:widelands.
=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc	2016-01-16 15:57:31 +0000
+++ src/editor/editorinteractive.cc	2016-01-28 21:30:20 +0000
@@ -135,14 +135,14 @@
 	redo_.sigclicked.connect([this] {history_->redo_action(egbase().world());});
 
 	toolbar_.set_layout_toplevel(true);
-	toolbar_.add(&toggle_main_menu_,       UI::Box::AlignLeft);
-	toolbar_.add(&toggle_tool_menu_,       UI::Box::AlignLeft);
-	toolbar_.add(&toggle_toolsize_menu_,   UI::Box::AlignLeft);
-	toolbar_.add(&toggle_minimap_,         UI::Box::AlignLeft);
-	toolbar_.add(&toggle_buildhelp_,       UI::Box::AlignLeft);
-	toolbar_.add(&toggle_player_menu_,     UI::Box::AlignLeft);
-	toolbar_.add(&undo_,                   UI::Box::AlignLeft);
-	toolbar_.add(&redo_,                   UI::Box::AlignLeft);
+	toolbar_.add(&toggle_main_menu_,       UI::Align::kLeft);
+	toolbar_.add(&toggle_tool_menu_,       UI::Align::kLeft);
+	toolbar_.add(&toggle_toolsize_menu_,   UI::Align::kLeft);
+	toolbar_.add(&toggle_minimap_,         UI::Align::kLeft);
+	toolbar_.add(&toggle_buildhelp_,       UI::Align::kLeft);
+	toolbar_.add(&toggle_player_menu_,     UI::Align::kLeft);
+	toolbar_.add(&undo_,                   UI::Align::kLeft);
+	toolbar_.add(&redo_,                   UI::Align::kLeft);
 	adjust_toolbar_position();
 
 #ifndef NDEBUG

=== modified file 'src/editor/ui_menus/categorized_item_selection_menu.h'
--- src/editor/ui_menus/categorized_item_selection_menu.h	2015-11-28 22:29:26 +0000
+++ src/editor/ui_menus/categorized_item_selection_menu.h	2016-01-28 21:30:20 +0000
@@ -78,11 +78,11 @@
 	descriptions_(descriptions),
 	select_correct_tool_(select_correct_tool),
 	protect_against_recursive_select_(false),
-	current_selection_names_(this, 0, 0, 0, 20, UI::Align_Center),
+	current_selection_names_(this, 0, 0, 0, 20, UI::Align::kCenter),
 	tool_(tool)
 {
 	UI::TabPanel* tab_panel = new UI::TabPanel(this, 0, 0, nullptr);
-	add(tab_panel, UI::Align_Center);
+	add(tab_panel, UI::Align::kCenter);
 
 	for (uint32_t category_index = 0; category_index < categories.size(); ++category_index) {
 		const Widelands::EditorCategory& category = categories.get(category_index);
@@ -108,7 +108,7 @@
 				horizontal = new UI::Box(vertical, 0, 0, UI::Box::Horizontal);
 				horizontal->add_space(kSpacing);
 
-				vertical->add(horizontal, UI::Align_Left);
+				vertical->add(horizontal, UI::Align::kLeft);
 				vertical->add_space(kSpacing);
 			}
 			assert(horizontal != nullptr);
@@ -117,13 +117,13 @@
 			cb->set_state(tool_->is_enabled(i));
 			cb->changedto.connect(boost::bind(&CategorizedItemSelectionMenu::selected, this, i, _1));
 			checkboxes_[i] = cb;
-			horizontal->add(cb, UI::Align_Left);
+			horizontal->add(cb, UI::Align::kLeft);
 			horizontal->add_space(kSpacing);
 			++nitems_handled;
 		}
 		tab_panel->add(category.name(), category.picture(), vertical, category.descname());
 	}
-	add(&current_selection_names_, UI::Align_Center, true);
+	add(&current_selection_names_, UI::Align::kCenter, true);
 }
 
 template <typename DescriptionType, typename ToolType>

=== modified file 'src/editor/ui_menus/editor_main_menu.cc'
--- src/editor/ui_menus/editor_main_menu.cc	2015-10-05 06:53:34 +0000
+++ src/editor/ui_menus/editor_main_menu.cc	2016-01-28 21:30:20 +0000
@@ -82,13 +82,13 @@
 		 g_gr->images().get("pics/but5.png"),
 		 _("Exit Editor"))
 {
-	box_.add(&button_new_map_, UI::Box::AlignCenter);
-	box_.add(&button_new_random_map_, UI::Box::AlignCenter);
-	box_.add(&button_load_map_, UI::Box::AlignCenter);
-	box_.add(&button_save_map_, UI::Box::AlignCenter);
-	box_.add(&button_map_options_, UI::Box::AlignCenter);
-	box_.add(&button_view_readme_, UI::Box::AlignCenter);
-	box_.add(&button_exit_editor_, UI::Box::AlignCenter);
+	box_.add(&button_new_map_, UI::Align::kHCenter);
+	box_.add(&button_new_random_map_, UI::Align::kHCenter);
+	box_.add(&button_load_map_, UI::Align::kHCenter);
+	box_.add(&button_save_map_, UI::Align::kHCenter);
+	box_.add(&button_map_options_, UI::Align::kHCenter);
+	box_.add(&button_view_readme_, UI::Align::kHCenter);
+	box_.add(&button_exit_editor_, UI::Align::kHCenter);
 	box_.set_size(width, 7 * button_new_map_.get_h()+ 6 * vspacing);
 	set_inner_size(get_inner_w(), box_.get_h() + 2 * margin);
 

=== modified file 'src/editor/ui_menus/editor_main_menu_load_or_save_map.cc'
--- src/editor/ui_menus/editor_main_menu_load_or_save_map.cc	2015-10-30 11:24:10 +0000
+++ src/editor/ui_menus/editor_main_menu_load_or_save_map.cc	2016-01-28 21:30:20 +0000
@@ -78,13 +78,13 @@
 	                                buth_,
 	                                g_gr->images().get("pics/but1.png"),
 	                                _("Show Map Names"));
-	vbox->add(show_mapnames_, UI::Box::AlignLeft, true);
+	vbox->add(show_mapnames_, UI::Align::kLeft, true);
 
 	/** TRANSLATORS: Checkbox title. If this checkbox is enabled, map names aren't translated. */
 	cb_dont_localize_mapnames_ = new UI::Checkbox(vbox, Point(0, 0), _("Show original map names"));
 	cb_dont_localize_mapnames_->set_state(false);
 	vbox->add_space(2 * padding_);
-	vbox->add(cb_dont_localize_mapnames_, UI::Box::AlignLeft, true);
+	vbox->add(cb_dont_localize_mapnames_, UI::Align::kLeft, true);
 	vbox->set_size(get_inner_w(), buth_);
 
 	table_.set_column_compare(0, boost::bind(&MainMenuLoadOrSaveMap::compare_players, this, _1, _2));

=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
--- src/editor/ui_menus/editor_main_menu_map_options.cc	2015-11-01 10:11:56 +0000
+++ src/editor/ui_menus/editor_main_menu_map_options.cc	2016-01-28 21:30:20 +0000
@@ -78,7 +78,7 @@
 	author_(&main_box_, 0, 0, max_w_, labelh_, g_gr->images().get("pics/but1.png")),
 	size_(&main_box_, 0, 0, max_w_ - indent_, labelh_, ""),
 
-	teams_list_(&teams_box_, 0, 0, max_w_, 60, UI::Align_Left, true),
+	teams_list_(&teams_box_, 0, 0, max_w_, 60, UI::Align::kLeft, true),
 
 	modal_(modal) {
 
@@ -87,29 +87,29 @@
 	hint_ = new UI::MultilineEditbox(
 				  &main_box_, 0, 0, max_w_, 4 * labelh_, "", g_gr->images().get("pics/but1.png"));
 
-	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Map Name:")), UI::Box::AlignLeft);
-	main_box_.add(&name_, UI::Box::AlignLeft);
-	main_box_.add_space(indent_);
-
-	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Authors:")), UI::Box::AlignLeft);
-	main_box_.add(&author_, UI::Box::AlignLeft);
-	main_box_.add_space(indent_);
-
-	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Description:")), UI::Box::AlignLeft);
-	main_box_.add(descr_, UI::Box::AlignLeft);
+	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Map Name:")), UI::Align::kLeft);
+	main_box_.add(&name_, UI::Align::kLeft);
+	main_box_.add_space(indent_);
+
+	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Authors:")), UI::Align::kLeft);
+	main_box_.add(&author_, UI::Align::kLeft);
+	main_box_.add_space(indent_);
+
+	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Description:")), UI::Align::kLeft);
+	main_box_.add(descr_, UI::Align::kLeft);
 	main_box_.add_space(indent_);
 
 	main_box_.add(new UI::Textarea(&main_box_, 0, 0, max_w_, labelh_, _("Hint (optional):")),
-					  UI::Box::AlignLeft);
-	main_box_.add(hint_, UI::Box::AlignLeft);
+					  UI::Align::kLeft);
+	main_box_.add(hint_, UI::Align::kLeft);
 	main_box_.add_space(indent_);
 
-	main_box_.add(&size_, UI::Box::AlignLeft);
+	main_box_.add(&size_, UI::Align::kLeft);
 	main_box_.add_space(indent_);
 
 	main_box_.set_size(max_w_, get_inner_h() - buth_ - 2 * padding_);
 
-	tags_box_.add(new UI::Textarea(&tags_box_, 0, 0, max_w_, labelh_, _("Tags:")), UI::Box::AlignLeft);
+	tags_box_.add(new UI::Textarea(&tags_box_, 0, 0, max_w_, labelh_, _("Tags:")), UI::Align::kLeft);
 	add_tag_checkbox(&tags_box_, "unbalanced", _("Unbalanced"));
 	add_tag_checkbox(&tags_box_, "ffa", _("Free for all"));
 	add_tag_checkbox(&tags_box_, "1v1", _("1v1"));
@@ -119,8 +119,8 @@
 	tags_box_.set_size(max_w_, get_inner_h() - buth_ - 2 * padding_);
 
 	teams_box_.add(new UI::Textarea(&teams_box_, 0, 0, max_w_, labelh_, _("Suggested Teams:")),
-						UI::Box::AlignLeft);
-	teams_box_.add(&teams_list_, UI::Box::AlignLeft);
+						UI::Align::kLeft);
+	teams_box_.add(&teams_list_, UI::Align::kLeft);
 	// TODO(GunChleoc): We need team images in the listselect here,
 	// so map editors will be able to delete entries.
 	// This is waiting for the new RT renderer.
@@ -128,10 +128,10 @@
 
 	unsigned int nr_players = static_cast<unsigned int>(eia().egbase().map().get_nrplayers());
 	std::string players = (boost::format(ngettext("%u Player", "%u Players", nr_players)) % nr_players).str();
-	teams_box_.add(new UI::Textarea(&teams_box_, 0, 0, max_w_, labelh_, players), UI::Box::AlignLeft);
+	teams_box_.add(new UI::Textarea(&teams_box_, 0, 0, max_w_, labelh_, players), UI::Align::kLeft);
 	teams_box_.set_size(max_w_, get_inner_h() - buth_ - 2 * padding_);
 
-	tab_box_.add(&tabs_, UI::Box::AlignLeft, true);
+	tab_box_.add(&tabs_, UI::Align::kLeft, true);
 	tabs_.add("main_map_options",
 				 g_gr->images().get("pics/menu_toggle_minimap.png"), &main_box_, _("Main Options"));
 	tabs_.add("map_tags", g_gr->images().get("pics/checkbox_checked.png"), &tags_box_, _("Tags"));
@@ -217,9 +217,9 @@
 void MainMenuMapOptions::add_tag_checkbox(UI::Box* parent, std::string tag, std::string displ_name) {
 	UI::Box* box = new UI::Box(parent, 0, 0, UI::Box::Horizontal, max_w_, checkbox_space_, 0);
 	UI::Checkbox* cb = new UI::Checkbox(box, Point(0, 0), displ_name);
-	box->add(cb, UI::Box::AlignLeft, true);
+	box->add(cb, UI::Align::kLeft, true);
 	box->add_space(checkbox_space_);
-	parent->add(box, UI::Box::AlignLeft);
+	parent->add(box, UI::Align::kLeft);
 	parent->add_space(padding_);
 	tags_checkboxes_[tag] = cb;
 }

=== modified file 'src/editor/ui_menus/editor_main_menu_new_map.cc'
--- src/editor/ui_menus/editor_main_menu_new_map.cc	2016-01-16 12:55:14 +0000
+++ src/editor/ui_menus/editor_main_menu_new_map.cc	2016-01-28 21:30:20 +0000
@@ -82,19 +82,19 @@
 		height_.set_value(height_index);
 	}
 
-	box_.add(&width_, UI::Box::AlignLeft);
-	box_.add(&height_, UI::Box::AlignLeft);
+	box_.add(&width_, UI::Align::kLeft);
+	box_.add(&height_, UI::Align::kLeft);
 	box_.add_space(margin_);
 	UI::Textarea* terrain_label = new UI::Textarea(&box_, _("Terrain:"));
-	box_.add(terrain_label, UI::Box::AlignLeft);
-	box_.add(&list_, UI::Box::AlignLeft);
+	box_.add(terrain_label, UI::Align::kLeft);
+	box_.add(&list_, UI::Align::kLeft);
 	box_.add_space(2 * margin_);
 
 	cancel_button_.sigclicked.connect(boost::bind(&MainMenuNewMap::clicked_cancel, this));
 	ok_button_.sigclicked.connect(boost::bind(&MainMenuNewMap::clicked_create_map, this));
-	button_box_.add(&cancel_button_, UI::Box::AlignLeft);
-	button_box_.add(&ok_button_, UI::Box::AlignLeft);
-	box_.add(&button_box_, UI::Box::AlignLeft);
+	button_box_.add(&cancel_button_, UI::Align::kLeft);
+	button_box_.add(&ok_button_, UI::Align::kLeft);
+	box_.add(&button_box_, UI::Align::kLeft);
 
 	box_.set_size(box_width_,
 					  width_.get_h() + height_.get_h() + terrain_label->get_h() + list_.get_h()

=== modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc'
--- src/editor/ui_menus/editor_main_menu_random_map.cc	2016-01-18 19:35:25 +0000
+++ src/editor/ui_menus/editor_main_menu_random_map.cc	2016-01-28 21:30:20 +0000
@@ -114,7 +114,7 @@
 	mountains_label_(&mountains_box_, 0, 0, _("Mountains:")),
 	mountains_(&mountains_box_, 0, 0, box_width_ / 3, resources_label_.get_h(),
 				  (boost::format(_("%i %%")) % mountainsval_).str(),
-				  UI::Align::Align_HCenter),
+				  UI::Align::kHCenter),
 	island_mode_(&box_, Point(0, 0), _("Island mode")),
 	// Geeky stuff
 	map_number_box_(&box_, 0, 0, UI::Box::Horizontal, 0, 0, margin_),
@@ -158,15 +158,15 @@
 	height_.get_buttons()[1]->sigclicked.connect
 		(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::kMapSize));
 
-	box_.add(&width_, UI::Box::AlignLeft);
-	box_.add(&height_, UI::Box::AlignLeft);
+	box_.add(&width_, UI::Align::kLeft);
+	box_.add(&height_, UI::Align::kLeft);
 	box_height += margin_ + width_.get_h();
 	box_height += margin_ + height_.get_h();
 
 
 	// ---------- Players -----------
 
-	box_.add(&players_, UI::Box::AlignLeft);
+	box_.add(&players_, UI::Align::kLeft);
 	box_height += margin_ + players_.get_h();
 
 	box_.add_space(margin_);
@@ -174,22 +174,22 @@
 
 	// ---------- Worlds ----------
 
-	world_box_.add(&world_label_, UI::Box::AlignLeft);
+	world_box_.add(&world_label_, UI::Align::kLeft);
 	if (world_label_.get_w() < resources_label_.get_w()) {
 		world_box_.add_space(resources_label_.get_w() - world_label_.get_w() - margin_);
 	}
 
 	world_.sigclicked.connect
 		(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::kWorld));
-	world_box_.add(&world_, UI::Box::AlignLeft);
-	box_.add(&world_box_, UI::Box::AlignLeft);
+	world_box_.add(&world_, UI::Align::kLeft);
+	box_.add(&world_box_, UI::Align::kLeft);
 	box_height += margin_ + world_box_.get_h();
 	box_.add_space(margin_);
 	box_height += margin_;
 
 	// ---------- Amount of Resources (Low/Medium/High) ----------
 
-	resources_box_.add(&resources_label_, UI::Box::AlignLeft);
+	resources_box_.add(&resources_label_, UI::Align::kLeft);
 	if (resources_label_.get_w() < world_label_.get_w()) {
 		resources_box_.add_space(world_label_.get_w() - resources_label_.get_w() - margin_);
 	}
@@ -197,8 +197,8 @@
 	resources_.sigclicked.connect(boost::bind(&MainMenuNewRandomMap::button_clicked,
 															this,
 															ButtonId::kResources));
-	resources_box_.add(&resources_, UI::Box::AlignLeft);
-	box_.add(&resources_box_, UI::Box::AlignLeft);
+	resources_box_.add(&resources_, UI::Align::kLeft);
+	box_.add(&resources_box_, UI::Align::kLeft);
 	box_height += margin_ + resources_box_.get_h();
 	box_.add_space(margin_);
 	box_height += margin_;
@@ -209,7 +209,7 @@
 	water_.get_buttons()[1]->sigclicked.connect
 		(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::kWater));
 
-	box_.add(&water_, UI::Box::AlignLeft);
+	box_.add(&water_, UI::Align::kLeft);
 	box_height += margin_ + water_.get_h();
 
 	// ---------- Land -----------
@@ -219,7 +219,7 @@
 	land_.get_buttons()[1]->sigclicked.connect
 		(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::kLand));
 
-	box_.add(&land_, UI::Box::AlignLeft);
+	box_.add(&land_, UI::Align::kLeft);
 	box_height += margin_ + land_.get_h();
 
 
@@ -230,21 +230,21 @@
 	wasteland_.get_buttons()[1]->sigclicked.connect
 		(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::kWasteland));
 
-	box_.add(&wasteland_, UI::Box::AlignLeft);
+	box_.add(&wasteland_, UI::Align::kLeft);
 	box_height += margin_ + wasteland_.get_h();
 
 	// ---------- Mountains -----------
 
-	mountains_box_.add(&mountains_label_, UI::Box::AlignLeft);
+	mountains_box_.add(&mountains_label_, UI::Align::kLeft);
 
 	// Convince the value label to align with the spinbox labels above
 	mountains_box_.add_space(box_width_ - box_width_ / 6
 									 - mountains_label_.get_w() - mountains_.get_w() + margin_ + 3);
 	mountains_.set_fixed_width(box_width_ / 3 - margin_);
-	mountains_box_.add(&mountains_, UI::Box::AlignLeft);
+	mountains_box_.add(&mountains_, UI::Align::kLeft);
 	mountains_box_.set_size(box_width_, mountains_label_.get_h());
 
-	box_.add(&mountains_box_, UI::Box::AlignLeft);
+	box_.add(&mountains_box_, UI::Align::kLeft);
 	box_height += margin_ + mountains_box_.get_h();
 	box_.add_space(margin_);
 	box_height += margin_;
@@ -253,14 +253,14 @@
 	// ---------- Island mode ----------
 
 	island_mode_.set_state(true);
-	box_.add(&island_mode_, UI::Box::AlignLeft);
+	box_.add(&island_mode_, UI::Align::kLeft);
 	box_height += margin_ + island_mode_.get_h();
 	box_.add_space(margin_);
 	box_height += margin_;
 
 	// ---------- Random map number edit ----------
 
-	map_number_box_.add(&map_number_label_, UI::Box::AlignLeft);
+	map_number_box_.add(&map_number_label_, UI::Align::kLeft);
 
 	map_number_edit_.changed.connect(boost::bind(&MainMenuNewRandomMap::nr_edit_box_changed, this));
 	RNG rng;
@@ -268,8 +268,8 @@
 	rng.rand();
 	map_number_ = rng.rand();
 	map_number_edit_.set_text(std::to_string(static_cast<unsigned int>(map_number_)));
-	map_number_box_.add(&map_number_edit_, UI::Box::AlignLeft);
-	box_.add(&map_number_box_, UI::Box::AlignLeft);
+	map_number_box_.add(&map_number_edit_, UI::Align::kLeft);
+	box_.add(&map_number_box_, UI::Align::kLeft);
 
 	box_height += margin_ + map_number_box_.get_h();
 	box_.add_space(margin_);
@@ -277,12 +277,12 @@
 
 	// ---------- Map ID String edit ----------
 
-	map_id_box_.add(&map_id_label_, UI::Box::AlignLeft);
+	map_id_box_.add(&map_id_label_, UI::Align::kLeft);
 
 	map_id_edit_.set_text("abcd-efgh-ijkl-mnop");
 	map_id_edit_.changed.connect(boost::bind(&MainMenuNewRandomMap::id_edit_box_changed, this));
-	map_id_box_.add(&map_id_edit_, UI::Box::AlignLeft);
-	box_.add(&map_id_box_, UI::Box::AlignLeft);
+	map_id_box_.add(&map_id_edit_, UI::Align::kLeft);
+	box_.add(&map_id_box_, UI::Align::kLeft);
 	box_height += margin_ + map_id_edit_.get_h();
 	box_.add_space(margin_);
 	box_height += margin_;
@@ -291,9 +291,9 @@
 	// ---------- "Generate Map" button ----------
 	cancel_button_.sigclicked.connect(boost::bind(&MainMenuNewRandomMap::clicked_cancel, this));
 	ok_button_.sigclicked.connect(boost::bind(&MainMenuNewRandomMap::clicked_create_map, this));
-	button_box_.add(&cancel_button_, UI::Box::AlignLeft);
-	button_box_.add(&ok_button_, UI::Box::AlignLeft);
-	box_.add(&button_box_, UI::Box::AlignLeft);
+	button_box_.add(&cancel_button_, UI::Align::kLeft);
+	button_box_.add(&ok_button_, UI::Align::kLeft);
+	box_.add(&button_box_, UI::Align::kLeft);
 	box_height += margin_ + button_box_.get_h();
 	box_height += 6 * margin_;
 

=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
--- src/editor/ui_menus/editor_main_menu_save_map.cc	2015-11-18 08:35:44 +0000
+++ src/editor/ui_menus/editor_main_menu_save_map.cc	2016-01-28 21:30:20 +0000
@@ -73,7 +73,7 @@
                     butw_,
                     buth_,
                     _("Filename:"),
-                    UI::Align::Align_Left) {
+                    UI::Align::kLeft) {
 
 	// Make room for edit_options_
 	map_details_.set_size(map_details_.get_w(), map_details_.get_h() - buth_ - padding_);
@@ -88,7 +88,7 @@
 	                           tablew_ - editbox_label_.get_w() - padding_ + 1,
 	                           buth_,
 	                           g_gr->images().get("pics/but1.png"),
-	                           UI::Align::Align_Left);
+	                           UI::Align::kLeft);
 
 	editbox_->set_text(parent.egbase().map().get_name());
 	editbox_->changed.connect(boost::bind(&MainMenuSaveMap::edit_box_changed, this));

=== modified file 'src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc'
--- src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc	2015-10-02 07:02:00 +0000
+++ src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc	2016-01-28 21:30:20 +0000
@@ -31,7 +31,7 @@
 	dirname_(dirname),
 	vbox_(this, padding_, padding_, UI::Box::Vertical,
 		  get_inner_w() - 2 * padding_, get_inner_h() - 3 * padding_ - buth_, padding_ / 2),
-	label_(&vbox_, 0, 0, get_inner_w() - 2 * padding_, buth_, _("Enter Directory Name: "), UI::Align_Left),
+	label_(&vbox_, 0, 0, get_inner_w() - 2 * padding_, buth_, _("Enter Directory Name: "), UI::Align::kLeft),
 	edit_(&vbox_, 0, 0, get_inner_w() - 2 * padding_, buth_, g_gr->images().get("pics/but1.png")),
 	ok_button_(
 		this, "ok",
@@ -46,9 +46,9 @@
 		g_gr->images().get("pics/but1.png"),
 		_("Cancel")) {
 
-	vbox_.add(&label_, UI::Box::AlignLeft);
+	vbox_.add(&label_, UI::Align::kLeft);
 	vbox_.add_space(padding_);
-	vbox_.add(&edit_, UI::Box::AlignLeft);
+	vbox_.add(&edit_, UI::Align::kLeft);
 	vbox_.set_size(get_inner_w() - 2 * padding_, get_inner_h() - 3 * padding_ - buth_);
 
 	edit_.set_text(dirname_);

=== modified file 'src/editor/ui_menus/editor_tool_change_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-09-18 18:52:34 +0000
+++ src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2016-01-28 21:30:20 +0000
@@ -43,7 +43,7 @@
 	m_change_by_label
 		(this,
 		 hmargin(), vmargin(), get_inner_w() - 2 * hmargin(), height,
-		 _("Increase/Decrease Value"), UI::Align_BottomCenter),
+		 _("Increase/Decrease Value"), UI::Align::kBottomCenter),
 	m_change_by_increase
 		(this, "incr_change_by",
 		 get_inner_w() - hmargin() - width,
@@ -72,14 +72,14 @@
 		 (m_change_by_increase.get_x() + m_change_by_increase.get_w() +
 		  hspacing()),
 		 height,
-		 UI::Align_BottomCenter),
+		 UI::Align::kBottomCenter),
 	m_set_to_label
 		(this,
 		 vmargin(),
 		 m_change_by_increase.get_y() + m_change_by_increase.get_h() +
 		 vspacing(),
 		 get_inner_w() - 2 * hmargin(), height,
-		 _("Set Value"), UI::Align_BottomCenter),
+		 _("Set Value"), UI::Align::kBottomCenter),
 	m_set_to_increase
 		(this, "incr_set_to",
 		 m_change_by_increase.get_x(),
@@ -102,7 +102,7 @@
 		(this,
 		 m_change_by_value.get_x(), m_set_to_increase.get_y(),
 		 m_change_by_value.get_w(), height,
-		 UI::Align_BottomCenter)
+		 UI::Align::kBottomCenter)
 {
 	m_change_by_increase.sigclicked.connect
 		(boost::bind

=== modified file 'src/editor/ui_menus/editor_tool_change_resources_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2016-01-18 19:35:25 +0000
+++ src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2016-01-28 21:30:20 +0000
@@ -55,7 +55,7 @@
 	m_change_by_label
 		(this,
 		 hmargin(), vmargin(), get_inner_w() - 2 * hmargin(), BUTTON_HEIGHT,
-		 _("Increase/Decrease Value"), UI::Align_BottomCenter),
+		 _("Increase/Decrease Value"), UI::Align::kBottomCenter),
 	m_change_by_increase
 		(this, "incr_change_by",
 		 get_inner_w() - hmargin() - BUTTON_WIDTH,
@@ -80,13 +80,13 @@
 		 (m_change_by_increase.get_x() + m_change_by_increase.get_w() +
 		  hspacing()),
 		 BUTTON_HEIGHT,
-		 UI::Align_BottomCenter),
+		 UI::Align::kBottomCenter),
 	m_set_to_label
 		(this,
 		 vmargin(),
 		 m_change_by_increase.get_y() + m_change_by_increase.get_h() + vspacing(),
 		 get_inner_w() - 2 * hmargin(), BUTTON_HEIGHT,
-		 _("Set Value"), UI::Align_BottomCenter),
+		 _("Set Value"), UI::Align::kBottomCenter),
 	m_set_to_increase
 		(this, "incr_set_to",
 		 m_change_by_increase.get_x(),
@@ -104,8 +104,8 @@
 		(this,
 		 m_change_by_value.get_x(), m_set_to_increase.get_y(),
 		 m_change_by_value.get_w(), BUTTON_HEIGHT,
-		 UI::Align_BottomCenter),
-	m_cur_selection(this, 0, 0, _("Current Selection"), UI::Align_BottomCenter),
+		 UI::Align::kBottomCenter),
+	m_cur_selection(this, 0, 0, _("Current Selection"), UI::Align::kBottomCenter),
 	m_increase_tool(increase_tool)
 {
 	m_change_by_increase.sigclicked.connect

=== modified file 'src/editor/ui_menus/editor_tool_noise_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-09-18 18:52:34 +0000
+++ src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2016-01-28 21:30:20 +0000
@@ -49,13 +49,13 @@
 		 hmargin(),
 		 vmargin(),
 		 width, height,
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_upper_label
 		(this,
 		 hmargin(),
 		 m_lower_label.get_y() + m_lower_label.get_h() + 2 * vspacing(),
 		 width, height,
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_lower_decrease
 		(this, "decr_lower",
 		 get_inner_w() - 2 * width - hspacing(),
@@ -97,7 +97,7 @@
 		 hmargin(),
 		 m_upper_label.get_y() + m_upper_label.get_h() + 2 * vspacing(),
 		 width, height,
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_setto_decrease
 		(this, "decr_set_to",
 		 get_inner_w() - 2 * width - hspacing(),

=== modified file 'src/editor/ui_menus/editor_tool_place_bob_options_menu.cc'
--- src/editor/ui_menus/editor_tool_place_bob_options_menu.cc	2015-11-28 22:29:26 +0000
+++ src/editor/ui_menus/editor_tool_place_bob_options_menu.cc	2016-01-28 21:30:20 +0000
@@ -97,7 +97,7 @@
 		cb.set_state(m_pit.is_enabled(i));
 		cb.changedto.connect(boost::bind(&EditorToolPlaceBobOptionsMenu::clicked, this, i, _1));
 		m_checkboxes.push_back(&cb);
-		box->add(&cb, UI::Align_Left);
+		box->add(&cb, UI::Align::kLeft);
 		box->add_space(space);
 		pos.x += width + 1 + space;
 		++cur_x;

=== modified file 'src/editor/ui_menus/editor_toolsize_menu.cc'
--- src/editor/ui_menus/editor_toolsize_menu.cc	2016-01-16 12:55:14 +0000
+++ src/editor/ui_menus/editor_toolsize_menu.cc	2016-01-28 21:30:20 +0000
@@ -41,7 +41,7 @@
 	:
 	UI::UniqueWindow
 		(&parent, "toolsize_menu", &registry, 250, 50, _("Tool Size")),
-	m_textarea(this, 5, 10, 240, 10, std::string(), UI::Align_BottomCenter),
+	m_textarea(this, 5, 10, 240, 10, std::string(), UI::Align::kBottomCenter),
 	m_increase
 		(this, "incr",
 		 get_inner_w() / 2 - 10, 25, 20, 20,

=== modified file 'src/graphic/align.cc'
--- src/graphic/align.cc	2015-09-26 18:04:24 +0000
+++ src/graphic/align.cc	2016-01-28 21:30:20 +0000
@@ -28,23 +28,23 @@
 Align mirror_alignment(Align alignment) {
 	if (UI::g_fh1->fontset().is_rtl()) {
 		switch (alignment) {
-			case Align::Align_BottomLeft:
-				alignment = Align::Align_BottomRight;
-				break;
-			case Align::Align_BottomRight:
-				alignment = Align::Align_BottomLeft;
-				break;
-			case Align::Align_CenterLeft:
-				alignment = Align::Align_CenterRight;
-				break;
-			case Align::Align_CenterRight:
-				alignment = Align::Align_CenterLeft;
-				break;
-			case Align::Align_TopLeft:
-				alignment = Align::Align_TopRight;
-				break;
-			case Align::Align_TopRight:
-				alignment = Align::Align_TopLeft;
+			case Align::kBottomLeft:
+				alignment = Align::kBottomRight;
+				break;
+			case Align::kBottomRight:
+				alignment = Align::kBottomLeft;
+				break;
+			case Align::kCenterLeft:
+				alignment = Align::kCenterRight;
+				break;
+			case Align::kCenterRight:
+				alignment = Align::kCenterLeft;
+				break;
+			case Align::kTopLeft:
+				alignment = Align::kTopRight;
+				break;
+			case Align::kTopRight:
+				alignment = Align::kTopLeft;
 				break;
 			default:
 				break;
@@ -55,18 +55,18 @@
 
 void correct_for_align(Align align, uint32_t w, uint32_t h, Point* pt) {
 	//Vertical Align
-	if (align & (Align_VCenter | Align_Bottom)) {
-		if (align & Align_VCenter)
+	if (static_cast<int>(align & (Align::kVCenter | Align::kBottom))) {
+		if (static_cast<int>(align & Align::kVCenter))
 			pt->y -= h / 2;
 		else
 			pt->y -= h;
 	}
 
 	//Horizontal Align
-	if ((align & Align_Horizontal) != Align_Left) {
-		if (align & Align_HCenter)
+	if ((align & Align::kHorizontal) != Align::kLeft) {
+		if (static_cast<int>(align & Align::kHCenter))
 			pt->x -= w / 2;
-		else if (align & Align_Right)
+		else if (static_cast<int>(align & Align::kRight))
 			pt->x -= w;
 	}
 }

=== modified file 'src/graphic/align.h'
--- src/graphic/align.h	2015-09-24 15:31:51 +0000
+++ src/graphic/align.h	2016-01-28 21:30:20 +0000
@@ -24,31 +24,41 @@
 
 namespace UI {
 
-enum Align {
-	Align_Left         =  0,
-	Align_HCenter      =  1,
-	Align_Right        =  2,
-	Align_Horizontal   =  3,
-
-	Align_Top          =  0,
-	Align_VCenter      =  4,
-	Align_Bottom       =  8,
-	Align_Vertical     = 12,
-
-	Align_TopLeft      =  0,
-	Align_CenterLeft   = Align_VCenter,
-	Align_BottomLeft   = Align_Bottom,
-
-	Align_TopCenter    = Align_HCenter,
-	Align_Center       = Align_HCenter|Align_VCenter,
-	Align_BottomCenter = Align_HCenter|Align_Bottom,
-
-	Align_TopRight     = Align_Right,
-	Align_CenterRight  = Align_Right|Align_VCenter,
-
-	Align_BottomRight  = Align_Right|Align_Bottom,
+enum class Align {
+    kLeft         =  0,
+    kHCenter      =  1,
+    kRight        =  2,
+    kHorizontal   =  3,
+
+    kTop          =  0,
+    kVCenter      =  4,
+    kBottom       =  8,
+    kVertical     = 12,
+
+    kTopLeft      =  0,
+    kCenterLeft   = Align::kVCenter,
+    kBottomLeft   = Align::kBottom,
+
+    kTopCenter    = Align::kHCenter,
+    kCenter       = Align::kHCenter | Align::kVCenter,
+    kBottomCenter = Align::kHCenter | Align::kBottom,
+
+    kTopRight     = Align::kRight,
+    kCenterRight  = Align::kRight | Align::kVCenter,
+
+    kBottomRight  = Align::kRight | Align::kBottom,
 };
 
+inline Align operator &(Align a, Align b)
+{
+	 return static_cast<Align>(static_cast<int>(a) & static_cast<int>(b));
+}
+
+inline Align operator |(Align a, Align b)
+{
+	 return static_cast<Align>(static_cast<int>(a) | static_cast<int>(b));
+}
+
 Align mirror_alignment(Align alignment);
 void correct_for_align(Align, uint32_t w, uint32_t h, Point* pt);
 

=== modified file 'src/graphic/font_handler.h'
--- src/graphic/font_handler.h	2014-09-10 14:48:40 +0000
+++ src/graphic/font_handler.h	2016-01-28 21:30:20 +0000
@@ -45,7 +45,7 @@
 		 const TextStyle &,
 		 Point dstpoint,
 		 const std::string & text,
-		 Align align = Align_CenterLeft,
+		 Align align = UI::Align::kCenterLeft,
 		 uint32_t caret = std::numeric_limits<uint32_t>::max());
 	uint32_t draw_text_raw(RenderTarget &, const TextStyle &, Point dstpoint, const std::string & text);
 

=== modified file 'src/graphic/rendertarget.h'
--- src/graphic/rendertarget.h	2016-01-23 14:54:44 +0000
+++ src/graphic/rendertarget.h	2016-01-28 21:30:20 +0000
@@ -65,13 +65,13 @@
 	void blit(const Point& dst,
 	          const Image* image,
 	          BlendMode blend_mode = BlendMode::UseAlpha,
-	          UI::Align = UI::Align_TopLeft);
+				 UI::Align = UI::Align::kTopLeft);
 
 	// Like blit. See MonochromeBlitProgram for details.
 	void blit_monochrome(const Point& dst,
 						const Image* image,
 						const RGBAColor& blend_mode,
-						UI::Align = UI::Align_TopLeft);
+						UI::Align = UI::Align::kTopLeft);
 
 	void blitrect(const Point& dst,
 	              const Image* image,

=== modified file 'src/graphic/richtext.cc'
--- src/graphic/richtext.cc	2015-11-28 11:04:12 +0000
+++ src/graphic/richtext.cc	2016-01-28 21:30:20 +0000
@@ -291,7 +291,8 @@
 			int32_t alignref_right = rti.width;
 
 			if (text_y < rti.height + images_height) {
-				if ((mirror_alignment(richtext->get_image_align()) & Align_Horizontal) == Align_Right) {
+				if ((mirror_alignment(richtext->get_image_align()) & UI::Align::kHorizontal)
+					 == UI::Align::kRight) {
 					alignref_right -= images_width + h_space;
 				} else {
 					// Note: center image alignment with text is not properly supported
@@ -302,11 +303,11 @@
 
 			int32_t textleft;
 
-			switch (mirror_alignment(richtext->get_text_align()) & Align_Horizontal) {
-			case Align_Right:
+			switch (mirror_alignment(richtext->get_text_align()) & UI::Align::kHorizontal) {
+			case UI::Align::kRight:
 				textleft = alignref_right - int32_t(linewidth);
 				break;
-			case Align_HCenter:
+			case UI::Align::kHCenter:
 				textleft = alignref_left + (alignref_right - alignref_left - int32_t(linewidth)) / 2;
 				break;
 			default:
@@ -386,10 +387,12 @@
 		// Fix up the alignment
 		int32_t imagealigndelta = 0;
 
-		if ((text.richtext->get_image_align() & Align_Horizontal) == Align_HCenter)
+		if ((text.richtext->get_image_align() & UI::Align::kHorizontal) == UI::Align::kHCenter) {
 			imagealigndelta = (int32_t(m->width) - int32_t(text.images_width)) / 2;
-		else if ((mirror_alignment(text.richtext->get_image_align()) & Align_Horizontal) == Align_Right)
+		} else if ((mirror_alignment(text.richtext->get_image_align()) & UI::Align::kHorizontal)
+					  == UI::Align::kRight) {
 			imagealigndelta = int32_t(m->width) - int32_t(text.images_width);
+		}
 
 		for (uint32_t idx = firstimageelement; idx < m->elements.size(); ++idx)
 			m->elements[idx]->bbox.x += imagealigndelta;

=== modified file 'src/graphic/text/rt_render.cc'
--- src/graphic/text/rt_render.cc	2016-01-24 09:20:30 +0000
+++ src/graphic/text/rt_render.cc	2016-01-28 21:30:20 +0000
@@ -220,8 +220,8 @@
 		}
 	} else {
 		// Take last elements style in this line and check horizontal alignment
-		if (!rv->empty() && (*rv->rbegin())->halign() != UI::Align::Align_Left) {
-			if ((*rv->rbegin())->halign() == UI::Align::Align_Center) {
+		if (!rv->empty() && (*rv->rbegin())->halign() != UI::Align::kLeft) {
+			if ((*rv->rbegin())->halign() == UI::Align::kCenter) {
 				rem_space /= 2;  // Otherwise, we align right
 			}
 			for (RenderNode* node : *rv)  {
@@ -267,9 +267,9 @@
 		// Go over again and adjust position for VALIGN
 		for (RenderNode* n : nodes_in_line) {
 			uint16_t space = line_height - n->height();
-			if (!space || n->valign() == UI::Align::Align_Bottom)
+			if (!space || n->valign() == UI::Align::kBottom)
 				continue;
-			if (n->valign() == UI::Align::Align_Center)
+			if (n->valign() == UI::Align::kCenter)
 				space /= 2;
 			n->set_y(n->y() - space);
 		}
@@ -824,22 +824,22 @@
 		if (a.has("align")) {
 			const std::string align = a["align"].get_string();
 			if (align == "right") {
-				m_ns.halign = UI::Align::Align_Right;
+				m_ns.halign = UI::Align::kRight;
 			} else if (align == "center" || align == "middle") {
-				m_ns.halign = UI::Align::Align_Center;
+				m_ns.halign = UI::Align::kCenter;
 			} else {
-				m_ns.halign = UI::Align::Align_Left;
+				m_ns.halign = UI::Align::kLeft;
 			}
 		}
 		m_ns.halign = mirror_alignment(m_ns.halign);
 		if (a.has("valign")) {
 			const string align = a["valign"].get_string();
 			if (align == "bottom") {
-				m_ns.valign = UI::Align::Align_Bottom;
+				m_ns.valign = UI::Align::kBottom;
 			} else if (align == "center" || align == "middle") {
-				m_ns.valign = UI::Align::Align_Center;
+				m_ns.valign = UI::Align::kCenter;
 			} else {
-				m_ns.valign = UI::Align::Align_Top;
+				m_ns.valign = UI::Align::kTop;
 			}
 		}
 		if (a.has("spacing"))
@@ -1031,9 +1031,9 @@
 				m_rn->add_reference(rn->x() + r.dim.x, rn->y() + r.dim.y, r.dim.w, r.dim.h, r.ref);
 			}
 			if (shrink_to_fit_) {
-				if (rn->halign() == UI::Align::Align_Center) {
+				if (rn->halign() == UI::Align::kCenter) {
 					rn->set_x(rn->x() - m_extra_width / 2);
-				} else if (rn->halign() == UI::Align::Align_Right) {
+				} else if (rn->halign() == UI::Align::kRight) {
 					rn->set_x(rn->x() - m_extra_width);
 				}
 			}
@@ -1079,9 +1079,9 @@
 		}
 		if (a.has("valign")) {
 			const string align = a["valign"].get_string();
-			if (align == "top") m_rn->set_valign(UI::Align::Align_Top);
-			else if (align == "bottom") m_rn->set_valign(UI::Align::Align_Bottom);
-			else if (align == "center" || align == "middle") m_rn->set_valign(UI::Align::Align_Center);
+			if (align == "top") m_rn->set_valign(UI::Align::kTop);
+			else if (align == "bottom") m_rn->set_valign(UI::Align::kBottom);
+			else if (align == "center" || align == "middle") m_rn->set_valign(UI::Align::kCenter);
 		}
 	}
 protected:
@@ -1161,7 +1161,7 @@
 		fontset_,
 		renderer_style_.font_face, renderer_style_.font_size,
 		RGBColor(255, 255, 0), IFont::DEFAULT, fontset_->is_rtl(), 0,
-		UI::Align::Align_Left, UI::Align::Align_Top,
+		UI::Align::kLeft, UI::Align::kTop,
 		""
 	};
 

=== modified file 'src/graphic/text_layout.cc'
--- src/graphic/text_layout.cc	2016-01-23 10:29:29 +0000
+++ src/graphic/text_layout.cc	2016-01-28 21:30:20 +0000
@@ -56,14 +56,14 @@
 }
 
 std::string as_uifont(const std::string & txt, int size, const RGBColor& clr) {
-	return as_aligned(txt, UI::Align::Align_Left, size, clr);
+	return as_aligned(txt, UI::Align::kLeft, size, clr);
 }
 
 std::string as_aligned(const std::string & txt, UI::Align align, int ptsize, const RGBColor& clr) {
 	std::string alignment = "left";
-	if ((align & UI::Align_Horizontal) == UI::Align::Align_Right) {
+	if ((align & UI::Align::kHorizontal) == UI::Align::kRight) {
 		alignment = "right";
-	} else if ((align & UI::Align_Horizontal) == UI::Align::Align_HCenter) {
+	} else if ((align & UI::Align::kHorizontal) == UI::Align::kHCenter) {
 		alignment = "center";
 	}
 

=== modified file 'src/graphic/text_parser.cc'
--- src/graphic/text_parser.cc	2015-09-24 16:51:24 +0000
+++ src/graphic/text_parser.cc	2016-01-28 21:30:20 +0000
@@ -33,8 +33,8 @@
 namespace UI {
 
 RichtextBlock::RichtextBlock() :
-	m_image_align(Align_Left),
-	m_text_align (Align_Left)
+	m_image_align(UI::Align::kLeft),
+	m_text_align (UI::Align::kLeft)
 {}
 
 RichtextBlock::RichtextBlock(const RichtextBlock & src) {
@@ -304,9 +304,9 @@
 
 Align TextParser::set_align(const std::string & align) {
 	return
-		align == "right"  ? Align_Right   :
-		align == "center" ? Align_HCenter :
-		Align_Left;
+		align == "right"  ? UI::Align::kRight   :
+		align == "center" ? UI::Align::kHCenter :
+		UI::Align::kLeft;
 }
 
 }

=== modified file 'src/graphic/wordwrap.cc'
--- src/graphic/wordwrap.cc	2016-01-24 09:20:30 +0000
+++ src/graphic/wordwrap.cc	2016-01-28 21:30:20 +0000
@@ -352,10 +352,10 @@
 
 	calc_wrapped_pos(caret, caretline, caretpos);
 
-	if ((align & Align_Vertical) != Align_Top) {
+	if ((align & UI::Align::kVertical) != UI::Align::kTop) {
 		uint32_t h = height();
 
-		if ((align & Align_Vertical) == Align_VCenter)
+		if ((align & UI::Align::kVertical) == UI::Align::kVCenter)
 			where.y -= (h + 1) / 2;
 		else
 			where.y -= h;
@@ -372,7 +372,7 @@
 
 		Point point(where.x, where.y);
 
-		if (alignment & Align_Right) {
+		if (static_cast<int>(alignment & UI::Align::kRight)) {
 			point.x += m_wrapwidth - LINE_MARGIN;
 		}
 

=== modified file 'src/graphic/wordwrap.h'
--- src/graphic/wordwrap.h	2015-12-14 05:25:33 +0000
+++ src/graphic/wordwrap.h	2016-01-28 21:30:20 +0000
@@ -48,7 +48,7 @@
 	void set_draw_caret(bool draw_it) {m_draw_caret = draw_it;}
 
 	void draw
-		(RenderTarget & dst, Point where, Align align = Align_Left,
+		(RenderTarget & dst, Point where, Align align = UI::Align::kLeft,
 		 uint32_t caret = std::numeric_limits<uint32_t>::max());
 
 	void calc_wrapped_pos(uint32_t caret, uint32_t & line, uint32_t & pos) const;

=== modified file 'src/logic/map_objects/immovable.cc'
--- src/logic/map_objects/immovable.cc	2016-01-17 19:54:32 +0000
+++ src/logic/map_objects/immovable.cc	2016-01-28 21:30:20 +0000
@@ -499,7 +499,7 @@
 		dst.blit(pos - Point(0, 48),
 				 UI::g_fh1->render(m_construct_string),
 				 BlendMode::UseAlpha,
-				 UI::Align_Center);
+				 UI::Align::kCenter);
 	}
 }
 

=== modified file 'src/logic/map_objects/tribes/building.cc'
--- src/logic/map_objects/tribes/building.cc	2016-01-17 19:54:32 +0000
+++ src/logic/map_objects/tribes/building.cc	2016-01-28 21:30:20 +0000
@@ -712,7 +712,7 @@
 	if (dpyflags & InteractiveBase::dfShowCensus) {
 		const std::string info = info_string(igbase.building_census_format());
 		if (!info.empty()) {
-			dst.blit(pos - Point(0, 48), UI::g_fh1->render(info), BlendMode::UseAlpha, UI::Align_Center);
+			dst.blit(pos - Point(0, 48), UI::g_fh1->render(info), BlendMode::UseAlpha, UI::Align::kCenter);
 		}
 	}
 
@@ -724,7 +724,7 @@
 				return;
 		const std::string info = info_string(igbase.building_statistics_format());
 		if (!info.empty()) {
-			dst.blit(pos - Point(0, 35), UI::g_fh1->render(info), BlendMode::UseAlpha, UI::Align_Center);
+			dst.blit(pos - Point(0, 35), UI::g_fh1->render(info), BlendMode::UseAlpha, UI::Align::kCenter);
 		}
 	}
 }

=== modified file 'src/ui_basic/box.cc'
--- src/ui_basic/box.cc	2016-01-27 19:14:06 +0000
+++ src/ui_basic/box.cc	2016-01-28 21:30:20 +0000
@@ -254,7 +254,7 @@
  * This can be used to make buttons fill a box completely.
  *
  */
-void Box::add(Panel * const panel, uint32_t const align, bool fullsize, bool fillspace)
+void Box::add(Panel * const panel, UI::Align const align, bool fullsize, bool fillspace)
 {
 	Item it;
 
@@ -390,16 +390,16 @@
 			maxbreadth = get_inner_w();
 		}
 		switch (it.u.panel.align) {
-		case AlignLeft:
+		case UI::Align::kLeft:
 		default:
 			breadth = 0;
 			break;
 
-		case AlignCenter:
+		case UI::Align::kHCenter:
 			breadth = (maxbreadth - breadth) / 2;
 			break;
 
-		case AlignRight:
+		case UI::Align::kRight:
 			breadth = maxbreadth - breadth;
 			break;
 		}

=== modified file 'src/ui_basic/box.h'
--- src/ui_basic/box.h	2016-01-27 19:14:06 +0000
+++ src/ui_basic/box.h	2016-01-28 21:30:20 +0000
@@ -23,6 +23,7 @@
 #include <memory>
 #include <vector>
 
+#include "graphic/align.h"
 #include "ui_basic/panel.h"
 #include "ui_basic/scrollbar.h"
 
@@ -37,14 +38,8 @@
 	enum {
 		Horizontal = 0,
 		Vertical = 1,
+	};
 
-		AlignLeft = 0,
-		AlignTop = 0,
-		AlignCenter = 1,
-		AlignRight = 2,
-		AlignBottom = 2,
-	};
-public:
 	Box
 		(Panel * parent,
 		 int32_t x, int32_t y,
@@ -58,7 +53,7 @@
 
 	void add
 		(Panel * panel,
-		uint32_t align,
+		UI::Align align,
 		bool fullsize = false,
 		bool fillspace = false);
 	void add_space(uint32_t space);
@@ -82,7 +77,6 @@
 	//don't resize beyond this size
 	int m_max_x, m_max_y;
 
-private:
 	struct Item {
 		enum Type {
 			ItemPanel,
@@ -94,7 +88,7 @@
 		union {
 			struct {
 				Panel * panel;
-				int align;
+				UI::Align align;
 				bool fullsize;
 			} panel;
 			int space;

=== modified file 'src/ui_basic/checkbox.cc'
--- src/ui_basic/checkbox.cc	2015-10-10 20:46:57 +0000
+++ src/ui_basic/checkbox.cc	2016-01-28 21:30:20 +0000
@@ -149,7 +149,7 @@
 				image_anchor.x = rendered_text_->width() + kPadding;
 				image_anchor.y = (get_h() - kStateboxSize) / 2;
 			}
-			dst.blit(text_anchor, rendered_text_, BlendMode::UseAlpha, UI::Align::Align_Left);
+			dst.blit(text_anchor, rendered_text_, BlendMode::UseAlpha, UI::Align::kLeft);
 		}
 
 		dst.blitrect

=== modified file 'src/ui_basic/editbox.cc'
--- src/ui_basic/editbox.cc	2015-09-28 06:41:58 +0000
+++ src/ui_basic/editbox.cc	2016-01-28 21:30:20 +0000
@@ -81,7 +81,7 @@
 	m->fontsize = UI_FONT_SIZE_SMALL;
 	m->fontcolor = UI_FONT_CLR_FG;
 
-	m->align = static_cast<Align>((_align & Align_Horizontal) | Align_VCenter);
+	m->align = (_align & UI::Align::kHorizontal) | UI::Align::kVCenter;
 	m->caret = 0;
 	m->scrolloffset = 0;
 	// yes, use *signed* max as maximum length; just a small safe-guard.
@@ -189,7 +189,7 @@
  */
 void EditBox::set_align(Align _align)
 {
-	_align = static_cast<Align>((_align & Align_Horizontal) | Align_VCenter);
+	_align = (_align & UI::Align::kHorizontal) | UI::Align::kVCenter;
 	if (_align != m->align) {
 		m->align = _align;
 		m->scrolloffset = 0;
@@ -435,11 +435,11 @@
 
 	Point pos(4, get_h() >> 1);
 
-	switch (m->align & Align_Horizontal) {
-	case Align_HCenter:
+	switch (m->align & UI::Align::kHorizontal) {
+	case UI::Align::kHCenter:
 		pos.x = get_w() >> 1;
 		break;
-	case Align_Right:
+	case UI::Align::kRight:
 		pos.x = get_w() - 4;
 		break;
 	default:
@@ -473,12 +473,12 @@
 
 	int32_t caretpos;
 
-	switch (m->align & Align_Horizontal) {
-	case Align_HCenter:
+	switch (m->align & UI::Align::kHorizontal) {
+	case UI::Align::kHCenter:
 		caretpos  = (get_w() - static_cast<int32_t>(leftw + rightw)) / 2;
 		caretpos += m->scrolloffset + leftw;
 		break;
-	case Align_Right:
+	case UI::Align::kRight:
 		caretpos = get_w() - 4 + m->scrolloffset - rightw;
 		break;
 	default:
@@ -491,10 +491,10 @@
 	else if (caretpos > get_w() - 4)
 		m->scrolloffset -= caretpos - get_w() + 4 + get_w() / 5;
 
-	if ((m->align & Align_Horizontal) == Align_Left) {
+	if ((m->align & UI::Align::kHorizontal) == UI::Align::kLeft) {
 		if (m->scrolloffset > 0)
 			m->scrolloffset = 0;
-	} else if ((m->align & Align_Horizontal) == Align_Right) {
+	} else if ((m->align & UI::Align::kHorizontal) == UI::Align::kRight) {
 		if (m->scrolloffset < 0)
 			m->scrolloffset = 0;
 	}

=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h	2015-04-18 11:20:53 +0000
+++ src/ui_basic/editbox.h	2016-01-28 21:30:20 +0000
@@ -42,7 +42,7 @@
 	EditBox
 		(Panel *,
 		 int32_t x, int32_t y, uint32_t w, uint32_t h,
-		 const Image* background = g_gr->images().get("pics/but2.png"), Align align = Align_Center);
+		 const Image* background = g_gr->images().get("pics/but2.png"), Align align = UI::Align::kCenter);
 	virtual ~EditBox();
 
 	boost::signals2::signal<void ()> changed;

=== modified file 'src/ui_basic/listselect.cc'
--- src/ui_basic/listselect.cc	2016-01-27 19:14:06 +0000
+++ src/ui_basic/listselect.cc	2016-01-28 21:30:20 +0000
@@ -64,7 +64,7 @@
 	set_thinks(false);
 
 	//  do not allow vertical alignment as it does not make sense
-	m_align = static_cast<Align>(align & Align_Horizontal);
+	m_align = align & UI::Align::kHorizontal;
 
 	m_scrollbar.moved.connect(boost::bind(&BaseListselect::set_scrollpos, this, _1));
 	m_scrollbar.set_singlestepsize(g_fh->get_fontheight(m_fontname, m_fontsize));
@@ -382,8 +382,8 @@
 		Align draw_alignment = mirror_alignment(m_align);
 
 		int32_t const x =
-			draw_alignment & Align_Right   ? get_eff_w() -      1 :
-			draw_alignment & Align_HCenter ? get_eff_w() >>     1 :
+			(static_cast<int>(draw_alignment & UI::Align::kRight))   ? get_eff_w() -      1 :
+			(static_cast<int>(draw_alignment & UI::Align::kHCenter)) ? get_eff_w() >>     1 :
 
 			// Pictures are always left aligned, leave some space here
 			m_max_pic_width         ? m_max_pic_width + 10 :

=== modified file 'src/ui_basic/listselect.h'
--- src/ui_basic/listselect.h	2015-11-08 17:31:06 +0000
+++ src/ui_basic/listselect.h	2016-01-28 21:30:20 +0000
@@ -47,7 +47,7 @@
 		 int32_t y,
 		 uint32_t w,
 		 uint32_t h,
-		 Align align = Align_Left,
+		 Align align = UI::Align::kLeft,
 		 bool show_check = false);
 	~BaseListselect();
 
@@ -164,7 +164,7 @@
 		(Panel * parent,
 		 int32_t x, int32_t y,
 		 uint32_t w, uint32_t h,
-		 Align align = Align_Left,
+		 Align align = UI::Align::kLeft,
 		 bool show_check = false)
 		: BaseListselect(parent, x, y, w, h, align, show_check)
 	{}
@@ -220,7 +220,7 @@
 		(Panel * parent,
 		 int32_t x, int32_t y,
 		 uint32_t w, uint32_t h,
-		 Align align = Align_Left,
+		 Align align = UI::Align::kLeft,
 		 bool show_check = false)
 		: Base(parent, x, y, w, h, align, show_check)
 	{}

=== modified file 'src/ui_basic/messagebox.h'
--- src/ui_basic/messagebox.h	2015-08-06 17:14:34 +0000
+++ src/ui_basic/messagebox.h	2016-01-28 21:30:20 +0000
@@ -60,7 +60,7 @@
 		 const std::string & caption,
 		 const std::string & text,
 		 MBoxType,
-		 Align = Align_Center);
+		 Align = UI::Align::kCenter);
 	~WLMessageBox();
 
 	boost::signals2::signal<void ()> ok;

=== modified file 'src/ui_basic/multilineeditbox.cc'
--- src/ui_basic/multilineeditbox.cc	2015-12-14 05:25:33 +0000
+++ src/ui_basic/multilineeditbox.cc	2016-01-28 21:30:20 +0000
@@ -486,7 +486,7 @@
 	d->ww.set_draw_caret(has_focus());
 
 	d->ww.draw
-		(dst, Point(0, -int32_t(d->scrollbar.get_scrollpos())), Align_Left,
+		(dst, Point(0, -int32_t(d->scrollbar.get_scrollpos())), UI::Align::kLeft,
 		 has_focus() ? d->cursor_pos : std::numeric_limits<uint32_t>::max());
 }
 

=== modified file 'src/ui_basic/multilinetextarea.cc'
--- src/ui_basic/multilinetextarea.cc	2015-12-14 05:17:55 +0000
+++ src/ui_basic/multilinetextarea.cc	2016-01-28 21:30:20 +0000
@@ -49,7 +49,7 @@
 	set_thinks(false);
 
 	//  do not allow vertical alignment as it does not make sense
-	m_align = static_cast<Align>(align & Align_Horizontal);
+	m_align = align & UI::Align::kHorizontal;
 
 	m_scrollbar.moved.connect(boost::bind(&MultilineTextarea::scrollpos_changed, this, _1));
 
@@ -161,11 +161,11 @@
 		if (blit_width > 0 && blit_height > 0) {
 			int32_t anchor = 0;
 			Align alignment = mirror_alignment(m_align);
-			switch (alignment & Align_Horizontal) {
-			case Align_HCenter:
+			switch (alignment & UI::Align::kHorizontal) {
+			case UI::Align::kHCenter:
 				anchor = (get_eff_w() - blit_width) / 2;
 				break;
-			case Align_Right:
+			case UI::Align::kRight:
 				anchor = get_eff_w() - blit_width - RICHTEXT_MARGIN;
 				break;
 			default:

=== modified file 'src/ui_basic/multilinetextarea.h'
--- src/ui_basic/multilinetextarea.h	2015-12-13 21:04:01 +0000
+++ src/ui_basic/multilinetextarea.h	2016-01-28 21:30:20 +0000
@@ -46,7 +46,7 @@
 		(Panel * const parent,
 		 const int32_t x, const int32_t y, const uint32_t w, const uint32_t h,
 		 const std::string & text         = std::string(),
-		 const Align                      = Align_Left,
+		 const Align                      = UI::Align::kLeft,
 		 const bool always_show_scrollbar = false);
 
 	const std::string & get_text() const {return m_text;}

=== modified file 'src/ui_basic/progressbar.cc'
--- src/ui_basic/progressbar.cc	2014-11-27 19:13:30 +0000
+++ src/ui_basic/progressbar.cc	2016-01-28 21:30:20 +0000
@@ -108,6 +108,6 @@
 	const std::string progress_text =
 		(boost::format("<font color=%1$s>%2$i%%</font>") % "ffffff" % percent).str();
 	const Point pos(get_w() / 2, get_h() / 2);
-	dst.blit(pos, UI::g_fh1->render(as_uifont(progress_text)), BlendMode::UseAlpha, Align_Center);
+	dst.blit(pos, UI::g_fh1->render(as_uifont(progress_text)), BlendMode::UseAlpha, UI::Align::kCenter);
 }
 }

=== modified file 'src/ui_basic/progresswindow.cc'
--- src/ui_basic/progresswindow.cc	2015-10-03 07:22:38 +0000
+++ src/ui_basic/progresswindow.cc	2016-01-28 21:30:20 +0000
@@ -105,7 +105,7 @@
 	rt.blit(m_label_center,
 			 UI::g_fh1->render(as_uifont(description, UI_FONT_SIZE_SMALL, PROGRESS_FONT_COLOR_FG)),
 			 BlendMode::UseAlpha,
-			 Align_Center);
+			 UI::Align::kCenter);
 	g_gr->update();
 
 #ifdef _WIN32

=== modified file 'src/ui_basic/slider.cc'
--- src/ui_basic/slider.cc	2015-10-03 08:19:25 +0000
+++ src/ui_basic/slider.cc	2016-01-28 21:30:20 +0000
@@ -595,7 +595,7 @@
 		dst.blit(Point(gap_1 + i * gap_n, get_h() + 2),
 				 UI::g_fh1->render(as_uifont(labels[i])),
 				 BlendMode::UseAlpha,
-				 Align_BottomCenter);
+				 UI::Align::kBottomCenter);
 	}
 
 }

=== modified file 'src/ui_basic/spinbox.cc'
--- src/ui_basic/spinbox.cc	2016-01-24 08:32:56 +0000
+++ src/ui_basic/spinbox.cc	2016-01-28 21:30:20 +0000
@@ -137,9 +137,9 @@
 
 	UI::MultilineTextarea* label = new UI::MultilineTextarea(box_, 0, 0, available_width,
 																				texth * (extra_rows + 1), label_text);
-	box_->add(label, UI::Box::AlignCenter);
+	box_->add(label, UI::Align::kHCenter);
 
-	sbi_->text = new UI::Textarea(box_, "", Align_Center);
+	sbi_->text = new UI::Textarea(box_, "", UI::Align::kCenter);
 
 	sbi_->button_minus =
 		new Button
@@ -188,17 +188,17 @@
 											 - 2 * sbi_->button_minus->get_w()
 											 - 4 * padding);
 
-		box_->add(sbi_->button_ten_minus, UI::Box::AlignTop);
-		box_->add(sbi_->button_minus, UI::Box::AlignTop);
-		box_->add(sbi_->text, UI::Box::AlignTop);
-		box_->add(sbi_->button_plus, UI::Box::AlignTop);
-		box_->add(sbi_->button_ten_plus, UI::Box::AlignTop);
+		box_->add(sbi_->button_ten_minus, UI::Align::kTop);
+		box_->add(sbi_->button_minus, UI::Align::kTop);
+		box_->add(sbi_->text, UI::Align::kTop);
+		box_->add(sbi_->button_plus, UI::Align::kTop);
+		box_->add(sbi_->button_ten_plus, UI::Align::kTop);
 	} else {
 		sbi_->text->set_fixed_width(unit_w - 2 * sbi_->button_minus->get_w() - 2 * padding);
 
-		box_->add(sbi_->button_minus, UI::Box::AlignCenter);
-		box_->add(sbi_->text, UI::Box::AlignCenter);
-		box_->add(sbi_->button_plus, UI::Box::AlignCenter);
+		box_->add(sbi_->button_minus, UI::Align::kHCenter);
+		box_->add(sbi_->text, UI::Align::kHCenter);
+		box_->add(sbi_->button_plus, UI::Align::kHCenter);
 	}
 
 	sbi_->button_plus->sigclicked.connect(boost::bind(&SpinBox::change_value, boost::ref(*this), step_size));

=== modified file 'src/ui_basic/table.cc'
--- src/ui_basic/table.cc	2016-01-27 13:01:23 +0000
+++ src/ui_basic/table.cc	2016-01-28 21:30:20 +0000
@@ -314,7 +314,7 @@
 						}
 					}
 
-					if (alignment & Align_Right) {
+					if (static_cast<int>(alignment & UI::Align::kRight)) {
 						draw_x += curw - blit_width;
 					}
 
@@ -331,7 +331,7 @@
 						} else {
 							draw_x = point.x + (curw - picw) / 2;
 						}
-					} else if (alignment & Align_Right) {
+					} else if (static_cast<int>(alignment & UI::Align::kRight)) {
 						draw_x += curw - picw;
 					}
 					dst.blit(Point(draw_x, point.y + (lineheight - pich) / 2), entry_picture);
@@ -347,9 +347,9 @@
 			}
 			const Image* entry_text_im = UI::g_fh1->render(as_uifont(richtext_escape(entry_string), m_fontsize));
 
-			if (alignment & Align_Right) {
+			if (static_cast<int>(alignment & UI::Align::kRight)) {
 				point.x += curw - 2 * picw;
-			} else if (alignment & Align_HCenter) {
+			} else if (static_cast<int>(alignment & UI::Align::kHCenter)) {
 				point.x += (curw - picw) / 2;
 			}
 
@@ -364,7 +364,7 @@
 			if ((curw + picw) < text_width) {
 				// Fix positioning for BiDi languages.
 				if (UI::g_fh1->fontset().is_rtl()) {
-					point.x = alignment & Align_Right ? curx : curx + picw;
+					point.x = static_cast<int>(alignment & UI::Align::kRight) ? curx : curx + picw;
 				}
 				// We want this always on, e.g. for mixed language savegame filenames
 				if (i18n::has_rtl_character(entry_string.c_str(), 20)) { // Restrict check for efficiency

=== modified file 'src/ui_basic/table.h'
--- src/ui_basic/table.h	2016-01-09 17:18:20 +0000
+++ src/ui_basic/table.h	2016-01-28 21:30:20 +0000
@@ -62,7 +62,7 @@
 		(uint32_t width,
 		 const std::string & title = std::string(),
 		 const std::string & tooltip = std::string(),
-		 Align                                  = Align_Left,
+		 Align                                  = UI::Align::kLeft,
 		 bool                is_checkbox_column = false);
 
 	void set_column_title(uint8_t col, const std::string & title);
@@ -170,7 +170,7 @@
 		(uint32_t width,
 		 const std::string & title = std::string(),
 		 const std::string & tooltip = std::string(),
-		 Align                                  = Align_Left,
+		 Align                                  = UI::Align::kLeft,
 		 bool                is_checkbox_column = false);
 
 	void set_column_title(uint8_t col, const std::string & title);

=== modified file 'src/ui_basic/tabpanel.cc'
--- src/ui_basic/tabpanel.cc	2016-01-27 08:06:40 +0000
+++ src/ui_basic/tabpanel.cc	2016-01-28 21:30:20 +0000
@@ -320,7 +320,7 @@
 			dst.blit(Point(x + kTabPanelTextMargin, (kTabPanelButtonHeight - tabs_[idx]->pic->height()) / 2),
 						tabs_[idx]->pic,
 						BlendMode::UseAlpha,
-						UI::Align_Left);
+						UI::Align::kLeft);
 		}
 
 		// Draw top part of border

=== modified file 'src/ui_basic/textarea.cc'
--- src/ui_basic/textarea.cc	2016-01-27 08:06:40 +0000
+++ src/ui_basic/textarea.cc	2016-01-28 21:30:20 +0000
@@ -162,10 +162,10 @@
 {
 	if (!m_text.empty()) {
 		Point anchor
-			(m_align & Align_HCenter ?
-			 get_w() / 2 : m_align & Align_Right  ? get_w() : 0,
-			 m_align & Align_VCenter ?
-			 get_h() / 2 : m_align & Align_Bottom ? get_h() : 0);
+			(static_cast<int>(m_align & UI::Align::kHCenter) ?
+			 get_w() / 2 : static_cast<int>(m_align & UI::Align::kRight)  ? get_w() : 0,
+			 static_cast<int>(m_align & UI::Align::kVCenter) ?
+			 get_h() / 2 : static_cast<int>(m_align & UI::Align::kBottom) ? get_h() : 0);
 
 		dst.blit(anchor, rendered_text_, BlendMode::UseAlpha, m_align);
 	}
@@ -182,14 +182,14 @@
 	int32_t w = get_w();
 	int32_t h = get_h();
 
-	if (m_align & Align_HCenter)
+	if (static_cast<int>(m_align & UI::Align::kHCenter))
 		x += w >> 1;
-	else if (m_align & Align_Right)
+	else if (static_cast<int>(m_align & UI::Align::kRight))
 		x += w;
 
-	if (m_align & Align_VCenter)
+	if (static_cast<int>(m_align & UI::Align::kVCenter))
 		y += h >> 1;
-	else if (m_align & Align_Bottom)
+	else if (static_cast<int>(m_align & UI::Align::kBottom))
 		y += h;
 
 	set_pos(Point(x, y));
@@ -209,14 +209,14 @@
 	int w, h;
 	get_desired_size(&w, &h);
 
-	if      (m_align & Align_HCenter)
+	if      (static_cast<int>(m_align & UI::Align::kHCenter))
 		x -= w >> 1;
-	else if (m_align & Align_Right)
+	else if (static_cast<int>(m_align & UI::Align::kRight))
 		x -= w;
 
-	if      (m_align & Align_VCenter)
+	if      (static_cast<int>(m_align & UI::Align::kVCenter))
 		y -= h >> 1;
-	else if (m_align & Align_Bottom)
+	else if (static_cast<int>(m_align & UI::Align::kBottom))
 		y -= h;
 
 	set_pos(Point(x, y));

=== modified file 'src/ui_basic/textarea.h'
--- src/ui_basic/textarea.h	2015-12-11 19:03:45 +0000
+++ src/ui_basic/textarea.h	2016-01-28 21:30:20 +0000
@@ -53,20 +53,20 @@
 		(Panel * parent,
 		 int32_t x, int32_t y,
 		 const std::string & text = std::string(),
-		 Align align = Align_Left);
+		 Align align = UI::Align::kLeft);
 	Textarea
 		(Panel * parent,
 		 int32_t x, int32_t y, uint32_t w, uint32_t h,
-		 Align align = Align_Left);
+		 Align align = UI::Align::kLeft);
 	Textarea
 		(Panel *  const parent,
 		 int32_t x, int32_t y, uint32_t w, uint32_t h,
 		 const std::string & text,
-		 Align align = Align_Left);
+		 Align align = UI::Align::kLeft);
 	Textarea
 		(Panel * parent,
 		 const std::string & text = std::string(),
-		 Align align = Align_Left);
+		 Align align = UI::Align::kLeft);
 
 	/**
 	 * If fixed_width > 0, the Textarea will not change its width.

=== modified file 'src/ui_basic/window.cc'
--- src/ui_basic/window.cc	2016-01-27 08:06:40 +0000
+++ src/ui_basic/window.cc	2016-01-28 21:30:20 +0000
@@ -317,7 +317,7 @@
 			(Point(get_lborder() + get_inner_w() / 2, TP_B_PIXMAP_THICKNESS / 2),
 				UI::g_fh1->render(m_title),
 				BlendMode::UseAlpha,
-				Align_Center);
+				UI::Align::kCenter);
 	}
 
 	if (!_is_minimal) {

=== modified file 'src/ui_fsmenu/campaign_select.cc'
--- src/ui_fsmenu/campaign_select.cc	2015-10-23 18:03:33 +0000
+++ src/ui_fsmenu/campaign_select.cc	2016-01-28 21:30:20 +0000
@@ -48,13 +48,13 @@
 	m_title
 		(this, get_w() / 2, tabley_ / 3,
 		 _("Choose a campaign"),
-		 UI::Align_HCenter),
+		 UI::Align::kHCenter),
 
 	// Campaign description
 	m_label_campname
 		(this, right_column_x_, tabley_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_campname(this,
 					  right_column_x_ + indent_, get_y_from_preceding(m_label_campname) + padding_,
 					  get_right_column_w(right_column_x_) - indent_, m_label_height),
@@ -62,7 +62,7 @@
 	m_label_tribename
 		(this, right_column_x_, get_y_from_preceding(m_ta_campname) + 2 * padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_tribename(this,
 						 right_column_x_ + indent_, get_y_from_preceding(m_label_tribename) + padding_,
 						 get_right_column_w(right_column_x_ + indent_), m_label_height),
@@ -70,7 +70,7 @@
 	m_label_difficulty
 		(this, right_column_x_, get_y_from_preceding(m_ta_tribename) + 2 * padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_difficulty(this,
 						 right_column_x_ + indent_, get_y_from_preceding(m_label_difficulty) + padding_,
 						 get_right_column_w(right_column_x_ + indent_), 2 * m_label_height - padding_),
@@ -78,7 +78,7 @@
 	m_label_description
 		(this, right_column_x_, get_y_from_preceding(m_ta_difficulty) + 2 * padding_,
 		 _("Description:"),
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_description
 		(this,
 		 right_column_x_ + indent_,
@@ -99,9 +99,9 @@
 	m_table.double_clicked.connect(boost::bind(&FullscreenMenuCampaignSelect::clicked_ok, boost::ref(*this)));
 
 	/** TRANSLATORS: Campaign difficulty table header */
-	m_table.add_column(45, _("Diff."), _("Difficulty"), UI::Align_Left);
-	m_table.add_column(100, _("Tribe"), _("Tribe Name"), UI::Align_Left);
-	m_table.add_column(m_table.get_w() - 100 - 45, _("Campaign Name"), _("Campaign Name"), UI::Align_Left);
+	m_table.add_column(45, _("Diff."), _("Difficulty"), UI::Align::kLeft);
+	m_table.add_column(100, _("Tribe"), _("Tribe Name"), UI::Align::kLeft);
+	m_table.add_column(m_table.get_w() - 100 - 45, _("Campaign Name"), _("Campaign Name"), UI::Align::kLeft);
 	m_table.set_column_compare
 			(0,
 			 boost::bind(&FullscreenMenuCampaignSelect::compare_difficulty, this, _1, _2));
@@ -287,18 +287,18 @@
 	m_title
 		(this, get_w() / 2, tabley_ / 3,
 		 is_tutorial ? _("Choose a tutorial") : _("Choose a scenario"),
-		 UI::Align_HCenter),
+		 UI::Align::kHCenter),
 	m_subtitle
 		(this, get_w() / 6, get_y_from_preceding(m_title) + 6 * padding_,
 		 get_w() * 2 / 3, 4 * m_label_height,
 		 "",
-		 UI::Align_HCenter),
+		 UI::Align::kHCenter),
 
 	// Map description
 	m_label_mapname
 		(this, right_column_x_, tabley_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_mapname(this,
 					 right_column_x_ + indent_, get_y_from_preceding(m_label_mapname) + padding_,
 					 get_right_column_w(right_column_x_ + indent_), m_label_height),
@@ -307,7 +307,7 @@
 		(this,
 		 right_column_x_, get_y_from_preceding(m_ta_mapname) + 2 * padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_author(this,
 					right_column_x_ + indent_, get_y_from_preceding(m_label_author) + padding_,
 					get_right_column_w(right_column_x_ + indent_), 2 * m_label_height),
@@ -315,7 +315,7 @@
 	m_label_description
 		(this, right_column_x_, get_y_from_preceding(m_ta_author) + padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_description
 		(this,
 		 right_column_x_ + indent_,
@@ -356,8 +356,8 @@
 		number_tooltip = _("The number of this scenario in the campaign");
 		name_tooltip = _("Scenario Name");
 	}
-	m_table.add_column(35, _("#"), number_tooltip, UI::Align_Left);
-	m_table.add_column(m_table.get_w() - 35, name_tooltip, name_tooltip, UI::Align_Left);
+	m_table.add_column(35, _("#"), number_tooltip, UI::Align::kLeft);
+	m_table.add_column(m_table.get_w() - 35, name_tooltip, name_tooltip, UI::Align::kLeft);
 	m_table.set_sort_column(0);
 
 	m_table.focus();

=== modified file 'src/ui_fsmenu/fileview.cc'
--- src/ui_fsmenu/fileview.cc	2015-12-13 21:04:01 +0000
+++ src/ui_fsmenu/fileview.cc	2016-01-28 21:30:20 +0000
@@ -56,7 +56,7 @@
 	:
 	FullscreenMenuBase("fileviewmenu.jpg"),
 
-	title (this, get_w() * 3 / 50, get_h() / 10, "", UI::Align_Center),
+	title (this, get_w() * 3 / 50, get_h() / 10, "", UI::Align::kCenter),
 
 	textview
 		(this,

=== modified file 'src/ui_fsmenu/helpwindow.cc'
--- src/ui_fsmenu/helpwindow.cc	2015-10-13 14:58:07 +0000
+++ src/ui_fsmenu/helpwindow.cc	2016-01-28 21:30:20 +0000
@@ -40,7 +40,7 @@
 	 uint32_t width, uint32_t height)
 	:
 	Window(parent, "help_window", 0, 0, width, height, (boost::format(_("Help: %s")) % caption).str()),
-	textarea_(new MultilineTextarea(this, 5, 5, width - 10, height - 30, std::string(), Align_Left))
+	textarea_(new MultilineTextarea(this, 5, 5, width - 10, height - 30, std::string(), UI::Align::kLeft))
 {
 	int margin = 5;
 

=== modified file 'src/ui_fsmenu/internet_lobby.cc'
--- src/ui_fsmenu/internet_lobby.cc	2015-11-09 08:15:31 +0000
+++ src/ui_fsmenu/internet_lobby.cc	2016-01-28 21:30:20 +0000
@@ -52,7 +52,7 @@
 	title
 		(this,
 		 get_w() / 2, get_h() / 20,
-		 _("Metaserver Lobby"), UI::Align_HCenter),
+		 _("Metaserver Lobby"), UI::Align::kHCenter),
 	m_clients
 		(this,
 		 get_w() * 4 / 125, get_h() * 15 / 100,
@@ -390,7 +390,7 @@
 											_("Connection timed out"),
 											warning,
 											UI::WLMessageBox::MBoxType::kOk,
-											UI::Align_Left);
+											UI::Align::kLeft);
 				mmb.run<UI::Panel::Returncodes>();
 				return InternetGaming::ref().set_error();
 			}
@@ -416,7 +416,8 @@
 			// Show a popup warning message
 			std::string warningheader(_("Connection problem"));
 			std::string warning(_("Widelands was unable to connect to the host."));
-			UI::WLMessageBox mmb(this, warningheader, warning, UI::WLMessageBox::MBoxType::kOk, UI::Align_Left);
+				UI::WLMessageBox mmb(this, warningheader, warning, UI::WLMessageBox::MBoxType::kOk,
+											UI::Align::kLeft);
 			mmb.run<UI::Panel::Returncodes>();
 		}
 		SDLNet_ResolveHost (&peer, ip.c_str(), WIDELANDS_PORT);

=== modified file 'src/ui_fsmenu/intro.cc'
--- src/ui_fsmenu/intro.cc	2015-08-06 17:14:34 +0000
+++ src/ui_fsmenu/intro.cc	2016-01-28 21:30:20 +0000
@@ -29,7 +29,7 @@
 m_message
 	(this,
 	 get_w() / 2, get_h() * 19 / 20,
-	 _("Press any key or click to continue ..."), UI::Align_HCenter)
+	 _("Press any key or click to continue ..."), UI::Align::kHCenter)
 {
 	m_message.set_font(ui_fn(), fs_small() * 6 / 5, RGBColor(192, 192, 128));
 }

=== modified file 'src/ui_fsmenu/launch_mpg.cc'
--- src/ui_fsmenu/launch_mpg.cc	2016-01-24 09:20:30 +0000
+++ src/ui_fsmenu/launch_mpg.cc	2016-01-28 21:30:20 +0000
@@ -155,7 +155,7 @@
 	m_title
 		(this,
 		 get_w() / 2, get_h() / 25,
-		 _("Multiplayer Game Setup"), UI::Align_HCenter),
+		 _("Multiplayer Game Setup"), UI::Align::kHCenter),
 	m_mapname
 		(this,
 		 m_right_column_x, get_h() * 3 / 20,
@@ -164,19 +164,19 @@
 		(this,
 		 // (get_w() * 57 / 80) is the width of the MultiPlayerSetupGroup
 		 get_w() / 50, get_h() / 10, (get_w() * 57 / 80) / 3, get_h() / 10,
-		 _("Clients"), UI::Align_HCenter),
+		 _("Clients"), UI::Align::kHCenter),
 	m_players
 		(this,
 		 get_w() / 50 + (get_w() * 57 / 80) * 6 / 15, get_h() / 10, (get_w() * 57 / 80) * 9 / 15, get_h() / 10,
-		 _("Players"), UI::Align_HCenter),
+		 _("Players"), UI::Align::kHCenter),
 	m_map
 		(this,
 		 m_right_column_x, get_h() / 10, m_butw, get_h() / 10,
-		 _("Map"), UI::Align_HCenter),
+		 _("Map"), UI::Align::kHCenter),
 	m_wincondition_type
 		(this,
 		 m_right_column_x + (m_butw / 2), get_h() * 10 / 20 - 1.5 * m_label_height,
-		 _("Type of game"), UI::Align_HCenter),
+		 _("Type of game"), UI::Align::kHCenter),
 
 	m_map_info(this, m_right_column_x, get_h() * 2 / 10, m_butw, get_h() * 23 / 80 - 2 * m_label_height),
 	m_client_info(this, m_right_column_x, get_h() * 13 / 20 - 2 * m_label_height, m_butw, 2 * m_label_height),

=== modified file 'src/ui_fsmenu/launch_spg.cc'
--- src/ui_fsmenu/launch_spg.cc	2015-11-29 09:43:15 +0000
+++ src/ui_fsmenu/launch_spg.cc	2016-01-28 21:30:20 +0000
@@ -80,36 +80,36 @@
 	m_title
 		(this,
 		 get_w() / 2, get_h() / 10,
-		 _("Launch Game"), UI::Align_HCenter),
+		 _("Launch Game"), UI::Align::kHCenter),
 	m_mapname
 		(this,
 		 get_w() * 7 / 10 + m_butw / 2, get_h() * 53 / 200 - 15,
-		 std::string(), UI::Align_HCenter),
+		 std::string(), UI::Align::kHCenter),
 	m_name
 		(this,
 		 get_w() * 1 / 25, get_h() * 53 / 200 - 15,
-		 _("Player’s name"), UI::Align_Left),
+		 _("Player’s name"), UI::Align::kLeft),
 	m_type
 		(this,
 		 // (Element x) + (PlayerDescriptionGroup x)  + border
 		 ((get_w() * 16 / 25) * 35 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200 - 15,
-		 _("Player’s type"), UI::Align_Left),
+		 _("Player’s type"), UI::Align::kLeft),
 	m_team
 		(this,
 		 ((get_w() * 16 / 25) * 35 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200,
-		 _("Team"), UI::Align_Left),
+		 _("Team"), UI::Align::kLeft),
 	m_tribe
 		(this,
 		 ((get_w() * 16 / 25) * 80 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200 - 15,
-		 _("Player’s tribe"), UI::Align_Left),
+		 _("Player’s tribe"), UI::Align::kLeft),
 	m_init
 		(this,
 		 ((get_w() * 16 / 25) * 55 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200,
-		 _("Start type"), UI::Align_Left),
+		 _("Start type"), UI::Align::kLeft),
 	m_wincondition_type
 		(this,
 		 get_w() * 7 / 10 + (m_butw / 2), get_h() * 7 / 20 + m_buth,
-		 _("Type of game"), UI::Align_HCenter),
+		 _("Type of game"), UI::Align::kHCenter),
 
 // Variables and objects used in the menu
 	m_settings     (settings),

=== modified file 'src/ui_fsmenu/loadgame.cc'
--- src/ui_fsmenu/loadgame.cc	2016-01-23 13:57:18 +0000
+++ src/ui_fsmenu/loadgame.cc	2016-01-28 21:30:20 +0000
@@ -87,11 +87,11 @@
 	// Main title
 	m_title
 		(this, get_w() / 2, tabley_ / 3,
-		 m_is_replay ? _("Choose a replay") : _("Choose a saved game"), UI::Align_HCenter),
+		 m_is_replay ? _("Choose a replay") : _("Choose a saved game"), UI::Align::kHCenter),
 
 	// Savegame description
 	m_label_mapname
-		(this, right_column_x_, tabley_, "", UI::Align_Left),
+		(this, right_column_x_, tabley_, "", UI::Align::kLeft),
 	m_ta_mapname(this,
 					 right_column_x_ + indent_, get_y_from_preceding(m_label_mapname) + padding_,
 					 get_right_column_w(right_column_x_ + indent_), 2 * m_label_height - padding_),
@@ -99,7 +99,7 @@
 	m_label_gametime
 		(this, right_column_x_, get_y_from_preceding(m_ta_mapname) + 2 * padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_gametime(this,
 					  m_right_column_tab, m_label_gametime.get_y(),
 					  get_right_column_w(m_right_column_tab), m_label_height),
@@ -107,7 +107,7 @@
 	m_label_players
 		(this, right_column_x_, get_y_from_preceding(m_ta_gametime),
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_players(this,
 					 m_right_column_tab, m_label_players.get_y(),
 					 get_right_column_w(m_right_column_tab), m_label_height),
@@ -115,14 +115,14 @@
 	m_label_version
 		(this, right_column_x_, get_y_from_preceding(m_ta_players),
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_version(this,
-					 m_right_column_tab, m_label_version.get_y(), "", UI::Align_Left),
+					 m_right_column_tab, m_label_version.get_y(), "", UI::Align::kLeft),
 
 	m_label_win_condition
 		(this, right_column_x_, get_y_from_preceding(m_ta_version) + 3 * padding_,
 		 "",
-		 UI::Align_Left),
+		 UI::Align::kLeft),
 	m_ta_win_condition(this,
 							 right_column_x_ + indent_, get_y_from_preceding(m_label_win_condition) + padding_,
 							 get_right_column_w(right_column_x_ + indent_), m_label_height),
@@ -177,7 +177,7 @@
 	m_delete.sigclicked.connect
 		(boost::bind
 			 (&FullscreenMenuLoadGame::clicked_delete, boost::ref(*this)));
-	m_table.add_column(130, _("Save Date"), _("The date this game was saved"), UI::Align_Left);
+	m_table.add_column(130, _("Save Date"), _("The date this game was saved"), UI::Align::kLeft);
 	int used_width = 130;
 	if (m_is_replay || m_settings->settings().multiplayer) {
 		std::vector<std::string> modes;
@@ -206,14 +206,14 @@
 								 /** TRANSLATORS: A tooltip will explain if you need to use an abbreviation. */
 								 _("Mode"),
 								 (boost::format("%s %s") % mode_tooltip_1 % mode_tooltip_2).str(),
-								 UI::Align_Left);
+								 UI::Align::kLeft);
 		used_width += 65;
 	}
 	m_table.add_column(m_table.get_w() - used_width,
 							 _("Description"),
 							 _("The filename that the game was saved under followed by the map’s name, "
 								"or the map’s name followed by the last objective achieved."),
-								 UI::Align_Left);
+								 UI::Align::kLeft);
 	m_table.set_column_compare
 		(0,
 		 boost::bind(&FullscreenMenuLoadGame::compare_date_descending, this, _1, _2));

=== modified file 'src/ui_fsmenu/main.cc'
--- src/ui_fsmenu/main.cc	2015-08-06 17:14:34 +0000
+++ src/ui_fsmenu/main.cc	2016-01-28 21:30:20 +0000
@@ -68,17 +68,17 @@
 		(this, get_w(), get_h(),
 		 /** TRANSLATORS: %1$s = version string, %2%s = "Debug" or "Release" */
 		 (boost::format(_("Version %1$s (%2$s)")) % build_id().c_str() % build_type().c_str()).str(),
-		 UI::Align_BottomRight),
+		 UI::Align::kBottomRight),
 	copyright
 		(this, 0, get_h() - 0.5 * m_buth,
 		 /** TRANSLATORS: Placeholders are the copyright years */
 		 (boost::format(_("(C) %1%-%2% by the Widelands Development Team"))
 		  % kWidelandsCopyrightStart % kWidelandsCopyrightEnd).str(),
-		 UI::Align_BottomLeft),
+		 UI::Align::kBottomLeft),
 	gpl
 		(this, 0, get_h(),
 		 _("Licensed under the GNU General Public License V2.0"),
-		 UI::Align_BottomLeft)
+		 UI::Align::kBottomLeft)
 {
 	playtutorial.sigclicked.connect
 		(boost::bind
@@ -121,31 +121,31 @@
 			 (&FullscreenMenuMain::end_modal<FullscreenMenuBase::MenuTarget>, boost::ref(*this),
 			  FullscreenMenuBase::MenuTarget::kExit));
 
-	vbox.add(&playtutorial, UI::Box::AlignCenter);
-
-	vbox.add_space(m_padding);
-
-	vbox.add(&singleplayer, UI::Box::AlignCenter);
-	vbox.add(&multiplayer, UI::Box::AlignCenter);
-	vbox.add(&replay, UI::Box::AlignCenter);
-
-	vbox.add_space(m_padding);
-
-	vbox.add(&editor, UI::Box::AlignCenter);
-
-	vbox.add_space(m_padding);
-
-	vbox.add(&options, UI::Box::AlignCenter);
-
-	vbox.add_space(m_padding);
-
-	vbox.add(&readme, UI::Box::AlignCenter);
-	vbox.add(&license, UI::Box::AlignCenter);
-	vbox.add(&authors, UI::Box::AlignCenter);
-
-	vbox.add_space(m_padding);
-
-	vbox.add(&exit, UI::Box::AlignCenter);
+	vbox.add(&playtutorial, UI::Align::kHCenter);
+
+	vbox.add_space(m_padding);
+
+	vbox.add(&singleplayer, UI::Align::kHCenter);
+	vbox.add(&multiplayer, UI::Align::kHCenter);
+	vbox.add(&replay, UI::Align::kHCenter);
+
+	vbox.add_space(m_padding);
+
+	vbox.add(&editor, UI::Align::kHCenter);
+
+	vbox.add_space(m_padding);
+
+	vbox.add(&options, UI::Align::kHCenter);
+
+	vbox.add_space(m_padding);
+
+	vbox.add(&readme, UI::Align::kHCenter);
+	vbox.add(&license, UI::Align::kHCenter);
+	vbox.add(&authors, UI::Align::kHCenter);
+
+	vbox.add_space(m_padding);
+
+	vbox.add(&exit, UI::Align::kHCenter);
 
 	vbox.set_size(m_butw, get_h() - vbox.get_y());
 }

=== modified file 'src/ui_fsmenu/mapselect.cc'
--- src/ui_fsmenu/mapselect.cc	2015-11-06 13:42:41 +0000
+++ src/ui_fsmenu/mapselect.cc	2016-01-28 21:30:20 +0000
@@ -47,7 +47,7 @@
 	title_
 		(this, get_w() / 2, checkboxes_y_ / 3,
 		 _("Choose a map"),
-		 UI::Align_HCenter),
+		 UI::Align::kHCenter),
 
 	table_(this, tablex_, tabley_, tablew_, tableh_, false),
 	map_details_(this, right_column_x_, tabley_,
@@ -88,7 +88,7 @@
 	tags_checkboxes_.clear(); // Remove this again, it is a special tag checkbox
 	cb_show_all_maps_->set_state(true);
 
-	vbox->add(cb_dont_localize_mapnames_, UI::Box::AlignLeft, true);
+	vbox->add(cb_dont_localize_mapnames_, UI::Align::kLeft, true);
 	vbox->set_size(get_w() - 2 * tablex_, checkbox_space_);
 
 	vbox = new UI::Box(this,
@@ -383,7 +383,7 @@
 	cb->changedto.connect
 		(boost::bind(&FullscreenMenuMapSelect::_tagbox_changed, this, id, _1));
 
-	box->add(cb, UI::Box::AlignLeft, true);
+	box->add(cb, UI::Align::kLeft, true);
 	box->add_space(checkbox_space_);
 	tags_checkboxes_.push_back(cb);
 

=== modified file 'src/ui_fsmenu/multiplayer.cc'
--- src/ui_fsmenu/multiplayer.cc	2015-11-08 19:38:17 +0000
+++ src/ui_fsmenu/multiplayer.cc	2016-01-28 21:30:20 +0000
@@ -33,7 +33,7 @@
 	title
 		(this,
 		 get_w() / 2, m_title_y,
-		 _("Choose game type"), UI::Align_HCenter),
+		 _("Choose game type"), UI::Align::kHCenter),
 
 // Buttons
 	vbox(this, m_box_x, m_box_y, UI::Box::Vertical,
@@ -62,15 +62,15 @@
 
 	title.set_font(ui_fn(), fs_big(), UI_FONT_CLR_FG);
 
-	vbox.add(&metaserver, UI::Box::AlignCenter);
-	vbox.add(&lan, UI::Box::AlignCenter);
+	vbox.add(&metaserver, UI::Align::kHCenter);
+	vbox.add(&lan, UI::Align::kHCenter);
 
 	// Multiple add_space calls to get the same height for the back button as in the single player menu
 	vbox.add_space(m_buth);
 	vbox.add_space(m_buth);
 	vbox.add_space(6 * m_buth);
 
-	vbox.add(&back, UI::Box::AlignCenter);
+	vbox.add(&back, UI::Align::kHCenter);
 
 	vbox.set_size(m_butw, get_h() - vbox.get_y());
 

=== modified file 'src/ui_fsmenu/netsetup_lan.cc'
--- src/ui_fsmenu/netsetup_lan.cc	2015-10-03 07:48:26 +0000
+++ src/ui_fsmenu/netsetup_lan.cc	2016-01-28 21:30:20 +0000
@@ -40,7 +40,7 @@
 	title
 		(this,
 		 get_w() / 2, get_h() / 10,
-		 _("Begin Network Game"), UI::Align_HCenter),
+		 _("Begin Network Game"), UI::Align::kHCenter),
 	m_opengames
 		(this,
 		 get_w() * 3 / 50, get_h() * 27 / 100,

=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc	2016-01-23 14:51:09 +0000
+++ src/ui_fsmenu/options.cc	2016-01-28 21:30:20 +0000
@@ -111,7 +111,7 @@
 	title_
 	(this,
 	 get_w() / 2, buth_,
-	 _("Options"), UI::Align_HCenter),
+	 _("Options"), UI::Align::kHCenter),
 
 	// Buttons
 	cancel_
@@ -149,8 +149,8 @@
 	box_language_(&tabs_, 0, 0, UI::Box::Vertical, 0, 0, padding_),
 
 	// Interface options
-	label_resolution_(&box_interface_, _("In-game resolution"), UI::Align_Left),
-	resolution_list_(&box_interface_, 0, 0, column_width_ / 2, 80, UI::Align_Left, true),
+	label_resolution_(&box_interface_, _("In-game resolution"), UI::Align::kLeft),
+	resolution_list_(&box_interface_, 0, 0, column_width_ / 2, 80, UI::Align::kLeft, true),
 
 	fullscreen_ (&box_interface_, Point(0, 0), _("Fullscreen"), "", column_width_),
 	inputgrab_ (&box_interface_, Point(0, 0), _("Grab Input"), "", column_width_),
@@ -226,10 +226,10 @@
 	single_watchwin_(&box_game_, Point(0, 0), _("Use single watchwindow mode")),
 
 	// Language options
-	label_language_(&box_language_, _("Language"), UI::Align_Left),
+	label_language_(&box_language_, _("Language"), UI::Align::kLeft),
 	language_list_(&box_language_, 0, 0, column_width_ / 2,
 						get_inner_h() - tab_panel_y_ - buth_ - hmargin_ - 5 * padding_,
-						UI::Align_Left, true),
+						UI::Align::kLeft, true),
 
 	os_(opt)
 {
@@ -258,39 +258,39 @@
 	box_language_.set_size(tabs_.get_inner_w(), tabs_.get_inner_h());
 
 	// Interface
-	box_interface_.add(&label_resolution_, UI::Align_Left);
-	box_interface_.add(&resolution_list_, UI::Align_Left);
-	box_interface_.add(&fullscreen_, UI::Align_Left);
-	box_interface_.add(&inputgrab_, UI::Align_Left);
-	box_interface_.add(&sb_maxfps_, UI::Align_Left);
+	box_interface_.add(&label_resolution_, UI::Align::kLeft);
+	box_interface_.add(&resolution_list_, UI::Align::kLeft);
+	box_interface_.add(&fullscreen_, UI::Align::kLeft);
+	box_interface_.add(&inputgrab_, UI::Align::kLeft);
+	box_interface_.add(&sb_maxfps_, UI::Align::kLeft);
 
 	// Windows
-	box_windows_.add(&snap_win_overlap_only_, UI::Align_Left);
-	box_windows_.add(&dock_windows_to_edges_, UI::Align_Left);
-	box_windows_.add(&sb_dis_panel_, UI::Align_Left);
-	box_windows_.add(&sb_dis_border_, UI::Align_Left);
+	box_windows_.add(&snap_win_overlap_only_, UI::Align::kLeft);
+	box_windows_.add(&dock_windows_to_edges_, UI::Align::kLeft);
+	box_windows_.add(&sb_dis_panel_, UI::Align::kLeft);
+	box_windows_.add(&sb_dis_border_, UI::Align::kLeft);
 
 	// Sound
-	box_sound_.add(&music_, UI::Align_Left);
-	box_sound_.add(&fx_, UI::Align_Left);
-	box_sound_.add(&message_sound_, UI::Align_Left);
+	box_sound_.add(&music_, UI::Align::kLeft);
+	box_sound_.add(&fx_, UI::Align::kLeft);
+	box_sound_.add(&message_sound_, UI::Align::kLeft);
 
 	// Saving
-	box_saving_.add(&sb_autosave_, UI::Align_Left);
-	box_saving_.add(&sb_rolling_autosave_, UI::Align_Left);
-	box_saving_.add(&sb_remove_replays_, UI::Align_Left);
-	box_saving_.add(&nozip_, UI::Align_Left);
-	box_saving_.add(&remove_syncstreams_, UI::Align_Left);
+	box_saving_.add(&sb_autosave_, UI::Align::kLeft);
+	box_saving_.add(&sb_rolling_autosave_, UI::Align::kLeft);
+	box_saving_.add(&sb_remove_replays_, UI::Align::kLeft);
+	box_saving_.add(&nozip_, UI::Align::kLeft);
+	box_saving_.add(&remove_syncstreams_, UI::Align::kLeft);
 
 	// Game
-	box_game_.add(&auto_roadbuild_mode_, UI::Align_Left);
-	box_game_.add(&show_workarea_preview_, UI::Align_Left);
-	box_game_.add(&transparent_chat_, UI::Align_Left);
-	box_game_.add(&single_watchwin_, UI::Align_Left);
+	box_game_.add(&auto_roadbuild_mode_, UI::Align::kLeft);
+	box_game_.add(&show_workarea_preview_, UI::Align::kLeft);
+	box_game_.add(&transparent_chat_, UI::Align::kLeft);
+	box_game_.add(&single_watchwin_, UI::Align::kLeft);
 
 	// Language
-	box_language_.add(&label_language_, UI::Align_Left);
-	box_language_.add(&language_list_, UI::Align_Left);
+	box_language_.add(&label_language_, UI::Align::kLeft);
+	box_language_.add(&language_list_, UI::Align::kLeft);
 
 
 	// Bind actions

=== modified file 'src/ui_fsmenu/singleplayer.cc'
--- src/ui_fsmenu/singleplayer.cc	2015-08-06 17:14:34 +0000
+++ src/ui_fsmenu/singleplayer.cc	2016-01-28 21:30:20 +0000
@@ -30,7 +30,7 @@
 	title
 		(this,
 		 get_w() / 2, m_title_y,
-		 _("Single Player"), UI::Align_HCenter),
+		 _("Single Player"), UI::Align::kHCenter),
 
 // Buttons
 	vbox(this, m_box_x, m_box_y, UI::Box::Vertical,
@@ -71,16 +71,16 @@
 
 	title.set_font(ui_fn(), fs_big(), UI_FONT_CLR_FG);
 
-	vbox.add(&new_game, UI::Box::AlignCenter);
-	vbox.add(&campaign, UI::Box::AlignCenter);
+	vbox.add(&new_game, UI::Align::kHCenter);
+	vbox.add(&campaign, UI::Align::kHCenter);
 
 	vbox.add_space(m_buth);
 
-	vbox.add(&load_game, UI::Box::AlignCenter);
+	vbox.add(&load_game, UI::Align::kHCenter);
 
 	vbox.add_space(6 * m_buth);
 
-	vbox.add(&back, UI::Box::AlignCenter);
+	vbox.add(&back, UI::Align::kHCenter);
 
 	vbox.set_size(m_butw, get_h() - vbox.get_y());
 }

=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc	2016-01-25 19:54:33 +0000
+++ src/wlapplication.cc	2016-01-28 21:30:20 +0000
@@ -1016,7 +1016,7 @@
 				 messagetitle,
 				 message,
 				 UI::WLMessageBox::MBoxType::kOk,
-				 UI::Align_Left);
+				 UI::Align::kLeft);
 			mmb.run<UI::Panel::Returncodes>();
 
 			message.clear();

=== modified file 'src/wui/actionconfirm.cc'
--- src/wui/actionconfirm.cc	2015-11-28 22:29:26 +0000
+++ src/wui/actionconfirm.cc	2016-01-28 21:30:20 +0000
@@ -148,7 +148,7 @@
 		(this,
 		 0, 0, 200, 74,
 		 (boost::format(message) % building.descr().descname()).str(),
-		 UI::Align_Center);
+		 UI::Align::kCenter);
 
 	UI::Button * okbtn =
 		new UI::Button
@@ -184,7 +184,7 @@
 		(this,
 		 0, 0, 200, 74,
 		 message,
-		 UI::Align_Center);
+		 UI::Align::kCenter);
 
 	UI::Button * okbtn =
 		new UI::Button

=== modified file 'src/wui/attack_box.cc'
--- src/wui/attack_box.cc	2015-11-28 22:29:26 +0000
+++ src/wui/attack_box.cc	2016-01-28 21:30:20 +0000
@@ -65,13 +65,13 @@
                                                             char const* hint) {
 	std::unique_ptr<UI::HorizontalSlider> result(new UI::HorizontalSlider(
 	   &parent, 0, 0, width, height, min, max, initial, g_gr->images().get(picname), hint));
-	parent.add(result.get(), UI::Box::AlignCenter);
+	parent.add(result.get(), UI::Align::kHCenter);
 	return result;
 }
 
 UI::Textarea& AttackBox::add_text(UI::Box& parent,
                                   std::string str,
-                                  uint32_t alignment,
+											 UI::Align alignment,
                                   const std::string& fontname,
                                   uint32_t fontsize) {
 	UI::Textarea& result = *new UI::Textarea(&parent, str.c_str());
@@ -91,7 +91,7 @@
 	std::unique_ptr<UI::Button> button(new UI::Button(
 	   &parent, text, 8, 8, 26, 26, g_gr->images().get("pics/but2.png"), text, tooltip_text));
 	button.get()->sigclicked.connect(boost::bind(fn, boost::ref(*this)));
-	parent.add(button.get(), Box::AlignCenter);
+	parent.add(button.get(), UI::Align::kHCenter);
 	return button;
 }
 
@@ -135,7 +135,7 @@
 	uint32_t max_attackers = get_max_attackers();
 
 	UI::Box& linebox = *new UI::Box(this, 0, 0, UI::Box::Horizontal);
-	add(&linebox, UI::Box::AlignCenter);
+	add(&linebox, UI::Align::kHCenter);
 	add_text(linebox, _("Soldiers:"));
 	linebox.add_space(8);
 
@@ -144,14 +144,14 @@
 
 	//  Spliter of soldiers
 	UI::Box& columnbox = *new UI::Box(&linebox, 0, 0, UI::Box::Vertical);
-	linebox.add(&columnbox, UI::Box::AlignCenter);
+	linebox.add(&columnbox, UI::Align::kHCenter);
 
 	const std::string attack_string =
 	   (boost::format(_("%1% / %2%")) % (max_attackers > 0 ? 1 : 0) % max_attackers).str();
 
 	soldiers_text_.reset(&add_text(columnbox,
 	                               attack_string,
-	                               UI::Box::AlignCenter,
+	                               UI::Align::kHCenter,
 	                               UI::g_fh1->fontset().serif(),
 	                               UI_FONT_SIZE_ULTRASMALL));
 

=== modified file 'src/wui/attack_box.h'
--- src/wui/attack_box.h	2015-11-28 22:29:26 +0000
+++ src/wui/attack_box.h	2016-01-28 21:30:20 +0000
@@ -66,10 +66,10 @@
 	                                                 char const* hint);
 	// TODO(GunChleoc): This should also return a unique_ptr
 	UI::Textarea& add_text(UI::Box& parent,
-	                       std::string str,
-	                       uint32_t alignment = UI::Box::AlignTop,
-	                       const std::string& fontname = UI::g_fh1->fontset().serif(),
-	                       uint32_t fontsize = UI_FONT_SIZE_SMALL);
+								  std::string str,
+								  UI::Align alignment = UI::Align::kTop,
+								  const std::string& fontname = UI::g_fh1->fontset().serif(),
+								  uint32_t fontsize = UI_FONT_SIZE_SMALL);
 	std::unique_ptr<UI::Button> add_button(UI::Box& parent,
 	                                       const std::string& text,
 	                                       void (AttackBox::*fn)(),

=== modified file 'src/wui/building_statistics_menu.cc'
--- src/wui/building_statistics_menu.cc	2016-01-17 08:29:59 +0000
+++ src/wui/building_statistics_menu.cc	2016-01-28 21:30:20 +0000
@@ -72,28 +72,28 @@
 		tab_panel_(this, 0, 0, g_gr->images().get("pics/but1.png")),
 		navigation_panel_(this, 0, 0, kWindowWidth, 4 * kButtonRowHeight),
 		building_name_(
-			&navigation_panel_, get_inner_w() / 2, 0, 0, kButtonHeight, "", UI::Align_Center),
+			&navigation_panel_, get_inner_w() / 2, 0, 0, kButtonHeight, "", UI::Align::kCenter),
 		owned_label_(&navigation_panel_,
 						 kMargin,
 						 kButtonRowHeight,
 						 0,
 						 kButtonHeight,
 						_("Owned:"),
-						 UI::Align_CenterLeft),
+						 UI::Align::kCenterLeft),
 		construction_label_(&navigation_panel_,
 								  kMargin,
 								  2 * kButtonRowHeight,
 								  0,
 								  kButtonHeight,
 								  _("Under Construction:"),
-								  UI::Align_CenterLeft),
+								  UI::Align::kCenterLeft),
 		unproductive_box_(&navigation_panel_, kMargin, 3 * kButtonRowHeight + 3, UI::Box::Horizontal),
 		unproductive_label_(
 			&unproductive_box_,
 			/** TRANSLATORS: This is the first part of productivity with input field */
 			/** TRANSLATORS: Building statistics window - 'Low Productivity <input>%:' */
 			_("Low Productivity "),
-			UI::Align_BottomLeft),
+			UI::Align::kBottomLeft),
 		unproductive_percent_(
 			&unproductive_box_, 0, 0, 35, kLabelHeight, g_gr->images().get("pics/but1.png")),
 		unproductive_label2_(
@@ -101,28 +101,28 @@
 			/** TRANSLATORS: This is the second part of productivity with input field */
 			/** TRANSLATORS: Building statistics window -  'Low Productivity <input>%:' */
 			_("%:"),
-			UI::Align_BottomLeft),
+			UI::Align::kBottomLeft),
 		no_owned_label_(&navigation_panel_,
 							 get_inner_w() - 2 * kButtonRowHeight - kMargin,
 							 kButtonRowHeight,
 							 0,
 							 kButtonHeight,
 							 "",
-							 UI::Align_CenterRight),
+							 UI::Align::kCenterRight),
 		no_construction_label_(&navigation_panel_,
 									  get_inner_w() - 2 * kButtonRowHeight - kMargin,
 									  2 * kButtonRowHeight,
 									  0,
 									  kButtonHeight,
 									  "",
-									  UI::Align_CenterRight),
+									  UI::Align::kCenterRight),
 		no_unproductive_label_(&navigation_panel_,
 									  get_inner_w() - 2 * kButtonRowHeight - kMargin,
 									  3 * kButtonRowHeight,
 									  0,
 									  kButtonHeight,
 									  "",
-									  UI::Align_CenterRight),
+									  UI::Align::kCenterRight),
 		low_production_(33),
 		has_selection_(false) {
 
@@ -254,7 +254,7 @@
 	}
 
 	for (int i = 0; i < kNoOfBuildingTabs; ++i) {
-		tabs_[i]->add(rows[i], UI::Align_Left);
+		tabs_[i]->add(rows[i], UI::Align::kLeft);
 	}
 
 	set_label_font(&owned_label_);
@@ -270,10 +270,10 @@
 	unproductive_percent_.set_text(std::to_string(low_production_));
 	unproductive_percent_.set_max_length(4);
 	unproductive_label2_.set_size(unproductive_label2_.get_w(), kButtonRowHeight);
-	unproductive_box_.add(&unproductive_label_, UI::Align_Left);
+	unproductive_box_.add(&unproductive_label_, UI::Align::kLeft);
 	unproductive_box_.add_space(2);
-	unproductive_box_.add(&unproductive_percent_, UI::Align_Left);
-	unproductive_box_.add(&unproductive_label2_, UI::Align_Left);
+	unproductive_box_.add(&unproductive_percent_, UI::Align::kLeft);
+	unproductive_box_.add(&unproductive_label2_, UI::Align::kLeft);
 	unproductive_box_.set_size(
 		unproductive_label_.get_w() + unproductive_percent_.get_w() + unproductive_label2_.get_w(),
 		kButtonRowHeight);
@@ -399,17 +399,17 @@
 														"",
 														false,
 														true);
-	button_box->add(building_buttons_[id], UI::Align_Left);
+	button_box->add(building_buttons_[id], UI::Align::kLeft);
 
 	owned_labels_[id] =
-		new UI::Textarea(button_box, 0, 0, kBuildGridCellWidth, kLabelHeight, UI::Align_Center);
-	button_box->add(owned_labels_[id], UI::Align_Left);
+		new UI::Textarea(button_box, 0, 0, kBuildGridCellWidth, kLabelHeight, UI::Align::kCenter);
+	button_box->add(owned_labels_[id], UI::Align::kLeft);
 
 	productivity_labels_[id] =
-		new UI::Textarea(button_box, 0, 0, kBuildGridCellWidth, kLabelHeight, UI::Align_Center);
-	button_box->add(productivity_labels_[id], UI::Align_Left);
+		new UI::Textarea(button_box, 0, 0, kBuildGridCellWidth, kLabelHeight, UI::Align::kCenter);
+	button_box->add(productivity_labels_[id], UI::Align::kLeft);
 
-	row.add(button_box, UI::Align_Left);
+	row.add(button_box, UI::Align::kLeft);
 
 	building_buttons_[id]->sigclicked.connect(
 		boost::bind(&BuildingStatisticsMenu::set_current_building_type, boost::ref(*this), id));
@@ -422,7 +422,7 @@
 	// Check if the row is full
 	++*column;
 	if (*column == kColumns) {
-		tabs_[tab_index]->add(&row, UI::Align_Left);
+		tabs_[tab_index]->add(&row, UI::Align::kLeft);
 		*column = 0;
 		return true;
 	}

=== modified file 'src/wui/buildingwindow.cc'
--- src/wui/buildingwindow.cc	2016-01-24 20:11:53 +0000
+++ src/wui/buildingwindow.cc	2016-01-28 21:30:20 +0000
@@ -72,10 +72,10 @@
 	UI::Box * vbox = new UI::Box(this, 0, 0, UI::Box::Vertical);
 
 	tabs_ = new UI::TabPanel(vbox, 0, 0, nullptr);
-	vbox->add(tabs_, UI::Box::AlignLeft, true);
+	vbox->add(tabs_, UI::Align::kLeft, true);
 
 	capsbuttons_ = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
-	vbox->add(capsbuttons_, UI::Box::AlignLeft, true);
+	vbox->add(capsbuttons_, UI::Align::kLeft, true);
 	// actually create buttons on the first call to think(),
 	// so that overriding create_capsbuttons() works
 
@@ -187,7 +187,7 @@
 							_("Cancel the expedition"));
 					expeditionbtn->sigclicked.connect
 						(boost::bind(&BuildingWindow::act_start_or_cancel_expedition, boost::ref(*this)));
-					capsbuttons->add(expeditionbtn, UI::Box::AlignCenter);
+					capsbuttons->add(expeditionbtn, UI::Align::kHCenter);
 				} else {
 					UI::Button * expeditionbtn =
 						new UI::Button
@@ -197,7 +197,7 @@
 							_("Start an expedition"));
 					expeditionbtn->sigclicked.connect
 						(boost::bind(&BuildingWindow::act_start_or_cancel_expedition, boost::ref(*this)));
-					capsbuttons->add(expeditionbtn, UI::Box::AlignCenter);
+					capsbuttons->add(expeditionbtn, UI::Align::kHCenter);
 				}
 			}
 		}
@@ -215,7 +215,7 @@
 				stopbtn->sigclicked.connect(boost::bind(&BuildingWindow::act_start_stop, boost::ref(*this)));
 				capsbuttons->add
 					(stopbtn,
-					 UI::Box::AlignCenter);
+					 UI::Align::kHCenter);
 
 
 				// Add a fixed width separator rather than infinite space so the
@@ -223,7 +223,7 @@
 				// and not subject to the number of buttons on the right of the
 				// panel.
 				UI::Panel * spacer = new UI::Panel(capsbuttons, 0, 0, 17, 34);
-				capsbuttons->add(spacer, UI::Box::AlignCenter);
+				capsbuttons->add(spacer, UI::Align::kHCenter);
 			}
 		} // upcast to productionsite
 
@@ -251,7 +251,7 @@
 				   enhancebtn->sigclicked.connect([this, enhancement] {act_enhance(enhancement);});
 				   capsbuttons->add
 						(enhancebtn,
-						 UI::Box::AlignCenter);
+						 UI::Align::kHCenter);
 					requires_destruction_separator = true;
 				}
 		}
@@ -267,7 +267,7 @@
 				(boost::bind(&BuildingWindow::act_bulldoze, boost::ref(*this)));
 			capsbuttons->add
 				(destroybtn,
-				 UI::Box::AlignCenter);
+				 UI::Align::kHCenter);
 
 			requires_destruction_separator = true;
 		}
@@ -285,7 +285,7 @@
 			dismantlebtn->sigclicked.connect(boost::bind(&BuildingWindow::act_dismantle, boost::ref(*this)));
 			capsbuttons->add
 				(dismantlebtn,
-				 UI::Box::AlignCenter);
+				 UI::Align::kHCenter);
 
 			requires_destruction_separator = true;
 		}
@@ -294,7 +294,7 @@
 			// Need this as well as the infinite space from the can_see section
 			// to ensure there is a separation.
 			UI::Panel * spacer = new UI::Panel(capsbuttons, 0, 0, 17, 34);
-			capsbuttons->add(spacer, UI::Box::AlignCenter);
+			capsbuttons->add(spacer, UI::Align::kHCenter);
 			capsbuttons->add_inf_space();
 		}
 	}
@@ -316,7 +316,7 @@
 			toggle_workarea_->sigclicked.connect
 				(boost::bind(&BuildingWindow::toggle_workarea, boost::ref(*this)));
 
-			capsbuttons->add(toggle_workarea_, UI::Box::AlignCenter);
+			capsbuttons->add(toggle_workarea_, UI::Align::kHCenter);
 			configure_workarea_button();
 			set_fastclick_panel(toggle_workarea_);
 		}
@@ -331,7 +331,7 @@
 			debugbtn->sigclicked.connect(boost::bind(&BuildingWindow::act_debug, boost::ref(*this)));
 			capsbuttons->add
 				(debugbtn,
-				 UI::Box::AlignCenter);
+				 UI::Align::kHCenter);
 		}
 
 		UI::Button * gotobtn =
@@ -342,7 +342,7 @@
 		gotobtn->sigclicked.connect(boost::bind(&BuildingWindow::clicked_goto, boost::ref(*this)));
 		capsbuttons->add
 			(gotobtn,
-			 UI::Box::AlignCenter);
+			 UI::Align::kHCenter);
 
 		if (!requires_destruction_separator) {
 			// When there was no separation of destruction buttons put
@@ -365,7 +365,7 @@
 		};
 
 		helpbtn->sigclicked.connect(boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(registry)));
-		capsbuttons->add(helpbtn, UI::Box::AlignCenter);
+		capsbuttons->add(helpbtn, UI::Align::kHCenter);
 	}
 }
 
@@ -526,7 +526,7 @@
 	 bool show_only)
 {
 	// The *max* width should be larger than the default width
-	box->add(new WaresQueueDisplay(box, 0, 0, igbase(), b, wq, show_only), UI::Box::AlignLeft);
+	box->add(new WaresQueueDisplay(box, 0, 0, igbase(), b, wq, show_only), UI::Align::kLeft);
 }
 
 /**

=== modified file 'src/wui/constructionsitewindow.cc'
--- src/wui/constructionsitewindow.cc	2015-11-28 22:29:26 +0000
+++ src/wui/constructionsitewindow.cc	2016-01-28 21:30:20 +0000
@@ -61,7 +61,7 @@
 			 UI::ProgressBar::DefaultWidth, UI::ProgressBar::DefaultHeight,
 			 UI::ProgressBar::Horizontal);
 	m_progress->set_total(1 << 16);
-	box.add(m_progress, UI::Box::AlignCenter);
+	box.add(m_progress, UI::Align::kHCenter);
 
 	box.add_space(8);
 
@@ -69,7 +69,7 @@
 	for (uint32_t i = 0; i < cs.get_nrwaresqueues(); ++i)
 		box.add
 			(new WaresQueueDisplay(&box, 0, 0, igbase(), cs, cs.get_waresqueue(i)),
-			 UI::Box::AlignLeft);
+			 UI::Align::kLeft);
 
 
 	get_tabs()->add("wares", g_gr->images().get(pic_tab_wares), &box, _("Building materials"));

=== modified file 'src/wui/dismantlesitewindow.cc'
--- src/wui/dismantlesitewindow.cc	2015-11-28 22:29:26 +0000
+++ src/wui/dismantlesitewindow.cc	2016-01-28 21:30:20 +0000
@@ -58,7 +58,7 @@
 			 UI::ProgressBar::DefaultWidth, UI::ProgressBar::DefaultHeight,
 			 UI::ProgressBar::Horizontal);
 	m_progress->set_total(1 << 16);
-	box.add(m_progress, UI::Box::AlignCenter);
+	box.add(m_progress, UI::Align::kHCenter);
 
 	box.add_space(8);
 

=== modified file 'src/wui/encyclopedia_window.cc'
--- src/wui/encyclopedia_window.cc	2016-01-17 08:29:59 +0000
+++ src/wui/encyclopedia_window.cc	2016-01-28 21:30:20 +0000
@@ -147,12 +147,12 @@
 		                  std::unique_ptr<UI::MultilineTextarea>(new UI::MultilineTextarea(
 		                     boxes_.at(tab->key).get(), 0, 0, contents_width, contents_height))));
 
-		boxes_.at(tab->key)->add(lists_.at(tab->key).get(), UI::Align_Left);
+		boxes_.at(tab->key)->add(lists_.at(tab->key).get(), UI::Align::kLeft);
 		boxes_.at(tab->key)->add_space(kPadding);
-		boxes_.at(tab->key)->add(contents_.at(tab->key).get(), UI::Align_Left);
+		boxes_.at(tab->key)->add(contents_.at(tab->key).get(), UI::Align::kLeft);
 
 		wrapper_boxes_.at(tab->key)->add_space(kPadding);
-		wrapper_boxes_.at(tab->key)->add(boxes_.at(tab->key).get(), UI::Align_Left);
+		wrapper_boxes_.at(tab->key)->add(boxes_.at(tab->key).get(), UI::Align::kLeft);
 
 		tabs_.add("encyclopedia_" + tab->key,
 		          g_gr->images().get(tab->image_filename),

=== modified file 'src/wui/fieldaction.cc'
--- src/wui/fieldaction.cc	2016-01-16 15:57:31 +0000
+++ src/wui/fieldaction.cc	2016-01-28 21:30:20 +0000
@@ -466,7 +466,7 @@
 			 attackable->can_attack())
 		{
 			m_attack_box = new AttackBox(&a_box, m_plr, &m_node, 0, 0);
-			a_box.add(m_attack_box, UI::Box::AlignTop);
+			a_box.add(m_attack_box, UI::Align::kTop);
 
 			set_fastclick_panel
 				(&add_button
@@ -619,7 +619,7 @@
 	button.sigclicked.connect(boost::bind(fn, this));
 	button.set_repeating(repeating);
 	box->add
-		(&button, UI::Box::AlignTop);
+		(&button, UI::Align::kTop);
 
 	return button;
 }

=== modified file 'src/wui/game_main_menu_save_game.cc'
--- src/wui/game_main_menu_save_game.cc	2016-01-24 20:11:53 +0000
+++ src/wui/game_main_menu_save_game.cc	2016-01-28 21:30:20 +0000
@@ -61,19 +61,19 @@
 		 WINDOW_WIDTH, WINDOW_HEIGHT, _("Save Game")),
 	ls_     (this, HSPACING, VSPACING,  LIST_WIDTH, LIST_HEIGHT),
 	name_label_
-		(this, DESCRIPTION_X,  5, 0, 20, _("Map Name:"),  UI::Align_CenterLeft),
+		(this, DESCRIPTION_X,  5, 0, 20, _("Map Name:"),  UI::Align::kCenterLeft),
 	mapname_
-		(this, DESCRIPTION_X, 20, 0, 20, " ",              UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 20, 0, 20, " ",              UI::Align::kCenterLeft),
 	gametime_label_
-		(this, DESCRIPTION_X, 45, 0, 20, _("Game Time:"), UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 45, 0, 20, _("Game Time:"), UI::Align::kCenterLeft),
 	gametime_
-		(this, DESCRIPTION_X, 60, 0, 20, " ",              UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 60, 0, 20, " ",              UI::Align::kCenterLeft),
 	players_label_
-		(this, DESCRIPTION_X, 85, 0, 20, " ",              UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 85, 0, 20, " ",              UI::Align::kCenterLeft),
 	win_condition_label_
-		(this, DESCRIPTION_X, 110, 0, 20, _("Win condition:"), UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 110, 0, 20, _("Win condition:"), UI::Align::kCenterLeft),
 	win_condition_
-		(this, DESCRIPTION_X, 125, 0, 20, " ",             UI::Align_CenterLeft),
+		(this, DESCRIPTION_X, 125, 0, 20, " ",             UI::Align::kCenterLeft),
 	curdir_(SaveHandler::get_base_dir())
 {
 	editbox_ =

=== modified file 'src/wui/game_message_menu.cc'
--- src/wui/game_message_menu.cc	2016-01-24 20:11:53 +0000
+++ src/wui/game_message_menu.cc	2016-01-28 21:30:20 +0000
@@ -58,7 +58,7 @@
 		 kMessageBodyY,
 		 kWindowWidth - 2 * kPadding,
 		 get_inner_h() - kMessageBodyY - 2 * kPadding - kButtonSize,
-		 "", UI::Align_Left, 1),
+		 "", UI::Align::kLeft, 1),
 	mode(Inbox)
 {
 
@@ -71,11 +71,11 @@
 	list->selected.connect(boost::bind(&GameMessageMenu::selected, this, _1));
 	list->double_clicked.connect(boost::bind(&GameMessageMenu::double_clicked, this, _1));
 	list->add_column(kWindowWidth - 2 * kPadding - 60 - 60 - 75, _("Title"));
-	list->add_column (60, pgettext("message", "Type"), "", UI::Align_HCenter, true);
-	list->add_column (60, _("Status"), "", UI::Align_HCenter);
+	list->add_column (60, pgettext("message", "Type"), "", UI::Align::kHCenter, true);
+	list->add_column (60, _("Status"), "", UI::Align::kHCenter);
 	/** TRANSLATORS: We have very little space here. You can also translate this as "Time" or "Time Sent" */
 	/** TRANSLATORS: This is used in the game messages menu - please open an issue if you need more space. */
-	list->add_column(75, pgettext("message", "Sent"), "", UI::Align_Right);
+	list->add_column(75, pgettext("message", "Sent"), "", UI::Align::kRight);
 	list->focus();
 
 	// Buttons for message types

=== modified file 'src/wui/game_objectives_menu.cc'
--- src/wui/game_objectives_menu.cc	2014-11-30 18:49:38 +0000
+++ src/wui/game_objectives_menu.cc	2016-01-28 21:30:20 +0000
@@ -47,14 +47,14 @@
 		(this,
 		 5, 5,
 		 get_inner_w() - 10, OBJECTIVE_LIST,
-		 UI::Align_Left,
+		 UI::Align::kLeft,
 		 false),
 	objectivetext
 		(this,
 		 5, 130,
 		 get_inner_w() - 10, FULL_OBJECTIVE_TEXT,
 		 "",
-		 UI::Align_Left,
+		 UI::Align::kLeft,
 		 1)
 {
 	list.selected.connect(boost::bind(&GameObjectivesMenu::selected, this, _1));

=== modified file 'src/wui/game_options_menu.cc'
--- src/wui/game_options_menu.cc	2015-09-28 06:41:58 +0000
+++ src/wui/game_options_menu.cc	2016-01-28 21:30:20 +0000
@@ -114,14 +114,14 @@
 		 /** TRANSLATORS: Button tooltip */
 		 _("Exit Game"))
 {
-	box_.add(&readme_, UI::Box::AlignCenter);
-	box_.add(&license_, UI::Box::AlignCenter);
-	box_.add(&authors_, UI::Box::AlignCenter);
-	box_.add_space(vgap);
-	box_.add(&sound_, UI::Box::AlignCenter);
-	box_.add_space(vgap);
-	box_.add(&save_game_, UI::Box::AlignCenter);
-	box_.add(&exit_game_, UI::Box::AlignCenter);
+	box_.add(&readme_, UI::Align::kHCenter);
+	box_.add(&license_, UI::Align::kHCenter);
+	box_.add(&authors_, UI::Align::kHCenter);
+	box_.add_space(vgap);
+	box_.add(&sound_, UI::Align::kHCenter);
+	box_.add_space(vgap);
+	box_.add(&save_game_, UI::Align::kHCenter);
+	box_.add(&exit_game_, UI::Align::kHCenter);
 	box_.set_size(width, 4 * readme_.get_h() + 2 * save_game_.get_h() + 2 * vgap + 7 * vspacing);
 	set_inner_size(get_inner_w(), box_.get_h() + 2 * margin);
 

=== modified file 'src/wui/game_summary.cc'
--- src/wui/game_summary.cc	2016-01-24 20:11:53 +0000
+++ src/wui/game_summary.cc	2016-01-28 21:30:20 +0000
@@ -45,67 +45,67 @@
 {
 	// Init boxes
 	UI::Box * vbox = new UI::Box(this, 0, 0, UI::Box::Vertical, 0, 0, PADDING);
-	title_area_ = new UI::Textarea(vbox, "", UI::Align_HCenter);
-	vbox->add(title_area_, UI::Box::AlignCenter);
+	title_area_ = new UI::Textarea(vbox, "", UI::Align::kHCenter);
+	vbox->add(title_area_, UI::Align::kHCenter);
 	vbox->add_space(PADDING);
 
 	UI::Box * hbox1 = new UI::Box(this, 0, 0, UI::Box::Horizontal);
 	players_table_ = new UI::Table<uintptr_t const>(hbox1, 0, 0, 0, 0);
 	players_table_->fit_height(game_.player_manager()->get_players_end_status().size());
 	hbox1->add_space(PADDING);
-	hbox1->add(players_table_, UI::Box::AlignTop);
+	hbox1->add(players_table_, UI::Align::kTop);
 	hbox1->add_space(PADDING);
 
 	UI::Box * info_box = new UI::Box(hbox1, 0, 0, UI::Box::Vertical, 0, 0);
 	info_area_label_ = new UI::Textarea(info_box, _("Player info:"));
-	info_box->add(info_area_label_, UI::Box::AlignLeft);
+	info_box->add(info_area_label_, UI::Align::kLeft);
 	info_area_ = new UI::MultilineTextarea(
 						  info_box, 0, 0, 130,
 						  std::max(130, players_table_->get_h() - info_area_label_->get_h() - PADDING),
 						  "");
-	info_box->add(info_area_, UI::Box::AlignLeft, true);
+	info_box->add(info_area_, UI::Align::kLeft, true);
 	info_box->add_space(PADDING);
-	hbox1->add(info_box, UI::Box::AlignTop);
+	hbox1->add(info_box, UI::Align::kTop);
 	hbox1->add_space(PADDING);
-	vbox->add(hbox1, UI::Box::AlignLeft);
-
-	UI::Box * bottobox_ = new UI::Box(this, 0, 0, UI::Box::Horizontal);
-
-	bottobox_->add_space(PADDING);
-
-	gametime_label_ = new UI::Textarea(bottobox_, _("Elapsed time:"));
-	bottobox_->add(gametime_label_, UI::Box::AlignCenter);
-	bottobox_->add_space(PADDING);
-	gametime_value_ = new UI::Textarea(bottobox_, gametimestring(game_.get_gametime()));
-	bottobox_->add(gametime_value_, UI::Box::AlignCenter);
-
-	bottobox_->add_inf_space();
+	vbox->add(hbox1, UI::Align::kLeft);
+
+	UI::Box * bottom_box = new UI::Box(this, 0, 0, UI::Box::Horizontal);
+
+	bottom_box->add_space(PADDING);
+
+	gametime_label_ = new UI::Textarea(bottom_box, _("Elapsed time:"));
+	bottom_box->add(gametime_label_, UI::Align::kHCenter);
+	bottom_box->add_space(PADDING);
+	gametime_value_ = new UI::Textarea(bottom_box, gametimestring(game_.get_gametime()));
+	bottom_box->add(gametime_value_, UI::Align::kHCenter);
+
+	bottom_box->add_inf_space();
 
 	continue_button_ = new UI::Button
-		(bottobox_, "continue_button",
+		(bottom_box, "continue_button",
 		 0, 0, 35, 35,
 		 g_gr->images().get("pics/but4.png"),
 		 g_gr->images().get("pics/continue.png"),
 		 _("Continue playing"));
-	bottobox_->add(continue_button_, UI::Box::AlignCenter);
-	bottobox_->add_space(PADDING);
+	bottom_box->add(continue_button_, UI::Align::kHCenter);
+	bottom_box->add_space(PADDING);
 	stop_button_ = new UI::Button
-		(bottobox_, "stop_button",
+		(bottom_box, "stop_button",
 		 0, 0, 35, 35,
 		 g_gr->images().get("pics/but4.png"),
 		 g_gr->images().get("pics/menu_exit_game.png"),
 		_("Exit Game"));
-	bottobox_->add(stop_button_, UI::Box::AlignCenter);
-	bottobox_->add_space(PADDING);
+	bottom_box->add(stop_button_, UI::Align::kHCenter);
+	bottom_box->add_space(PADDING);
 
-	vbox->add(bottobox_, UI::Box::AlignLeft, true);
+	vbox->add(bottom_box, UI::Align::kLeft, true);
 	vbox->add_space(PADDING);
 	set_center_panel(vbox);
 
 	// Prepare table
 	players_table_->add_column(150, _("Player"));
-	players_table_->add_column(80, _("Team"), "", UI::Align_HCenter);
-	players_table_->add_column(100, _("Status"), "", UI::Align_HCenter);
+	players_table_->add_column(80, _("Team"), "", UI::Align::kHCenter);
+	players_table_->add_column(100, _("Status"), "", UI::Align::kHCenter);
 	players_table_->add_column(100, _("Time"));
 
 	// Prepare Elements

=== modified file 'src/wui/gamechatpanel.cc'
--- src/wui/gamechatpanel.cc	2016-01-24 20:11:53 +0000
+++ src/wui/gamechatpanel.cc	2016-01-28 21:30:20 +0000
@@ -34,14 +34,14 @@
 	:
 	UI::Panel(parent, x, y, w, h),
 	chat_   (chat),
-	chatbox  (this, 0, 0, w, h - 25, "", UI::Align_Left, 1),
+	chatbox  (this, 0, 0, w, h - 25, "", UI::Align::kLeft, 1),
 	editbox  (this, 0, h - 20, w,  20),
 	chat_message_counter(std::numeric_limits<uint32_t>::max())
 {
 	chatbox.set_scrollmode(UI::MultilineTextarea::ScrollLog);
 	editbox.ok.connect(boost::bind(&GameChatPanel::key_enter, this));
 	editbox.cancel.connect(boost::bind(&GameChatPanel::key_escape, this));
-	editbox.set_align(UI::Align_Left);
+	editbox.set_align(UI::Align::kLeft);
 	editbox.activate_history(true);
 
 	set_handle_mouse(true);

=== modified file 'src/wui/general_statistics_menu.cc'
--- src/wui/general_statistics_menu.cc	2016-01-24 20:11:53 +0000
+++ src/wui/general_statistics_menu.cc	2016-01-28 21:30:20 +0000
@@ -137,7 +137,7 @@
 	plot_.set_time(my_registry_->time);
 
 	// Setup Widgets
-	box_.add(&plot_, UI::Box::AlignTop);
+	box_.add(&plot_, UI::Align::kTop);
 
 	UI::Box * hbox1 = new UI::Box(&box_, 0, 0, UI::Box::Horizontal, 0, 0, 1);
 
@@ -161,11 +161,11 @@
 
 		cbs_[p - 1] = &cb;
 
-		hbox1->add(&cb, UI::Box::AlignLeft, false, true);
+		hbox1->add(&cb, UI::Align::kLeft, false, true);
 	} else //  player nr p does not exist
 		cbs_[p - 1] = nullptr;
 
-	box_.add(hbox1, UI::Box::AlignTop, true);
+	box_.add(hbox1, UI::Align::kTop, true);
 
 	UI::Box * hbox2 = new UI::Box(&box_, 0, 0, UI::Box::Horizontal, 0, 0, 1);
 
@@ -177,7 +177,7 @@
 		 g_gr->images().get("pics/genstats_landsize.png"),
 		 _("Land"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -185,7 +185,7 @@
 		 g_gr->images().get("pics/genstats_nrworkers.png"),
 		 _("Workers"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -193,7 +193,7 @@
 		 g_gr->images().get("pics/genstats_nrbuildings.png"),
 		 _("Buildings"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -201,7 +201,7 @@
 		 g_gr->images().get("pics/genstats_nrwares.png"),
 		 _("Wares"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -209,7 +209,7 @@
 		 g_gr->images().get("pics/genstats_productivity.png"),
 		 _("Productivity"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -217,7 +217,7 @@
 		 g_gr->images().get("pics/genstats_casualties.png"),
 		 _("Casualties"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -225,7 +225,7 @@
 		 g_gr->images().get("pics/genstats_kills.png"),
 		 _("Kills"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -233,7 +233,7 @@
 		 g_gr->images().get("pics/genstats_msites_lost.png"),
 		 _("Military buildings lost"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -241,7 +241,7 @@
 		 g_gr->images().get("pics/genstats_msites_defeated.png"),
 		 _("Military buildings defeated"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -249,7 +249,7 @@
 		 g_gr->images().get("pics/genstats_civil_blds_lost.png"),
 		 _("Civilian buildings lost"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	radiogroup_.add_button
 		(hbox2,
@@ -257,7 +257,7 @@
 		 g_gr->images().get("pics/genstats_militarystrength.png"),
 		 _("Military"),
 		 &btn);
-	hbox2->add(btn, UI::Box::AlignLeft, false, true);
+	hbox2->add(btn, UI::Align::kLeft, false, true);
 
 	if (hook) {
 		radiogroup_.add_button
@@ -266,20 +266,20 @@
 			 g_gr->images().get(cs_pic),
 			 cs_name.c_str(),
 			 &btn);
-		hbox2->add(btn, UI::Box::AlignLeft, false, true);
+		hbox2->add(btn, UI::Align::kLeft, false, true);
 	}
 
 	radiogroup_.set_state(selected_information_);
 	radiogroup_.changedto.connect
 		(boost::bind(&GeneralStatisticsMenu::radiogroup_changed, this, _1));
 
-	box_.add(hbox2, UI::Box::AlignTop, true);
+	box_.add(hbox2, UI::Align::kTop, true);
 
 	box_.add
 		(new WuiPlotAreaSlider
 			(&box_, plot_, 0, 0, 100, 45,
 			 g_gr->images().get("pics/but1.png"))
-		, UI::Box::AlignTop
+		, UI::Align::kTop
 		, true);
 
 }

=== modified file 'src/wui/helpwindow.cc'
--- src/wui/helpwindow.cc	2015-12-11 19:06:50 +0000
+++ src/wui/helpwindow.cc	2016-01-28 21:30:20 +0000
@@ -42,7 +42,7 @@
 	:
 	UI::UniqueWindow(parent, "help_window", &reg, width, height,
 			(boost::format(_("Help: %s")) % building_description.descname()).str()),
-	textarea_(new MultilineTextarea(this, 5, 5, width - 10, height -10, std::string(), Align_Left))
+	textarea_(new MultilineTextarea(this, 5, 5, width - 10, height - 10, std::string(), UI::Align::kLeft))
 {
 	assert(tribe.has_building(tribe.building_index(building_description.name())));
 	try {

=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc	2016-01-16 20:47:10 +0000
+++ src/wui/interactive_base.cc	2016-01-28 21:30:20 +0000
@@ -362,7 +362,7 @@
 		if (is_game) {
 			const std::string gametime(gametimestring(egbase().get_gametime(), true));
 			const std::string gametime_text = as_uifont(gametime, UI_FONT_SIZE_SMALL);
-			dst.blit(Point(5, 5), UI::g_fh1->render(gametime_text), BlendMode::UseAlpha, UI::Align_TopLeft);
+			dst.blit(Point(5, 5), UI::g_fh1->render(gametime_text), BlendMode::UseAlpha, UI::Align::kTopLeft);
 
 			static boost::format node_format("(%i, %i)");
 			node_text = as_uifont
@@ -378,7 +378,7 @@
 			Point(get_w() - 5, get_h() - 5),
 			UI::g_fh1->render(node_text),
 			BlendMode::UseAlpha,
-			UI::Align_BottomRight);
+			UI::Align::kBottomRight);
 	}
 
 	// Blit FPS when in debug mode.
@@ -390,7 +390,7 @@
 		dst.blit(Point(5, (is_game) ? 25 : 5),
 		         UI::g_fh1->render(fps_text),
 		         BlendMode::UseAlpha,
-		         UI::Align_Left);
+					UI::Align::kLeft);
 	}
 }
 

=== modified file 'src/wui/interactive_gamebase.cc'
--- src/wui/interactive_gamebase.cc	2016-01-24 20:11:53 +0000
+++ src/wui/interactive_gamebase.cc	2016-01-28 21:30:20 +0000
@@ -123,7 +123,7 @@
 			dst.blit(Point(get_w() - 5,  5),
 						UI::g_fh1->render(game_speed),
 						BlendMode::UseAlpha,
-						UI::Align_TopRight);
+						UI::Align::kTopRight);
 		}
 	}
 }

=== modified file 'src/wui/interactive_player.cc'
--- src/wui/interactive_player.cc	2016-01-24 20:11:53 +0000
+++ src/wui/interactive_player.cc	2016-01-28 21:30:20 +0000
@@ -124,19 +124,19 @@
 
 	// TODO(unknown): instead of making unneeded buttons invisible after generation,
 	// they should not at all be generated. -> implement more dynamic toolbar UI
-	toolbar_.add(&toggle_options_menu_,    UI::Box::AlignLeft);
-	toolbar_.add(&toggle_statistics_menu_, UI::Box::AlignLeft);
-	toolbar_.add(&toggle_minimap_,         UI::Box::AlignLeft);
-	toolbar_.add(&toggle_buildhelp_,       UI::Box::AlignLeft);
+	toolbar_.add(&toggle_options_menu_,    UI::Align::kLeft);
+	toolbar_.add(&toggle_statistics_menu_, UI::Align::kLeft);
+	toolbar_.add(&toggle_minimap_,         UI::Align::kLeft);
+	toolbar_.add(&toggle_buildhelp_,       UI::Align::kLeft);
 	if (multiplayer) {
-		toolbar_.add(&toggle_chat_,            UI::Box::AlignLeft);
+		toolbar_.add(&toggle_chat_,            UI::Align::kLeft);
 		toggle_chat_.set_visible(false);
 		toggle_chat_.set_enabled(false);
 	}
 
-	toolbar_.add(&toggle_help_,            UI::Box::AlignLeft);
-	toolbar_.add(&toggle_objectives_,      UI::Box::AlignLeft);
-	toolbar_.add(&toggle_message_menu_,    UI::Box::AlignLeft);
+	toolbar_.add(&toggle_help_,            UI::Align::kLeft);
+	toolbar_.add(&toggle_objectives_,      UI::Align::kLeft);
+	toolbar_.add(&toggle_message_menu_,    UI::Align::kLeft);
 
 	set_player_number(plyn);
 	fieldclicked.connect(boost::bind(&InteractivePlayer::node_action, this));

=== modified file 'src/wui/interactive_spectator.cc'
--- src/wui/interactive_spectator.cc	2016-01-24 20:11:53 +0000
+++ src/wui/interactive_spectator.cc	2016-01-28 21:30:20 +0000
@@ -71,14 +71,14 @@
 
 	toolbar_.set_layout_toplevel(true);
 	if (!is_multiplayer()) {
-		toolbar_.add(&exit_,                UI::Box::AlignLeft);
-		toolbar_.add(&save_,                UI::Box::AlignLeft);
+		toolbar_.add(&exit_,                UI::Align::kLeft);
+		toolbar_.add(&save_,                UI::Align::kLeft);
 	} else
-		toolbar_.add(&toggle_options_menu_, UI::Box::AlignLeft);
-	toolbar_.add(&toggle_statistics_,      UI::Box::AlignLeft);
-	toolbar_.add(&toggle_minimap_,         UI::Box::AlignLeft);
-	toolbar_.add(&toggle_buildhelp_,       UI::Box::AlignLeft);
-	toolbar_.add(&toggle_chat_,            UI::Box::AlignLeft);
+	toolbar_.add(&toggle_options_menu_,    UI::Align::kLeft);
+	toolbar_.add(&toggle_statistics_,      UI::Align::kLeft);
+	toolbar_.add(&toggle_minimap_,         UI::Align::kLeft);
+	toolbar_.add(&toggle_buildhelp_,       UI::Align::kLeft);
+	toolbar_.add(&toggle_chat_,            UI::Align::kLeft);
 
 	// TODO(unknown): instead of making unneeded buttons invisible after generation,
 	// they should not at all be generated. -> implement more dynamic toolbar UI

=== modified file 'src/wui/login_box.cc'
--- src/wui/login_box.cc	2015-10-10 11:47:22 +0000
+++ src/wui/login_box.cc	2016-01-28 21:30:20 +0000
@@ -36,19 +36,19 @@
 	eb_nickname =
 		new UI::EditBox
 			(this, 150, margin, 330, 20,
-			 g_gr->images().get("pics/but2.png"), UI::Align_Left);
+			 g_gr->images().get("pics/but2.png"), UI::Align::kLeft);
 
 	ta_password = new UI::Textarea(this, margin, 40, _("Password:"));
 	eb_password =
 		new UI::EditBox
 			(this, 150, 40, 330, 20,
-			 g_gr->images().get("pics/but2.png"), UI::Align_Left);
+			 g_gr->images().get("pics/but2.png"), UI::Align::kLeft);
 
 	pwd_warning =
 		new UI::MultilineTextarea
 			(this, margin, 65, 505, 50,
 			 _("WARNING: Password will be shown and saved readable!"),
-			 UI::Align_Left);
+			 UI::Align::kLeft);
 
 	cb_register = new UI::Checkbox(this, Point(margin, 110),
 											 _("Log in to a registered account"),

=== modified file 'src/wui/mapdetails.cc'
--- src/wui/mapdetails.cc	2015-03-06 07:16:24 +0000
+++ src/wui/mapdetails.cc	2016-01-28 21:30:20 +0000
@@ -65,22 +65,22 @@
 	suggested_teams_box_ = new UI::SuggestedTeamsBox(this, 0, 0, UI::Box::Vertical,
 																	 padding_, indent_, labelh_, max_x_, 4 * labelh_);
 
-	main_box_.add(&name_label_, UI::Box::AlignLeft);
+	main_box_.add(&name_label_, UI::Align::kLeft);
 	name_box_.add_space(indent_);
-	name_box_.add(&name_, UI::Box::AlignLeft);
-	main_box_.add(&name_box_, UI::Box::AlignLeft);
+	name_box_.add(&name_, UI::Align::kLeft);
+	main_box_.add(&name_box_, UI::Align::kLeft);
 	main_box_.add_space(padding_);
 
-	main_box_.add(&author_label_, UI::Box::AlignLeft);
+	main_box_.add(&author_label_, UI::Align::kLeft);
 	author_box_.add_space(indent_);
-	author_box_.add(&author_, UI::Box::AlignLeft);
-	main_box_.add(&author_box_, UI::Box::AlignLeft);
+	author_box_.add(&author_, UI::Align::kLeft);
+	main_box_.add(&author_box_, UI::Align::kLeft);
 	main_box_.add_space(padding_);
 
-	main_box_.add(&descr_label_, UI::Box::AlignLeft);
+	main_box_.add(&descr_label_, UI::Align::kLeft);
 	descr_box_.add_space(indent_);
-	descr_box_.add(&descr_, UI::Box::AlignLeft);
-	main_box_.add(&descr_box_, UI::Box::AlignLeft);
+	descr_box_.add(&descr_, UI::Align::kLeft);
+	main_box_.add(&descr_box_, UI::Align::kLeft);
 	main_box_.add_space(padding_);
 }
 

=== modified file 'src/wui/maptable.cc'
--- src/wui/maptable.cc	2015-10-02 09:26:57 +0000
+++ src/wui/maptable.cc	2016-01-28 21:30:20 +0000
@@ -33,9 +33,9 @@
 	UI::Table<uintptr_t>(parent, x, y, w, h, descending) {
 
 	/** TRANSLATORS: Column title for number of players in map list */
-	add_column(35, _("Pl."), _("Number of players"), UI::Align_HCenter);
-	add_column(get_w() - 35 - 115, "", _("The name of the map or scenario"), UI::Align_Left);
-	add_column(115, _("Size"), _("The size of the map (Width x Height)"), UI::Align_Left);
+	add_column(35, _("Pl."), _("Number of players"), UI::Align::kHCenter);
+	add_column(get_w() - 35 - 115, "", _("The name of the map or scenario"), UI::Align::kLeft);
+	add_column(115, _("Size"), _("The size of the map (Width x Height)"), UI::Align::kLeft);
 	set_sort_column(0);
 }
 

=== modified file 'src/wui/multiplayersetupgroup.cc'
--- src/wui/multiplayersetupgroup.cc	2016-01-24 20:11:53 +0000
+++ src/wui/multiplayersetupgroup.cc	2016-01-28 21:30:20 +0000
@@ -58,7 +58,7 @@
 		name = new UI::Textarea
 			(this, 0, 0, w - h - UI::Scrollbar::Size * 11 / 5, h);
 		name->set_textstyle(UI::TextStyle::makebold(font, UI_FONT_CLR_FG));
-		add(name, UI::Box::AlignCenter);
+		add(name, UI::Align::kHCenter);
 		// Either Button if changeable OR text if not
 		if (id == settings->settings().usernum) { // Our Client
 			type = new UI::Button
@@ -69,12 +69,12 @@
 			type->sigclicked.connect
 				(boost::bind
 					 (&MultiPlayerClientGroup::toggle_type, boost::ref(*this)));
-			add(type, UI::Box::AlignCenter);
+			add(type, UI::Align::kHCenter);
 		} else { // just a shown client
 			type_icon = new UI::Icon
 				(this, 0, 0, h, h,
 				 g_gr->images().get("pics/menu_tab_watch.png"));
-			add(type_icon, UI::Box::AlignCenter);
+			add(type_icon, UI::Align::kHCenter);
 		}
 
 	}
@@ -175,7 +175,7 @@
 										 % static_cast<unsigned int>(id + 1)).str();
 		player =
 			new UI::Icon(this, 0, 0, h, h, g_gr->images().get(pic));
-		add(player, UI::Box::AlignCenter);
+		add(player, UI::Align::kHCenter);
 		type = new UI::Button
 			(this, "player_type",
 			 0, 0, h, h,
@@ -184,7 +184,7 @@
 		type->sigclicked.connect
 			(boost::bind
 				 (&MultiPlayerPlayerGroup::toggle_type, boost::ref(*this)));
-		add(type, UI::Box::AlignCenter);
+		add(type, UI::Align::kHCenter);
 		tribe = new UI::Button
 			(this, "player_tribe",
 			 0, 0, h, h,
@@ -193,7 +193,7 @@
 		tribe->sigclicked.connect
 			(boost::bind
 				 (&MultiPlayerPlayerGroup::toggle_tribe, boost::ref(*this)));
-		add(tribe, UI::Box::AlignCenter);
+		add(tribe, UI::Align::kHCenter);
 		tribe->set_draw_flat_background(true);
 		init = new UI::Button
 			(this, "player_init",
@@ -203,7 +203,7 @@
 		init->sigclicked.connect
 			(boost::bind
 				 (&MultiPlayerPlayerGroup::toggle_init, boost::ref(*this)));
-		add(init, UI::Box::AlignCenter);
+		add(init, UI::Align::kHCenter);
 		team = new UI::Button
 			(this, "player_team",
 			 0, 0, h, h,
@@ -212,7 +212,7 @@
 		team->sigclicked.connect
 			(boost::bind
 				 (&MultiPlayerPlayerGroup::toggle_team, boost::ref(*this)));
-		add(team, UI::Box::AlignCenter);
+		add(team, UI::Align::kHCenter);
 	}
 
 	/// Toggle through the types
@@ -447,11 +447,11 @@
 		(new UI::Textarea
 			(this,
 			 w * 6 / 15 + buth * 3, buth / 3,
-			 w * 9 / 15 - 4 * buth, buth, UI::Align_HCenter));
+			 w * 9 / 15 - 4 * buth, buth, UI::Align::kHCenter));
 	labels.back()->set_text(_("Initialization"));
 	labels.back()->set_textstyle(tsmaller);
 
-	labels.push_back(new UI::Textarea(this, w - buth, buth / 3, buth, buth, UI::Align_Right));
+	labels.push_back(new UI::Textarea(this, w - buth, buth / 3, buth, buth, UI::Align::kRight));
 	labels.back()->set_text(_("Team"));
 	labels.back()->set_textstyle(tsmaller);
 
@@ -463,7 +463,7 @@
 			 0, 0, playerbox.get_w(), buth,
 			 s, npsb.get(),
 			 tribepics_, tribenames_);
-		playerbox.add(multi_player_player_groups.at(i), 1);
+		playerbox.add(multi_player_player_groups.at(i), UI::Align::kHCenter);
 	}
 	refresh();
 }
@@ -488,8 +488,8 @@
 	for (uint32_t i = 0; i < settings.users.size(); ++i) {
 		if (!multi_player_client_groups.at(i)) {
 			multi_player_client_groups.at(i) = new MultiPlayerClientGroup(
-			   &clientbox, i, 0, 0, clientbox.get_w(), buth_, s, UI::Font::get(fname_, fsize_));
-			clientbox.add(&*multi_player_client_groups.at(i), 1);
+				&clientbox, i, 0, 0, clientbox.get_w(), buth_, s, UI::Font::get(fname_, fsize_));
+			clientbox.add(&*multi_player_client_groups.at(i), UI::Align::kHCenter);
 		}
 		multi_player_client_groups.at(i)->refresh();
 	}

=== modified file 'src/wui/plot_area.cc'
--- src/wui/plot_area.cc	2016-01-24 20:11:53 +0000
+++ src/wui/plot_area.cc	2016-01-28 21:30:20 +0000
@@ -144,7 +144,7 @@
  */
 void draw_value(const string& value, const RGBColor& color, const Point& pos, RenderTarget & dst) {
 	const Image* pic = UI::g_fh1->render(ytick_text_style(value, color));
-	dst.blit(pos, pic, BlendMode::UseAlpha, UI::Align_CenterRight);
+	dst.blit(pos, pic, BlendMode::UseAlpha, UI::Align::kCenterRight);
 }
 
 /**
@@ -219,7 +219,7 @@
 			(xtick_text_style((boost::format("-%u ") % (max_x / how_many_ticks * i)).str()));
 		dst.blit
 			(Point(static_cast<int32_t>(posx), inner_h - space_at_bottom + 10),
-			 xtick, BlendMode::UseAlpha, UI::Align_Center);
+			 xtick, BlendMode::UseAlpha, UI::Align::kCenter);
 
 		posx -= sub;
 	}
@@ -237,7 +237,7 @@
 
 	//  print the used unit
 	const Image* xtick = UI::g_fh1->render(xtick_text_style((boost::format(get_unit_name(unit)) % "").str()));
-	dst.blit(Point(2, spacing + 2), xtick, BlendMode::UseAlpha, UI::Align_CenterLeft);
+	dst.blit(Point(2, spacing + 2), xtick, BlendMode::UseAlpha, UI::Align::kCenterLeft);
 }
 
 }  // namespace

=== modified file 'src/wui/portdockwaresdisplay.cc'
--- src/wui/portdockwaresdisplay.cc	2015-11-28 22:29:26 +0000
+++ src/wui/portdockwaresdisplay.cc	2016-01-28 21:30:20 +0000
@@ -77,15 +77,15 @@
 
 	// Add the wares queues.
 	for (WaresQueue* wq : wh.get_portdock()->expedition_bootstrap()->wares()) {
-		box.add(new WaresQueueDisplay(&box, 0, 0, igb, wh, wq, true), UI::Box::AlignLeft);
+		box.add(new WaresQueueDisplay(&box, 0, 0, igb, wh, wq, true), UI::Align::kLeft);
 	}
 
 // TODO(unknown): Implement UI for Builder + Soldiers
 // UI::Box & workers = *new UI::Box(&box, 0, 0, UI::Box::Horizontal);
-// box.add(&workers, UI::Box::AlignLeft);
+// box.add(&workers, UI::Align::kLeft);
 
 // for (uint32_t i = 0; i < wh.get_expedition_workers().size(); ++i)
-// workers.add(icon of worker, UI::Box::AlignLeft);
+// workers.add(icon of worker, UI::Align::kLeft);
 
 	return &box;
 }

=== modified file 'src/wui/productionsitewindow.cc'
--- src/wui/productionsitewindow.cc	2016-01-24 20:11:53 +0000
+++ src/wui/productionsitewindow.cc	2016-01-28 21:30:20 +0000
@@ -61,7 +61,7 @@
 		for (uint32_t i = 0; i < warequeues.size(); ++i)
 			prod_box->add
 				(new WaresQueueDisplay(prod_box, 0, 0, igbase(), ps, warequeues[i]),
-				 UI::Box::AlignLeft);
+				 UI::Align::kLeft);
 
 		get_tabs()->add
 			("wares", g_gr->images().get(pic_tab_wares),
@@ -98,12 +98,12 @@
 							 _("Terminate the employment of the selected worker"));
 			evict_button->sigclicked.connect
 					(boost::bind(&ProductionSiteWindow::evict_worker, boost::ref(*this)));
-			worker_caps_->add(evict_button, UI::Box::AlignCenter);
+			worker_caps_->add(evict_button, UI::Align::kHCenter);
 		}
 
-		worker_box->add(worker_table_, UI::Box::AlignLeft, true);
+		worker_box->add(worker_table_, UI::Align::kLeft, true);
 		worker_box->add_space(4);
-		worker_box->add(worker_caps_, UI::Box::AlignLeft, true);
+		worker_box->add(worker_caps_, UI::Align::kLeft, true);
 		get_tabs()->add
 			("workers", g_gr->images().get(pic_tab_workers),
 			 worker_box,

=== modified file 'src/wui/shipwindow.cc'
--- src/wui/shipwindow.cc	2016-01-18 19:08:41 +0000
+++ src/wui/shipwindow.cc	2016-01-28 21:30:20 +0000
@@ -100,99 +100,99 @@
 
 	m_display = new ItemWaresDisplay(vbox, *ship.get_owner());
 	m_display->set_capacity(ship.descr().get_capacity());
-	vbox->add(m_display, UI::Box::AlignCenter, false);
+	vbox->add(m_display, UI::Align::kHCenter, false);
 
 	// Expedition buttons
 	if (m_ship.state_is_expedition()) {
 		UI::Box * exp_top = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
-		vbox->add(exp_top, UI::Box::AlignCenter, false);
+		vbox->add(exp_top, UI::Align::kHCenter, false);
 		UI::Box * exp_mid = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
-		vbox->add(exp_mid, UI::Box::AlignCenter, false);
+		vbox->add(exp_mid, UI::Align::kHCenter, false);
 		UI::Box * exp_bot = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
-		vbox->add(exp_bot, UI::Box::AlignCenter, false);
+		vbox->add(exp_bot, UI::Align::kHCenter, false);
 
 		m_btn_scout[WALK_NW - 1] =
 			make_button
 				(exp_top, "scnw", _("Scout towards the north west"), pic_scout_nw,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_NW));
-		exp_top->add(m_btn_scout[WALK_NW - 1], 0, false);
+		exp_top->add(m_btn_scout[WALK_NW - 1], UI::Align::kLeft, false);
 
 		m_btn_explore_island_cw =
 			make_button
 				(exp_top, "expcw", _("Explore the island’s coast clockwise"), pic_explore_cw,
 				 boost::bind(&ShipWindow::act_explore_island, this, IslandExploreDirection::kClockwise));
-		exp_top->add(m_btn_explore_island_cw, 0, false);
+		exp_top->add(m_btn_explore_island_cw, UI::Align::kLeft, false);
 
 		m_btn_scout[WALK_NE - 1] =
 			make_button
 				(exp_top, "scne", _("Scout towards the north east"), pic_scout_ne,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_NE));
-		exp_top->add(m_btn_scout[WALK_NE - 1], 0, false);
+		exp_top->add(m_btn_scout[WALK_NE - 1], UI::Align::kLeft, false);
 
 		m_btn_scout[WALK_W - 1] =
 			make_button
 				(exp_mid, "scw", _("Scout towards the west"), pic_scout_w,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_W));
-		exp_mid->add(m_btn_scout[WALK_W - 1], 0, false);
+		exp_mid->add(m_btn_scout[WALK_W - 1], UI::Align::kLeft, false);
 
 		m_btn_construct_port =
 			make_button
 				(exp_mid, "buildport", _("Construct a port at the current location"), pic_construct_port,
 				 boost::bind(&ShipWindow::act_construct_port, this));
-		exp_mid->add(m_btn_construct_port, 0, false);
+		exp_mid->add(m_btn_construct_port, UI::Align::kLeft, false);
 
 		m_btn_scout[WALK_E - 1] =
 			make_button
 				(exp_mid, "sce", _("Scout towards the east"), pic_scout_e,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_E));
-		exp_mid->add(m_btn_scout[WALK_E - 1], 0, false);
+		exp_mid->add(m_btn_scout[WALK_E - 1], UI::Align::kLeft, false);
 
 		m_btn_scout[WALK_SW - 1] =
 			make_button
 				(exp_bot, "scsw", _("Scout towards the south west"), pic_scout_sw,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_SW));
-		exp_bot->add(m_btn_scout[WALK_SW - 1], 0, false);
+		exp_bot->add(m_btn_scout[WALK_SW - 1], UI::Align::kLeft, false);
 
 		m_btn_explore_island_ccw =
 			make_button
 				(exp_bot, "expccw", _("Explore the island’s coast counter clockwise"), pic_explore_ccw,
 				 boost::bind(&ShipWindow::act_explore_island, this, IslandExploreDirection::kCounterClockwise));
-		exp_bot->add(m_btn_explore_island_ccw, 0, false);
+		exp_bot->add(m_btn_explore_island_ccw, UI::Align::kLeft, false);
 
 		m_btn_scout[WALK_SE - 1] =
 			make_button
 				(exp_bot, "scse", _("Scout towards the south east"), pic_scout_se,
 				 boost::bind(&ShipWindow::act_scout_towards, this, WALK_SE));
-		exp_bot->add(m_btn_scout[WALK_SE - 1], 0, false);
+		exp_bot->add(m_btn_scout[WALK_SE - 1], UI::Align::kLeft, false);
 
 	}
 
 	// Bottom buttons
 	UI::Box * buttons = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
-	vbox->add(buttons, UI::Box::AlignLeft, false);
+	vbox->add(buttons, UI::Align::kLeft, false);
 
 	m_btn_goto =
 		make_button
 			(buttons, "goto", _("Go to ship"), pic_goto,
 			 boost::bind(&ShipWindow::act_goto, this));
-	buttons->add(m_btn_goto, 0, false);
+	buttons->add(m_btn_goto, UI::Align::kLeft, false);
 	m_btn_destination =
 		make_button
 			(buttons, "destination", _("Go to destination"), pic_destination,
 			 boost::bind(&ShipWindow::act_destination, this));
 	m_btn_destination->set_enabled(false);
-	buttons->add(m_btn_destination, 0, false);
+	buttons->add(m_btn_destination, UI::Align::kLeft, false);
 
 	m_btn_sink =
 		make_button
 			(buttons, "sink", _("Sink the ship"), pic_sink, boost::bind(&ShipWindow::act_sink, this));
-	buttons->add(m_btn_sink, 0, false);
+	buttons->add(m_btn_sink, UI::Align::kLeft, false);
 	if (m_ship.state_is_expedition()) {
 		m_btn_cancel_expedition =
 			make_button
 				(buttons, "cancel_expedition", _("Cancel the Expedition"), pic_cancel_expedition,
 				boost::bind(&ShipWindow::act_cancel_expedition, this));
-		buttons->add(m_btn_cancel_expedition, 0, false);
+		buttons->add(m_btn_cancel_expedition, UI::Align::kLeft, false);
 	}
 	set_center_panel(vbox);
 	set_thinks(true);

=== modified file 'src/wui/soldiercapacitycontrol.cc'
--- src/wui/soldiercapacitycontrol.cc	2015-11-28 22:29:26 +0000
+++ src/wui/soldiercapacitycontrol.cc	2016-01-28 21:30:20 +0000
@@ -68,15 +68,15 @@
 	(this, "increase", 0, 0, 32, 32,
 	 g_gr->images().get("pics/but4.png"),
 	 g_gr->images().get("pics/menu_up_train.png"), _("Increase capacity")),
-m_value(this, "199", UI::Align_Center)
+m_value(this, "199", UI::Align::kCenter)
 {
 	m_decrease.sigclicked.connect(boost::bind(&SoldierCapacityControl::click_decrease, boost::ref(*this)));
 	m_increase.sigclicked.connect(boost::bind(&SoldierCapacityControl::click_increase, boost::ref(*this)));
 
-	add(new UI::Textarea(this, _("Capacity")), AlignCenter);
-	add(&m_decrease, AlignCenter);
-	add(&m_value, AlignCenter);
-	add(&m_increase, AlignCenter);
+	add(new UI::Textarea(this, _("Capacity")), UI::Align::kHCenter);
+	add(&m_decrease, UI::Align::kHCenter);
+	add(&m_value, UI::Align::kHCenter);
+	add(&m_increase, UI::Align::kHCenter);
 
 	m_decrease.set_repeating(true);
 	m_increase.set_repeating(true);

=== modified file 'src/wui/soldierlist.cc'
--- src/wui/soldierlist.cc	2016-01-24 20:11:53 +0000
+++ src/wui/soldierlist.cc	2016-01-28 21:30:20 +0000
@@ -390,11 +390,11 @@
 m_soldierpanel(*this, igb.egbase(), building),
 m_infotext(this, _("Click soldier to send away"))
 {
-	add(&m_soldierpanel, UI::Box::AlignCenter);
+	add(&m_soldierpanel, UI::Align::kHCenter);
 
 	add_space(2);
 
-	add(&m_infotext, UI::Box::AlignCenter);
+	add(&m_infotext, UI::Align::kHCenter);
 
 	m_soldierpanel.set_mouseover(boost::bind(&SoldierList::mouseover, this, _1));
 	m_soldierpanel.set_click(boost::bind(&SoldierList::eject, this, _1));
@@ -422,7 +422,7 @@
 			(buttons, Point(32, 0), g_gr->images().get("pics/prefer_heroes.png"), _("Prefer Heroes"));
 		UI::Radiobutton* button = m_soldier_preference.get_first_button();
 		while (button) {
-			buttons->add(button, AlignLeft);
+			buttons->add(button, UI::Align::kLeft);
 			button = button->next_button();
 		}
 
@@ -440,9 +440,9 @@
 	buttons->add_inf_space();
 	buttons->add
 		(create_soldier_capacity_control(*buttons, igb, building),
-		 UI::Box::AlignRight);
+		 UI::Align::kRight);
 
-	add(buttons, UI::Box::AlignCenter, true);
+	add(buttons, UI::Align::kHCenter, true);
 }
 
 SoldierControl & SoldierList::soldiers() const

=== modified file 'src/wui/suggested_teams_box.cc'
--- src/wui/suggested_teams_box.cc	2016-01-24 20:11:53 +0000
+++ src/wui/suggested_teams_box.cc	2016-01-28 21:30:20 +0000
@@ -43,9 +43,8 @@
 	suggested_teams_.clear();
 	set_size(max_x, max_y);
 
-	suggested_teams_box_label_ =
-			new UI::Textarea(this, "", UI::Align_CenterLeft);
-	add(suggested_teams_box_label_, UI::Box::AlignLeft);
+	suggested_teams_box_label_ = new UI::Textarea(this, "", UI::Align::kCenterLeft);
+	add(suggested_teams_box_label_, UI::Align::kLeft);
 }
 SuggestedTeamsBox::~SuggestedTeamsBox() {
 	SuggestedTeamsBox::hide();
@@ -105,8 +104,8 @@
 
 				if (!is_first) {
 					lineup_box_->add_space(padding_);
-					vs_label = new UI::Textarea(lineup_box_, "x", UI::Align_BottomCenter);
-					lineup_box_->add(vs_label, UI::Box::AlignLeft);
+					vs_label = new UI::Textarea(lineup_box_, "x", UI::Align::kBottomCenter);
+					lineup_box_->add(vs_label, UI::Align::kLeft);
 					vs_label->set_visible(true);
 					vs_labels_.push_back(vs_label);
 					lineup_box_->add_space(padding_);
@@ -121,7 +120,7 @@
 																	 g_gr->images().get(player_filename));
 					player_icon->set_visible(true);
 					player_icon->set_no_frame();
-					lineup_box_->add(player_icon, UI::Box::AlignLeft);
+					lineup_box_->add(player_icon, UI::Align::kLeft);
 					player_icons_.push_back(player_icon);
 				} // Players in team
 			} // Teams in lineup

=== modified file 'src/wui/transport_ui.cc'
--- src/wui/transport_ui.cc	2016-01-24 20:11:53 +0000
+++ src/wui/transport_ui.cc	2016-01-28 21:30:20 +0000
@@ -124,10 +124,10 @@
 			display_(this, 0, 0, economy.owner().tribe(), Widelands::wwWARE, can_act_, economy),
 			economy_(economy)
 		{
-			add(&display_, UI::Box::AlignLeft, true);
+			add(&display_, UI::Align::kLeft, true);
 
 			UI::Box * buttons = new UI::Box(this, 0, 0, UI::Box::Horizontal);
-			add(buttons, UI::Box::AlignLeft);
+			add(buttons, UI::Align::kLeft);
 
 			UI::Button * b = nullptr;
 
@@ -138,7 +138,7 @@
 		  g_gr->images().get("pics/but4.png"),            \
 		  text, tooltip, can_act_);                                \
 	b->sigclicked.connect(boost::bind(&EconomyOptionsWarePanel::callback, this)); \
-	buttons->add(b, UI::Box::AlignCenter);
+    buttons->add(b, UI::Align::kHCenter);
 			ADD_WARE_BUTTON(decrease_target, "-", _("Decrease target"))
 			b->set_repeating(true);
 			ADD_WARE_BUTTON(increase_target, "+", _("Increase target"))
@@ -207,10 +207,10 @@
 			display_(this, 0, 0, economy.owner().tribe(), Widelands::wwWORKER, can_act_, economy),
 			economy_(economy)
 		{
-			add(&display_, UI::Box::AlignLeft, true);
+			add(&display_, UI::Align::kLeft, true);
 
 			UI::Box * buttons = new UI::Box(this, 0, 0, UI::Box::Horizontal);
-			add(buttons, UI::Box::AlignLeft);
+			add(buttons, UI::Align::kLeft);
 
 			UI::Button * b = nullptr;
 #define ADD_WORKER_BUTTON(callback, text, tooltip)                  \
@@ -220,7 +220,7 @@
 		  g_gr->images().get("pics/but4.png"),              \
 		  text, tooltip, can_act_);                                  \
 	b->sigclicked.connect(boost::bind(&EconomyOptionsWorkerPanel::callback, this)); \
-	buttons->add(b, UI::Box::AlignCenter);
+    buttons->add(b, UI::Align::kHCenter);
 
 			ADD_WORKER_BUTTON(decrease_target, "-", _("Decrease target"))
 			b->set_repeating(true);

=== modified file 'src/wui/ware_statistics_menu.cc'
--- src/wui/ware_statistics_menu.cc	2016-01-27 08:06:40 +0000
+++ src/wui/ware_statistics_menu.cc	2016-01-28 21:30:20 +0000
@@ -210,7 +210,7 @@
 	tabs->activate(0);
 
 	//add tabbed environment to box
-	box->add(tabs, UI::Box::AlignLeft, true);
+	box->add(tabs, UI::Align::kLeft, true);
 
 	//register statistics data
 	for (Widelands::DescriptionIndex cur_ware = 0; cur_ware < nr_wares; ++cur_ware) {
@@ -249,14 +249,13 @@
 			(box, 0, 0, parent.get_player()->tribe(),
 			 boost::bind(&WareStatisticsMenu::cb_changed_to, boost::ref(*this), _1, _2),
 			 color_map_),
-		 UI::Box::AlignLeft, true);
-
+		 UI::Align::kLeft, true);
 	box->add
 		(new WuiPlotGenericAreaSlider
 			(this, *plot_production_, this,
 			0, 0, 100, 45,
 			g_gr->images().get("pics/but1.png")),
-		 UI::Box::AlignLeft, true);
+		 UI::Align::kLeft, true);
 
 }
 

=== modified file 'src/wui/warehousewindow.cc'
--- src/wui/warehousewindow.cc	2016-01-24 20:11:53 +0000
+++ src/wui/warehousewindow.cc	2016-01-28 21:30:20 +0000
@@ -128,12 +128,12 @@
 	type_(type),
 	display_(this, width, wh_, type_, can_act_)
 {
-	add(&display_, UI::Box::AlignLeft, true);
+	add(&display_, UI::Align::kLeft, true);
 
 	if (can_act_) {
 		UI::Box * buttons = new UI::Box(this, 0, 0, UI::Box::Horizontal);
 		UI::Button * b;
-		add(buttons, UI::Box::AlignLeft);
+		add(buttons, UI::Align::kLeft);
 
 #define ADD_POLICY_BUTTON(policy, policyname, tooltip)                                           \
 		b = new UI::Button                                                             \
@@ -143,7 +143,7 @@
 			 tooltip),                                                                        \
 		b->sigclicked.connect \
 			(boost::bind(&WarehouseWaresPanel::set_policy, this, Warehouse::SP_##policyname)), \
-		buttons->add(b, UI::Box::AlignCenter);
+        buttons->add(b, UI::Align::kHCenter);
 
 		ADD_POLICY_BUTTON(normal, Normal, _("Normal policy"))
 		ADD_POLICY_BUTTON(prefer, Prefer, _("Preferably store selected wares here"))

=== modified file 'src/wui/waresdisplay.cc'
--- src/wui/waresdisplay.cc	2016-01-24 20:11:53 +0000
+++ src/wui/waresdisplay.cc	2016-01-28 21:30:20 +0000
@@ -56,7 +56,7 @@
 	curware_
 		(this,
 		 0, get_inner_h() - 25, get_inner_w(), 20,
-		 "", UI::Align_Center),
+		 "", UI::Align::kCenter),
 
 	selectable_(selectable),
 	horizontal_(horizontal),


References