diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-04 22:15:41 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-04 22:15:41 +0200 |
| commit | 96ce3ba51c152e854bcc5e7df1c53fe776ca554b (patch) | |
| tree | c07be8db33039a6768ea4734985dbb870b46fb03 /src/switchrow.cpp | |
| parent | 823220763f9a7cdee60bc1c77903ca9d2869e426 (diff) | |
| download | libadwaitamm-96ce3ba51c152e854bcc5e7df1c53fe776ca554b.tar.xz libadwaitamm-96ce3ba51c152e854bcc5e7df1c53fe776ca554b.zip | |
adw: clean up property definitions
Diffstat (limited to 'src/switchrow.cpp')
| -rw-r--r-- | src/switchrow.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/switchrow.cpp b/src/switchrow.cpp index 0aab454..9c0245e 100644 --- a/src/switchrow.cpp +++ b/src/switchrow.cpp @@ -5,6 +5,7 @@ #include <glibmm/class.h> #include <glibmm/object.h> #include <glibmm/objectbase.h> +#include <glibmm/propertyproxy.h> #include <glibmm/refptr.h> #include <glibmm/wrap.h> @@ -68,6 +69,26 @@ namespace Adwaita { } + auto SwitchRow::get_active() const noexcept -> bool + { + return adw_switch_row_get_active(const_cast<BaseObjectType *>(unwrap(this))); + } + + auto SwitchRow::set_active(bool value) noexcept -> void + { + adw_switch_row_set_active(unwrap(this), value); + } + + auto SwitchRow::property_active() -> Glib::PropertyProxy<bool> + { + return Glib::PropertyProxy<bool>{this, "active"}; + } + + auto SwitchRow::property_active() const -> Glib::PropertyProxy_ReadOnly<bool> + { + return Glib::PropertyProxy_ReadOnly<bool>{this, "active"}; + } + } // namespace Adwaita namespace Glib |
