Code

remove obsolete import-as-pattern option
[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/comboboxtext.h>
22 #include <gtkmm/spinbutton.h>
23 #include <gtkmm/treestore.h>
24 #include <gtkmm/treeview.h>
25 #include <gtkmm/radiobutton.h>
26 #include <gtkmm/frame.h>
27 #include "ui/widget/preferences-widget.h"
28 #include <sigc++/sigc++.h>
29 #include <glibmm/i18n.h>
31 #include "dialog.h"
33 // UPDATE THIS IF YOU'RE ADDING PREFS PAGES.
34 // Otherwise the commands that open the dialog with the new page will fail.
36 enum {
37     PREFS_PAGE_MOUSE,
38     PREFS_PAGE_SCROLLING,
39     PREFS_PAGE_STEPS,
40     PREFS_PAGE_TOOLS,
41     PREFS_PAGE_TOOLS_SELECTOR,
42     PREFS_PAGE_TOOLS_NODE,
43     PREFS_PAGE_TOOLS_TWEAK,
44     PREFS_PAGE_TOOLS_ZOOM,
45     PREFS_PAGE_TOOLS_SHAPES,
46     PREFS_PAGE_TOOLS_SHAPES_RECT,
47     PREFS_PAGE_TOOLS_SHAPES_3DBOX,
48     PREFS_PAGE_TOOLS_SHAPES_ELLIPSE,
49     PREFS_PAGE_TOOLS_SHAPES_STAR,
50     PREFS_PAGE_TOOLS_SHAPES_SPIRAL,
51     PREFS_PAGE_TOOLS_PENCIL,
52     PREFS_PAGE_TOOLS_PEN,
53     PREFS_PAGE_TOOLS_CALLIGRAPHY,
54     PREFS_PAGE_TOOLS_PAINTBUCKET,
55     PREFS_PAGE_TOOLS_TEXT,
56     PREFS_PAGE_TOOLS_GRADIENT,
57     PREFS_PAGE_TOOLS_CONNECTOR,
58     PREFS_PAGE_TOOLS_DROPPER,
59     PREFS_PAGE_WINDOWS,
60     PREFS_PAGE_CLONES,
61     PREFS_PAGE_MASKS,
62     PREFS_PAGE_FILTERS,
63     PREFS_PAGE_TRANSFORMS,
64     PREFS_PAGE_SELECTING,
65     PREFS_PAGE_IMPORTEXPORT,
66     PREFS_PAGE_MISC
67 };
69 using namespace Inkscape::UI::Widget;
71 namespace Inkscape {
72 namespace UI {
73 namespace Dialog {
75 class InkscapePreferences : public Dialog {
76 public:
77     virtual ~InkscapePreferences();
79     static InkscapePreferences *create(Behavior::BehaviorFactory behavior_factory) 
80     { return new InkscapePreferences(behavior_factory); }
82     void present();
84 protected:
85     Gtk::Frame _page_frame;
86     Gtk::Label _page_title;
87     Gtk::TreeView _page_list;  
88     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
90     //Pagelist model columns:
91     class PageListModelColumns : public Gtk::TreeModel::ColumnRecord
92     {
93     public:
94         PageListModelColumns()
95         { Gtk::TreeModelColumnRecord::add(_col_name); Gtk::TreeModelColumnRecord::add(_col_page); Gtk::TreeModelColumnRecord::add(_col_id); }
96         Gtk::TreeModelColumn<Glib::ustring> _col_name;
97         Gtk::TreeModelColumn<int> _col_id;
98         Gtk::TreeModelColumn<DialogPage*> _col_page;
99     };
100     PageListModelColumns _page_list_columns;
102     Gtk::TreeModel::Path _path_tools;
103     Gtk::TreeModel::Path _path_shapes;
105     DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows,
106         _page_clones, _page_mask, _page_transforms, _page_filters, _page_select, 
107         _page_importexport, _page_misc;
108     DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
109                _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
110     DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;
112     PrefSpinButton _mouse_sens, _mouse_thres;
113     PrefCheckButton _mouse_use_ext_input;
115     PrefSpinButton _scroll_wheel, _scroll_arrow_px, _scroll_arrow_acc, _scroll_auto_speed, _scroll_auto_thres;
116     PrefCheckButton _scroll_space;
117     PrefCheckButton _wheel_zoom;
119     PrefCombo       _steps_rot_snap;
120     PrefCheckButton _steps_compass;
121     PrefSpinButton  _steps_arrow, _steps_scale, _steps_inset, _steps_zoom;
123     PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark,
124                     _t_sel_cue_box, _t_sel_bbox_visual, _t_sel_bbox_geometric;
126     PrefSpinButton  _t_pencil_tolerance;
128     PrefRadioButton _win_dockable, _win_floating;
129     PrefRadioButton _win_ontop_none, _win_ontop_normal, _win_ontop_agressive;
130     PrefRadioButton _win_save_geom_off, _win_save_geom, _win_save_geom_prefs;
131     PrefCheckButton _win_hide_task, _win_zoom_resize , _win_show_close;
133 // FIXME: Temporary Win32 special code to enable transient dialogs
134 #ifdef WIN32 
135     PrefCheckButton _win_ontop_win32;   
136 #endif    
138     PrefCheckButton _calligrapy_use_abs_size;
139     PrefCheckButton _calligrapy_keep_selected;
141     PrefCheckButton _connector_ignore_text;
142     
143     PrefRadioButton _clone_option_parallel, _clone_option_stay, _clone_option_transform,
144                     _clone_option_unlink, _clone_option_delete;
146     PrefCheckButton _mask_mask_on_top;
147     PrefCheckButton _mask_mask_remove;
149     PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
151     PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
152     PrefRadioButton _trans_optimized, _trans_preserved;
154     PrefRadioButton _sel_all;
155     PrefRadioButton _sel_current;
156     PrefRadioButton _sel_recursive;
157     PrefCheckButton _sel_hidden, _sel_locked;
158     PrefCheckButton _sel_layer_deselects;
160     PrefSpinButton  _importexport_export, _misc_recent, _misc_simpl;
161     PrefCheckButton _misc_comment, _misc_scripts;
162     PrefCheckButton _misc_small_toolbar;
163     PrefCombo       _misc_overs_bitmap;
165     PrefCheckButton _misc_cms_display;
166     PrefFileButton  _misc_cms_display_profile;
168     PrefEntryButtonHBox _importexport_ocal_url;
169     PrefEntry       _importexport_ocal_username;
170     PrefEntry       _importexport_ocal_password;
172     int _max_dialog_width;
173     int _max_dialog_height;
174     int _sb_width;
175     DialogPage* _current_page;
177     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, int id);
178     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, Gtk::TreeModel::iterator parent, int id);
179     bool SetMaxDialogSize(const Gtk::TreeModel::iterator& iter);
180     bool PresentPage(const Gtk::TreeModel::iterator& iter);
182     static void AddSelcueCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
183     static void AddGradientCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
184     static void AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path);
186     void on_pagelist_selection_changed();
187     void initPageMouse();
188     void initPageScrolling();
189     void initPageSteps();
190     void initPageTools();
191     void initPageWindows();
192     void initPageClones();
193     void initPageMasks();
194     void initPageTransforms();
195     void initPageFilters();
196     void initPageSelecting();
197     void initPageImportExport();
198     void initPageMisc();
200 private:
201     InkscapePreferences(Behavior::BehaviorFactory behavior_factory);
202     InkscapePreferences(InkscapePreferences const &d);
203     InkscapePreferences operator=(InkscapePreferences const &d);
204 };
206 } // namespace Dialog
207 } // namespace UI
208 } // namespace Inkscape
210 #endif //INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
212 /* 
213   Local Variables:
214   mode:c++
215   c-file-style:"stroustrup"
216   c-file-offsets:((innamespace . 0)(inline-open . 0))
217   indent-tabs-mode:nil
218   fill-column:99
219   End:
220 */
221 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :