OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TPaletteEntry Class Reference

Wrapper for Windows' PALETTEENTRY type. More...

#include <owl/color.h>

Inheritance diagram for owl::TPaletteEntry:

Public Member Functions

 TPaletteEntry (int r, int g, int b, int f=0)
 Creates a palette entry object with peRed, peGreen, peBlue, and peFlags set to r, g, b, and f, respectively.
 
 TPaletteEntry (const TColor &c)
 Construct a palette entry from a TColor.
 
bool operator== (COLORREF cr) const
 Returns true if the palette entries have the same color components.
 

Detailed Description

Wrapper for Windows' PALETTEENTRY type.

TPaletteEntry is a support class derived from the structure tagPALETTEENTRY. The latter is defined as follows:

typedef struct tagPALETTEENTRY {

The members peRed, peGreen, and peBlue specify the red, green, and blue intensity-values for a palette entry.

The peFlags member can be set to NULL or one of the following values:

  • PC_EXPLICIT Specifies that the low-order word of the logical palette entry designates a hardware palette index. This flag allows the application to show the contents of the display device palette.
  • PC_NOCOLLAPSE Specifies that the color be placed in an unused entry in the system palette instead of being matched to an existing color in the system palette. If there are no unused entries in the system palette, the color is matched normally. Once this color is in the system palette, colors in other logical palettes can be matched to this color.
  • PC_RESERVED Specifies that the logical palette entry be used for palette animation; this prevents other windows from matching colors to this palette entry since the color frequently changes. If an unused system-palette entry is available, this color is placed in that entry. Otherwise, the color is available for animation.

TPaletteEntry is used in conjunction with the classes TPalette and TColor to simplify logical color-palette operations. Constructors are provided to create TPaletteEntry objects from explicit COLORREF and RGB values, or from TColor objects.

Definition at line 398 of file color.h.

Constructor & Destructor Documentation

◆ TPaletteEntry() [1/2]

owl::TPaletteEntry::TPaletteEntry ( int r,
int g,
int b,
int f = 0 )
inline

Creates a palette entry object with peRed, peGreen, peBlue, and peFlags set to r, g, b, and f, respectively.

Definition at line 759 of file color.h.

◆ TPaletteEntry() [2/2]

owl::TPaletteEntry::TPaletteEntry ( const TColor & c)
inline

Construct a palette entry from a TColor.

Definition at line 771 of file color.h.

Member Function Documentation

◆ operator==()

bool owl::TPaletteEntry::operator== ( COLORREF cr) const
inline

Returns true if the palette entries have the same color components.

Definition at line 783 of file color.h.


The documentation for this class was generated from the following file: