![]() |
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 | ~TSL3DInteractionModeDisplay () |
virtual void | captureMouse ()=0 |
void | clearEchoLine () |
void | clearEchoRectangle () |
virtual void | drawEchoLine ()=0 |
virtual void | drawEchoRectangle ()=0 |
virtual void | releaseMouse ()=0 |
void | resetMode (TSLButtonType button, TSLDeviceUnits xDU, TSLDeviceUnits yDU) |
void | setEchoLine (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2) |
void | setEchoRectangle (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2) |
void | viewChanged (bool addToViewStack) |
TSL3DDrawingSurface * | drawingSurface () |
Protected Member Functions | |
TSL3DInteractionModeDisplay (TSL3DDrawingSurface *ds, TSL3DInteractionModeManager *manager) | |
Protected Attributes | |
TSLDeviceUnits | m_x1 |
TSLDeviceUnits | m_y1 |
TSLDeviceUnits | m_x2 |
TSLDeviceUnits | m_y2 |
bool | m_drawRect |
bool | m_drawLine |
TSL3DInteractionModeManager * | m_manager |
TSL3DDrawingSurface * | m_drawingSurface |
|
virtual |
|
protected |
|
pure virtual |
Capture the mouse so that subsequent events are sent to the application window, even though the cursor may move outside. This must be cleared using the 'releaseMouse' method.
Implemented in TSL3DInteractionModeDisplayNT, and TSL3DInteractionModeDisplayX11.
void TSL3DInteractionModeDisplay::clearEchoLine | ( | ) |
Clears any echo line that may be drawn. Echo lines are drawn in XOR mode.
void TSL3DInteractionModeDisplay::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 |
Draw any echo line that may be set. Echo lines are drawn in XOR mode.
Implemented in TSL3DInteractionModeDisplayNT, and TSL3DInteractionModeDisplayX11.
|
pure virtual |
Draw any echo rectangle that may be set. Echo rectangles are drawn in XOR mode.
Implemented in TSL3DInteractionModeDisplayNT, and TSL3DInteractionModeDisplayX11.
|
inline |
Query the drawing surface that this display is attached to.
|
pure virtual |
Release the mouse capture so that subsequent events are sent to the focus window.
Implemented in TSL3DInteractionModeDisplayNT, and TSL3DInteractionModeDisplayX11.
void TSL3DInteractionModeDisplay::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 TSL3DInteractionModeDisplay::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 TSL3DInteractionModeDisplay::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. |
void TSL3DInteractionModeDisplay::viewChanged | ( | bool | addToViewStack | ) |
This method should be triggered when the view has changed. This triggers the Mode manager to return true to the application, thus forcing a redraw. If the change in view is to be added to the view stack, then this method should be passed true.
addToViewStack | True if the new view should be added to the view stack, false otherwise. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |