![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
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) |
TSLEntity * | entityUnderCoord (const TSLCoord &coord) |
TSLDataLayer * | getEditableDataLayer () |
TSLEntitySet * | getEntitySet () |
int | getNumSelected () |
TSLRenderingInterface * | getRenderingInterface () |
TSLEntity * | getSelection (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) |
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.
name | Name of new operation to activate. |
data | Any operation specific data to pass to the operations activate method. |
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.
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
Query the entity under the cursor. Uses selection aperture and depth.
coord | Position to test |
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.
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.
int TSLCustomHighlightRequest::getNumSelected | ( | ) |
Query the number of entities currently selected.
Returns the number of entities on the select list.
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.
TSLEntity * TSLCustomHighlightRequest::getSelection | ( | int | n | ) |
This method returns the Nth item in the select list.
n | Index into the select list. |
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.
key | Key to lookup from the configuration file. |
bool TSLCustomHighlightRequest::redraw | ( | bool | clear | ) |
Redraw entire drawing surface.
clear | Flag indicating whether drawing surface should be cleared before redrawn. |
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.
extent1 | Extent 1 to redraw. |
extent2 | Extent 2 to redraw. |
clear | Flag indicating whether drawing surface should be cleared before redrawn. |
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.
entity | Entity whose extent to redraw. |
clear | Flag indicating whether drawing surface should be cleared before redrawn. |
bool TSLCustomHighlightRequest::redrawExtent | ( | const TSLEnvelope & | extent, |
bool | clear ) |
Redraw specified extent of drawing surface.
extent | Extent to redraw. |
clear | Flag indicating whether drawing surface should be cleared before being redrawn. |
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.
style | Action being performed. |