-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file dialog_setup.h
** \brief Template Header
**
-** $Id: dialog_setup.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
+** $Id$
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
** \endlegal
*/
/* ========================================================================= */
/* === S T A R T =========================================================== */
-#ifndef __SINFG_STUDIO_DIALOG_SETUP_H
-#define __SINFG_STUDIO_DIALOG_SETUP_H
+#ifndef __SYNFIG_STUDIO_DIALOG_SETUP_H
+#define __SYNFIG_STUDIO_DIALOG_SETUP_H
/* === H E A D E R S ======================================================= */
#include <gtkmm/drawingarea.h>
#include <gtkmm/optionmenu.h>
#include <gtkmm/checkbutton.h>
+#include <gtkmm/widget_time.h>
-#include <sinfg/gamma.h>
-#include <sinfg/time.h>
+#include <synfig/gamma.h>
+#include <synfig/time.h>
#include <algorithm>
/* === M A C R O S ========================================================= */
float r_F32_to_F32(float x)const { float f((pow(x,gamma_r)*std::min(red_blue_level,1.0f)*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
float g_F32_to_F32(float x)const { float f((pow(x,gamma_g)*sqrt(std::min(2.0f-red_blue_level,red_blue_level))*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
float b_F32_to_F32(float x)const { float f((pow(x,gamma_b)*std::min(2.0f-red_blue_level,1.0f)*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
-
+
public:
-
+
void refresh();
-
+
void set_gamma_r(float x) { gamma_r=x; }
void set_gamma_g(float x) { gamma_g=x; };
void set_gamma_b(float x) { gamma_b=x; };
float get_gamma_b()const { return gamma_b; }
float get_black_level()const { return black_level; }
float get_red_blue_level()const { return red_blue_level; }
-
+
GammaPattern();
-
+
~GammaPattern();
bool redraw(GdkEventExpose*bleh=NULL);
sigc::signal<void> signal_value_changed_;
public:
-
+
BlackLevelSelector();
-
+
~BlackLevelSelector();
sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
-
+
void set_value(float x) { level=x; queue_draw(); }
- const float &get_value()const { return level; }
+ const float &get_value()const { return level; }
bool redraw(GdkEventExpose*bleh=NULL);
sigc::signal<void> signal_value_changed_;
public:
-
+
RedBlueLevelSelector();
-
+
~RedBlueLevelSelector();
sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
-
+
void set_value(float x) { level=x; queue_draw(); }
- const float &get_value()const { return level; }
+ const float &get_value()const { return level; }
bool redraw(GdkEventExpose*bleh=NULL);
class Dialog_Setup : public Gtk::Dialog
{
-
+
void on_ok_pressed();
void on_apply_pressed();
void on_black_level_change();
void on_red_blue_level_change();
- GammaPattern gamma_pattern;
+ GammaPattern gamma_pattern;
BlackLevelSelector black_level_selector;
RedBlueLevelSelector red_blue_level_selector;
Gtk::OptionMenu timestamp_optionmenu;
-
+
Gtk::Adjustment adj_gamma_r;
Gtk::Adjustment adj_gamma_g;
Gtk::Adjustment adj_gamma_b;
Gtk::Adjustment adj_undo_depth;
Gtk::CheckButton toggle_use_colorspace_gamma;
+ Gtk::CheckButton toggle_single_threaded;
+
+ synfig::Time::Format time_format;
- sinfg::Time::Format time_format;
-
Gtk::Menu *timestamp_menu;
Widget_Enum *widget_enum;
+
+ Widget_Time auto_backup_interval;
+
+ Gtk::CheckButton toggle_restrict_radius_ducks;
public:
- void set_time_format(sinfg::Time::Format time_format);
+ void set_time_format(synfig::Time::Format time_format);
+
+ const synfig::Time::Format& get_time_format()const { return time_format; }
- const sinfg::Time::Format& get_time_format()const { return time_format; }
-
Dialog_Setup();
~Dialog_Setup();