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

#include <event.hpp>

Collaboration diagram for rack::widget::EventState:
[legend]

Public Member Functions

WidgetgetRootWidget ()
 
WidgetgetHoveredWidget ()
 
WidgetgetDraggedWidget ()
 
WidgetgetDragHoveredWidget ()
 
WidgetgetSelectedWidget ()
 
void setHoveredWidget (Widget *w)
 
void setDraggedWidget (Widget *w, int button)
 
void setDragHoveredWidget (Widget *w)
 
void setSelectedWidget (Widget *w)
 
DEPRECATED void setHovered (Widget *w)
 
DEPRECATED void setDragged (Widget *w, int button)
 
DEPRECATED void setDragHovered (Widget *w)
 
DEPRECATED void setSelected (Widget *w)
 
void finalizeWidget (Widget *w)
 Prepares a widget for deletion.
 
bool handleButton (math::Vec pos, int button, int action, int mods)
 
bool handleHover (math::Vec pos, math::Vec mouseDelta)
 
bool handleLeave ()
 
bool handleScroll (math::Vec pos, math::Vec scrollDelta)
 
bool handleText (math::Vec pos, uint32_t codepoint)
 
bool handleKey (math::Vec pos, int key, int scancode, int action, int mods)
 
bool handleDrop (math::Vec pos, const std::vector< std::string > &paths)
 
bool handleDirty ()
 

Public Attributes

WidgetrootWidget = NULL
 
WidgethoveredWidget = NULL
 State widgets Don't set these directly unless you know what you're doing.
 
WidgetdraggedWidget = NULL
 
int dragButton = 0
 
WidgetdragHoveredWidget = NULL
 
WidgetselectedWidget = NULL
 
double lastClickTime = -INFINITY
 For double-clicking.
 
WidgetlastClickedWidget = NULL
 
std::set< int > heldKeys
 

Member Function Documentation

◆ getRootWidget()

Widget * rack::widget::EventState::getRootWidget ( )
inline

◆ getHoveredWidget()

Widget * rack::widget::EventState::getHoveredWidget ( )
inline

◆ getDraggedWidget()

Widget * rack::widget::EventState::getDraggedWidget ( )
inline

◆ getDragHoveredWidget()

Widget * rack::widget::EventState::getDragHoveredWidget ( )
inline

◆ getSelectedWidget()

Widget * rack::widget::EventState::getSelectedWidget ( )
inline

◆ setHoveredWidget()

void rack::widget::EventState::setHoveredWidget ( Widget * w)

◆ setDraggedWidget()

void rack::widget::EventState::setDraggedWidget ( Widget * w,
int button )

◆ setDragHoveredWidget()

void rack::widget::EventState::setDragHoveredWidget ( Widget * w)

◆ setSelectedWidget()

void rack::widget::EventState::setSelectedWidget ( Widget * w)

◆ setHovered()

DEPRECATED void rack::widget::EventState::setHovered ( Widget * w)
inline

◆ setDragged()

DEPRECATED void rack::widget::EventState::setDragged ( Widget * w,
int button )
inline

◆ setDragHovered()

DEPRECATED void rack::widget::EventState::setDragHovered ( Widget * w)
inline

◆ setSelected()

DEPRECATED void rack::widget::EventState::setSelected ( Widget * w)
inline

◆ finalizeWidget()

void rack::widget::EventState::finalizeWidget ( Widget * w)

Prepares a widget for deletion.

◆ handleButton()

bool rack::widget::EventState::handleButton ( math::Vec pos,
int button,
int action,
int mods )

◆ handleHover()

bool rack::widget::EventState::handleHover ( math::Vec pos,
math::Vec mouseDelta )

◆ handleLeave()

bool rack::widget::EventState::handleLeave ( )

◆ handleScroll()

bool rack::widget::EventState::handleScroll ( math::Vec pos,
math::Vec scrollDelta )

◆ handleText()

bool rack::widget::EventState::handleText ( math::Vec pos,
uint32_t codepoint )

◆ handleKey()

bool rack::widget::EventState::handleKey ( math::Vec pos,
int key,
int scancode,
int action,
int mods )

◆ handleDrop()

bool rack::widget::EventState::handleDrop ( math::Vec pos,
const std::vector< std::string > & paths )

◆ handleDirty()

bool rack::widget::EventState::handleDirty ( )

Member Data Documentation

◆ rootWidget

Widget* rack::widget::EventState::rootWidget = NULL

◆ hoveredWidget

Widget* rack::widget::EventState::hoveredWidget = NULL

State widgets Don't set these directly unless you know what you're doing.

Use the set*() methods instead.

◆ draggedWidget

Widget* rack::widget::EventState::draggedWidget = NULL

◆ dragButton

int rack::widget::EventState::dragButton = 0

◆ dragHoveredWidget

Widget* rack::widget::EventState::dragHoveredWidget = NULL

◆ selectedWidget

Widget* rack::widget::EventState::selectedWidget = NULL

◆ lastClickTime

double rack::widget::EventState::lastClickTime = -INFINITY

For double-clicking.

◆ lastClickedWidget

Widget* rack::widget::EventState::lastClickedWidget = NULL

◆ heldKeys

std::set<int> rack::widget::EventState::heldKeys

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