gui/auxiliary/window_builder/repeating_button.cpp

Go to the documentation of this file.
00001 /* $Id: repeating_button.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2009 - 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/repeating_button.hpp"
00019 
00020 #include "config.hpp"
00021 #include "gui/auxiliary/log.hpp"
00022 #include "gui/widgets/repeating_button.hpp"
00023 
00024 namespace gui2 {
00025 
00026 namespace implementation {
00027 
00028 tbuilder_repeating_button::tbuilder_repeating_button(const config& cfg)
00029     : tbuilder_control(cfg)
00030 {
00031 }
00032 
00033 twidget* tbuilder_repeating_button::build() const
00034 {
00035     trepeating_button* widget = new trepeating_button();
00036 
00037     init_control(widget);
00038 
00039     DBG_GUI_G << "Window builder: placed repeating button '"
00040             << id << "' with definition '"
00041             << definition << "'.\n";
00042 
00043     return widget;
00044 }
00045 
00046 } // namespace implementation
00047 
00048 } // namespace gui2
00049 
00050 /*WIKI_MACRO
00051  * @begin{macro}{repeating_button_description}
00052  *
00053  *        A repeating_button is a control that can be pushed down and repeat a
00054  *        certain action. Once the button is down every x milliseconds it is
00055  *        down a new down event is triggered.
00056  * @end{macro}
00057  */
00058 
00059 /*WIKI
00060  * @page = GUIWidgetInstanceWML
00061  * @order = 2_repeating_button
00062  *
00063  * == Repeating button ==
00064  *
00065  * @macro = repeating_button_description
00066  * @begin{parent}{name="gui/window/resolution/grid/row/column/"}
00067  * @begin{tag}{name="repeating_button"}{min=0}{max=-1}{super="gui/window/resolution/grid/row/column/button"}
00068  * @end{tag}{name="repeating_button"}
00069  * @end{parent}{name="gui/window/resolution/grid/row/column/"}
00070  */
 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