- Now the Preview can show free space around the image (the image's corner will coincide with the center of the preview area) - Editing objects can now be manipulated in this free space - The editing mechanism has been split : it was completely handled in rtengine before, now rtengine still handle the pipette's data provider, but rtgui now handle the objects data provider. - Bugfix: when using coarse rotate in the Editor panel, the Gradient widgets are now correctly displayed
63 lines
1.8 KiB
C++
63 lines
1.8 KiB
C++
/*
|
|
* This file is part of RawTherapee.
|
|
*/
|
|
#ifndef _GRADIENT_H_
|
|
#define _GRADIENT_H_
|
|
|
|
#include <gtkmm.h>
|
|
#include "adjuster.h"
|
|
#include "toolpanel.h"
|
|
#include "edit.h"
|
|
#include "guiutils.h"
|
|
|
|
class Gradient : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public EditSubscriber
|
|
{
|
|
|
|
private:
|
|
int lastObject;
|
|
|
|
protected:
|
|
Gtk::HBox *editHBox;
|
|
Gtk::ToggleButton* edit;
|
|
Adjuster* degree;
|
|
Adjuster* feather;
|
|
Adjuster* strength;
|
|
Adjuster* centerX;
|
|
Adjuster* centerY;
|
|
double draggedPointOldAngle;
|
|
double draggedPointAdjusterAngle;
|
|
double draggedFeatherOffset;
|
|
rtengine::Coord draggedCenter;
|
|
sigc::connection editConn;
|
|
|
|
void editToggled ();
|
|
|
|
public:
|
|
|
|
Gradient ();
|
|
~Gradient ();
|
|
|
|
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL);
|
|
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL);
|
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL);
|
|
void setBatchMode (bool batchMode);
|
|
|
|
void adjusterChanged (Adjuster* a, double newval);
|
|
void enabledChanged ();
|
|
void setAdjusterBehavior (bool degreeadd, bool featheradd, bool strengthadd, bool centeradd);
|
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
|
void updateGeometry (const int centerX_, const int centerY_, const double feather_, const double degree_, const int fullWidth=-1, const int fullHeight=-1);
|
|
|
|
void setEditProvider (EditDataProvider* provider);
|
|
|
|
// EditSubscriber interface
|
|
CursorShape getCursor(int objectID);
|
|
bool mouseOver(int modifierKey);
|
|
bool button1Pressed(int modifierKey);
|
|
bool button1Released();
|
|
bool drag1(int modifierKey);
|
|
void switchOffEditMode ();
|
|
};
|
|
|
|
#endif
|