TGUI  0.8.1
tgui::SignalMenuItem Class Reference

Signal to which the user can subscribe to get callbacks from. More...

#include <TGUI/Signal.hpp>

Inheritance diagram for tgui::SignalMenuItem:
tgui::Signal

Public Member Functions

 SignalMenuItem (std::string &&name)
 Constructor.
 
 TGUI_DEPRECATED ("Use connect function from widget instead") unsigned int connect(const DelegateMenuItem &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
 TGUI_DEPRECATED ("Use connect function from widget instead") unsigned int connect(const DelegateMenuItemEx &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
 TGUI_DEPRECATED ("Use connect function from widget instead") unsigned int connect(const DelegateMenuItemFull &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
 TGUI_DEPRECATED ("Use connect function from widget instead") unsigned int connect(const DelegateMenuItemFullEx &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
unsigned int connect (const Delegate &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
unsigned int connect (const DelegateEx &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
- Public Member Functions inherited from tgui::Signal
 Signal (std::string &&name, std::size_t extraParameters=0)
 Constructor. More...
 
 Signal (const Signal &other)
 Copy constructor which will not copy the signal handlers.
 
 Signal (Signal &&other)=default
 Default move constructor.
 
Signaloperator= (const Signal &other)
 Copy assignment operator which will not copy the signal handlers.
 
Signaloperator= (Signal &&other)=default
 Default move assignment operator.
 
unsigned int connect (const Delegate &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
unsigned int connect (const DelegateEx &handler)
 Connects a signal handler that will be called when this signal is emitted. More...
 
bool disconnect (unsigned int id)
 Disconnect a signal handler from this signal. More...
 
void disconnectAll ()
 Disconnect all signal handler from this signal.
 
bool emit (const Widget *widget)
 Call all connected signal handlers. More...
 
std::string getName () const
 Returns the name given to the signal. More...
 

Detailed Description

Signal to which the user can subscribe to get callbacks from.

Member Function Documentation

◆ connect() [1/2]

unsigned int tgui::Signal::connect

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function
Returns
Unique id of the connection

◆ connect() [2/2]

unsigned int tgui::Signal::connect

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function that is given a pointer to the widget and the name of the signal as arguments
Returns
Unique id of the connection

◆ TGUI_DEPRECATED() [1/4]

tgui::SignalMenuItem::TGUI_DEPRECATED ( "Use connect function from widget instead"  ) const &

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function that is given a string as argument
Returns
Unique id of the connection

◆ TGUI_DEPRECATED() [2/4]

tgui::SignalMenuItem::TGUI_DEPRECATED ( "Use connect function from widget instead"  ) const &

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function that is given a pointer to the widget, the name of the signal and a string as arguments
Returns
Unique id of the connection

◆ TGUI_DEPRECATED() [3/4]

tgui::SignalMenuItem::TGUI_DEPRECATED ( "Use connect function from widget instead"  ) const &

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function that is given a list of strings as argument
Returns
Unique id of the connection

◆ TGUI_DEPRECATED() [4/4]

tgui::SignalMenuItem::TGUI_DEPRECATED ( "Use connect function from widget instead"  ) const &

Connects a signal handler that will be called when this signal is emitted.

Parameters
handlerCallback function that is given a pointer to the widget, the name of the signal and a list of strings as arguments
Returns
Unique id of the connection

The documentation for this class was generated from the following file: