Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpSelectArea Class Reference

The HOpSelectArea class computes a selection list for objects inside a rectangular area. More...

#include <HOpSelectArea.h>

Inheritance diagram for HOpSelectArea:

HOpConstructRectangle HBaseOperator

List of all members.

Public Member Functions

virtual HBaseOperatorClone ()
virtual const char * GetName ()
 HOpSelectArea (HBaseView *view, int DoRepeat=0, int DoCapture=1)
virtual int OnLButtonDown (HEventInfo &hevent)
virtual int OnLButtonUp (HEventInfo &hevent)


Detailed Description

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:

  1. Left Button Down: first point of rectangle
  2. Left Button Down and Drag: rubberband rectangle to desired dimensions
  3. Left Button Up: rectangled completed and flushed from scene, selection list computed, objects highlighted, operation ended
More Detailed Description: see event methods

Constructor & Destructor Documentation

HOpSelectArea::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.


Member Function Documentation

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

Reimplemented from HOpConstructRectangle.

virtual const char* HOpSelectArea::GetName (  )  [virtual]

Returns:
A pointer to a character string denoting the name of the operator which is 'HOpSelectArea'.

Reimplemented from HOpConstructRectangle.

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 An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HOpConstructRectangle.

virtual int HOpSelectArea::OnLButtonUp ( HEventInfo hevent  )  [virtual]

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.

Reimplemented from HOpConstructRectangle.


The documentation for this class was generated from the following file: