42 result =
dynamic_cast<T*
>(
w);
44 }
while(
w && !result);
71 const std::string&
id,
72 const bool must_be_active,
73 const bool must_exist)
75 T* result =
dynamic_cast<T*
>(
widget->
find(
id, must_be_active));
98 const std::string&
id,
99 const bool must_be_active)
101 return *find_widget<T>(
widget,
id, must_be_active,
true);
107 if(
auto widget = find_widget<T>(parent,
id,
false,
false)) {
T & get_parent(widget &child)
Returns the first parent of a widget with a certain type.
NOT_DANGLING T * 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.
t_string missing_widget(const std::string &id)
Returns a default error message if a mandatory widget is omitted.
void on_widget(utils::const_clone_ptr< widget, T > parent, const std::string &id, std::function< void(T &)> func)
typename const_clone< D, S >::pointer const_clone_ptr
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE(cond, message)
The macro to use for the validation of WML.