diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/ui/widget/gradient-selector-interface.h | |
parent | Initial commit. (diff) | |
download | inkscape-upstream.tar.xz inkscape-upstream.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/ui/widget/gradient-selector-interface.h | 32 |
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 |