Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / ui / dialog / livepatheffect-editor.h
1 /** @file
2  * @brief Live Path Effect editing dialog
3  */
4 /* Author:
5  *   Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
6  *
7  * Copyright (C) 2007 Author
8  * Released under GNU GPL.  Read the file 'COPYING' for more information.
9  */
11 #ifndef INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
12 #define INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
14 #include "ui/widget/panel.h"
15 #include "ui/widget/button.h"
17 #include <gtkmm/label.h>
18 #include <gtkmm/comboboxtext.h>
19 #include <gtkmm/frame.h>
20 #include <gtkmm/tooltips.h>
21 #include "ui/widget/combo-enums.h"
22 #include "live_effects/effect-enum.h"
23 #include <gtkmm/liststore.h>
24 #include <gtkmm/treeview.h>
25 #include <gtkmm/scrolledwindow.h>
26 #include <gtkmm/buttonbox.h>
27 #include <gtkmm/toolbar.h>
30 class SPDesktop;
31 class SPLPEItem;
33 namespace Inkscape {
35 namespace LivePathEffect {
36     class Effect;
37     class LPEObjectReference;
38 }
40 namespace UI {
41 namespace Dialog {
43 class LivePathEffectEditor : public UI::Widget::Panel {
44 public:
45     LivePathEffectEditor();
46     virtual ~LivePathEffectEditor();
48     static LivePathEffectEditor &getInstance() { return *new LivePathEffectEditor(); }
50     void onSelectionChanged(Inkscape::Selection *sel);
51     virtual void on_effect_selection_changed();
52     void setDesktop(SPDesktop *desktop);
54 private:
55     sigc::connection selection_changed_connection;
56     sigc::connection selection_modified_connection;
58     void set_sensitize_all(bool sensitive);
60     void showParams(LivePathEffect::Effect& effect);
61     void showText(Glib::ustring const &str);
62     void selectInList(LivePathEffect::Effect* effect);
64    // void add_entry(const char* name );
65     void effect_list_reload(SPLPEItem *lpeitem);
67     // callback methods for buttons on grids page.
68     void onApply();
69     void onRemove();
71     void onUp();
72     void onDown();
74     class ModelColumns : public Gtk::TreeModel::ColumnRecord
75     {
76       public:
77         ModelColumns()
78         {
79             add(col_name);
80             add(lperef);
81             add(col_visible);
82         }
83         virtual ~ModelColumns() {}
85         Gtk::TreeModelColumn<Glib::ustring> col_name;
86         Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
87         Gtk::TreeModelColumn<bool> col_visible;
88     };
90     bool lpe_list_locked;
92     Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
93     
94     Gtk::Widget * effectwidget;
95     Gtk::Label explain_label;
96     Gtk::Frame effectapplication_frame;
97     Gtk::Frame effectcontrol_frame;
98     Gtk::Frame effectlist_frame;
99     Gtk::HBox effectapplication_hbox;
100     Gtk::VBox effectcontrol_vbox;
101     Gtk::VBox effectlist_vbox;
102     Gtk::Tooltips tooltips;
103     ModelColumns columns;
104     Gtk::ScrolledWindow scrolled_window;
105     Gtk::TreeView effectlist_view;
106     Glib::RefPtr<Gtk::ListStore> effectlist_store;
107     Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
109     void on_visibility_toggled( Glib::ustring const& str );
111     Gtk::Toolbar toolbar;
112     Gtk::ToolButton button_up;
113     Gtk::ToolButton button_down;
114     Gtk::Button button_apply;
115     Gtk::ToolButton button_remove;
116     /*Gtk::HButtonBox button_hbox;
117     Gtk::Button button_up;
118     Gtk::Button button_down;
119     Gtk::Button button_apply;
120     Gtk::Button button_remove;*/
122     SPDesktop * current_desktop;
123     
124     SPLPEItem * current_lpeitem;
126     friend void lpeeditor_selection_changed (Inkscape::Selection * selection, gpointer data);
128     LivePathEffectEditor(LivePathEffectEditor const &d);
129     LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
130 };
132 } // namespace Dialog
133 } // namespace UI
134 } // namespace Inkscape
136 #endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
138 /*
139   Local Variables:
140   mode:c++
141   c-file-style:"stroustrup"
142   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
143   indent-tabs-mode:nil
144   fill-column:99
145   End:
146 */
147 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :