2 * This file is part of RawTherapee.
4 * Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
6 * RawTherapee is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * RawTherapee is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
19 #include <indclippedpanel.h>
21 #include <multilangmgr.h>
22 #include <imagearea.h>
25 IndicateClippedPanel::IndicateClippedPanel (ImageArea
* ia
) : imageArea(ia
) {
27 indclippedh
= Gtk::manage (new Gtk::ToggleButton ());
28 indclippedh
->set_relief(Gtk::RELIEF_NONE
);
29 indclippedh
->add (*Gtk::manage (new Gtk::Image (GET_DATA_PATH(argv0
)+"/images/warnhl.png")));
30 indclippedh
->set_tooltip_text (M("MAIN_TOOLTIP_INDCLIPPEDH"));
32 indclippeds
= Gtk::manage (new Gtk::ToggleButton ());
33 indclippeds
->set_relief(Gtk::RELIEF_NONE
);
34 indclippeds
->add (*Gtk::manage (new Gtk::Image (GET_DATA_PATH(argv0
)+"/images/warnsh.png")));
35 indclippeds
->set_tooltip_text (M("MAIN_TOOLTIP_INDCLIPPEDS"));
37 indclippedh
->set_active (options
.showClippedHighlights
);
38 indclippeds
->set_active (options
.showClippedShadows
);
40 pack_start (*indclippedh
, Gtk::PACK_SHRINK
, 0);
41 pack_start (*indclippeds
, Gtk::PACK_SHRINK
, 0);
43 indclippedh
->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled
) );
44 indclippeds
->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled
) );
49 void IndicateClippedPanel::buttonToggled () {
51 imageArea
->queue_draw ();