Fovia's C++ Client/Server API
Public Member Functions | List of all members
IMouseAdaptor Struct Referenceabstract
Inheritance diagram for IMouseAdaptor:
IRoot IAutonavigateAdaptor IConnectivityAdaptor ICPRotateAdaptor ILightAdjustAdaptor IOrbitAdaptor IPanAdaptor ISlabAdaptor ISlabThicknessAdaptor IWindowLevelAdaptor IZoomAdaptor

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int DecRef ()=0
 
virtual signed int IncRef ()=0
 
virtual signed int MouseClicked (signed int x, signed int y)=0
 
virtual signed int MouseDragged (signed int x, signed int y)=0
 
virtual signed int MouseEntered (signed int x, signed int y)=0
 
virtual signed int MouseExited (signed int x, signed int y)=0
 
virtual signed int MouseManuallyMoved (signed int offsetX, signed int offsetY)=0
 
virtual signed int MouseMoved (signed int x, signed int y)=0
 
virtual signed int MousePressed (signed int x, signed int y)=0
 
virtual signed int MouseReleased (signed int x, signed int y)=0
 
virtual signed int SetRenderParamsReciever (IRenderParamsReceiver *pReceiver)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

Base class for mouse interaction adaptors. You should not create this object directly. Instead, you should create one of the various adaptors that descend from this object.

Member Function Documentation

virtual signed int IMouseAdaptor::AskInterface ( const BGUID piid,
IRoot **  ppr 
)
pure virtual

Queries this object to see if the interface piid is supported and returns the result in ppr.

Parameters
piidThe BGUID of the requested interface.
pprThe address of an IRoot pointer which will receive the new interface.
Returns
S_OK if the interface is supported. E_FAIL if it is not.

Implements IRoot.

virtual signed int IMouseAdaptor::DecRef ( )
pure virtual

Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.

Implements IRoot.

virtual signed int IMouseAdaptor::IncRef ( )
pure virtual

Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.

Implements IRoot.

virtual signed int IMouseAdaptor::MouseClicked ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse is clicked on a rendered image.

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MouseDragged ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse is dragged on a rendered image (mouse button is down and the mouse has moved).

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MouseEntered ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse has entered the active area of a rendered image.

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MouseExited ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse has exited the active area of a rendered image.

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MouseManuallyMoved ( signed int  offsetX,
signed int  offsetY 
)
pure virtual

Sometimes you might want to move the mouse manually. Perhaps you don't want the mouse to hit the edge of the screen so you wrap it around to the other side of the image. This function is intended to allow this adjsutment without causing the adaptor to jump positions suddenly because it didn't know the cursor was manually moved. Essentially, this adds the offset to the last mouse position to keep things smooth.

Parameters
offsetXThe x component of the vector subtraction of the new point minus the old point.
offsetYThe y component of the vector subtraction of the new point minus the old point.
virtual signed int IMouseAdaptor::MouseMoved ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse is moved on a rendered image (mouse button is up and the mouse has moved).

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MousePressed ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse is first pressed on a rendered image.

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::MouseReleased ( signed int  x,
signed int  y 
)
pure virtual

Call this function when the mouse is first released on a rendered image.

Parameters
xThe horizontal offset from the left side of the rendered image.
yThe vertical offset from the top of the rendered image.
virtual signed int IMouseAdaptor::SetRenderParamsReciever ( IRenderParamsReceiver pReceiver)
pure virtual

In order for a mouse adaptor to function properly, it must be attached to an IRenderParamsReceiver. At the time of this writing, IRenderEngineContext and IRenderQueue are the two implementers of this interface.

Parameters
pReceiverThe IRenderParamsReceiver to attach to this adaptor.