Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
colorpicker.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_COLOR_BUTTON_H
3#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_COLOR_BUTTON_H
4
5/*
6 * Inkscape::LivePathEffectParameters
7 *
8 * Authors:
9 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 */
11#include <glib.h>
13
14namespace Inkscape {
15
16namespace LivePathEffect {
17
19public:
20 ColorPickerParam( const Glib::ustring& label,
21 const Glib::ustring& tip,
22 const Glib::ustring& key,
24 Effect* effect,
25 std::optional<Colors::Color> = {});
26 ~ColorPickerParam() override = default;
27
28 Gtk::Widget * param_newWidget() override;
29 bool param_readSVGValue(const gchar * strvalue) override;
30 void param_update_default(const gchar * default_value) override;
31 Glib::ustring param_getSVGValue() const override;
32 Glib::ustring param_getDefaultSVGValue() const override;
33
34 void param_setValue(std::optional<Colors::Color> newvalue);
35
36 void param_set_default() override;
37
38 std::optional<Colors::Color> get_value() const { return value; };
39 ParamType paramType() const override { return ParamType::COLOR_PICKER; };
40
41private:
44 std::optional<Colors::Color> value;
45 std::optional<Colors::Color> defvalue;
46};
47
48} //namespace LivePathEffect
49
50} //namespace Inkscape
51
52#endif
53
54/*
55 Local Variables:
56 mode:c++
57 c-file-style:"stroustrup"
58 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59 indent-tabs-mode:nil
60 fill-column:99
61 End:
62*/
63// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
void param_setValue(std::optional< Colors::Color > newvalue)
std::optional< Colors::Color > value
Definition colorpicker.h:44
Glib::ustring param_getDefaultSVGValue() const override
bool param_readSVGValue(const gchar *strvalue) override
ParamType paramType() const override
Definition colorpicker.h:39
ColorPickerParam(const ColorPickerParam &)=delete
ColorPickerParam & operator=(const ColorPickerParam &)=delete
void param_update_default(const gchar *default_value) override
std::optional< Colors::Color > defvalue
Definition colorpicker.h:45
std::optional< Colors::Color > get_value() const
Definition colorpicker.h:38
Glib::ustring param_getSVGValue() const override
Glib::ustring label
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key