index 1a4285dd9300cf24882fa6e70dddbbaee640766b..3d105dfd094bb915bb66d60af7a3f67fe01dc831 100644 (file)
#include <gtkmm/treeview.h>
#include "attributes.h"
-#include "dialog.h"
+#include "ui/widget/panel.h"
#include "sp-filter.h"
#include "ui/widget/combo-enums.h"
#include "ui/widget/spin-slider.h"
class DualSpinButton;
class MultiSpinButton;
-class FilterEffectsDialog : public Dialog {
+class FilterEffectsDialog : public UI::Widget::Panel {
public:
+
+ FilterEffectsDialog();
~FilterEffectsDialog();
- void set_attrs_locked(const bool);
+ static FilterEffectsDialog &getInstance()
+ { return *new FilterEffectsDialog(); }
- static FilterEffectsDialog *create() { return new FilterEffectsDialog(); }
+ void set_attrs_locked(const bool);
+protected:
+ virtual void show_all_vfunc();
private:
class SignalObserver;
Gtk::TreeModelColumn<int> sel;
};
- class CellRendererSel : public Gtk::CellRenderer
- {
- public:
- CellRendererSel();
-
- Glib::PropertyProxy<int> property_sel()
- {
- return _sel.get_proxy();
- }
- protected:
- virtual void get_size_vfunc(Gtk::Widget&, const Gdk::Rectangle*,
- int*, int*, int*, int*) const;
- virtual void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& win, Gtk::Widget& w,
- const Gdk::Rectangle& bg_area, const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area, Gtk::CellRendererState flags);
- private:
- const int _size;
- Glib::Property<int> _sel;
- };
-
static void on_activate_desktop(Application*, SPDesktop*, FilterModifier*);
void on_document_replaced(SPDesktop*, SPDocument*)
{
void update_selection(Selection *);
void on_filter_selection_changed();
+ void on_name_edited(const Glib::ustring&, const Glib::ustring&);
+ void on_selection_toggled(const Glib::ustring&);
+
void update_filters();
- void filter_list_button_press(GdkEventButton*);
void filter_list_button_release(GdkEventButton*);
void add_filter();
void remove_filter();
Gtk::TreeView _list;
Glib::RefPtr<Gtk::ListStore> _model;
Columns _columns;
- CellRendererSel _cell_sel;
+ Gtk::CellRendererToggle _cell_toggle;
Gtk::Button _add;
Glib::RefPtr<Gtk::Menu> _menu;
sigc::signal<void> _signal_filter_changed;
SPFilterPrimitive* get_selected();
void select(SPFilterPrimitive *prim);
+ void remove_selected();
int primitive_count() const;
protected:
std::auto_ptr<SignalObserver> _observer;
};
- FilterEffectsDialog();
void init_settings_widgets();
// Handlers
void update_settings_view();
void update_settings_sensitivity();
void update_color_matrix();
+ void update_primitive_infobox();
// Filter effect selection
FilterModifier _filter_modifier;
+ // Primitives Info Box
+ Gtk::Label _infobox_desc;
+ Gtk::Image _infobox_icon;
+
// View/add primitives
Gtk::VBox _primitive_box;
PrimitiveList _primitive_list;