gui/auxiliary/widget_definition/window.cpp

Go to the documentation of this file.
00001 /* $Id: window.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/window.hpp"
00019 
00020 #include "gui/auxiliary/log.hpp"
00021 
00022 namespace gui2 {
00023 
00024 twindow_definition::twindow_definition(const config& cfg)
00025     : tcontrol_definition(cfg)
00026 {
00027 /*WIKI
00028  * @page = GUIWidgetDefinitionWML
00029  * @order = 1_window
00030  *
00031  * == Window ==
00032  *
00033  * The definition of a window. A window is a kind of panel see the panel for
00034  * which fields exist
00035  *
00036  * @begin{parent}{name="gui/"}
00037  * @begin{tag}{name="window_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
00038  * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/panel_definition/resolution"}
00039  * @allow{link}{name="gui/window/resolution/grid"}
00040  * @allow{link}{name="gui/panel_definition/resolution/background"}
00041  * @allow{link}{name="gui/panel_definition/resolution/foreground"}
00042  * @end{tag}{name="resolution"}
00043  * @end{tag}{name="window_definition"}
00044  * @end{parent}{name="gui/"}
00045  */
00046 
00047     DBG_GUI_P << "Parsing window " << id << '\n';
00048 
00049     load_resolutions<tresolution>(cfg);
00050 }
00051 
00052 twindow_definition::tresolution::tresolution(const config& cfg)
00053     : tpanel_definition::tresolution(cfg)
00054     , grid(NULL)
00055 {
00056     const config &child = cfg.child("grid");
00057 //  VALIDATE(child, _("No grid defined."));
00058 
00059     /** @todo Evaluate whether the grid should become mandatory. */
00060     if(child) {
00061         grid = new tbuilder_grid(child);
00062     }
00063 }
00064 
00065 } // namespace gui2
00066 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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