Views
Foundation Package API Reference Guide
Product Documentation:
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, const char *s)
 Constructor. More...
 
 IlvValue (const char *name, IlBoolean b)
 Constructor. More...
 
 IlvValue (const char *name, IlDouble d)
 Constructor. More...
 
 IlvValue (const char *name, IlFloat f)
 Constructor. More...
 
 IlvValue (const char *name, IlInt i)
 Constructor. More...
 
 IlvValue (const char *name, IlUInt u)
 Constructor. More...
 
 IlvValue (const char *name, IlvAntialiasingMode f)
 Constructor. More...
 
 IlvValue (const char *name, IlvArcMode f)
 Constructor. More...
 
 IlvValue (const char *name, IlvBitmap *b)
 Constructor. More...
 
 IlvValue (const char *name, IlvColor *c)
 Verbose: More...
 
 IlvValue (const char *name, IlvColorPattern *p)
 Constructor. More...
 
 IlvValue (const char *name, IlvDirection d)
 Constructor. More...
 
 IlvValue (const char *name, IlvFillRule f)
 Constructor. More...
 
 IlvValue (const char *name, IlvFillStyle f)
 Constructor. More...
 
 IlvValue (const char *name, IlvFont *f)
 Constructor. More...
 
 IlvValue (const char *name, IlvGradientPattern *p)
 Constructor. More...
 
 IlvValue (const char *name, IlvLineStyle *l)
 Constructor. More...
 
 IlvValue (const char *name, IlvPattern *p)
 Constructor. More...
 
 IlvValue (const char *name=0)
 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...
 
 operator long long int () const
 Operator to transform the content of the IlvValue to the long long int type..
 
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: xviews or winviews or mviews (mutually exclusive)

The IlvValue class allows you to query and change the attributes of an object. Instances of this class are used in the methods IlvValueInterface::queryValue(), IlvValueInterface::changeValue(), and in IlvValueInterface subclasses, such as IlvGraphic, IlvView and more.
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.

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:

Type identifier Corresponding type
IlvValueNoType empty IlvValue
IlvValueBooleanType IlBoolean
IlvValueIntType IlInt
IlvValueUIntType IlUInt
IlvValueFloatType IlFloat
IlvValueDoubleType IlDouble
IlvValueStringType char*
IlvValueDirectionType IlvDirection
IlvValueColorType IlvColor
IlvValueFontType IlvFont
IlvValuePatternType IlvPattern
IlvValueColorPatternType IlvColorPattern
IlvValueGradientPatternType IlvGradientPattern
IlvValueLineStyleType IlvLineStyle
IlvValueFillStyleType IlvFillStyle
IlvValueFillRuleType IlvFillRule
IlvValueArcModeType IlvArcMode
IlvValueAntialiasingModeType IlvAntialiasingMode
IlvValueBitmapType IlvBitmap
IlvValueStringArrayType array of char*
IlvValueUIntArrayType array of IlUInt
IlvValueMenuItemArrayType array of IlvMenuItem
IlvValueMatrixItemArrayType array of IlvMatrixItem
IlvValueNotebookPageArrayType array of IlvNotebookPage

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

Constructor & Destructor Documentation

◆ IlvValue() [1/19]

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);
Parameters
nameThe accessor name.

◆ IlvValue() [2/19]

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
nameThe accessor name.
iThe new value that you want to set to the object.

◆ IlvValue() [3/19]

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
nameThe accessor name.
uThe new value that you want to set to the object.

◆ IlvValue() [4/19]

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
nameThe accessor name.
fThe new value that you want to set to the object.

◆ IlvValue() [5/19]

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
nameThe accessor name.
dThe new value that you want to set to the graphic object

◆ IlvValue() [6/19]

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
nameThe accessor name.
sThe new value that you want to set to the graphic object

◆ IlvValue() [7/19]

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
nameThe accessor name.
bThe new value that you want to set to the object

◆ IlvValue() [8/19]

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
nameThe accessor name.
cThe new value that you want to set to the object

◆ IlvValue() [9/19]

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
nameThe accessor name.
fThe new value that you want to set to the object

◆ IlvValue() [10/19]

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
nameThe accessor name.
pThe new value that you want to set to the object

◆ IlvValue() [11/19]

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
nameThe accessor name.
pThe new value that you want to set to the object

◆ IlvValue() [12/19]

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
nameThe accessor name.
pThe new value that you want to set to the object

