Displays the coordinates of the mouse when it is on top of an IlvView
displaying a map.
More...
#include <ilviews/maps/gui/coordview.h>
Public Member Functions | |
IlvMapCoordViewer (IlvDisplay *display, const IlvPoint &pos, IlvPalette *palette=0) | |
Initializes a new IlvMapCoordViewer instance at the indicated location. More... | |
IlvMapCoordViewer (IlvDisplay *display, const IlvRect &rect, IlvPalette *palette=0) | |
Initializes a new IlvMapCoordViewer instance with an indicated size and location. More... | |
const char * | getEastingFormat () const |
Retrieves the easting format. More... | |
const char * | getEastinglabel () const |
Retrieves the easting label. More... | |
const char * | getNorthingFormat () const |
Retrieves the northing format. More... | |
const char * | getNorthinglabel () const |
Retrieves the northing label. More... | |
IlBoolean | isDisplayingEasting () |
Checks if the object is displaying easting values. More... | |
IlBoolean | isDisplayingNorthing () const |
Checks if the object is displaying northing values. More... | |
void | setDisplayingEasting (IlBoolean displayEasting, IlBoolean redraw=IlFalse) |
Specifies whether the coordinate viewer should display the easting value of the mouse coordinates. More... | |
void | setDisplayingNorthing (IlBoolean displayNorthing, IlBoolean redraw=IlFalse) |
Specifies whether the coordinate viewer should display the northing value of the mouse coordinates. More... | |
void | setDisplayMode (IlvMapCoordViewerMode mode, IlBoolean redraw=IlFalse) |
Specifies the display mode of the mouse coordinates. More... | |
void | setEastingFormat (const char *format, IlBoolean redraw=IlFalse) |
Sets the easting format. More... | |
void | setEastinglabel (const char *label, IlBoolean redraw=IlFalse) |
Sets the prompt string to be displayed before the easting value. More... | |
void | setNorthingFormat (const char *format, IlBoolean redraw=IlFalse) |
Sets the northing format. More... | |
void | setNorthinglabel (const char *label, IlBoolean redraw=IlFalse) |
Sets the prompt string to be displayed before the northing value. More... | |
void | setVertical (IlBoolean vertical, IlBoolean redraw=IlFalse) |
Sets the orientation of the display. More... | |
void | setView (IlvView *view) |
Sets the view for which coordinates are to be displayed. More... | |
Displays the coordinates of the mouse when it is on top of an IlvView
displaying a map.
Library: ilvmaps
The coordinates can be displayed in two modes:
IlvMapCartesianMode
: The coordinates are displayed in the projection coordinate system of the manager. IlvMapDMSMode
: The coordinates are displayed in degrees, minutes and seconds in the geographic projection. This mode works only if the manager of the view that controls the coordinate viewer has an IlvMapInfo
property. The coordinate viewer will then use the projection to convert the mouse coordinates in the geographic projection. IlvMapCoordViewer::IlvMapCoordViewer | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlvPalette * | palette = 0 |
||
) |
Initializes a new IlvMapCoordViewer
instance with an indicated size and location.
display | The display where this object can be displayed. |
rect | The position and dimension of the object. |
palette | The palette that is used to drawn this object. |
IlvMapCoordViewer::IlvMapCoordViewer | ( | IlvDisplay * | display, |
const IlvPoint & | pos, | ||
IlvPalette * | palette = 0 |
||
) |
Initializes a new IlvMapCoordViewer
instance at the indicated location.
display | The display where this object can be displayed. |
pos | The position of the upper left point of the object. The viewer size is automatically computed. |
palette | The palette that is used to drawn this object. |
const char* IlvMapCoordViewer::getEastingFormat | ( | ) | const |
Retrieves the easting format.
const char* IlvMapCoordViewer::getEastinglabel | ( | ) | const |
Retrieves the easting label.
IlvMapCoordViewer
. const char* IlvMapCoordViewer::getNorthingFormat | ( | ) | const |
Retrieves the northing format.
const char* IlvMapCoordViewer::getNorthinglabel | ( | ) | const |
Retrieves the northing label.
IlvMapCoordViewer
. IlBoolean IlvMapCoordViewer::isDisplayingEasting | ( | ) |
Checks if the object is displaying easting values.
IlTrue
if object is displaying easting, IlFalse
otherwise. IlBoolean IlvMapCoordViewer::isDisplayingNorthing | ( | ) | const |
Checks if the object is displaying northing values.
IlTrue
if object is displaying northing, IlFalse
otherwise. void IlvMapCoordViewer::setDisplayingEasting | ( | IlBoolean | displayEasting, |
IlBoolean | redraw = IlFalse |
||
) |
Specifies whether the coordinate viewer should display the easting value of the mouse coordinates.
The coordinate viewer can be used to display either the easting value or the northing value of the coordinates, or both.
displayEasting | If set to IlTrue , easting is displayed. |
redraw | IlTrue if the object is to be redrawn. |
void IlvMapCoordViewer::setDisplayingNorthing | ( | IlBoolean | displayNorthing, |
IlBoolean | redraw = IlFalse |
||
) |
Specifies whether the coordinate viewer should display the northing value of the mouse coordinates.
The coordinate viewer can be used to display either the northing value or the northing value of the coordinates, or both.
displayNorthing | If set to IlTrue , northing is displayed. |
redraw | Specifies if the object is to be redrawn. |
void IlvMapCoordViewer::setDisplayMode | ( | IlvMapCoordViewerMode | mode, |
IlBoolean | redraw = IlFalse |
||
) |
Specifies the display mode of the mouse coordinates.
mode | The display mode. |
redraw | IlTrue if the object is to be redrawn. |
Sets the easting format.
This string is used to format the value of the easting coordinate in Cartesian mode. The default value is %1.6f
.
format | The easting format. This string is copied. |
redraw | Specifies if the object is to be redrawn. |
Sets the prompt string to be displayed before the easting value.
The default value is "X = "
.
label | The easting label. This string is copied by the object. |
redraw | IlTrue if the object is to be redrawn. |
Sets the northing format.
This string is used to format the value of the northing coordinate in Cartesian mode. The default value is %1.6f
.
format | The northing format. This string is copied by the object. |
redraw | Specifies if the object is to be redrawn. |
Sets the prompt string to be displayed before the northing value.
The default value is "Y = "
.
label | The northing label. This string is copied by the object. |
redraw | IlTrue if the object is to be redrawn. |
Sets the orientation of the display.
vertical | If set to IlTrue the northing value is displayed under the easting value. If set to IlFalse , the northing value is displayed to the right of the easting value. |
redraw | IlTrue if the object is to be redrawn. |
void IlvMapCoordViewer::setView | ( | IlvView * | view | ) |
Sets the view for which coordinates are to be displayed.
view | The view for which coordinates are to be displayed. |