55 mouse_event(
int x,
int y,
MouseAction _action,
unsigned char _button_state = 0,
unsigned char _button = 0,
short _dx = 0,
short _dy = 0,
unsigned char _modifiers = 0,
unsigned char _toggle_keys = 0,
double _time = 0);
57 void stream_out(std::ostream& os)
const;
59 void stream_in(std::istream& is);
71 unsigned char get_button_state()
const;
73 unsigned char get_button()
const;
75 const std::string& get_dnd_text()
const;
82 void set_dx(
short _dx);
84 void set_dy(
short _dy);
88 void set_button_state(
unsigned char _button_state);
90 void set_button(
unsigned char _button);
92 void set_dnd_text(
const std::string& text);
98#include <cgv/config/lib_end.h>
class to represent all possible mouse events with the EID_MOUSE
short dx
change in x position
short y
y position of mouse pointer
unsigned char action
store MouseAction
short dy
change in y position
unsigned char flags
store mouse event flags
unsigned char button
store the pressed button
std::string dnd_text
the texted resulting from a drag and drop event
unsigned char button_state
store the button state
short x
x position of mouse pointer
MouseButton
different mouse buttons that can be ored together to specify the button state
@ MB_MIDDLE_BUTTON
middle button
@ MB_RIGHT_BUTTON
right button
@ MB_LEFT_BUTTON
left button
MouseAction
different actions that a mouse can perform
@ MA_PRESS
mouse button pressed
@ MA_LEAVE
mouse leave window action
@ MA_MOVE
mouse pointer moved
@ MA_ENTER
mouse enter window action
@ MA_WHEEL
mouse wheel moved
@ MA_DRAG
mouse drag action
@ MA_RELEASE
mouse button released