summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm/spinrow.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
commit29eb802f09da07421099238eceaee9e3b1d61ff2 (patch)
treed07784be13475237d58f65033959c1e27e6245c0 /adw/include/adwaitamm/spinrow.hpp
parentdff2f80ddc8f742b8181409d6feeca33e856112e (diff)
downloadturns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz
turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip
adw: extract libadwaitamm
Diffstat (limited to 'adw/include/adwaitamm/spinrow.hpp')
-rw-r--r--adw/include/adwaitamm/spinrow.hpp117
1 files changed, 0 insertions, 117 deletions
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 <glibmm/object.h>
-#include <glibmm/propertyproxy.h>
-#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
-
-#include <gtkmm/adjustment.h>
-#include <gtkmm/spinbutton.h>
-
-#include <glib-object.h>
-
-#define _ADWAITA_INSIDE
-#include <adw-spin-row.h>
-#undef _ADWAITA_INSIDE
-
-using AdwSpinRow = struct _AdwSpinRow;
-
-namespace Adwaita
-{
- struct SpinRow final : ActionRow,
- helpers::gobj_mixin<SpinRow, AdwSpinRow>
- {
- using BaseObjectType = AdwSpinRow;
- using BaseClassType = AdwSpinRowClass;
- using CppObjectType = struct SpinRow;
- using CppClassType = struct SpinRow_Class;
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::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<Gtk::Adjustment>;
- [[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<Glib::RefPtr<Gtk::Adjustment>>;
- [[nodiscard]] auto property_adjustment() const -> Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Gtk::Adjustment>>;
- [[nodiscard]] auto property_climb_rate() -> Glib::PropertyProxy<double>;
- [[nodiscard]] auto property_climb_rate() const -> Glib::PropertyProxy_ReadOnly<double>;
- [[nodiscard]] auto property_digits() -> Glib::PropertyProxy<unsigned int>;
- [[nodiscard]] auto property_digits() const -> Glib::PropertyProxy_ReadOnly<unsigned int>;
- [[nodiscard]] auto property_numeric() -> Glib::PropertyProxy<bool>;
- [[nodiscard]] auto property_numeric() const -> Glib::PropertyProxy_ReadOnly<bool>;
- [[nodiscard]] auto property_snap_to_ticks() -> Glib::PropertyProxy<bool>;
- [[nodiscard]] auto property_snap_to_ticks() const -> Glib::PropertyProxy_ReadOnly<bool>;
- [[nodiscard]] auto property_update_policy() -> Glib::PropertyProxy<Gtk::SpinButton::UpdatePolicy>;
- [[nodiscard]] auto property_update_policy() const -> Glib::PropertyProxy_ReadOnly<Gtk::SpinButton::UpdatePolicy>;
- [[nodiscard]] auto property_value() -> Glib::PropertyProxy<double>;
- [[nodiscard]] auto property_value() const -> Glib::PropertyProxy_ReadOnly<double>;
- [[nodiscard]] auto property_wrap() -> Glib::PropertyProxy<bool>;
- [[nodiscard]] auto property_wrap() const -> Glib::PropertyProxy_ReadOnly<bool>;
-
-#pragma mark - Signals
- auto signal_input() -> Glib::SignalProxy<int(double &)>;
- auto signal_output() -> Glib::SignalProxy<bool()>;
- auto signal_wrapped() -> Glib::SignalProxy<void()>;
-
- 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