![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class provides useful utility functions for the modes. It should not be created by an application.
An instance of this class will be made available in the 'm_display' protected member attribute of the TSLInteractionMode class.
Public Member Functions | |
virtual | ~TSLInteractionModeDisplay () |
virtual void | bufferingOff ()=0 |
virtual void | bufferingOn ()=0 |
virtual void | captureMouse ()=0 |
void | clearClipRectangle () |
void | clearEchoLine () |
void | clearEchoRectangle () |
virtual TSLInteractionModeDisplay * | clone (bool copyUserData=false)=0 |
virtual void | drawEchoLine ()=0 |
virtual void | drawEchoRectangle ()=0 |
virtual void | onSize (TSLDeviceUnits cx, TSLDeviceUnits cy)=0 |
virtual void | releaseMouse ()=0 |
void | resetMode (TSLButtonType button, TSLDeviceUnits xDU, TSLDeviceUnits yDU) |
void | setClipRectangle (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2) |
void | setEchoLine (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2) |
void | setEchoRectangle (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2) |
void | viewChanged (bool addToViewStack) |
TSLDrawingSurface * | drawingSurface () |
Protected Member Functions | |
TSLInteractionModeDisplay (TSLDrawingSurface *ds, TSLInteractionModeManager *manager) | |
virtual void | drawMagnifierToBuffer (TSLDrawableHandle buffer, TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2, TSLDeviceUnits width, TSLDeviceUnits height, bool restoreBackground, TSLDeviceUnits boundaryThickess, int boundaryRed, int boundaryGreen, int boundaryBlue)=0 |
virtual void | drawMagnifierToBuffer (TSLDeviceContext buffer, TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2, TSLDeviceUnits width, TSLDeviceUnits height, bool restoreBackground, TSLDeviceUnits boundaryThickess, int boundaryRed, int boundaryGreen, int boundaryBlue)=0 |
virtual void | magnify (TSLMagnifyingGlass *magnifier, bool restoreBackground)=0 |
virtual void | setupBackgroundBuffer (TSLDeviceUnits width, TSLDeviceUnits height)=0 |
Protected Attributes | |
TSLDeviceUnits | m_x1 |
TSLDeviceUnits | m_y1 |
TSLDeviceUnits | m_x2 |
TSLDeviceUnits | m_y2 |
bool | m_drawRect |
bool | m_drawLine |
TSLDrawingSurface * | m_drawingSurface |
TSLEnvelope | m_clipRectangle |
bool | m_clip |
TSLInteractionModeManager * | m_manager |
|
virtual |
Destructor for Interaction Mode display
|
protected |
Protected constructor to prevent instantiation of base class.
|
pure virtual |
Disables internal buffers - used by magnify mode.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
Enables internal buffers - used by magnify mode to avoid flickering.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
Captures the mouse to avoid losing release events if the mouse goes out of the window. Modes using this functionality must remember to release the mouse on the release event, or on deactivation.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
void TSLInteractionModeDisplay::clearClipRectangle | ( | ) |
Clears the current clip rectangle set using the setClipRectangle method.
void TSLInteractionModeDisplay::clearEchoLine | ( | ) |
Clears any echo line that may be drawn. Echo lines are drawn in XOR mode.
void TSLInteractionModeDisplay::clearEchoRectangle | ( | ) |
Clears any echo rectangle that may be drawn. Echo rectangles are drawn in XOR mode. If a mode is using echo styles, then this should be called in the onDraw method of the mode.
|
pure virtual |
Clones this display, including the drawing surface and attached data layers. This is used by the magnifier.
copyUserData | If true, the userID and userWord will be copied to the new surface. |
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
Draw any echo line that may be set. Echo lines are drawn in XOR mode. If a mode is using echo styles, then this should be called in the onDraw method of the mode.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
Draw any echo rectangle that may be set. Echo rectangles are drawn in XOR mode.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
inline |
Query the drawing surface that this display is attached to.
|
protectedpure virtual |
Internal method used to render the magnifying glass into the back buffer.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
protectedpure virtual |
Internal method used to render the magnifying glass into the back buffer.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
protectedpure virtual |
Internal method used to render the magnifying glass into the main window.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
onSize handler - used to resize any buffers that are used. If a mode is using buffering, then it must forward the size event to the display.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
|
pure virtual |
Release the mouse capture. Modes using this functionality must remember to release the mouse on the release event, or on deactivation.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
void TSLInteractionModeDisplay::resetMode | ( | TSLButtonType | button, |
TSLDeviceUnits | xDU, | ||
TSLDeviceUnits | yDU ) |
The mode should call this to request a reset back to the default mode.
button | If the reset was triggered by a button press, this should be the button type. Pass TSLButtonNone if the reset is occurring for some other reason. |
(xDU,yDU) | Position of button press that triggered the reset. Pass 0,0 of the reset is occurring for some other reason. |
void TSLInteractionModeDisplay::setClipRectangle | ( | TSLDeviceUnits | x1, |
TSLDeviceUnits | y1, | ||
TSLDeviceUnits | x2, | ||
TSLDeviceUnits | y2 ) |
Sets a clip rectangle on the display for when drawing the echo rectangle and echo line.
Use the clearClipRectangle to remove the current clip rectangle.
x1,y1 | The top left coordinate of the clip rectangle |
x2,y2 | The bottom right coordinate of the clip rectangle. |
void TSLInteractionModeDisplay::setEchoLine | ( | TSLDeviceUnits | x1, |
TSLDeviceUnits | y1, | ||
TSLDeviceUnits | x2, | ||
TSLDeviceUnits | y2 ) |
Set a line to be drawn for echo. The line is drawn in XOR mode.
(x1,y1) | Start of echo line in device units. |
(x2,y2) | End of echo line in device units. |
void TSLInteractionModeDisplay::setEchoRectangle | ( | TSLDeviceUnits | x1, |
TSLDeviceUnits | y1, | ||
TSLDeviceUnits | x2, | ||
TSLDeviceUnits | y2 ) |
Set a line to be drawn for echo. The line is drawn in XOR mode.
(x1,y1) | Bottom left of echo rectangle in device units. |
(x2,y2) | Top right of echo rectangle in device units. |
|
protectedpure virtual |
Internal method used to by the magnifying glass.
Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.
void TSLInteractionModeDisplay::viewChanged | ( | bool | addToViewStack | ) |
The mode should call this method to indicate that the view has changed. This will be passed on to the application request handler.
addToViewStack | Flag to indicate whether the current view extent should be added to the view stack. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |