Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

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

Display configuration class for Windows applications. More...

#include <ilviews/windows/config.h>

Inheritance diagram for IlvWindowsDisplayConfig:
IlvDisplayConfig

Public Member Functions

IlvBitmapAllocationFailedCallback getBitmapAllocationFailedCallback () const
 Gets the bitmap allocation failure callback. More...
 
HINSTANCE getHInstance () const
 Gets the HINSTANCE associated with the IlvDisplay. More...
 
HPALETTE getHPalette () const
 Gets the HPALETTE currently used by the drawing functions of Rogue Wave Views. More...
 
IlvBitmap::MemoryType getPreferredBitmapMemoryType () const
 Gets preferred bitmap memory allocation type. More...
 
void setBitmapAllocationFailedCallback (IlvBitmapAllocationFailedCallback callback)
 Sets the bitmap allocation failure callback. More...
 
void setHPalette (HPALETTE hPalette, IlBoolean owner=IlFalse)
 Sets the HPALETTE used by the drawing functions. More...
 
void setPreferredBitmapMemoryType (IlvBitmap::MemoryType memoryType)
 Sets preferred bitmap memory allocation type. 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 Windows applications.

Library: winviews

This class is a predefined subtype of IlvDisplayConfig that is dedicated for Rogue Wave Views applications running on Windows. The display configuration callback of these applications will actually receive an instance of this class (see IlvDisplay constructors for details).

Member Function Documentation

§ getBitmapAllocationFailedCallback()

IlvBitmapAllocationFailedCallback IlvWindowsDisplayConfig::getBitmapAllocationFailedCallback ( ) const

Gets the bitmap allocation failure callback.

By default, the display configuration sets no bitmap allocation failure callback.

The bitmap allocation failure callback, if there is one, or 0 if there is none.

See also
setBitmapAllocationFailedCallback(IlvBitmapAllocationFailedCallback).

§ getHInstance()

HINSTANCE IlvWindowsDisplayConfig::getHInstance ( ) const

Gets the HINSTANCE associated with the IlvDisplay.

Returns
The pointer to the HINSTANCE used to create the IlvDisplay instance.

§ getHPalette()

HPALETTE IlvWindowsDisplayConfig::getHPalette ( ) const

Gets the HPALETTE currently used by the drawing functions of Rogue Wave Views.

Returns
The HPALETTE used by the drawing functions.

§ getPreferredBitmapMemoryType()

IlvBitmap::MemoryType IlvWindowsDisplayConfig::getPreferredBitmapMemoryType ( ) const

Gets preferred bitmap memory allocation type.

The bitmap memory allocation type that Views will use first when allocating a new bitmap.

See also
setPreferredBitmapMemoryType(IlvBitmap::MemoryType)

§ setBitmapAllocationFailedCallback()

void IlvWindowsDisplayConfig::setBitmapAllocationFailedCallback ( IlvBitmapAllocationFailedCallback  callback)

Sets the bitmap allocation failure callback.

When Views fails to allocate a bitmap, your application can be notified using this method. The function you provide is called with information on what has happened. You have ways to work the problem around in the implementation of this callback function.

Parameters
callbackThe function that is called, should Views fail at allocating a bitmap.
See also
getBitmapAllocationFailedCallback()

§ setHPalette()

void IlvWindowsDisplayConfig::setHPalette ( HPALETTE  hPalette,
IlBoolean  owner = IlFalse 
)

Sets the HPALETTE used by the drawing functions.

Parameters
hPaletteAn HPALETTE that will be used by the drawing functions.
ownerAn IlBoolean, whose default value is IlFalse, that specifies whether Rogue Wave Views may release this palette (if the value is IlTrue) or not.

§ setPreferredBitmapMemoryType()

void IlvWindowsDisplayConfig::setPreferredBitmapMemoryType ( IlvBitmap::MemoryType  memoryType)

Sets preferred bitmap memory allocation type.

Rogue Wave Views can allocate bitmaps in the system memory, or the video card memory. Bitmaps allocated in the video card memory are significantly faster to render on the screen, but if you often need to manually update a bitmap's content using pixel-based operations (using the IlvBitmapData class, for example), then it is probably better to allocate your target bitmap into the system's main memory.
This function lets you indicate which of the two should be used first.

The default is IlvBitmap::VideoMemory, but this can be changed by setting the environment variable IlvBitmapMemoryType to one of the following values:

  • system: the system memory is used first when allocating a bitmap. The alternative (video memory) is then tried.
  • video: the video memory is used first when allocating a bitmap. The alternative (system memory) is then tried. Note that this is the default setting.
  • systemOnly: only the system memory is used when allocating a bitmap. No alternative allocation method is used.
  • videoOnly: only the video memory is used when allocating a bitmap. No alternative allocation method is used.

Any other value will be ignored.

See also
getPreferredBitmapMemoryType()

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