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);
98#include <cgv/config/lib_end.h>
event(unsigned int _kind=EID_NONE, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0)
construct event from its kind
void set_dy(short _dy)
set for move and drag events the difference in y to the previous position, for wheel events the amoun...
void set_dx(short _dx)
set for move and drag events the difference in x to the previous position
short get_y() const
current mouse y position (origin is top-left of window)
short dx
change in x position
void set_x(short _x)
set current mouse x position
short y
y position of mouse pointer
void set_button_state(unsigned char _button_state)
set the button state as values from MouseButton combined with a logical or-operation
unsigned char action
store MouseAction
void stream_in(std::istream &is)
read from stream
short dy
change in y position
void set_button(unsigned char _button)
set the pressed or released button for a button press or release action
unsigned char flags
store mouse event flags
MouseAction get_action() const
return the mouse action
unsigned char button
store the pressed button
void set_action(MouseAction _action)
return the mouse action
short get_dx() const
for move and drag events the difference in x to the previous position
std::string dnd_text
the texted resulting from a drag and drop event
void stream_out(std::ostream &os) const
write to stream
short get_x() const
current mouse x position (origin is top-left of window)
unsigned char button_state
store the button state
void set_y(short _y)
set current mouse y position
unsigned char get_button_state() const
return the button state as values from MouseButton combined with a logical or-operation
void set_dnd_text(const std::string &text)
set the drag&drop text
short x
x position of mouse pointer
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)
construct a mouse
short get_dy() const
for move and drag events the difference in y to the previous position, for wheel events the amount th...
const std::string & get_dnd_text() const
only valid in a MA_RELEASE event with the flag MF_DND set, return the text resulting from the drag&dr...
unsigned char get_button() const
return the pressed or released button for a button press or release action
namespace that holds the abstract gui interface
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
this header is dependency free