aboutsummaryrefslogtreecommitdiff
path: root/include/adwaitamm/headerbar.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/adwaitamm/headerbar.hpp')
-rw-r--r--include/adwaitamm/headerbar.hpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/include/adwaitamm/headerbar.hpp b/include/adwaitamm/headerbar.hpp
new file mode 100644
index 0000000..338b189
--- /dev/null
+++ b/include/adwaitamm/headerbar.hpp
@@ -0,0 +1,97 @@
+/**
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @copyright Copyright (c) 2025
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef LIBADWAITAMM_HEADER_BAR_HPP
+#define LIBADWAITAMM_HEADER_BAR_HPP
+
+#include "adwaitamm/enums.hpp"
+#include "helpers/gobj_mixin.hpp"
+
+#include <glibmm/object.h>
+#include <glibmm/propertyproxy.h>
+#include <glibmm/ustring.h>
+
+#include <gtkmm/widget.h>
+
+#include <glib-object.h>
+
+#define _ADWAITA_INSIDE
+#include <adw-header-bar.h>
+#undef _ADWAITA_INSIDE
+
+namespace Adwaita
+{
+ struct HeaderBar final : Gtk::Widget,
+ helpers::gobj_mixin<HeaderBar, AdwHeaderBar>
+ {
+
+ using BaseObjectType = AdwHeaderBar;
+ using BaseClassType = AdwHeaderBarClass;
+ using CppObjectType = HeaderBar;
+ using CppClassType = struct HeaderBar_Class;
+
+ using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
+ using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy;
+
+ HeaderBar();
+ HeaderBar(HeaderBar const & other) = delete;
+ HeaderBar(HeaderBar && other) noexcept = default;
+
+ auto operator=(HeaderBar const & other) noexcept -> HeaderBar & = delete;
+ auto operator=(HeaderBar && other) noexcept -> HeaderBar & = default;
+
+ auto static get_type() -> GType;
+ auto static get_base_type() -> GType;
+
+ auto pack_end(Gtk::Widget & widget) -> void;
+ auto pack_start(Gtk::Widget & widget) -> void;
+ auto remove(Gtk::Widget & widget) -> void;
+
+ [[nodiscard]] auto get_centering_policy() -> CenteringPolicy;
+ [[nodiscard]] auto get_decoration_layout() -> Glib::ustring;
+ [[nodiscard]] auto get_show_back_button() -> bool;
+ [[nodiscard]] auto get_show_end_title_buttons() -> bool;
+ [[nodiscard]] auto get_show_start_title_buttons() -> bool;
+ [[nodiscard]] auto get_show_title() -> bool;
+ [[nodiscard]] auto get_title_widget() -> Gtk::Widget *;
+
+ auto set_centering_policy(CenteringPolicy value) -> void;
+ auto set_decoration_layout(Glib::ustring const & value) -> void;
+ auto set_show_back_button(bool value) -> void;
+ auto set_show_end_title_buttons(bool value) -> void;
+ auto set_show_start_title_buttons(bool value) -> void;
+ auto set_show_title(bool value) -> void;
+ auto set_title_widget(Gtk::Widget & value) -> void;
+
+ auto property_centering_policy() -> Glib::PropertyProxy<CenteringPolicy>;
+ auto property_centering_policy() const -> Glib::PropertyProxy_ReadOnly<CenteringPolicy>;
+ auto property_decoration_layout() -> Glib::PropertyProxy<Glib::ustring>;
+ auto property_decoration_layout() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
+ auto property_show_back_button() -> Glib::PropertyProxy<bool>;
+ auto property_show_back_button() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ auto property_show_end_title_buttons() -> Glib::PropertyProxy<bool>;
+ auto property_show_end_title_buttons() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ auto property_show_start_title_buttons() -> Glib::PropertyProxy<bool>;
+ auto property_show_start_title_buttons() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ auto property_show_title() -> Glib::PropertyProxy<bool>;
+ auto property_show_title() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ auto property_title_widget() -> Glib::PropertyProxy<Gtk::Widget *>;
+ auto property_title_widget() const -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *>;
+
+ protected:
+ friend HeaderBar_Class;
+
+ explicit HeaderBar(Glib::ConstructParams const & params);
+ explicit HeaderBar(BaseObjectType * gobj);
+ };
+} // namespace Adwaita
+
+namespace Glib
+{
+ auto wrap(AdwHeaderBar * object, bool copy = false) -> Adwaita::HeaderBar *;
+} // namespace Glib
+
+#endif \ No newline at end of file