Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
bool.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_BOOL_H
3#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_BOOL_H
4
5/*
6 * Inkscape::LivePathEffectParameters
7 *
8 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
9 *
10 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
11 */
12
13#include <glib.h>
14
16
17namespace Inkscape {
18
19namespace LivePathEffect {
20
21
22class BoolParam : public Parameter {
23public:
24 BoolParam( const Glib::ustring& label,
25 const Glib::ustring& tip,
26 const Glib::ustring& key,
28 Effect* effect,
29 bool default_value = false);
30 ~BoolParam() override;
31 BoolParam(const BoolParam&) = delete;
32 BoolParam& operator=(const BoolParam&) = delete;
33
34 Gtk::Widget * param_newWidget() override;
35
36 bool param_readSVGValue(const gchar * strvalue) override;
37 Glib::ustring param_getSVGValue() const override;
38 Glib::ustring param_getDefaultSVGValue() const override;
39
40 void param_setValue(bool newvalue);
41 void param_set_default() override;
42 void param_update_default(bool const default_value);
43 void param_update_default(const gchar * default_value) override;
44 bool get_value() const { return value; };
45 inline operator bool() const { return value; };
46 ParamType paramType() const override { return ParamType::BOOL; };
47
48private:
49 bool value;
51};
52
53
54} //namespace LivePathEffect
55
56} //namespace Inkscape
57
58#endif
BoolParam & operator=(const BoolParam &)=delete
bool param_readSVGValue(const gchar *strvalue) override
Definition bool.cpp:50
Glib::ustring param_getSVGValue() const override
Definition bool.cpp:57
Gtk::Widget * param_newWidget() override
Definition bool.cpp:69
void param_set_default() override
Definition bool.cpp:32
Glib::ustring param_getDefaultSVGValue() const override
Definition bool.cpp:63
ParamType paramType() const override
Definition bool.h:46
void param_setValue(bool newvalue)
Definition bool.cpp:89
BoolParam(const BoolParam &)=delete
void param_update_default(bool const default_value)
Definition bool.cpp:38
Glib::ustring label
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key