1 // SPDX-License-Identifier: GPL-2.0-or-later
2 #ifndef SEEN_UI_WIDGET_OBJECT_COMPOSITE_SETTINGS_H
3 #define SEEN_UI_WIDGET_OBJECT_COMPOSITE_SETTINGS_H
4 
5 /*
6  * Authors:
7  *   Bryce W. Harrington <bryce@bryceharrington.org>
8  *   Gustav Broberg <broberg@kth.se>
9  *
10  * Copyright (C) 2004--2007 Authors
11  *
12  * Released under GNU GPL v2+, read the file 'COPYING' for more information.
13  */
14 
15 #include <gtkmm/box.h>
16 #include <gtkmm/adjustment.h>
17 #include <gtkmm/label.h>
18 #include <gtkmm/scale.h>
19 #include <glibmm/ustring.h>
20 
21 #include "ui/widget/filter-effect-chooser.h"
22 
23 class SPDesktop;
24 struct InkscapeApplication;
25 
26 namespace Inkscape {
27 
28 namespace UI {
29 namespace Widget {
30 
31 class StyleSubject;
32 
33 /*
34  * A widget for controlling object compositing (filter, opacity, etc.)
35  */
36 class ObjectCompositeSettings : public Gtk::Box {
37 public:
38     ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, int flags);
39     ~ObjectCompositeSettings() override;
40 
41     void setSubject(StyleSubject *subject);
42 
43 private:
44     unsigned int    _verb_code;
45     Glib::ustring   _blend_tag;
46     Glib::ustring   _blur_tag;
47     Glib::ustring   _opacity_tag;
48     Glib::ustring   _isolation_tag;
49 
50     StyleSubject *_subject = nullptr;
51 
52     SimpleFilterModifier _filter_modifier;
53 
54     bool _blocked;
55     gulong _desktop_activated;
56     sigc::connection _subject_changed;
57 
58     static void _on_desktop_activate(SPDesktop *desktop, ObjectCompositeSettings *w);
59     static void _on_desktop_deactivate(SPDesktop *desktop, ObjectCompositeSettings *w);
60     void _subjectChanged();
61     void _blendBlurValueChanged();
62     void _opacityValueChanged();
63     void _isolationValueChanged();
64 };
65 
66 }
67 }
68 }
69 
70 #endif
71 
72 /*
73   Local Variables:
74   mode:c++
75   c-file-style:"stroustrup"
76   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77   indent-tabs-mode:nil
78   fill-column:99
79   End:
80 */
81 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
82