VSTGUI: Version 4.11

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Enumerations | Functions
Version 4.11
New classes

## Classes
struct | EventConsumeState
| EventConsumeState. More...
struct | Event
| Event. More...
struct | Modifiers
| Modifiers. More...
struct | ModifierEvent
| ModifierEvent. More...
struct | MousePositionEvent
| MousePositionEvent. More...
struct | MouseEventButtonState
| MouseEventButtonState. More...
struct | MouseEvent
| MouseEvent. More...
struct | MouseEnterEvent
| MouseEnterEvent. More...
struct | MouseExitEvent
| MouseExitEvent. More...
struct | MouseDownUpMoveEvent
| MouseDownUpMoveEvent. More...
struct | MouseDownEvent
| MouseDownEvent. More...
struct | MouseUpEvent
| MouseUpEvent. More...
struct | MouseMoveEvent
| MouseMoveEvent. More...
struct | MouseCancelEvent
| MouseCancelEvent. More...
struct | MouseWheelEvent
| MouseWheelEvent. More...
struct | GestureEvent
| GestureEvent. More...
struct | ZoomGestureEvent
| ZoomGestureEvent. More...
struct | KeyboardEvent
| KeyboardEvent. More...
class | IViewEventListener
| View Event Listener Interface. More...

## Enumerations
enum | EventType : uint32_t { Unknown, MouseDown, MouseMove, MouseUp, MouseCancel, MouseEnter, MouseExit, MouseWheel, ZoomGesture, KeyUp, KeyDown }
| EventType. More...
enum | MouseButton : uint32_t { None = 0, Left = 1 << 1, Middle = 1 << 2, Right = 1 << 3, Fourth = 1 << 4, Fifth = 1 << 5 }
| MouseButton. More...
enum | VirtualKey : uint32_t { None = 0, Back, Tab, Clear, Return, Pause, Escape, Space, Next, End, Home, Left, Up, Right, Down, PageUp, PageDown, Select, Print, Enter, Snapshot, Insert, Delete, Help, NumPad0, NumPad1, NumPad2, NumPad3, NumPad4, NumPad5, NumPad6, NumPad7, NumPad8, NumPad9, Multiply, Add, Separator, Subtract, Decimal, Divide, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NumLock, Scroll, ShiftModifier, ControlModifier, AltModifier, Equals }
| VirtualKey. More...
enum | ModifierKey : uint32_t { Shift = 1 << 0, Alt = 1 << 1, Control = 1 << 2, Super = 1 << 3, None = 0 }
| ModifierKey. More...

## Functions
template<typename EventT , typename OutputT = MousePositionEvent, typename MousePositionEventT = typename std::conditional< std::is_const_v<EventT>, typename std::add_const_t<OutputT>, OutputT>::type>
MousePositionEventT * | asMousePositionEvent (EventT &event)
| event as mouse position event or nullpointer if not a mouse position event
template<typename EventT , typename OutputT = MouseEvent, typename MouseEventT = typename std::conditional< std::is_const_v<EventT>, typename std::add_const_t<OutputT>, OutputT>::type>
MouseEventT * | asMouseEvent (EventT &event)
| event as mouse position event or nullpointer if not a mouse position event
template<typename EventT , typename OutputT = MouseDownEvent, typename MouseDownEventT = typename std::conditional< std::is_const_v<EventT>, typename std::add_const_t<OutputT>, OutputT>::type>
MouseDownEventT * | asMouseDownEvent (EventT &event)
| event as mouse down event or nullpointer if not a mouse down event
template<typename EventT , typename OutputT = ModifierEvent, typename ModifierEventT = typename std::conditional< std::is_const_v<EventT>, typename std::add_const_t<OutputT>, OutputT>::type>
ModifierEventT * | asModifierEvent (EventT &event)
| event as modifier event or nullpointer if not a modifier event
template<typename EventT , typename OutputT = KeyboardEvent, typename KeyboardEventT = typename std::conditional< std::is_const_v<EventT>, typename std::add_const_t<OutputT>, OutputT>::type>
KeyboardEventT * | asKeyboardEvent (EventT &event)
| event as keyboard event or nullpointer if not a keyboard event
MousePositionEvent & | castMousePositionEvent (Event &event)
| cast event to a mouse position event
MouseEvent & | castMouseEvent (Event &event)
| cast event to a mouse event
MouseDownEvent & | castMouseDownEvent (Event &event)
| cast event to a mouse down event
MouseMoveEvent & | castMouseMoveEvent (Event &event)
| cast event to a mouse move event
MouseUpEvent & | castMouseUpEvent (Event &event)
| cast event to a mouse up event
MouseEnterEvent & | castMouseEnterEvent (Event &event)
| cast event to a mouse enter event
MouseExitEvent & | castMouseExitEvent (Event &event)
| cast event to a mouse exit event
MouseCancelEvent & | castMouseCancelEvent (Event &event)
| cast event to a mouse cancel event
MouseWheelEvent & | castMouseWheelEvent (Event &event)
| cast event to a mouse wheel event
ZoomGestureEvent & | castZoomGestureEvent (Event &event)
| cast event to a zoom gesture event
KeyboardEvent & | castKeyboardEvent (Event &event)
| cast event to a mouse wheel event
CButtonState | buttonStateFromEventModifiers (const Modifiers &mods)
| convert from new Modifiers to old CButtonState
CButtonState | buttonStateFromMouseEvent (const MouseEvent &event)
| convert from new MouseEvent to old CButtonState
unsigned char | toVstVirtualKey (VirtualKey key)
| helper function to convert from new VirtualKey to old VstVirtualKey
virtual void | viewOnMouseEnabled (CView *view, bool state)=0
| called when a view's mouse handling is enabled or disabled

