HOpSelectArea
-
class
HOpSelectArea The
HOpSelectAreaclass computes a selection list for objects inside a rectangular area.HOpSelectAreaemploys all of the drawing functionality ofHOpConstructRectangleto define a temporary, overlayed rectangular selection area, then maps the rectangle information to the HOOPS routine HC_Compute_Selection_By_Area. This class provides the basic functionality for window selection. The operation consists of the following steps:- Left Button Down: first point of rectangle
- Left Button Down and Drag: rubberband rectangle to desired dimensions
- Left Button Up: rectangled completed and flushed from scene, selection list computed, objects highlighted, operation ended
More Detailed Description: see event methods
Inherits from:
HOpConstructRectangle
Methods
-
HOpSelectArea::HOpSelectArea(HBaseView *view, int DoRepeat = 0, int DoCapture = 1) Constructs an
HOpSelectAreaobjectParameters
view: A pointer to an
HBaseViewobjectDoRepeat: 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
HOpSelectArea::~HOpSelectArea() virtual
-
virtual char const *
HOpSelectArea::GetName() virtual
Returns
A pointer to a character string denoting the name of the operator which is ‘HOpSelectArea‘.
-
virtual int
HOpSelectArea::OnLButtonDown(HEventInfo &hevent) virtual
This method calls through to
HOpConstructRectangle‘s OnLButtonDown method to record the first point and initiates the rectangle drawing mechanism. Then it sets attribute values for color and visibility that are specific to the selection by area.Parameters
hevent: AnHEventInfoobject containing information about the current event.Returns
AnHOperatorReturnindicating the status of the event.
-
virtual int
HOpSelectArea::OnLButtonUp(HEventInfo &hevent) virtual
This method maps rectangle information from
HOpConstructRectangleinto the HOOPS routine HC_Compute_Selection_By_Area to update the selection set in the associated view. It also deselects any selection items that are not present in the current selection list.Parameters
hevent: AnHEventInfoobject containing information about the current event.Returns
AnHOperatorReturnindicating the status of the event.
-
virtual HBaseOperator *
HOpSelectArea::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 a copy of this operator