summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-10-30 20:16:43 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-10-30 20:16:43 +0000
commit9b6f68dd7ce28ca42e31af0cf2a9c2535b34553f (patch)
treeb92069c1f16f636a1edb450909026bf45d400c9b /FL
parentf1f1d8ed4239898a76e421d68fdd97459b125419 (diff)
Added interface to set color chooser mode (STR #2407)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Color_Chooser.H18
1 files changed, 14 insertions, 4 deletions
diff --git a/FL/Fl_Color_Chooser.H b/FL/Fl_Color_Chooser.H
index 131c10d9b..f840f7aad 100644
--- a/FL/Fl_Color_Chooser.H
+++ b/FL/Fl_Color_Chooser.H
@@ -127,9 +127,19 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
static void rgb_cb(Fl_Widget*, void*);
static void mode_cb(Fl_Widget*, void*);
public:
- /** Returns which Fl_Color_Chooser variant is currently active */
+
+ /**
+ Returns which Fl_Color_Chooser variant is currently active
+ \return color modes are rgb(0), byte(1), hex(2), or hsv(3)
+ */
int mode() {return choice.value();}
-
+
+ /**
+ Set which Fl_Color_Chooser variant is currently active
+ \param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
+ */
+ void mode(int newMode);
+
/**
Returns the current hue.
0 <= hue < 6. Zero is red, one is yellow, two is green, etc.
@@ -179,8 +189,8 @@ public:
Fl_Color_Chooser(int X, int Y, int W, int H, const char *L = 0);
};
-FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b);
-FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b);
+FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b, int m=-1);
+FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1);
#endif