Code

e2c7da3220bc6bb2421dcc38ea6bc68245e1cfaa
[inkscape.git] / src / ui / dialog / livepatheffect-editor.h
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;
53     void set_sensitize_all(bool sensitive);
55     void showParams(LivePathEffect::Effect* effect);
56     void showText(Glib::ustring const &str);
58    // void add_entry(const char* name );
59     void effect_list_update(SPLPEItem *lpeitem);
61     // callback methods for buttons on grids page.
62     void onApply();
63     void onRemove();
65     void onUp();
66     void onDown();
68     class ModelColumns : public Gtk::TreeModel::ColumnRecord
69     {
70          public:
71          ModelColumns()
72          {
73             add(col_name);
74             add(lperef);
75          }
77          Gtk::TreeModelColumn<Glib::ustring> col_name;
78          Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
79      };
81     Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
82     
83     Gtk::Widget * effectwidget;
84     Gtk::Label explain_label;
85     Gtk::Frame effectapplication_frame;
86     Gtk::Frame effectcontrol_frame;
87     Gtk::Frame effectlist_frame;
88     Gtk::HBox effectapplication_hbox;
89     Gtk::VBox effectcontrol_vbox;
90     Gtk::VBox effectlist_vbox;
91     Gtk::Tooltips tooltips;
92     ModelColumns columns;
93     Gtk::ScrolledWindow scrolled_window;
94     Gtk::TreeView effectlist_view;
95     Glib::RefPtr<Gtk::ListStore> effectlist_store;
96     Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
97     
98     Gtk::Toolbar toolbar;
99     Gtk::ToolButton button_up;
100     Gtk::ToolButton button_down;
101     Gtk::Button button_apply;
102     Gtk::ToolButton button_remove;
103     /*Gtk::HButtonBox button_hbox;
104     Gtk::Button button_up;
105     Gtk::Button button_down;
106     Gtk::Button button_apply;
107     Gtk::Button button_remove;*/
109     SPDesktop * current_desktop;
110     
111     SPLPEItem * current_lpeitem;
113     LivePathEffectEditor(LivePathEffectEditor const &d);
114     LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
115 };
117 } // namespace Dialog
118 } // namespace UI
119 } // namespace Inkscape
121 #endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
123 /*
124   Local Variables:
125   mode:c++
126   c-file-style:"stroustrup"
127   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
128   indent-tabs-mode:nil
129   fill-column:99
130   End:
131 */
132 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :