gui/auxiliary/widget_definition/multi_page.cpp

Go to the documentation of this file.
00001 /* $Id: multi_page.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2007 - 2012 by Mark de Wever <koraq@xs4all.nl>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 #define GETTEXT_DOMAIN "wesnoth-lib"
00017 
00018 #include "gui/auxiliary/widget_definition/multi_page.hpp"
00019 
00020 #include "gettext.hpp"
00021 #include "gui/auxiliary/log.hpp"
00022 #include "wml_exception.hpp"
00023 
00024 namespace gui2 {
00025 
00026 tmulti_page_definition::tmulti_page_definition(const config& cfg)
00027     : tcontrol_definition(cfg)
00028 {
00029     DBG_GUI_P << "Parsing multipage " << id << '\n';
00030 
00031     load_resolutions<tresolution>(cfg);
00032 }
00033 
00034 tmulti_page_definition::tresolution::tresolution(const config& cfg)
00035     : tresolution_definition_(cfg)
00036     , grid(NULL)
00037 {
00038 /*WIKI
00039  * @page = GUIWidgetDefinitionWML
00040  * @order = 1_multi_page
00041  *
00042  * == Multi page ==
00043  *
00044  * @begin{parent}{name="gui/"}
00045  * @begin{tag}{name="multi_page_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
00046  * @macro = multi_page_description
00047  *
00048  * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
00049  * @begin{table}{config}
00050  *     grid & grid & &                    A grid containing the widgets for main
00051  *                                     widget. $
00052  * @end{table}
00053  * @allow{link}{name="gui/window/resolution/grid"}
00054  * @end{tag}{name="resolution"}
00055  * @end{tag}{name="multi_page_definition"}
00056  * @end{parent}{name="gui/"}
00057  * A multipage has no states.
00058  */
00059 
00060     const config &child = cfg.child("grid");
00061     VALIDATE(child, _("No grid defined."));
00062 
00063     grid = new tbuilder_grid(child);
00064 }
00065 
00066 } // namespace gui2
00067 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:41 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs