#include <TdkDisplay.h>
Inheritance diagram for TdkDisplay:

Public Member Functions | |
| TdkDisplay (TdkCanvas *canvas) | |
| virtual void | fit () |
| Zoom to a level where all objects in the map can be seen. | |
| virtual void | zoomArea (double x0, double y0, double x1, double y1) |
| Zoom to a given area. | |
| virtual void | zoom (double factor) |
| Zoom by a fixed factor maintaining the center location. | |
| virtual void | zoom (double xc, double yc, double factor) |
| Zoom by a fixed factor. | |
| virtual void | zoomIn (double factor) |
| Zoom in by a fixed factor maintaining the center location. | |
| virtual void | zoomIn (double xc, double yc, double factor) |
| Zoom in by a fixed factor. | |
| virtual void | zoomOut (double factor) |
| Zoom out by a fixed factor maintaining the center location. | |
| virtual void | zoomOut (double xc, double yc, double factor) |
| Zoom out by a fixed factor. | |
| virtual void | pan (double dx, double dy) |
| Pan (drag) the map in some direction. | |
| virtual void | draw () |
| Redraws the map (by getting all the information from the database again). | |
| virtual void | refresh () |
| Puts in the canvas the image of the last drawn map. | |
| virtual void | resize (int xmin, int ymin, int xmax, int ymax, TdkResizeMethods met=rsmPreserveScalePos) |
| Resizes the display area. | |
| virtual void | setScale (double scale) |
| virtual double | getScale () |
| Gets the map's actual visualization scale. | |
| virtual void | maximize (TdkResizeMethods met=rsmPreserveScalePos) |
| Maximizes the display area. | |
| virtual void | viewport2Window (double vx, double vy, double &mx, double &my) |
| Transform viewport(pixel) coordinates into world coordinates. | |
| virtual void | viewport2Window (TeBox &box) |
| virtual void | window2Viewport (double mx, double my, double &vx, double &vy) |
| Transform worlds coordinates into viewport(pixel) coordinates. | |
| virtual void | window2Viewport (TeBox &box) |
| virtual void | getCenter (double &x, double &y) |
| virtual TdkCanvas * | getCanvas () |
| Gets the canvas associated with the map (the canvas where the map is drawn). | |
| virtual void | setBackColor (const TeColor &bc) |
| virtual TeColor & | getBackColor () |
| virtual void | setViewport (const TeBox &viewport) |
| virtual TeBox & | getViewport () |
| virtual void | getViewport (double &x1, double &y1, double &x2, double &y2) |
| virtual void | setWindow (const TeBox &window) |
| virtual TeBox & | getWindow () |
| virtual void | getWindow (double &x1, double &y1, double &x2, double &y2) |
| virtual void | update () |
| virtual void | setClipArea (double x1, double y1, double x2, double y2) |
| virtual void | setClipPolygon (TePolygon poly) |
| virtual void | setBorder (double border) |
| Sets the width of the map display component. | |
| virtual double | getBorder () const |
| Gets the width of the map display component. | |
| virtual void | setMaxNumberOfPixmaps (const int &num) |
| Sets the maximum number of cached pixmaps allowed. | |
Cached Pixmaps Methods | |
Methods related to management of cached pixmaps. | |
| virtual void | addCachedPixmap (const string &pixName, const TeBox &box) |
| Adds a new pixmap in pixmap set. | |
| virtual void | removeCachedPixmap (const string &pixName) |
| Removes a pixmap in pixmap set. | |
| virtual TdkCachedPixmap | getCachedPixmap (const string &pixName) |
| Retrieves the pixmap identified by the string pixName. | |
| virtual void | updateCachedPixmap (const string &pixName, const TdkCachedPixmap &cPix) |
| Updates a cached pixmap in the pixmap set. | |
| virtual void | cleanCachedPixmaps () |
| Cleans the pixmap set. Removes all pixmaps from pixmap set. | |
| virtual void | setEnabledCachedPixmaps (const bool &state) |
| Enables the cached pixmaps management. | |
| virtual bool | isCachedPixmapEnabled () |
| Retrieves information about cached pixmaps management enabling. True if is enabled, False otherwise. | |
Protected Member Functions | |
| TdkDisplay () | |
| virtual void | updateViewport () |
| virtual void | updateViewport (double x1, double y1, double x2, double y2) |
| virtual void | updateWindow () |
| virtual void | updateWindow (double x1, double y1, double x2, double y2) |
| virtual void | resizeFit (int xmin, int ymin, int xmax, int ymax) |
| virtual void | resizePreserveScalePos (int xmin, int ymin, int xmax, int ymax) |
| virtual void | resizePreserveScaleCenter (int xmin, int ymin, int xmax, int ymax) |
| virtual void | handleVSEvent (TdkEvent &event) |
| virtual void | handleVSEvent (TdkPointFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkPointSetFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkLineFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkRectFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkPolylineFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkSelectedFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkTranslateFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkScaleFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkRotateFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkEditObjectPointFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkLineEditFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkPolygonEditFeedbackEvent &event) |
| virtual void | handleVSEvent (TdkWindow2ViewportEvent &event) |
| virtual void | handleVSEvent (TdkViewport2WindowEvent &event) |
| virtual void | handleVOEvent (TdkEvent &event) |
| virtual void | viewportChanged () |
| This method is called when the visible area changed, and updates the pixmap in the set. | |
Protected Attributes | |
| TdkCanvas * | canvas_ |
| Map view associated canvas. | |
| TeColor | backColor_ |
| TeBox | window_ |
| TeBox | viewport_ |
| double | border_ |
Private Attributes | |
| TdkCachedPixMap | _cachedPixmaps |
| Map of cached pixmaps. | |
| unsigned int | _numberOfCachedPixmaps |
| Number of cached pixmaps used. | |
| unsigned int | _maxnumberOfCachedPixmaps |
| Maximum number of cached pixmaps allowed. | |
| bool | _enableCachedPixmap |
| True - cached pixmaps management enabled, False otherwise. | |
| TdkDisplay::TdkDisplay | ( | TdkCanvas * | canvas | ) | [inline] |
| TdkDisplay::TdkDisplay | ( | ) | [inline, protected] |
| virtual void TdkDisplay::fit | ( | ) | [inline, virtual] |
Zoom to a level where all objects in the map can be seen.
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| virtual void TdkDisplay::zoomArea | ( | double | x0, | |
| double | y0, | |||
| double | x1, | |||
| double | y1 | |||
| ) | [inline, virtual] |
Zoom to a given area.
| x0 | X world coordinate of the location at the top left corner of the area. | |
| y0 | Y world coordinate of the location at the top left corner of the area. | |
| x1 | X world coordinate of the location at the bottom right corner of the area. | |
| y1 | Y world coordinate of the location at the bottom right corner of the area. |
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| virtual void TdkDisplay::zoom | ( | double | factor | ) | [inline, virtual] |
Zoom by a fixed factor maintaining the center location.
| factor | Zoom factor. |
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| virtual void TdkDisplay::zoom | ( | double | xc, | |
| double | yc, | |||
| double | factor | |||
| ) | [inline, virtual] |
Zoom by a fixed factor.
| xc | X world coordinate of the location to be centralized in the new zoom level. | |
| yc | Y world coordinate of the location to be centralized in the new zoom level. | |
| factor | Zoom factor. |
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| void TdkDisplay::zoomIn | ( | double | factor | ) | [virtual] |
Zoom in by a fixed factor maintaining the center location.
| factor | Zoom factor. |
| void TdkDisplay::zoomIn | ( | double | xc, | |
| double | yc, | |||
| double | factor | |||
| ) | [virtual] |
Zoom in by a fixed factor.
| xc | X world coordinate of the location to be centralized in the new zoom level. | |
| yc | Y world coordinate of the location to be centralized in the new zoom level. | |
| factor | Zoom factor. |
| void TdkDisplay::zoomOut | ( | double | factor | ) | [virtual] |
Zoom out by a fixed factor maintaining the center location.
| factor | Zoom factor. |
| void TdkDisplay::zoomOut | ( | double | xc, | |
| double | yc, | |||
| double | factor | |||
| ) | [virtual] |
Zoom out by a fixed factor.
| xc | X world coordinate of the location to be centralized in the new zoom level. | |
| yc | Y world coordinate of the location to be centralized in the new zoom level. | |
| factor | Zoom factor. |
| virtual void TdkDisplay::pan | ( | double | dx, | |
| double | dy | |||
| ) | [inline, virtual] |
Pan (drag) the map in some direction.
| dx | Horizontal deslocation in world coordinates. | |
| dy | Vertical deslocation in world coordinates. |
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| virtual void TdkDisplay::draw | ( | ) | [inline, virtual] |
Redraws the map (by getting all the information from the database again).
Reimplemented in TdkJNIMapDisplay, TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| void TdkDisplay::refresh | ( | ) | [virtual] |
| void TdkDisplay::resize | ( | int | xmin, | |
| int | ymin, | |||
| int | xmax, | |||
| int | ymax, | |||
| TdkResizeMethods | met = rsmPreserveScalePos | |||
| ) | [virtual] |
Resizes the display area.
| xmin | X of top left coordinate in pixels. | |
| ymin | Y of top left coordinate in pixels. | |
| xmax | X of bottom right coordinate in pixels. | |
| ymax | Y of bottom right coordinate in pixels. | |
| met | Resize method. |
Reimplemented in TdkLayoutDisplay, and TdkMapDisplay.
| void TdkDisplay::setScale | ( | double | scale | ) | [virtual] |
| double TdkDisplay::getScale | ( | ) | [virtual] |
Gets the map's actual visualization scale.
| void TdkDisplay::maximize | ( | TdkResizeMethods | met = rsmPreserveScalePos |
) | [virtual] |
Maximizes the display area.
| met | Resize method. |
| void TdkDisplay::viewport2Window | ( | double | vx, | |
| double | vy, | |||
| double & | mx, | |||
| double & | my | |||
| ) | [virtual] |
Transform viewport(pixel) coordinates into world coordinates.
| vx | X coordinate in pixels. | |
| vy | Y coordinate in pixels. | |
| mx | Resulting x world coordinate. | |
| my | Resulting y world coordinate. |
| void TdkDisplay::viewport2Window | ( | TeBox & | box | ) | [virtual] |
| void TdkDisplay::window2Viewport | ( | double | mx, | |
| double | my, | |||
| double & | vx, | |||
| double & | vy | |||
| ) | [virtual] |
Transform worlds coordinates into viewport(pixel) coordinates.
| mx | X world coordinate. | |
| my | Y world coordinate. | |
| vx | Resulting x coordinate in pixels. | |
| vy | Resulting y coordinate in pixels. |
| void TdkDisplay::window2Viewport | ( | TeBox & | box | ) | [virtual] |
| void TdkDisplay::getCenter | ( | double & | x, | |
| double & | y | |||
| ) | [virtual] |
Reimplemented in TdkPrintPreviewDisplay.
| TdkCanvas * TdkDisplay::getCanvas | ( | ) | [inline, virtual] |
Gets the canvas associated with the map (the canvas where the map is drawn).
| void TdkDisplay::setBackColor | ( | const TeColor & | bc | ) | [inline, virtual] |
| TeColor & TdkDisplay::getBackColor | ( | ) | [inline, virtual] |
| void TdkDisplay::setViewport | ( | const TeBox & | viewport | ) | [inline, virtual] |
| TeBox & TdkDisplay::getViewport | ( | ) | [inline, virtual] |
| void TdkDisplay::getViewport | ( | double & | x1, | |
| double & | y1, | |||
| double & | x2, | |||
| double & | y2 | |||
| ) | [inline, virtual] |
| void TdkDisplay::setWindow | ( | const TeBox & | window | ) | [inline, virtual] |
| TeBox & TdkDisplay::getWindow | ( | ) | [inline, virtual] |
| void TdkDisplay::getWindow | ( | double & | x1, | |
| double & | y1, | |||
| double & | x2, | |||
| double & | y2 | |||
| ) | [inline, virtual] |
| void TdkDisplay::update | ( | ) | [inline, virtual] |
| void TdkDisplay::setClipArea | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2 | |||
| ) | [inline, virtual] |
| void TdkDisplay::setClipPolygon | ( | TePolygon | poly | ) | [inline, virtual] |
| void TdkDisplay::setBorder | ( | double | border | ) | [virtual] |
Sets the width of the map display component.
| border | Border width on % of map bouding box. |
| double TdkDisplay::getBorder | ( | ) | const [virtual] |
Gets the width of the map display component.
| void TdkDisplay::addCachedPixmap | ( | const string & | pixName, | |
| const TeBox & | box | |||
| ) | [virtual] |
Adds a new pixmap in pixmap set.
| pixName | The name of pixmap created. This is an identifier of new pixmap. | |
| box | Visible area. Box of the area painted in the pixmap created. |
| void TdkDisplay::removeCachedPixmap | ( | const string & | pixName | ) | [virtual] |
Removes a pixmap in pixmap set.
| pixName | The name of pixmap to be removed. This is a pixmap identifier. |
| TdkCachedPixmap TdkDisplay::getCachedPixmap | ( | const string & | pixName | ) | [virtual] |
Retrieves the pixmap identified by the string pixName.
| pixName | The name of pixmap. Name identifies the pixmap in the map. |
| void TdkDisplay::updateCachedPixmap | ( | const string & | pixName, | |
| const TdkCachedPixmap & | cPix | |||
| ) | [virtual] |
Updates a cached pixmap in the pixmap set.
| pixName | Identifier of pixmap. | |
| cPix | Information about the pixmap to change. |
| void TdkDisplay::cleanCachedPixmaps | ( | ) | [virtual] |
Cleans the pixmap set. Removes all pixmaps from pixmap set.
| void TdkDisplay::setEnabledCachedPixmaps | ( | const bool & | state | ) | [virtual] |
Enables the cached pixmaps management.
| state | True - use cached pixmaps, Fals - not use cached pixmaps. |
| bool TdkDisplay::isCachedPixmapEnabled | ( | ) | [virtual] |
Retrieves information about cached pixmaps management enabling. True if is enabled, False otherwise.
| void TdkDisplay::setMaxNumberOfPixmaps | ( | const int & | num | ) | [virtual] |
Sets the maximum number of cached pixmaps allowed.
| num | Maximum number of cached pixmaps in pixmaps set. |
| void TdkDisplay::updateViewport | ( | ) | [inline, protected, virtual] |
| void TdkDisplay::updateViewport | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2 | |||
| ) | [inline, protected, virtual] |
| void TdkDisplay::updateWindow | ( | ) | [inline, protected, virtual] |
| void TdkDisplay::updateWindow | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2 | |||
| ) | [inline, protected, virtual] |
| void TdkDisplay::resizeFit | ( | int | xmin, | |
| int | ymin, | |||
| int | xmax, | |||
| int | ymax | |||
| ) | [protected, virtual] |
| void TdkDisplay::resizePreserveScalePos | ( | int | xmin, | |
| int | ymin, | |||
| int | xmax, | |||
| int | ymax | |||
| ) | [protected, virtual] |
| void TdkDisplay::resizePreserveScaleCenter | ( | int | xmin, | |
| int | ymin, | |||
| int | xmax, | |||
| int | ymax | |||
| ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkEvent & | event | ) | [protected, virtual] |
Reimplemented from TdkEventHandler.
Reimplemented in TdkLayoutDisplay, TdkMapDisplay, and TdkPrintPreviewDisplay.
| void TdkDisplay::handleVSEvent | ( | TdkPointFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkPointSetFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkLineFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkRectFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkPolylineFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkSelectedFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkTranslateFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkScaleFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkRotateFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkEditObjectPointFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkLineEditFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkPolygonEditFeedbackEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkWindow2ViewportEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVSEvent | ( | TdkViewport2WindowEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::handleVOEvent | ( | TdkEvent & | event | ) | [protected, virtual] |
| void TdkDisplay::viewportChanged | ( | ) | [protected, virtual] |
This method is called when the visible area changed, and updates the pixmap in the set.
TdkCanvas* TdkDisplay::canvas_ [protected] |
Map view associated canvas.
TeColor TdkDisplay::backColor_ [protected] |
TeBox TdkDisplay::window_ [protected] |
TeBox TdkDisplay::viewport_ [protected] |
double TdkDisplay::border_ [protected] |
TdkCachedPixMap TdkDisplay::_cachedPixmaps [private] |
Map of cached pixmaps.
unsigned int TdkDisplay::_numberOfCachedPixmaps [private] |
Number of cached pixmaps used.
unsigned int TdkDisplay::_maxnumberOfCachedPixmaps [private] |
Maximum number of cached pixmaps allowed.
bool TdkDisplay::_enableCachedPixmap [private] |
True - cached pixmaps management enabled, False otherwise.
1.5.2