glibmm: Glib::SignalProxy< R, T > Class Template Reference

Proxy for signals with any number of arguments. More...

#include <glibmm/signalproxy.h>

Inheritance diagram for Glib::SignalProxy< R, T >:

Public Types

using SlotType = sigc::slot< R, T...>
 
using VoidSlotType = sigc::slot< void, T...>
 

Public Member Functions

 SignalProxy (ObjectBase* obj, const SignalProxyInfo* info)
 
sigc::connection connect (const SlotType& slot, bool after=true)
 Connects a signal handler to a signal. More...

 
sigc::connection connect (SlotType&& slot, bool after=true)
 Connects a signal handler to a signal. More...

 
sigc::connection connect_notify (const VoidSlotType& slot, bool after=false)
 Connects a signal handler without a return value to a signal. More...

 
sigc::connection connect_notify (VoidSlotType&& slot, bool after=false)
 Connects a signal handler without a return value to a signal. More...

 
- Public Member Functions inherited from Glib::SignalProxyNormal
 ~SignalProxyNormal () noexcept
 
void emission_stop ()
 Stops the current signal emission (not in libsigc++) More...

 
- Public Member Functions inherited from Glib::SignalProxyBase
 SignalProxyBase (Glib::ObjectBase* obj)
 

Additional Inherited Members

- Protected Member Functions inherited from Glib::SignalProxyNormal
 SignalProxyNormal (Glib::ObjectBase* obj, const SignalProxyInfo* info)
 Creates a proxy for a signal that can be emitted by obj. More...

 
sigc::slot_baseconnect_ (const sigc::slot_base& slot, bool after)
 Connects a generic signal handler to a signal. More...

 
sigc::slot_baseconnect_notify_ (const sigc::slot_base& slot, bool after)
 Connects a signal handler without a return value to a signal. More...

 
sigc::slot_baseconnect_impl_ (bool notify, sigc::slot_base&& slot, bool after)
 Connects a signal handler to a signal. More...

 
- Protected Attributes inherited from Glib::SignalProxyBase
ObjectBaseobj_
 

Detailed Description

template<class R, class... T>

class Glib::SignalProxy< R, T >

Proxy for signals with any number of arguments.

Use the connect() or connect_notify() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signal handlers to signals.

Member Typedef Documentation

template <class R , class... T>
using Glib::SignalProxy< R, T >::SlotType = sigc::slot<R, T...>
template <class R , class... T>
using Glib::SignalProxy< R, T >::VoidSlotType = sigc::slot<void, T...>

Constructor & Destructor Documentation

template <class R , class... T>
Glib::SignalProxy< R, T >::SignalProxy ( ObjectBase obj,
const SignalProxyInfo *  info 
)
inline

Member Function Documentation

template <class R , class... T>
sigc::connection Glib::SignalProxy< R, T >::connect ( const SlotType slot,
bool  after = true 
)
inline

Connects a signal handler to a signal.

For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );

Parameters
slotThe signal handler, usually created with sigc::mem_fun() or sigc::ptr_fun().
afterWhether this signal handler should be called before or after the default signal handler.
template <class R , class... T>
sigc::connection Glib::SignalProxy< R, T >::connect ( SlotType&&  slot,
bool  after = true 
)
inline

Connects a signal handler to a signal.

See also
connect(const SlotType& slot, bool after).
Since glibmm 2.48:
template <class R , class... T>
sigc::connection Glib::SignalProxy< R, T >::connect_notify ( const VoidSlotType slot,
bool  after = false 
)
inline

Connects a signal handler without a return value to a signal.

By default, the signal handler will be called before the default signal handler.

For instance, connect_notify( sigc::mem_fun(*this, &TheClass::on_something) );

If the signal requires signal handlers with a void return type, the only difference between connect() and connect_notify() is the default value of after.

If the signal requires signal handlers with a return value of type T, connect_notify() binds return T() to the connected signal handler. For instance, if the return type is bool, the following two calls are equivalent.

connect_notify( sigc::mem_fun(*this,& TheClass::on_something) );
connect( sigc::bind_return<bool>(sigc::mem_fun(*this, &TheClass::on_something), false), false
);
Parameters
slotThe signal handler, which should have a void return type, usually created with sigc::mem_fun() or sigc::ptr_fun().
afterWhether this signal handler should be called before or after the default signal handler.
template <class R , class... T>
sigc::connection Glib::SignalProxy< R, T >::connect_notify ( VoidSlotType&&  slot,
bool  after = false 
)
inline

Connects a signal handler without a return value to a signal.

See also
connect_notify(const VoidSlotType& slot, bool after).
Since glibmm 2.48: