From 29eb802f09da07421099238eceaee9e3b1d61ff2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 14:01:30 +0200 Subject: adw: extract libadwaitamm --- adw/include/adwaitamm/spinrow.hpp | 117 -------------------------------------- 1 file changed, 117 deletions(-) delete mode 100644 adw/include/adwaitamm/spinrow.hpp (limited to 'adw/include/adwaitamm/spinrow.hpp') diff --git a/adw/include/adwaitamm/spinrow.hpp b/adw/include/adwaitamm/spinrow.hpp deleted file mode 100644 index f5e02b6..0000000 --- a/adw/include/adwaitamm/spinrow.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_SPIN_ROW_HPP -#define LIBADWAITAMM_SPIN_ROW_HPP - -#include "adwaitamm/actionrow.hpp" -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include - -#include -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -using AdwSpinRow = struct _AdwSpinRow; - -namespace Adwaita -{ - struct SpinRow final : ActionRow, - helpers::gobj_mixin - { - using BaseObjectType = AdwSpinRow; - using BaseClassType = AdwSpinRowClass; - using CppObjectType = struct SpinRow; - using CppClassType = struct SpinRow_Class; - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - SpinRow(Gtk::Adjustment & adjustment, double climb_rate, unsigned int digits); - SpinRow(double min, double max, double step); - SpinRow(SpinRow const & other) = delete; - SpinRow(SpinRow && other) noexcept = default; - - auto operator=(SpinRow const & other) noexcept -> SpinRow & = delete; - auto operator=(SpinRow && other) noexcept -> SpinRow & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto configure(Gtk::Adjustment & adjustment, double climb_rate, unsigned int digits) -> void; - auto update() -> void; - -#pragma mark - Getters - [[nodiscard]] auto get_adjustment() const -> Glib::RefPtr; - [[nodiscard]] auto get_climb_rate() const -> double; - [[nodiscard]] auto get_digits() const -> unsigned int; - [[nodiscard]] auto get_numeric() const -> bool; - [[nodiscard]] auto get_snap_to_ticks() const -> bool; - [[nodiscard]] auto get_update_policy() const -> Gtk::SpinButton::UpdatePolicy; - [[nodiscard]] auto get_value() const -> double; - [[nodiscard]] auto get_wrap() const -> bool; - -#pragma mark - Setters - auto set_adjustment(Gtk::Adjustment & value) -> void; - auto set_climb_rate(double value) -> void; - auto set_digits(unsigned int value) -> void; - auto set_numeric(bool value) -> void; - auto set_range(double min, double max) -> void; - auto set_snap_to_ticks(bool value) -> void; - auto set_update_policy(Gtk::SpinButton::UpdatePolicy value) -> void; - auto set_value(double value) -> void; - auto set_wrap(bool value) -> void; - -#pragma mark - Properties - [[nodiscard]] auto property_adjustment() -> Glib::PropertyProxy>; - [[nodiscard]] auto property_adjustment() const -> Glib::PropertyProxy_ReadOnly>; - [[nodiscard]] auto property_climb_rate() -> Glib::PropertyProxy; - [[nodiscard]] auto property_climb_rate() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_digits() -> Glib::PropertyProxy; - [[nodiscard]] auto property_digits() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_numeric() -> Glib::PropertyProxy; - [[nodiscard]] auto property_numeric() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_snap_to_ticks() -> Glib::PropertyProxy; - [[nodiscard]] auto property_snap_to_ticks() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_update_policy() -> Glib::PropertyProxy; - [[nodiscard]] auto property_update_policy() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_value() -> Glib::PropertyProxy; - [[nodiscard]] auto property_value() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_wrap() -> Glib::PropertyProxy; - [[nodiscard]] auto property_wrap() const -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - auto signal_input() -> Glib::SignalProxy; - auto signal_output() -> Glib::SignalProxy; - auto signal_wrapped() -> Glib::SignalProxy; - - protected: - friend SpinRow_Class; - -#pragma mark - Internal Constructors - explicit SpinRow(Glib::ConstructParams const & params); - explicit SpinRow(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwSpinRow * object, bool copy = false) -> Adwaita::SpinRow *; -} // namespace Glib - -#endif \ No newline at end of file -- cgit v1.2.3