Code

Initial cut of eraser tool
[inkscape.git] / src / ui / dialog / inkscape-preferences.h
index 1f53115cada6aee6fa6d7708d64a5a5ccbec8c5b..a1a577b95710165057b284ed72f9eddad53fa0af 100644 (file)
 #include <iostream>
 #include <vector>
 #include <gtkmm/table.h>
+#include <gtkmm/colorbutton.h>
 #include <gtkmm/comboboxtext.h>
 #include <gtkmm/spinbutton.h>
 #include <gtkmm/treestore.h>
 #include <gtkmm/treeview.h>
 #include <gtkmm/radiobutton.h>
 #include <gtkmm/frame.h>
+#include <gtkmm/notebook.h>
 #include "ui/widget/preferences-widget.h"
 #include <sigc++/sigc++.h>
 #include <glibmm/i18n.h>
 
-#include "dialog.h"
+#include "ui/widget/panel.h"
 
 // UPDATE THIS IF YOU'RE ADDING PREFS PAGES.
 // Otherwise the commands that open the dialog with the new page will fail.
@@ -52,6 +54,7 @@ enum {
     PREFS_PAGE_TOOLS_PEN,
     PREFS_PAGE_TOOLS_CALLIGRAPHY,
     PREFS_PAGE_TOOLS_PAINTBUCKET,
+    PREFS_PAGE_TOOLS_ERASER,
     PREFS_PAGE_TOOLS_TEXT,
     PREFS_PAGE_TOOLS_GRADIENT,
     PREFS_PAGE_TOOLS_CONNECTOR,
@@ -63,6 +66,8 @@ enum {
     PREFS_PAGE_TRANSFORMS,
     PREFS_PAGE_SELECTING,
     PREFS_PAGE_IMPORTEXPORT,
+    PREFS_PAGE_CMS,
+    PREFS_PAGE_GRIDS,
     PREFS_PAGE_MISC
 };
 
@@ -72,19 +77,16 @@ namespace Inkscape {
 namespace UI {
 namespace Dialog {
 
-class InkscapePreferences : public Dialog {
+class InkscapePreferences : public UI::Widget::Panel {
 public:
     virtual ~InkscapePreferences();
 
-    static InkscapePreferences *create(Behavior::BehaviorFactory behavior_factory) 
-    { return new InkscapePreferences(behavior_factory); }
-
-    void present();
+    static InkscapePreferences &getInstance() { return *new InkscapePreferences(); }
 
 protected:
     Gtk::Frame _page_frame;
     Gtk::Label _page_title;
-    Gtk::TreeView _page_list;  
+    Gtk::TreeView _page_list;
     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
 
     //Pagelist model columns:
@@ -103,14 +105,15 @@ protected:
     Gtk::TreeModel::Path _path_shapes;
 
     DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows,
-        _page_clones, _page_mask, _page_transforms, _page_filters, _page_select, 
-        _page_importexport, _page_misc;
-    DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
+        _page_clones, _page_mask, _page_transforms, _page_filters, _page_select,
+        _page_importexport, _page_cms, _page_grids, _page_misc;
+    DialogPage _page_selector, _page_node, _page_tweak, _page_zoom, _page_shapes, _page_pencil, _page_pen,
                _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
-    DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;
+    DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket, _page_eraser;
 
     PrefSpinButton _mouse_sens, _mouse_thres;
     PrefCheckButton _mouse_use_ext_input;
+    PrefCheckButton _mouse_switch_on_ext_input;
 
     PrefSpinButton _scroll_wheel, _scroll_arrow_px, _scroll_arrow_acc, _scroll_auto_speed, _scroll_auto_thres;
     PrefCheckButton _scroll_space;
@@ -121,7 +124,11 @@ protected:
     PrefSpinButton  _steps_arrow, _steps_scale, _steps_inset, _steps_zoom;
 
     PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark,
-                    _t_sel_cue_box, _t_sel_bbox_visual, _t_sel_bbox_geometric;
+                    _t_sel_cue_box, _t_bbox_visual, _t_bbox_geometric;
+    PrefCheckButton _t_cvg_keep_objects, _t_cvg_convert_whole_groups;
+    PrefCheckButton _t_node_pathflash_enabled;
+    PrefSpinButton  _t_node_pathflash_timeout;
+    PrefColorPicker _t_node_pathoutline_color;
 
     PrefSpinButton  _t_pencil_tolerance;
 
@@ -130,16 +137,11 @@ protected:
     PrefRadioButton _win_save_geom_off, _win_save_geom, _win_save_geom_prefs;
     PrefCheckButton _win_hide_task, _win_zoom_resize , _win_show_close;
 
-// FIXME: Temporary Win32 special code to enable transient dialogs
-#ifdef WIN32 
-    PrefCheckButton _win_ontop_win32;   
-#endif    
-
     PrefCheckButton _calligrapy_use_abs_size;
     PrefCheckButton _calligrapy_keep_selected;
 
     PrefCheckButton _connector_ignore_text;
-    
+
     PrefRadioButton _clone_option_parallel, _clone_option_stay, _clone_option_transform,
                     _clone_option_unlink, _clone_option_delete;
 
@@ -147,6 +149,7 @@ protected:
     PrefCheckButton _mask_mask_remove;
 
     PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
+    PrefCheckButton _show_filters_info_box;
 
     PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
     PrefRadioButton _trans_optimized, _trans_preserved;
@@ -158,12 +161,47 @@ protected:
     PrefCheckButton _sel_layer_deselects;
 
     PrefSpinButton  _importexport_export, _misc_recent, _misc_simpl;
-    PrefCheckButton _importexport_imp_bitmap, _misc_comment, _misc_scripts;
-    PrefCheckButton _misc_small_toolbar;
+    PrefCheckButton _misc_comment, _misc_forkvectors, _misc_scripts;
+    PrefCombo       _misc_small_toolbar;
+    PrefCombo       _misc_small_secondary;
+    PrefCombo       _misc_small_tools;
     PrefCombo       _misc_overs_bitmap;
 
-    PrefCheckButton _misc_cms_display;
-    PrefFileButton  _misc_cms_display_profile;
+    Gtk::ComboBoxText   _cms_display_profile;
+    PrefCheckButton     _cms_from_display;
+    PrefCombo           _cms_intent;
+
+    PrefCheckButton     _cms_softproof;
+    PrefCheckButton     _cms_gamutwarn;
+    Gtk::ColorButton    _cms_gamutcolor;
+    Gtk::ComboBoxText   _cms_proof_profile;
+    PrefCombo           _cms_proof_intent;
+    PrefCheckButton     _cms_proof_blackpoint;
+    PrefCheckButton     _cms_proof_preserveblack;
+
+    Gtk::Notebook       _grids_notebook;
+    PrefCheckButton     _grids_no_emphasize_on_zoom;
+    DialogPage          _grids_xy, _grids_axonom;
+    // CanvasXYGrid properties:
+        PrefUnit            _grids_xy_units;
+        PrefSpinButton      _grids_xy_origin_x;
+        PrefSpinButton      _grids_xy_origin_y;
+        PrefSpinButton      _grids_xy_spacing_x;
+        PrefSpinButton      _grids_xy_spacing_y;
+        PrefColorPicker     _grids_xy_color;
+        PrefColorPicker     _grids_xy_empcolor;
+        PrefSpinButton      _grids_xy_empspacing;
+        PrefCheckButton     _grids_xy_dotted;
+    // CanvasAxonomGrid properties:
+        PrefUnit            _grids_axonom_units;
+        PrefSpinButton      _grids_axonom_origin_x;
+        PrefSpinButton      _grids_axonom_origin_y;
+        PrefSpinButton      _grids_axonom_spacing_y;
+        PrefSpinButton      _grids_axonom_angle_x;
+        PrefSpinButton      _grids_axonom_angle_z;
+        PrefColorPicker     _grids_axonom_color;
+        PrefColorPicker     _grids_axonom_empcolor;
+        PrefSpinButton      _grids_axonom_empspacing;
 
     PrefEntryButtonHBox _importexport_ocal_url;
     PrefEntry       _importexport_ocal_username;
@@ -181,6 +219,8 @@ protected:
 
     static void AddSelcueCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
     static void AddGradientCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
+    static void AddConvertGuidesCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value);
+    static void AddDotSizeSpinbutton(DialogPage& p, const std::string& prefs_path, double def_value);
     static void AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path);
 
     void on_pagelist_selection_changed();
@@ -195,10 +235,14 @@ protected:
     void initPageFilters();
     void initPageSelecting();
     void initPageImportExport();
+    void initPageCMS();
+    void initPageGrids();
     void initPageMisc();
 
+    void _presentPages();
+
 private:
-    InkscapePreferences(Behavior::BehaviorFactory behavior_factory);
+    InkscapePreferences();
     InkscapePreferences(InkscapePreferences const &d);
     InkscapePreferences operator=(InkscapePreferences const &d);
 };
@@ -209,7 +253,7 @@ private:
 
 #endif //INKSCAPE_UI_DIALOG_INKSCAPE_PREFERENCES_H
 
-/* 
+/*
   Local Variables:
   mode:c++
   c-file-style:"stroustrup"