# HOpMarkupRectangle

## Functions

| `HOpMarkupRectangle`
| `~HOpMarkupRectangle`
const char * | `GetName`
int | `OnLButtonUp`
HBaseOperator * | `Clone`

## Detailed Description

class HOpMarkupRectangle : public HOpConstructRectangle

  The HOpMarkupRectangle class inserts a 2D rectange into a markup layer. If a markup layer is already active then the operator will use that layer otherwise the operator will create a new, unamed layer.

  HOpMarkupRectangle implements three mouse event methods defined on the base class and maps the event information to operator routines. This operation consists of the following steps:

  1. Left Button Down: register corner of rectangle

  2. Left Button Down and Drag: create an appropriately sized rectangle in the contruction layer

  3. Left Button Up: depending on existence of an active markup layer it either opens the existing or creates a new markup layer and inserts appropraitely sized rectangle into it

  More Detailed Description: see event methods

  Public Functions

  HOpMarkupRectangle(HBaseView *view, int DoRepeat = 0, int DoCapture = 1)

    constructor

  virtual ~HOpMarkupRectangle()
  virtual const char *GetName()
    Returns

      A pointer to a character string denoting the name of the operator, which is ‘HOpMarkupRectangle’

  virtual int OnLButtonUp(HEventInfo &hevent)

    OnLButtonUp maps rectangle information from HOpConstructRectangle into the HOOPS routine HC_Compute_Selection_By_Area. This function also deselects any selected items that are not present in the current selection list.

    Parameters

      hevent – An HEventInfo object containing information about the current event.

    Returns

      A value indicating the result of the event handling.

  virtual HBaseOperator *Clone()

    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 HOpConstructRectangle object.