|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #pragma once
- #include <list>
-
- #include "math.hpp"
-
-
- namespace rack {
-
-
- struct Widget;
-
-
- struct Event {
- /** Set this to true to signal that no other widgets should receive the event */
- bool consumed = false;
- };
-
- struct EventPosition : Event {
- Vec pos;
- };
-
- ///////////
-
- struct EventMouseDown : EventPosition {
- int button;
- /** The widget which responded to the click. Set it to `this` if consumed. */
- Widget *target = NULL;
- };
-
- struct EventMouseUp : EventPosition {
- int button;
- Widget *target = NULL;
- };
-
- struct EventMouseMove : EventPosition {
- Vec mouseRel;
- Widget *target = NULL;
- };
-
- struct EventHoverKey : EventPosition {
- int key;
- Widget *target = NULL;
- };
-
- struct EventMouseEnter : Event {
- };
-
- struct EventMouseLeave : Event {
- };
-
- struct EventFocus : Event {
- };
-
- struct EventDefocus : Event {
- };
-
- struct EventText : Event {
- int codepoint;
- };
-
- struct EventKey : Event {
- int key;
- };
-
- struct EventScroll : EventPosition {
- Vec scrollRel;
- };
-
- /////////////
-
- struct EventDragStart : Event {
- };
-
- struct EventDragEnd : Event {
- };
-
- struct EventDragMove : Event {
- Vec mouseRel;
- };
-
- struct EventDragEnter : Event {
- Widget *origin = NULL;
- };
-
- struct EventDragLeave : Event {
- Widget *origin = NULL;
- };
-
- struct EventDragDrop : Event {
- Widget *origin = NULL;
- };
-
- struct EventPathDrop : EventPosition {
- std::list<std::string> paths;
- };
-
- struct EventAction : Event {
- };
-
- struct EventChange : Event {
- };
-
- struct EventZoom : Event {
- };
-
-
- } // namespace rack
|