rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDisplay Class Reference

Display class. More...

#include <ilviews/ilv.h>

List of all members.

Public Member Functions

 IlvDisplay (IlAny internal, const char *className=0, IlvDisplayConfigCallback dcc=0, IlAny dccArg=0)
 Constructor.
 IlvDisplay (const char *className, const char *displayName=0, int argc=0, char **argv=0, IlvDisplayConfigCallback dcc=0, IlAny dccArg=0)
 Constructor.
 ~IlvDisplay ()
 Destructor.
void addChangeLanguageCallback (IlvDisplayCallback cb, IlAny arg)
 Adds a user language change callback.
void addChangeLookCallback (IlvDisplayCallback cb, IlAny arg)
 Adds a user look change callback.
void appendToPath (const char *pathPart)
 Appends a directory to the display's search path.
void bell (int volume=0) const
 Rings the system bell.
IlUShort colorTable (IlvIntensity *r, IlvIntensity *g, IlvIntensity *b, unsigned char *indexes, IlBoolean getMutables=((IlBoolean) 0)) const
 Provides a color table.
IlvColordefaultBackground () const
 Gets the default background color.
IlvFontdefaultBoldFont () const
 Gets the default bold font.
IlvCursordefaultCursor () const
 Gets the default cursor.
IlvFontdefaultFont () const
 Gets the default font.
IlvColordefaultForeground () const
 Gets the default foreground color.
IlvFontdefaultItalicFont () const
 Gets the default italic font.
IlvFontdefaultLargeFont () const
 Gets the default large font.
IlvLineStyledefaultLineStyle () const
 Gets the default line style.
IlvFontdefaultNormalFont () const
 Gets the default normal font.
IlvPalettedefaultPalette () const
 Gets the default palette.
IlvPatterndefaultPattern () const
 Gets the default pattern.
void endDump ()
 Ends output to a dump device.
const char * findInPath (const char *fileName, IlBoolean noLocalization=((IlBoolean) 0)) const
 Finds a file in the display's search path.
IlvViewfindPointerView () const
 Finds the view object under the pointer device location.
void flush () const
 Flushes the output buffer.
IlvColorget8bitsColor (IlUShort r, IlUShort g, IlUShort b, IlBoolean isMutable=((IlBoolean) 0))
 Gets a color by 8bits RGB values.
IlvAntialiasingMode getAntialiasingMode () const
 Returns the current anti-aliasing mode of the display.
IlvBitmapgetBitmap (const char *name, IlBoolean read=((IlBoolean) 0)) const
 Gets a bitmap.
unsigned char * getBitmapData (const IlvSystemPort *bitmap, IlUInt &size, const IlvRect &rect) const
 Gets bitmap data.
const char * getClassName () const
 Gets the class name specified in the IlvDisplay.
IlvColorgetColor (IlFloat hue, IlFloat saturation, IlFloat value, IlBoolean isMutable=((IlBoolean) 0))
 Gets a color by HSV values.
IlvColorgetColor (IlvIntensity r, IlvIntensity g, IlvIntensity b, IlBoolean isMutable=((IlBoolean) 0))
 Gets a color by RGB values.
IlvColorgetColor (const char *name, IlBoolean isMutable=((IlBoolean) 0))
 Gets a color by name.
