|
TGUI
0.8.9
|
Base class for Widget which provides functionality to connect signals based on their name. More...
#include <TGUI/Signal.hpp>
Public Member Functions | |
| template<typename Func , typename... Args, typename std::enable_if< std::is_convertible< Func, std::function< void(const Args &...)> >::value >::type * = nullptr> | |
| unsigned int | connect (std::string signalName, Func &&handler, const Args &... args) |
| Connects a signal handler that will be called when this signal is emitted. More... | |
| template<typename Func , typename... BoundArgs, typename std::enable_if<!std::is_convertible< Func, std::function< void(const BoundArgs &...)> >::value &&std::is_convertible< Func, std::function< void(const BoundArgs &..., std::shared_ptr< Widget >, const std::string &)> >::value , ::type * = nullptr> | |
| unsigned int | connect (std::string signalName, Func &&handler, BoundArgs &&... args) |
| Connects a signal handler that will be called when this signal is emitted. More... | |
| template<typename Func , typename... BoundArgs, typename std::enable_if<!std::is_convertible< Func, std::function< void(const BoundArgs &...)> >::value &&!std::is_convertible< Func, std::function< void(const BoundArgs &..., std::shared_ptr< Widget >, const std::string &)> >::value , ::type * = nullptr> | |
| unsigned int | connect (std::string signalName, Func &&handler, BoundArgs &&... args) |
| Connects a signal handler that will be called when this signal is emitted. More... | |
| template<typename Func , typename... BoundArgs> | |
| unsigned int | connect (std::initializer_list< std::string > signalNames, Func &&handler, BoundArgs &&... args) |
| Connect a signal handler to multiple signals. More... | |
| bool | disconnect (unsigned int id) |
| Disconnects a signal handler. More... | |
| void | disconnectAll (std::string signalName) |
| Disconnects all signal handler from a certain signal. More... | |
| void | disconnectAll () |
| Disconnects all signal handlers from signals. | |
| virtual Signal & | getSignal (std::string signalName)=0 |
| Retrieves a signal based on its name. | |
Base class for Widget which provides functionality to connect signals based on their name.
| unsigned int tgui::SignalWidgetBase::connect | ( | std::initializer_list< std::string > | signalNames, |
| Func && | handler, | ||
| BoundArgs &&... | args | ||
| ) |
Connect a signal handler to multiple signals.
| signalNames | List of signal names that will trigger the signal handler |
| handler | Callback function |
| args | Optional extra arguments to pass to the signal handler when the signal is emitted |
| unsigned int tgui::SignalWidgetBase::connect | ( | std::string | signalName, |
| Func && | handler, | ||
| BoundArgs &&... | args | ||
| ) |
Connects a signal handler that will be called when this signal is emitted.
| signalName | Name of the signal |
| handler | Callback function that is given a pointer to the widget, the name of the signal and the extra arguments provided to this function as arguments |
| args | Optional extra arguments to pass to the signal handler when the signal is emitted |
| unsigned int tgui::SignalWidgetBase::connect | ( | std::string | signalName, |
| Func && | handler, | ||
| BoundArgs &&... | args | ||
| ) |
Connects a signal handler that will be called when this signal is emitted.
| signalName | Name of the signal |
| handler | Callback function |
| args | Optional extra arguments to pass to the signal handler when the signal is emitted |
| unsigned int tgui::SignalWidgetBase::connect | ( | std::string | signalName, |
| Func && | handler, | ||
| const Args &... | args | ||
| ) |
Connects a signal handler that will be called when this signal is emitted.
| signalName | Name of the signal |
| handler | Callback function that is given the extra arguments provided to this function as arguments |
| args | Optional extra arguments to pass to the signal handler when the signal is emitted |
| bool tgui::SignalWidgetBase::disconnect | ( | unsigned int | id | ) |
Disconnects a signal handler.
| id | Id of the connection |
| void tgui::SignalWidgetBase::disconnectAll | ( | std::string | signalName | ) |
Disconnects all signal handler from a certain signal.
| signalName | Name of the signal |