Display class. More...
#include <ilviews/ilv.h>
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... | |
IlvFont * | createFont (const char *family, IlvFontSize size, const char *resolution, IlvFontStyle style, const char *foundry) |
IlvFont * | createFont (const char *family, IlvFontSize size, IlvFontStyle style, const char *foundry) |
IlvFont * | createSystemFont (const char *realname) |
IlvColor * | defaultBackground () const |
Gets the default background color. More... | |
IlvFont * | defaultBoldFont () const |
IlvCursor * | defaultCursor () const |
Gets the default cursor. More... | |
IlvFont * | defaultFont () const |
IlvColor * | defaultForeground () const |
Gets the default foreground color. More... | |
IlvFont * | defaultItalicFont () const |
IlvFont * | defaultLargeFont () const |
IlvLineStyle * | defaultLineStyle () const |
Gets the default line style. More... | |
IlvFont * | defaultNormalFont () const |
IlvPalette * | defaultPalette () const |
Gets the default palette. More... | |
IlvPattern * | defaultPattern () const |
Gets the default pattern. More... | |
IlvFont * | dupFont (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... | |
IlvView * | findPointerView () 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 *) |
IlvColor * | get8bitsColor (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... | |
IlvBitmap * | getBitmap (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... | |
IlvColor * | getColor (const char *name, IlBoolean isMutable=IlFalse) |
Gets a color by name. More... | |
IlvColor * | getColor (IlFloat hue, IlFloat saturation, IlFloat value, IlBoolean isMutable=IlFalse) |
Gets a color by HSV values. More... | |
IlvColor * | getColor (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... | |
IlSymbol * | getCurrentLanguage () const |
Gets the current language. More... | |
IlvLookStyle | getCurrentLook () const |
Gets the current look. More... | |
IlvCursor * | getCursor (const char *name) |
Gets a cursor. More... | |
IlvMessageDatabase * | getDatabase () 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 |
IlvFont * | getFont (const char *fontFamily, IlvFontSize fontSize, const char *fontResolution, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0) |
IlvFont * | getFont (const char *fontFamily, IlvFontSize fontSize, IlvFontStyle fontStyle=IlvNormalFontStyle, const char *foundry=0) |
IlvFont * | getFont (const char *fontName) |
IlStringHashTable * | getFontAliases () const |
IlStringHashTable * | getFonts () const |
IlvDim * | getFontSizes (const char *fontFamily, IlvFontStyle fontStyle, int &count, const char *foundry=0) const |
IlvGradientPattern * | getGradientPattern (const char *alias) const |
Gets a gradient pattern. More... | |
const char * | getHome () const |
Gets the current home setting. More... | |
IlvPalette * | getInvertedPalette (const IlvPalette *source) |
Gets an inverted palette. More... | |
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. More... | |
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. More... | |
IlvLineStyle * | getLineStyle (const char *name) const |
Gets a line style. More... | |
IlvLineStyle * | getLineStyle (IlUShort count, const unsigned char *dashes, IlUShort offset=0) |
Gets a line style. More... | |
IlvLookFeelHandler * | getLookFeelHandler () const |
Gets the current look and feel handler. More... | |
IlvLookFeelHandler * | getLookFeelHandler (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... | |
IlvPalette * | getPalette (const char *paletteName) |
Gets a palette. More... | |
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=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 IlvStylist * | getParentStylist () const |
Returns the parent stylist. More... | |
const char * | getPath () const |
Gets the display's search path. More... | |
IlvPattern * | getPattern (const char *name) const |
Gets a pattern. More... | |
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. More... | |
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. More... | |
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. More... | |
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. 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... | |
IlvFont * | getSystemFont (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... | |
IlvView * | getView (const char *name) const |
Gets a view object. More... | |
IlvView * | getView (IlvSystemView view) const |
Gets a system view object. More... | |
IlvView *const * | getViews (IlUInt &count) const |
Gets view objects. More... | |
IlvWindowsDisplayConfig * | getWindowsConfig () const |
Gets the IlvWindowsDisplayConfig object attached to this IlvDisplay . More... | |
IlvXDisplayConfig * | getXConfig () 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... | |
IlvBitmap * | readAsciiBitmap (const char *filename) |
Reads an ASCII bitmap. More... | |
IlvBitmap * | readBitmap (const char *filename) |
Reads a bitmap. More... | |
IlvBitmapData * | readBitmapData (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... | |
IlvRect & | screenBBox (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... | |
IlvSystemPort * | screenPort () 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 |
Display class.
Library: xviews or winviews or mviews (mutually exclusive)
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 |
||
) |
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.
.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 |
||
) |
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.
internal | A descriptor of the underlying display system, exposed as an IlAny . |
className | The application name for accessing associated resource files. |
dcc | Sets a Display Configuration Callback. |
dccArg | Specifies a user argument which is passed to the IlvDisplayConfigCallback . |
|
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.
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 = 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.
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 | Specifies, if IlTrue , that mutable colors are returned as well as non-mutable ones. |
IlvFont* IlvDisplay::createFont | ( | const char * | family, |
IlvFontSize | size, | ||
const char * | resolution, | ||
IlvFontStyle | style, | ||
const char * | foundry | ||
) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::createFont | ( | const char * | family, |
IlvFontSize | size, | ||
IlvFontStyle | style, | ||
const char * | foundry | ||
) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::createSystemFont | ( | const char * | realname | ) |
Deprecated, moved into IlvDisplay::fontManager()
.
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 |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvCursor* IlvDisplay::defaultCursor | ( | ) | const |
Gets the default cursor.
IlvFont* IlvDisplay::defaultFont | ( | ) | const |
Deprecated, moved into IlvDisplay::fontManager()
.
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 |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::defaultLargeFont | ( | ) | const |
Deprecated, moved into IlvDisplay::fontManager()
.
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 |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvPalette* IlvDisplay::defaultPalette | ( | ) | const |
Gets the default palette.
IlvPattern* IlvDisplay::defaultPattern | ( | ) | const |
Gets the default pattern.
Deprecated, moved into IlvDisplay::fontManager()
.
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 = IlFalse |
||
) | 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);
.
IlvFontManager* const IlvDisplay::fontManager | ( | ) | const |
Access to display's font manager.
void IlvDisplay::freeFont | ( | IlvFont * | ) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvColor* IlvDisplay::get8bitsColor | ( | IlUShort | r, |
IlUShort | g, | ||
IlUShort | b, | ||
IlBoolean | isMutable = IlFalse |
||
) |
Gets a color by 8bits RGB values.
r | The red component value. |
g | The green component value. |
b | The blue component value. |
isMutable | IlTrue to specify that the returned color should be mutable. |
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 | Specifies whether (IlTrue ) or not (IlFalse ) the bitmap should be read from the file if it has not been found in the display. |
IlvBitmap
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. int IlvDisplay::getBitPlanesGroup | ( | ) | const |
Gets the bitplane group index.
-1
, which means that no bitplane group is used. 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. Gets a color by name.
Retrieves the color commonly called name. These color names come from the X Window color-naming scheme.
name | The name of the color. |
isMutable | IlTrue to specify that the returned color should be mutable. |
0
if not possible. 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.
hue | The hue value of this color. |
saturation | The saturation value of this color. |
value | The luminosity value of this color. |
isMutable | IlTrue to specify that the returned color should be mutable. |
0
if not possible. 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.
r | The red component value. |
g | The green component value. |
b | The blue component value. |
isMutable | IlTrue to specify that the returned color should be mutable. |
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. The value 0 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 |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::getFont | ( | const char * | fontFamily, |
IlvFontSize | fontSize, | ||
const char * | fontResolution, | ||
IlvFontStyle | fontStyle = IlvNormalFontStyle , |
||
const char * | foundry = 0 |
||
) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::getFont | ( | const char * | fontFamily, |
IlvFontSize | fontSize, | ||
IlvFontStyle | fontStyle = IlvNormalFontStyle , |
||
const char * | foundry = 0 |
||
) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvFont* IlvDisplay::getFont | ( | const char * | fontName | ) |
Deprecated, moved into IlvDisplay::fontManager()
.
IlStringHashTable* IlvDisplay::getFontAliases | ( | ) | const |
Deprecated, moved into IlvDisplay::fontManager()
.
IlStringHashTable* IlvDisplay::getFonts | ( | ) | const |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvDim* IlvDisplay::getFontSizes | ( | const char * | fontFamily, |
IlvFontStyle | fontStyle, | ||
int & | count, | ||
const char * | foundry = 0 |
||
) | const |
Deprecated, moved into IlvDisplay::fontManager()
.
IlvGradientPattern* IlvDisplay::getGradientPattern | ( | const char * | alias | ) | const |
Gets a gradient pattern.
alias | The alias of the gradient pattern to be retrieved. |
0
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. |
IlvPalette::Builder
. 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 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 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. |
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. 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 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 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. |
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
. 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 * | 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.
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 | ( | const char * | paletteName | ) |
Gets a palette.
paletteName | The name of the palette to be retrieved. |
0
if there is none. 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.
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::Builder
. IlAny IlvDisplay::getPaletteHandle | ( | ) | const |
Gets a Windows palette handle.
HPALETTE
that corresponds to the Windows logical palette used by IlvDisplay
.
|
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.
0
if there is none. Implements IlvStylist.
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, | ||
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.
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. |
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. 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 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 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. |
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. 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.
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. |
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
. 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 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 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. |
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
. 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. |
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:
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. |
IlvFont* IlvDisplay::getSystemFont | ( | const char * | ) |
Deprecated, moved into IlvDisplay::fontManager()
.
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()
.
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;
relative | An array that will receive touch points in coordinates relative to the view. The array must have at least the size returned by getTouchPointCount() . |
absolute | An 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() . |
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. 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. 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)
). IlvWindowsDisplayConfig* IlvDisplay::getWindowsConfig | ( | ) | const |
Gets the IlvWindowsDisplayConfig
object attached to this IlvDisplay
.
IlvWindowsDisplayConfig
object that is used by this display. IlvXDisplayConfig* IlvDisplay::getXConfig | ( | ) | const |
Gets the IlvXDisplayConfig
object attached to this IlvDisplay
.
IlvXDisplayConfig
object that is used by this display. 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. IlBoolean IlvDisplay::hasMultiTouch | ( | ) | const |
Indicates if this IlvDisplay
has multi-touch capability.
IlTrue
if the device has multi-touch capability, and IlFalse
if it is not the case. Directs output to a dump device.
Initializes the redirection towards a dump device given in dumpDevice that should have been correctly initialized.
device | 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.
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 |
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.
IlTrue
if right button events should be interpreted as middle button events and IlFalse
otherwise. useRightButtonValue()
. Deprecated, moved into IlvDisplay::fontManager()
.
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::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::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.
IlvDisplay::setLookFeelHandler(...)
, IlvStylist::setStyleSheet(...)
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, | ||
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.
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. |
bitmapPad | The padding of scanline. |
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.
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. IlvDisplay::readBitmap()
. 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::removeFont | ( | IlvFont * | ) |
Deprecated, moved into IlvDisplay::fontManager()
.
void IlvDisplay::restartDump | ( | ) |
Restarts output to a dump device.
Restarts output redirection.
IlvRect& IlvDisplay::screenBBox | ( | IlvRect & | bbox, |
IlBoolean | workArea = IlTrue , |
||
const IlvRect * | rect = 0 |
||
) | const |
Gets the screen bounding box.
bbox | The returned bounding box of the screen. |
workArea | Indicates 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. |
rect | 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 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 "_desktop_"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.
antialias | The new anti-aliasing mode of the display. |
IlBoolean IlvDisplay::setBitPlanesGroup | ( | int | group = -1 | ) |
Sets the bitplane group index.
group | The 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. |
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 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.
value | IlTrue to set the sync mode. |
void IlvDisplay::useRightButtonValue | ( | IlBoolean | flag | ) |
Indicates if right mouse button events should be interpreted as middle button events.
flag | If set to IlTrue , right mouse button events will be interpreted by some interactors as middle button events. |
isRightButtonValueUsed()
. void IlvDisplay::waitAndDispatchEvents | ( | ) | const |
Reads and dispatches the next event.
Reads the next event and dispatches it.