// SPDX-License-Identifier: MIT #pragma once #include #include #include namespace udpscope { /// The About dialog: version, commit, build timestamp and where the session files live. /// Modal on `parent`. `session_path` is this run's own session file. void show_about(GtkWindow* parent, const std::string& session_path); /// The paged help window. Modal on nothing — it is a reference, so it stays usable while /// the scope runs. Already open: presented. void show_help(GtkWindow* parent); /// What UDPSCOPE_PROBE_HELP_MS reports. `parsed` counts pages whose markup /// pango_parse_markup() accepted and whose body is non-empty; it must equal `pages`. struct HelpReport { int pages = 0; int parsed = 0; std::string shortest_title; std::size_t shortest_bytes = 0; }; /// Loads and validates every page without building a window. Safe to call headless. HelpReport help_self_check(); /// The shortcut overview: the application accelerators and the plot's own interactions, /// in the sections the tables name. An AdwShortcutsDialog, because GtkShortcutsWindow is /// deprecated as of GTK 4.18 and this project builds warning-free. void show_shortcuts(GtkWindow* parent); /// Closes whichever of the three windows are open. The About dialog and the help window are /// GtkWindows and close with gtk_window_close(), so their close-request handlers run; the /// shortcut overview is an AdwDialog and closes with adw_dialog_close(), which emits ::closed. /// Either way the file-scope pointer is nulled by the handler. Used by the probe. void close_help_windows(); } // namespace udpscope