/** * @author Felix Morgner (felix.morgner@gmail.com) * @copyright Copyright (c) 2025 * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "adwaitamm/preferencesrow.hpp" #include "adwaitamm/private/preferencesrow_p.hpp" #include #include #include #include #include #include #include #include namespace Adwaita { namespace { auto constinit _class = PreferencesRow_Class{}; } // namespace auto PreferencesRow::get_type() -> GType { return _class.init().get_type(); } auto PreferencesRow::get_base_type() -> GType { 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(unwrap(this))); } auto PreferencesRow::get_title_selectable() const noexcept -> bool { return adw_preferences_row_get_title_selectable(const_cast(unwrap(this))); } auto PreferencesRow::get_use_markup() const noexcept -> bool { return adw_preferences_row_get_use_markup(const_cast(unwrap(this))); } auto PreferencesRow::get_use_underline() const noexcept -> bool { return adw_preferences_row_get_use_underline(const_cast(unwrap(this))); } auto PreferencesRow::set_title(Glib::ustring const & title) -> CppObjectType & { adw_preferences_row_set_title(Glib::unwrap(this), title.c_str()); return *this; } auto PreferencesRow::set_title_selectable(bool selectable) noexcept -> CppObjectType & { adw_preferences_row_set_title_selectable(Glib::unwrap(this), selectable); return *this; } auto PreferencesRow::set_use_markup(bool use) noexcept -> CppObjectType & { adw_preferences_row_set_use_markup(Glib::unwrap(this), use); return *this; } auto PreferencesRow::set_use_underline(bool use) noexcept -> CppObjectType & { adw_preferences_row_set_use_underline(Glib::unwrap(this), use); return *this; } auto PreferencesRow::property_title() -> Glib::PropertyProxy { return Glib::PropertyProxy{this, "title"}; } auto PreferencesRow::property_title() const -> Glib::PropertyProxy_ReadOnly { return Glib::PropertyProxy_ReadOnly{this, "title"}; } auto PreferencesRow::property_title_selectable() -> Glib::PropertyProxy { return Glib::PropertyProxy{this, "title-selectable"}; } auto PreferencesRow::property_title_selectable() const -> Glib::PropertyProxy_ReadOnly { return Glib::PropertyProxy_ReadOnly{this, "title-selectable"}; } auto PreferencesRow::property_use_markup() -> Glib::PropertyProxy { return Glib::PropertyProxy{this, "use-markup"}; } auto PreferencesRow::property_use_markup() const -> Glib::PropertyProxy_ReadOnly { return Glib::PropertyProxy_ReadOnly{this, "use-markup"}; } auto PreferencesRow::property_use_underline() -> Glib::PropertyProxy { return Glib::PropertyProxy{this, "use-underline"}; } auto PreferencesRow::property_use_underline() const -> Glib::PropertyProxy_ReadOnly { return Glib::PropertyProxy_ReadOnly{this, "use-underline"}; } } // namespace Adwaita namespace Glib { auto wrap(AdwPreferencesRow * object, bool copy) -> Adwaita::PreferencesRow * { return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib