Solving issue 735 : "Zooming with mouse wheel should zoom where the mouse is".
The scroll wheel is now used for scrolling the editor's tab content. If you want to change the spin button's/slider's value or combobox entry, press the SHIFT key while using the scroll wheel. This patch also: - reduce the spin buttons size (50px wide, instead of 70px) - reduce the minimum size of the combobox (tool panels can now be narrower before showing the horizontal scrollbar) Note to developers: ------------------- When creating GUI for editor tools, please use the MyComboBox, MyComboBoxText, MySpinButton and MyFileChooserButton derived class only in order to handle the scroll wheel properly (-> #include <guiutils.h>). Known bug: The MyFileChooserButton thas is a FILE_CHOOSER_ACTION_SELECT_FOLDER does not respond correctly to the new behaviour.
This commit is contained in:
parent
aaaccfa451
commit
42ba3169e0
@ -39,7 +39,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
|
|||||||
addMode = false;
|
addMode = false;
|
||||||
|
|
||||||
// TODO: let the user chose the default value of Adjuster::delay, for slow machines
|
// TODO: let the user chose the default value of Adjuster::delay, for slow machines
|
||||||
delay = options.adjusterDelay; // delay is no more static, so we can set the delay individually (usefull for the RAW editor tab)
|
delay = options.adjusterDelay; // delay is no more static, so we can set the delay individually (useful for the RAW editor tab)
|
||||||
|
|
||||||
set_border_width (2);
|
set_border_width (2);
|
||||||
|
|
||||||
@ -65,14 +65,13 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
|
|||||||
|
|
||||||
hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0);
|
hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0);
|
||||||
|
|
||||||
spin = Gtk::manage (new Gtk::SpinButton ());
|
spin = Gtk::manage (new MySpinButton ());
|
||||||
spin->set_size_request (70, -1);
|
|
||||||
|
|
||||||
hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0);
|
hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0);
|
||||||
|
|
||||||
reset->set_size_request (-1, spin->get_height());
|
reset->set_size_request (-1, spin->get_height());
|
||||||
|
|
||||||
slider = Gtk::manage (new Gtk::HScale ());
|
slider = Gtk::manage (new MyHScale ());
|
||||||
slider->set_draw_value (false);
|
slider->set_draw_value (false);
|
||||||
|
|
||||||
pack_start (*hbox, false, false);
|
pack_start (*hbox, false, false);
|
||||||
@ -338,4 +337,3 @@ float Adjuster::trimValue (float& val) {
|
|||||||
else if (val < (float)vMin) val = (float)vMin; // shapeValue(vMin) ?
|
else if (val < (float)vMin) val = (float)vMin; // shapeValue(vMin) ?
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <editedstate.h>
|
#include <editedstate.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class Adjuster;
|
class Adjuster;
|
||||||
class AdjusterListener {
|
class AdjusterListener {
|
||||||
@ -35,8 +36,8 @@ class Adjuster : public Gtk::VBox {
|
|||||||
protected:
|
protected:
|
||||||
Gtk::HBox* hbox;
|
Gtk::HBox* hbox;
|
||||||
Gtk::Label* label;
|
Gtk::Label* label;
|
||||||
Gtk::HScale* slider;
|
MyHScale* slider;
|
||||||
Gtk::SpinButton* spin;
|
MySpinButton* spin;
|
||||||
Gtk::Button* reset;
|
Gtk::Button* reset;
|
||||||
AdjusterListener* adjusterListener;
|
AdjusterListener* adjusterListener;
|
||||||
sigc::connection delayConnection;
|
sigc::connection delayConnection;
|
||||||
|
@ -64,7 +64,7 @@ BatchQueuePanel::BatchQueuePanel () {
|
|||||||
Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ());
|
||||||
useFolder = Gtk::manage (new Gtk::RadioButton (M("PREFERENCES_OUTDIRFOLDER")+":"));
|
useFolder = Gtk::manage (new Gtk::RadioButton (M("PREFERENCES_OUTDIRFOLDER")+":"));
|
||||||
hb3->pack_start (*useFolder, Gtk::PACK_SHRINK,4);
|
hb3->pack_start (*useFolder, Gtk::PACK_SHRINK,4);
|
||||||
outdirFolder = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
outdirFolder = Gtk::manage (new MyFileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
||||||
hb3->pack_start (*outdirFolder);
|
hb3->pack_start (*outdirFolder);
|
||||||
odvb->pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
odvb->pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
||||||
outdirFolder->set_tooltip_markup (M("PREFERENCES_OUTDIRFOLDERHINT"));
|
outdirFolder->set_tooltip_markup (M("PREFERENCES_OUTDIRFOLDERHINT"));
|
||||||
@ -87,7 +87,7 @@ BatchQueuePanel::BatchQueuePanel () {
|
|||||||
|
|
||||||
// setup signal handlers
|
// setup signal handlers
|
||||||
outdirTemplate->signal_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
outdirTemplate->signal_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
||||||
outdirFolder->signal_current_folder_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::pathFolderChanged));
|
outdirFolder->signal_current_folder_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::pathFolderChanged));
|
||||||
useTemplate->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
useTemplate->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
||||||
useFolder->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
useFolder->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
||||||
saveFormatPanel->setListener (this);
|
saveFormatPanel->setListener (this);
|
||||||
@ -101,7 +101,6 @@ BatchQueuePanel::BatchQueuePanel () {
|
|||||||
topBox->pack_start (*fformat, Gtk::PACK_SHRINK, 4);
|
topBox->pack_start (*fformat, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
// add middle browser area
|
// add middle browser area
|
||||||
Gtk::HBox* hBox = Gtk::manage (new Gtk::HBox ());
|
|
||||||
pack_start (*batchQueue);
|
pack_start (*batchQueue);
|
||||||
|
|
||||||
// lower box with thumbnail zoom
|
// lower box with thumbnail zoom
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <batchqueue.h>
|
#include <batchqueue.h>
|
||||||
#include <saveformatpanel.h>
|
#include <saveformatpanel.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class RTWindow;
|
class RTWindow;
|
||||||
class BatchQueuePanel : public Gtk::VBox,
|
class BatchQueuePanel : public Gtk::VBox,
|
||||||
@ -37,7 +38,7 @@ class BatchQueuePanel : public Gtk::VBox,
|
|||||||
sigc::connection stopConnection;
|
sigc::connection stopConnection;
|
||||||
|
|
||||||
Gtk::Entry* outdirTemplate;
|
Gtk::Entry* outdirTemplate;
|
||||||
Gtk::FileChooserButton* outdirFolder;
|
MyFileChooserButton* outdirFolder;
|
||||||
Gtk::RadioButton* useTemplate;
|
Gtk::RadioButton* useTemplate;
|
||||||
Gtk::RadioButton* useFolder;
|
Gtk::RadioButton* useFolder;
|
||||||
SaveFormatPanel* saveFormatPanel;
|
SaveFormatPanel* saveFormatPanel;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
#include <crop.h>
|
#include <crop.h>
|
||||||
#include <options.h>
|
#include <options.h>
|
||||||
#include <guiutils.h>
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
@ -50,12 +49,12 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
||||||
|
|
||||||
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_X") +": ")));
|
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_X") +": ")));
|
||||||
x = Gtk::manage (new Gtk::SpinButton ());
|
x = Gtk::manage (new MySpinButton ());
|
||||||
x->set_size_request (60, -1);
|
x->set_size_request (60, -1);
|
||||||
hb1->pack_start (*x);
|
hb1->pack_start (*x);
|
||||||
|
|
||||||
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_Y") + ": ")));
|
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_Y") + ": ")));
|
||||||
y = Gtk::manage (new Gtk::SpinButton ());
|
y = Gtk::manage (new MySpinButton ());
|
||||||
y->set_size_request (60, -1);
|
y->set_size_request (60, -1);
|
||||||
hb1->pack_start (*y);
|
hb1->pack_start (*y);
|
||||||
|
|
||||||
@ -64,12 +63,12 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ());
|
||||||
|
|
||||||
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_W") + ": ")));
|
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_W") + ": ")));
|
||||||
w = Gtk::manage (new Gtk::SpinButton ());
|
w = Gtk::manage (new MySpinButton ());
|
||||||
w->set_size_request (60, -1);
|
w->set_size_request (60, -1);
|
||||||
hb2->pack_start (*w);
|
hb2->pack_start (*w);
|
||||||
|
|
||||||
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_H") + ": ")));
|
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_H") + ": ")));
|
||||||
h = Gtk::manage (new Gtk::SpinButton ());
|
h = Gtk::manage (new MySpinButton ());
|
||||||
h->set_size_request (60, -1);
|
h->set_size_request (60, -1);
|
||||||
hb2->pack_start (*h);
|
hb2->pack_start (*h);
|
||||||
|
|
||||||
@ -87,10 +86,10 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
|
|
||||||
hb3->pack_start (*fixr, Gtk::PACK_SHRINK, 4);
|
hb3->pack_start (*fixr, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
ratio = Gtk::manage (new Gtk::ComboBoxText ());
|
ratio = Gtk::manage (new MyComboBoxText ());
|
||||||
hb3->pack_start (*ratio, Gtk::PACK_SHRINK, 4);
|
hb3->pack_start (*ratio, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||||
|
|
||||||
orientation = Gtk::manage (new Gtk::ComboBoxText ());
|
orientation = Gtk::manage (new MyComboBoxText ());
|
||||||
hb3->pack_start (*orientation);
|
hb3->pack_start (*orientation);
|
||||||
|
|
||||||
pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
||||||
@ -98,7 +97,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
Gtk::HBox* hb31 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb31 = Gtk::manage (new Gtk::HBox ());
|
||||||
|
|
||||||
hb31->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_GUIDETYPE"))), Gtk::PACK_SHRINK, 4);
|
hb31->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_GUIDETYPE"))), Gtk::PACK_SHRINK, 4);
|
||||||
guide = Gtk::manage (new Gtk::ComboBoxText ());
|
guide = Gtk::manage (new MyComboBoxText ());
|
||||||
hb31->pack_start (*guide);
|
hb31->pack_start (*guide);
|
||||||
|
|
||||||
pack_start (*hb31, Gtk::PACK_SHRINK, 4);
|
pack_start (*hb31, Gtk::PACK_SHRINK, 4);
|
||||||
@ -109,7 +108,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
|
|
||||||
Gtk::HBox* hb4 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb4 = Gtk::manage (new Gtk::HBox ());
|
||||||
hb4->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_PPI"))));
|
hb4->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_PPI"))));
|
||||||
ppi = Gtk::manage (new Gtk::SpinButton ());
|
ppi = Gtk::manage (new MySpinButton ());
|
||||||
ppi->set_size_request (60, -1);
|
ppi->set_size_request (60, -1);
|
||||||
hb4->pack_start (*ppi);
|
hb4->pack_start (*ppi);
|
||||||
|
|
||||||
|
17
rtgui/crop.h
17
rtgui/crop.h
@ -22,6 +22,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <cropguilistener.h>
|
#include <cropguilistener.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class CropPanelListener {
|
class CropPanelListener {
|
||||||
|
|
||||||
@ -35,17 +36,17 @@ class Crop : public Gtk::VBox, public CropGUIListener, public FoldableToolPanel,
|
|||||||
protected:
|
protected:
|
||||||
Gtk::CheckButton* enabled;
|
Gtk::CheckButton* enabled;
|
||||||
Gtk::CheckButton* fixr;
|
Gtk::CheckButton* fixr;
|
||||||
Gtk::ComboBoxText* ratio;
|
MyComboBoxText* ratio;
|
||||||
Gtk::ComboBoxText* orientation;
|
MyComboBoxText* orientation;
|
||||||
Gtk::ComboBoxText* guide;
|
MyComboBoxText* guide;
|
||||||
Gtk::Button* selectCrop;
|
Gtk::Button* selectCrop;
|
||||||
CropPanelListener* clistener;
|
CropPanelListener* clistener;
|
||||||
int opt;
|
int opt;
|
||||||
Gtk::SpinButton* x;
|
MySpinButton* x;
|
||||||
Gtk::SpinButton* y;
|
MySpinButton* y;
|
||||||
Gtk::SpinButton* w;
|
MySpinButton* w;
|
||||||
Gtk::SpinButton* h;
|
MySpinButton* h;
|
||||||
Gtk::SpinButton* ppi;
|
MySpinButton* ppi;
|
||||||
Gtk::Label* sizecm;
|
Gtk::Label* sizecm;
|
||||||
Gtk::Label* sizein;
|
Gtk::Label* sizein;
|
||||||
Gtk::VBox* ppibox;
|
Gtk::VBox* ppibox;
|
||||||
|
@ -802,16 +802,51 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr) {
|
|||||||
// printf ("etime --> %d, %d\n", t2.etime (t1), t4.etime (t3));
|
// printf ("etime --> %d, %d\n", t2.etime (t1), t4.etime (t3));
|
||||||
}
|
}
|
||||||
|
|
||||||
// zoom* is called from the zoomPanel
|
// calculate the center of the zommed in/out preview given a cursor position
|
||||||
void CropWindow::zoomIn () {
|
void CropWindow::findCenter (int deltaZoom, int& x, int& y) {
|
||||||
|
int cursorX, cursorY;
|
||||||
|
translateCoord(x, y, cursorX, cursorY);
|
||||||
|
|
||||||
changeZoom (cropZoom+1);
|
int cropX, cropY, cropW, cropH, skip;
|
||||||
fitZoom = false;
|
cropHandler.getWindow (cropX, cropY, cropW, cropH, skip);
|
||||||
|
|
||||||
|
int currCenterX = cropX + cropW/2;
|
||||||
|
int currCenterY = cropY + cropH/2;
|
||||||
|
|
||||||
|
int deltaX = currCenterX - cursorX;
|
||||||
|
int deltaY = currCenterY - cursorY;
|
||||||
|
|
||||||
|
double factor = zoomSteps[cropZoom].zoom / zoomSteps[cropZoom+deltaZoom].zoom;
|
||||||
|
x = cursorX + (int)((double)(deltaX)*factor);
|
||||||
|
y = cursorY + (int)((double)(deltaY)*factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropWindow::zoomOut () {
|
// zoom* is called from the zoomPanel or the scroll wheel in the preview area
|
||||||
|
void CropWindow::zoomIn (bool toCursor, int cursorX, int cursorY) {
|
||||||
|
|
||||||
changeZoom (cropZoom-1);
|
int x = -1;
|
||||||
|
int y = -1;
|
||||||
|
|
||||||
|
if (toCursor) {
|
||||||
|
x = cursorX;
|
||||||
|
y = cursorY;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeZoom (cropZoom+1, true, x, y);
|
||||||
|
fitZoom = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CropWindow::zoomOut (bool toCursor, int cursorX, int cursorY) {
|
||||||
|
|
||||||
|
int x = -1;
|
||||||
|
int y = -1;
|
||||||
|
|
||||||
|
if (toCursor) {
|
||||||
|
x = cursorX;
|
||||||
|
y = cursorY;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeZoom (cropZoom-1, true, x, y);
|
||||||
fitZoom = false;
|
fitZoom = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -826,6 +861,14 @@ double CropWindow::getZoom () {
|
|||||||
return zoomSteps[cropZoom].zoom;
|
return zoomSteps[cropZoom].zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CropWindow::isMinZoom () {
|
||||||
|
return cropZoom <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CropWindow::isMaxZoom () {
|
||||||
|
return cropZoom >= MAXZOOMSTEPS;
|
||||||
|
}
|
||||||
|
|
||||||
void CropWindow::setZoom (double zoom) {
|
void CropWindow::setZoom (double zoom) {
|
||||||
int cz = MAXZOOMSTEPS;
|
int cz = MAXZOOMSTEPS;
|
||||||
if (zoom < zoomSteps[0].zoom)
|
if (zoom < zoomSteps[0].zoom)
|
||||||
|
@ -43,14 +43,14 @@ class ImageArea;
|
|||||||
class CropWindow : public LWButtonListener, public CropHandlerListener {
|
class CropWindow : public LWButtonListener, public CropHandlerListener {
|
||||||
|
|
||||||
// state management
|
// state management
|
||||||
ImgEditState state; // current state of user (see enum State)
|
ImgEditState state; // current state of user (see enum State)
|
||||||
int action_x, action_y, press_x, press_y;
|
int action_x, action_y, press_x, press_y;
|
||||||
double rot_deg;
|
double rot_deg;
|
||||||
bool onResizeArea;
|
bool onResizeArea;
|
||||||
bool deleted;
|
bool deleted;
|
||||||
bool fitZoomEnabled;
|
bool fitZoomEnabled;
|
||||||
bool fitZoom;
|
bool fitZoom;
|
||||||
bool isLowUpdatePriority;
|
bool isLowUpdatePriority;
|
||||||
|
|
||||||
// decoration
|
// decoration
|
||||||
Cairo::RefPtr<Cairo::ImageSurface> resizeSurface;
|
Cairo::RefPtr<Cairo::ImageSurface> resizeSurface;
|
||||||
@ -59,7 +59,7 @@ class CropWindow : public LWButtonListener, public CropHandlerListener {
|
|||||||
Glib::ustring cropLabel;
|
Glib::ustring cropLabel;
|
||||||
int backColor;
|
int backColor;
|
||||||
bool decorated;
|
bool decorated;
|
||||||
|
|
||||||
// crop frame description
|
// crop frame description
|
||||||
int titleHeight, sideBorderWidth, lowerBorderWidth, upperBorderWidth, sepWidth, minWidth;
|
int titleHeight, sideBorderWidth, lowerBorderWidth, upperBorderWidth, sepWidth, minWidth;
|
||||||
// size & position of the crop relative to the top left corner
|
// size & position of the crop relative to the top left corner
|
||||||
@ -69,12 +69,12 @@ class CropWindow : public LWButtonListener, public CropHandlerListener {
|
|||||||
int imgAreaX, imgAreaY, imgAreaW, imgAreaH;
|
int imgAreaX, imgAreaY, imgAreaW, imgAreaH;
|
||||||
// size & pos of the piece of preview image relative to the top left corner of the crop
|
// size & pos of the piece of preview image relative to the top left corner of the crop
|
||||||
int imgX, imgY, imgW, imgH;
|
int imgX, imgY, imgW, imgH;
|
||||||
|
|
||||||
// image handling
|
// image handling
|
||||||
|
|
||||||
ImageArea* iarea;
|
ImageArea* iarea;
|
||||||
int cropZoom; // *1000
|
int cropZoom; // *1000
|
||||||
|
|
||||||
// crop gui listener
|
// crop gui listener
|
||||||
CropGUIListener* cropgl;
|
CropGUIListener* cropgl;
|
||||||
PointerMotionListener* pmlistener;
|
PointerMotionListener* pmlistener;
|
||||||
@ -83,40 +83,44 @@ class CropWindow : public LWButtonListener, public CropHandlerListener {
|
|||||||
|
|
||||||
CropWindow* observedCropWin;
|
CropWindow* observedCropWin;
|
||||||
|
|
||||||
bool onArea (CursorArea a, int x, int y);
|
bool onArea (CursorArea a, int x, int y);
|
||||||
void updateCursor (int x, int y);
|
void updateCursor (int x, int y);
|
||||||
void drawDecoration (Cairo::RefPtr<Cairo::Context> cr);
|
void drawDecoration (Cairo::RefPtr<Cairo::Context> cr);
|
||||||
void drawStraightenGuide (Cairo::RefPtr<Cairo::Context> cr);
|
void drawStraightenGuide (Cairo::RefPtr<Cairo::Context> cr);
|
||||||
void drawSpotWBRectangle (Cairo::RefPtr<Cairo::Context> cr);
|
void drawSpotWBRectangle (Cairo::RefPtr<Cairo::Context> cr);
|
||||||
void drawObservedFrame (Cairo::RefPtr<Cairo::Context> cr, int rw=0, int rh=0);
|
void drawObservedFrame (Cairo::RefPtr<Cairo::Context> cr, int rw=0, int rh=0);
|
||||||
void translateCoord (int phyx, int phyy, int& imgx, int& imgy);
|
void translateCoord (int phyx, int phyy, int& imgx, int& imgy);
|
||||||
void changeZoom (int zoom, bool notify=true, int centerx=-1, int centery=-1);
|
void changeZoom (int zoom, bool notify=true, int centerx=-1, int centery=-1);
|
||||||
void getObservedFrameArea(int& x, int& y, int& w, int& h, int rw=0, int rh=0);
|
void getObservedFrameArea(int& x, int& y, int& w, int& h, int rw=0, int rh=0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CropHandler cropHandler;
|
CropHandler cropHandler;
|
||||||
CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_);
|
CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_);
|
||||||
~CropWindow ();
|
~CropWindow ();
|
||||||
|
|
||||||
void setDecorated (bool decorated) { this->decorated = decorated; }
|
void setDecorated (bool decorated) { this->decorated = decorated; }
|
||||||
void setFitZoomEnabled (bool fze) { fitZoomEnabled = fze; }
|
void setFitZoomEnabled (bool fze) { fitZoomEnabled = fze; }
|
||||||
void setObservedCropWin (CropWindow* cw) { observedCropWin = cw; }
|
void setObservedCropWin (CropWindow* cw) { observedCropWin = cw; }
|
||||||
|
|
||||||
void setPosition (int x, int y);
|
void setPosition (int x, int y);
|
||||||
void getPosition (int& x, int& y);
|
void getPosition (int& x, int& y);
|
||||||
void setSize (int w, int h, bool norefresh=false);
|
void setSize (int w, int h, bool norefresh=false);
|
||||||
void getSize (int& w, int& h);
|
void getSize (int& w, int& h);
|
||||||
|
|
||||||
// zoomlistener interface
|
// zoomlistener interface
|
||||||
void zoomIn ();
|
void zoomIn (bool toCursor=false, int cursorX=-1, int cursorY=-1);
|
||||||
void zoomOut ();
|
void zoomOut (bool toCursor=false, int cursorX=-1, int cursorY=-1);
|
||||||
void zoom11 ();
|
void zoom11 ();
|
||||||
void zoomFit ();
|
void zoomFit ();
|
||||||
double getZoom ();
|
double getZoom ();
|
||||||
void setZoom (double zoom);
|
bool isMinZoom ();
|
||||||
|
bool isMaxZoom ();
|
||||||
|
void setZoom (double zoom);
|
||||||
|
|
||||||
|
void findCenter (int deltaZoom, int& x, int& y);
|
||||||
bool isInside (int x, int y);
|
bool isInside (int x, int y);
|
||||||
|
|
||||||
|
|
||||||
void buttonPress (int button, int num, int state, int x, int y);
|
void buttonPress (int button, int num, int state, int x, int y);
|
||||||
void buttonRelease (int button, int num, int state, int x, int y);
|
void buttonRelease (int button, int num, int state, int x, int y);
|
||||||
void pointerMoved (int x, int y);
|
void pointerMoved (int x, int y);
|
||||||
@ -126,27 +130,27 @@ class CropWindow : public LWButtonListener, public CropHandlerListener {
|
|||||||
// interface lwbuttonlistener
|
// interface lwbuttonlistener
|
||||||
void buttonPressed (LWButton* button, int actionCode, void* actionData);
|
void buttonPressed (LWButton* button, int actionCode, void* actionData);
|
||||||
void redrawNeeded (LWButton* button);
|
void redrawNeeded (LWButton* button);
|
||||||
|
|
||||||
// crop handling
|
// crop handling
|
||||||
void getCropRectangle (int& x, int& y, int& w, int& h);
|
void getCropRectangle (int& x, int& y, int& w, int& h);
|
||||||
void getCropPosition (int& x, int& y);
|
void getCropPosition (int& x, int& y);
|
||||||
void setCropPosition (int x, int y);
|
void setCropPosition (int x, int y);
|
||||||
void getCropSize (int& w, int& h);
|
void getCropSize (int& w, int& h);
|
||||||
|
|
||||||
// listeners
|
// listeners
|
||||||
void setCropGUIListener (CropGUIListener* cgl) { cropgl = cgl; }
|
void setCropGUIListener (CropGUIListener* cgl) { cropgl = cgl; }
|
||||||
void setPointerMotionListener (PointerMotionListener* pml) { pmlistener = pml; }
|
void setPointerMotionListener (PointerMotionListener* pml) { pmlistener = pml; }
|
||||||
void setPointerMotionHListener (PointerMotionListener* pml) { pmhlistener = pml; }
|
void setPointerMotionHListener (PointerMotionListener* pml) { pmhlistener = pml; }
|
||||||
|
|
||||||
// crop window listeners
|
// crop window listeners
|
||||||
void addCropWindowListener (CropWindowListener* l) { listeners.push_back (l); }
|
void addCropWindowListener (CropWindowListener* l) { listeners.push_back (l); }
|
||||||
void delCropWindowListener (CropWindowListener* l);
|
void delCropWindowListener (CropWindowListener* l);
|
||||||
|
|
||||||
// crophandlerlistener interface
|
// crophandlerlistener interface
|
||||||
void cropImageUpdated ();
|
void cropImageUpdated ();
|
||||||
void cropWindowChanged ();
|
void cropWindowChanged ();
|
||||||
void initialImageArrived ();
|
void initialImageArrived ();
|
||||||
|
|
||||||
void remoteMove (int deltaX, int deltaY);
|
void remoteMove (int deltaX, int deltaY);
|
||||||
void remoteMoveReady ();
|
void remoteMoveReady ();
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@ using namespace rtengine::procparams;
|
|||||||
DarkFrame::DarkFrame () : Gtk::VBox(), FoldableToolPanel(this)
|
DarkFrame::DarkFrame () : Gtk::VBox(), FoldableToolPanel(this)
|
||||||
{
|
{
|
||||||
hbdf = Gtk::manage(new Gtk::HBox());
|
hbdf = Gtk::manage(new Gtk::HBox());
|
||||||
darkFrameFile = Gtk::manage(new Gtk::FileChooserButton(M("TP_DARKFRAME_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
darkFrameFile = Gtk::manage(new MyFileChooserButton(M("TP_DARKFRAME_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||||
dfLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
|
dfLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
|
||||||
btnReset = Gtk::manage(new Gtk::Button());
|
btnReset = Gtk::manage(new Gtk::Button());
|
||||||
btnReset->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-cancel"), Gtk::ICON_SIZE_BUTTON)));
|
btnReset->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-cancel"), Gtk::ICON_SIZE_BUTTON)));
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
#include <rawimage.h>
|
#include <rawimage.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class DFProvider {
|
class DFProvider {
|
||||||
public:
|
public:
|
||||||
@ -33,8 +34,7 @@ class DarkFrame : public Gtk::VBox, public FoldableToolPanel {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Gtk::ComboBoxText* darkFrameMethod;
|
MyFileChooserButton *darkFrameFile;
|
||||||
Gtk::FileChooserButton *darkFrameFile;
|
|
||||||
Gtk::HBox *hbdf;
|
Gtk::HBox *hbdf;
|
||||||
Gtk::Button *btnReset;
|
Gtk::Button *btnReset;
|
||||||
Gtk::Label *dfLabel;
|
Gtk::Label *dfLabel;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <exifpanel.h>
|
#include <exifpanel.h>
|
||||||
#include <safegtk.h>
|
#include <safegtk.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
@ -26,7 +27,7 @@ extern Glib::ustring argv0;
|
|||||||
|
|
||||||
ExifPanel::ExifPanel () : idata(NULL) {
|
ExifPanel::ExifPanel () : idata(NULL) {
|
||||||
|
|
||||||
recursiveOp = true;
|
recursiveOp = true;
|
||||||
|
|
||||||
exifTree = Gtk::manage(new Gtk::TreeView());
|
exifTree = Gtk::manage(new Gtk::TreeView());
|
||||||
scrolledWindow = Gtk::manage(new Gtk::ScrolledWindow());
|
scrolledWindow = Gtk::manage(new Gtk::ScrolledWindow());
|
||||||
@ -366,7 +367,7 @@ void ExifPanel::addPressed () {
|
|||||||
Gtk::HBox* hb2 = new Gtk::HBox ();
|
Gtk::HBox* hb2 = new Gtk::HBox ();
|
||||||
|
|
||||||
Gtk::Label* tlabel = new Gtk::Label (M("EXIFPANEL_ADDTAGDLG_SELECTTAG")+":");
|
Gtk::Label* tlabel = new Gtk::Label (M("EXIFPANEL_ADDTAGDLG_SELECTTAG")+":");
|
||||||
Gtk::ComboBoxText* tcombo = new Gtk::ComboBoxText ();
|
MyComboBoxText* tcombo = new MyComboBoxText ();
|
||||||
|
|
||||||
tcombo->append_text ("Artist");
|
tcombo->append_text ("Artist");
|
||||||
tcombo->append_text ("Copyright");
|
tcombo->append_text ("Copyright");
|
||||||
|
@ -28,7 +28,7 @@ using namespace rtengine::procparams;
|
|||||||
FlatField::FlatField () : Gtk::VBox(), FoldableToolPanel(this)
|
FlatField::FlatField () : Gtk::VBox(), FoldableToolPanel(this)
|
||||||
{
|
{
|
||||||
hbff = Gtk::manage(new Gtk::HBox());
|
hbff = Gtk::manage(new Gtk::HBox());
|
||||||
flatFieldFile = Gtk::manage(new Gtk::FileChooserButton(M("TP_FLATFIELD_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
flatFieldFile = Gtk::manage(new MyFileChooserButton(M("TP_FLATFIELD_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||||
ffLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
|
ffLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
|
||||||
flatFieldFileReset = Gtk::manage(new Gtk::Button());
|
flatFieldFileReset = Gtk::manage(new Gtk::Button());
|
||||||
flatFieldFileReset->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-cancel"), Gtk::ICON_SIZE_BUTTON)));
|
flatFieldFileReset->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-cancel"), Gtk::ICON_SIZE_BUTTON)));
|
||||||
@ -45,7 +45,7 @@ FlatField::FlatField () : Gtk::VBox(), FoldableToolPanel(this)
|
|||||||
|
|
||||||
Gtk::HBox* hbffbt = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hbffbt = Gtk::manage (new Gtk::HBox ());
|
||||||
hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") +": ")));
|
hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") +": ")));
|
||||||
flatFieldBlurType = Gtk::manage (new Gtk::ComboBoxText ());
|
flatFieldBlurType = Gtk::manage (new MyComboBoxText ());
|
||||||
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_AREA"));
|
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_AREA"));
|
||||||
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_VERTICAL"));
|
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_VERTICAL"));
|
||||||
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_HORIZONTAL"));
|
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_HORIZONTAL"));
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
#include <rawimage.h>
|
#include <rawimage.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class FFProvider {
|
class FFProvider {
|
||||||
public:
|
public:
|
||||||
@ -34,13 +35,13 @@ class FlatField : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Gtk::FileChooserButton *flatFieldFile;
|
MyFileChooserButton *flatFieldFile;
|
||||||
Gtk::Label *ffLabel;
|
Gtk::Label *ffLabel;
|
||||||
Gtk::Label *ffInfo;
|
Gtk::Label *ffInfo;
|
||||||
Gtk::Button *flatFieldFileReset;
|
Gtk::Button *flatFieldFileReset;
|
||||||
Gtk::CheckButton* flatFieldAutoSelect;
|
Gtk::CheckButton* flatFieldAutoSelect;
|
||||||
Adjuster* flatFieldBlurRadius;
|
Adjuster* flatFieldBlurRadius;
|
||||||
Gtk::ComboBoxText* flatFieldBlurType;
|
MyComboBoxText* flatFieldBlurType;
|
||||||
Gtk::HBox *hbff;
|
Gtk::HBox *hbff;
|
||||||
bool ffChanged;
|
bool ffChanged;
|
||||||
bool lastFFAutoSelect;
|
bool lastFFAutoSelect;
|
||||||
|
@ -227,3 +227,89 @@ void drawCrop (Cairo::RefPtr<Cairo::Context> cr, int imx, int imy, int imw, int
|
|||||||
}
|
}
|
||||||
cr->reset_clip ();
|
cr->reset_clip ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Derived class of some widgets to properly handle the scroll wheel ;
|
||||||
|
* the user has to use the Shift key to be able to change the widget's value,
|
||||||
|
* otherwise the mouse wheel will scroll the editor's tabs content.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
MyComboBoxText::MyComboBoxText () {
|
||||||
|
set_size_request(40, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MyComboBoxText::on_scroll_event (GdkEventScroll* event) {
|
||||||
|
|
||||||
|
// If Shift is pressed, the widget is modified
|
||||||
|
if (event->state & GDK_SHIFT_MASK) {
|
||||||
|
Gtk::ComboBoxText::on_scroll_event(event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ... otherwise the scroll event is sent back to an upper level
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyComboBox::MyComboBox () {
|
||||||
|
set_size_request(40, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MyComboBox::on_scroll_event (GdkEventScroll* event) {
|
||||||
|
|
||||||
|
// If Shift is pressed, the widget is modified
|
||||||
|
if (event->state & GDK_SHIFT_MASK) {
|
||||||
|
Gtk::ComboBox::on_scroll_event(event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ... otherwise the scroll event is sent back to an upper level
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
MySpinButton::MySpinButton () {
|
||||||
|
set_size_request(50, -1);
|
||||||
|
Gtk::Border border;
|
||||||
|
border.bottom = 0;
|
||||||
|
border.top = 0;
|
||||||
|
border.left = 0;
|
||||||
|
border.right = 0;
|
||||||
|
set_inner_border(border);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MySpinButton::on_scroll_event (GdkEventScroll* event) {
|
||||||
|
|
||||||
|
// If Shift is pressed, the widget is modified
|
||||||
|
if (event->state & GDK_SHIFT_MASK) {
|
||||||
|
Gtk::SpinButton::on_scroll_event(event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ... otherwise the scroll event is sent back to an upper level
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MyHScale::on_scroll_event (GdkEventScroll* event) {
|
||||||
|
|
||||||
|
// If Shift is pressed, the widget is modified
|
||||||
|
if (event->state & GDK_SHIFT_MASK) {
|
||||||
|
Gtk::HScale::on_scroll_event(event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ... otherwise the scroll event is sent back to an upper level
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyFileChooserButton::MyFileChooserButton (const Glib::ustring& title, Gtk::FileChooserAction action) : Gtk::FileChooserButton(title, action) {
|
||||||
|
set_size_request(20, -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
// For an unknown reason (a bug ?), it doesn't work when action = FILE_CHOOSER_ACTION_SELECT_FOLDER !
|
||||||
|
bool MyFileChooserButton::on_scroll_event (GdkEventScroll* event) {
|
||||||
|
|
||||||
|
// If Shift is pressed, the widget is modified
|
||||||
|
if (event->state & GDK_SHIFT_MASK) {
|
||||||
|
Gtk::FileChooserButton::on_scroll_event(event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ... otherwise the scroll event is sent back to an upper level
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -71,4 +71,42 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MyComboBox : public Gtk::ComboBox {
|
||||||
|
|
||||||
|
bool on_scroll_event (GdkEventScroll* event);
|
||||||
|
|
||||||
|
public:
|
||||||
|
MyComboBox ();
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyComboBoxText : public Gtk::ComboBoxText {
|
||||||
|
|
||||||
|
bool on_scroll_event (GdkEventScroll* event);
|
||||||
|
|
||||||
|
public:
|
||||||
|
MyComboBoxText ();
|
||||||
|
};
|
||||||
|
|
||||||
|
class MySpinButton : public Gtk::SpinButton {
|
||||||
|
|
||||||
|
bool on_scroll_event (GdkEventScroll* event);
|
||||||
|
|
||||||
|
public:
|
||||||
|
MySpinButton ();
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyHScale : public Gtk::HScale {
|
||||||
|
|
||||||
|
bool on_scroll_event (GdkEventScroll* event);
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyFileChooserButton : public Gtk::FileChooserButton {
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool on_scroll_event (GdkEventScroll* event);
|
||||||
|
|
||||||
|
public:
|
||||||
|
MyFileChooserButton (const Glib::ustring& title, Gtk::FileChooserAction action=Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +28,7 @@ HLRecovery::HLRecovery () : Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
enabled->set_active (false);
|
enabled->set_active (false);
|
||||||
pack_start (*enabled);
|
pack_start (*enabled);
|
||||||
|
|
||||||
method = Gtk::manage (new Gtk::ComboBoxText ());
|
method = Gtk::manage (new MyComboBoxText ());
|
||||||
method->append_text (M("TP_HLREC_LUMINANCE"));
|
method->append_text (M("TP_HLREC_LUMINANCE"));
|
||||||
method->append_text (M("TP_HLREC_CIELAB"));
|
method->append_text (M("TP_HLREC_CIELAB"));
|
||||||
method->append_text (M("TP_HLREC_COLOR"));
|
method->append_text (M("TP_HLREC_COLOR"));
|
||||||
|
@ -21,12 +21,13 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class HLRecovery : public Gtk::VBox, public FoldableToolPanel {
|
class HLRecovery : public Gtk::VBox, public FoldableToolPanel {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::CheckButton* enabled;
|
Gtk::CheckButton* enabled;
|
||||||
Gtk::ComboBoxText* method;
|
MyComboBoxText* method;
|
||||||
sigc::connection methconn;
|
sigc::connection methconn;
|
||||||
sigc::connection enaconn;
|
sigc::connection enaconn;
|
||||||
bool lastEnabled;
|
bool lastEnabled;
|
||||||
|
@ -35,7 +35,6 @@ class HSVEqualizer : public Gtk::VBox, public AdjusterListener, public FoldableT
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
Gtk::CheckButton * enabled;
|
Gtk::CheckButton * enabled;
|
||||||
Gtk::ComboBoxText* hsvchannel;
|
|
||||||
|
|
||||||
CurveEditorGroup* curveEditorG;
|
CurveEditorGroup* curveEditorG;
|
||||||
FlatCurveEditor* hshape;
|
FlatCurveEditor* hshape;
|
||||||
|
@ -33,7 +33,7 @@ ICMPanel::ICMPanel () : Gtk::VBox(), FoldableToolPanel(this), iunchanged(NULL),
|
|||||||
|
|
||||||
// set_border_width (4);
|
// set_border_width (4);
|
||||||
|
|
||||||
ipDialog = Gtk::manage (new Gtk::FileChooserButton (M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
ipDialog = Gtk::manage (new MyFileChooserButton (M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||||
|
|
||||||
Gtk::Label* ilab = Gtk::manage (new Gtk::Label ());
|
Gtk::Label* ilab = Gtk::manage (new Gtk::Label ());
|
||||||
ilab->set_alignment (0.0, 0.5);
|
ilab->set_alignment (0.0, 0.5);
|
||||||
@ -86,7 +86,7 @@ ICMPanel::ICMPanel () : Gtk::VBox(), FoldableToolPanel(this), iunchanged(NULL),
|
|||||||
wlab->set_markup (Glib::ustring("<b>") + M("TP_ICM_WORKINGPROFILE") + "</b>");
|
wlab->set_markup (Glib::ustring("<b>") + M("TP_ICM_WORKINGPROFILE") + "</b>");
|
||||||
|
|
||||||
pack_start (*wlab, Gtk::PACK_SHRINK, 4);
|
pack_start (*wlab, Gtk::PACK_SHRINK, 4);
|
||||||
wnames = Gtk::manage (new Gtk::ComboBoxText ());
|
wnames = Gtk::manage (new MyComboBoxText ());
|
||||||
pack_start (*wnames, Gtk::PACK_SHRINK, 4);
|
pack_start (*wnames, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
Gtk::HSeparator* hsep2 = Gtk::manage (new Gtk::HSeparator ());
|
Gtk::HSeparator* hsep2 = Gtk::manage (new Gtk::HSeparator ());
|
||||||
@ -97,7 +97,7 @@ ICMPanel::ICMPanel () : Gtk::VBox(), FoldableToolPanel(this), iunchanged(NULL),
|
|||||||
olab->set_markup (Glib::ustring("<b>") + M("TP_ICM_OUTPUTPROFILE") + "</b>");
|
olab->set_markup (Glib::ustring("<b>") + M("TP_ICM_OUTPUTPROFILE") + "</b>");
|
||||||
|
|
||||||
pack_start (*olab, Gtk::PACK_SHRINK, 4);
|
pack_start (*olab, Gtk::PACK_SHRINK, 4);
|
||||||
onames = Gtk::manage (new Gtk::ComboBoxText ());
|
onames = Gtk::manage (new MyComboBoxText ());
|
||||||
pack_start (*onames, Gtk::PACK_SHRINK, 4);
|
pack_start (*onames, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
std::vector<std::string> wpnames = rtengine::getWorkingProfiles ();
|
std::vector<std::string> wpnames = rtengine::getWorkingProfiles ();
|
||||||
@ -113,7 +113,7 @@ ICMPanel::ICMPanel () : Gtk::VBox(), FoldableToolPanel(this), iunchanged(NULL),
|
|||||||
galab->set_markup (Glib::ustring("<b>") + M("TP_GAMMA_OUTPUT") + "</b>");
|
galab->set_markup (Glib::ustring("<b>") + M("TP_GAMMA_OUTPUT") + "</b>");
|
||||||
|
|
||||||
pack_start (*galab, Gtk::PACK_SHRINK, 4);
|
pack_start (*galab, Gtk::PACK_SHRINK, 4);
|
||||||
wgamma = Gtk::manage (new Gtk::ComboBoxText ());
|
wgamma = Gtk::manage (new MyComboBoxText ());
|
||||||
pack_start (*wgamma, Gtk::PACK_SHRINK, 4);
|
pack_start (*wgamma, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
Gtk::HSeparator* hsep23 = Gtk::manage (new Gtk::HSeparator ());
|
Gtk::HSeparator* hsep23 = Gtk::manage (new Gtk::HSeparator ());
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
|
||||||
@ -48,14 +49,14 @@ class ICMPanel : public Gtk::VBox, public AdjusterListener, public FoldableToolP
|
|||||||
Gtk::RadioButton* ifromfile;
|
Gtk::RadioButton* ifromfile;
|
||||||
Gtk::CheckButton* igamma;
|
Gtk::CheckButton* igamma;
|
||||||
Gtk::CheckButton* ckbBlendCMSMatrix;
|
Gtk::CheckButton* ckbBlendCMSMatrix;
|
||||||
Gtk::ComboBoxText* wnames;
|
MyComboBoxText* wnames;
|
||||||
Gtk::ComboBoxText* wgamma;
|
MyComboBoxText* wgamma;
|
||||||
|
|
||||||
Gtk::ComboBoxText* onames;
|
MyComboBoxText* onames;
|
||||||
Gtk::RadioButton* ofromdir;
|
Gtk::RadioButton* ofromdir;
|
||||||
Gtk::RadioButton* ofromfile;
|
Gtk::RadioButton* ofromfile;
|
||||||
Gtk::RadioButton* iunchanged;
|
Gtk::RadioButton* iunchanged;
|
||||||
Gtk::FileChooserButton* ipDialog;
|
MyFileChooserButton* ipDialog;
|
||||||
Gtk::RadioButton::Group opts;
|
Gtk::RadioButton::Group opts;
|
||||||
Gtk::Button* saveRef;
|
Gtk::Button* saveRef;
|
||||||
sigc::connection ipc;
|
sigc::connection ipc;
|
||||||
|
@ -220,11 +220,16 @@ bool ImageArea::on_scroll_event (GdkEventScroll* event) {
|
|||||||
|
|
||||||
CropWindow* cw = getCropWindow (event->x, event->y);
|
CropWindow* cw = getCropWindow (event->x, event->y);
|
||||||
if (cw) {
|
if (cw) {
|
||||||
if (event->direction==GDK_SCROLL_UP)
|
int newCenterX = (int)event->x;
|
||||||
cw->zoomIn ();
|
int newCenterY = (int)event->y;
|
||||||
else
|
if (event->direction==GDK_SCROLL_UP && !cw->isMaxZoom()) {
|
||||||
cw->zoomOut ();
|
cw->findCenter (1, newCenterX, newCenterY);
|
||||||
return true;
|
cw->zoomIn (true, newCenterX, newCenterY);
|
||||||
|
}
|
||||||
|
else if (!cw->isMinZoom()) {
|
||||||
|
cw->findCenter (-1, newCenterX, newCenterY);
|
||||||
|
cw->zoomOut (true, newCenterX, newCenterY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class IPTCPanel : public Gtk::VBox, public ToolPanel {
|
class IPTCPanel : public Gtk::VBox, public ToolPanel {
|
||||||
|
|
||||||
|
@ -290,26 +290,6 @@ void LCurve::adjusterChanged (Adjuster* a, double newval) {
|
|||||||
listener->panelChanged (EvLSatLimit, costr);
|
listener->panelChanged (EvLSatLimit, costr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//attempt to hide unused channels
|
|
||||||
/*void LCurve::channel_changed () {
|
|
||||||
|
|
||||||
removeIfThere (this, lcurve, false);
|
|
||||||
removeIfThere (this, acurve, false);
|
|
||||||
removeIfThere (this, bcurve, false);
|
|
||||||
|
|
||||||
if (channel->get_active_row_number()==0)
|
|
||||||
pack_start (*lcurve);
|
|
||||||
else if (channel->get_active_row_number()==1)
|
|
||||||
pack_start (*acurve);
|
|
||||||
else if (method->get_active_row_number()==2)
|
|
||||||
pack_start (*bcurve);
|
|
||||||
|
|
||||||
|
|
||||||
if (listener && enabled->get_active ())
|
|
||||||
listener->panelChanged (EvLabCurvetype, channel->get_active_text ());
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void LCurve::colorForValue (double valX, double valY) {
|
void LCurve::colorForValue (double valX, double valY) {
|
||||||
|
|
||||||
CurveEditor* ce = curveEditorG->getDisplayedCurve();
|
CurveEditor* ce = curveEditorG->getDisplayedCurve();
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
class LCurve : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public CurveListener, public ColorProvider {
|
class LCurve : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public CurveListener, public ColorProvider {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::ComboBoxText* channel;
|
|
||||||
|
|
||||||
CurveEditorGroup* curveEditorG;
|
CurveEditorGroup* curveEditorG;
|
||||||
Adjuster* brightness;
|
Adjuster* brightness;
|
||||||
Adjuster* contrast;
|
Adjuster* contrast;
|
||||||
|
@ -32,7 +32,7 @@ ProfilePanel::ProfilePanel () {
|
|||||||
|
|
||||||
tpc = NULL;
|
tpc = NULL;
|
||||||
|
|
||||||
profiles = Gtk::manage (new Gtk::ComboBoxText ());
|
profiles = Gtk::manage (new MyComboBoxText ());
|
||||||
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
||||||
hbox->show ();
|
hbox->show ();
|
||||||
// pack_start (*profiles, Gtk::PACK_SHRINK, 4);
|
// pack_start (*profiles, Gtk::PACK_SHRINK, 4);
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <rtengine.h>
|
#include <rtengine.h>
|
||||||
#include <pparamschangelistener.h>
|
#include <pparamschangelistener.h>
|
||||||
#include <profilechangelistener.h>
|
#include <profilechangelistener.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class ProfilePanel : public Gtk::VBox, public PParamsChangeListener {
|
class ProfilePanel : public Gtk::VBox, public PParamsChangeListener {
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ class ProfilePanel : public Gtk::VBox, public PParamsChangeListener {
|
|||||||
Gtk::Button* load;
|
Gtk::Button* load;
|
||||||
Gtk::Button* copy;
|
Gtk::Button* copy;
|
||||||
Gtk::Button* paste;
|
Gtk::Button* paste;
|
||||||
Gtk::ComboBoxText* profiles;
|
MyComboBoxText* profiles;
|
||||||
std::vector<Glib::ustring> pparams;
|
std::vector<Glib::ustring> pparams;
|
||||||
rtengine::procparams::ProcParams* custom;
|
rtengine::procparams::ProcParams* custom;
|
||||||
rtengine::procparams::ProcParams* lastsaved;
|
rtengine::procparams::ProcParams* lastsaved;
|
||||||
|
@ -26,7 +26,7 @@ RawProcess::RawProcess () : Gtk::VBox(), FoldableToolPanel(this)
|
|||||||
{
|
{
|
||||||
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
||||||
hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") +": ")),Gtk::PACK_SHRINK, 4);
|
hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") +": ")),Gtk::PACK_SHRINK, 4);
|
||||||
dmethod = Gtk::manage (new Gtk::ComboBoxText ());
|
dmethod = Gtk::manage (new MyComboBoxText ());
|
||||||
for( size_t i=0; i< procparams::RAWParams::numMethods;i++)
|
for( size_t i=0; i< procparams::RAWParams::numMethods;i++)
|
||||||
dmethod->append_text(procparams::RAWParams::methodstring[i]);
|
dmethod->append_text(procparams::RAWParams::methodstring[i]);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +29,7 @@ class RawProcess : public Gtk::VBox, public AdjusterListener, public FoldableToo
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Gtk::ComboBoxText* dmethod;
|
MyComboBoxText* dmethod;
|
||||||
Gtk::Label* methodl;
|
Gtk::Label* methodl;
|
||||||
Adjuster* ccSteps;
|
Adjuster* ccSteps;
|
||||||
Gtk::VBox *dcbOptions;
|
Gtk::VBox *dcbOptions;
|
||||||
|
@ -19,9 +19,11 @@
|
|||||||
#include <recentbrowser.h>
|
#include <recentbrowser.h>
|
||||||
#include <multilangmgr.h>
|
#include <multilangmgr.h>
|
||||||
|
|
||||||
|
using namespace rtengine;
|
||||||
|
|
||||||
RecentBrowser::RecentBrowser () : listener (NULL) {
|
RecentBrowser::RecentBrowser () : listener (NULL) {
|
||||||
|
|
||||||
recentDirs = Gtk::manage (new Gtk::ComboBoxText ());
|
recentDirs = Gtk::manage (new MyComboBoxText ());
|
||||||
|
|
||||||
Gtk::Frame* frame = Gtk::manage (new Gtk::Frame (M("MAIN_FRAME_RECENT")));
|
Gtk::Frame* frame = Gtk::manage (new Gtk::Frame (M("MAIN_FRAME_RECENT")));
|
||||||
frame->add (*recentDirs);
|
frame->add (*recentDirs);
|
||||||
|
@ -23,10 +23,11 @@
|
|||||||
#include <dirbrowserremoteinterface.h>
|
#include <dirbrowserremoteinterface.h>
|
||||||
#include <dirselectionlistener.h>
|
#include <dirselectionlistener.h>
|
||||||
#include <multilangmgr.h>
|
#include <multilangmgr.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class RecentBrowser : public Gtk::VBox, public DirSelectionListener {
|
class RecentBrowser : public Gtk::VBox, public DirSelectionListener {
|
||||||
|
|
||||||
Gtk::ComboBoxText* recentDirs;
|
Gtk::ComboBoxText* recentDirs;
|
||||||
sigc::connection conn;
|
sigc::connection conn;
|
||||||
DirBrowserRemoteInterface* listener;
|
DirBrowserRemoteInterface* listener;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ RenameDialog::RenameDialog (Gtk::Window* parent)
|
|||||||
|
|
||||||
Gtk::HBox* tbox = Gtk::manage (new Gtk::HBox());
|
Gtk::HBox* tbox = Gtk::manage (new Gtk::HBox());
|
||||||
useTmpl = Gtk::manage (new Gtk::CheckButton (M("FILEBROWSER_USETEMPLATE")));
|
useTmpl = Gtk::manage (new Gtk::CheckButton (M("FILEBROWSER_USETEMPLATE")));
|
||||||
templates = Gtk::manage (new Gtk::ComboBox ());
|
templates = Gtk::manage (new MyComboBox ());
|
||||||
templateModel = Gtk::ListStore::create (templateColumns);
|
templateModel = Gtk::ListStore::create (templateColumns);
|
||||||
templates->set_model (templateModel);
|
templates->set_model (templateModel);
|
||||||
templates->pack_start (templateColumns.tmplName);
|
templates->pack_start (templateColumns.tmplName);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <cacheimagedata.h>
|
#include <cacheimagedata.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
#define RESPONSE_ALL 100
|
#define RESPONSE_ALL 100
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ class RenameDialog : public Gtk::Dialog {
|
|||||||
Gtk::Label* oldName;
|
Gtk::Label* oldName;
|
||||||
Gtk::Entry* newName;
|
Gtk::Entry* newName;
|
||||||
Gtk::CheckButton* useTmpl;
|
Gtk::CheckButton* useTmpl;
|
||||||
Gtk::ComboBox* templates;
|
MyComboBox* templates;
|
||||||
Gtk::Button* all;
|
Gtk::Button* all;
|
||||||
const CacheImageData* imageData;
|
const CacheImageData* imageData;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ Resize::Resize () : Gtk::VBox(), FoldableToolPanel(this), maxw(100000), maxh(100
|
|||||||
|
|
||||||
Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2));
|
Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2));
|
||||||
|
|
||||||
appliesTo = Gtk::manage (new Gtk::ComboBoxText ());
|
appliesTo = Gtk::manage (new MyComboBoxText ());
|
||||||
appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA"));
|
appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA"));
|
||||||
appliesTo->append_text (M("TP_RESIZE_FULLIMAGE"));
|
appliesTo->append_text (M("TP_RESIZE_FULLIMAGE"));
|
||||||
appliesTo->set_active (0);
|
appliesTo->set_active (0);
|
||||||
@ -42,7 +42,7 @@ Resize::Resize () : Gtk::VBox(), FoldableToolPanel(this), maxw(100000), maxh(100
|
|||||||
combos->attach (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"))), 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
|
combos->attach (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"))), 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
|
||||||
combos->attach (*appliesTo, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
|
combos->attach (*appliesTo, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
|
||||||
|
|
||||||
method = Gtk::manage (new Gtk::ComboBoxText ());
|
method = Gtk::manage (new MyComboBoxText ());
|
||||||
method->append_text (M("TP_RESIZE_NEAREST"));
|
method->append_text (M("TP_RESIZE_NEAREST"));
|
||||||
method->append_text (M("TP_RESIZE_BILINEAR"));
|
method->append_text (M("TP_RESIZE_BILINEAR"));
|
||||||
method->append_text (M("TP_RESIZE_BICUBIC"));
|
method->append_text (M("TP_RESIZE_BICUBIC"));
|
||||||
@ -56,7 +56,7 @@ Resize::Resize () : Gtk::VBox(), FoldableToolPanel(this), maxw(100000), maxh(100
|
|||||||
combos->attach (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"))), 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
|
combos->attach (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"))), 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
|
||||||
combos->attach (*method, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
|
combos->attach (*method, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
|
||||||
|
|
||||||
spec = Gtk::manage (new Gtk::ComboBoxText ());
|
spec = Gtk::manage (new MyComboBoxText ());
|
||||||
spec->append_text (M("TP_RESIZE_SCALE"));
|
spec->append_text (M("TP_RESIZE_SCALE"));
|
||||||
spec->append_text (M("TP_RESIZE_WIDTH"));
|
spec->append_text (M("TP_RESIZE_WIDTH"));
|
||||||
spec->append_text (M("TP_RESIZE_HEIGHT"));
|
spec->append_text (M("TP_RESIZE_HEIGHT"));
|
||||||
@ -78,8 +78,8 @@ Resize::Resize () : Gtk::VBox(), FoldableToolPanel(this), maxw(100000), maxh(100
|
|||||||
Gtk::HBox* sbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* sbox = Gtk::manage (new Gtk::HBox ());
|
||||||
Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ());
|
||||||
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
||||||
w = Gtk::manage (new Gtk::SpinButton ());
|
w = Gtk::manage (new MySpinButton ());
|
||||||
h = Gtk::manage (new Gtk::SpinButton ());
|
h = Gtk::manage (new MySpinButton ());
|
||||||
wbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_W"))), Gtk::PACK_SHRINK, 4);
|
wbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_W"))), Gtk::PACK_SHRINK, 4);
|
||||||
wbox->pack_start (*w);
|
wbox->pack_start (*w);
|
||||||
hbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_H"))), Gtk::PACK_SHRINK, 4);
|
hbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_H"))), Gtk::PACK_SHRINK, 4);
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class Resize : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public rtengine::SizeListener {
|
class Resize : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public rtengine::SizeListener {
|
||||||
|
|
||||||
@ -29,11 +31,11 @@ class Resize : public Gtk::VBox, public AdjusterListener, public FoldableToolPan
|
|||||||
Gtk::CheckButton* enabled;
|
Gtk::CheckButton* enabled;
|
||||||
Adjuster* scale;
|
Adjuster* scale;
|
||||||
Gtk::VBox* sizeBox;
|
Gtk::VBox* sizeBox;
|
||||||
Gtk::ComboBoxText* appliesTo;
|
MyComboBoxText* appliesTo;
|
||||||
Gtk::ComboBoxText* method;
|
MyComboBoxText* method;
|
||||||
Gtk::ComboBoxText* spec;
|
MyComboBoxText* spec;
|
||||||
Gtk::SpinButton* w;
|
MySpinButton* w;
|
||||||
Gtk::SpinButton* h;
|
MySpinButton* h;
|
||||||
int maxw, maxh;
|
int maxw, maxh;
|
||||||
int cropw, croph;
|
int cropw, croph;
|
||||||
sigc::connection sconn, aconn, wconn, hconn, enaConn;
|
sigc::connection sconn, aconn, wconn, hconn, enaConn;
|
||||||
|
@ -35,7 +35,7 @@ SaveFormatPanel::SaveFormatPanel () : listener (NULL) {
|
|||||||
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
||||||
Gtk::Label* flab = Gtk::manage (new Gtk::Label (M("SAVEDLG_FILEFORMAT")+":"));
|
Gtk::Label* flab = Gtk::manage (new Gtk::Label (M("SAVEDLG_FILEFORMAT")+":"));
|
||||||
hb1->pack_start (*flab, Gtk::PACK_SHRINK,4);
|
hb1->pack_start (*flab, Gtk::PACK_SHRINK,4);
|
||||||
format = Gtk::manage (new Gtk::ComboBoxText ());
|
format = Gtk::manage (new MyComboBoxText ());
|
||||||
format->append_text ("JPEG (8 bit)");
|
format->append_text ("JPEG (8 bit)");
|
||||||
format->append_text ("TIFF (8 bit)");
|
format->append_text ("TIFF (8 bit)");
|
||||||
format->append_text ("TIFF (16 bit)");
|
format->append_text ("TIFF (16 bit)");
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
#include <options.h>
|
#include <options.h>
|
||||||
|
|
||||||
class FormatChangeListener {
|
class FormatChangeListener {
|
||||||
@ -36,7 +37,7 @@ class SaveFormatPanel : public Gtk::VBox, public AdjusterListener {
|
|||||||
Adjuster* jpegqual;
|
Adjuster* jpegqual;
|
||||||
Adjuster* pngcompr;
|
Adjuster* pngcompr;
|
||||||
Gtk::CheckButton* tiffuncompressed;
|
Gtk::CheckButton* tiffuncompressed;
|
||||||
Gtk::ComboBoxText* format;
|
MyComboBoxText* format;
|
||||||
Gtk::VBox* formatopts;
|
Gtk::VBox* formatopts;
|
||||||
int oformat;
|
int oformat;
|
||||||
FormatChangeListener* listener;
|
FormatChangeListener* listener;
|
||||||
|
@ -39,7 +39,7 @@ Sharpening::Sharpening () : Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
hb->show ();
|
hb->show ();
|
||||||
Gtk::Label* ml = Gtk::manage (new Gtk::Label (M("TP_SHARPENING_METHOD")+":"));
|
Gtk::Label* ml = Gtk::manage (new Gtk::Label (M("TP_SHARPENING_METHOD")+":"));
|
||||||
ml->show ();
|
ml->show ();
|
||||||
method = Gtk::manage (new Gtk::ComboBoxText ());
|
method = Gtk::manage (new MyComboBoxText ());
|
||||||
method->append_text (M("TP_SHARPENING_USM"));
|
method->append_text (M("TP_SHARPENING_USM"));
|
||||||
method->append_text (M("TP_SHARPENING_RLD"));
|
method->append_text (M("TP_SHARPENING_RLD"));
|
||||||
method->show ();
|
method->show ();
|
||||||
|
@ -21,12 +21,13 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
|
|
||||||
class Sharpening : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
class Sharpening : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::ComboBoxText* method;
|
MyComboBoxText* method;
|
||||||
Adjuster* dradius;
|
Adjuster* dradius;
|
||||||
Adjuster* damount;
|
Adjuster* damount;
|
||||||
Adjuster* ddamping;
|
Adjuster* ddamping;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
#include <sigc++/class_slot.h>
|
#include <sigc++/class_slot.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <guiutils.h>
|
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
@ -34,7 +33,7 @@ ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||||
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
||||||
|
|
||||||
sclip = Gtk::manage (new Gtk::SpinButton ());
|
sclip = Gtk::manage (new MySpinButton ());
|
||||||
sclip->set_range (0.0, 0.9999);
|
sclip->set_range (0.0, 0.9999);
|
||||||
sclip->set_increments (0.001, 0.01);
|
sclip->set_increments (0.001, 0.01);
|
||||||
sclip->set_value (0.002);
|
sclip->set_value (0.002);
|
||||||
|
@ -25,13 +25,14 @@
|
|||||||
#include <curveeditor.h>
|
#include <curveeditor.h>
|
||||||
#include <curveeditorgroup.h>
|
#include <curveeditorgroup.h>
|
||||||
#include <mycurve.h>
|
#include <mycurve.h>
|
||||||
|
#include <guiutils.h>
|
||||||
|
|
||||||
class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoExpListener, public CurveListener {
|
class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoExpListener, public CurveListener {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::HBox* abox;
|
Gtk::HBox* abox;
|
||||||
Gtk::ToggleButton* autolevels;
|
Gtk::ToggleButton* autolevels;
|
||||||
Gtk::SpinButton* sclip;
|
MySpinButton* sclip;
|
||||||
Adjuster* expcomp;
|
Adjuster* expcomp;
|
||||||
Adjuster* brightness;
|
Adjuster* brightness;
|
||||||
Adjuster* black;
|
Adjuster* black;
|
||||||
|
@ -35,7 +35,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
|
|||||||
hbox->show ();
|
hbox->show ();
|
||||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
|
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
|
||||||
lab->show ();
|
lab->show ();
|
||||||
method = Gtk::manage (new Gtk::ComboBoxText ());
|
method = Gtk::manage (new MyComboBoxText ());
|
||||||
method->show ();
|
method->show ();
|
||||||
method->append_text (M("TP_WBALANCE_CAMERA"));
|
method->append_text (M("TP_WBALANCE_CAMERA"));
|
||||||
method->append_text (M("TP_WBALANCE_AUTO"));
|
method->append_text (M("TP_WBALANCE_AUTO"));
|
||||||
@ -60,7 +60,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
|
|||||||
Gtk::Label* slab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_SIZE")));
|
Gtk::Label* slab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_SIZE")));
|
||||||
slab->show ();
|
slab->show ();
|
||||||
|
|
||||||
spotsize = Gtk::manage (new Gtk::ComboBoxText ());
|
spotsize = Gtk::manage (new MyComboBoxText ());
|
||||||
spotsize->show ();
|
spotsize->show ();
|
||||||
spotsize->append_text ("2");
|
spotsize->append_text ("2");
|
||||||
spotsize->append_text ("4");
|
spotsize->append_text ("4");
|
||||||
@ -69,7 +69,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
|
|||||||
spotsize->append_text ("32");
|
spotsize->append_text ("32");
|
||||||
spotsize->set_active (2);
|
spotsize->set_active (2);
|
||||||
|
|
||||||
spotbox->pack_end (*spotsize, Gtk::PACK_SHRINK, 4);
|
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||||
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4);
|
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
pack_start (*spotbox, Gtk::PACK_SHRINK, 4);
|
pack_start (*spotbox, Gtk::PACK_SHRINK, 4);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <toolpanel.h>
|
#include <toolpanel.h>
|
||||||
#include <adjuster.h>
|
#include <adjuster.h>
|
||||||
|
#include <guiutils.h>
|
||||||
#include <wbprovider.h>
|
#include <wbprovider.h>
|
||||||
|
|
||||||
class SpotWBListener {
|
class SpotWBListener {
|
||||||
@ -33,8 +34,8 @@ class SpotWBListener {
|
|||||||
class WhiteBalance : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
class WhiteBalance : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::ComboBoxText* method;
|
MyComboBoxText* method;
|
||||||
Gtk::ComboBoxText* spotsize;
|
MyComboBoxText* spotsize;
|
||||||
Adjuster* temp;
|
Adjuster* temp;
|
||||||
Adjuster* green;
|
Adjuster* green;
|
||||||
Gtk::Button* spotbutton;
|
Gtk::Button* spotbutton;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user