aboutsummaryrefslogtreecommitdiff
path: root/include/adwaitamm/switchrow.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-04 22:15:41 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-04 22:15:41 +0200
commit96ce3ba51c152e854bcc5e7df1c53fe776ca554b (patch)
treec07be8db33039a6768ea4734985dbb870b46fb03 /include/adwaitamm/switchrow.hpp
parent823220763f9a7cdee60bc1c77903ca9d2869e426 (diff)
downloadlibadwaitamm-96ce3ba51c152e854bcc5e7df1c53fe776ca554b.tar.xz
libadwaitamm-96ce3ba51c152e854bcc5e7df1c53fe776ca554b.zip
adw: clean up property definitions
Diffstat (limited to 'include/adwaitamm/switchrow.hpp')
-rw-r--r--include/adwaitamm/switchrow.hpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/include/adwaitamm/switchrow.hpp b/include/adwaitamm/switchrow.hpp
index 37e2e05..622b58a 100644
--- a/include/adwaitamm/switchrow.hpp
+++ b/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