diff options
Diffstat (limited to 'adw/src/actionrow.cpp')
| -rw-r--r-- | adw/src/actionrow.cpp | 246 |
1 files changed, 0 insertions, 246 deletions
diff --git a/adw/src/actionrow.cpp b/adw/src/actionrow.cpp deleted file mode 100644 index f17eef3..0000000 --- a/adw/src/actionrow.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/actionrow.hpp" - -#include "adwaitamm/preferencesrow.hpp" -#include "adwaitamm/private/actionrow_p.hpp" - -#include <glibmm/object.h> -#include <glibmm/objectbase.h> -#include <glibmm/propertyproxy.h> -#include <glibmm/refptr.h> -#include <glibmm/signalproxy.h> -#include <glibmm/ustring.h> -#include <glibmm/wrap.h> - -#include <gtkmm/widget.h> - -#include <glib-object.h> -#include <glib.h> - -namespace Adwaita - -{ - namespace - { - auto constinit _class = ActionRow_Class{}; - - namespace property_name - { - auto constexpr activatable_widget = "activatable-widget"; - auto constexpr icon_name = "icon-name"; - auto constexpr subtitle = "subtitle"; - auto constexpr subtitle_lines = "subtitle-lines"; - auto constexpr subtitle_selectable = "subtitle-selectable"; - auto constexpr title_lines = "title-lines"; - } // namespace property_name - - namespace signal_info - { - auto const static activated = Glib::SignalProxyInfo{ - "activated", - reinterpret_cast<GCallback>(&Glib::SignalProxyNormal::slot0_void_callback), - reinterpret_cast<GCallback>(&Glib::SignalProxyNormal::slot0_void_callback), - }; - } // namespace signal_info - } // namespace - - ActionRow::ActionRow() - : Glib::ObjectBase{nullptr} - , PreferencesRow{Glib::ConstructParams{_class.init()}} - { - } - - auto ActionRow::get_type() -> GType - { - return _class.init().get_type(); - } - - auto ActionRow::get_base_type() -> GType - { - return adw_action_row_get_type(); - } - - auto ActionRow::activate() -> void - { - return adw_action_row_activate(unwrap(this)); - } - - auto ActionRow::add_prefix(Gtk::Widget & widget) -> void - { - return adw_action_row_add_prefix(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::add_suffix(Gtk::Widget & widget) -> void - { - return adw_action_row_add_suffix(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::remove(Gtk::Widget & widget) -> void - { - return adw_action_row_remove(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::get_activatable_widget() const noexcept -> Gtk::Widget * - { - return Glib::wrap(adw_action_row_get_activatable_widget(const_cast<BaseObjectType *>(unwrap(this)))); - } - - auto ActionRow::get_icon_name() const -> Glib::ustring - { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - return adw_action_row_get_icon_name(const_cast<BaseObjectType *>(unwrap(this))); -#pragma GCC diagnostic pop - } - - auto ActionRow::get_subtitle() const -> Glib::ustring - { - return adw_action_row_get_subtitle(const_cast<BaseObjectType *>(unwrap(this))); - } - - auto ActionRow::get_subtitle_lines() const noexcept -> int - { - return adw_action_row_get_subtitle_lines(const_cast<BaseObjectType *>(unwrap(this))); - } - - auto ActionRow::get_subtitle_selectable() const noexcept -> bool - { - return adw_action_row_get_subtitle_selectable(const_cast<BaseObjectType *>(unwrap(this))); - } - - auto ActionRow::get_title_lines() const noexcept -> int - { - return adw_action_row_get_title_lines(const_cast<BaseObjectType *>(unwrap(this))); - } - - auto ActionRow::set_activatable_widget(Gtk::Widget & widget) noexcept -> void - { - adw_action_row_set_activatable_widget(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::set_icon_name(Glib::ustring const & name) -> void - { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - adw_action_row_set_icon_name(unwrap(this), name.c_str()); -#pragma GCC diagnostic pop - } - - auto ActionRow::set_subtitle(Glib::ustring const & subtitle) -> void - { - adw_action_row_set_subtitle(unwrap(this), subtitle.c_str()); - } - - auto ActionRow::set_subtitle_lines(int subtitle_lines) noexcept -> void - { - adw_action_row_set_subtitle_lines(unwrap(this), subtitle_lines); - } - - auto ActionRow::set_subtitle_selectable(bool subtitle_selectable) noexcept -> void - { - adw_action_row_set_subtitle_selectable(unwrap(this), static_cast<gboolean>(subtitle_selectable)); - } - - auto ActionRow::set_title_lines(int title_lines) noexcept -> void - { - adw_action_row_set_title_lines(unwrap(this), title_lines); - } - - auto ActionRow::property_activatable_widget() noexcept -> Glib::PropertyProxy<Gtk::Widget *> - { - return Glib::PropertyProxy<Gtk::Widget *>(this, property_name::activatable_widget); - } - - auto ActionRow::property_activatable_widget() const noexcept -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *> - { - return Glib::PropertyProxy_ReadOnly<Gtk::Widget *>(this, property_name::activatable_widget); - } - - auto ActionRow::property_icon_name() noexcept -> Glib::PropertyProxy<Glib::ustring> - { - return Glib::PropertyProxy<Glib::ustring>(this, property_name::icon_name); - } - - auto ActionRow::property_icon_name() const noexcept -> Glib::PropertyProxy_ReadOnly<Glib::ustring> - { - return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, property_name::icon_name); - } - - auto ActionRow::property_subtitle() noexcept -> Glib::PropertyProxy<Glib::ustring> - { - return Glib::PropertyProxy<Glib::ustring>(this, property_name::subtitle); - } - - auto ActionRow::property_subtitle() const noexcept -> Glib::PropertyProxy_ReadOnly<Glib::ustring> - { - return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, property_name::subtitle); - } - - auto ActionRow::property_subtitle_lines() noexcept -> Glib::PropertyProxy<int> - { - return Glib::PropertyProxy<int>(this, property_name::subtitle_lines); - } - - auto ActionRow::property_subtitle_lines() const noexcept -> Glib::PropertyProxy_ReadOnly<int> - { - return Glib::PropertyProxy_ReadOnly<int>(this, property_name::subtitle_lines); - } - - auto ActionRow::property_subtitle_selectable() noexcept -> Glib::PropertyProxy<bool> - { - return Glib::PropertyProxy<bool>(this, property_name::subtitle_selectable); - } - - auto ActionRow::property_subtitle_selectable() const noexcept -> Glib::PropertyProxy_ReadOnly<bool> - { - return Glib::PropertyProxy_ReadOnly<bool>(this, property_name::subtitle_selectable); - } - - auto ActionRow::property_title_lines() noexcept -> Glib::PropertyProxy<int> - { - return Glib::PropertyProxy<int>(this, property_name::title_lines); - } - - auto ActionRow::property_title_lines() const noexcept -> Glib::PropertyProxy_ReadOnly<int> - { - return Glib::PropertyProxy_ReadOnly<int>(this, property_name::title_lines); - } - - auto ActionRow::signal_activated() -> Glib::SignalProxy<void()> - { - return Glib::SignalProxy<void()>{this, &signal_info::activated}; - } - - auto ActionRow::activate_vfunc() -> void - { - auto base_object = static_cast<BaseClassType *>(g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))); - if (base_object && base_object->activate) - { - (base_object->activate)(unwrap(this)); - } - } - - ActionRow::ActionRow(Glib::ConstructParams const & params) - : PreferencesRow{params} - { - } - - ActionRow::ActionRow(BaseObjectType * gobj) - : PreferencesRow(ADW_PREFERENCES_ROW(gobj)) - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwActionRow * object, bool copy) -> Adwaita::ActionRow * - { - return dynamic_cast<Adwaita::ActionRow *>(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib
\ No newline at end of file |
