Code

make visibility icon in LPE stack dialog clickable
[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;
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_reload(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             add(col_visible);
77         }
78         virtual ~ModelColumns() {}
80         Gtk::TreeModelColumn<Glib::ustring> col_name;
81         Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
82         Gtk::TreeModelColumn<bool> col_visible;
83     };
85     Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
86     
87     Gtk::Widget * effectwidget;
88     Gtk::Label explain_label;
89     Gtk::Frame effectapplication_frame;
90     Gtk::Frame effectcontrol_frame;
91     Gtk::Frame effectlist_frame;
92     Gtk::HBox effectapplication_hbox;
93     Gtk::VBox effectcontrol_vbox;
94     Gtk::VBox effectlist_vbox;
95     Gtk::Tooltips tooltips;
96     ModelColumns columns;
97     Gtk::ScrolledWindow scrolled_window;
98     Gtk::TreeView effectlist_view;
99     Glib::RefPtr<Gtk::ListStore> effectlist_store;
100     Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
102     void on_visibility_toggled( Glib::ustring const& str );
104     Gtk::Toolbar toolbar;
105     Gtk::ToolButton button_up;
106     Gtk::ToolButton button_down;
107     Gtk::Button button_apply;
108     Gtk::ToolButton button_remove;
109     /*Gtk::HButtonBox button_hbox;
110     Gtk::Button button_up;
111     Gtk::Button button_down;
112     Gtk::Button button_apply;
113     Gtk::Button button_remove;*/
115     SPDesktop * current_desktop;
116     
117     SPLPEItem * current_lpeitem;
119     LivePathEffectEditor(LivePathEffectEditor const &d);
120     LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
121 };
123 } // namespace Dialog
124 } // namespace UI
125 } // namespace Inkscape
127 #endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
129 /*
130   Local Variables:
131   mode:c++
132   c-file-style:"stroustrup"
133   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
134   indent-tabs-mode:nil
135   fill-column:99
136   End:
137 */
138 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :