26#ifndef Fl_Color_Chooser_H
27#define Fl_Color_Chooser_H
29#include <FL/Fl_Group.H>
31#include <FL/Fl_Return_Button.H>
32#include <FL/Fl_Choice.H>
33#include <FL/Fl_Value_Input.H>
38class FL_EXPORT Flcc_HueBox :
public Fl_Widget {
45 Flcc_HueBox(
int X,
int Y,
int W,
int H) :
Fl_Widget(X,Y,W,H) {
50class FL_EXPORT Flcc_ValueBox :
public Fl_Widget {
57 Flcc_ValueBox(
int X,
int Y,
int W,
int H) :
Fl_Widget(X,Y,W,H) {
65 Flcc_Value_Input(
int X,
int Y,
int W,
int H) :
Fl_Value_Input(X,Y,W,H) {}
109 Flcc_ValueBox valuebox;
111 Flcc_Value_Input rvalue;
112 Flcc_Value_Input gvalue;
113 Flcc_Value_Input bvalue;
115 double hue_, saturation_, value_;
117 void set_valuators();
132 void mode(
int newMode);
140 double hue()
const {
return hue_;}
152 double value()
const {
return value_;}
158 double r()
const {
return r_;}
164 double g()
const {
return g_;}
170 double b()
const {
return b_;}
172 int hsv(
double H,
double S,
double V);
174 int rgb(
double R,
double G,
double B);
176 static void hsv2rgb(
double H,
double S,
double V,
double& R,
double& G,
double& B);
178 static void rgb2hsv(
double R,
double G,
double B,
double& H,
double& S,
double& V);
183FL_EXPORT
int fl_color_chooser(
const char* name,
double& r,
double& g,
double& b,
int m=-1);
184FL_EXPORT
int fl_color_chooser(
const char* name,
uchar& r,
uchar& g,
uchar& b,
int m=-1);
This widget simply draws its box, and possibly its label.
Definition Fl_Box.H:34
A button that is used to pop up a menu.
Definition Fl_Choice.H:83
int value() const
Gets the index of the last item chosen by the user.
Definition Fl_Choice.H:95
The Fl_Color_Chooser widget provides a standard RGB color chooser.
Definition Fl_Color_Chooser.H:107
double hue() const
Returns the current hue.
Definition Fl_Color_Chooser.H:140
double value() const
Returns the value/brightness.
Definition Fl_Color_Chooser.H:152
double g() const
Returns the current green value.
Definition Fl_Color_Chooser.H:164
double b() const
Returns the current blue value.
Definition Fl_Color_Chooser.H:170
double r() const
Returns the current red value.
Definition Fl_Color_Chooser.H:158
int mode()
Returns which Fl_Color_Chooser variant is currently active.
Definition Fl_Color_Chooser.H:126
double saturation() const
Returns the saturation.
Definition Fl_Color_Chooser.H:146
The Fl_Group class is the FLTK container widget.
Definition Fl_Group.H:41
unsigned char uchar
unsigned char
Definition fl_types.h:30