IlBoolean getColorRGB (const char *name, IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Gets RGB color values.
IlSymbolgetCurrentLanguage () const
 Gets the current language.
IlvLookStyle getCurrentLook () const
 Gets the current look.
IlvCursorgetCursor (const char *name)
 Gets a cursor.
IlvMessageDatabasegetDatabase () const
 Gets the message database.
const char * getEnvOrResource (const char *envName, const char *resName=0, const char *defaultValue=0) const
 Gets a value from an environment variable or a resource.
const char *const * getFamilyNames (IlUShort &count) const
 Gets font family names.
IlvFontgetFont (const char *fontFamily, IlvFontSize fontSize, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0)
 Gets a font.
IlvFontgetFont (const char *fontName)
 Gets a font.
IlvDimgetFontSizes (const char *fontFamily, IlvFontStyle fontStyle, int &count, const char *foundry=0) const
 Gets font sizes.
IlvGradientPatterngetGradientPattern (const char *alias) const
 Gets a gradient pattern.
const char * getHome () const
 Gets the current home setting.
IlvPalettegetInvertedPalette (const IlvPalette *source)
 Gets an inverted palette.
IlvGradientPatterngetLinearGradientPattern (IlvColor *startColor, IlvColor *endColor, IlvPoint startPoint, IlvPoint endPoint, IlvDim width=0, IlvDim height=0, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a linear gradient pattern.
IlvGradientPatterngetLinearGradientPattern (IlvColorStop **colorStops, IlUInt nColorStops, IlvPoint startPoint, IlvPoint endPoint, IlvDim width=0, IlvDim height=0, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a linear gradient pattern.
IlvLineStylegetLineStyle (const char *name) const
 Gets a line style.
IlvLineStylegetLineStyle (IlUShort count, const unsigned char *dashes, IlUShort offset=0)
 Gets a line style.
IlvLookFeelHandlergetLookFeelHandler () const
 Gets the current look and feel handler.
IlvLookFeelHandlergetLookFeelHandler (IlSymbol *) const
 Returns the look and feel handler whose name is specified.
const char * getMessage (const char *msgid) const
 Gets a message string from a message identifier.
IlvPalettegetPalette (IlvColor *background=0, IlvColor *foreground=0, IlvPattern *pattern=0, IlvColorPattern *colorPattern=0, IlvFont *font=0, IlvLineStyle *lineStyle=0, IlUShort lineWidth=0, IlvFillStyle fillStyle=IlvFillPattern, IlvArcMode arcMode=IlvArcPie, IlvFillRule fillRule=IlvEvenOddRule, IlvIntensity alpha=((IlvIntensity)-1), IlvAntialiasingMode antialias=IlvDefaultAntialiasingMode, IlvGradientPattern *gradientPattern=0)
 Gets a palette.
IlvPalettegetPalette (const char *paletteName)
 Gets a palette.
const char * getPath () const
 Gets the display's search path.
IlvPatterngetPattern (const char *name) const
 Gets a pattern.
IlvGradientPatterngetRadialGradientPattern (IlvColor *startColor, IlvColor *endColor, IlvPoint startCenter, IlvDim startRadius, IlvPoint endCenter, IlvDim endRadius, IlvDim width=0, IlvDim height=0, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a radial gradient pattern.
IlvGradientPatterngetRadialGradientPattern (IlvColorStop **colorStops, IlUInt nColorStops, IlvPoint startCenter, IlvDim startRadius, IlvPoint endCenter, IlvDim endRadius, IlvDim width=0, IlvDim height=0, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a radial gradient pattern.
IlvGradientPatterngetRadialGradientPattern (IlvColor *startColor, IlvColor *endColor, IlvDim width, IlvDim height, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a radial gradient pattern.
IlvGradientPatterngetRadialGradientPattern (IlvColorStop **colorStops, IlUInt nColorStops, IlvDim width, IlvDim height, IlvGradientTransformMode mode=IlvGradientTransformGraphic, IlvGradientAspectRatio aspectRatio=IlvGradientAspectRatioNo, IlvGradientSpread spread=IlvGradientPadSpread, const char *alias=0) const
 Gets a radial gradient pattern.
const char * getResource (const char *resourceName, const char *objectName, const char *objectClassName, const char *storageName=0, const char *storageClassName=0) const
 Gets a resource.
const char * getResource (const char *resourceName, const char *defaultValue=0) const
 Gets a resource.
IlvViewgetView (IlvSystemView view) const
 Gets a system view object.
IlvViewgetView (const char *name) const
 Gets a view object.
IlvView *const * getViews (IlUInt &count) const
 Gets view objects.
IlBoolean hasEvents () const
 Notifies you when events occur.
IlBoolean initDump (IlvPort *device)
 Directs output to a dump device.
IlBoolean isBad () const
 Tells you if object creation was unsuccessful.
IlBoolean isCairoEnabled () const
 Indicates whether Cairo features are available.
IlBoolean isDumping () const
 Tells you if dumping is occurring.
IlBoolean isRightButtonValueUsed () const
 Tells you if the right mouse button was used.
void movePointer (IlvPoint &p) const
 Moves the cursor to a specified point.
void movePointer (IlvDeltaPoint &dp) const
 Moves the cursor to a relative position.
void pixelToRGB (IlUInt pixel, IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Provides the RGB values for a pixel index.
void prependToPath (const char *pathPart)
 Prepends a directory to the display's search path.
void putBitmapData (IlvSystemPort *bitmap, const IlvRect &rect, unsigned char *data, IlUInt size) const
 Changes bitmap data.
void queryPointer (IlvPos &x, IlvPos &y, IlUShort &modifiers) const
 Finds the cursor.
void readAndDispatchEvents () const
 Reads and dispatches all pending events.
IlvBitmapreadAsciiBitmap (const char *filename)
 Reads an ASCII bitmap.
IlvBitmapreadBitmap (const char *filename)
 Reads a bitmap.
IlvBitmapDatareadBitmapData (const char *filename)
 Reads a bitmap data.
void refreshAllViews ()
 Refreshes all views.
void removeChangeLanguageCallback (IlvDisplayCallback cb, IlAny arg)
 Removes a user language change callback.
void removeChangeLookCallback (IlvDisplayCallback cb, IlAny arg)
 Removes a user look change callback.
void restartDump ()
 Restarts output to a dump device.
IlvRectscreenBBox (IlvRect &bbox, IlBoolean workArea=((IlBoolean) 1), const IlvRect *rect=0) const
 Gets the screen bounding box.
IlUShort screenDepth () const
 Gets the screen depth.
IlvDim screenHeight () const
 Gets the screen height in pixels.
IlvDim screenHeightMM () const
 Gets the screen height in millimeters.
IlvSystemPortscreenPort () const
 Allows you to draw into the dislay system desktop.
IlvDim screenWidth () const
 Gets the screen width in pixels.
IlvDim screenWidthMM () const
 Gets the screen width in millimeters.
void setAntialiasingMode (IlvAntialiasingMode antialias)
 Sets the current anti-aliasing mode of the display.
void setCurrentLanguage (IlSymbol *language)
 Sets the current language.
void setCurrentLook (IlvLookStyle style)
 Sets the current look.
void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the current look and feel handler.
void setPath (const char *path)
 Sets the display's search path.
void stopDump ()
 Temporarily stops output to a dump device.
void sync () const
 Flushes the output buffer and waits for completion.
void synchronize (IlBoolean value=((IlBoolean) 1)) const
 Sets synchronous mode.
void useRightButtonValue (IlBoolean flag)
 Sets a flag for the right mouse button.
void waitAndDispatchEvents () const
 Reads and dispatches the next event.

Friends

class IlvColorPattern
class IlvLookFeelHandler
class IlvPalette
class IlvPattern

Detailed Description

Display class.

Library: display

This class handles every aspect of the connection with the display system.

See also:
IlvBitmap, IlvColor, IlvFont, IlvLineStyle, IlvPalette.

Constructor & Destructor Documentation

IlvDisplay::IlvDisplay ( const char *  className,
const char *  displayName = 0,
int  argc = 0,
char **  argv = 0,
IlvDisplayConfigCallback  dcc = 0,
IlAny  dccArg = 0 
)

Constructor.

This constructor is the most often used. It initializes a new instance of the IlvDisplay class that connects you to the window system.

  • If you specify the dcc parameter (Display Configuration Callback), this function will be called just after the connection of your application to the display system. It allows you to customize your application, and tune low level parameters of some display-dependent aspects.
  • The className is the application name used to get any associated resource strings from resource files, such as the .XDefault file on UNIX systems.
  • The displayName parameter identifies the logical screen that the application uses for graphic I/O operations.
  • The optional parameters argc and argv are usually the parameters of the main C++ function. They are specified at launch time, since certain window systems can parse the arguments to modify the connection with the display server.
  • The dccArg parameter enables you to specify a user argument of type IlAny which is passed to the IlvDisplayConfigCallback.
Parameters:
className The application name for accessing associated resource files.
displayName The logical screen name.
argc Optional parameter of the main C++ function.
argv Optional parameter of the main C++ function.
dcc Sets a Display Configuration Callback.
dccArg A user argument passed to the callback.
IlvDisplay::IlvDisplay ( IlAny  internal,
const char *  className = 0,
IlvDisplayConfigCallback  dcc = 0,
IlAny  dccArg = 0 
)

Constructor.

Use this constructor to start a Rogue Wave Views session on the basis of an already existing connection to your display system. If you specify the dcc parameter (Display Configuration Callback), then this function will be called just after the connection of your application to the display system. It allows you to customize your application, and tune low level parameters of some display-dependent aspects.
The dccArg parameter enables you to specify a user argument of type IlAny which is passed to the IlvDisplayConfigCallback.
The className is the application name used to get any associated resource strings from resource files, such as the .XDefault file on UNIX systems.

Parameters:
className The application name for accessing associated resource files.
dcc Sets a Display Configuration Callback.
dccArg A user argument passed to the callback.
IlvDisplay::~IlvDisplay (  ) 

Destructor.

The destructor immediately frees all graphic resources and views that have been used, thus enabling you to terminate an Rogue Wave Views session. If the session was created on the basis of an existing link to a display system, delete does not destroy this link.


Member Function Documentation

void IlvDisplay::addChangeLanguageCallback ( IlvDisplayCallback  cb,
IlAny  arg 
)

Adds a user language change callback.

Lets you add user-defined functions, of IlvDisplayCallback type, that are called when the language is dynamically changed. This can be useful because the library will not automatically refresh your views when the language is modified.

Parameters:
cb The callback function.
arg A user argument passed to the callback.
See also:
IlvDisplay::removeChangeLanguageCallback, IlvDisplay::removeChangeLookCallback.
void IlvDisplay::addChangeLookCallback ( IlvDisplayCallback  cb,
IlAny  arg 
)

Adds a user look change callback.

Lets you add user-defined functions, of IlvDisplayCallback type, that are called when the look is dynamically changed. This can be useful because the library will not automatically refresh your views when the look is modified.

Parameters:
cb The callback function.
arg A user argument passed to the callback.
See also:
IlvDisplay::removeChangeLookCallback, IlvDisplay::removeChangeLanguageCallback.
void IlvDisplay::appendToPath ( const char *  pathPart  ) 

Appends a directory to the display's search path.

Extends the user path by appending the directory specified in pathPart.

Parameters:
pathPart Contains the path extension to be appended.
void IlvDisplay::bell ( int  volume = 0  )  const

Rings the system bell.

Rings the system bell.

Parameters:
volume Specifies the volume of the bell, in a range of 0 to 100. Very few systems are actually able to use this value, so you might leave this parameter unspecified most of the times.
IlUShort IlvDisplay::colorTable ( IlvIntensity r,
IlvIntensity g,
IlvIntensity b,
unsigned char *  indexes,
IlBoolean  getMutables = ((IlBoolean) 0) 
) const

Provides a color table.

Provides a color table of the total number of non-mutable (and optionally mutable) colors being used. If getMutables is IlTrue, this member function returns both mutable and non-mutable colors used. You have to provide each of the array parameters. The array size must be 2 to the power <display-depth> (use the screenDepth member function to obtain the display depth).
This member function is only useful if the screen depth is less than or equal to 8.

Parameters:
r The returned array of red component values.
g The returned array of green component values.
b The returned array of blue component values.
indexes The returned of color indices.
getMutables A Boolean value to specify return of mutable colors as well as non-mutable ones.
Returns:
The total number of non-mutable (and optionally mutable) colors being used, and it provides the current mapping indexes.
IlvColor* IlvDisplay::defaultBackground (  )  const

Gets the default background color.

The background color is usually gray. It can easily be set to whatever color you like by means of your display system resource mechanism.
Note that if color is not an important aspect of your application, you can call one of the member functions defaultForeground or defaultBackground that return internally-defined colors.

Returns:
The default background color.
IlvFont* IlvDisplay::defaultBoldFont (  )  const

Gets the default bold font.

This font can also be retrieved using getFont("bold").

Returns:
A pointer to the default bold font, as defined by the "boldfont" display resource.
On Unix, the default value is built from the font name "%helvetica-12-B".
On Windows, this font corresponds to a bold version of the HFONT that is returned by GetStockObject(DEFAULT_GUI_FONT).
IlvCursor* IlvDisplay::defaultCursor (  )  const

Gets the default cursor.

Returns:
A predefined cursor.
IlvFont* IlvDisplay::defaultFont (  )  const

Gets the default font.

Returns:
A default font that you can use immediately after the session is launched.
IlvColor* IlvDisplay::defaultForeground (  )  const

Gets the default foreground color.

The foreground color is usually black. It can easily be set to whatever color you like by means of your display system resource mechanism.
Note that if color is not an important aspect of your application, you can call one of the member functions defaultForeground or defaultBackground that return internally-defined colors.

Returns:
The default foreground color.
IlvFont* IlvDisplay::defaultItalicFont (  )  const

Gets the default italic font.

This font can also be retrieved using getFont("italic").

Returns:
A pointer to the default normal font, as defined by the "italicfont" display resource.
On Unix, the default value is built from the font name "%helvetica-12-I".
On Windows, this font corresponds to an italic version of the HFONT that is returned by GetStockObject(DEFAULT_GUI_FONT).
IlvFont* IlvDisplay::defaultLargeFont (  )  const

Gets the default large font.

This font can also be retrieved using getFont("large").

Returns:
A pointer to the default normal font, as defined by the "largefont" display resource.
On Unix, the default value is built from the font name "%helvetica-18-B".
On Windows, this font corresponds to the HFONT that is returned by GetStockObject(DEFAULT_GUI_FONT), six points bigger.
IlvLineStyle* IlvDisplay::defaultLineStyle (  )  const

Gets the default line style.

Lets you access one of the most often used line styles: a solid line, one pixel wide.

Returns:
A predefined line style, which is a solid line one pixel wide.
IlvFont* IlvDisplay::defaultNormalFont (  )  const

Gets the default normal font.

This font can also be retrieved using getFont("normal").

Returns:
A pointer to the default normal font, as defined by the "normalfont" display resource.
On Unix, the default value is built from the font name "%helvetica-12-".
On Windows, this font corresponds to the HFONT that is returned by GetStockObject(DEFAULT_GUI_FONT).
IlvPalette* IlvDisplay::defaultPalette (  )  const

Gets the default palette.

Returns:
A predefined palette. This palette has the default foreground and background, the default font.
IlvPattern* IlvDisplay::defaultPattern (  )  const

Gets the default pattern.

Returns:
A predefined pattern, which is the solid pattern.
void IlvDisplay::endDump (  ) 

Ends output to a dump device.

Terminates any output redirection towards a dump device and closes the device output.

const char* IlvDisplay::findInPath ( const char *  fileName,
IlBoolean  noLocalization = ((IlBoolean) 0) 
) const

Finds a file in the display's search path.

Parameters:
fileName The name of the file to be located.
noLocalization Can be set to IlTrue in order not to localize the path. When findInPath is called, Rogue Wave Views first tries to locate the indicated file in a subdirectory called "locale/<language_definition>", unless this parameter is forced to IlTrue.
Returns:
The concatenation of fileName with the display path entry where this file is located. If the file could not be located, 0 is returned. Note that this member function returns a temporary string that can be used by other Rogue Wave Views functions. You should copy this string if you want to use the information at a later point in time.
IlvView* IlvDisplay::findPointerView (  )  const

Finds the view object under the pointer device location.

Returns:
A pointer to the IlvView object located under the pointer device location, or 0 if there is none.
void IlvDisplay::flush (  )  const

Flushes the output buffer.

Flushes the output buffer (that is, sends all pending requests to the server). On X, it calls XFlush((Display*)_internal);.

IlvColor* IlvDisplay::get8bitsColor ( IlUShort  r,
IlUShort  g,
IlUShort  b,
IlBoolean  isMutable = ((IlBoolean)0) 
)

Gets a color by 8bits RGB values.

Parameters:
r The red component value.
g The green component value.
b The blue component value.
isMutable A Boolean value to specify a mutable color.
Returns:
In the r, g, and b parameters, the values of the components of the color called name without allocating it. This member function returns IlTrue if name corresponds to a known r, g, b triplet, and IlFalse otherwise. This member function is called by the getColor member function.
IlvAntialiasingMode IlvDisplay::getAntialiasingMode (  )  const

Returns the current anti-aliasing mode of the display.

Returns:
The current anti-aliasing mode of the display.
IlvBitmap* IlvDisplay::getBitmap ( const char *  name,
IlBoolean  read = ((IlBoolean) 0) 
) const

Gets a bitmap.

The name parameter is the one used in the readBitmap and readAsciiBitmap member functions.

Parameters:
name The name of the object to be retrieved.
read A Boolean value that specify whether or not the bitmap will be read from the file if it has not been found in the display.
Returns:
An IlvBitmap object that has the name name in this display, or 0 if none can be found.
unsigned char* IlvDisplay::getBitmapData ( const IlvSystemPort bitmap,
IlUInt size,
const IlvRect rect 
) const

Gets bitmap data.

Retrieves the data that defines the image of an IlvBitmap object. The format of the data is the same that was used to create this object. The returned array contains the data that is stored in the bitmap object, in the region given in the rect parameter. The size of the array is returned through the size parameter. This array must be deleted using the function IlFree.

Warning:
[note] The X Window documentation warns that if the drawable is a pixmap, the given rectangle (in this rect) must be wholly contained within the pixmap, or a BadMatch error may result.
Parameters:
bitmap The bitmap object.
size The size of the returned array.
rect The rectangle of the bitmap.
Returns:
The data that defines the image of an IlvBitmap object.
const char* IlvDisplay::getClassName (  )  const

Gets the class name specified in the IlvDisplay.

constructor. This member function retrieves the className, the application name used to get any associated resource strings from resource files, such as the .XDefault file on UNIX systems.

Returns:
The class name of the IlvDisplay occurrence with name given as the first parameter of the IlvDisplay constructor.
IlvColor* IlvDisplay::getColor ( IlFloat  hue,
IlFloat  saturation,
IlFloat  value,
IlBoolean  isMutable = ((IlBoolean) 0) 
)

Gets a color by HSV values.

Provides a color whose HSV values correspond to the hue, saturation and value parameters.

Parameters:
hue The hue value of this color.
saturation The saturation value of this color.
value The luminosity value of this color.
isMutable A Boolean value to specify a mutable color.
Returns:
The color having the input HSV values, or 0 if not possible.
IlvColor* IlvDisplay::getColor ( IlvIntensity  r,
IlvIntensity  g,
IlvIntensity  b,
IlBoolean  isMutable = ((IlBoolean) 0) 
)

Gets a color by RGB values.

Provides a color whose RGB components are set to the given r, g and b values.

Parameters:
r The red component value.
g The green component value.
b The blue component value.
isMutable A Boolean value to specify a mutable color.
Returns:
The color having the input RGB components, or 0 if not possible.
IlvColor* IlvDisplay::getColor ( const char *  name,
IlBoolean  isMutable = ((IlBoolean) 0) 
)

Gets a color by name.

Retrieves the color commonly called name. These color names come from the X Window color-naming scheme. The optional isMutable parameter, which defaults to IlFalse, creates a mutable color when set to IlTrue.

Parameters:
name The name of the color.
isMutable A Boolean value to specify a mutable color.
Returns:
The color with the specified name, or 0 if not possible.
IlBoolean IlvDisplay::getColorRGB ( const char *  name,
IlvIntensity r,
IlvIntensity g,
IlvIntensity b 
) const

Gets RGB color values.

Parameters:
name The name of the RGB color.
r The red component value.
g The green component value.
b The blue component value.
Returns:
In the r, g, and b parameters, the values of the components of the color called name without allocating it. This member function returns IlTrue if name corresponds to a known r, g, b triplet, and IlFalse otherwise. This member function is called by the getColor member function.
IlSymbol* IlvDisplay::getCurrentLanguage (  )  const

Gets the current language.

Gets the current language associated with the display.

Returns:
The current language.
IlvLookStyle IlvDisplay::getCurrentLook (  )  const

Gets the current look.

Retrieves the look identifier used by this display instance. If the display does not use a predefined look and feel, the returned value is IlvOtherLook.

Returns:
The current look identifier used by this display instance.
IlvCursor* IlvDisplay::getCursor ( const char *  name  ) 

Gets a cursor.

Parameters:
name The name of the cursor to be retrieved.
Returns:
The cursor with the specified name.
IlvMessageDatabase* IlvDisplay::getDatabase (  )  const

Gets the message database.

Each instance of the IlvDisplay class creates its own message database. It reads the database description from the file name provided in the environment variable ILVDB, or views.dbm if this variable is not set. This file is searched for in the display path.

Returns:
The message database.
const char* IlvDisplay::getEnvOrResource ( const char *  envName,
const char *  resName = 0,
const char *  defaultValue = 0 
) const

Gets a value from an environment variable or a resource.

Retrieves the value either as an environment variable or a resource. The order of priority is first the environment variable and then the resource, when the value is not found.
The returned string must never be deleted or modified. It may be modified by the system and should be copied if you need to keep it.

Parameters:
envName The name of the environment variable to be retrieved.
resName The name of the resource to be retrieved. A null value means that the envName is also used as the resource name.
defaultValue The default value if no environment variable or any resource is found.
Returns:
The resource string if there is one associated with the application name of the current session, or the defaultValue if not.
const char* const* IlvDisplay::getFamilyNames ( IlUShort count  )  const

Gets font family names.

Parameters:
count The length of the returned array.
Returns:
An array of sorted family font names. This array is overwritten at each call and should never be deleted. The number of available family fonts is stored in the count parameter.
IlvFont* IlvDisplay::getFont ( const char *  fontFamily,
IlvFontSize  fontSize,
IlvFontStyle  fontStyle = IlvNormalFontStyle,
const char *  foundry = 0 
)

Gets a font.

Retrieves the font object having the given characteristics. This method lets you specify the font family, the font size, the font style, and optionally the font foundry.

Parameters:
fontFamily The name of the font family.
fontSize The size of the font.
fontStyle The style of the font.
foundry The font foundry.
Returns:
The font with the specified characteristics.
IlvFont* IlvDisplay::getFont ( const char *  fontName  ) 

Gets a font.

Retrieves the font object of the given fontName. This behavior is system-dependent. If the name begins with a `%' character, then Rogue Wave Views tries to create a full font object from the value stored in the name string, which must have the form:

    fontName-fontSize-fontFlags
 

fontName is the family name of the font, such as courier, helvetica or times. fontSize is an integer value that gives the font's size. fontFlags is a series of characters that indicates the font style: B for bold, I for italic and U for underlined. This field can be empty for a normal font.
You may specify the font foundry on systems where conflicts may appear. This parameter is highly system-dependent. The foundry then appears at the end of the Rogue Wave Views font name, after an additional dash.
This function returns 0 if no such a font can be created.

Parameters:
fontName The name of the font object, or a string in the format fontName-fontSize-fontFlags that also may provide size and style flags, and a font foundry.
Returns:
The font object having the given name, or 0 if not possible.
IlvDim* IlvDisplay::getFontSizes ( const char *  fontFamily,
IlvFontStyle  fontStyle,
int &  count,
const char *  foundry = 0 
) const

Gets font sizes.

Can be used to know what sizes are available for the font family fontFamily, if given the style fontStyle and optionally foundry. An array of sorted valid sizes is returned. This array is overwritten at each call, and should never be deleted. The length of this array is stored in the count parameter. On systems that have scalable fonts, the first element of this array is 0. That means that you can allocate a font that has these characteristics, and any possible size.

Parameters:
fontFamily The name of the font family.
fontStyle The style of the font.
count The length of the return array.
foundry The font foundry.
Returns:
The valid sizes of the font with the specified characteristics.
IlvGradientPattern* IlvDisplay::getGradientPattern ( const char *  alias  )  const

Gets a gradient pattern.

Parameters:
alias The alias of the gradient pattern to be retrieved.
Returns:
The gradient pattern with the specified alias, or NULL if there is none.
const char* IlvDisplay::getHome (  )  const

Gets the current home setting.

Returns:
A string that represents the current IlvHome setting. You must not modify nor delete the returned string.
IlvPalette* IlvDisplay::getInvertedPalette ( const IlvPalette source  ) 

Gets an inverted palette.

Parameters:
source The palette to be inverted.
Returns:
A palette that has the same properties as the source palette, except for the background and foreground that are swapped.
IlvGradientPattern* IlvDisplay::getLinearGradientPattern ( IlvColor startColor,
IlvColor endColor,
IlvPoint  startPoint,
IlvPoint  endPoint,
IlvDim  width = 0,
IlvDim  height = 0,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a linear gradient pattern.

Parameters:
startColor The start color.
endColor The end color.
startPoint The start point.
endPoint The end point.
width The width of the gradient pattern. If no /a width is provided, the value will be internally computed based on the coordinates of the start and end points.
height The height of the gradient pattern.If no /a height is provided, the value will be internally computed based on the coordinates of the start and end points.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.
IlvGradientPattern* IlvDisplay::getLinearGradientPattern ( IlvColorStop **  colorStops,
IlUInt  nColorStops,
IlvPoint  startPoint,
IlvPoint  endPoint,
IlvDim  width = 0,
IlvDim  height = 0,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a linear gradient pattern.

Parameters:
colorStops An array of color stops.
nColorStops The number of color stops.
startPoint The start point.
endPoint The end point.
width The width of the gradient pattern. If no /a width is provided, the value will be internally computed based on the coordinates of the start and end points.
height The height of the gradient pattern.If no /a height is provided, the value will be internally computed based on the coordinates of the start and end points.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned. If less than 2 color stops are defined, this method returns NULL.
IlvLineStyle* IlvDisplay::getLineStyle ( const char *  name  )  const

Gets a line style.

This member function uses the name parameter to return a previously defined line style.

Parameters:
name The name of the line style.
Returns:
The line style having the specified name.
IlvLineStyle* IlvDisplay::getLineStyle ( IlUShort  count,
const unsigned char *  dashes,
IlUShort  offset = 0 
)

Gets a line style.

This member function retrieves a line style based on the count, dashes, and offset parameters (see IlvLineStyle).

Parameters:
count The length of the line style array.
dashes The number of foreground-colored pixels in a dash.
offset The number of pixels to be skipped before the next dash.
Returns:
The line style having the specified characteristics.
IlvLookFeelHandler* IlvDisplay::getLookFeelHandler (  )  const

Gets the current look and feel handler.

Returns:
The current look and feel handler used by this display instance.
IlvLookFeelHandler* IlvDisplay::getLookFeelHandler ( IlSymbol  )  const

Returns the look and feel handler whose name is specified.

If no look and feel handler with name as the name has already been created, a new one is created.

Parameters:
name The name of the look and feel handler.
Returns:
The look and feel handler whose name is specified.
const char* IlvDisplay::getMessage ( const char *  msgid  )  const

Gets a message string from a message identifier.

The method firts queries the current language from the locale, then gets the translation of msgid in this language from the IlvDisplay message database.
For instance, in an English Latin1 locale, getMessage("&save") returns the constant string "Save".
In a French Latin1 locale, the same call returns "Enregistrer".

Usually, the first character of a message identifier is '&'. However, this is not mandatory; this convention just helps recognizing message identifiers from simple labels.

Parameters:
msgid The identifier of the message to retrieve.
Returns:
The message translation. The returned string should not be modified. If the message database does not contain a translation for msgid in the current language, the method returns msgid.
See also:
getDatabase()
IlvMessageDatabase
IlvMessageDatabase::getMessage().
IlvPalette* IlvDisplay::getPalette ( IlvColor background = 0,
IlvColor foreground = 0,
IlvPattern pattern = 0,
IlvColorPattern colorPattern = 0,
IlvFont font = 0,
IlvLineStyle lineStyle = 0,
IlUShort  lineWidth = 0,
IlvFillStyle  fillStyle = IlvFillPattern,
IlvArcMode  arcMode = IlvArcPie,
IlvFillRule  fillRule = IlvEvenOddRule,
IlvIntensity  alpha = ((IlvIntensity)-1),
IlvAntialiasingMode  antialias = IlvDefaultAntialiasingMode,
IlvGradientPattern gradientPattern = 0 
)

Gets a palette.

Provides you with a palette. When you intend to use a palette that does not need to be directly modified, you can allocate the palette using that member function. That is, you would never use any of the set member functions (documented later) in the case of such a palette. If you use this technique, you have to be sure to lock and unlock this IlvPalette object when needed, since it is shared among all the objects that are created in this session. If you don't need specific resources, you can set the parameters of this function to 0; then the display's default resources will be used in this palette.

Parameters:
background The background color, or 0 for the default.
foreground The foreground color, or 0 for the default.
pattern The pattern, or 0 for the default.
colorPattern The color pattern, or 0 for the default.
gradientPattern The gradient pattern, or 0 for the default.
font The font, or 0 for the default.
lineStyle The line style, or 0 for the default.
lineWidth The line width, or 0 for the default.
fillStyle The fill style, or 0 for the default.
arcMode the arc mode, or 0 for the default.
fillRule The fill rule, or 0 for the default.
alpha The alpha value, or IlvFullIntensity for the default.
antialias The anti-aliasing mode, or IlvDefaultAntialiasingMode for the default.
Returns:
A palette.
IlvPalette* IlvDisplay::getPalette ( const char *  paletteName  ) 

Gets a palette.

Parameters:
paletteName The name of the palette to be retrieved.
Returns:
The palette having the name paletteName in this display, or NULL if there is none.
const char* IlvDisplay::getPath (  )  const

Gets the display's search path.

The access to files is greatly simplified by the display path mechanism: if the path name provided in a call to the functions that open and read files is relative, then the function will search for the file name in the directories specified in the display path. The display path is made of the concatenation of three parts: the current directory (known as `.'), the user path, that can be loaded at runtime and changed afterwards, and the system path, which is built upon the home setting.
The setting of the product home is made by using the environment variable ILVHOME or the display resource IlvHome. It defaults to /usr/local/roguewave/views<ver>. The setting of the user path is made by using the environment variable ILVPATH or the display resource IlvPath. It defaults to an empty path.
The following member functions can be used to check and manipulate the display path, as well as to check whether a filename exists in any of the directories specified in the display path:

Returns:
A string that defines the entire path used by the display to locate files. This string must not be deleted or modified by the user.
IlvPattern* IlvDisplay::getPattern ( const char *  name  )  const

Gets a pattern.

Parameters:
name The name of the pattern to be retrieved.
Returns:
The pattern with the specified name.
IlvGradientPattern* IlvDisplay::getRadialGradientPattern ( IlvColor startColor,
IlvColor endColor,
IlvPoint  startCenter,
IlvDim  startRadius,
IlvPoint  endCenter,
IlvDim  endRadius,
IlvDim  width = 0,
IlvDim  height = 0,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a radial gradient pattern.

Parameters:
startColor The start color.
endColor The end color.
startCenter The center of the start circle.
startRadius The radius of the start circle.
endCenter The center of the end circle.
endRadius The radius of the end circle.
width The width of the gradient pattern. If no /a width is provided, the value will be internally computed based on the coordinates of the start and end circles.
height The height of the gradient pattern.If no /a height is provided, the value will be internally computed based on the coordinates of the start and end circles.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.
IlvGradientPattern* IlvDisplay::getRadialGradientPattern ( IlvColorStop **  colorStops,
IlUInt  nColorStops,
IlvPoint  startCenter,
IlvDim  startRadius,
IlvPoint  endCenter,
IlvDim  endRadius,
IlvDim  width = 0,
IlvDim  height = 0,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a radial gradient pattern.

Parameters:
colorStops An array of color stops.
nColorStops The number of color stops.
startCenter The center of the start circle.
startRadius The radius of the start circle.
endCenter The center of the end circle.
endRadius The radius of the end circle.
width The width of the gradient pattern. If no /a width is provided, the value will be internally computed based on the coordinates of the start and end circles.
height The height of the gradient pattern.If no /a height is provided, the value will be internally computed based on the coordinates of the start and end circles.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned. If less than 2 color stops are defined, this method returns NULL.
IlvGradientPattern* IlvDisplay::getRadialGradientPattern ( IlvColor startColor,
IlvColor endColor,
IlvDim  width,
IlvDim  height,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a radial gradient pattern.

The gradient start and end circles will be computed based on the /a width and /a height parameters. The circles will be centered at the coordinate (/a width/2, /a height/2). The start circle will have a radius equal to 1. The end circle will have a radius equal to the smallest value between /a width and /a height divided by 2.

Parameters:
startColor The start color.
endColor The end color.
width The width of the gradient pattern.
height The height of the gradient pattern.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.
IlvGradientPattern* IlvDisplay::getRadialGradientPattern ( IlvColorStop **  colorStops,
IlUInt  nColorStops,
IlvDim  width,
IlvDim  height,
IlvGradientTransformMode  mode = IlvGradientTransformGraphic,
IlvGradientAspectRatio  aspectRatio = IlvGradientAspectRatioNo,
IlvGradientSpread  spread = IlvGradientPadSpread,
const char *  alias = 0 
) const

Gets a radial gradient pattern.

The gradient start and end circles will be computed based on the /a width and /a height parameters. The circles will be centered at the coordinate (/a width/2, /a height/2). The start circle will have a radius equal to 1. The end circle will have a radius equal to the smallest value between /a width and /a height divided by 2.

Parameters:
colorStops An array of color stops.
nColorStops The number of color stops.
width The width of the gradient pattern.
height The height of the gradient pattern.
mode The gradient transform mode.
aspectRatio The gradient aspect ratio.
spread The type of spread.
alias The alias of the gradient pattern.
Returns:
A gradient pattern instance matching the input parameters. If the /a alias parameter is not NULL and a gradient pattern instance with the same /a alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned. If less than 2 color stops are defined, this method returns NULL.
const char* IlvDisplay::getResource ( const char *  resourceName,
const char *  objectName,
const char *  objectClassName,
const char *  storageName = 0,
const char *  storageClassName = 0 
) const

Gets a resource.

Retrieves the value of the resource that matches the following pattern:

 [ApplicationName|"RogueWaveViews"].
      [storageClassName|storageName].
          [objectClassName|objectName]

where: storageClassName is the generic name of the storage instance, for example, IlvContainer. storageName is the name of the storage instance. objectClassName is the generic name of the object class, for example, IlvButton. objectName is the name of the object instance. Both objectName and storageName can be 0.

Parameters:
resourceName The resource name.
objectName The object name.
objectClassName The generic name of the object class.
storageName The generic name of the storage instance.
storageClassName The generic name of the storage class.
Returns:
The value of the resource that matches the pattern.
const char* IlvDisplay::getResource ( const char *  resourceName,
const char *  defaultValue = 0 
) const

Gets a resource.

Retrieves the possible resource string associated with the application name of the current Rogue Wave Views session (specified in the IlvDisplay constructor) and the string resourceName. The way resources are stored within your display system configuration files is obviously system dependent. You must never modify or delete the returned string.
If no resource matches the given string, then this member function returns the default value provided in the defaultValue parameter. The result of a getResource call is reused every time you call the function.
The default resources that are initialized when an instance of the IlvDisplay class is created use the system resources mechanism.
The default foreground color is created from the resource name "foreground".
The default background color is created from the resource name "background".
The default font is created from the resource name "font". To obtain a new font, or the size of an existing font, use the getFont or getFontSizes member functions of IlvDisplay.

Parameters:
resourceName The name of the resource to be retrieved.
defaultValue A default string to be returned if the get is unsuccessful.
Returns:
The resource string if there is one associated with the application name of the current session, or the defaultValue value if not.
IlvView* IlvDisplay::getView ( IlvSystemView  view  )  const

Gets a system view object.

Parameters:
view The name of the queried view.
Returns:
a pointer to the IlvView object that has the system view view in this display, or 0 if none could be found.
IlvView* IlvDisplay::getView ( const char *  name  )  const

Gets a view object.

Parameters:
name The name of the view object to be retrieved.
Returns:
A pointer to the IlvView object that has the name name in this display, or 0 if none could be found.
IlvView* const* IlvDisplay::getViews ( IlUInt count  )  const

Gets view objects.

Parameters:
count The number of view objects to be retrieved.
Returns:
An array of pointers to the allocated IlvView objects. This array should not be modified or deleted (it actually is a data block managed by IlvPoolOf(Pointer)).
IlBoolean IlvDisplay::hasEvents (  )  const

Notifies you when events occur.

Watches for the possible existence of external events: that is, mouse and keyboard operations.

Returns:
IlTrue when an event has occurred.
IlBoolean IlvDisplay::initDump ( IlvPort device  ) 

Directs output to a dump device.

Initializes the redirection towards a dump device given in dumpDevice that should have been correctly initialized.

Parameters:
dumpDevice The dump device.
IlBoolean IlvDisplay::isBad (  )  const

Tells you if object creation was unsuccessful.

Lets you discover whether or not the creation of the IlvDisplay object has succeeded. It returns IlTrue if there has been an error when creating the IlvDisplay, and IlFalse if not.

Returns:
IlTrue if there was an error in creating the object, and IlFalse if not.
IlBoolean IlvDisplay::isCairoEnabled (  )  const

Indicates whether Cairo features are available.

Returns:
IlTrue if Cairo features are available. isCairoEnabled() always returns IlFalse on Windows.
IlBoolean IlvDisplay::isDumping (  )  const

Tells you if dumping is occurring.

Returns:
IlTrue if dumping is taking place or IlFalse if it is not.
IlBoolean IlvDisplay::isRightButtonValueUsed (  )  const

Tells you if the right mouse button was used.

Returns:
The current status of the value set in the IlvEvent when the user clicks the right button on a mouse with only two buttons.
void IlvDisplay::movePointer ( IlvPoint p  )  const

Moves the cursor to a specified point.

Moves the cursor to another position on the screen. The cursor is moved to a precisely specified point, indicated by the parameter p.

Parameters:
p The point to which the cursor is to be moved.
void IlvDisplay::movePointer ( IlvDeltaPoint dp  )  const

Moves the cursor to a relative position.

Moves the cursor to another position on the screen. This method moves it to a point whose relative position is indicated by the vector dp.

Parameters:
dp The position to which the cursor is to be moved, relative to the current position.
void IlvDisplay::pixelToRGB ( IlUInt  pixel,
IlvIntensity r,
IlvIntensity g,
IlvIntensity b 
) const

Provides the RGB values for a pixel index.

Provides the RGB values that correspond to the pixel index.

Parameters:
pixel The pixel index.
r The red component value.
g The green component value.
b The blue component value.
Returns:
The red green blue values.
void IlvDisplay::prependToPath ( const char *  pathPart  ) 

Prepends a directory to the display's search path.

Adds at the beginning of the user path the directory specified in pathPart, which becomes the first directory to be scanned when file names are searched for.

Parameters:
pathPart Contains the path extension to be prepended.
void IlvDisplay::putBitmapData ( IlvSystemPort bitmap,
const IlvRect rect,
unsigned char *  data,
IlUInt  size 
) const

Changes bitmap data.

Modifies the image data of an IlvBitmap object in the area indicated by rect. You modify the bitmap object by setting its data bytes to the values stored in the data array. This array has a length of size bytes, and the modified region must be given in the rect parameter.
The data has the same format as in the second constructor of IlvBitmap, that is, it must contains 8 bits per pixel data when used in a bitmap, or 32 bits if the bitmap depth is greater than 8.

Parameters:
bitmap The bitmap object to the modified.
rect The rectangular area to be modified.
data An array containing the modification values.
size The length of the data array.
void IlvDisplay::queryPointer ( IlvPos x,
IlvPos y,
IlUShort modifiers 
) const

Finds the cursor.

Provides you with the global position of the cursor with respect to the root port.

Parameters:
x The x coordinate of the pointer.
y The y coordinate of the pointer.
modifiers The mouse modifiers.
void IlvDisplay::readAndDispatchEvents (  )  const

Reads and dispatches all pending events.

Reads all pending events and dispatches them to the views.

IlvBitmap* IlvDisplay::readAsciiBitmap ( const char *  filename  ) 

Reads an ASCII bitmap.

Reads a bitmap from the file filename that stores an ASCII format image, returning a pointer to the IlvBitmap object. 0 is returned if filename does not exist or if the file data does not match an ASCII format. This format is the one used by the X Window display system. Two ASCII formats exist: XBM for monochrome images and XPM for color image formats. The returned IlvBitmap object is given the name filename. If filename is a relative path name, the display path is used to locate the actual data file. (See also IlvBitmap::saveAscii.)

Warning:
[note] Before calling readAsciiBitmap, you should test whether the bitmap has not already been loaded by calling the getBitmap member function. Otherwise, different object pointers would be returned for the same bitmap.
Parameters:
filename The name of the file to be read from.
Returns:
A pointer to the IlvBitmap object created by reading from the file filename that stores an ASCII format image, or 0 if not possible.
IlvBitmap* IlvDisplay::readBitmap ( const char *  filename  ) 

Reads a bitmap.

Reads a bitmap from the file filename, returning a pointer to the IlvBitmap object. 0 is returned if filename does not exist or if the file data does not match any registered format or if a module for the file data has not been found . The IlvBitmap object is given the name filename. If filename is a relative path name, the display path is used to locate the actual data file. filename can also be an URL as specified in IlIUrlStream.

Registering a format just consists of including the corresponding header and linking with the appropriate library:

  • ilviews/bitmaps/png.h and ilvpng for PNG images.
  • ilviews/bitmaps/jpg.h and ilvjpg for JPEG images.
  • ilviews/bitmaps/bmp.h and ilvbmp for BMP images.
  • ilviews/bitmaps/ppm.h and ilvppm for PPM images.
  • ilviews/bitmaps/wbmp.h and ilvwbmp for WBMP images.

The XPM and XBM format are always registered. The file format is automatically recognized from the data. Unknown file format at compile time can also be loaded at runtime if the platform supports dynamic modules and a module exists for this format. In this case, it is not necessary to use the header and library.

The old method of registering the bitmap readers using their file extension is still supported.

Warning:
[note] The GIF format is not supported anymore due to patents enforced by Unisys on the LZW compression.
[note] Before calling readBitmap, you should test to see if the bitmap has not already been loaded by calling the getBitmap member function. Otherwise, different object pointers would be returned for the same bitmap.
Parameters:
filename The name of the file to be read from.
Returns:
A pointer to the IlvBitmap object created by reading from the file filename.
IlvBitmapData* IlvDisplay::readBitmapData ( const char *  filename  ) 

Reads a bitmap data.

Reads a bitmap data from the file filename, returning a pointer to the IlvBitmapData object. See IlvDisplay::readBitmap for more information.

This method only works with bitmap streamers (returns 0 for XPM and XBM images).

Parameters:
filename The name of the file to be read from.
Returns:
A pointer to the IlvBitmapData object created by reading from the file filename.
void IlvDisplay::refreshAllViews (  ) 

Refreshes all views.

Immediately refreshes all the views allocated by this display. This is useful when you globally change the appearance of your applications (changing the current language or look, for example).

void IlvDisplay::removeChangeLanguageCallback ( IlvDisplayCallback  cb,
IlAny  arg 
)

Removes a user language change callback.

Lets you remove a callback previously set using the IlvDisplay::addChangeLanguageCallback method.

Parameters:
cb The callback function.
arg The user argument passed to the callback.
void IlvDisplay::removeChangeLookCallback ( IlvDisplayCallback  cb,
IlAny  arg 
)

Removes a user look change callback.

Lets you remove a callback previously set using the IlvDisplay::addChangeLookCallback method.

Parameters:
cb The callback function.
arg The user argument passed to the callback.
void IlvDisplay::restartDump (  ) 

Restarts output to a dump device.

Restarts output redirection.

IlvRect& IlvDisplay::screenBBox ( IlvRect bbox,
IlBoolean  workArea = ((IlBoolean) 1),
const IlvRect rect = 0 
) const

Gets the screen bounding box.

Parameters:
bbox The returned bounding box of the screen.
workArea A Boolean value indicating whether the returned bounding box contains only the working area. This parameter is meaningful only on Microsoft Windows, where the working area is the bounding of the screen without the task bar.
rect A pointer to a rectangle. This parameter is used in multiple monitor environments. If rect is 0, the returned bounding box is the union of all of the monitors' bounding boxes. If not, the returned bounding box is the bounding of the monitor that contains the largest part of the rectangle rect.
Returns:
The screen bounding box.
IlUShort IlvDisplay::screenDepth (  )  const

Gets the screen depth.

Returns:
The depth of the screen.
IlvDim IlvDisplay::screenHeight (  )  const

Gets the screen height in pixels.

Returns:
The height of the screen, in pixels.
IlvDim IlvDisplay::screenHeightMM (  )  const

Gets the screen height in millimeters.

Returns:
The estimated height, in millimeters, of the screen addressed by this IlvDisplay. Note that the returned value is only an estimation returned by the underlying windowing system (as returned by XDisplayHeight on X11 and GetDeviceCaps(VERTSIZE) on Windows).
IlvSystemPort* IlvDisplay::screenPort (  )  const

Allows you to draw into the dislay system desktop.

Gives you the possibility of drawing into a special IlvPort object: the root window of your display system (also called the "<em>desktop</em>"of your workstation).

IlvDim IlvDisplay::screenWidth (  )  const

Gets the screen width in pixels.

Returns:
The width of the screen, in pixels.
IlvDim IlvDisplay::screenWidthMM (  )  const

Gets the screen width in millimeters.

Returns:
The estimated width, in millimeters, of the screen addressed by this IlvDisplay. Note that the returned value is only an estimation returned by the underlying windowing system (as returned by XDisplayWidth on X11 and GetDeviceCaps(HORZSIZE) on Windows).
void IlvDisplay::setAntialiasingMode ( IlvAntialiasingMode  antialias  ) 

Sets the current anti-aliasing mode of the display.

Parameters:
The new anti-aliasing mode of the display.
void IlvDisplay::setCurrentLanguage ( IlSymbol language  ) 

Sets the current language.

Sets the current language associated with the display.

Parameters:
language The name of the language to be set.
void IlvDisplay::setCurrentLook ( IlvLookStyle  style  ) 

Sets the current look.

Sets the look identifier used by this display instance to the IlvLookStyle style. Use this method to set a predefined look and feel to this display instance. To set a user-defined look and feel, use the setLookFeelHandler method.

Parameters:
style The look identifier to be set.
See also:
setLookFeelHandler
void IlvDisplay::setLookFeelHandler ( IlvLookFeelHandler lfh  ) 

Sets the current look and feel handler.

Sets a user-defined look and feel handler to this display instance. The previous look and feel handler is deleted. All the objects created with this display instance, and currently held by an IlvGraphicHolder, will be notified of this change. See the method IlvGadget::updateLook for more information.

Parameters:
lfh The new look and feel handler.
void IlvDisplay::setPath ( const char *  path  ) 

Sets the display's search path.

Sets the entire display path to a copy of path.

Parameters:
path The path to be set.
void IlvDisplay::stopDump (  ) 

Temporarily stops output to a dump device.

Momentarily halts any existing output redirection.

void IlvDisplay::sync (  )  const

Flushes the output buffer and waits for completion.

Flushes the output buffer and waits until all the requests have been processed. On X, it calls XSync((Display*)_internal, 0);.

void IlvDisplay::synchronize ( IlBoolean  value = ((IlBoolean) 1)  )  const

Sets synchronous mode.

Sets the connection to the server to the sync mode if value is IlTrue. On X, it calls XSynchronize((Display*)_internal, (int) value). Setting the connection to synchronous mode affects performance significantly, but is useful for debugging purposes.

Parameters:
value A Boolean set to IlTrue to set the sync mode.
void IlvDisplay::useRightButtonValue ( IlBoolean  flag  ) 

Sets a flag for the right mouse button.

Sets the current status of the value set in the IlvEvent when the user clicks the right button on a mouse with only two buttons.

Parameters:
flag A Boolean value.
void IlvDisplay::waitAndDispatchEvents (  )  const

Reads and dispatches the next event.

Reads the next event and dispatches it.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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