27 #ifndef __SYNFIG_STUDIO_DIALOG_SETUP_H
28 #define __SYNFIG_STUDIO_DIALOG_SETUP_H
33 #include <gtkmm/adjustment.h>
34 #include <gtkmm/table.h>
35 #include <gtkmm/button.h>
36 #include <gtkmm/dialog.h>
37 #include <gtkmm/drawingarea.h>
38 #include <gtkmm/comboboxtext.h>
39 #include <gtkmm/checkbutton.h>
41 #include <gtkmm/tooltip.h>
42 #include <gtkmm/comboboxtext.h>
43 #include <gtkmm/spinbutton.h>
45 #include <synfig/gamma.h>
46 #include <synfig/time.h>
52 #ifndef DEFAULT_PREDEFINED_SIZE
53 #define DEFAULT_PREDEFINED_SIZE _("Custom Size")
55 #ifndef DEFAULT_PREDEFINED_FPS
56 #define DEFAULT_PREDEFINED_FPS _("Custom fps")
63 namespace Gtk {
class Menu; };
77 Gdk::Color black[4],white[4],gray50[4],gray25[4];
79 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; }
80 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; }
81 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; }
103 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
110 sigc::signal<void> signal_value_changed_;
124 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
133 sigc::signal<void> signal_value_changed_;
147 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
157 void on_ok_pressed();
158 void on_apply_pressed();
159 void on_restore_pressed();
161 void on_gamma_r_change();
162 void on_gamma_g_change();
163 void on_gamma_b_change();
164 void on_black_level_change();
165 void on_red_blue_level_change();
166 void on_size_template_combo_change();
167 void on_fps_template_combo_change();
168 void on_ui_language_combo_change();
169 void on_time_format_changed();
174 Gtk::ComboBoxText timestamp_comboboxtext;
175 std::map<std::string, synfig::Time::Format> time_formats;
177 Glib::RefPtr<Gtk::Adjustment> adj_gamma_r;
178 Glib::RefPtr<Gtk::Adjustment> adj_gamma_g;
179 Glib::RefPtr<Gtk::Adjustment> adj_gamma_b;
181 Glib::RefPtr<Gtk::Adjustment> adj_recent_files;
182 Glib::RefPtr<Gtk::Adjustment> adj_undo_depth;
184 Gtk::CheckButton toggle_use_colorspace_gamma;
185 #ifdef SINGLE_THREADED
186 Gtk::CheckButton toggle_single_threaded;
189 synfig::Time::Format time_format;
191 Gtk::Menu *timestamp_menu;
196 Gtk::CheckButton toggle_restrict_radius_ducks;
197 Gtk::CheckButton toggle_resize_imported_images;
198 Gtk::CheckButton toggle_enable_experimental_features;
199 Gtk::CheckButton toggle_use_dark_theme;
201 Gtk::Entry textbox_browser_command;
202 Gtk::Entry textbox_brushes_path;
204 Gtk::ComboBoxText* size_template_combo;
205 Gtk::ComboBoxText* fps_template_combo;
206 Gtk::ComboBoxText ui_language_combo;
207 std::vector<Glib::ustring> _lang_codes;
210 Gtk::Entry textbox_custom_filename_prefix;
211 Glib::RefPtr<Gtk::Adjustment> adj_pref_x_size;
212 Glib::RefPtr<Gtk::Adjustment> adj_pref_y_size;
213 Glib::RefPtr<Gtk::Adjustment> adj_pref_fps;
214 Gtk::SpinButton* pref_fps_spinbutton;
215 Gtk::SpinButton* pref_y_size_spinbutton;
216 Gtk::SpinButton* pref_x_size_spinbutton;
218 Gtk::Entry image_sequence_separator;
219 Gtk::CheckButton toggle_navigator_uses_cairo;
220 Gtk::CheckButton toggle_workarea_uses_cairo;