Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Friends
IlvXDisplayConfig Class Reference

Display configuration class for X Window applications. More...

#include <ilviews/X11/config.h>

Inheritance diagram for IlvXDisplayConfig:
IlvDisplayConfig

Public Member Functions

void createColormap ()
 Creates a colormap overloading the default colormap. More...
 
IlUShort getColormapSize () const
 Returns the colormap size supported by the current Visual. More...
 
IlUShort getDepth () const
 Returns the depth of the current Visual. More...
 
int getScreen () const
 Returns the screen number used by the application. More...
 
Visual * getVisual () const
 Returns the Visual used by the application. More...
 
int getVisualClass () const
 Returns the Visual class of the current Visual. More...
 
Visual *const * getVisualList (int &nVisuals, int visualClass=-1, int depth=0) const
 Returns an array of Visual types supported by the X server. More...
 
Display * getXDisplay () const
 Returns the pointer to the X Display. More...
 
IlBoolean isDefaultScreen () const
 Indicates if the current screen is the default screen. More...
 
IlBoolean isDefaultVisual () const
 Indicates if the current Visual is the default Visual. More...
 
void setScreen (int screen)
 Sets the screen number for the application. More...
 
void setVisual (Visual *visual)
 Sets the Visual for the application. More...
 
- Public Member Functions inherited from IlvDisplayConfig
IlvDisplaygetDisplay () const
 Gets the display instance. More...
 
IlAny getUserArg () const
 Gets the user argument. More...
 
void setDefaultBackground (const char *bgName, IlBoolean isMutable=IlFalse)
 Sets the default background color. More...
 
void setDefaultBackground (IlvIntensity r, IlvIntensity g, IlvIntensity b, IlBoolean isMutable)
 Sets the default background color. More...
 
void setDefaultForeground (const char *fgName, IlBoolean isMutable=IlFalse)
 Sets the default foreground color. More...
 
void setDefaultForeground (IlvIntensity r, IlvIntensity g, IlvIntensity b, IlBoolean isMutable)
 Sets the default foreground color. More...
 

Friends

class IlvDisplay
 

Detailed Description

Display configuration class for X Window applications.

Library: xviews

This subclass of IlvDisplayConfig is specific to the X Window port of Rogue Wave Views. It is intended for applications that need to setup a particular configuration, such as a non-default Visual, Colormap, or Screen number, as they are defined in X Window documentation. The display configuration callback (>IlvDisplayConfigCallback) of these applications will receive an instance of this class (see >IlvDisplay constructors for details).

See also
IlvDisplay::IlvDisplay()

Member Function Documentation

void IlvXDisplayConfig::createColormap ( )

Creates a colormap overloading the default colormap.

Creates a colormap overloading the default colormap of the current Visual.

IlUShort IlvXDisplayConfig::getColormapSize ( ) const

Returns the colormap size supported by the current Visual.

Returns
The colormap size supported by the current Visual.
IlUShort IlvXDisplayConfig::getDepth ( ) const

Returns the depth of the current Visual.

Returns
The depth of the current Visual.
int IlvXDisplayConfig::getScreen ( ) const

Returns the screen number used by the application.

Returns
The screen number used by the application, as defined in in X Window documentation.
Visual* IlvXDisplayConfig::getVisual ( ) const

Returns the Visual used by the application.

The Visual structure is defined in X Window documentation.

Returns
A pointer to the Visual used by the application.
int IlvXDisplayConfig::getVisualClass ( ) const

Returns the Visual class of the current Visual.

Values for Visual class are constants defined by Xlib, such as StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor or DirectColor.

Returns
The Visual class of the current Visual.
Visual* const* IlvXDisplayConfig::getVisualList ( int &  nVisuals,
int  visualClass = -1,
int  depth = 0 
) const

Returns an array of Visual types supported by the X server.

Returns an array of Visual type that the X server makes available for the current screen and matching visualClass and depth. You can select a specific Visual class by setting the parameter visualClass to one of the predefined constants: StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor or DirectColor. Using the default value for visualClass means all visual types will be scanned.
You can select Visual types of a given depth by setting the depth to a given value. The default value 0 means any depth.

Returns
An array of pointers to Visual structures matching visualClass and depth, if they are specified. The array is stored in an IlPoolOf(Pointer)() and should not be deleted or modified.
Parameters
nVisualsUsed to return the number of entries in the array returned by the method.
visualClassSpecifies a Visual class to match.
depthSpecifies a depth to match.
Display* IlvXDisplayConfig::getXDisplay ( ) const

Returns the pointer to the X Display.

Returns
A pointer to the Xlib Display structure that serves as the connection to the X server.
IlBoolean IlvXDisplayConfig::isDefaultScreen ( ) const

Indicates if the current screen is the default screen.

Indicates whether the screen currently set on the IlvXDisplayConfig is the Display default screen or not.
Similar to the Xlib function XDefaultScreen.

Returns
IlTrue if the screen is the default screen, otherwise IlFalse.
IlBoolean IlvXDisplayConfig::isDefaultVisual ( ) const

Indicates if the current Visual is the default Visual.

Indicates whether the Visual currently set on the IlvXDisplayConfig is the default Visual of the current screen or not.
Similar to the Xlib function XDefaultVisual.

Returns
IlTrue if it is the default Visual of the current screen otherwise IlFalse.
void IlvXDisplayConfig::setScreen ( int  screen)

Sets the screen number for the application.

Sets the screen number used by the application to screen. Note that this function will reset the X Visual and the default colormap of the IlvDisplay to the default visual and the default colormap of the specified screen.

This method must be called only from the display configuration callback (see IlvDisplay constructors).

Parameters
screenThe screen number.
See also
IlvDisplay::IlvDisplay()
void IlvXDisplayConfig::setVisual ( Visual *  visual)

Sets the Visual for the application.

Sets visual as the Visual type to be used by the application.

This method must be called only from the display configuration callback (see IlvDisplay constructors).

Parameters
visualA pointer to the Visual structure, as defined in X Window documentation. If 0, the method uses the default Visual for the current screen.
See also
IlvDisplay::IlvDisplay()

© Copyright 2016, 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.