Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Display class. More...
#include <ilviews/ilv.h>
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. | |
IlvColor * | defaultBackground () const |
Gets the default background color. | |
IlvFont * | defaultBoldFont () const |
Gets the default bold font. | |
IlvCursor * | defaultCursor () const |
Gets the default cursor. | |
IlvFont * | defaultFont () const |
Gets the default font. | |
IlvColor * | defaultForeground () const |
Gets the default foreground color. | |
IlvFont * | defaultItalicFont () const |
Gets the default italic font. | |
IlvFont * | defaultLargeFont () const |
Gets the default large font. | |
IlvLineStyle * | defaultLineStyle () const |
Gets the default line style. | |
IlvFont * | defaultNormalFont () const |
Gets the default normal font. | |
IlvPalette * | defaultPalette () const |
Gets the default palette. | |
IlvPattern * | defaultPattern () 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. | |
IlvView * | findPointerView () const |
Finds the view object under the pointer device location. | |
void | flush () const |
Flushes the output buffer. | |
IlvColor * | get8bitsColor (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. | |
IlvBitmap * | getBitmap (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 . | |
IlvColor * | getColor (IlFloat hue, IlFloat saturation, IlFloat value, IlBoolean isMutable=((IlBoolean) 0)) |
Gets a color by HSV values. | |
IlvColor * | getColor (IlvIntensity r, IlvIntensity g, IlvIntensity b, IlBoolean isMutable=((IlBoolean) 0)) |
Gets a color by RGB values. | |
IlvColor * | getColor (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. | |
IlSymbol * | getCurrentLanguage () const |
Gets the current language. | |
IlvLookStyle | getCurrentLook () const |
Gets the current look. | |
IlvCursor * | getCursor (const char *name) |
Gets a cursor. | |
IlvMessageDatabase * | getDatabase () 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. | |
IlvFont * | getFont (const char *fontFamily, IlvFontSize fontSize, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0) |
Gets a font. | |
IlvFont * | getFont (const char *fontName) |
Gets a font. | |
IlvDim * | getFontSizes (const char *fontFamily, IlvFontStyle fontStyle, int &count, const char *foundry=0) const |
Gets font sizes. | |
IlvGradientPattern * | getGradientPattern (const char *alias) const |
Gets a gradient pattern. | |
const char * | getHome () const |
Gets the current home setting. | |
IlvPalette * | getInvertedPalette (const IlvPalette *source) |
Gets an inverted palette. | |
IlvGradientPattern * | 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. | |
IlvGradientPattern * | 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. | |
IlvLineStyle * | getLineStyle (const char *name) const |
Gets a line style. | |
IlvLineStyle * | getLineStyle (IlUShort count, const unsigned char *dashes, IlUShort offset=0) |
Gets a line style. | |
IlvLookFeelHandler * | getLookFeelHandler () const |
Gets the current look and feel handler. | |
IlvLookFeelHandler * | getLookFeelHandler (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. | |
IlvPalette * | 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. | |
IlvPalette * | getPalette (const char *paletteName) |
Gets a palette. | |
const char * | getPath () const |
Gets the display's search path. | |
IlvPattern * | getPattern (const char *name) const |
Gets a pattern. | |
IlvGradientPattern * | 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. | |
IlvGradientPattern * | 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. | |
IlvGradientPattern * | 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. | |
IlvGradientPattern * | 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. | |
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. | |
IlvView * | getView (IlvSystemView view) const |
Gets a system view object. | |
IlvView * | getView (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. | |
IlvBitmap * | readAsciiBitmap (const char *filename) |
Reads an ASCII bitmap. | |
IlvBitmap * | readBitmap (const char *filename) |
Reads a bitmap. | |
IlvBitmapData * | readBitmapData (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. | |
IlvRect & | screenBBox (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. | |
IlvSystemPort * | screenPort () 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 |
Display class.
Library: display
This class handles every aspect of the connection with the display system.
IlvBitmap
, IlvColor
, IlvFont
, IlvLineStyle
, IlvPalette
. 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.
.XDefault
file on UNIX systems. IlAny
which is passed to the IlvDisplayConfigCallback
. 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.
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.
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.
cb | The callback function. | |
arg | A user argument passed to the callback. |
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.
cb | The callback function. | |
arg | A user argument passed to the callback. |
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.
pathPart | Contains the path extension to be appended. |
void IlvDisplay::bell | ( | int | volume = 0 |
) | const |
Rings the system bell.
Rings the system bell.
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.
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. |
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.
IlvFont* IlvDisplay::defaultBoldFont | ( | ) | const |
Gets the default bold font.
This font can also be retrieved using getFont("bold")
.
"boldfont"
display resource."%helvetica-12-B"
.HFONT
that is returned by GetStockObject(DEFAULT_GUI_FONT)
. IlvCursor* IlvDisplay::defaultCursor | ( | ) | const |
Gets the default cursor.
IlvFont* IlvDisplay::defaultFont | ( | ) | const |
Gets the default font.
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.
IlvFont* IlvDisplay::defaultItalicFont | ( | ) | const |
Gets the default italic font.
This font can also be retrieved using getFont("italic")
.
"italicfont"
display resource."%helvetica-12-I"
.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")
.
"largefont"
display resource."%helvetica-18-B"
.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.
IlvFont* IlvDisplay::defaultNormalFont | ( | ) | const |
Gets the default normal font.
This font can also be retrieved using getFont("normal")
.
"normalfont"
display resource."%helvetica-12-"
.HFONT
that is returned by GetStockObject(DEFAULT_GUI_FONT)
. IlvPalette* IlvDisplay::defaultPalette | ( | ) | const |
Gets the default palette.
IlvPattern* IlvDisplay::defaultPattern | ( | ) | const |
Gets the default 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.
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 . |
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.
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.
r | The red component value. | |
g | The green component value. | |
b | The blue component value. | |
isMutable | A Boolean value to specify a mutable color. |
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.
Gets a bitmap.
The name parameter is the one used in the readBitmap
and readAsciiBitmap
member functions.
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. |
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
.
BadMatch
error may result. bitmap | The bitmap object. | |
size | The size of the returned array. | |
rect | The rectangle of the bitmap. |
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.
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.
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. |
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.
r | The red component value. | |
g | The green component value. | |
b | The blue component value. | |
isMutable | A Boolean value to specify a mutable color. |
RGB
components, or 0
if not possible. 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
.
name | The name of the color. | |
isMutable | A Boolean value to specify a mutable color. |
0
if not possible. IlBoolean IlvDisplay::getColorRGB | ( | const char * | name, | |
IlvIntensity & | r, | |||
IlvIntensity & | g, | |||
IlvIntensity & | b | |||
) | const |
Gets RGB color values.
name | The name of the RGB color. | |
r | The red component value. | |
g | The green component value. | |
b | The blue component value. |
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.
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
.
IlvCursor* IlvDisplay::getCursor | ( | const char * | name | ) |
Gets a cursor.
name | The name of the cursor to be retrieved. |
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.
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.
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. |
const char* const* IlvDisplay::getFamilyNames | ( | IlUShort & | count | ) | const |
Gets font family names.
count | The length of the returned array. |
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.
fontFamily | The name of the font family. | |
fontSize | The size of the font. | |
fontStyle | The style of the font. | |
foundry | The font foundry. |
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.
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. |
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.
fontFamily | The name of the font family. | |
fontStyle | The style of the font. | |
count | The length of the return array. | |
foundry | The font foundry. |
IlvGradientPattern* IlvDisplay::getGradientPattern | ( | const char * | alias | ) | const |
Gets a gradient pattern.
alias | The alias of the gradient pattern to be retrieved. |
NULL
if there is none. const char* IlvDisplay::getHome | ( | ) | const |
Gets the current home setting.
IlvHome
setting. You must not modify nor delete the returned string. IlvPalette* IlvDisplay::getInvertedPalette | ( | const IlvPalette * | source | ) |
Gets an inverted palette.
source | The palette to be inverted. |
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.
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. |
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.
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. |
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.
name | The name of the line style. |
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
).
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. |
IlvLookFeelHandler* IlvDisplay::getLookFeelHandler | ( | ) | const |
Gets the current look and feel handler.
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.
name | The name of the look and feel handler. |
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.
msgid | The identifier of the message to retrieve. |
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.
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. |
IlvPalette* IlvDisplay::getPalette | ( | const char * | paletteName | ) |
Gets a palette.
paletteName | The name of the palette to be retrieved. |
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:
IlvPattern* IlvDisplay::getPattern | ( | const char * | name | ) | const |
Gets a pattern.
name | The name of the pattern to be retrieved. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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
.
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. |
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
.
resourceName | The name of the resource to be retrieved. | |
defaultValue | A default string to be returned if the get is unsuccessful. |
IlvView* IlvDisplay::getView | ( | IlvSystemView | view | ) | const |
Gets a system view object.
view | The name of the queried view. |
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.
name | The name of the view object to be retrieved. |
IlvView
object that has the name name in this display, or 0
if none could be found. Gets view objects.
count | The number of view objects to be retrieved. |
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.
IlTrue
when an event has occurred. Directs output to a dump device.
Initializes the redirection towards a dump device given in dumpDevice that should have been correctly initialized.
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.
IlTrue
if there was an error in creating the object, and IlFalse
if not. IlBoolean IlvDisplay::isCairoEnabled | ( | ) | const |
Indicates whether Cairo features are available.
IlTrue
if Cairo features are available. isCairoEnabled()
always returns IlFalse on Windows. IlBoolean IlvDisplay::isDumping | ( | ) | const |
Tells you if dumping is occurring.
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.
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.
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.
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.
pixel | The pixel index. | |
r | The red component value. | |
g | The green component value. | |
b | The blue component value. |
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.
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.
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. |
Finds the cursor.
Provides you with the global position of the cursor with respect to the root port.
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
.)
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. filename | The name of the file to be read from. |
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.
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. filename | The name of the file to be read from. |
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).
filename | The name of the file to be read from. |
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.
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.
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.
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. |
IlUShort IlvDisplay::screenDepth | ( | ) | const |
Gets the screen depth.
IlvDim IlvDisplay::screenHeight | ( | ) | const |
Gets the screen height in pixels.
IlvDim IlvDisplay::screenHeightMM | ( | ) | const |
Gets the screen height in millimeters.
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.
IlvDim IlvDisplay::screenWidthMM | ( | ) | const |
Gets the screen width in millimeters.
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.
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.
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.
style | The look identifier to be set. |
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.
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.
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);
.
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.
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.
flag | A Boolean value. |
void IlvDisplay::waitAndDispatchEvents | ( | ) | const |
Reads and dispatches the next event.
Reads the next event and dispatches it.
© 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.