◆ IlvValue() [13/19]

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
nameThe accessor name.
lThe new value that you want to set to the object

◆ IlvValue() [14/19]

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
nameThe accessor name.
fThe new value that you want to set to the object

◆ IlvValue() [15/19]

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
nameThe accessor name.
fThe new value that you want to set to the object

◆ IlvValue() [16/19]

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
nameThe accessor name.
fThe new value that you want to set to the object

◆ IlvValue() [17/19]

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
nameThe accessor name.
fThe new value that you want to set to the object

◆ IlvValue() [18/19]

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
nameThe accessor name.
dThe new value that you want to set to the object

◆ IlvValue() [19/19]

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
nameThe accessor name.
bThe new value that you want to set to the object

Member Function Documentation

◆ getName()

IlSymbol* IlvValue::getName ( ) const

Gets the name of the accessor of the IlvValue.

Returns
The name of the accessor of the IlvValue.

◆ getType()

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.

◆ operator const char *()

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.

◆ operator IlBoolean()

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.

◆ operator IlDouble()

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.

◆ operator IlFloat()

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.

◆ operator IlInt()

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.

◆ operator IlUInt()

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.

◆ operator IlvAntialiasingMode()

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.

◆ operator IlvArcMode()

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.

◆ operator IlvDirection()

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.

◆ operator IlvFillRule()

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.

◆ operator IlvFillStyle()

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.

◆ toIlvBitmap()

IlvBitmap* IlvValue::toIlvBitmap ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvBitmap.

Parameters
displayThe display that creates the bitmap.
Returns
The content of the IlvValue as an IlvBitmap.

◆ toIlvColor()

IlvColor* IlvValue::toIlvColor ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvColor.

Parameters
displayThe display that creates the color.
Returns
The content of the IlvValue as an IlvColor.

◆ toIlvColorPattern()

IlvColorPattern* IlvValue::toIlvColorPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvColorPattern.

Parameters
displayThe display that creates the color-pattern.
Returns
The content of the IlvValue as an IlvColorPattern

◆ toIlvFont()

IlvFont* IlvValue::toIlvFont ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvFont.

Parameters
displayThe display that creates the font.
Returns
The content of the IlvValue as an IlvFont.

◆ toIlvGradientPattern()

IlvGradientPattern* IlvValue::toIlvGradientPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvGradientPattern.

Parameters
displayThe display that creates the gradient-pattern.
Returns
The content of the IlvValue as an IlvGradientPattern

◆ toIlvLineStyle()

IlvLineStyle* IlvValue::toIlvLineStyle ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvLineStyle.

Parameters
displayThe display that creates the line style.
Returns
The content of the IlvValue as an IlvLineStyle.

◆ toIlvPattern()

IlvPattern* IlvValue::toIlvPattern ( IlvDisplay display) const

Returns the content of the IlvValue as an IlvPattern.

Parameters
displayThe display that creates the pattern.
Returns
The content of the IlvValue as an IlvPattern.
IlvDisplay::getColor
IlvColor * getColor(const char *name, IlBoolean isMutable=IlFalse)
Gets a color by name.
IlvDisplay::getFont
IlvFont * getFont(const char *fontName)
IlvDisplay::getBitmap
IlvBitmap * getBitmap(const char *name, IlBoolean read=IlFalse) const
Gets a bitmap.
IlInt
long IlInt
The type that can hold all signed 32-bit integer values.
Definition: macros.h:189
IlvDisplay::getPattern
IlvPattern * getPattern(const char *name) const
Gets a pattern.
IlTrue
#define IlTrue
The constant true.
Definition: macros.h:244
IlvDisplay::getLineStyle
IlvLineStyle * getLineStyle(IlUShort count, const unsigned char *dashes, IlUShort offset=0)
Gets a line style.
IlvValue
Graphic related class.
Definition: value.h:441
IlUInt
unsigned long IlUInt
The type that can hold all unsigned 32-bit integer values.
Definition: macros.h:190
IlDouble
double IlDouble
Double precision type.
Definition: macros.h:282
IlvFillMaskPattern
@ IlvFillMaskPattern
Definition: resource.h:139
IlvWindingRule
@ IlvWindingRule
Definition: resource.h:210
IlvArcChord
@ IlvArcChord
Definition: resource.h:176
IlvDisplay::getGradientPattern
IlvGradientPattern * getGradientPattern(const char *alias) const
Gets a gradient pattern.
IlFloat
float IlFloat
Single precision type.
Definition: macros.h:281