The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Namespaces | Functions
status_label_helper.hpp File Reference
#include "gettext.hpp"
#include "gui/core/event/dispatcher.hpp"
#include "gui/widgets/menu_button.hpp"
#include "gui/widgets/selectable_item.hpp"
#include "gui/widgets/styled_widget.hpp"
#include <functional>
Include dependency graph for status_label_helper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gui2
 Generic file dialog.
 
namespace  gui2::implementation
 

Functions

template<typename T >
t_string gui2::implementation::get_status_label (const T &w)
 
auto & gui2::implementation::find_target (std::string_view target_id, widget &source)
 Searches for the status target, starting with the source widget's parent.
 
auto & gui2::implementation::validate_target (styled_widget *target, widget &source)
 Returns the dereferenced target pointer if valid, else the default target.
 
template<typename W , typename F >
void gui2::bind_status_label (W &source, const F &value_getter, styled_widget *target_ptr=nullptr)
 Binds a given target widget to reflect another widget's label.
 
template<typename W >
void gui2::bind_default_status_label (W &source)
 Binds a status label using the default value getter and default target ID.
 
template<typename W >
void gui2::bind_default_status_label (W &source, std::string_view target_id)
 Binds a status label using the default value getter and the given ID.