Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
message.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_MESSAGE_H
3#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_MESSAGE_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
18class MessageParam : public Parameter {
19public:
20 MessageParam( const Glib::ustring& label,
21 const Glib::ustring& tip,
22 const Glib::ustring& key,
24 Effect* effect,
25 const gchar * default_message = "Default message",
26 Glib::ustring legend = "Use Label",
27 Gtk::Align halign = Gtk::Align::START,
28 Gtk::Align valign = Gtk::Align::CENTER,
29 double marginstart = 6,
30 double marginend = 6);
31 ~MessageParam() override = default;
32
33 Gtk::Widget * param_newWidget() override;
34 bool param_readSVGValue(const gchar * strvalue) override;
35 void param_update_default(const gchar * default_value) override;
36 Glib::ustring param_getSVGValue() const override;
37 Glib::ustring param_getDefaultSVGValue() const override;
38
39 void param_setValue(const gchar * message);
40
41 void param_set_default() override;
43 const gchar * get_value() const { return defmessage.c_str(); };
44 ParamType paramType() const override { return ParamType::MESSAGE; };
45private:
46 Gtk::Label * _label;
48 MessageParam(const MessageParam&) = delete;
50 Glib::ustring defmessage;
51 Glib::ustring _legend;
52 Gtk::Align _halign;
53 Gtk::Align _valign;
55 double _marginend;
56};
57
58} //namespace LivePathEffect
59
60} //namespace Inkscape
61
62#endif
63
64/*
65 Local Variables:
66 mode:c++
67 c-file-style:"stroustrup"
68 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
69 indent-tabs-mode:nil
70 fill-column:99
71 End:
72*/
73// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
Glib::ustring param_getSVGValue() const override
Definition message.cpp:63
bool param_readSVGValue(const gchar *strvalue) override
Definition message.cpp:52
void param_setValue(const gchar *message)
Definition message.cpp:108
MessageParam(const MessageParam &)=delete
MessageParam & operator=(const MessageParam &)=delete
void param_update_default(const gchar *default_value) override
Definition message.cpp:47
Gtk::Widget * param_newWidget() override
Definition message.cpp:87
ParamType paramType() const override
Definition message.h:44
Glib::ustring param_getDefaultSVGValue() const override
Definition message.cpp:71
const gchar * get_value() const
Definition message.h:43
Glib::ustring label
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
double height