HBaseOperator

Functions

int

Repeat

int

Capture

HBaseOperator *

Clone

void

SetFirstPoint

HPoint const

GetFirstPoint

void

SetNewPoint

HPoint const

GetNewPoint

HBaseView *

GetView

void

SetView

bool

OperatorStarted

void

SetOperatorStarted

void

SetMapTouchesToMouseEvents

HBaseOperator

~HBaseOperator

int

OnMouseMove

char const *

GetName

int

OnLButtonDown

int

OnLButtonUp

int

OnLButtonDblClk

int

OnLButtonDownAndMove

int

OnMButtonDown

int

OnMButtonUp

int

OnMButtonDblClk

int

OnMButtonDownAndMove

int

OnRButtonDown

int

OnRButtonUp

int

OnRButtonDblClk

int

OnRButtonDownAndMove

int

OnLRButtonDownAndMove

int

OnNoButtonDownAndMove

int

OnTimer

int

OnKeyDown

int

OnKeyUp

int

OnMouseWheel

int

OnTouchesDown

int

OnTouchesMove

int

OnTouchesUp

Detailed Description

class HBaseOperator : public HMouseListener

The HBaseOperator class serves as a base for classes which handle user input and operate on the scene.

HBaseOperator provides support for mapping user input to interaction logic. A custom operator object implements the virtual functions that are provided in order to handle mouse button and keypress events as required. For example, if the application needed to orbit the camera by clicking the mouse button down, dragging the mouse, and then releasing the mouse button, the derived operator would implement the OnLButtonDown, OnLButtonDownAndMove, and OnLButtonUp methods to provide logic to orbit the camera.

The HOOPS/GUI module provides support for mapping platform-specific UI events to the corresponding method of the current operator associated with the view. Alternately, the application could manually map a platform-specific UI event to the matching method in the current operator without relying on the HOOPS/GUI toolkit.

Subclassed by HImagePanel, HOpCameraManipulate, HOpCameraManipulateTouch, HOpCameraOrbit, HOpCameraOrbitTurntable, HOpCameraPan, HOpCameraPanTouch, HOpCameraRollTouch, HOpCameraWalk, HOpCameraZoom, HOpCameraZoomTouch, HOpConstructCircle, HOpConstructCone, HOpConstructCuboid, HOpConstructCylinder, HOpConstructPolyline, HOpConstructRectangle, HOpConstructSphere, HOpCreateBoolean, HOpCreateNurbs3D, HOpFramedAnnotate, HOpMarkupAnnotate, HOpMarkupFreehand, HOpMarkupFreehand3D, HOpMarkupMeasure, HOpMoveHandle, HOpNavCube, HOpNetwork, HOpObjectAnnotate, HOpObjectRotate, HOpObjectTranslate, HOpSelectAperture, HSubwindow, HSubwindow2, HTCObjectRotate, MyFreehandMarkupOp, MyPolygonMarkupOp

Public Functions

inline int Repeat()

Returns whether the operation is repeatable. This method has been deprecated.

inline int Capture()

Returns whether we are currently in mouse capture mode. See this class’ constructor for a more detailed description of what this means. This method has been deprecated.

virtual HBaseOperator *Clone()

Creates a new operator which is associated with the same view as the current operator. The user is responsible for deleting the newly created operator.

Returns

A pointer to an HBaseOperator object

inline void SetFirstPoint(HPoint const &new_point)

Sets the initial selection point.

inline HPoint const GetFirstPoint()

Returns the initial selection point.

inline void SetNewPoint(HPoint const &new_point)

Sets the current selection point.

inline HPoint const GetNewPoint()

Returns the current selection point.

inline HBaseView *GetView()

Returns a pointer to the view that this operator is associated with.

inline void SetView(HBaseView *new_view)

Sets the view that this operator is associated with.

inline virtual bool OperatorStarted()

Operator has been started if true, and has not been started if false.

inline void SetOperatorStarted(bool val)

Operator has been started if true, and has not been started if false.

inline void SetMapTouchesToMouseEvents(bool val)

Touch Events are mapped to mouse events if true, and are not if false.

HBaseOperator(HBaseView *view, int DoRepeat = 0, int DoCapture = 1)

Constructs an HBaseOperator object

Parameters
  • view – A pointer to an HBaseView object,

  • DoRepeat – An integer denoting whether this is a repeatable operator. This parameter has been deprecated.

  • DoCapture – An integer denoting whether the mouse state should be captured, which means that all mouse events should be received after a mousedown, even if it leaves the window. This parameter has been deprecated.

virtual ~HBaseOperator()
virtual int OnMouseMove(HEventInfo &hevent)

This method automatically checks the state of the left, middle and right mouse buttons (by looking at the HEventInfo object) and calls out to the appropriate ‘combination’ event, such as OnLButtonDownAndMove, OnNoButtonDownAndMove, etc…

This function will be automatically called from the HOOPS/GUI toolkit when a mouse move occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

The derived operator may overload this function to intercept and handle a mouse move event; however, it should be noted that the automatic dispatching of combination events would then no longer occur.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual char const *GetName()
Returns

A character pointer denoting the name of operator.

virtual int OnLButtonDown(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the left mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonUp(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the left mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDblClk(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the left mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDownAndMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the left mouse button is pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMButtonDown(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the middle mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMButtonUp(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the middle mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMButtonDblClk(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the middle mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMButtonDownAndMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the middle mouse button is pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnRButtonDown(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the right mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnRButtonUp(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the right mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnRButtonDblClk(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the right mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnRButtonDownAndMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where the right mouse button is pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLRButtonDownAndMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where both the left and right mouse button are pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnNoButtonDownAndMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where no mouse buttons are pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnTimer(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a timer event has occurred. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnKeyDown(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a keyboard key has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnKeyUp(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a keyboard key has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMouseWheel(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle mouse wheel movement. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnTouchesDown(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a touch down event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnTouchesMove(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a touch move event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnTouchesUp(HEventInfo &hevent)

The derived operator should overload this function to intercept and handle the case where a touch up event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.

Parameters

hevent – An HEventInfo object containing information about the current event

Returns

An HOperatorReturn indicating the status of the event.