1 /**
2 * \brief LivePathEffect dialog
3 *
4 * Author:
5 * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
6 *
7 * Copyright (C) 2007 Author
8 *
9 * Released under GNU GPL. Read the file 'COPYING' for more information.
10 */
12 #ifndef INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
13 #define INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
15 #include "ui/widget/panel.h"
16 #include "ui/widget/button.h"
18 #include <gtkmm/label.h>
19 #include <gtkmm/comboboxtext.h>
20 #include <gtkmm/frame.h>
21 #include <gtkmm/tooltips.h>
22 #include "ui/widget/combo-enums.h"
23 #include "live_effects/effect.h"
24 #include "live_effects/lpeobject-reference.h"
25 #include <gtkmm/liststore.h>
26 #include <gtkmm/treeview.h>
27 #include <gtkmm/scrolledwindow.h>
28 #include <gtkmm/buttonbox.h>
29 #include <gtkmm/toolbar.h>
32 class SPDesktop;
34 namespace Inkscape {
36 namespace UI {
37 namespace Dialog {
39 class LivePathEffectEditor : public UI::Widget::Panel {
40 public:
41 LivePathEffectEditor();
42 virtual ~LivePathEffectEditor();
44 static LivePathEffectEditor &getInstance() { return *new LivePathEffectEditor(); }
46 void onSelectionChanged(Inkscape::Selection *sel);
47 virtual void on_effect_selection_changed();
48 void setDesktop(SPDesktop *desktop);
50 private:
51 sigc::connection selection_changed_connection;
52 sigc::connection selection_modified_connection;
54 void set_sensitize_all(bool sensitive);
56 void showParams(LivePathEffect::Effect* effect);
57 void showText(Glib::ustring const &str);
59 // void add_entry(const char* name );
60 void effect_list_update(SPLPEItem *lpeitem);
62 // callback methods for buttons on grids page.
63 void onApply();
64 void onRemove();
66 void onUp();
67 void onDown();
69 class ModelColumns : public Gtk::TreeModel::ColumnRecord
70 {
71 public:
72 ModelColumns()
73 {
74 add(col_name);
75 add(lperef);
76 }
78 Gtk::TreeModelColumn<Glib::ustring> col_name;
79 Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
80 };
82 Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
84 Gtk::Widget * effectwidget;
85 Gtk::Label explain_label;
86 Gtk::Frame effectapplication_frame;
87 Gtk::Frame effectcontrol_frame;
88 Gtk::Frame effectlist_frame;
89 Gtk::HBox effectapplication_hbox;
90 Gtk::VBox effectcontrol_vbox;
91 Gtk::VBox effectlist_vbox;
92 Gtk::Tooltips tooltips;
93 ModelColumns columns;
94 Gtk::ScrolledWindow scrolled_window;
95 Gtk::TreeView effectlist_view;
96 Glib::RefPtr<Gtk::ListStore> effectlist_store;
97 Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
99 Gtk::Toolbar toolbar;
100 Gtk::ToolButton button_up;
101 Gtk::ToolButton button_down;
102 Gtk::Button button_apply;
103 Gtk::ToolButton button_remove;
104 /*Gtk::HButtonBox button_hbox;
105 Gtk::Button button_up;
106 Gtk::Button button_down;
107 Gtk::Button button_apply;
108 Gtk::Button button_remove;*/
110 SPDesktop * current_desktop;
112 SPLPEItem * current_lpeitem;
114 LivePathEffectEditor(LivePathEffectEditor const &d);
115 LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
116 };
118 } // namespace Dialog
119 } // namespace UI
120 } // namespace Inkscape
122 #endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
124 /*
125 Local Variables:
126 mode:c++
127 c-file-style:"stroustrup"
128 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
129 indent-tabs-mode:nil
130 fill-column:99
131 End:
132 */
133 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :