FLTK 1.4.5: Fl_get_system_colors.cxx File Reference

FLTK 1.4.5

Loading...
Searching...
No Matches
Fl_get_system_colors.cxx File Reference

System color support. More...

`#include <FL/Fl.H>`
`#include "Fl_Screen_Driver.H"`
`#include "Fl_System_Driver.H"`
`#include <FL/fl_draw.H>`
`#include <FL/platform.H>`
`#include <FL/math.h>`
`#include <FL/fl_utf8.h>`
`#include <FL/fl_string_functions.h>`
`#include "flstring.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <FL/Fl_Pixmap.H>`
`#include <FL/Fl_Tiled_Image.H>`
`#include "tile.xpm"`

## Macros
#define | D1 BORDER_WIDTH
#define | D2 (BORDER_WIDTH+BORDER_WIDTH)

## Functions
void | fl_down_box (int, int, int, int, Fl_Color)
| Draws a box of type FL_DOWN_BOX.
void | fl_down_frame (int, int, int, int, Fl_Color)
| Draws a frame of type FL_DOWN_FRAME.
int | fl_parse_color (const char *p, uchar &r, uchar &g, uchar &b)
| Parse a string containing a description of a color and write r, g, and b.
void | fl_round_down_box (int, int, int, int, Fl_Color)
void | fl_round_focus (Fl_Boxtype, int, int, int, int, Fl_Color, Fl_Color)
void | fl_round_up_box (int, int, int, int, Fl_Color)
void | fl_thin_down_box (int, int, int, int, Fl_Color)
| Draws a box of type FL_THIN_DOWN_BOX.
void | fl_thin_down_frame (int, int, int, int, Fl_Color)
| Draws a frame of type FL_THIN_DOWN_FRAME.
void | fl_thin_up_box (int, int, int, int, Fl_Color)
| Draws a box of type FL_THIN_UP_BOX.
void | fl_thin_up_frame (int, int, int, int, Fl_Color)
| Draws a frame of type FL_THIN_UP_FRAME.
void | fl_up_box (int, int, int, int, Fl_Color)
| Draws a box of type FL_UP_BOX.
void | fl_up_frame (int, int, int, int, Fl_Color)
| Draws a frame of type FL_UP_FRAME.

## Variables
const char * | fl_bg = NULL
const char * | fl_bg2 = NULL
const char * | fl_fg = NULL

## Detailed Description

System color support.

## Function Documentation

## ◆ fl_parse_color()

int fl_parse_color | ( | const char * | p,
|  | uchar & | r,
|  | uchar & | g,
|  | uchar & | b )

Parse a string containing a description of a color and write r, g, and b.

This call is used by the Pixmap file format interpreter and by the command line arguments parser to set UI colors.

RGB color triplets usually start with a '#' character, but it can be omitted if it does not conflict with the later rules. Color components are defined in hexadecimal notation with 1, 2, 3, or four hex digits per component, making color triplets 3, 6, 9, or 12 characters long. The interpreter is case insensitive. Valid code examples include "FF0000" for red, "#0F0" for green, and "000000004444" for a dark blue.

On the X11 platform, color values can also be given a color name like "red". The list of accepted color names is provided by the X11 server.

If none of the color interpretations work, fl_parse_color returns 0. The Pixmap reader interprets those as transparent, and are usually written as "None", "#transparent", or "bg".

Parameters

  [in] | p | a C-string describing the color
  [out] | r,g,b | the color components in the 0...255 range

Returns
  0 if the color cannot be interpreted, 1 otherwise