Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpCreateRectangle Class Reference

The HOpCreateRectangle class draws a rectangle. More...

#include <HOpCreateRectangle.h>

Inheritance diagram for HOpCreateRectangle:

HOpConstructRectangle HBaseOperator

List of all members.

Public Member Functions

virtual HBaseOperatorClone ()
virtual const char * GetName ()
 HOpCreateRectangle (HBaseView *view, int DoRepeat=0, int DoCapture=1, bool UseCenterMarker=true)
virtual int OnLButtonUp (HEventInfo &hevent)


Detailed Description

The HOpCreateRectangle class draws a rectangle.

HOpCreateRectangle uses event information to insert a rectangle into the HOOPS Database. This provides the basic functionality for drawing a temporary, overlayed 2-D box outline in the view plane based on first and last pointer positions. The operation consists of the following steps:

  1. Left Button Down: Registers the first point of the rectangle.
  2. Left Button Down and Drag: Rubberbands the rectangle to the desired dimensions.
  3. Left Button Up: The rectangle finalized and the polyline primitive used to represent the rectangle is flushed from the scene and a new rectangle is inserted into the model.
More Detailed Description: see event methods.

Constructor & Destructor Documentation

HOpCreateRectangle::HOpCreateRectangle ( HBaseView view,
int  DoRepeat = 0,
int  DoCapture = 1,
bool  UseCenterMarker = true 
)

Constructs an HOpCreateRectangle 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.
UseCenterMarker Pass true if you want HOOPS to render a mark at the center of the rectangle.


Member Function Documentation

virtual HBaseOperator* HOpCreateRectangle::Clone (  )  [virtual]

Creates a new operator which is a copy of the current operator. The user is responsible for deleting the newly created operator.

Returns:
A pointer to the newly created HOpCreateRectangle object.

Reimplemented from HOpConstructRectangle.

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

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

Reimplemented from HOpConstructRectangle.

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

OnLButtonUp finalizes the size of the rectangle, cleans up the scene and inserts a new rectangle into the model.

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: