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
7namespace Gtk {
8class ToggleButton;
9}
10
11namespace Inkscape {
12namespace UI {
13
21{
22public:
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
46private:
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 :
Data type representing a typeless value of a preference.
Base class for preference observers.
Definition preferences.h:82
A simple mediator class that sets the state of a Gtk::ToggleButton when a preference is changed.
~SimplePrefPusher() override
Destructor that unregisters the preference callback.
void notify(Inkscape::Preferences::Entry const &new_val) override
Callback method invoked when the preference setting changes.
Definition desktop.h:50
Helper class to stream background task notifications as a series of messages.
Singleton class to access the preferences file in a convenient way.