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

Detailed Description

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 TSLInteractionModeDisplayclone (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)
 
TSLDrawingSurfacedrawingSurface ()
 

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
 
TSLDrawingSurfacem_drawingSurface
 
TSLEnvelope m_clipRectangle
 
bool m_clip
 
TSLInteractionModeManagerm_manager
 

Constructor & Destructor Documentation

◆ ~TSLInteractionModeDisplay()

virtual TSLInteractionModeDisplay::~TSLInteractionModeDisplay ( )
virtual

Destructor for Interaction Mode display

◆ TSLInteractionModeDisplay()

TSLInteractionModeDisplay::TSLInteractionModeDisplay ( TSLDrawingSurface * ds,
TSLInteractionModeManager * manager )
protected

Protected constructor to prevent instantiation of base class.

Member Function Documentation

◆ bufferingOff()

virtual void TSLInteractionModeDisplay::bufferingOff ( )
pure virtual

Disables internal buffers - used by magnify mode.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ bufferingOn()

virtual void TSLInteractionModeDisplay::bufferingOn ( )
pure virtual

Enables internal buffers - used by magnify mode to avoid flickering.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ captureMouse()

virtual void TSLInteractionModeDisplay::captureMouse ( )
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.

◆ clearClipRectangle()

void TSLInteractionModeDisplay::clearClipRectangle ( )

Clears the current clip rectangle set using the setClipRectangle method.

◆ clearEchoLine()

void TSLInteractionModeDisplay::clearEchoLine ( )

Clears any echo line that may be drawn. Echo lines are drawn in XOR mode.

◆ clearEchoRectangle()

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.

◆ clone()

virtual TSLInteractionModeDisplay * TSLInteractionModeDisplay::clone ( bool copyUserData = false)
pure virtual

Clones this display, including the drawing surface and attached data layers. This is used by the magnifier.

Parameters
copyUserDataIf true, the userID and userWord will be copied to the new surface.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ drawEchoLine()

virtual void TSLInteractionModeDisplay::drawEchoLine ( )
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.

◆ drawEchoRectangle()

virtual void TSLInteractionModeDisplay::drawEchoRectangle ( )
pure virtual

Draw any echo rectangle that may be set. Echo rectangles are drawn in XOR mode.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ drawingSurface()

TSLDrawingSurface * TSLInteractionModeDisplay::drawingSurface ( )
inline

Query the drawing surface that this display is attached to.

◆ drawMagnifierToBuffer() [1/2]

virtual void TSLInteractionModeDisplay::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 )
protectedpure virtual

Internal method used to render the magnifying glass into the back buffer.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ drawMagnifierToBuffer() [2/2]

virtual void TSLInteractionModeDisplay::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 )
protectedpure virtual

Internal method used to render the magnifying glass into the back buffer.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ magnify()

virtual void TSLInteractionModeDisplay::magnify ( TSLMagnifyingGlass * magnifier,
bool restoreBackground )
protectedpure virtual

Internal method used to render the magnifying glass into the main window.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ onSize()

virtual void TSLInteractionModeDisplay::onSize ( TSLDeviceUnits cx,
TSLDeviceUnits cy )
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.

◆ releaseMouse()

virtual void TSLInteractionModeDisplay::releaseMouse ( )
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.

◆ resetMode()

void TSLInteractionModeDisplay::resetMode ( TSLButtonType button,
TSLDeviceUnits xDU,
TSLDeviceUnits yDU )

The mode should call this to request a reset back to the default mode.

Parameters
buttonIf 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.

◆ setClipRectangle()

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.

Parameters
x1,y1The top left coordinate of the clip rectangle
x2,y2The bottom right coordinate of the clip rectangle.

◆ setEchoLine()

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.

Parameters
(x1,y1)Start of echo line in device units.
(x2,y2)End of echo line in device units.

◆ setEchoRectangle()

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.

Parameters
(x1,y1)Bottom left of echo rectangle in device units.
(x2,y2)Top right of echo rectangle in device units.

◆ setupBackgroundBuffer()

virtual void TSLInteractionModeDisplay::setupBackgroundBuffer ( TSLDeviceUnits width,
TSLDeviceUnits height )
protectedpure virtual

Internal method used to by the magnifying glass.

Implemented in TSLInteractionModeDisplayGeneric, TSLInteractionModeDisplayNT, and TSLInteractionModeDisplayX11.

◆ viewChanged()

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.

Parameters
addToViewStackFlag to indicate whether the current view extent should be added to the view stack.

Member Data Documentation

◆ m_clip

bool TSLInteractionModeDisplay::m_clip
protected

◆ m_clipRectangle

TSLEnvelope TSLInteractionModeDisplay::m_clipRectangle
protected

◆ m_drawingSurface

TSLDrawingSurface* TSLInteractionModeDisplay::m_drawingSurface
protected

◆ m_drawLine

bool TSLInteractionModeDisplay::m_drawLine
protected

◆ m_drawRect

bool TSLInteractionModeDisplay::m_drawRect
protected

◆ m_manager

TSLInteractionModeManager* TSLInteractionModeDisplay::m_manager
protected

◆ m_x1

TSLDeviceUnits TSLInteractionModeDisplay::m_x1
protected

◆ m_x2

TSLDeviceUnits TSLInteractionModeDisplay::m_x2
protected

◆ m_y1

TSLDeviceUnits TSLInteractionModeDisplay::m_y1
protected

◆ m_y2

TSLDeviceUnits TSLInteractionModeDisplay::m_y2
protected