1 /**
2 *
3 * \brief Dialog for modifying guidelines
4 *
5 * Author:
6 * Andrius R. <knutux@gmail.com>
7 * Johan Engelen
8 *
9 * Copyright (C) 2006-2007 Authors
10 *
11 * Released under GNU GPL. Read the file 'COPYING' for more information
12 */
14 #ifndef INKSCAPE_DIALOG_GUIDELINE_H
15 #define INKSCAPE_DIALOG_GUIDELINE_H
17 #include <gtkmm/dialog.h>
18 #include <gtkmm/table.h>
19 #include <gtkmm/spinbutton.h>
20 #include <gtkmm/label.h>
21 #include <gtkmm/stock.h>
22 #include <gtkmm/adjustment.h>
23 #include "ui/widget/button.h"
24 #include <2geom/point.h>
26 namespace Inkscape {
27 namespace UI {
28 namespace Dialogs {
30 class GuidelinePropertiesDialog : public Gtk::Dialog {
31 public:
32 GuidelinePropertiesDialog(SPGuide *guide, SPDesktop *desktop);
33 virtual ~GuidelinePropertiesDialog();
35 Glib::ustring getName() const { return "GuidelinePropertiesDialog"; }
37 static void showDialog(SPGuide *guide, SPDesktop *desktop);
39 protected:
40 void _setup();
42 void _onApply();
43 void _onOK();
44 void _onDelete();
46 void _response(gint response);
47 void _modeChanged();
49 private:
50 GuidelinePropertiesDialog(GuidelinePropertiesDialog const &); // no copy
51 GuidelinePropertiesDialog &operator=(GuidelinePropertiesDialog const &); // no assign
53 SPDesktop *_desktop;
54 SPGuide *_guide;
55 Gtk::Table _layout_table;
56 Gtk::Label _label_name;
57 Gtk::Label _label_descr;
58 Gtk::Label _label_units;
59 Gtk::Label _label_X;
60 Gtk::Label _label_Y;
61 Gtk::Label _label_degrees;
62 Inkscape::UI::Widget::CheckButton _relative_toggle;
63 Gtk::Adjustment _adjustment_x;
64 Gtk::SpinButton _spin_button_x;
65 Gtk::Adjustment _adjustment_y;
66 Gtk::SpinButton _spin_button_y;
68 Gtk::Adjustment _adj_angle;
69 Gtk::SpinButton _spin_angle;
71 Gtk::Widget *_unit_selector;
72 bool _mode;
73 Geom::Point _oldpos;
74 gdouble _oldangle;
75 };
77 } // namespace
78 } // namespace
79 } // namespace
82 #endif // INKSCAPE_DIALOG_GUIDELINE_H
84 /*
85 Local Variables:
86 mode:c++
87 c-file-style:"stroustrup"
88 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
89 indent-tabs-mode:nil
90 fill-column:99
91 End:
92 */
93 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :