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

Detailed Description

This interface class allows an application to override the default highlighting styles within the MapLink Editor SDK.

An instance of an application class, derived from this class, may be passed to the TSLEditor. MapLink will take ownership of the class and will destroy it when the TSLEditor is deleted.

All methods should be overridden and implemented. See the individual method documentation for further details. Typically, any graphics that need drawing should be temporary and drawn using the facilities of the TSLRenderingInterface that may be queried from the TSLCustomHighlightRequest object.

Public Member Functions

 TSLCustomHighlight ()
 
virtual ~TSLCustomHighlight ()
 
virtual bool addToHighlightList (TSLCustomHighlightRequest *req, TSLEntity *e)=0
 
virtual bool adjustForHighlight (TSLCustomHighlightRequest *req, TSLEnvelope &env)=0
 
virtual bool clearHighlightList (TSLCustomHighlightRequest *req)=0
 
virtual bool displayHighlights (TSLCustomHighlightRequest *req, bool enabled)=0
 
virtual bool initialise (TSLCustomHighlightRequest *req)=0
 
virtual bool override (TSLCustomHighlightRequest *req, TSLEntity *entity)=0
 
virtual bool processLocator (TSLCustomHighlightRequest *req, const TSLLocatorEvent &event)=0
 
virtual bool refreshHighlights (TSLCustomHighlightRequest *req, const TSLEnvelope &extent)=0
 
virtual bool removeFromHighlightList (TSLCustomHighlightRequest *req, TSLEntity *e)=0
 

Constructor & Destructor Documentation

◆ TSLCustomHighlight()

TSLCustomHighlight::TSLCustomHighlight ( )

Constructor for Custom Highlight class

◆ ~TSLCustomHighlight()

virtual TSLCustomHighlight::~TSLCustomHighlight ( )
virtual

Virtual destructor for the custom highlight object

Member Function Documentation

◆ addToHighlightList()

virtual bool TSLCustomHighlight::addToHighlightList ( TSLCustomHighlightRequest * req,
TSLEntity * e )
pure virtual

Add the specified entity to the highlight list.

This may be called when an entity is created or when it is selected. It is expected that the method will use the facilities in the TSLCustomHighlightRequest object to add a highlight to the screen. It is the custom object's responsibility to take notice of the current enabled and override state.

Parameters
reqRequest handler for useful functions that the highlighting may require.
entityA pointer to the entity that should be added to the highlight list.
Returns
true on success, false otherwise.

◆ adjustForHighlight()

virtual bool TSLCustomHighlight::adjustForHighlight ( TSLCustomHighlightRequest * req,
TSLEnvelope & env )
pure virtual

Adjust the specified envelope for any highlighting that may surround it.

This may be called when an area of screen is to be cleared. The specified envelope is typically that of an entity, and should be adjusted so that if the area is cleared then any highlight will be erased. This must also erase any grab handles that may be drawn, such as those for scaling or rotating.

Parameters
reqRequest handler for useful functions that the highlighting may require.
envThe envelope that should be updated.
Returns
true on success, false otherwise.

◆ clearHighlightList()

virtual bool TSLCustomHighlight::clearHighlightList ( TSLCustomHighlightRequest * req)
pure virtual

Clear the highlight list.

This is usually triggered just before the select list is cleared. The custom object should remove all highlights from the drawing surface, typically by refreshing the area covered the currently highlighted objects. Note that such a refresh may cause other methods of the custom object to be triggered which should not draw the highlights again!

Parameters
reqRequest handler for useful functions that the highlighting may require.
Returns
true on success, false otherwise.

◆ displayHighlights()

virtual bool TSLCustomHighlight::displayHighlights ( TSLCustomHighlightRequest * req,
bool enabled )
pure virtual

Enable or disable the display of highlights

When an operation is displaying a dynamic echo, then it often makes no sense for highlights to be displayed. This method will be triggered by operations to provide such control. It is the custom object's responsibility to take notice of the current enabled and override state in other methods calls.

Parameters
reqRequest handler for useful functions that the highlighting may require.
enabledA flag indicating whether highlights should be displayed.
Returns
true on success, false otherwise.

◆ initialise()

virtual bool TSLCustomHighlight::initialise ( TSLCustomHighlightRequest * req)
pure virtual

Initialise call when custom highlight is added and the editor has completed its own initialisation.

Typically used to access entries in the configuration file and store them within the custom highlight object.

Parameters
reqRequest handler for useful functions that the highlighting may require.
Returns
true on success, false otherwise.

◆ override()

virtual bool TSLCustomHighlight::override ( TSLCustomHighlightRequest * req,
TSLEntity * entity )
pure virtual

Sets an override entity for highlighting

Overriding is typically used to cycle around the select list, entering some information for each entity.

Parameters
reqRequest handler for useful functions that the highlighting may require.
entityA pointer to the entity that should be highlighted. 0 is passed to remove any existing override.
Returns
true on success, false otherwise.

◆ processLocator()

virtual bool TSLCustomHighlight::processLocator ( TSLCustomHighlightRequest * req,
const TSLLocatorEvent & event )
pure virtual

Process a locator message.

This callback is provided so that the custom highlight manager may trap locator events in order to, for example, invoke an operation such as move, scale or rotate.

Parameters
reqRequest handler for useful functions that the highlighting may require.
eventA reference to the locator event object.
Returns
true if the locator was used by the custom highlight object, false otherwise. Note, if true is returned then the locator event is not passed on to the active operation.

◆ refreshHighlights()

virtual bool TSLCustomHighlight::refreshHighlights ( TSLCustomHighlightRequest * req,
const TSLEnvelope & extent )
pure virtual

Refresh any highlight that may intersect with the specified extent.

This is typically called on a window redraw. Note that some calls to the TSLCustomHighlightRequest will automatically trigger a call to this method. It is the custom object's responsibility to take notice of the current enabled and override state.

Parameters
reqRequest handler for useful functions that the highlighting may require.
extentThe extent that needs refreshing.
Returns
true on success, false otherwise.

◆ removeFromHighlightList()

virtual bool TSLCustomHighlight::removeFromHighlightList ( TSLCustomHighlightRequest * req,
TSLEntity * e )
pure virtual

Remove the specified entity from the highlight list.

This may be called when an entity is deleted, or when it is deselected. It is expected that the method will use the facilities in the TSLCustomHighlightRequest object to remove a current highlight from the screen. It is the custom object's responsibility to take notice of the current enabled and override state.

Parameters
reqRequest handler for useful functions that the highlighting may require.
entityA pointer to the entity that should be removed from the highlight list.
Returns
true on success, false otherwise.