Code

Applied patch to disable the pressure sensitivity for those people that have
[inkscape.git] / src / ui / dialog / inkscape-preferences.h
1 /**
2  * brief Inkscape Preferences dialog
3  *
4  * Authors:
5  *   Carl Hetherington
6  *   Marco Scholten
7  *
8  * Copyright (C) 2004, 2006 Authors
9  *
10  * Released under GNU GPL.  Read the file 'COPYING' for more information.
11  */
13 #ifndef INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
14 #define INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
16 #include <iostream>
17 #include <vector>
18 #include <gtkmm/table.h>
19 #include <gtkmm/comboboxtext.h>
20 #include <gtkmm/spinbutton.h>
21 #include <gtkmm/treestore.h>
22 #include <gtkmm/treeview.h>
23 #include <gtkmm/radiobutton.h>
24 #include <gtkmm/frame.h>
25 #include "ui/widget/preferences-widget.h"
26 #include <sigc++/sigc++.h>
27 #include <glibmm/i18n.h>
29 #include "dialog.h"
31 // UPDATE THIS IF YOU'RE ADDING PREFS PAGES.
32 // Otherwise the commands that open the dialog with the new page will fail.
34 enum {
35     PREFS_PAGE_MOUSE,
36     PREFS_PAGE_SCROLLING,
37     PREFS_PAGE_STEPS,
38     PREFS_PAGE_TOOLS,
39     PREFS_PAGE_TOOLS_SELECTOR,
40     PREFS_PAGE_TOOLS_NODE,
41     PREFS_PAGE_TOOLS_ZOOM,
42     PREFS_PAGE_TOOLS_SHAPES,
43     PREFS_PAGE_TOOLS_SHAPES_RECT,
44     PREFS_PAGE_TOOLS_SHAPES_ELLIPSE,
45     PREFS_PAGE_TOOLS_SHAPES_STAR,
46     PREFS_PAGE_TOOLS_SHAPES_SPIRAL,
47     PREFS_PAGE_TOOLS_PENCIL,
48     PREFS_PAGE_TOOLS_PEN,
49     PREFS_PAGE_TOOLS_CALLIGRAPHY,
50     PREFS_PAGE_TOOLS_TEXT,
51     PREFS_PAGE_TOOLS_GRADIENT,
52     PREFS_PAGE_TOOLS_CONNECTOR,
53     PREFS_PAGE_TOOLS_DROPPER,
54     PREFS_PAGE_WINDOWS,
55     PREFS_PAGE_CLONES,
56     PREFS_PAGE_FILTERS,
57     PREFS_PAGE_TRANSFORMS,
58     PREFS_PAGE_SELECTING,
59     PREFS_PAGE_MISC
60 };
62 using namespace Inkscape::UI::Widget;
64 namespace Inkscape {
65 namespace UI {
66 namespace Dialog {
68 class InkscapePreferences : public Dialog {
69 public:
70     virtual ~InkscapePreferences();
72     static InkscapePreferences *create() {return new InkscapePreferences(); }
73     void present();
75 protected:
76     Gtk::Frame _page_frame;
77     Gtk::Label _page_title;
78     Gtk::TreeView _page_list;  
79     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
81     //Pagelist model columns:
82     class PageListModelColumns : public Gtk::TreeModel::ColumnRecord
83     {
84     public:
85         PageListModelColumns()
86         { Gtk::TreeModelColumnRecord::add(_col_name); Gtk::TreeModelColumnRecord::add(_col_page); Gtk::TreeModelColumnRecord::add(_col_id); }
87         Gtk::TreeModelColumn<Glib::ustring> _col_name;
88         Gtk::TreeModelColumn<int> _col_id;
89         Gtk::TreeModelColumn<DialogPage*> _col_page;
90     };
91     PageListModelColumns _page_list_columns;
93     Gtk::TreeModel::Path _path_tools;
94     Gtk::TreeModel::Path _path_shapes;
96     DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows,
97                _page_clones, _page_transforms, _page_filters, _page_select, _page_misc;
98     DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
99                _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
100     DialogPage _page_rectangle, _page_ellipse, _page_star, _page_spiral;
102     PrefSpinButton _mouse_sens, _mouse_thres;
104     PrefSpinButton _scroll_wheel, _scroll_arrow_px, _scroll_arrow_acc, _scroll_auto_speed, _scroll_auto_thres;
106     PrefCombo       _steps_rot_snap;
107     PrefCheckButton _steps_compass;
108     PrefSpinButton  _steps_arrow, _steps_scale, _steps_inset, _steps_zoom;
110     PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark,
111                     _t_sel_cue_box, _t_sel_org_edge, _t_sel_org_node;
113     PrefSpinButton  _t_pencil_tolerance;
115     PrefRadioButton _win_ontop_none, _win_ontop_normal, _win_ontop_agressive;
116     PrefCheckButton _win_save_geom, _win_hide_task, _win_zoom_resize , _win_show_close;
118     PrefCheckButton _calligrapy_use_abs_size;
119     PrefCheckButton _calligrapy_keep_selected;
121     PrefCheckButton _connector_ignore_text;
122     
123     PrefRadioButton _clone_option_parallel, _clone_option_stay, _clone_option_transform,
124                     _clone_option_unlink, _clone_option_delete;
126     PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
128     PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
129     PrefRadioButton _trans_optimized, _trans_preserved;
131     PrefRadioButton _sel_all;
132     PrefRadioButton _sel_current;
133     PrefRadioButton _sel_recursive;
134     PrefCheckButton _sel_hidden, _sel_locked;
135     PrefCheckButton _sel_layer_deselects;
137     PrefSpinButton  _misc_export, _misc_recent, _misc_simpl;
138     PrefCheckButton _misc_imp_bitmap, _misc_comment, _misc_scripts;
139     PrefCombo       _misc_overs_bitmap;
140     PrefCheckButton _misc_mask_on_top;
141     PrefCheckButton _misc_mask_remove;
142     PrefCheckButton _misc_use_ext_input;
144     int _max_dialog_width;
145     int _max_dialog_height;
146     int _sb_width;
147     DialogPage* _current_page;
149     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, int id);
150     Gtk::TreeModel::iterator AddPage(DialogPage& p, Glib::ustring title, Gtk::TreeModel::iterator parent, int id);
151     bool SetMaxDialogSize(const Gtk::TreeModel::iterator& iter);
152     bool PresentPage(const Gtk::TreeModel::iterator& iter);
154     static void AddSelcueCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
155     static void AddGradientCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
156     static void AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path);
158     void on_pagelist_selection_changed();
159     void initPageMouse();
160     void initPageScrolling();
161     void initPageSteps();
162     void initPageTools();
163     void initPageWindows();
164     void initPageClones();
165     void initPageTransforms();
166     void initPageFilters();
167     void initPageSelecting();
168     void initPageMisc();
170 private:
171     InkscapePreferences();
172     InkscapePreferences(InkscapePreferences const &d);
173     InkscapePreferences operator=(InkscapePreferences const &d);
174 };
176 } // namespace Dialog
177 } // namespace UI
178 } // namespace Inkscape
180 #endif //INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
182 /* 
183   Local Variables:
184   mode:c++
185   c-file-style:"stroustrup"
186   c-file-offsets:((innamespace . 0)(inline-open . 0))
187   indent-tabs-mode:nil
188   fill-column:99
189   End:
190 */
191 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :