Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvMapCoordViewer Class Reference

Displays the coordinates of the mouse when it is on top of an IlvView displaying a map. More...

#include <ilviews/maps/gui/coordview.h>

Inheritance diagram for IlvMapCoordViewer:
IlvSimpleGraphic IlvGraphic IlvValueInterface

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

Detailed Description

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:

Constructor & Destructor Documentation

◆ IlvMapCoordViewer() [1/2]

IlvMapCoordViewer::IlvMapCoordViewer ( IlvDisplay display,
const IlvRect rect,
IlvPalette palette = 0 
)

Initializes a new IlvMapCoordViewer instance with an indicated size and location.

Parameters
displayThe display where this object can be displayed.
rectThe position and dimension of the object.
paletteThe palette that is used to drawn this object.

◆ IlvMapCoordViewer() [2/2]

IlvMapCoordViewer::IlvMapCoordViewer ( IlvDisplay display,
const IlvPoint pos,
IlvPalette palette = 0 
)

Initializes a new IlvMapCoordViewer instance at the indicated location.

Parameters
displayThe display where this object can be displayed.
posThe position of the upper left point of the object. The viewer size is automatically computed.
paletteThe palette that is used to drawn this object.

Member Function Documentation

◆ getEastingFormat()

const char* IlvMapCoordViewer::getEastingFormat ( ) const

Retrieves the easting format.

Returns
The easting format. This string is still owned by the object.

◆ getEastinglabel()

const char* IlvMapCoordViewer::getEastinglabel ( ) const

Retrieves the easting label.

Returns
The easting label. The string is still owned by the IlvMapCoordViewer.

◆ getNorthingFormat()

const char* IlvMapCoordViewer::getNorthingFormat ( ) const

Retrieves the northing format.

Returns
The northing format. This string is still owned by the object.

◆ getNorthinglabel()

const char* IlvMapCoordViewer::getNorthinglabel ( ) const

Retrieves the northing label.

Returns
The northing label. This string is still owned by the IlvMapCoordViewer.

◆ isDisplayingEasting()

IlBoolean IlvMapCoordViewer::isDisplayingEasting ( )

Checks if the object is displaying easting values.

Returns
IlTrue if object is displaying easting, IlFalse otherwise.

◆ isDisplayingNorthing()

IlBoolean IlvMapCoordViewer::isDisplayingNorthing ( ) const

Checks if the object is displaying northing values.

Returns
IlTrue if object is displaying northing, IlFalse otherwise.

◆ setDisplayingEasting()

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.

Parameters
displayEastingIf set to IlTrue, easting is displayed.
redrawIlTrue if the object is to be redrawn.

◆ setDisplayingNorthing()

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.

Parameters
displayNorthingIf set to IlTrue, northing is displayed.
redrawSpecifies if the object is to be redrawn.

◆ setDisplayMode()

void IlvMapCoordViewer::setDisplayMode ( IlvMapCoordViewerMode  mode,
IlBoolean  redraw = IlFalse 
)

Specifies the display mode of the mouse coordinates.

Parameters
modeThe display mode.
redrawIlTrue if the object is to be redrawn.

◆ setEastingFormat()

void IlvMapCoordViewer::setEastingFormat ( const char *  format,
IlBoolean  redraw = IlFalse 
)

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.

Parameters
formatThe easting format. This string is copied.
redrawSpecifies if the object is to be redrawn.

◆ setEastinglabel()

void IlvMapCoordViewer::setEastinglabel ( const char *  label,
IlBoolean  redraw = IlFalse 
)

Sets the prompt string to be displayed before the easting value.

The default value is "X = ".

Parameters
labelThe easting label. This string is copied by the object.
redrawIlTrue if the object is to be redrawn.

◆ setNorthingFormat()

void IlvMapCoordViewer::setNorthingFormat ( const char *  format,
IlBoolean  redraw = IlFalse 
)

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.

Parameters
formatThe northing format. This string is copied by the object.
redrawSpecifies if the object is to be redrawn.

◆ setNorthinglabel()

void IlvMapCoordViewer::setNorthinglabel ( const char *  label,
IlBoolean  redraw = IlFalse 
)

Sets the prompt string to be displayed before the northing value.

The default value is "Y = ".

Parameters
labelThe northing label. This string is copied by the object.
redrawIlTrue if the object is to be redrawn.

◆ setVertical()

void IlvMapCoordViewer::setVertical ( IlBoolean  vertical,
IlBoolean  redraw = IlFalse 
)

Sets the orientation of the display.

Parameters
verticalIf 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.
redrawIlTrue if the object is to be redrawn.

◆ setView()

void IlvMapCoordViewer::setView ( IlvView view)

Sets the view for which coordinates are to be displayed.

Parameters
viewThe view for which coordinates are to be displayed.