MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLEditorRequest Class Reference
Inheritance diagram for TSLEditorRequest:

Detailed Description

This component handles the exchange of information between the editor and the user.

The TSLEditor must be paired with an object derived from TSLEditorRequest. The methods of the request object are invoked by the TSLEditor component when information needs to be requested from or sent to the user.

Public Member Functions

 TSLEditorRequest ()
 
virtual ~TSLEditorRequest ()
 
virtual bool cancelDialog ()
 
virtual bool cancelText ()
 
virtual bool displayError (const char *message)
 
virtual bool displayPrompt (const char *message)
 
virtual bool onChanged (bool sts) const
 
virtual bool onCursorMovement (const char *displayString, double val1, double val2) const
 
virtual bool onDrawTMC (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, bool clearBackground, bool updateExtentOnly)
 
virtual void onEditorAttachmentChanged ()
 
virtual bool onOperationDeactivated ()
 
virtual bool onRedraw (const TSLEnvelope *extent) const
 
virtual bool onSelectionChanged (int numEntities, int depth)
 
virtual bool requestDialog (const char *prompt, const char *label1, const char *label2, const char *label3, const char *label4)
 
virtual bool requestText (const char *prompt, const char *initialValue)
 
virtual bool setCursor (TSLCursorStyle style)
 

Public Attributes

TSLEditorm_editor
 

Constructor & Destructor Documentation

◆ TSLEditorRequest()

TSLEditorRequest::TSLEditorRequest ( )

Default constructor for the TSLEditorRequest class.

◆ ~TSLEditorRequest()

virtual TSLEditorRequest::~TSLEditorRequest ( )
virtual

The destructor for the TSLEditorRequest class.

Member Function Documentation

◆ cancelDialog()

virtual bool TSLEditorRequest::cancelDialog ( )
virtual

Cancel the current dialog request.

This method is called by the editor to cancel the current dialog request. The client application should NOT call the dialogEntered method.

Returns true if successfully cancelled, otherwise false.

◆ cancelText()

virtual bool TSLEditorRequest::cancelText ( )
virtual

Cancel the current text request.

This method is called to cancel the current text request. The client application should NOT call the textEntered method.

Returns true if successfully cancelled, otherwise false.

◆ displayError()

virtual bool TSLEditorRequest::displayError ( const char * message)
virtual

Display an error message.

This method is called to request that the user's application display an error message.

Parameters
messageA pointer to a string containing the error message.
Returns
true if successful, otherwise false.

◆ displayPrompt()

virtual bool TSLEditorRequest::displayPrompt ( const char * message)
virtual

Display a prompt to the user.

This method is called to request that the user's application display a prompt message.

Parameters
messageA pointer to the string containing the text of user prompt.
Returns
true if successful, otherwise false.

Reimplemented in TSLInteractionModeEditRequest.

◆ onChanged()

virtual bool TSLEditorRequest::onChanged ( bool sts) const
virtual

This method is triggered to indicate that the changed flag has been altered.

Parameters
stsIndicates the status of the changed flag.
Returns
true if successful, otherwise false.

◆ onCursorMovement()

virtual bool TSLEditorRequest::onCursorMovement ( const char * displayString,
double val1,
double val2 ) const
virtual

This method is triggered to indicate that the cursor has moved. The meanings of the parameters are configured using the TSLEditor::cursorMovementConfig method

Parameters
displayStringText string to be displayed, according to configuration via cursorMovementConfig.
val1First value of the cursor coordinate used for display string.
val2Second value of the cursor coordinate used for display string.
Returns
true if successful, otherwise false.

◆ onDrawTMC()

virtual bool TSLEditorRequest::onDrawTMC ( TSLTMC x1,
TSLTMC y1,
TSLTMC x2,
TSLTMC y2,
bool clearBackground,
bool updateExtentOnly )
virtual

This method will be called when the editor requires the underlying drawing surface to redraw the specified extent. A client application could use it to re-direct the draw call to another drawing surface or perform some other custom action.

If a client application does the redrawing itself, then it should return true from this call, otherwise it should return false so that MapLink will perform the redraw itself.

Parameters
x1The minimum X value of the draw extent in TMC units
y1The minimum Y value of the draw extent in TMC units
x2The maximum X value of the draw extent in TMC units
y2The maximum Y value of the draw extent in TMC units
clearBackgroundIf true, this implies that the specified area should be cleared before drawing any of the data.
updateExtentOnlyIf true, this implies that the updates to buffers and the window should be clipped to the specified extent, otherwise only updates to the window are clipped.

◆ onEditorAttachmentChanged()

virtual void TSLEditorRequest::onEditorAttachmentChanged ( )
virtual

This method is called whenever the attached drawing surface changes. The user can then query the attached drawing surface from the editor. For most uses of the editor this callback need not be overridden, it is intended for cases where the editor may be attached to difference drawing surface during the workflow of the using application.

◆ onOperationDeactivated()

virtual bool TSLEditorRequest::onOperationDeactivated ( )
virtual

Called to indicate that the current operation has been deactivated.

This method is called by the editor to inform the user's application that the current operation has been deactivated and that the default select operation is now active.

Returns true if successful, otherwise false.

◆ onRedraw()

virtual bool TSLEditorRequest::onRedraw ( const TSLEnvelope * extent) const
virtual

Called when editor requests a redraw of specified extent.

This method is triggered to indicate that the editor has requested a redraw of the specified extent. If the extent is NULL then the entire drawing Surface has been redrawn.

Parameters
extentSpecifies the extent of the requested redraw.
Returns
true if successful, false otherwise.

◆ onSelectionChanged()

virtual bool TSLEditorRequest::onSelectionChanged ( int numEntities,
int depth )
virtual

Called to indicate a change in the selection list.

This method is called by the editor to inform the user's application of the current select list status.

Parameters
numEntitiesThe number of selected entities.
depthThe select depth.
Returns
true if successful, otherwise false.

◆ requestDialog()

virtual bool TSLEditorRequest::requestDialog ( const char * prompt,
const char * label1,
const char * label2,
const char * label3,
const char * label4 )
virtual

Request user input from a dialog box.

This method requests that the user select one of the specified choices. An empty string indicates that the button should not be shown.

Parameters
promptThe prompt requesting a user selection.
label1The text label for button 1.
label2The text label for button 2.
label3The text label for button 3.
label4The text label for button 4.
Returns
true on success, otherwise false.

◆ requestText()

virtual bool TSLEditorRequest::requestText ( const char * prompt,
const char * initialValue )
virtual

Request text input from the user.

This method is called to request that the client application ask the user to enter some text.

The client application should called the textEntered method when the text has been entered by the user.

prompt: A pointer to the string prompting the user for input.

initialValue: A pointer to the initial value of the text field.

Returns true on success, otherwise false.

◆ setCursor()

virtual bool TSLEditorRequest::setCursor ( TSLCursorStyle style)
virtual

Request a cursor style that is appropriate to the current operation action.

This method is 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.

Reimplemented in TSLInteractionModeEditRequest.

Member Data Documentation

◆ m_editor

TSLEditor* TSLEditorRequest::m_editor

Data Members for Associations