1 /** \file
2 * \brief Document Properties dialog
3 *
4 * Authors:
5 * Ralf Stephan <ralf@ark.in-berlin.de>
6 * Bryce W. Harrington <bryce@bryceharrington.org>
7 *
8 * Copyright (C) 2006-2008 Johan Engelen <johan@shouraizou.nl>
9 * Copyright (C) 2004, 2005 Authors
10 *
11 * Released under GNU GPL. Read the file 'COPYING' for more information.
12 */
14 #ifndef INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
15 #define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
17 #include <list>
18 #include <sigc++/sigc++.h>
19 #include <gtkmm/notebook.h>
20 #include <glibmm/i18n.h>
22 #include "ui/widget/notebook-page.h"
23 #include "ui/widget/page-sizer.h"
24 #include "ui/widget/registered-widget.h"
25 #include "ui/widget/registry.h"
26 #include "ui/widget/tolerance-slider.h"
27 #include "ui/widget/panel.h"
29 using namespace Inkscape::UI::Widget;
31 namespace Inkscape {
32 namespace XML {
33 class Node;
34 }
35 namespace UI {
36 namespace Dialog {
38 class DocumentProperties : public UI::Widget::Panel {
39 public:
40 void update();
41 static DocumentProperties &getInstance();
42 static void destroy();
44 void update_gridspage();
46 protected:
47 void build_page();
48 void build_grid();
49 void build_guides();
50 void build_snap();
51 void build_snap_dtls();
52 void build_gridspage();
53 void init();
54 virtual void on_response (int);
56 void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
57 void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
58 void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
60 Gtk::Tooltips _tt;
61 Gtk::Notebook _notebook;
63 NotebookPage _page_page, _page_guides;
64 NotebookPage _page_snap, _page_snap_dtls;
65 Gtk::VBox _grids_vbox;
67 Registry _wr;
68 //---------------------------------------------------------------
69 RegisteredCheckButton _rcb_canb, _rcb_bord, _rcb_shad;
70 RegisteredColorPicker _rcp_bg, _rcp_bord;
71 RegisteredUnitMenu _rum_deflt;
72 PageSizer _page_sizer;
73 //---------------------------------------------------------------
74 RegisteredCheckButton _rcb_sgui, _rcbsng;
75 RegisteredUnitMenu _rum_gusn;
76 RegisteredColorPicker _rcp_gui, _rcp_hgui;
77 //---------------------------------------------------------------
78 RegisteredCheckButton _rcbsg, _rcbsnbb, _rcbsnn, _rcbsnop;
79 RegisteredCheckButton _rcbsnon, _rcbsnbbp, _rcbsnbbn;
80 RegisteredUnitMenu _rumso;
81 ToleranceSlider _rsu_sno, _rsu_sn, _rsu_gusn;
82 RegisteredRadioButtonPair _rrb_pix;
83 //---------------------------------------------------------------
84 RegisteredCheckButton _rcbic;
85 RegisteredCheckButton _rcbsigg, _rcbsils;
86 //---------------------------------------------------------------
87 Gtk::Notebook _grids_notebook;
88 Gtk::HBox _grids_hbox_crea;
89 Gtk::Label _grids_label_crea;
90 Gtk::Button _grids_button_new;
91 Gtk::Button _grids_button_remove;
92 Gtk::ComboBoxText _grids_combo_gridtype;
93 Gtk::Label _grids_label_def;
94 Gtk::HBox _grids_space;
95 //---------------------------------------------------------------
97 gchar const *_prefs_path;
99 Gtk::HBox& _createPageTabLabel(const Glib::ustring& label, const char *label_image);
101 private:
102 DocumentProperties();
103 virtual ~DocumentProperties();
105 // callback methods for buttons on grids page.
106 void onNewGrid();
107 void onRemoveGrid();
108 };
110 } // namespace Dialog
111 } // namespace UI
112 } // namespace Inkscape
114 #endif // INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
116 /*
117 Local Variables:
118 mode:c++
119 c-file-style:"stroustrup"
120 c-file-offsets:((innamespace . 0)(inline-open . 0))
121 indent-tabs-mode:nil
122 fill-column:99
123 End:
124 */
125 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :