mousetrap v0.2.0
Loading...
Searching...
No Matches
mousetrap::has_signal_close_request< T > Class Template Reference

Window is asked to close, usually by the user pressing the close button in the windows headerbar. More...

#include <signal_component.hpp>

Public Member Functions

template<typename Function_t , typename Data_t >
void connect_signal_close_request (Function_t f, Data_t data)
 connect handler, will be invoked when signal is emitted. Data is passed to the signal handler function
 
template<typename Function_t >
void connect_signal_close_request (Function_t f)
 connect handler, will be invoked when signal is emitted
 
void set_signal_close_request_blocked (bool b)
 
bool get_signal_close_request_blocked () const
 
void emit_signal_close_request ()
 invoke signal handler manually
 
void disconnect_signal_close_request ()
 

Static Public Attributes

static const char * signal_id = "close-request"
 glib ID
 

Protected Member Functions

 has_signal_close_request (T *instance)
 

Detailed Description

template<typename T>
class mousetrap::has_signal_close_request< T >

Window is asked to close, usually by the user pressing the close button in the windows headerbar.

Template Parameters
Tinstance type

Member Function Documentation

◆ connect_signal_close_request() [1/2]

template<typename T >
template<typename Function_t >
void mousetrap::has_signal_close_request< T >::connect_signal_close_request ( Function_t  f)
inline

connect handler, will be invoked when signal is emitted

Parameters
ffunction with signature (T&) -> mousetrap::WindowCloseRequestResult

◆ connect_signal_close_request() [2/2]

template<typename T >
template<typename Function_t , typename Data_t >
void mousetrap::has_signal_close_request< T >::connect_signal_close_request ( Function_t  f,
Data_t  data 
)
inline

connect handler, will be invoked when signal is emitted. Data is passed to the signal handler function

Parameters
ffunction with signature (T&, Data_t) -> mousetrap::WindowCloseRequestResult
dataarbitrary data

◆ emit_signal_close_request()

template<typename T >
void mousetrap::has_signal_close_request< T >::emit_signal_close_request ( )
inline

invoke signal handler manually


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