From 716e7b18f3c223ae8c7222d4c5a5588636b4c062 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 4 Aug 2019 09:35:42 +0200 Subject: Better definition of 'struct dirent' for the MinGW32 compiler --- FL/platform_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/platform_types.h b/FL/platform_types.h index 771f611a9..c13448614 100644 --- a/FL/platform_types.h +++ b/FL/platform_types.h @@ -116,7 +116,11 @@ typedef int FL_SOCKET; # endif typedef struct HGLRC__ *GLContext; #include -struct dirent {char d_name[1];}; +#ifdef __MINGW32__ +# include +#else + struct dirent {char d_name[1];}; +#endif #elif defined(__ANDROID__) -- cgit v1.2.3 From 292739664fdcf03bf4dabd2f1680b0f7c4cb17a1 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 10 Aug 2019 17:31:56 +0200 Subject: Support copy function in Fl_Color_Chooser Users can press ctrl-c (or ctrl-x) while using the fl_color_chooser() function or the Fl_Color_Chooser widget to copy the current color selection to the clipboard. --- FL/Fl_Color_Chooser.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Color_Chooser.H b/FL/Fl_Color_Chooser.H index e9a5c5775..db4fae37a 100644 --- a/FL/Fl_Color_Chooser.H +++ b/FL/Fl_Color_Chooser.H @@ -3,7 +3,7 @@ // // Color chooser header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2019 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -94,6 +94,10 @@ public: them. The pull-down menu lets the user set the input fields to show RGB, HSV, or 8-bit RGB (0 to 255). + The user can press CTRL-C to copy the currently selected color value as + text in RGB hex format with leading zeroes to the clipboard, for instance + \p FL_GREEN would be '00FF00' (since FLTK 1.4.0). + fl_color_chooser() returns non-zero if the user picks ok, and updates the RGB values. If the user picks cancel or closes the window this returns zero and leaves RGB unchanged. @@ -119,6 +123,8 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group { static void mode_cb(Fl_Widget*, void*); public: + int handle(int e); + /** Returns which Fl_Color_Chooser variant is currently active \return color modes are rgb(0), byte(1), hex(2), or hsv(3) -- cgit v1.2.3