summaryrefslogtreecommitdiff
path: root/adw/src/preferencesrow.cpp
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
commitb95258f419c62f7f38ec6128568df5897e4f5696 (patch)
treecb8a0820980b624a1e502a7a7500583242b536e7 /adw/src/preferencesrow.cpp
parentc563d8c5b0a4d46676ea21920381c32dbdd66159 (diff)
downloadturns-b95258f419c62f7f38ec6128568df5897e4f5696.tar.xz
turns-b95258f419c62f7f38ec6128568df5897e4f5696.zip
adw: clean up property definitions
Diffstat (limited to 'adw/src/preferencesrow.cpp')
-rw-r--r--adw/src/preferencesrow.cpp69
1 files changed, 65 insertions, 4 deletions
diff --git a/adw/src/preferencesrow.cpp b/adw/src/preferencesrow.cpp
index a586027..fe6410f 100644
--- a/adw/src/preferencesrow.cpp
+++ b/adw/src/preferencesrow.cpp
@@ -3,6 +3,7 @@
#include <glibmm/class.h>
#include <glibmm/object.h>
#include <glibmm/objectbase.h>
+#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <glibmm/utility.h>
@@ -55,12 +56,42 @@ namespace Adwaita
return adw_preferences_row_get_type();
}
+ PreferencesRow::PreferencesRow(Glib::ConstructParams const & params)
+ : Gtk::ListBoxRow{params}
+ {
+ }
+
+ PreferencesRow::PreferencesRow(BaseObjectType * gobj)
+ : Gtk::ListBoxRow(GTK_LIST_BOX_ROW(gobj))
+ {
+ }
+
PreferencesRow::PreferencesRow()
: Glib::ObjectBase{nullptr}
, Gtk::ListBoxRow{Glib::ConstructParams{_class.init()}}
{
}
+ auto PreferencesRow::get_title() const -> Glib::ustring
+ {
+ return adw_preferences_row_get_title(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto PreferencesRow::get_title_selectable() const noexcept -> bool
+ {
+ return adw_preferences_row_get_title_selectable(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto PreferencesRow::get_use_markup() const noexcept -> bool
+ {
+ return adw_preferences_row_get_use_markup(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto PreferencesRow::get_use_underline() const noexcept -> bool
+ {
+ return adw_preferences_row_get_use_underline(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
auto PreferencesRow::set_title(Glib::ustring const & title) -> CppObjectType &
{
adw_preferences_row_set_title(Glib::unwrap(this), title.c_str());
@@ -85,14 +116,44 @@ namespace Adwaita
return *this;
}
- PreferencesRow::PreferencesRow(Glib::ConstructParams const & params)
- : Gtk::ListBoxRow{params}
+ auto PreferencesRow::property_title() -> Glib::PropertyProxy<Glib::ustring>
{
+ return Glib::PropertyProxy<Glib::ustring>{this, "title"};
}
- PreferencesRow::PreferencesRow(BaseObjectType * gobj)
- : Gtk::ListBoxRow(GTK_LIST_BOX_ROW(gobj))
+ auto PreferencesRow::property_title() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>
+ {
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>{this, "title"};
+ }
+
+ auto PreferencesRow::property_title_selectable() -> Glib::PropertyProxy<bool>
+ {
+ return Glib::PropertyProxy<bool>{this, "title-selectable"};
+ }
+
+ auto PreferencesRow::property_title_selectable() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return Glib::PropertyProxy_ReadOnly<bool>{this, "title-selectable"};
+ }
+
+ auto PreferencesRow::property_use_markup() -> Glib::PropertyProxy<bool>
+ {
+ return Glib::PropertyProxy<bool>{this, "use-markup"};
+ }
+
+ auto PreferencesRow::property_use_markup() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return Glib::PropertyProxy_ReadOnly<bool>{this, "use-markup"};
+ }
+
+ auto PreferencesRow::property_use_underline() -> Glib::PropertyProxy<bool>
+ {
+ return Glib::PropertyProxy<bool>{this, "use-underline"};
+ }
+
+ auto PreferencesRow::property_use_underline() const -> Glib::PropertyProxy_ReadOnly<bool>
{
+ return Glib::PropertyProxy_ReadOnly<bool>{this, "use-underline"};
}
} // namespace Adwaita