Code

Use frames in the snapping tab in the document properties dialog
[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 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     //---------------------------------------------------------------
68     RegisteredCheckButton _rcb_canb, _rcb_bord, _rcb_shad;
69     RegisteredColorPicker _rcp_bg, _rcp_bord;
70     RegisteredUnitMenu    _rum_deflt;
71     PageSizer             _page_sizer;
72     //---------------------------------------------------------------
73     RegisteredCheckButton _rcbgrid;
74     RegisteredUnitMenu    _rums;
75     //---------------------------------------------------------------
76     RegisteredCheckButton _rcb_sgui, _rcbsng;
77     RegisteredUnitMenu    _rum_gusn;
78     RegisteredColorPicker _rcp_gui, _rcp_hgui;
79     //---------------------------------------------------------------
80     Gtk::Frame           _snap_frame_from;
81     Gtk::Frame           _snap_frame_to;
82     Gtk::Table           _snap_table_from;
83     Gtk::Table           _snap_table_to;
84     RegisteredCheckButton _rcbsnbb, _rcbsnn, _rcbsnop;
85     RegisteredCheckButton _rcbsnon, _rcbsnbbp, _rcbsnbbn;
86     RegisteredUnitMenu    _rumso;
87     ToleranceSlider       _rsu_sno, _rsu_sn, _rsu_gusn;
88     RegisteredRadioButtonPair _rrb_pix;
89     //---------------------------------------------------------------
90     RegisteredCheckButton _rcbic;
91     RegisteredCheckButton _rcbsigg, _rcbsils;
92     //---------------------------------------------------------------
93     Gtk::Notebook   _grids_notebook;
94     Gtk::HBox       _grids_hbox_crea;
95     Gtk::Label      _grids_label_crea;
96     Gtk::Button     _grids_button_new;
97     Gtk::Button     _grids_button_remove;
98     Gtk::ComboBoxText _grids_combo_gridtype;
99     Gtk::Label      _grids_label_def;
100     Gtk::HBox       _grids_space;
101     //---------------------------------------------------------------
103     gchar const *_prefs_path;
104     Registry _wr;
106 private:
107     DocumentProperties();
108     virtual ~DocumentProperties();
110     // callback methods for buttons on grids page.
111     void onNewGrid();
112     void onRemoveGrid();    
113 };
115 } // namespace Dialog
116 } // namespace UI
117 } // namespace Inkscape
119 #endif // INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
121 /*
122   Local Variables:
123   mode:c++
124   c-file-style:"stroustrup"
125   c-file-offsets:((innamespace . 0)(inline-open . 0))
126   indent-tabs-mode:nil
127   fill-column:99
128   End:
129 */
130 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :