summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/livepatheffect-editor.h
blob: 5a40cfd307403fd2b5e6548a9fa45e770d9720b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
 * \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 "dialog.h"
#include "ui/widget/button.h"

#include <gtkmm/label.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/frame.h>
#include "ui/widget/combo-enums.h"
#include "live_effects/effect.h"

class SPDesktop;

namespace Inkscape {

namespace UI {
namespace Dialog {

class LivePathEffectEditor : public Dialog {
public:
    LivePathEffectEditor(Behavior::BehaviorFactory behavior_factory);
    virtual ~LivePathEffectEditor();

    static LivePathEffectEditor *create(Behavior::BehaviorFactory behavior_factory)
    { return new LivePathEffectEditor(behavior_factory); }

    void onSelectionChanged(Inkscape::Selection *sel);
    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);

    // callback methods for buttons on grids page.
    void onApply();
    void onRemove();

    Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
    Inkscape::UI::Widget::Button button_apply;
    Inkscape::UI::Widget::Button button_remove;
    Gtk::Widget * effectwidget;
    Gtk::Label explain_label;
    Gtk::Frame effectapplication_frame;
    Gtk::Frame effectcontrol_frame;
    Gtk::HBox effectapplication_hbox;
    Gtk::VBox effectcontrol_vbox;

    SPDesktop * current_desktop;

    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 :