HBaseOperator
-
class
HBaseOperator The
HBaseOperatorclass serves as a base for classes which handle user input and operate on the scene.HBaseOperatorprovides 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.
Inherits from: HMouseListener
Index
Methods
Capture()Clone()GetFirstPoint()GetName()GetNewPoint()GetView()HBaseOperator()IsSpecialKey()OnKeyDown()OnKeyUp()OnLButtonDblClk()OnLButtonDown()OnLButtonDownAndMove()OnLButtonUp()OnLRButtonDownAndMove()OnMButtonDblClk()OnMButtonDown()OnMButtonDownAndMove()OnMButtonUp()OnMouseMove()OnMouseWheel()OnNoButtonDownAndMove()OnRButtonDblClk()OnRButtonDown()OnRButtonDownAndMove()OnRButtonUp()OnTimer()OnTouchesDown()OnTouchesMove()OnTouchesUp()OperatorStarted()Repeat()SetFirstPoint()SetMapTouchesToMouseEvents()SetNewPoint()SetOperatorStarted()SetView()~HBaseOperator()
Variables
Methods
-
bool
HBaseOperator::IsSpecialKey(HC_KEY key) protected
This method has been deprecated.
Returns
True if the given key is special and requires that we instead grab its owner
-
int
HBaseOperator::Repeat() Returns whether the operation is repeatable. This method has been deprecated.
-
int
HBaseOperator::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 *
HBaseOperator::Clone() virtual
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 anHBaseOperatorobject
-
void
HBaseOperator::SetFirstPoint(HPoint const &new_point) Sets the initial selection point.
-
HPoint const
HBaseOperator::GetFirstPoint() Returns the initial selection point.
-
void
HBaseOperator::SetNewPoint(HPoint const &new_point) Sets the current selection point.
-
HPoint const
HBaseOperator::GetNewPoint() Returns the current selection point.
-
HBaseView *
HBaseOperator::GetView() Returns a pointer to the view that this operator is associated with.
-
void
HBaseOperator::SetView(HBaseView *new_view) Sets the view that this operator is associated with.
-
virtual bool
HBaseOperator::OperatorStarted() virtual
Operator has been started if true, and has not been started if false.
-
void
HBaseOperator::SetOperatorStarted(bool val) Operator has been started if true, and has not been started if false.
-
void
HBaseOperator::SetMapTouchesToMouseEvents(bool val) Touch Events are mapped to mouse events if true, and are not if false.
-
HBaseOperator::HBaseOperator(HBaseView *view, int DoRepeat = 0, int DoCapture = 1) Constructs an
HBaseOperatorobjectParameters
view: A pointer to an
HBaseViewobject,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::~HBaseOperator() virtual
-
virtual int
HBaseOperator::OnMouseMove(HEventInfo &hevent) virtual
This method automatically checks the state of the left, middle and right mouse buttons (by looking at the
HEventInfoobject) 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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual char const *
HBaseOperator::GetName() virtual
Returns
A character pointer denoting the name of operator.
-
virtual int
HBaseOperator::OnLButtonDown(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnLButtonUp(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnLButtonDblClk(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnLButtonDownAndMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnMButtonDown(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnMButtonUp(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnMButtonDblClk(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnMButtonDownAndMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnRButtonDown(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnRButtonUp(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnRButtonDblClk(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnRButtonDownAndMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnLRButtonDownAndMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnNoButtonDownAndMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnTimer(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnKeyDown(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnKeyUp(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnMouseWheel(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnTouchesDown(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnTouchesMove(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HBaseOperator::OnTouchesUp(HEventInfo &hevent) virtual
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: AnHEventInfoobject containing information about the current eventReturns
AnHOperatorReturnindicating the status of the event.
Variables
-
bool
HBaseOperator::m_bOpStarted protected
boolIndicates whether the operator has already ‘started’.
Indicates whether the operator has been started; this should be set to true as soon as any of the event handling methods have been called
-
int
HBaseOperator::m_doRepeat protected
intInteger indicating if the operator is repeatable . This parameter has been deprecated.
-
int
HBaseOperator::m_doCapture protected
intInteger indicating whether to capture mouse on button down and release on button up. This parameter has been deprecated.
-
HPoint
HBaseOperator::m_ptFirst protected
Initial selection point.
-
HPoint
HBaseOperator::m_ptNew protected
Current selection point.
-
HBaseView *
HBaseOperator::m_pView protected
The HOOPS view corresponding to this operator.
-
bool
HBaseOperator::m_bMapTouchesToMouseEvents protected
boolIndicates if touch events are mapped to mouse events.
-
HShadowMode
HBaseOperator::m_TempShadowMode protected
stores original shadow mode
-
HCutGeometryVisibility
HBaseOperator::m_TempCutGeometryVisibility protected
stores original cut geometry visibility