26 #ifndef Fl_Color_Chooser_H 
   27 #define Fl_Color_Chooser_H 
   29 #include <FL/Fl_Group.H> 
   30 #include <FL/Fl_Box.H> 
   31 #include <FL/Fl_Return_Button.H> 
   32 #include <FL/Fl_Choice.H> 
   33 #include <FL/Fl_Value_Input.H> 
   38 class FL_EXPORT Flcc_HueBox : 
public Fl_Widget {
 
   45   Flcc_HueBox(
int X, 
int Y, 
int W, 
int H) : 
Fl_Widget(X,Y,W,H) {
 
   50 class 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);
 
  183 FL_EXPORT 
int fl_color_chooser(
const char* name, 
double& r, 
double& g, 
double& b, 
int m=-1);
 
The Fl_Color_Chooser widget provides a standard RGB color chooser. 
Definition: Fl_Color_Chooser.H:107
This widget simply draws its box, and possibly its label. 
Definition: Fl_Box.H:34
double g() const 
Returns the current green value. 
Definition: Fl_Color_Chooser.H:164
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:159
The Fl_Group class is the FLTK container widget. 
Definition: Fl_Group.H:41
int fl_color_chooser(const char *name, double &r, double &g, double &b, int cmode)
Pops up a window to let the user pick an arbitrary RGB color. 
Definition: Fl_Color_Chooser.cxx:564
int value() const 
Gets the index of the last item chosen by the user. 
Definition: Fl_Choice.H:88
int mode()
Returns which Fl_Color_Chooser variant is currently active. 
Definition: Fl_Color_Chooser.H:126
double hue() const 
Returns the current hue. 
Definition: Fl_Color_Chooser.H:140
A button that is used to pop up a menu. 
Definition: Fl_Choice.H:76
double saturation() const 
Returns the saturation. 
Definition: Fl_Color_Chooser.H:146
double value() const 
Returns the value/brightness. 
Definition: Fl_Color_Chooser.H:152
double r() const 
Returns the current red value. 
Definition: Fl_Color_Chooser.H:158
double b() const 
Returns the current blue value. 
Definition: Fl_Color_Chooser.H:170
unsigned char uchar
unsigned char 
Definition: fl_types.h:30