index d99177fdd61a7533d219110ae542586fe76ffc19..a924ed6e9507d9fe01d5aedc306d7bd1acdebc09 100644 (file)
-/**\r
- * \brief LivePathEffect dialog\r
- *\r
- * Author:\r
- * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>\r
- *\r
- * Copyright (C) 2007 Author\r
- *\r
- * Released under GNU GPL. Read the file 'COPYING' for more information.\r
- */\r
-\r
-#ifndef INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H\r
-#define INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H\r
-\r
-#include "dialog.h"\r
-#include "ui/widget/button.h"\r
-\r
-#include <gtkmm/label.h>\r
-#include <gtkmm/comboboxtext.h>\r
-#include <gtkmm/frame.h>\r
-#include "ui/widget/combo-enums.h"\r
-#include "live_effects/effect.h"\r
-\r
-class SPDesktop;\r
-\r
-namespace Inkscape {\r
-\r
-namespace UI {\r
-namespace Dialog {\r
-\r
-class LivePathEffectEditor : public Dialog {\r
-public:\r
- LivePathEffectEditor(Behavior::BehaviorFactory behavior_factory);\r
- virtual ~LivePathEffectEditor();\r
-\r
- static LivePathEffectEditor *create(Behavior::BehaviorFactory behavior_factory)\r
- { return new LivePathEffectEditor(behavior_factory); }\r
-\r
- void onSelectionChanged(Inkscape::Selection *sel);\r
- void setDesktop(SPDesktop *desktop);\r
-\r
-private:\r
- sigc::connection selection_changed_connection;\r
- sigc::connection selection_modified_connection;\r
-\r
- void set_sensitize_all(bool sensitive);\r
-\r
- void showParams(LivePathEffect::Effect* effect);\r
- void showText(Glib::ustring const &str);\r
-\r
- // callback methods for buttons on grids page.\r
- void onApply();\r
- void onRemove();\r
-\r
- Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;\r
- Inkscape::UI::Widget::Button button_apply;\r
- Inkscape::UI::Widget::Button button_remove;\r
- Gtk::Widget * effectwidget;\r
- Gtk::Label explain_label;\r
- Gtk::Frame effectapplication_frame;\r
- Gtk::Frame effectcontrol_frame;\r
- Gtk::VBox effectapplication_vbox;\r
- Gtk::VBox effectcontrol_vbox;\r
-\r
- SPDesktop * current_desktop;\r
-\r
- LivePathEffectEditor(LivePathEffectEditor const &d);\r
- LivePathEffectEditor& operator=(LivePathEffectEditor const &d);\r
-};\r
-\r
-} // namespace Dialog\r
-} // namespace UI\r
-} // namespace Inkscape\r
-\r
-#endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H\r
-\r
-/*\r
- Local Variables:\r
- mode:c++\r
- c-file-style:"stroustrup"\r
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
- indent-tabs-mode:nil\r
- fill-column:99\r
- End:\r
-*/\r
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :\r
+/**
+ * \brief LivePathEffect dialog
+ *
+ * Author:
+ * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
+ *
+ * Copyright (C) 2007 Author
+ *
+ * Released under GNU GPL. Read the file 'COPYING' for more information.
+ */
+
+#ifndef INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
+#define INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
+
+#include "ui/widget/panel.h"
+#include "ui/widget/button.h"
+
+#include <gtkmm/label.h>
+#include <gtkmm/comboboxtext.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/tooltips.h>
+#include "ui/widget/combo-enums.h"
+#include "live_effects/effect.h"
+#include "live_effects/lpeobject-reference.h"
+#include <gtkmm/liststore.h>
+#include <gtkmm/treeview.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/buttonbox.h>
+#include <gtkmm/toolbar.h>
+
+
+class SPDesktop;
+
+namespace Inkscape {
+
+namespace UI {
+namespace Dialog {
+
+class LivePathEffectEditor : public UI::Widget::Panel {
+public:
+ LivePathEffectEditor();
+ virtual ~LivePathEffectEditor();
+
+ static LivePathEffectEditor &getInstance() { return *new LivePathEffectEditor(); }
+
+ void onSelectionChanged(Inkscape::Selection *sel);
+ virtual void on_effect_selection_changed();
+ void setDesktop(SPDesktop *desktop);
+
+private:
+ sigc::connection selection_changed_connection;
+ sigc::connection selection_modified_connection;
+
+ void set_sensitize_all(bool sensitive);
+
+ void showParams(LivePathEffect::Effect* effect);
+ void showText(Glib::ustring const &str);
+ void selectInList(LivePathEffect::Effect* effect);
+
+ // void add_entry(const char* name );
+ void effect_list_reload(SPLPEItem *lpeitem);
+
+ // callback methods for buttons on grids page.
+ void onApply();
+ void onRemove();
+
+ void onUp();
+ void onDown();
+
+ class ModelColumns : public Gtk::TreeModel::ColumnRecord
+ {
+ public:
+ ModelColumns()
+ {
+ add(col_name);
+ add(lperef);
+ add(col_visible);
+ }
+ virtual ~ModelColumns() {}
+
+ Gtk::TreeModelColumn<Glib::ustring> col_name;
+ Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
+ Gtk::TreeModelColumn<bool> col_visible;
+ };
+
+ bool lpe_list_locked;
+
+ Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
+
+ Gtk::Widget * effectwidget;
+ Gtk::Label explain_label;
+ Gtk::Frame effectapplication_frame;
+ Gtk::Frame effectcontrol_frame;
+ Gtk::Frame effectlist_frame;
+ Gtk::HBox effectapplication_hbox;
+ Gtk::VBox effectcontrol_vbox;
+ Gtk::VBox effectlist_vbox;
+ Gtk::Tooltips tooltips;
+ ModelColumns columns;
+ Gtk::ScrolledWindow scrolled_window;
+ Gtk::TreeView effectlist_view;
+ Glib::RefPtr<Gtk::ListStore> effectlist_store;
+ Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
+
+ void on_visibility_toggled( Glib::ustring const& str );
+
+ Gtk::Toolbar toolbar;
+ Gtk::ToolButton button_up;
+ Gtk::ToolButton button_down;
+ Gtk::Button button_apply;
+ Gtk::ToolButton button_remove;
+ /*Gtk::HButtonBox button_hbox;
+ Gtk::Button button_up;
+ Gtk::Button button_down;
+ Gtk::Button button_apply;
+ Gtk::Button button_remove;*/
+
+ SPDesktop * current_desktop;
+
+ SPLPEItem * current_lpeitem;
+
+ LivePathEffectEditor(LivePathEffectEditor const &d);
+ LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
+};
+
+} // namespace Dialog
+} // namespace UI
+} // namespace Inkscape
+
+#endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :