Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Friends
IlvDisplay Class Reference

Display class. More...

#include <ilviews/ilv.h>

Inheritance diagram for IlvDisplay:
IlvStylist

Public Member Functions

 IlvDisplay (const char *className, const char *displayName=0, int argc=0, char **argv=0, IlvDisplayConfigCallback dcc=0, IlAny dccArg=0)
 Initializes a new IlvDisplay instance. More...
 
 IlvDisplay (IlAny internal, const char *className=0, IlvDisplayConfigCallback dcc=0, IlAny dccArg=0)
 Initializes a new IlvDisplay instance using an existing connection to the display system. More...
 
virtual ~IlvDisplay ()
 Destructor. More...
 
void addChangeLanguageCallback (IlvDisplayCallback cb, IlAny arg)
 Adds a user language change callback. More...
 
void addChangeLookCallback (IlvDisplayCallback cb, IlAny arg)
 Adds a user look change callback. More...
 
void appendToPath (const char *pathPart)
 Appends a directory to the display's search path. More...
 
void bell (int volume=0) const
 Rings the system bell. More...
 
IlUShort colorTable (IlvIntensity *r, IlvIntensity *g, IlvIntensity *b, unsigned char *indexes, IlBoolean getMutables=IlFalse) const
 Provides a color table. More...
 
IlvFontcreateFont (const char *family, IlvFontSize size, const char *resolution, IlvFontStyle style, const char *foundry)
 
IlvFontcreateFont (const char *family, IlvFontSize size, IlvFontStyle style, const char *foundry)
 
IlvFontcreateSystemFont (const char *realname)
 
IlvColordefaultBackground () const
 Gets the default background color. More...
 
IlvFontdefaultBoldFont () const
 
IlvCursordefaultCursor () const
 Gets the default cursor. More...
 
IlvFontdefaultFont () const
 
IlvColordefaultForeground () const
 Gets the default foreground color. More...
 
IlvFontdefaultItalicFont () const
 
IlvFontdefaultLargeFont () const
 
IlvLineStyledefaultLineStyle () const
 Gets the default line style. More...
 
IlvFontdefaultNormalFont () const
 
IlvPalettedefaultPalette () const
 Gets the default palette. More...
 
IlvPatterndefaultPattern () const
 Gets the default pattern. More...
 
IlvFontdupFont (IlvFont *srcFont, const char *dstAlias)
 
void endDump ()
 Ends output to a dump device. More...
 
const char * findInPath (const char *fileName, IlBoolean noLocalization=IlFalse) const
 Finds a file in the display's search path. More...
 
IlvViewfindPointerView () const
 Finds the view object under the pointer device location. More...
 
void flush () const
 Flushes the output buffer. More...
 
IlvFontManager *const fontManager () const
 Access to display's font manager. More...
 
void freeFont (IlvFont *)
 
IlvColorget8bitsColor (IlUShort r, IlUShort g, IlUShort b, IlBoolean isMutable=IlFalse)
 Gets a color by 8bits RGB values. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Returns the current anti-aliasing mode of the display. More...
 
IlvBitmapgetBitmap (const char *name, IlBoolean read=IlFalse) const
 Gets a bitmap. More...
 
unsigned char * getBitmapData (const IlvSystemPort *bitmap, IlUInt &size, const IlvRect &rect) const
 Gets bitmap data. More...
 
int getBitPlanesGroup () const
 Gets the bitplane group index. More...
 
const char * getClassName () const
 Gets the class name specified in the IlvDisplay constructor. More...
 
IlvColorgetColor (const char *name, IlBoolean isMutable=IlFalse)
 Gets a color by name. More...
 
IlvColorgetColor (IlFloat hue, IlFloat saturation, IlFloat value, IlBoolean isMutable=IlFalse)
 Gets a color by HSV values. More...
 
IlvColorgetColor (IlvIntensity r, IlvIntensity g, IlvIntensity b, IlBoolean isMutable=IlFalse)
 Gets a color by RGB values. More...
 
IlBoolean getColorRGB (const char *name, IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Gets RGB color values. More...
 
IlSymbolgetCurrentLanguage () const
 Gets the current language. More...
 
IlvLookStyle getCurrentLook () const
 Gets the current look. More...
 
IlvCursorgetCursor (const char *name)
 Gets a cursor. More...
 
IlvMessageDatabasegetDatabase () const
 Gets the message database. More...
 
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. More...
 
const char *const * getFamilyNames (IlUShort &count) const
 
IlvFontgetFont (const char *fontFamily, IlvFontSize fontSize, const char *fontResolution, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0)
 
IlvFontgetFont (const char *fontFamily, IlvFontSize fontSize, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0)
 
IlvFontgetFont (const char *fontName)
 
IlStringHashTable * getFontAliases () const
 
IlStringHashTable * getFonts () const
 
IlvDimgetFontSizes (const char *fontFamily, IlvFontStyle fontStyle, int &count, const char *foundry=0) const
 
IlvGradientPatterngetGradientPattern (const char *alias) const
 Gets a gradient pattern. More...
 
const char * getHome () const
 Gets the current home setting. More...
 
IlvPalettegetInvertedPalette (const IlvPalette *source)
 Gets an inverted palette. More...
 
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. More...
 
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. More...
 
IlvLineStylegetLineStyle (const char *name) const
 Gets a line style. More...
 
IlvLineStylegetLineStyle (IlUShort count, const unsigned char *dashes, IlUShort offset=0)
 Gets a line style. More...
 
IlvLookFeelHandlergetLookFeelHandler () const
 Gets the current look and feel handler. More...
 
IlvLookFeelHandlergetLookFeelHandler (IlSymbol *name) const
 Returns the look and feel handler whose name is specified. More...
 
const char * getMessage (const char *msgid) const
 Gets a message string from a message identifier. More...
 
IlvPalettegetPalette (const char *paletteName)
 Gets a palette. More...
 
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=IlvFullIntensity, IlvAntialiasingMode antialias=IlvDefaultAntialiasingMode, IlvGradientPattern *gradientPattern=0, IlvBorderPosition borderPosition=IlvBorderPosition::centeredOnBounds)
 Gets a palette. More...
 
IlAny getPaletteHandle () const
 Gets a Windows palette handle. More...
 
virtual IlvStylistgetParentStylist () const
 Returns the parent stylist. More...
 
const char * getPath () const
 Gets the display's search path. More...
 
IlvPatterngetPattern (const char *name) const
 Gets a pattern. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
const char * getResource (const char *resourceName, const char *defaultValue=0) const
 Gets a resource. More...
 
const char * getResource (const char *resourceName, const char *objectName, const char *objectClassName, const char *storageName=0, const char *storageClassName=0) const
 Gets a resource. More...
 
IlvFontgetSystemFont (const char *)
 
IlUShort getTouchPointCount () const
 Get the current number of touch points, or more. More...
 
IlUShort getTouchPoints (const IlvPoint **relative, const IlvPoint **absolute=0) const
 Get the location of all active touch points. More...
 
IlvViewgetView (const char *name) const
 Gets a view object. More...
 
IlvViewgetView (IlvSystemView view) const
 Gets a system view object. More...
 
IlvView *const * getViews (IlUInt &count) const
 Gets view objects. More...
 
IlvWindowsDisplayConfiggetWindowsConfig () const
 Gets the IlvWindowsDisplayConfig object attached to this IlvDisplay. More...
 
IlvXDisplayConfiggetXConfig () const
 Gets the IlvXDisplayConfig object attached to this IlvDisplay. More...
 
IlBoolean hasEvents () const
 Notifies you when events occur. More...
 
IlBoolean hasMultiTouch () const
 Indicates if this IlvDisplay has multi-touch capability. More...
 
IlBoolean initDump (IlvPort *device)
 Directs output to a dump device. More...
 
IlBoolean isBad () const
 Tells you if object creation was unsuccessful. More...
 
IlBoolean isCairoEnabled () const
 Indicates whether Cairo features are available. More...
 
IlBoolean isDumping () const
 Tells you if dumping is occurring. More...
 
IlBoolean isRightButtonValueUsed () const
 Indicates how to interpret right mouse button events from mouse that have only two buttons. More...
 
IlBoolean makeFont (IlvFont *, const char *realname=0)
 
void movePointer (IlvDeltaPoint &dp) const
 Moves the cursor to a relative position. More...
 
void movePointer (IlvPoint &p) const
 Moves the cursor to a specified point. More...
 
void notifyStyleChanges ()
 notifies all the gadgets to recalculate and redraw based on the current L&F handler. This is automatically called in IlvDisplay::setLookFeelHandler and must be manually called for IlvStylist::setStylesheet when visual updates are needed. More...
 
void pixelToRGB (IlUInt pixel, IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Provides the RGB values for a pixel index. More...
 
void prependToPath (const char *pathPart)
 Prepends a directory to the display's search path. More...
 
void putBitmapData (IlvSystemPort *bitmap, const IlvRect &rect, unsigned char *data, IlUInt size, IlUInt bitmapPad=32) const
 Changes bitmap data. More...
 
void queryPointer (IlvPos &x, IlvPos &y, IlUShort &modifiers) const
 Finds the cursor. More...
 
void readAndDispatchEvents () const
 Reads and dispatches all pending events. More...
 
IlvBitmapreadAsciiBitmap (const char *filename)
 Reads an ASCII bitmap. More...
 
IlvBitmapreadBitmap (const char *filename)
 Reads a bitmap. More...
 
IlvBitmapDatareadBitmapData (const char *filename)
 Reads a bitmap data. More...
 
void refreshAllViews ()
 Refreshes all views. More...
 
void removeChangeLanguageCallback (IlvDisplayCallback cb, IlAny arg)
 Removes a user language change callback. More...
 
void removeChangeLookCallback (IlvDisplayCallback cb, IlAny arg)
 Removes a user look change callback. More...
 
void removeFont (IlvFont *)
 
void restartDump ()
 Restarts output to a dump device. More...
 
IlvRectscreenBBox (IlvRect &bbox, IlBoolean workArea=IlTrue, const IlvRect *rect=0) const
 Gets the screen bounding box. More...
 
IlUShort screenDepth () const
 Gets the screen depth. More...
 
IlvDim screenHeight () const
 Gets the screen height in pixels. More...
 
IlvDim screenHeightMM () const
 Gets the screen height in millimeters. More...
 
IlvSystemPortscreenPort () const
 Allows you to draw into the dislay system desktop. More...
 
IlvDim screenWidth () const
 Gets the screen width in pixels. More...
 
IlvDim screenWidthMM () const
 Gets the screen width in millimeters. More...
 
void setAntialiasingMode (IlvAntialiasingMode antialias)
 Sets the current anti-aliasing mode of the display. More...
 
IlBoolean setBitPlanesGroup (int group=-1)
 Sets the bitplane group index. More...
 
void setCurrentLanguage (IlSymbol *language)
 Sets the current language. More...
 
void setCurrentLook (IlvLookStyle style)
 Sets the current look. More...
 
void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the current look and feel handler. More...
 
void setPath (const char *path)
 Sets the display's search path. More...
 
void stopDump ()
 Temporarily stops output to a dump device. More...
 
void sync () const
 Flushes the output buffer and waits for completion. More...
 
void synchronize (IlBoolean value=IlTrue) const
 Sets synchronous mode. More...
 
void useRightButtonValue (IlBoolean flag)
 Indicates if right mouse button events should be interpreted as middle button events. More...
 
void waitAndDispatchEvents () const
 Reads and dispatches the next event. More...
 
- Public Member Functions inherited from IlvStylist
void removeStyling ()
 Removes all styling information from the stylist.
 
IlBoolean setStyleSheet (const char *text, size_t length)
 Applies styling information to this stylist. More...
 
IlBoolean setStyleSheet (std::istream &file)
 Applies styling information to this stylist. More...
 

Friends

class IlvColorPattern
 
class IlvLookFeelHandler
 
class IlvPalette
 
class IlvPattern
 

Detailed Description

Display class.

Library: xviews or winviews or mviews (mutually exclusive)

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

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

Constructor & Destructor Documentation

◆ IlvDisplay() [1/2]

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

Initializes a new IlvDisplay instance.

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
classNameThe application name for accessing associated resource files.
displayNameThe logical screen name.
argcOptional parameter of the main C++ function.
argvOptional parameter of the main C++ function.
dccSets a Display Configuration Callback.
dccArgA user argument passed to the callback.

◆ IlvDisplay() [2/2]

IlvDisplay::IlvDisplay ( IlAny  internal,
const char *  className = 0,
IlvDisplayConfigCallback  dcc = 0,
IlAny  dccArg = 0 
)

Initializes a new IlvDisplay instance using an existing connection to the display system.

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 className is the application name used to get any associated resource strings from resource files, such as the .XDefault file on UNIX systems.

Parameters
internalA descriptor of the underlying display system, exposed as an IlAny.
classNameThe application name for accessing associated resource files.
dccSets a Display Configuration Callback.
dccArgSpecifies a user argument which is passed to the IlvDisplayConfigCallback.

◆ ~IlvDisplay()

virtual IlvDisplay::~IlvDisplay ( )
virtual

Destructor.

The destructor immediately frees all graphic resources and views that have been used, thus enabling you to terminate a 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

◆ addChangeLanguageCallback()

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
cbThe callback function.
argA user argument passed to the callback.
See also
IlvDisplay::removeChangeLanguageCallback(), IlvDisplay::removeChangeLookCallback().

◆ addChangeLookCallback()

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
cbThe callback function.
argA user argument passed to the callback.
See also
IlvDisplay::removeChangeLookCallback(), IlvDisplay::removeChangeLanguageCallback().

◆ appendToPath()

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
pathPartContains the path extension to be appended.

◆ bell()

void IlvDisplay::bell ( int  volume = 0) const

Rings the system bell.

Rings the system bell.

Parameters
volumeSpecifies 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.

◆ colorTable()

IlUShort IlvDisplay::colorTable ( IlvIntensity r,
IlvIntensity g,
IlvIntensity b,
unsigned char *  indexes,
IlBoolean  getMutables = IlFalse 
) 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
rThe returned array of red component values.
gThe returned array of green component values.
bThe returned array of blue component values.
indexesThe returned of color indices.
getMutablesSpecifies, if IlTrue, that mutable colors are returned 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.

◆ createFont() [1/2]

IlvFont* IlvDisplay::createFont ( const char *  family,
IlvFontSize  size,
const char *  resolution,
IlvFontStyle  style,
const char *  foundry 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ createFont() [2/2]

IlvFont* IlvDisplay::createFont ( const char *  family,
IlvFontSize  size,
IlvFontStyle  style,
const char *  foundry 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ createSystemFont()

IlvFont* IlvDisplay::createSystemFont ( const char *  realname)

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultBackground()

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.

◆ defaultBoldFont()

IlvFont* IlvDisplay::defaultBoldFont ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultCursor()

IlvCursor* IlvDisplay::defaultCursor ( ) const

Gets the default cursor.

Returns
A predefined cursor.

◆ defaultFont()

IlvFont* IlvDisplay::defaultFont ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultForeground()

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.

◆ defaultItalicFont()

IlvFont* IlvDisplay::defaultItalicFont ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultLargeFont()

IlvFont* IlvDisplay::defaultLargeFont ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultLineStyle()

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.

◆ defaultNormalFont()

IlvFont* IlvDisplay::defaultNormalFont ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ defaultPalette()

IlvPalette* IlvDisplay::defaultPalette ( ) const

Gets the default palette.

Returns
A predefined palette. This palette has the default foreground and background, the default font.

◆ defaultPattern()

IlvPattern* IlvDisplay::defaultPattern ( ) const

Gets the default pattern.

Returns
A predefined pattern, which is the solid pattern.

◆ dupFont()

IlvFont* IlvDisplay::dupFont ( IlvFont srcFont,
const char *  dstAlias 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ endDump()

void IlvDisplay::endDump ( )

Ends output to a dump device.

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

◆ findInPath()

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

Finds a file in the display's search path.

Parameters
fileNameThe name of the file to be located.
noLocalizationCan 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.

◆ findPointerView()

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.

◆ flush()

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);.

◆ fontManager()

IlvFontManager* const IlvDisplay::fontManager ( ) const

Access to display's font manager.

Returns
The font manager.

◆ freeFont()

void IlvDisplay::freeFont ( IlvFont )

Deprecated, moved into IlvDisplay::fontManager().

◆ get8bitsColor()

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

Gets a color by 8bits RGB values.

Parameters
rThe red component value.
gThe green component value.
bThe blue component value.
isMutableIlTrue to specify that the returned color should be mutable.
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.

◆ getAntialiasingMode()

IlvAntialiasingMode IlvDisplay::getAntialiasingMode ( ) const

Returns the current anti-aliasing mode of the display.

Returns
The current anti-aliasing mode of the display.

◆ getBitmap()

IlvBitmap* IlvDisplay::getBitmap ( const char *  name,
IlBoolean  read = IlFalse 
) const

Gets a bitmap.

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

Parameters
nameThe name of the object to be retrieved.
readSpecifies whether (IlTrue) or not (IlFalse) the bitmap should be read from the file if it has not been found in the display.
Returns
The IlvBitmap that has the name name in this display, or 0 if none can be found.

◆ getBitmapData()

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().

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
bitmapThe bitmap object.
sizeThe size of the returned array.
rectThe rectangle of the bitmap.
Returns
The data that defines the image of an IlvBitmap object.

◆ getBitPlanesGroup()

int IlvDisplay::getBitPlanesGroup ( ) const

Gets the bitplane group index.

Note
This member function is specific for the X Window version of Rogue Wave Views.
Returns
The current bitplane group index that is used for resource allocation. The default value is -1, which means that no bitplane group is used.

◆ getClassName()

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.

◆ getColor() [1/3]

IlvColor* IlvDisplay::getColor ( const char *  name,
IlBoolean  isMutable = IlFalse 
)

Gets a color by name.

Retrieves the color commonly called name. These color names come from the X Window color-naming scheme.

Parameters
nameThe name of the color.
isMutableIlTrue to specify that the returned color should be mutable.
Returns
The color with the specified name, or 0 if not possible.

◆ getColor() [2/3]

IlvColor* IlvDisplay::getColor ( IlFloat  hue,
IlFloat  saturation,
IlFloat  value,
IlBoolean  isMutable = IlFalse 
)

Gets a color by HSV values.

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

Parameters
hueThe hue value of this color.
saturationThe saturation value of this color.
valueThe luminosity value of this color.
isMutableIlTrue to specify that the returned color should be mutable.
Returns
The color having the input HSV values, or 0 if not possible.

◆ getColor() [3/3]

IlvColor* IlvDisplay::getColor ( IlvIntensity  r,
IlvIntensity  g,
IlvIntensity  b,
IlBoolean  isMutable = IlFalse 
)

Gets a color by RGB values.

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

Parameters
rThe red component value.
gThe green component value.
bThe blue component value.
isMutableIlTrue to specify that the returned color should be mutable.
Returns
The color having the input RGB components, or 0 if not possible.

◆ getColorRGB()

IlBoolean IlvDisplay::getColorRGB ( const char *  name,
IlvIntensity r,
IlvIntensity g,
IlvIntensity b 
) const

Gets RGB color values.

Parameters
nameThe name of the RGB color.
rThe red component value.
gThe green component value.
bThe 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.

◆ getCurrentLanguage()

IlSymbol* IlvDisplay::getCurrentLanguage ( ) const

Gets the current language.

Gets the current language associated with the display.

Returns
The current language.

◆ getCurrentLook()

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.

◆ getCursor()

IlvCursor* IlvDisplay::getCursor ( const char *  name)

Gets a cursor.

Parameters
nameThe name of the cursor to be retrieved.
Returns
The cursor with the specified name.

◆ getDatabase()

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.

◆ getEnvOrResource()

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
envNameThe name of the environment variable to be retrieved.
resNameThe name of the resource to be retrieved. The value 0 means that the envName is also used as the resource name.
defaultValueThe 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.

◆ getFamilyNames()

const char* const* IlvDisplay::getFamilyNames ( IlUShort count) const

Deprecated, moved into IlvDisplay::fontManager().

◆ getFont() [1/3]

IlvFont* IlvDisplay::getFont ( const char *  fontFamily,
IlvFontSize  fontSize,
const char *  fontResolution,
IlvFontStyle  fontStyle = IlvNormalFontStyle,
const char *  foundry = 0 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ getFont() [2/3]

IlvFont* IlvDisplay::getFont ( const char *  fontFamily,
IlvFontSize  fontSize,
IlvFontStyle  fontStyle = IlvNormalFontStyle,
const char *  foundry = 0 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ getFont() [3/3]

IlvFont* IlvDisplay::getFont ( const char *  fontName)

Deprecated, moved into IlvDisplay::fontManager().

◆ getFontAliases()

IlStringHashTable* IlvDisplay::getFontAliases ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ getFonts()

IlStringHashTable* IlvDisplay::getFonts ( ) const

Deprecated, moved into IlvDisplay::fontManager().

◆ getFontSizes()

IlvDim* IlvDisplay::getFontSizes ( const char *  fontFamily,
IlvFontStyle  fontStyle,
int &  count,
const char *  foundry = 0 
) const

Deprecated, moved into IlvDisplay::fontManager().

◆ getGradientPattern()

IlvGradientPattern* IlvDisplay::getGradientPattern ( const char *  alias) const

Gets a gradient pattern.

Parameters
aliasThe alias of the gradient pattern to be retrieved.
Returns
The gradient pattern with the specified alias, or 0 if there is none.

◆ getHome()

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.

◆ getInvertedPalette()

IlvPalette* IlvDisplay::getInvertedPalette ( const IlvPalette source)

Gets an inverted palette.

Parameters
sourceThe 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.
See also
IlvPalette::Builder.

◆ getLinearGradientPattern() [1/2]

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
startColorThe start color.
endColorThe end color.
startPointThe start point.
endPointThe end point.
widthThe width of the gradient pattern. If no width is provided, the value will be internally computed based on the coordinates of the start and end points.
heightThe height of the gradient pattern.If no height is provided, the value will be internally computed based on the coordinates of the start and end points.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.

◆ getLinearGradientPattern() [2/2]

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
colorStopsAn array of color stops.
nColorStopsThe number of color stops.
startPointThe start point.
endPointThe end point.
widthThe width of the gradient pattern. If no width is provided, the value will be internally computed based on the coordinates of the start and end points.
heightThe height of the gradient pattern.If no height is provided, the value will be internally computed based on the coordinates of the start and end points.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same 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 0.

◆ getLineStyle() [1/2]

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
nameThe name of the line style.
Returns
The line style having the specified name.

◆ getLineStyle() [2/2]

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
countThe length of the line style array.
dashesThe number of foreground-colored pixels in a dash.
offsetThe number of pixels to be skipped before the next dash.
Returns
The line style having the specified characteristics.

◆ getLookFeelHandler() [1/2]

IlvLookFeelHandler* IlvDisplay::getLookFeelHandler ( ) const

Gets the current look and feel handler.

Returns
The current look and feel handler used by this display instance.

◆ getLookFeelHandler() [2/2]

IlvLookFeelHandler* IlvDisplay::getLookFeelHandler ( IlSymbol name) 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
nameThe name of the look and feel handler.
Returns
The look and feel handler whose name is specified.

◆ getMessage()

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
msgidThe 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().

◆ getPalette() [1/2]

IlvPalette* IlvDisplay::getPalette ( const char *  paletteName)

Gets a palette.

Parameters
paletteNameThe name of the palette to be retrieved.
Returns
The palette having the name paletteName in this display, or 0 if there is none.

◆ getPalette() [2/2]

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 = IlvFullIntensity,
IlvAntialiasingMode  antialias = IlvDefaultAntialiasingMode,
IlvGradientPattern gradientPattern = 0,
IlvBorderPosition  borderPosition = IlvBorderPosition::centeredOnBounds 
)

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
backgroundThe background color, or 0 for the default.
foregroundThe foreground color, or 0 for the default.
patternThe pattern, or 0 for the default.
colorPatternThe color pattern, or 0 for the default.
gradientPatternThe gradient pattern, or 0 for the default.
fontThe font, or 0 for the default.
lineStyleThe line style, or 0 for the default.
lineWidthThe line width, or 0 for the default.
fillStyleThe fill style, or 0 for the default.
arcModethe arc mode, or 0 for the default.
fillRuleThe fill rule, or 0 for the default.
alphaThe alpha value, or IlvFullIntensity for the default.
antialiasThe anti-aliasing mode, or IlvDefaultAntialiasingMode for the default.
Returns
A shared palette.
See also
IlvPalette::Builder.

◆ getPaletteHandle()

IlAny IlvDisplay::getPaletteHandle ( ) const

Gets a Windows palette handle.

Note
This member function is specific for the Windows version of Rogue Wave Views.
Returns
A Windows HPALETTE that corresponds to the Windows logical palette used by IlvDisplay.

◆ getParentStylist()

virtual IlvStylist* IlvDisplay::getParentStylist ( ) const
virtual

Returns the parent stylist.

Stylist hierarchy is how cascading styling is done: if no style apply for a given stylable in this stylist, the parent stylist will be queried, recursively until there is no parent stylist anymore.

Returns
The parent stylist or 0 if there is none.

Implements IlvStylist.

◆ getPath()

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
The entire path used by the display to locate files. This string must not be deleted or modified by the user.

◆ getPattern()

IlvPattern* IlvDisplay::getPattern ( const char *  name) const

Gets a pattern.

Parameters
nameThe name of the pattern to be retrieved.
Returns
The pattern with the specified name.

◆ getRadialGradientPattern() [1/4]

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 width and 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 width and height divided by 2.

Parameters
startColorThe start color.
endColorThe end color.
widthThe width of the gradient pattern.
heightThe height of the gradient pattern.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.

◆ getRadialGradientPattern() [2/4]

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
startColorThe start color.
endColorThe end color.
startCenterThe center of the start circle.
startRadiusThe radius of the start circle.
endCenterThe center of the end circle.
endRadiusThe radius of the end circle.
widthThe width of the gradient pattern. If no width is provided, the value will be internally computed based on the coordinates of the start and end circles.
heightThe height of the gradient pattern.If no height is provided, the value will be internally computed based on the coordinates of the start and end circles.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same alias already exists on this display, then this instance is returned. Otherwise, a new aliased pattern is instantiated and returned.

◆ getRadialGradientPattern() [3/4]

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 width and 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 width and height divided by 2.

Parameters
colorStopsAn array of color stops.
nColorStopsThe number of color stops.
widthThe width of the gradient pattern.
heightThe height of the gradient pattern.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same 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 0.

◆ getRadialGradientPattern() [4/4]

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
colorStopsAn array of color stops.
nColorStopsThe number of color stops.
startCenterThe center of the start circle.
startRadiusThe radius of the start circle.
endCenterThe center of the end circle.
endRadiusThe radius of the end circle.
widthThe width of the gradient pattern. If no width is provided, the value will be internally computed based on the coordinates of the start and end circles.
heightThe height of the gradient pattern.If no height is provided, the value will be internally computed based on the coordinates of the start and end circles.
modeThe gradient transform mode.
aspectRatioThe gradient aspect ratio.
spreadThe type of spread.
aliasThe alias of the gradient pattern.
Returns
A gradient pattern instance matching the input parameters. If the alias parameter is not 0 and a gradient pattern instance with the same 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 0.

◆ getResource() [1/2]

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
resourceNameThe name of the resource to be retrieved.
defaultValueA 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.

◆ getResource() [2/2]

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
resourceNameThe resource name.
objectNameThe object name.
objectClassNameThe generic name of the object class.
storageNameThe generic name of the storage instance.
storageClassNameThe generic name of the storage class.
Returns
The value of the resource that matches the pattern.

◆ getSystemFont()

IlvFont* IlvDisplay::getSystemFont ( const char *  )

Deprecated, moved into IlvDisplay::fontManager().

◆ getTouchPointCount()

IlUShort IlvDisplay::getTouchPointCount ( ) const

Get the current number of touch points, or more.

The return value is guaranteed to be equal or greater than the number of touch points currently active on the touch device. It is not a constant of the system and may vary between calls to this method. This value is mostly used to compute the size of arrays passed as parameters to getTouchPoints().

Returns
A number superior or equal to the current number of touch points in use.

◆ getTouchPoints()

IlUShort IlvDisplay::getTouchPoints ( const IlvPoint **  relative,
const IlvPoint **  absolute = 0 
) const

Get the location of all active touch points.

The indexes in this array match the IlUShort value returned by the multi-touch events.

Active touch point are not necessarily contiguous; the array can contain null pointers when there is no active point for a given index. Usage example:

  IlUShort count = display->getTouchPointsCount();
  const IlvPoint** relative = new const IlvPoint*[count];
  IlUShort validNb = display->getTouchPoints(relative);
  for (IlUShort i = 0, valid = 0; i < count && valid < validNb; ++i) {
      if (relative[i]) {
          // do something with the i th touch point coordinates
          valid++;
      }
  }
  delete[] relative;
Parameters
relativeAn array that will receive touch points in coordinates relative to the view. The array must have at least the size returned by getTouchPointCount().
absoluteAn array that will receive the touch points in absolute coordinates, similar to IlvEvent::getGLocation(). The array must have at least the size returned by getTouchPointCount().
Returns
The number of valid touch points in the array(s). This number can be smaller than the size of the array(s).

◆ getView() [1/2]

IlvView* IlvDisplay::getView ( const char *  name) const

Gets a view object.

Parameters
nameThe 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.

◆ getView() [2/2]

IlvView* IlvDisplay::getView ( IlvSystemView  view) const

Gets a system view object.

Parameters
viewThe 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.

◆ getViews()

IlvView* const* IlvDisplay::getViews ( IlUInt count) const

Gets view objects.

Parameters
countThe 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)).

◆ getWindowsConfig()

IlvWindowsDisplayConfig* IlvDisplay::getWindowsConfig ( ) const

Gets the IlvWindowsDisplayConfig object attached to this IlvDisplay.

Note
This member function is specific for the Windows version of Rogue Wave Views.
Returns
A pointer to the IlvWindowsDisplayConfig object that is used by this display.

◆ getXConfig()

IlvXDisplayConfig* IlvDisplay::getXConfig ( ) const

Gets the IlvXDisplayConfig object attached to this IlvDisplay.

Note
This member function is specific for the X Window version of Rogue Wave Views.
Returns
A pointer to the IlvXDisplayConfig object that is used by this display.

◆ hasEvents()

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.

◆ hasMultiTouch()

IlBoolean IlvDisplay::hasMultiTouch ( ) const

Indicates if this IlvDisplay has multi-touch capability.

Returns
IlTrue if the device has multi-touch capability, and IlFalse if it is not the case.

◆ initDump()

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
deviceThe dump device.

◆ isBad()

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.

Returns
IlTrue if there was an error in creating the object, and IlFalse if not.

◆ isCairoEnabled()

IlBoolean IlvDisplay::isCairoEnabled ( ) const

Indicates whether Cairo features are available.

Returns
IlTrue if Cairo features are available. isCairoEnabled() always returns IlFalse on Windows.

◆ isDumping()

IlBoolean IlvDisplay::isDumping ( ) const

Tells you if dumping is occurring.

Returns
IlTrue if dumping is taking place or IlFalse if it is not.

◆ isRightButtonValueUsed()

IlBoolean IlvDisplay::isRightButtonValueUsed ( ) const

Indicates how to interpret right mouse button events from mouse that have only two buttons.

Some interactors (like the one attached to Views scroll bars) are using the middle mouse button related events. If the system where the application is run has only two buttons, calling this method with IlTrue will make Views interpret the right mouse button events as middle mouse button events.

The default value is IlFalse, which is appropriate on systems that have a three-button mouse.

Returns
IlTrue if right button events should be interpreted as middle button events and IlFalse otherwise.
See also
useRightButtonValue().

◆ makeFont()

IlBoolean IlvDisplay::makeFont ( IlvFont ,
const char *  realname = 0 
)

Deprecated, moved into IlvDisplay::fontManager().

◆ movePointer() [1/2]

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
dpThe position to which the cursor is to be moved, relative to the current position.

◆ movePointer() [2/2]

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
pThe point to which the cursor is to be moved.

◆ notifyStyleChanges()

void IlvDisplay::notifyStyleChanges ( )

notifies all the gadgets to recalculate and redraw based on the current L&F handler. This is automatically called in IlvDisplay::setLookFeelHandler and must be manually called for IlvStylist::setStylesheet when visual updates are needed.

See also
IlvDisplay::setLookFeelHandler(...), IlvStylist::setStyleSheet(...)

◆ pixelToRGB()

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
pixelThe pixel index.
rThe red component value.
gThe green component value.
bThe blue component value.
Returns
The red green blue values.

◆ prependToPath()

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
pathPartContains the path extension to be prepended.

◆ putBitmapData()

void IlvDisplay::putBitmapData ( IlvSystemPort bitmap,
const IlvRect rect,
unsigned char *  data,
IlUInt  size,
IlUInt  bitmapPad = 32 
) 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
bitmapThe bitmap object to the modified.
rectThe rectangular area to be modified.
dataAn array containing the modification values.
sizeThe length of the data array.
bitmapPadThe padding of scanline.

◆ queryPointer()

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
xThe x coordinate of the pointer.
yThe y coordinate of the pointer.
modifiersThe mouse modifiers.

◆ readAndDispatchEvents()

void IlvDisplay::readAndDispatchEvents ( ) const

Reads and dispatches all pending events.

Reads all pending events and dispatches them to the views.

◆ readAsciiBitmap()

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().)

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

◆ readBitmap()

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.

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
filenameThe name of the file to be read from.
Returns
A pointer to the IlvBitmap object created by reading from the file filename.

◆ readBitmapData()

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.

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

Parameters
filenameThe name of the file to be read from.
Returns
A pointer to the IlvBitmapData object created by reading from the file filename.
See also
IlvDisplay::readBitmap().

◆ refreshAllViews()

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

◆ removeChangeLanguageCallback()

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
cbThe callback function.
argThe user argument passed to the callback.

◆ removeChangeLookCallback()

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
cbThe callback function.
argThe user argument passed to the callback.

◆ removeFont()

void IlvDisplay::removeFont ( IlvFont )

Deprecated, moved into IlvDisplay::fontManager().

◆ restartDump()

void IlvDisplay::restartDump ( )

Restarts output to a dump device.

Restarts output redirection.

◆ screenBBox()

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

Gets the screen bounding box.

Parameters
bboxThe returned bounding box of the screen.
workAreaIndicates whether the returned bounding box contains only the working area (and not an area that covers all connected screens). This parameter is meaningful only on Microsoft Windows, where the working area is the bounding of the main screen, without the task bar.
rectUsed 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 rect.
Returns
The screen bounding box.

◆ screenDepth()

IlUShort IlvDisplay::screenDepth ( ) const

Gets the screen depth.

Returns
The depth of the screen.

◆ screenHeight()

IlvDim IlvDisplay::screenHeight ( ) const

Gets the screen height in pixels.

Returns
The height of the screen, in pixels.

◆ screenHeightMM()

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

◆ screenPort()

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 "_desktop_"of your workstation).

◆ screenWidth()

IlvDim IlvDisplay::screenWidth ( ) const

Gets the screen width in pixels.

Returns
The width of the screen, in pixels.

◆ screenWidthMM()

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

◆ setAntialiasingMode()

void IlvDisplay::setAntialiasingMode ( IlvAntialiasingMode  antialias)

Sets the current anti-aliasing mode of the display.

Parameters
antialiasThe new anti-aliasing mode of the display.

◆ setBitPlanesGroup()

IlBoolean IlvDisplay::setBitPlanesGroup ( int  group = -1)

Sets the bitplane group index.

Note
This member function is specific for the X Window version of Rogue Wave Views. Sets the bitplane group index to be used for color allocation.
Parameters
groupThe index of the group to be set. An invalid value, such as a negative integer or a value greater than or equal to the number of available bitplane groups, resets the current bitplane group to none.

◆ setCurrentLanguage()

void IlvDisplay::setCurrentLanguage ( IlSymbol language)

Sets the current language.

Sets the current language associated with the display.

Parameters
languageThe name of the language to be set.

◆ setCurrentLook()

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
styleThe look identifier to be set.
See also
setLookFeelHandler()

◆ 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
lfhThe new look and feel handler.

◆ setPath()

void IlvDisplay::setPath ( const char *  path)

Sets the display's search path.

Sets the entire display path to a copy of path.

Parameters
pathThe path to be set.

◆ stopDump()

void IlvDisplay::stopDump ( )

Temporarily stops output to a dump device.

Momentarily halts any existing output redirection.

◆ sync()

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);.

◆ synchronize()

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

Sets synchronous mode.

Sets the connection to the server to the sync mode indicated in value. 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
valueIlTrue to set the sync mode.

◆ useRightButtonValue()

void IlvDisplay::useRightButtonValue ( IlBoolean  flag)

Indicates if right mouse button events should be interpreted as middle button events.

Parameters
flagIf set to IlTrue, right mouse button events will be interpreted by some interactors as middle button events.
See also
isRightButtonValueUsed().

◆ waitAndDispatchEvents()

void IlvDisplay::waitAndDispatchEvents ( ) const

Reads and dispatches the next event.

Reads the next event and dispatches it.