Code

Initial cut of eraser tool
[inkscape.git] / src / ui / dialog / document-properties.h
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();
45     
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     RegisteredColorPicker _rcp_gui, _rcp_hgui;
76     //---------------------------------------------------------------
77     RegisteredCheckButton _rcbsg, _rcbsnbb, _rcbsnn, _rcbsnop;
78     RegisteredCheckButton _rcbsnon, _rcbsnbbp, _rcbsnbbn, _rcbsnpb;
79     ToleranceSlider       _rsu_sno, _rsu_sn, _rsu_gusn;
80     //---------------------------------------------------------------
81     RegisteredCheckButton _rcbic;
82     RegisteredCheckButton _rcbsigg, _rcbsils;
83     //---------------------------------------------------------------
84     Gtk::Notebook   _grids_notebook;
85     Gtk::HBox       _grids_hbox_crea;
86     Gtk::Label      _grids_label_crea;
87     Gtk::Button     _grids_button_new;
88     Gtk::Button     _grids_button_remove;
89     Gtk::ComboBoxText _grids_combo_gridtype;
90     Gtk::Label      _grids_label_def;
91     Gtk::HBox       _grids_space;
92     //---------------------------------------------------------------
94     gchar const *_prefs_path;
96     Gtk::HBox& _createPageTabLabel(const Glib::ustring& label, const char *label_image);
98 private:
99     DocumentProperties();
100     virtual ~DocumentProperties();
102     // callback methods for buttons on grids page.
103     void onNewGrid();
104     void onRemoveGrid();    
105 };
107 } // namespace Dialog
108 } // namespace UI
109 } // namespace Inkscape
111 #endif // INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
113 /*
114   Local Variables:
115   mode:c++
116   c-file-style:"stroustrup"
117   c-file-offsets:((innamespace . 0)(inline-open . 0))
118   indent-tabs-mode:nil
119   fill-column:99
120   End:
121 */
122 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :