/* * WiVRn VR streaming * Copyright (C) 2026 Guillaume Meunier * Copyright (C) 2026 Patrick Nicolas * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include #include #include #include // Themed, reusable UI widgets, colors and metrics from wivrn::ui::current() // Display text takes const std::string &, ids and icon glyphs stay const char * namespace wivrn::ui { enum class button_style { primary, // accent fill secondary, // control fill danger, // destructive ghost, // transparent until hovered }; // Page title with an optional muted subtitle void page_header(const std::string & title, const std::string & subtitle = {}); // Rounded panel, pair with end_card bool begin_card(const char * id, const ImVec2 & size = {0, 0}); // Tighter padding, for cards holding a list of rows bool begin_list_card(const char * id); void end_card(); // Full-width divider between rows of a card void row_separator(); // Title and wrapped muted description on the left, control_width reserved on the right // Returns the window-local y of the label bottom, to keep the row tall enough for a multi-line label float setting_label(const std::string & title, const std::string & description, float control_width); // "