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/dialog.hpp | 128 --------------------------------------- 1 file changed, 128 deletions(-) delete mode 100644 adw/include/adwaitamm/dialog.hpp (limited to 'adw/include/adwaitamm/dialog.hpp') diff --git a/adw/include/adwaitamm/dialog.hpp b/adw/include/adwaitamm/dialog.hpp deleted file mode 100644 index 82e1cd1..0000000 --- a/adw/include/adwaitamm/dialog.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_DIALOG_HPP -#define LIBADWAITAMM_DIALOG_HPP - -#include "adwaitamm/breakpoint.hpp" -#include "adwaitamm/enums.hpp" -#include "helpers/gobj_mixin.hpp" - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct Dialog : Gtk::Widget, - Gtk::ShortcutManager, - helpers::gobj_mixin - { - - using BaseObjectType = AdwDialog; - using BaseClassType = AdwDialogClass; - using CppObjectType = Dialog; - using CppClassType = struct Dialog_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - explicit Dialog(); - Dialog(Dialog const & other) = delete; - Dialog(Dialog && other) noexcept = default; - - auto operator=(Dialog const & other) noexcept -> Dialog & = delete; - auto operator=(Dialog && other) noexcept -> Dialog & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto add_breakpoint(Glib::RefPtr const & breakpoint) -> void; - auto close() -> void; - auto force_close() -> void; - auto present(Gtk::Widget * parent) -> void; - -#pragma mark - Getters - [[nodiscard]] auto get_can_close() const -> bool; - [[nodiscard]] auto get_child() const -> Gtk::Widget *; - [[nodiscard]] auto get_content_height() const -> int; - [[nodiscard]] auto get_content_width() const -> int; - [[nodiscard]] auto get_current_breakpoint() const -> Glib::RefPtr; - [[nodiscard]] auto get_default_widget() const -> Gtk::Widget *; - [[nodiscard]] auto get_focus() const -> Gtk::Widget *; - [[nodiscard]] auto get_follows_content_size() const -> bool; - [[nodiscard]] auto get_presentation_mode() const -> PresentationMode; - [[nodiscard]] auto get_title() const -> Glib::ustring; - -#pragma mark - Setters - auto set_can_close(bool value) -> void; - auto set_child(Gtk::Widget & value) -> void; - auto set_content_height(int value) -> void; - auto set_content_width(int value) -> void; - auto set_default_widget(Gtk::Widget & value) -> void; - auto set_focus(Gtk::Widget & value) -> void; - auto set_follows_content_size(bool value) -> void; - auto set_presentation_mode(PresentationMode value) -> void; - auto set_title(Glib::ustring const & str) -> void; - -#pragma mark - Properties - [[nodiscard]] auto property_can_close() -> Glib::PropertyProxy; - [[nodiscard]] auto property_can_close() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_child() -> Glib::PropertyProxy; - [[nodiscard]] auto property_child() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_content_height() -> Glib::PropertyProxy; - [[nodiscard]] auto property_content_height() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_content_width() -> Glib::PropertyProxy; - [[nodiscard]] auto property_content_width() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_current_breakpoint() const -> Glib::PropertyProxy_ReadOnly>; - [[nodiscard]] auto property_default_widget() -> Glib::PropertyProxy; - [[nodiscard]] auto property_default_widget() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_focus_widget() -> Glib::PropertyProxy; - [[nodiscard]] auto property_focus_widget() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_follows_content_size() -> Glib::PropertyProxy; - [[nodiscard]] auto property_follows_content_size() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_presentation_mode() -> Glib::PropertyProxy; - [[nodiscard]] auto property_presentation_mode() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_title() -> Glib::PropertyProxy; - [[nodiscard]] auto property_title() const -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - [[nodiscard]] auto signal_close_attempt() -> Glib::SignalProxy; - [[nodiscard]] auto signal_closed() -> Glib::SignalProxy; - - protected: - friend Dialog_Class; - -#pragma mark - Default Signal Handlers - auto virtual on_close_attempt() -> void; - auto virtual on_closed() -> void; - -#pragma mark - Internal Constructors - explicit Dialog(Glib::ConstructParams const & params); - explicit Dialog(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwDialog * object, bool copy = false) -> Adwaita::Dialog *; -} // namespace Glib - -#endif \ No newline at end of file -- cgit v1.2.3