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

A default needle used by the IlvMapCompass class. More...

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

Inheritance diagram for IlvMapDefaultNeedle:
IlvSimpleGraphic IlvGraphic IlvValueInterface

Public Member Functions

 IlvMapDefaultNeedle (IlvDisplay *display, IlvRect &rect, IlvMapDefaultNeedleStyle style, IlvPalette *palette=0)
 Initializes a new IlvMapDefaultNeedle instance. More...
 
const IlvColorgetBackground () const
 Returns the background color. More...
 
const IlvColorgetForeground () const
 Returns the foreground color. More...
 
IlvMapDefaultNeedleStyle getStyle () const
 Retrieves the style of the needle. More...
 
void setBackground (IlvColor *color)
 Sets the background color. More...
 
void setForeground (IlvColor *color)
 Sets the foreground color. More...
 
void setStyle (IlvMapDefaultNeedleStyle style, IlBoolean redraw=IlTrue)
 Sets the style of the needle. More...
 

Detailed Description

A default needle used by the IlvMapCompass class.

Library: ilvmaps

This class implements a default needle which is used by the IlvMapCompass if the user does not provide any. Four styles of needles are predefined:

Two colors can be specified to draw the needle: a foreground color which is used to draw lined part of the needle, and a background color used to fill filled parts of the needle.

Constructor & Destructor Documentation

◆ IlvMapDefaultNeedle()

IlvMapDefaultNeedle::IlvMapDefaultNeedle ( IlvDisplay display,
IlvRect rect,
IlvMapDefaultNeedleStyle  style,
IlvPalette palette = 0 
)

Initializes a new IlvMapDefaultNeedle instance.

Parameters
displayThe IlvDisplay.
rectThe initial size and position of the object.
styleThe style of the needle.
paletteThe palette used to draw the needle.

Member Function Documentation

◆ getBackground()

const IlvColor* IlvMapDefaultNeedle::getBackground ( ) const

Returns the background color.

This color should not be modified.

Returns
The background color.

◆ getForeground()

const IlvColor* IlvMapDefaultNeedle::getForeground ( ) const

Returns the foreground color.

This color should not be modified.

Returns
The foreground color.

◆ getStyle()

IlvMapDefaultNeedleStyle IlvMapDefaultNeedle::getStyle ( ) const

Retrieves the style of the needle.

Returns
The style of the needle.

◆ setBackground()

void IlvMapDefaultNeedle::setBackground ( IlvColor color)
virtual

Sets the background color.

Sets the color is used to draw lined part of the needle. The color is locked by the object. The previous background color (if any) is unlocked.

Parameters
colorThe new background color.

Reimplemented from IlvSimpleGraphic.

◆ setForeground()

void IlvMapDefaultNeedle::setForeground ( IlvColor color)
virtual

Sets the foreground color.

Sets the color used to draw lined part of the needle. The color is locked by the object. The previous foreground color (if any) is unlocked.

Parameters
colorThe new foreground color.

Reimplemented from IlvSimpleGraphic.

◆ setStyle()

void IlvMapDefaultNeedle::setStyle ( IlvMapDefaultNeedleStyle  style,
IlBoolean  redraw = IlTrue 
)

Sets the style of the needle.

Parameters
styleThe new style.
redrawSpecifies if a redraw is to be immediately performed.