VCV Rack API v2
Loading...
Searching...
No Matches
rack::widget::BaseEvent Struct Reference

Base class for all events. More...

#include <event.hpp>

Inheritance diagram for rack::widget::BaseEvent:
[legend]
Collaboration diagram for rack::widget::BaseEvent:
[legend]

Public Member Functions

void stopPropagating () const
 Prevents the event from being handled by more Widgets.
 
bool isPropagating () const
 
void setTarget (Widget *w) const
 Tells the event handler that a particular Widget consumed the event.
 
WidgetgetTarget () const
 
void consume (Widget *w) const
 Sets the target Widget and stops propagating.
 
void unconsume () const
 
bool isConsumed () const
 

Public Attributes

EventContextcontext = NULL
 

Detailed Description

Base class for all events.

Member Function Documentation

◆ stopPropagating()

void rack::widget::BaseEvent::stopPropagating ( ) const
inline

Prevents the event from being handled by more Widgets.

◆ isPropagating()

bool rack::widget::BaseEvent::isPropagating ( ) const
inline

◆ setTarget()

void rack::widget::BaseEvent::setTarget ( Widget * w) const
inline

Tells the event handler that a particular Widget consumed the event.

You usually want to stop propagation as well, so call consume() instead.

◆ getTarget()

Widget * rack::widget::BaseEvent::getTarget ( ) const
inline

◆ consume()

void rack::widget::BaseEvent::consume ( Widget * w) const
inline

Sets the target Widget and stops propagating.

A NULL Widget may be passed to consume but not set a target.

◆ unconsume()

void rack::widget::BaseEvent::unconsume ( ) const
inline

◆ isConsumed()

bool rack::widget::BaseEvent::isConsumed ( ) const
inline

Member Data Documentation

◆ context

EventContext* rack::widget::BaseEvent::context = NULL

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