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

Occurs each mouse button press or release. More...

#include <Widget.hpp>

Inheritance diagram for rack::widget::Widget::ButtonEvent:
[legend]
Collaboration diagram for rack::widget::Widget::ButtonEvent:
[legend]

Public Attributes

int button
 GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_RIGHT, GLFW_MOUSE_BUTTON_MIDDLE, etc.
 
int action
 GLFW_PRESS or GLFW_RELEASE.
 
int mods
 GLFW_MOD_*.
 
- Public Attributes inherited from rack::widget::BaseEvent
EventContextcontext = NULL
 
- Public Attributes inherited from rack::widget::Widget::PositionBaseEvent
math::Vec pos
 The pixel coordinate where the event occurred, relative to the Widget it is called on.
 

Additional Inherited Members

- Public Member Functions inherited from rack::widget::BaseEvent
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
 

Detailed Description

Occurs each mouse button press or release.

Recurses. Consume this event to allow DoubleClick, Select, Deselect, SelectKey, SelectText, DragStart, DragEnd, DragMove, and DragDrop to occur.

Member Data Documentation

◆ button

int rack::widget::Widget::ButtonEvent::button

GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_RIGHT, GLFW_MOUSE_BUTTON_MIDDLE, etc.

◆ action

int rack::widget::Widget::ButtonEvent::action

GLFW_PRESS or GLFW_RELEASE.

◆ mods

int rack::widget::Widget::ButtonEvent::mods

GLFW_MOD_*.


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