/* * SPDX-FileCopyrightText: 2025 Felix Morgner * SPDX-License-Identifier: LGPL-2.1-only */ #ifndef TURNS_GUI_TURN_ORDER_VIEW_HPP #define TURNS_GUI_TURN_ORDER_VIEW_HPP #include "template_widget.hpp" #include #include #include #include #include #include #include #include #include #include namespace Turns::gui { struct TurnOrderView : template_widget { auto constexpr inline static children = std::array{ "progress", "view", }; TurnOrderView(); explicit TurnOrderView(Glib::RefPtr const & turn_order); [[nodiscard]] auto get_turn_order() const -> Glib::RefPtr; auto set_turn_order(Glib::RefPtr const & turn_order) -> void; auto property_turn_order() -> Glib::PropertyProxy>; auto property_turn_order() const -> Glib::PropertyProxy_ReadOnly>; private: auto handle_create_row(Glib::RefPtr const item) -> Gtk::Widget *; Glib::Property> m_turn_order{*this, "turn-order", nullptr}; Gtk::ProgressBar * m_progress{get_widget("progress")}; Gtk::ListBox * m_view{get_widget("view")}; }; } // namespace Turns::gui #endif