rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvValue Class Reference

Graphic related class. More...

#include <ilviews/base/value.h>

Public Member Functions

 IlvValue (const char *name=0)
 Constructor. More...
 
 IlvValue (const char *name, IlInt i)
 Constructor. More...
 
 IlvValue (const char *name, IlUInt u)
 Constructor. More...
 
 IlvValue (const char *name, IlFloat f)
 Constructor. More...
 
 IlvValue (const char *name, IlDouble d)
 Constructor. More...
 
 IlvValue (const char *name, const char *s)
 Constructor. More...
 
 IlvValue (const char *name, IlBoolean b)
 Constructor. More...
 
 IlvValue (const char *name, IlvColor *c)
 Verbose: More...
 
 IlvValue (const char *name, IlvFont *f)
 Constructor. More...
 
 IlvValue (const char *name, IlvPattern *p)
 Constructor. More...
 
 IlvValue (const char *name, IlvColorPattern *p)
 Constructor. More...
 
 IlvValue (const char *name, IlvGradientPattern *p)
 Constructor. More...
 
 IlvValue (const char *name, IlvLineStyle *l)
 Constructor. More...
 
 IlvValue (const char *name, IlvFillStyle f)
 Constructor. More...
 
 IlvValue (const char *name, IlvFillRule f)
 Constructor. More...
 
 IlvValue (const char *name, IlvArcMode f)
 Constructor. More...
 
 IlvValue (const char *name, IlvAntialiasingMode f)
 Constructor. More...
 
 IlvValue (const char *name, IlvDirection d)
 Constructor. More...
 
 IlvValue (const char *name, IlvBitmap *b)
 Constructor. More...
 
IlSymbolgetName () const
 Gets the name of the accessor of the IlvValue. More...
 
const IlvValueTypeClassgetType () const
 Gets the type of the IlvValue. More...
 
 operator const char * () const
 Returns a copy of a string representation of this object in a. More...
 
 operator IlBoolean () const
 Operator to transform the content of the IlvValue to the IlBoolean type. More...
 
 operator IlDouble () const
 Operator to transform the content of the IlvValue to the IlDouble type. More...
 
 operator IlFloat () const
 Operator to transform the content of the IlvValue to the IlFloat type. More...
 
 operator IlInt () const
 Operator to transform the content of the IlvValue to the IlInt type. More...
 
 operator IlUInt () const
 Operator to transform the content of the IlvValue to the IlUInt type. More...
 
 operator IlvAntialiasingMode () const
 Operator to transform the content of the IlvValue to the IlvAntialiasingMode type. More...
 
 operator IlvArcMode () const
 Operator to transform the content of the IlvValue to the IlvArcMode type. More...
 
 operator IlvDirection () const
 Operator to transform the content of the IlvValue to the IlvDirection type. More...
 
 operator IlvFillRule () const
 Operator to transform the content of the IlvValue to the IlvFillRule type. More...
 
 operator IlvFillStyle () const
 Operator to transform the content of the IlvValue to the IlvIlvFillStyle type. More...
 
