Code

Display CMS adjustment per-desktop view
[inkscape.git] / src / ui / dialog / inkscape-preferences.h
1 /**
2  * brief Inkscape Preferences dialog
3  *
4  * Authors:
5  *   Carl Hetherington
6  *   Marco Scholten
7  *   Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
8  *   Bruno Dilly <bruno.dilly@gmail.com>
9  *
10  * Copyright (C) 2004-2007 Authors
11  *
12  * Released under GNU GPL.  Read the file 'COPYING' for more information.
13  */
15 #ifndef INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
16 #define INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
18 #include <iostream>
19 #include <vector>
20 #include <gtkmm/table.h>
21 #include <gtkmm/colorbutton.h>
22 #include <gtkmm/comboboxtext.h>
23 #include <gtkmm/spinbutton.h>
24 #include <gtkmm/treestore.h>
25 #include <gtkmm/treeview.h>
26 #include <gtkmm/radiobutton.h>
27 #include <gtkmm/frame.h>
28 #include "ui/widget/preferences-widget.h"
29 #include <sigc++/sigc++.h>
30 #include <glibmm/i18n.h>
32 #include "dialog.h"
34 // UPDATE THIS IF YOU'RE ADDING PREFS PAGES.
35 // Otherwise the commands that open the dialog with the new page will fail.
37 enum {
38     PREFS_PAGE_MOUSE,
39     PREFS_PAGE_SCROLLING,
40     PREFS_PAGE_STEPS,
41     PREFS_PAGE_TOOLS,
42     PREFS_PAGE_TOOLS_SELECTOR,
43     PREFS_PAGE_TOOLS_NODE,
44     PREFS_PAGE_TOOLS_TWEAK,
45     PREFS_PAGE_TOOLS_ZOOM,
46     PREFS_PAGE_TOOLS_SHAPES,
47     PREFS_PAGE_TOOLS_SHAPES_RECT,
48     PREFS_PAGE_TOOLS_SHAPES_3DBOX,
49     PREFS_PAGE_TOOLS_SHAPES_ELLIPSE,
50     PREFS_PAGE_TOOLS_SHAPES_STAR,
51     PREFS_PAGE_TOOLS_SHAPES_SPIRAL,
52     PREFS_PAGE_TOOLS_PENCIL,
53     PREFS_PAGE_TOOLS_PEN,
54     PREFS_PAGE_TOOLS_CALLIGRAPHY,
55     PREFS_PAGE_TOOLS_PAINTBUCKET,
56     PREFS_PAGE_TOOLS_TEXT,
57     PREFS_PAGE_TOOLS_GRADIENT,
58     PREFS_PAGE_TOOLS_CONNECTOR,
59     PREFS_PAGE_TOOLS_DROPPER,
60     PREFS_PAGE_WINDOWS,
61     PREFS_PAGE_CLONES,
62     PREFS_PAGE_MASKS,
63     PREFS_PAGE_FILTERS,
64     PREFS_PAGE_TRANSFORMS,
65     PREFS_PAGE_SELECTING,
66     PREFS_PAGE_IMPORTEXPORT,
67     PREFS_PAGE_CMS,
68     PREFS_PAGE_MISC
69 };
71 using namespace Inkscape::UI::Widget;
73 namespace Inkscape {
74 namespace UI {
75 namespace Dialog {
77 class InkscapePreferences : public Dialog {
78 public:
79     virtual ~InkscapePreferences();
81     static InkscapePreferences *create(Behavior::BehaviorFactory behavior_factory) 
82     { return new InkscapePreferences(behavior_factory); }
84     void present();
86 protected:
87     Gtk::Frame _page_frame;
88     Gtk::Label _page_title;
89     Gtk::TreeView _page_list;  
90     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
92     //Pagelist model columns:
93     class PageListModelColumns : public Gtk::TreeModel::ColumnRecord
94     {
95     public:
96         PageListModelColumns()
97         { Gtk::TreeModelColumnRecord::add(_col_name); Gtk::TreeModelColumnRecord::add(_col_page); Gtk::TreeModelColumnRecord::add(_col_id); }
98         Gtk::TreeModelColumn<Glib::ustring> _col_name;
99         Gtk::TreeModelColumn<int> _col_id;
100         Gtk::TreeModelColumn<DialogPage*> _col_page;
101     };
102     PageListModelColumns _page_list_columns;
104     Gtk::TreeModel::Path _path_tools;
105     Gtk::TreeModel::Path _path_shapes;
107     DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows,
108         _page_clones, _page_mask, _page_transforms, _page_filters, _page_select, 
109         _page_importexport, _page_cms, _page_misc;
110     DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
111                _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
112     DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;
114     PrefSpinButton _mouse_sens, _mouse_thres;
115     PrefCheckButton _mouse_use_ext_input;
117     PrefSpinButton _scroll_wheel, _scroll_arrow_px, _scroll_arrow_acc, _scroll_auto_speed, _scroll_auto_thres;
118     PrefCheckButton _scroll_space;
119     PrefCheckButton _wheel_zoom;
121     PrefCombo       _steps_rot_snap;
122     PrefCheckButton _steps_compass;
123     PrefSpinButton  _steps_arrow, _steps_scale, _steps_inset, _steps_zoom;
125     PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark,
126                     _t_sel_cue_box, _t_sel_bbox_visual, _t_sel_bbox_geometric;
128     PrefSpinButton  _t_pencil_tolerance;
130     PrefRadioButton _win_dockable, _win_floating;
131     PrefRadioButton _win_ontop_none, _win_ontop_normal, _win_ontop_agressive;
132     PrefRadioButton _win_save_geom_off, _win_save_geom, _win_save_geom_prefs;
133     PrefCheckButton _win_hide_task, _win_zoom_resize , _win_show_close;
135 // FIXME: Temporary Win32 special code to enable transient dialogs
136 #ifdef WIN32 
137     PrefCheckButton _win_ontop_win32;   
138 #endif    
140     PrefCheckButton _calligrapy_use_abs_size;
141     PrefCheckButton _calligrapy_keep_selected;
143     PrefCheckButton _connector_ignore_text;
144     
145     PrefRadioButton _clone_option_parallel, _clone_option_stay, _clone_option_transform,
146                     _clone_option_unlink, _clone_option_delete;
148     PrefCheckButton _mask_mask_on_top;
149     PrefCheckButton _mask_mask_remove;
151     PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
153     PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
154     PrefRadioButton _trans_optimized, _trans_preserved;
156     PrefRadioButton _sel_all;
157     PrefRadioButton _sel_current;
158     PrefRadioButton _sel_recursive;
159     PrefCheckButton _sel_hidden, _sel_locked;
160     PrefCheckButton _sel_layer_deselects;
162     PrefSpinButton  _importexport_export, _misc_recent, _misc_simpl;
163     PrefCheckButton _misc_comment, _misc_forkvectors, _misc_scripts;
164     PrefCheckButton _misc_small_toolbar;
165     PrefCheckButton _misc_small_tools;
166     PrefCombo       _misc_overs_bitmap;
168     Gtk::ComboBoxText   _cms_display_profile;
169     PrefCombo           _cms_intent;
171     PrefCheckButton     _cms_softproof;
172     PrefCheckButton     _cms_gamutwarn;
173     Gtk::ColorButton    _cms_gamutcolor;
174     Gtk::ComboBoxText   _cms_proof_profile;
175     PrefCombo           _cms_proof_intent;
176     PrefCheckButton     _cms_proof_blackpoint;
177     PrefCheckButton     _cms_proof_preserveblack;
179     PrefEntryButtonHBox _importexport_ocal_url;
180     PrefEntry       _importexport_ocal_username;
181     PrefEntry       _importexport_ocal_password;
183     int _max_dialog_width;
184     int _max_dialog_height;
185     int _sb_width;
186     DialogPage* _current_page;
188     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, int id);
189     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, Gtk::TreeModel::iterator parent, int id);
190     bool SetMaxDialogSize(const Gtk::TreeModel::iterator& iter);
191     bool PresentPage(const Gtk::TreeModel::iterator& iter);
193     static void AddSelcueCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
194     static void AddGradientCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
195     static void AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path);
197     void on_pagelist_selection_changed();
198     void initPageMouse();
199     void initPageScrolling();
200     void initPageSteps();
201     void initPageTools();
202     void initPageWindows();
203     void initPageClones();
204     void initPageMasks();
205     void initPageTransforms();
206     void initPageFilters();
207     void initPageSelecting();
208     void initPageImportExport();
209     void initPageCMS();
210     void initPageMisc();
212 private:
213     InkscapePreferences(Behavior::BehaviorFactory behavior_factory);
214     InkscapePreferences(InkscapePreferences const &d);
215     InkscapePreferences operator=(InkscapePreferences const &d);
216 };
218 } // namespace Dialog
219 } // namespace UI
220 } // namespace Inkscape
222 #endif //INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
224 /* 
225   Local Variables:
226   mode:c++
227   c-file-style:"stroustrup"
228   c-file-offsets:((innamespace . 0)(inline-open . 0))
229   indent-tabs-mode:nil
230   fill-column:99
231   End:
232 */
233 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :