00001 /* $Id: progress_bar.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2010 - 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/progress_bar.hpp" 00019 00020 #include "gui/auxiliary/log.hpp" 00021 00022 namespace gui2 { 00023 00024 tprogress_bar_definition::tprogress_bar_definition(const config& cfg) 00025 : tcontrol_definition(cfg) 00026 { 00027 DBG_GUI_P << "Parsing progress bar " << id << '\n'; 00028 00029 load_resolutions<tresolution>(cfg); 00030 } 00031 00032 tprogress_bar_definition::tresolution::tresolution(const config& cfg) 00033 : tresolution_definition_(cfg) 00034 { 00035 /*WIKI 00036 * @page = GUIWidgetDefinitionWML 00037 * @order = 1_progress_bar 00038 * 00039 * == Progress bar == 00040 * 00041 * @macro = progress_bar_description 00042 * 00043 * The definition of a progress bar. This object shows the progress of a certain 00044 * action, or the value state of a certain item. 00045 * 00046 * The following states exist: 00047 * * state_enabled, the progress bar is enabled. 00048 * @begin{parent}{name="gui/"} 00049 * @begin{tag}{name="progress_bar_definition"}{min=0}{max=-1}{super="generic/widget_definition"} 00050 * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} 00051 * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} 00052 * @end{tag}{name="state_enabled"} 00053 * @end{tag}{name="resolution"} 00054 * @end{tag}{name="progress_bar_definition"} 00055 * @end{parent}{name="gui/"} 00056 */ 00057 00058 // Note the order should be the same as the enum tstate in progress_bar.hpp. 00059 state.push_back(tstate_definition(cfg.child("state_enabled"))); 00060 } 00061 00062 } // namespace gui2 00063
| Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:42 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |