Wt: Wt::EventSignalBase Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::EventSignalBase Class Referenceabstract
Signal/slot system

Abstract base class of an event signal. More...

`#include <WSignal.h>`

Inheritance diagram for Wt::EventSignalBase:
[legend]

## Public Member Functions
const char * | name () const
| Returns the event name.
virtual bool | isConnected () const override
| Returns whether this signal is connected.
void | disconnect (JSlot &slot)
| Disconnects a JSlot.
void | preventDefaultAction (bool prevent=true)
| Prevents the default browser action.
bool | defaultActionPrevented () const
| Returns whether the default browser action is prevented.
void | preventPropagation (bool prevent=true)
| Prevents event propagation.
bool | propagationPrevented () const
| Returns whether event propagation is prevented.
virtual Wt::Signals::connection | connect (WObject *target, WObject::Method method)=0
| Connects to a slot.
template<class T , class V >
Wt::Signals::connection | connect (T *target, void(V::*method)())
| Connects to a slot.
Public Member Functions inherited from Wt::SignalBase
template<class T , class V >
Wt::Signals::connection | connect (T *target, void(V::*method)())
| Connects to a slot.

## Detailed Description

Abstract base class of an event signal.

An event signal is directly associated with a user-interface generated event.

## Member Function Documentation

## ◆ connect() [1/2]

template<class T , class V >

Wt::Signals::connection Wt::SignalBase::connect | ( | T * | target,
|  | void(V::* | method )() )

Connects to a slot.

Every signal can be connected to a slot which does not take any arguments (and may thus ignore signal arguments).

## ◆ connect() [2/2]

virtual Wt::Signals::connection Wt::SignalBase::connect | ( | WObject * | target,
|  | WObject::Method | method )
| virtual

Connects to a slot.

Every signal can be connected to a slot which does not take any arguments (and may thus ignore signal arguments).

Implements Wt::SignalBase.

## ◆ defaultActionPrevented()

bool Wt::EventSignalBase::defaultActionPrevented | ( |  | ) | const

Returns whether the default browser action is prevented.

See also
  preventDefaultAction()

## ◆ isConnected()

virtual bool Wt::EventSignalBase::isConnected | ( |  | ) | const
| overridevirtual

Returns whether this signal is connected.

Returns true when the signal was connected to to at least one slot.

Implements Wt::SignalBase.

Reimplemented in Wt::EventSignal< E >, Wt::JSignal< A >, Wt::JSignal< ::int64_t >, Wt::JSignal< ::uint64_t >, Wt::JSignal< A... >, Wt::JSignal< bool >, Wt::JSignal< double >, Wt::JSignal< double, double >, Wt::JSignal< int >, Wt::JSignal< int, int >, Wt::JSignal< int, int, int, int >, Wt::JSignal< int, int, std::string, std::string, std::string, Wt::WMouseEvent >, Wt::JSignal< int, int, std::string, std::string, Wt::WMouseEvent >, Wt::JSignal< std::string >, Wt::JSignal< std::string, std::string >, Wt::JSignal< std::string, std::string, std::string, std::string, Wt::WMouseEvent >, Wt::JSignal< std::string, std::string, Wt::WMouseEvent >, Wt::JSignal< std::string, std::string, Wt::WTouchEvent >, Wt::JSignal< Wt::WGoogleMap::Coordinate >, Wt::JSignal< Wt::WTouchEvent >, and Wt::JSignal<>.

## ◆ name()

const char * Wt::EventSignalBase::name | ( |  | ) | const

Returns the event name.

The event name is implementation-defined.

## ◆ preventDefaultAction()

void Wt::EventSignalBase::preventDefaultAction | ( | bool | prevent = true | ) |

Prevents the default browser action.

Use this method to prevent the default browser action associated with this event.

See also
  setPreventPropagation()

## ◆ preventPropagation()

void Wt::EventSignalBase::preventPropagation | ( | bool | prevent = true | ) |

Prevents event propagation.

Use this method to prevent that the event propagates further to its ancestors.

See also
  preventDefaultAction()

## ◆ propagationPrevented()

bool Wt::EventSignalBase::propagationPrevented | ( |  | ) | const

Returns whether event propagation is prevented.

See also
  preventPropagation()