Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
simple-pref-pusher.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
#ifndef SEEN_SIMPLE_PREF_PUSHER_H
3
#define SEEN_SIMPLE_PREF_PUSHER_H
4
5
#include "
preferences.h
"
6
7
namespace
Gtk
{
8
class
ToggleButton;
9
}
10
11
namespace
Inkscape
{
12
namespace
UI {
13
20
class
SimplePrefPusher
:
public
Inkscape::Preferences::Observer
21
{
22
public
:
33
SimplePrefPusher
(Gtk::ToggleButton *btn, Glib::ustring
const
&path);
34
38
~SimplePrefPusher
()
override
;
39
43
void
notify
(
Inkscape::Preferences::Entry
const
&new_val)
override
;
44
45
46
private
:
47
Gtk::ToggleButton *
_btn
;
48
bool
freeze
;
49
};
50
51
}
52
}
53
#endif
54
55
/*
56
Local Variables:
57
mode:c++
58
c-file-style:"stroustrup"
59
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
60
indent-tabs-mode:nil
61
fill-column:99
62
End:
63
*/
64
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Inkscape::Preferences::Entry
Data type representing a typeless value of a preference.
Definition
preferences.h:152
Inkscape::Preferences::Observer
Base class for preference observers.
Definition
preferences.h:82
Inkscape::UI::SimplePrefPusher
A simple mediator class that sets the state of a Gtk::ToggleButton when a preference is changed.
Definition
simple-pref-pusher.h:21
Inkscape::UI::SimplePrefPusher::~SimplePrefPusher
~SimplePrefPusher() override
Destructor that unregisters the preference callback.
Definition
simple-pref-pusher.cpp:21
Inkscape::UI::SimplePrefPusher::notify
void notify(Inkscape::Preferences::Entry const &new_val) override
Callback method invoked when the preference setting changes.
Definition
simple-pref-pusher.cpp:27
Inkscape::UI::SimplePrefPusher::freeze
bool freeze
Definition
simple-pref-pusher.h:48
Inkscape::UI::SimplePrefPusher::_btn
Gtk::ToggleButton * _btn
Definition
simple-pref-pusher.h:47
Gtk
Definition
desktop.h:50
Inkscape
Helper class to stream background task notifications as a series of messages.
Definition
actions-canvas-snapping.h:27
preferences.h
Singleton class to access the preferences file in a convenient way.
src
ui
simple-pref-pusher.h
Generated on Sun Jul 13 2025 04:02:21 for Inkscape by
1.9.8