events.hpp
Event handlers that use JQuery.
- Todo:
Events can be further sub-divided and built up (similar to DataNode objects) so that we save only the information that we’re planning to use. This may be slightly faster (given how frequently some of these like mouse move might be used), but likely to be more compelx.
An alternative speed-up might be to save the current event somewhere in emp_i on the Javascript side, and then just request the information that we might need. This approach should be easier to implement, but since everything would be copied anyway in such as case, it might not actually be a speedup.
Functions
-
struct Event
- #include <events.hpp>
Data common to all web events.
Subclassed by KeyboardEvent, MouseEvent, WheelEvent
Public Functions
-
template<int ARG_ID>
inline void LoadFromArg()
-
template<int ARG_ID>
-
struct MouseEvent : public Event
- #include <events.hpp>
Mouse-specific information about web events.
Public Functions
-
template<int ARG_ID>
inline void LoadFromArg()
Public Members
-
bool altKey
Was “ALT” key was pressed?
-
bool ctrlKey
Was “CTRL” key pressed?
-
bool metaKey
Was “META” key pressed?
-
bool shiftKey
Was “SHIFT” key pressed?
-
int button
Which mouse button was pressed? -1=none (0/1/2)
-
int clientX
X-mouse postion, relative to current window.
-
int clientY
Y-mouse postion, relative to current window.
-
int screenX
X-mouse position, relative to the screen.
-
int screenY
Y-mouse position, relative to the screen.
-
template<int ARG_ID>