Contains the gui2 timer routines. More...
#include <boost/function.hpp>#include <SDL_types.h>

Go to the source code of this file.
Namespaces | |
| namespace | gui2 |
A class inherited from ttext_box that displays its input as stars. | |
Functions | |
| unsigned long | gui2::add_timer (const Uint32 interval, const boost::function< void(unsigned long id)> &callback, const bool repeat=false) |
| Adds a new timer. | |
| bool | gui2::remove_timer (const unsigned long id) |
| Removes a timer. | |
| bool | gui2::execute_timer (const unsigned long id) |
| Executes a timer. | |
Contains the gui2 timer routines.
This code avoids the following problems with the sdl timers:
With these functions it's possible to remove the event between pushing in the queue and the actual execution. Since the callback is a boost::function object it's possible to make the callback as fancy as wanted.
Definition in file timer.hpp.
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:38 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |