From 6378909a3d85f7f65b5ba5c116d950f96342fed4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 12:11:23 +0200 Subject: adw: implement ComboRow --- adw/include/adwaitamm/comborow.hpp | 116 +++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 adw/include/adwaitamm/comborow.hpp (limited to 'adw/include/adwaitamm/comborow.hpp') diff --git a/adw/include/adwaitamm/comborow.hpp b/adw/include/adwaitamm/comborow.hpp new file mode 100644 index 0000000..416c693 --- /dev/null +++ b/adw/include/adwaitamm/comborow.hpp @@ -0,0 +1,116 @@ +/** + * @author Felix Morgner (felix.morgner@gmail.com) + * @copyright Copyright (c) 2025 + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef LIBADWAITAMM_COMBO_ROW_HPP +#define LIBADWAITAMM_COMBO_ROW_HPP + +#include "adwaitamm/actionrow.hpp" +#include "adwaitamm/helpers/gobj_mixin.hpp" + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#define _ADWAITA_INSIDE +#include +#undef _ADWAITA_INSIDE + +using AdwComboRow = struct _AdwComboRow; + +namespace Adwaita +{ + struct ComboRow : ActionRow, + helpers::gobj_mixin + { + using BaseObjectType = AdwComboRow; + using BaseClassType = AdwComboRowClass; + using CppObjectType = struct ComboRow; + using CppClassType = struct ComboRow_Class; + + using helpers::gobj_mixin::gobj; + using helpers::gobj_mixin::gobj_copy; + +#pragma mark - Special Member Functions + explicit ComboRow(); + ComboRow(ComboRow const & other) = delete; + ComboRow(ComboRow && other) noexcept = default; + + auto operator=(ComboRow const & other) noexcept -> ComboRow & = delete; + auto operator=(ComboRow && other) noexcept -> ComboRow & = default; + +#pragma mark - GObject Support + auto static get_type() -> GType; + auto static get_base_type() -> GType; + +#pragma mark - Getters + auto get_enable_search() const -> bool; + auto get_expression() const -> Glib::RefPtr>; + auto get_factory() const -> Glib::RefPtr; + auto get_header_factory() const -> Glib::RefPtr; + auto get_list_factory() const -> Glib::RefPtr; + auto get_model() const -> Glib::RefPtr; + auto get_search_match_mode() const -> Gtk::StringFilter::MatchMode; + auto get_selected() const -> unsigned int; + auto get_selected_item() const -> Glib::RefPtr; + auto get_use_subtitle() const -> bool; + +#pragma mark - Setters + auto set_enable_search(bool value) -> void; + auto set_expression(Glib::RefPtr> const & value) -> void; + auto set_factory(Glib::RefPtr const & value) -> void; + auto set_header_factory(Glib::RefPtr const & value) -> void; + auto set_list_factory(Glib::RefPtr const & value) -> void; + auto set_model(Glib::RefPtr const & value) -> void; + auto set_search_match_mode(Gtk::StringFilter::MatchMode value) -> void; + auto set_selected(unsigned int value) -> void; + auto set_use_subtitle(bool value) -> void; + +#pragma mark - Properties + auto property_enable_search() -> Glib::PropertyProxy; + auto property_enable_search() const -> Glib::PropertyProxy_ReadOnly; + auto property_expression() -> Glib::PropertyProxy>>; + auto property_expression() const -> Glib::PropertyProxy_ReadOnly>>; + auto property_factory() -> Glib::PropertyProxy>; + auto property_factory() const -> Glib::PropertyProxy_ReadOnly>; + auto property_header_factory() -> Glib::PropertyProxy>; + auto property_header_factory() const -> Glib::PropertyProxy_ReadOnly>; + auto property_list_factory() -> Glib::PropertyProxy>; + auto property_list_factory() const -> Glib::PropertyProxy_ReadOnly>; + auto property_model() -> Glib::PropertyProxy>; + auto property_model() const -> Glib::PropertyProxy_ReadOnly>; + auto property_search_match_mode() -> Glib::PropertyProxy; + auto property_search_match_mode() const -> Glib::PropertyProxy_ReadOnly; + auto property_selected() -> Glib::PropertyProxy; + auto property_selected() const -> Glib::PropertyProxy_ReadOnly; + auto property_selected_item() -> Glib::PropertyProxy_ReadOnly>; + auto property_use_subtitle() -> Glib::PropertyProxy; + auto property_use_subtitle() const -> Glib::PropertyProxy_ReadOnly; + + protected: + friend ComboRow_Class; + +#pragma mark - Internal Constructors + explicit ComboRow(Glib::ConstructParams const & params); + explicit ComboRow(BaseObjectType * gobj); + }; + +} // namespace Adwaita + +namespace Glib +{ + auto wrap(AdwComboRow * object, bool copy = false) -> Adwaita::ComboRow *; +} // namespace Glib + +#endif \ No newline at end of file -- cgit v1.2.3