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 | b95258f419c62f7f38ec6128568df5897e4f5696 (patch) | |
| tree | cb8a0820980b624a1e502a7a7500583242b536e7 /adw/src/switchrow.cpp | |
| parent | c563d8c5b0a4d46676ea21920381c32dbdd66159 (diff) | |
| download | turns-b95258f419c62f7f38ec6128568df5897e4f5696.tar.xz turns-b95258f419c62f7f38ec6128568df5897e4f5696.zip | |
adw: clean up property definitions
Diffstat (limited to 'adw/src/switchrow.cpp')
| -rw-r--r-- | adw/src/switchrow.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/adw/src/switchrow.cpp b/adw/src/switchrow.cpp index 0aab454..9c0245e 100644 --- a/adw/src/switchrow.cpp +++ b/adw/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 |
