00001 /* $Id: password_box.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2008 - 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/window_builder/password_box.hpp" 00019 00020 #include "config.hpp" 00021 #include "gui/auxiliary/log.hpp" 00022 #include "gui/widgets/password_box.hpp" 00023 00024 00025 namespace gui2 { 00026 00027 namespace implementation { 00028 00029 tbuilder_password_box::tbuilder_password_box(const config& cfg) 00030 : tbuilder_control(cfg) 00031 , history_(cfg["history"]) 00032 { 00033 } 00034 00035 twidget* tbuilder_password_box::build() const 00036 { 00037 tpassword_box* widget = new tpassword_box(); 00038 00039 init_control(widget); 00040 00041 // A password box doesn't have a label but a text. 00042 // It also has no history. 00043 widget->set_value(label); 00044 00045 DBG_GUI_G << "Window builder: placed password box '" 00046 << id << "' with definition '" 00047 << definition << "'.\n"; 00048 00049 return widget; 00050 } 00051 00052 } // namespace implementation 00053 00054 } // namespace gui2 00055 00056 /*WIKI 00057 * @page = GUIWidgetInstanceWML 00058 * @order = 2_password_box 00059 * 00060 * == Password box == 00061 * 00062 * @begin{parent}{name="gui/window/resolution/grid/row/column/"} 00063 * @begin{tag}{name="password_box"}{min=0}{max=-1}{super="generic/widget_instance"} 00064 * @begin{table}{config} 00065 * label & t_string & "" & The initial text of the password box. $ 00066 * @end{table} 00067 * @end{tag}{name="password_box"} 00068 * @end{parent}{name="gui/window/resolution/grid/row/column/"} 00069 */ 00070
| Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:43 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |