Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave 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)
 Constructor. More...
 
const IlvColorgetBackground ()
 Returns the background color. More...
 
const IlvColorgetForeground ()
 Returns the foreground color. More...
 
IlvMapDefaultNeedleStyle getStyle ()
 Retrieves the style of the needle. More...
 
void setBackground (IlvColor *col)
 Sets the background color. More...
 
void setForeground (IlvColor *col)
 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 ( IlvDisplay display,
IlvRect rect,
IlvMapDefaultNeedleStyle  style,
IlvPalette palette = 0 
)

Constructor.

Construct a IlvMapDefaultNeedle object.

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

const IlvColor* IlvMapDefaultNeedle::getBackground ( )

Returns the background color.

This IlvColor should not be modified.

Returns
The background color.
const IlvColor* IlvMapDefaultNeedle::getForeground ( )

Returns the foreground color.

This IlvColor should not be modified.

Returns
The foreground color.
IlvMapDefaultNeedleStyle IlvMapDefaultNeedle::getStyle ( )

Retrieves the style of the needle.

Returns
The style of the needle.
void IlvMapDefaultNeedle::setBackground ( IlvColor col)
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
colThe new background IlvColor.

Reimplemented from IlvSimpleGraphic.

void IlvMapDefaultNeedle::setForeground ( IlvColor col)
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
colThe new foreground IlvColor.

Reimplemented from IlvSimpleGraphic.

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.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.