Inkscape
Vector Graphics Editor
|
Callback-based preferences observer. More...
#include <preferences.h>
Public Member Functions | |
~PreferencesObserver () override=default | |
void | call () |
Manually call the observer with the original, unchanged value. | |
Static Public Member Functions | |
static std::unique_ptr< PreferencesObserver > | create (Glib::ustring path, std::function< void(const Preferences::Entry &new_value)> callback) |
Private Member Functions | |
PreferencesObserver (Glib::ustring path, std::function< void(const Preferences::Entry &new_value)> callback) | |
void | notify (Preferences::Entry const &new_val) override |
Notification about a preference change. | |
![]() | |
Observer (Glib::ustring path) | |
Constructor. | |
virtual | ~Observer () |
Private Attributes | |
std::function< void(const Preferences::Entry &)> | _callback |
![]() | |
Glib::ustring const | observed_path |
Path which the observer watches. | |
Callback-based preferences observer.
Definition at line 124 of file preferences.h.
|
overridedefault |
|
private |
Definition at line 1181 of file preferences.cpp.
References Inkscape::Preferences::get().
void Inkscape::Preferences::PreferencesObserver::call | ( | ) |
Manually call the observer with the original, unchanged value.
This is useful for initialisation functions.
Definition at line 1192 of file preferences.cpp.
References Inkscape::Preferences::get().
|
static |
|
overrideprivatevirtual |
Notification about a preference change.
new_val | Entry object containing information about the modified preference. |
Implements Inkscape::Preferences::Observer.
Definition at line 1188 of file preferences.cpp.
|
private |
Definition at line 137 of file preferences.h.