Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvSelectionInterface Class Referenceabstract

Interface used to create selection objects. More...

#include <ilviews/intrface/select.h>

Public Member Functions

virtual IlvDrawSelectionmakeSelection (IlvDisplay *display, IlvGraphic *obj) const =0
 Returns the selection object for a given graphic object. More...
 

Detailed Description

Interface used to create selection objects.

Library: views

This abstract class provides an interface to create the selection object that must be associated with a graphic object. The selection object is used to highlight and manipulate the selected object.

Each subclass must provide an implementation for the IlvSelectionInterface::makeSelection() method. Each graphic class can then be associated with a specific IlvSelectionInterface subclass using the DeclareInterface() and IlvRegisterInterface() macros.

First, add the following in the class declaration:

class MyGraphicClass : public IlvSimpleGraphic {
...
DeclareInterface(Selection);
...
};

Then, add the following in the implementation file, outside the body of a function:

IlvRegisterInterface(Selection,
MyGraphicClass,
MySelectionInterfaceClass);
See also
IlvGraphic.

Member Function Documentation

◆ makeSelection()

virtual IlvDrawSelection* IlvSelectionInterface::makeSelection ( IlvDisplay display,
IlvGraphic obj 
) const
pure virtual

Returns the selection object for a given graphic object.

Parameters
displayThe IlvDisplay used to draw the selection object.
objThe graphic object being considered.
Returns
The selection object for the obj graphic object.
IlvSimpleGraphic
Graphic class.
Definition: graphic.h:2613