HOpSelectArea
Functions
char const * |
|
int |
|
int |
|
Detailed Description
-
class HOpSelectArea : public HOpConstructRectangle
The HOpSelectArea class computes a selection list for objects inside a rectangular area.
HOpSelectArea employs all of the drawing functionality of HOpConstructRectangle to 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
Subclassed by HOpSelectAreaOOC< SelectionSet >
Public Functions
-
HOpSelectArea(HBaseView *view, int DoRepeat = 0, int DoCapture = 1)
Constructs an HOpSelectArea 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 ~HOpSelectArea()
-
virtual char const *GetName()
- Returns
A pointer to a character string denoting the name of the operator which is ‘HOpSelectArea’.
-
virtual int OnLButtonDown(HEventInfo &hevent)
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 – An HEventInfo object containing information about the current event.
- Returns
An HOperatorReturn indicating the status of the event.
-
virtual int OnLButtonUp(HEventInfo &hevent)
This method maps rectangle information from HOpConstructRectangle into 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 – An HEventInfo object containing information about the current event.
- Returns
An HOperatorReturn indicating the status of the event.
-
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 a copy of this operator