The Battle for Wesnoth  1.19.0-dev
Namespaces | Functions
find_widget.hpp File Reference
#include "gui/widgets/helper.hpp"
#include "gui/widgets/widget.hpp"
#include "utils/const_clone.hpp"
#include "wml_exception.hpp"
Include dependency graph for find_widget.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gui2
 Generic file dialog.
 

Functions

template<class T >
T & gui2::get_parent (widget &child)
 Returns the first parent of a widget with a certain type. More...
 
template<class T >
T * gui2::find_widget (utils::const_clone_ptr< widget, T > widget, const std::string &id, const bool must_be_active, const bool must_exist)
 Gets a widget with the wanted id. More...
 
template<class T >
T & gui2::find_widget (utils::const_clone_ptr< widget, T > widget, const std::string &id, const bool must_be_active)
 Gets a widget with the wanted id. More...
 
template<typename T >
void gui2::on_widget (utils::const_clone_ptr< widget, T > parent, const std::string &id, std::function< void(T &)> func)