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/include/adwaitamm/switchrow.hpp | |
| parent | c563d8c5b0a4d46676ea21920381c32dbdd66159 (diff) | |
| download | turns-b95258f419c62f7f38ec6128568df5897e4f5696.tar.xz turns-b95258f419c62f7f38ec6128568df5897e4f5696.zip | |
adw: clean up property definitions
Diffstat (limited to 'adw/include/adwaitamm/switchrow.hpp')
| -rw-r--r-- | adw/include/adwaitamm/switchrow.hpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/adw/include/adwaitamm/switchrow.hpp b/adw/include/adwaitamm/switchrow.hpp index 37e2e05..622b58a 100644 --- a/adw/include/adwaitamm/switchrow.hpp +++ b/adw/include/adwaitamm/switchrow.hpp @@ -3,11 +3,11 @@ #include "helpers/gobj_mixin.hpp" #include "adwaitamm/actionrow.hpp" -#include "adwaitamm/helpers/properties.hpp" #include <glibmm/class.h> #include <glibmm/object.h> #include <glibmm/objectbase.h> +#include <glibmm/propertyproxy.h> #include <glibmm/refptr.h> #include <glibmm/ustring.h> @@ -57,27 +57,17 @@ namespace Adwaita auto static get_type() -> GType; auto static get_base_type() -> GType; - auto get_active(this auto && self) noexcept; + auto get_active() const noexcept -> bool; + auto set_active(bool value) noexcept -> void; - auto get_active(Gtk::Widget & widget) noexcept -> CppObjectType &; - - auto property_active(this auto && self); + auto property_active() -> Glib::PropertyProxy<bool>; + auto property_active() const -> Glib::PropertyProxy_ReadOnly<bool>; protected: explicit SwitchRow(Glib::ConstructParams const & params); explicit SwitchRow(BaseObjectType * gobj); }; - auto SwitchRow::get_active(this auto && self) noexcept - { - return self.property_active().value(); - } - - auto SwitchRow::property_active(this auto && self) - { - return helpers::make_property_proxy<bool>(self, "active"); - } - } // namespace Adwaita namespace Glib |