IlvBitmaptoIlvBitmap (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvBitmap. More...
 
IlvColortoIlvColor (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvColor. More...
 
IlvColorPatterntoIlvColorPattern (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvColorPattern. More...
 
IlvFonttoIlvFont (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvFont. More...
 
IlvGradientPatterntoIlvGradientPattern (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvGradientPattern. More...
 
IlvLineStyletoIlvLineStyle (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvLineStyle. More...
 
IlvPatterntoIlvPattern (IlvDisplay *display) const
 Returns the content of the IlvValue as an IlvPattern. More...
 

Detailed Description

Graphic related class.

Library: views

The IlvValue class allows you to query and change the values of a graphic object. Instances of this class are used in the IlvGraphic::queryValue and IlvGraphic::changeValue methods.
An IlvValue instance is defined by three things:

To query a value from a graphic object, you create an instance of IlvValue with the name of the accessor and call the IlvGraphic::queryValue method. This method fills the value of IlvValue with a copy of the value inside the graphic object.
To change the value of a graphic object, create an instance of IlvValue with the name of the accessor and a new value, and pass this IlvValue to the IlvGraphic::changeValue method.

Warning
[note] When initializing an IlvValue with a numeric constant, ensure that the type of the constant is explicitly mentioned, or the numeric constant will default to IlBoolean with the value IlFalse or IlTrue.
For example, if you use the expression IlvValue v("x", 10); the value's type defaults to IlBoolean, thus 10 becomes IlTrue. To keep the value 10, this expression should be replaced with the following:
IlvValue v("x", (IlInt)10);
or better:
const IlInt position = 10;
IlvValue v("x", position);

The possible types for an IlvValue are:

The possible values for the accessors are described in each class where accessors are defined.

Constructor & Destructor Documentation

IlvValue::IlvValue ( const char *  name = 0)

Constructor.

This constructor creates an empty IlvValue for the accessor name. The instance is then used in the following way:

IlvValue arg("label");
char* label = (const char*)button->queryValue(arg);
IlvValue::IlvValue ( const char *  name,
IlInt  i 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("value", (IlInt)12);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object.
IlvValue::IlvValue ( const char *  name,
IlUInt  u 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("cardinal", ((IlUInt)12);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object.
IlvValue::IlvValue ( const char *  name,
IlFloat  f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("value", (IlFloat)1.2);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object.
IlvValue::IlvValue ( const char *  name,
IlDouble  d 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("length", (IlDouble)12.34);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the graphic object
IlvValue::IlvValue ( const char *  name,
const char *  s 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("name", "TheName");
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the graphic object
IlvValue::IlvValue ( const char *  name,
IlBoolean  b 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("flag", IlTrue);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvColor c 
)

Verbose:

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("background", display->getColor("blue"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvFont f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("font", display->getFont("%helvetica-12"));
=button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvPattern p 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("pattern", display->getPattern("solid"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvColorPattern p 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("colorPattern", display->getColorPattern("ThePattern"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvGradientPattern p 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("gradientPattern", display->getGradientPattern("ThePattern"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvLineStyle l 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("style", display->getLineStyle("dash"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvFillStyle  f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvFillRule  f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("rule", IlvWindingRule);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvArcMode  f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("arcMode", IlvArcChord);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvAntialiasingMode  f 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("antialiasingMode", IlvModeUseAntialiasing);
graphic->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvDirection  d 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("direction", IlvLeft);
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object
IlvValue::IlvValue ( const char *  name,
IlvBitmap b 
)

Constructor.

This constructor creates an IlvValue instance for the accessor name. It can be used in the following way:

IlvValue arg("image", display->getBitmap("map.jpg"));
button->changeValue(arg);
Parameters
valueThe new value that you want to set to the object

Member Function Documentation

IlSymbol* IlvValue::getName ( ) const

Gets the name of the accessor of the IlvValue.

Returns
The name of the accessor of the IlvValue.
const IlvValueTypeClass* IlvValue::getType ( ) const

Gets the type of the IlvValue.

Returns the type of the IlvValue. The returned value is one of the types possible for the class (see the description of the class).

Returns
The type of the IlvValue.
IlvValue::operator const char * ( ) const

Returns a copy of a string representation of this object in a.

static buffer. This operator returns a copy of a string representation of this object in a static buffer. The user must not modify or delete this buffer. The returned string may be overwritten by any subsequent call to the library.

IlvValue::operator IlBoolean ( ) const

Operator to transform the content of the IlvValue to the IlBoolean type.

This operator allows you to transform the content of the IlvValue to the IlBoolean type.

IlvValue::operator IlDouble ( ) const

Operator to transform the content of the IlvValue to the IlDouble type.

This operator allows you to transform the content of the IlvValue to the IlDouble type.

IlvValue::operator IlFloat ( ) const

Operator to transform the content of the IlvValue to the IlFloat type.

This operator allows you to transform the content of the IlvValue to the IlFloat type.

IlvValue::operator IlInt ( ) const

Operator to transform the content of the IlvValue to the IlInt type.

This operator allows you to transform the content of the IlvValue to the IlInt type.

IlvValue::operator IlUInt ( ) const

Operator to transform the content of the IlvValue to the IlUInt type.

This operator allows you to transform the content of the IlvValue to the IlUInt type.

IlvValue::operator IlvAntialiasingMode ( ) const

Operator to transform the content of the IlvValue to the IlvAntialiasingMode type.

This operator allows you to transform the content of the IlvValue to the IlvAntialiasingMode type.

IlvValue::operator IlvArcMode ( ) const

Operator to transform the content of the IlvValue to the IlvArcMode type.

This operator allows you to transform the content of the IlvValue to the IlvArcMode type.

IlvValue::operator IlvDirection ( ) const

Operator to transform the content of the IlvValue to the IlvDirection type.

This operator allows you to transform the content of the IlvValue to the IlvDirection type.

IlvValue::operator IlvFillRule ( ) const

Operator to transform the content of the IlvValue to the IlvFillRule type.

This operator allows you to transform the content of the IlvValue to the IlvFillRule type.

IlvValue::operator IlvFillStyle ( ) const

Operator to transform the content of the IlvValue to the IlvIlvFillStyle type.

This operator allows you to transform the content of the IlvValue to the IlvIlvFillStyle type.

IlvBitmap* IlvValue::toIlvBitmap ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvBitmap.

Parameters
Adisplay that creates the bitmap.
Returns
The content of the IlvValue as an IlvBitmap.
IlvColor* IlvValue::toIlvColor ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvColor.

Parameters
Adisplay that creates the color.
Returns
The content of the IlvValue as an IlvColor.
IlvColorPattern* IlvValue::toIlvColorPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvColorPattern.

Parameters
Adisplay that creates the color-pattern.
Returns
The content of the IlvValue as an IlvColorPattern
IlvFont* IlvValue::toIlvFont ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvFont.

Parameters
Adisplay that creates the font.
Returns
The content of the IlvValue as an IlvFont.
IlvGradientPattern* IlvValue::toIlvGradientPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvGradientPattern.

Parameters
Adisplay that creates the gradient-pattern.
Returns
The content of the IlvValue as an IlvGradientPattern
IlvLineStyle* IlvValue::toIlvLineStyle ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvLineStyle.

Parameters
Adisplay that creates the line style.
Returns
The content of the IlvValue as an IlvLineStyle.
IlvPattern* IlvValue::toIlvPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvPattern.

Parameters
Adisplay that creates the pattern.
Returns
The content of the IlvValue as an IlvPattern.

© Copyright 2012, 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.