Patch from issue 1359: "Munsell correction - Lab adjustements" credits: jdesmis

Bundled new features besid the Lab tool enhancement (by jdesmis) :
   - curve to control skin tones in vibrance tool, credits: jdesmis
   - right click over SHCSelector (below the parametric curve) to reset to default values, credits: Hombre
   - colored bars around curves, credits: Hombre
This commit is contained in:
natureh
2012-07-21 00:47:24 +02:00
parent 61f287b364
commit caf53b95a3
75 changed files with 4905 additions and 3336 deletions

View File

@@ -20,26 +20,34 @@
#define _SHCSELECTOR_
#include <gtkmm.h>
#include "coloredbar.h"
class SHCListener {
public:
virtual ~SHCListener() {}
virtual void shcChanged () {}
};
class SHCSelector : public Gtk::DrawingArea {
class SHCSelector : public Gtk::DrawingArea, public ColoredBar {
protected:
Glib::RefPtr<Gdk::GC> gc_;
Glib::RefPtr<Gdk::Pixmap> backBuffer;
int movingPosition;
double tmpX, tmpPos;
double defaults[3];
double positions[3];
double wslider;
SHCListener* cl;
// left margin, essentially a workaround to take care of an eventual right colored bar (e.g. for curves)
int leftMargin;
// right margin, essentially a workaround to take care of an eventual right colored bar
int rightMargin;
const static int hb = 3; // horizontal border
const static int vb = 2; // vertical border
SHCListener* cl;
public:
@@ -47,6 +55,8 @@ class SHCSelector : public Gtk::DrawingArea {
void setSHCListener (SHCListener* l) { cl = l;; }
void setMargins(int left, int right);
void setDefaults (double spos, double cpos, double hpos);
void setPositions (double spos, double cpos, double hpos);
void getPositions (double& spos, double& cpos, double& hpos);
void on_realize();
@@ -55,7 +65,7 @@ class SHCSelector : public Gtk::DrawingArea {
bool on_button_release_event (GdkEventButton* event);
bool on_motion_notify_event (GdkEventMotion* event);
void styleChanged (const Glib::RefPtr<Gtk::Style>& style);
void reset ();
bool reset ();
};
#endif