VCV Rack API v2
Loading...
Searching...
No Matches
event.hpp File Reference
#include <vector>
#include <set>
#include <common.hpp>
#include <math.hpp>
Include dependency graph for event.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rack::widget::EventContext
 A per-event state shared and writable by all widgets that recursively handle an event. More...
 
struct  rack::widget::BaseEvent
 Base class for all events. More...
 
struct  rack::widget::EventState
 

Namespaces

namespace  rack
 Root namespace for the Rack API.
 
namespace  rack::widget
 Base UI widget types.
 

Macros

#define RACK_MOD_CTRL   GLFW_MOD_CONTROL
 Remaps Ctrl to Cmd on Mac Use this instead of GLFW_MOD_CONTROL, since Cmd should be used on Mac in place of Ctrl on Linux/Windows.
 
#define RACK_MOD_CTRL_NAME   "Ctrl"
 
#define RACK_MOD_SHIFT   GLFW_MOD_SHIFT
 
#define RACK_MOD_SHIFT_NAME   "Shift"
 
#define RACK_MOD_ALT   GLFW_MOD_ALT
 
#define RACK_MOD_ALT_NAME   "Alt"
 
#define RACK_MOD_MASK   (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER)
 Filters actual mod keys from the mod flags.
 
#define RACK_HELD   3
 A key action state representing the the key is (still) being held.
 

Functions

std::string rack::widget::getKeyName (int key)
 
std::string rack::widget::getKeyCommandName (int key, int mods)
 

Macro Definition Documentation

◆ RACK_MOD_CTRL

#define RACK_MOD_CTRL   GLFW_MOD_CONTROL

Remaps Ctrl to Cmd on Mac Use this instead of GLFW_MOD_CONTROL, since Cmd should be used on Mac in place of Ctrl on Linux/Windows.

◆ RACK_MOD_CTRL_NAME

#define RACK_MOD_CTRL_NAME   "Ctrl"

◆ RACK_MOD_SHIFT

#define RACK_MOD_SHIFT   GLFW_MOD_SHIFT

◆ RACK_MOD_SHIFT_NAME

#define RACK_MOD_SHIFT_NAME   "Shift"

◆ RACK_MOD_ALT

#define RACK_MOD_ALT   GLFW_MOD_ALT

◆ RACK_MOD_ALT_NAME

#define RACK_MOD_ALT_NAME   "Alt"

◆ RACK_MOD_MASK

#define RACK_MOD_MASK   (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER)

Filters actual mod keys from the mod flags.

Use this if you don't care about GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK. Example usage: if ((e.mod & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) ...

◆ RACK_HELD

#define RACK_HELD   3

A key action state representing the the key is (still) being held.