24 #ifndef Fl_Color_Chooser_H 25 #define Fl_Color_Chooser_H 27 #include <FL/Fl_Group.H> 28 #include <FL/Fl_Box.H> 29 #include <FL/Fl_Return_Button.H> 30 #include <FL/Fl_Choice.H> 31 #include <FL/Fl_Value_Input.H> 36 class FL_EXPORT Flcc_HueBox :
public Fl_Widget {
43 Flcc_HueBox(
int X,
int Y,
int W,
int H) :
Fl_Widget(X,Y,W,H) {
48 class FL_EXPORT Flcc_ValueBox :
public Fl_Widget {
55 Flcc_ValueBox(
int X,
int Y,
int W,
int H) :
Fl_Widget(X,Y,W,H) {
63 Flcc_Value_Input(
int X,
int Y,
int W,
int H) :
Fl_Value_Input(X,Y,W,H) {}
111 Flcc_ValueBox valuebox;
113 Flcc_Value_Input rvalue;
114 Flcc_Value_Input gvalue;
115 Flcc_Value_Input bvalue;
117 double hue_, saturation_, value_;
119 void set_valuators();
136 void mode(
int newMode);
144 double hue()
const {
return hue_;}
156 double value()
const {
return value_;}
162 double r()
const {
return r_;}
168 double g()
const {
return g_;}
174 double b()
const {
return b_;}
176 int hsv(
double H,
double S,
double V);
178 int rgb(
double R,
double G,
double B);
180 static void hsv2rgb(
double H,
double S,
double V,
double& R,
double& G,
double& B);
182 static void rgb2hsv(
double R,
double G,
double B,
double& H,
double& S,
double& V);
187 FL_EXPORT
int fl_color_chooser(
const char* name,
double& r,
double& g,
double& b,
int m=-1);
188 FL_EXPORT
int fl_color_chooser(
const char* name,
uchar& r,
uchar& g,
uchar& b,
int m=-1);
int value() const
Gets the index of the last item chosen by the user.
Definition: Fl_Choice.H:115
The Fl_Color_Chooser widget provides a standard RGB color chooser.
Definition: Fl_Color_Chooser.H:109
double saturation() const
Returns the saturation.
Definition: Fl_Color_Chooser.H:150
double b() const
Returns the current blue value.
Definition: Fl_Color_Chooser.H:174
This widget simply draws its box, and possibly its label.
Definition: Fl_Box.H:32
double r() const
Returns the current red value.
Definition: Fl_Color_Chooser.H:162
virtual int format(char *)
Uses internal rules to format the fields numerical value into the character array pointed to by the p...
Definition: Fl_Valuator.cxx:168
The Fl_Group class is the FLTK container widget.
Definition: Fl_Group.H:42
int handle(int)
Handles the specified event.
Definition: Fl_Group.cxx:144
int mode()
Returns which Fl_Color_Chooser variant is currently active.
Definition: Fl_Color_Chooser.H:130
double value() const
Returns the value/brightness.
Definition: Fl_Color_Chooser.H:156
double hue() const
Returns the current hue.
Definition: Fl_Color_Chooser.H:144
A button that is used to pop up a menu.
Definition: Fl_Choice.H:103
double g() const
Returns the current green value.
Definition: Fl_Color_Chooser.H:168
unsigned char uchar
unsigned char
Definition: fl_types.h:28