## Detailed Description

## Enumeration Type Documentation

enum EventType : uint32_t

EventType.

Enumerator
Unknown |
MouseDown |
MouseMove |
MouseUp |
MouseCancel |
MouseEnter |
MouseExit |
MouseWheel |
ZoomGesture |
KeyUp |
KeyDown |

enum ModifierKey : uint32_t

ModifierKey.

Enumerator
Shift | the left or right shift key
Alt | the alternate key
Control | the control key (Command key on macOS and control key on other platforms)
Super | the super key (Control key on macOS, Windows key on Windows and Super key on other platforms)
None |

enum MouseButton : uint32_t

MouseButton.

Enumerator
None |
Left |
Middle |
Right |
Fourth |
Fifth |

enum VirtualKey : uint32_t

VirtualKey.

Enumerator
None |
Back |
Tab |
Clear |
Return |
Pause |
Escape |
Space |
Next |
End |
Home |
Left |
Up |
Right |
Down |
PageUp |
PageDown |
Select |
Print |
Enter |
Snapshot |
Insert |
Delete |
Help |
NumPad0 |
NumPad1 |
NumPad2 |
NumPad3 |
NumPad4 |
NumPad5 |
NumPad6 |
NumPad7 |
NumPad8 |
NumPad9 |
Multiply |
Add |
Separator |
Subtract |
Decimal |
Divide |
F1 |
F2 |
F3 |
F4 |
F5 |
F6 |
F7 |
F8 |
F9 |
F10 |
F11 |
F12 |
NumLock |
Scroll |
ShiftModifier |
ControlModifier |
AltModifier |
Equals |

## Function Documentation

KeyboardEventT* VSTGUI::asKeyboardEvent | ( | EventT & | event | ) |
| inline

event as keyboard event or nullpointer if not a keyboard event

ModifierEventT* VSTGUI::asModifierEvent | ( | EventT & | event | ) |
| inline

event as modifier event or nullpointer if not a modifier event

MouseDownEventT* VSTGUI::asMouseDownEvent | ( | EventT & | event | ) |
| inline

event as mouse down event or nullpointer if not a mouse down event

MouseEventT* VSTGUI::asMouseEvent | ( | EventT & | event | ) |
| inline

event as mouse position event or nullpointer if not a mouse position event

MousePositionEventT* VSTGUI::asMousePositionEvent | ( | EventT & | event | ) |
| inline

event as mouse position event or nullpointer if not a mouse position event

CButtonState buttonStateFromEventModifiers | ( | const Modifiers & | mods | ) |

convert from new Modifiers to old CButtonState

CButtonState buttonStateFromMouseEvent | ( | const MouseEvent & | event | ) |

convert from new MouseEvent to old CButtonState

KeyboardEvent& VSTGUI::castKeyboardEvent | ( | Event & | event | ) |
| inline

cast event to a mouse wheel event

MouseCancelEvent& VSTGUI::castMouseCancelEvent | ( | Event & | event | ) |
| inline

cast event to a mouse cancel event

MouseDownEvent& VSTGUI::castMouseDownEvent | ( | Event & | event | ) |
| inline

cast event to a mouse down event

MouseEnterEvent& VSTGUI::castMouseEnterEvent | ( | Event & | event | ) |
| inline

cast event to a mouse enter event

MouseEvent& VSTGUI::castMouseEvent | ( | Event & | event | ) |
| inline

cast event to a mouse event

MouseExitEvent& VSTGUI::castMouseExitEvent | ( | Event & | event | ) |
| inline

cast event to a mouse exit event

MouseMoveEvent& VSTGUI::castMouseMoveEvent | ( | Event & | event | ) |
| inline

cast event to a mouse move event

MousePositionEvent& VSTGUI::castMousePositionEvent | ( | Event & | event | ) |
| inline

cast event to a mouse position event

MouseUpEvent& VSTGUI::castMouseUpEvent | ( | Event & | event | ) |
| inline

cast event to a mouse up event

MouseWheelEvent& VSTGUI::castMouseWheelEvent | ( | Event & | event | ) |
| inline

cast event to a mouse wheel event

ZoomGestureEvent& VSTGUI::castZoomGestureEvent | ( | Event & | event | ) |
| inline

cast event to a zoom gesture event

unsigned char VSTGUI::toVstVirtualKey | ( | VirtualKey | key | ) |
| inline

helper function to convert from new VirtualKey to old VstVirtualKey

returns 0 if key cannot be mapped

virtual void viewOnMouseEnabled | ( | CView * | view,
|  | bool | state
| ) |  |
| pure virtual

called when a view's mouse handling is enabled or disabled

Implemented in ViewListenerAdapter.