Module: VRMouseFeasible
- Includes:
- VRMessageHandler
- Defined in:
- lib/vr/vrhandler.rb
Constant Summary collapse
- SHIFT_LBUTTON =
1
- SHIFT_RBUTTON =
2
- SHIFT_SHIFT =
4
- SHIFT_CONTROL =
8
- SHIFT_MBUTTON =
16
Constants included from VRMessageHandler
VRMessageHandler::PREHANDLERSTR
Instance Method Summary collapse
-
#mousefeasibleinit ⇒ Object
VRMouseFeasible This is a module to receive mouse messages.
- #vrinit ⇒ Object
Methods included from VRMessageHandler
#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching
Instance Method Details
#mousefeasibleinit ⇒ Object
VRMouseFeasible
This is a module to receive mouse messages.
Event Handlers
— self_lbuttonup(shift,x,y)
This method is fired when mouse left button is released at coord(x,y).
Press SHIFT key to set 0x4 bit of argument "shift".
Its 0x8 bit is for CONTROL key
— self_lbuttondown(shift,x,y)
This method is fired when mouse left button is pressed.
— self_rbuttonup(shift,x,y)
This method is fired when mouse right button is released.
— self_rbuttondown(shift,x,y)
This method is fired when mouse right button is pressed.
— self_mousemove(shift,x,y)
This method is fired when mouse cursor is moving on the window at coord(x,y).
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/vr/vrhandler.rb', line 48 def mousefeasibleinit addHandler WMsg::WM_LBUTTONUP, "lbuttonup", MSGTYPE::ARGINTSINTSINT,nil addHandler WMsg::WM_LBUTTONDOWN,"lbuttondown",MSGTYPE::ARGINTSINTSINT,nil addHandler WMsg::WM_RBUTTONUP, "rbuttonup", MSGTYPE::ARGINTSINTSINT,nil addHandler WMsg::WM_RBUTTONDOWN,"rbuttondown",MSGTYPE::ARGINTSINTSINT,nil addHandler WMsg::WM_MOUSEMOVE, "mousemove", MSGTYPE::ARGINTSINTSINT,nil acceptEvents [WMsg::WM_LBUTTONUP,WMsg::WM_RBUTTONUP, WMsg::WM_LBUTTONDOWN,WMsg::WM_RBUTTONDOWN, WMsg::WM_MOUSEMOVE] end |
#vrinit ⇒ Object
59 60 61 62 |
# File 'lib/vr/vrhandler.rb', line 59 def vrinit super mousefeasibleinit end |