Display configuration class for Windows applications. More...
#include <ilviews/windows/config.h>
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 | |
IlvDisplay * | getDisplay () 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 |
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).
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.
HINSTANCE IlvWindowsDisplayConfig::getHInstance | ( | ) | const |
Gets the HINSTANCE associated with the IlvDisplay
.
IlvDisplay
instance. HPALETTE IlvWindowsDisplayConfig::getHPalette | ( | ) | const |
Gets the HPALETTE currently used by the drawing functions of Rogue Wave Views.
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.
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.
callback | The function that is called, should Views fail at allocating a bitmap. |
Sets the HPALETTE used by the drawing functions.
hPalette | An HPALETTE that will be used by the drawing functions. |
owner | An IlBoolean , whose default value is IlFalse , that specifies whether Rogue Wave Views may release this palette (if the value is IlTrue ) or not. |
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.
getPreferredBitmapMemoryType()