Wide Studio Object Reference

Wide Studio Home
Up to


Class Name

WSDmouse

Specification of methods



WSGIappMouse Function Description

Form
WSDmouse* WSGIappMouse();
Function
Obtain a mouse instance existing for each system
Description
Parameters
None.
Return value
Mouse instance
Notice
Do not release the returned instance
Samples
  //Obtain the mouse
  WSDmouse* mouse = WSGIappMouse();
  //Obtain mouse position
  short x,y;
  mouse->getMousePosition(&x,&y);



getMousePosition Function Description

Form
WSCbool getMousePosition(short* x,short* y,WSCbase* inst);
Function
Obtain mouse position
Description
Screen coordinate when inst is omitted. When inst is specified, it obtains the mouse position according to the instance's coordinate
Parameters
(in)short* x A pointer to refer to X coordinate
(in)short* y A pointer to refer to Y coordinate
(in)WSCbase* inst Instance

Return value
True = Success, False = Fail
Notice
Samples
Refer to WSGIappMouse()



setMouseStatus Function Description

Form
long getMouseStatus()
Function
Set mouse status
Description
Software set of mouse status
Parameters
None.
Return value
Mouse status
WS_MOUSE_BTN1 Button 1 (left) is being pushed
WS_MOUSE_BTN2 Button 2 (middle) is being pushed
WS_MOUSE_BTN3 Button 3 (right) is being pushed
WS_MOUSE_BTN4 button 4 (wheel up) is being pushed
WS_MOUSE_BTN5 Button 5 (wheel down) is being pushed
WS_MOUSE_SHIFT Shift key is being pushed
WS_MOUSE_MOD Modifier key is being pushed
WS_MOUSE_CONTROL Control key is being pushed
WS_MOUSE_LOCK Capture Lock key is being pushed

Notice
Samples
  //Obtain the mouse
  WSDmouse* mouse = WSGIappMouse();
  //Set mouse status
  //Set into the status of the left button being pushed
  mouse->setMouseStatus(WS_MOUSE_BTN1);



setMousePosition Function Description

Form
void setMousePosition(short x,short y)
Function
Obtain the mouse position
Description
Parameters
short x X coordinate
short y Y coordinate

Return value
None.
Notice
Samples
  //Obtain the mouse
  WSDmouse* mouse = WSGIappMouse();
  //Set mouse position to 100,100
  mouse->setMousePosition(100,100);



getTargetBtn Function Description

Form
long getTargetBtn()
Function
Obtain the mouse button most recently pushed.
Description
Parameters
None.
Return value
Button identifier
WS_MOUSE_BTN1 Button 1 (left) is being pushed
WS_MOUSE_BTN2 Button 2 (middle) is being pushed
WS_MOUSE_BTN3 Button 3 (right) is beging pushed
WS_MOUSE_BTN4 button 4 (wheel up) is being pushed
WS_MOUSE_BTN5 Button 5 (wheel down) is being pushed
WS_MOUSE_SHIFT Shift key is being pushed

Notice
getMouseStatus() returns status of a button simultaneously being pushed, while getTargetBtn() returns only the button most recently pushed.
Samples
  //Obtain the mouse
  WSDmouse* mouse = WSGIappMouse();
  //Obtain the mouse button most recently pushed
  long btn = mouse->getTargetBtn();


Document Release 3.20

For use with Wide Studio Release 3.20, Spring 2003


Wide Studio Home | Up to

Copyright(C) T. Hirabayashi, 1999-2003 Last modified: February 3, 2003