summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/gradient-selector-interface.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
commitc853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch)
tree7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/ui/widget/gradient-selector-interface.h
parentInitial commit. (diff)
downloadinkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz
inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ui/widget/gradient-selector-interface.h')
-rw-r--r--src/ui/widget/gradient-selector-interface.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ui/widget/gradient-selector-interface.h b/src/ui/widget/gradient-selector-interface.h
new file mode 100644
index 0000000..b6833cf
--- /dev/null
+++ b/src/ui/widget/gradient-selector-interface.h
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef SEEN_GRADIENT_SELECTOR_INTERFACE_H
+#define SEEN_GRADIENT_SELECTOR_INTERFACE_H
+
+#include "object/sp-gradient.h"
+#include "object/sp-gradient-spread.h"
+#include "object/sp-gradient-units.h"
+
+class GradientSelectorInterface {
+public:
+ enum SelectorMode { MODE_LINEAR, MODE_RADIAL, MODE_SWATCH };
+
+ // pass gradient object (SPLinearGradient or SPRadialGradient)
+ virtual void setGradient(SPGradient* gradient) = 0;
+
+ virtual SPGradient* getVector() = 0;
+ virtual void setVector(SPDocument* doc, SPGradient* vector) = 0;
+ virtual void setMode(SelectorMode mode) = 0;
+ virtual void setUnits(SPGradientUnits units) = 0;
+ virtual SPGradientUnits getUnits() = 0;
+ virtual void setSpread(SPGradientSpread spread) = 0;
+ virtual SPGradientSpread getSpread() = 0;
+ virtual void selectStop(SPStop* selected) {};
+
+ sigc::signal<void (SPStop*)>& signal_stop_selected() { return _signal_stop_selected; }
+ void emit_stop_selected(SPStop* stop) { _signal_stop_selected.emit(stop); }
+
+private:
+ sigc::signal<void (SPStop*)> _signal_stop_selected;
+};
+
+#endif