Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

Color handling

This group includes functions for color handling. More...

Functions

void MGetDefaultBackgroundRGB (int *pr, int *pg, int *pb)
 Retrieves the R-G-B components of the default background color.

void MSetDefaultBackgroundRGB (int r, int g, int b)
 Sets the R-G-B components of the default background color.

void MGetDefaultForegroundRGB (int *pr, int *pg, int *pb)
 Retrieves the R-G-B components of the default foreground color.

void MSetDefaultForegroundRGB (int r, int g, int b)
 Sets the R-G-B components of the default foreground color.

MTColor MAllocDefaultBackgroundColor (void)
 Allocates a shared color having the R-G-B components of the default background color.

MTColor MAllocColor (int r, int g, int b)
 Allocates a shared color with the R-G-B components specified in parameters (r,g,b).

MTColor MAllocShiftColor (MTColor col, int percentage)
 Allocates a shared color as a shade of the color 'col'.

void MFreeColor (MTColor col)
 frees a shared color

MTColor MAllocCell (int r, int g, int b)
 creates a read-write color with the R-G-B components specified in parameters (r,g,b)

void MSetCellColor (MTColor c, int r, int g, int b)
 changes the R-G-B components of the color cell using the parameters (r,g,b)

void MFreeCell (MTColor c)
 frees a read-write color

void MQueryColor (MTColor col, int *pr, int *pg, int *pb)
 returns the color's R-G-B components.

MTColor MBlackColor (void)
 Returns the color id of the black color.

MTColor MWhiteColor (void)
 Returns the color id of the white color.

MTColor MReAllocColor (MTColor color)
 Allocates an already allocated color telling the library the usage counter associated to the color should be increased.

MTColor MAllocHighlightBGColor (MTColor bgc, MTColor fgc)
 Computes a suitable highlight background color.


Detailed Description

This group includes functions for color handling.

For a detailed description, see: Color Management


Function Documentation

MTColor MAllocCell int    r,
int    g,
int    b
 

creates a read-write color with the R-G-B components specified in parameters (r,g,b)

MTColor MAllocColor int    r,
int    g,
int    b
 

Allocates a shared color with the R-G-B components specified in parameters (r,g,b).

MTColor MAllocDefaultBackgroundColor void   
 

Allocates a shared color having the R-G-B components of the default background color.

This color is used to draw the background in many MGUI objects.

See also:
MSetDefaultBackgroundRGB, MAllocColor

MTColor MAllocHighlightBGColor MTColor    bgc,
MTColor    fgc
 

Computes a suitable highlight background color.

The returned new color is a shift of the normal background color, compatible with the supplied foreground color.

MTColor MAllocShiftColor MTColor    col,
int    percentage
 

Allocates a shared color as a shade of the color 'col'.

'percentage' specifies the brightness percentage (darker if < 100, brighter if > 100)

MTColor MBlackColor void   
 

Returns the color id of the black color.

Black and white colors are pre-allocated by MGUI at startup. You can use this value instead of allocating the color.

void MFreeCell MTColor    c
 

frees a read-write color

void MFreeColor MTColor    col
 

frees a shared color

void MGetDefaultBackgroundRGB int *    pr,
int *    pg,
int *    pb
 

Retrieves the R-G-B components of the default background color.

This color is used to draw the background in many MGUI objects. The R, G and B values are returned respectively in the variables pointed to by: 'pr', 'pg' and 'pb'.

Parameters:
pr Points to an integer variable which to store the return red value to.
pg Points to an integer variable which to store the return red value to.
pb Points to an integer variable which to store the return red value to.
See also:
MSetDefaultBackgroundRGB, MSetDefaultForegroundRGB, MGetDefaultForegroundRGB, MAllocColor

void MGetDefaultForegroundRGB int *    pr,
int *    pg,
int *    pb
 

Retrieves the R-G-B components of the default foreground color.

This color is used to draw the foreground in many MGUI objects. The R, G and B values are returned respectively in the variables pointed to by: 'pr', 'pg' and 'pb'.

Parameters:
pr Points to an integer variable which to store the return red value to.
pg Points to an integer variable which to store the return red value to.
pb Points to an integer variable which to store the return red value to.
See also:
MSetDefaultBackgroundRGB, MSetDefaultForegroundRGB, MGetDefaultBackgroundRGB, MAllocColor

void MQueryColor MTColor    col,
int *    pr,
int *    pg,
int *    pb
 

returns the color's R-G-B components.

MTColor MReAllocColor MTColor    color
 

Allocates an already allocated color telling the library the usage counter associated to the color should be increased.

The same color ID is returned.

void MSetCellColor MTColor    c,
int    r,
int    g,
int    b
 

changes the R-G-B components of the color cell using the parameters (r,g,b)

void MSetDefaultBackgroundRGB int    r,
int    g,
int    b
 

Sets the R-G-B components of the default background color.

This setting does not affect MGUI objects already created. The R, G and B values 'r', 'g' and 'pb' are used to set respectively the red, green and blue components of the new default background color.

Parameters:
r The red component of the color.
g The green component of the color.
b The blue component of the color.
See also:
MSetDefaultForegroundRGB, MGetDefaultBackgroundRGB, MGetDefaultForegroundRGB, MAllocColor

void MSetDefaultForegroundRGB int    r,
int    g,
int    b
 

Sets the R-G-B components of the default foreground color.

This setting does not affect MGUI objects already created. The R, G and B values 'r', 'g' and 'pb' are used to set respectively the red, green and blue components of the new default foreground color.

Parameters:
r The red component of the color.
g The green component of the color.
b The blue component of the color.
See also:
MSetDefaultBackgroundRGB, MGetDefaultBackgroundRGB, MGetDefaultForegroundRGB, MAllocColor

MTColor MWhiteColor void   
 

Returns the color id of the white color.

Black and white colors are pre-allocated by MGUI at startup. You can use this value instead of allocating the color.


Generated on Sun Jun 29 13:03:09 2003 for MGui API by doxygen1.3-rc2