MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLCustomHighlightRequest Class Reference

Detailed Description

This class is passed to an application defined custom highlight object.

The methods in this class must be used by the custom highlight object to request that the Editor SDK perform various actions - such as redraw, or to access the select list.

Public Member Functions

bool activate (const char *name, void *data)
 
bool deactivate ()
 
bool entityInSelectList (TSLEntity *entity)
 
TSLEntityentityUnderCoord (const TSLCoord &coord)
 
TSLDataLayergetEditableDataLayer ()
 
TSLEntitySetgetEntitySet ()
 
int getNumSelected ()
 
TSLRenderingInterfacegetRenderingInterface ()
 
TSLEntitygetSelection (int n)
 
const char * lookupConfiguration (const char *key)
 
bool redraw (bool clear)
 
bool redraw2Extents (const TSLEnvelope &extent1, const TSLEnvelope &extent2, bool clear)
 
bool redrawEntityExtent (const TSLEntity *entity, bool clear)
 
bool redrawExtent (const TSLEnvelope &extent, bool clear)
 
bool setCursor (TSLCursorStyle style)
 

Member Function Documentation

◆ activate()

bool TSLCustomHighlightRequest::activate ( const char * name,
void * data )

Activate a different operation.

This method deactivates the current operation and activates the specified operation. It the specified operation is already active, then the operation is reactivated.

After calling this method, the user operation should immediately return control to the editor.

Parameters
nameName of new operation to activate.
dataAny operation specific data to pass to the operations activate method.
Returns
true if successful, false on failure.

◆ deactivate()

bool TSLCustomHighlightRequest::deactivate ( )

Deactivate the current operation.

This method deactivates the current operation and activates the default 'select' operation.

After calling this method, the user operation should immediately return control to the editor.

Returns true on success, false on failure.

◆ entityInSelectList()

bool TSLCustomHighlightRequest::entityInSelectList ( TSLEntity * entity)

Query whether an entity is in the select list

Returns true if the entity is in the select list, false otherwise

◆ entityUnderCoord()

TSLEntity * TSLCustomHighlightRequest::entityUnderCoord ( const TSLCoord & coord)

Query the entity under the cursor. Uses selection aperture and depth.

Parameters
coordPosition to test
Returns
the entity that would be selected under the specified cursor position.

◆ getEditableDataLayer()

TSLDataLayer * TSLCustomHighlightRequest::getEditableDataLayer ( )

Query data layer that editor is attached to.

Note that since an editor can be attached to a different drawing surface at any time, this handle should not be held across invocations of an operation.

Returns data layer currently being edited, NULL if none attached.

◆ getEntitySet()

TSLEntitySet * TSLCustomHighlightRequest::getEntitySet ( )

Query entity set that editor is editing.

The returned entity set will be the entity set belonging to the top-most visible, editable and selectable TSLStandard DataLayer.

The user operation may create or manipulate objects in the data layer.

Note that since an editor can be attached to a different drawing surface at any time, this handle should not be held across invocations of an operation.

Returns entity set currently being edited, NULL if no data layer attached.

◆ getNumSelected()

int TSLCustomHighlightRequest::getNumSelected ( )

Query the number of entities currently selected.

Returns the number of entities on the select list.

◆ getRenderingInterface()

TSLRenderingInterface * TSLCustomHighlightRequest::getRenderingInterface ( )

Query drawing surface that editor is attached to.

This is commonly used to allow user operations to perform coordinate transformations. Note that the TSLCustom HighlightRequest::redrawXxxx methods should be used to redraw areas, rather than calling the drawing surface methods directly.

Note that since an editor can be attached to a different drawing surface at any time, this handle should not be held across invocations of an operation.

Returns drawing surface currently being edited, NULL if none attached.

◆ getSelection()

TSLEntity * TSLCustomHighlightRequest::getSelection ( int n)

This method returns the Nth item in the select list.

Parameters
nIndex into the select list.
Returns
specified entity on the select list, NULL if index is out of range.

◆ lookupConfiguration()

const char * TSLCustomHighlightRequest::lookupConfiguration ( const char * key)

Lookup value associated with key in configuration file.

The configuration file supplied to the operation manager contains key/value pairs. This method call will lookup a value from the configuration file according to the specified key. This allows user-defined operations to have configuration information embedded in the configuration file.

Note that the value returned may be overwritten by subsequent calls to this method.

Parameters
keyKey to lookup from the configuration file.
Returns
pointer to associated value, NULL if not found.

◆ redraw()

bool TSLCustomHighlightRequest::redraw ( bool clear)

Redraw entire drawing surface.

Parameters
clearFlag indicating whether drawing surface should be cleared before redrawn.
Returns
true on success, false otherwise.

◆ redraw2Extents()

bool TSLCustomHighlightRequest::redraw2Extents ( const TSLEnvelope & extent1,
const TSLEnvelope & extent2,
bool clear )

Redraw two extents on drawing surface.

Redraws two extents on drawing surface. If the extents overlap, then they are combined and a single redraw takes place. This method is typically used when moving an entity, to erase the object from its old position and draw it in its new position.

Parameters
extent1Extent 1 to redraw.
extent2Extent 2 to redraw.
clearFlag indicating whether drawing surface should be cleared before redrawn.
Returns
true on success, false otherwise.

◆ redrawEntityExtent()

bool TSLCustomHighlightRequest::redrawEntityExtent ( const TSLEntity * entity,
bool clear )

Redraw the extent of an entity on the drawing surface.

Note that the extent of the entity is slightly increased by 2 pixels in order to handle thick edges.

Parameters
entityEntity whose extent to redraw.
clearFlag indicating whether drawing surface should be cleared before redrawn.
Returns
true on success, false otherwise.

◆ redrawExtent()

bool TSLCustomHighlightRequest::redrawExtent ( const TSLEnvelope & extent,
bool clear )

Redraw specified extent of drawing surface.

Parameters
extentExtent to redraw.
clearFlag indicating whether drawing surface should be cleared before being redrawn.
Returns
true on success, false otherwise.

◆ setCursor()

bool TSLCustomHighlightRequest::setCursor ( TSLCursorStyle style)

Request a cursor style that is appropriate to the current operation action. For example, this may be used to support grab handles on a highlight style, with user feedback via the cursor.

This method should be called to request that the user's application update the cursor. This is not mandatory, but can often give users better feedback.

Parameters
styleAction being performed.
Returns
true if successful, otherwise false.