Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
shell_view.cpp File Reference

Implements the shell view renderer and layout helpers. More...

#include "src/ui/shell_view.h"
#include <algorithm>
#include <utility>
#include <vector>
Include dependency graph for shell_view.cpp:

Functions

ShellViewModel ui::build_shell_view_model (const app::ClientState &state, const std::vector< logging::LogEntry > &logEntries, const std::vector< std::string > &statsLines={})
 Build a render-ready shell view from app state and diagnostics.
 
void ui::fill_view_model_overlay (const app::ClientState &state, const std::vector< logging::LogEntry > &logEntries, const std::vector< std::string > &statsLines, ShellViewModel *viewModel)
 Fill the diagnostics overlay with streaming stats and recent log lines.
 
void ui::fill_view_model_panel_state (const app::ClientState &state, ShellViewModel *viewModel)
 Populate which shell-view panels are currently active.
 
void ui::fill_view_model_selected_menu_details (const app::ClientState &state, ShellViewModel *viewModel)
 Copy the currently selected menu row label and description into the view model.
 
bool ui::screen_uses_split_menu_layout (app::ScreenId screen)
 Return whether a screen uses the split menu-and-detail layout.
 

Detailed Description

Implements the shell view renderer and layout helpers.

Function Documentation

◆ build_shell_view_model()

ShellViewModel ui::build_shell_view_model ( const app::ClientState & state,
const std::vector< logging::LogEntry > & logEntries,
const std::vector< std::string > & statsLines = {} )

Build a render-ready shell view from app state and diagnostics.

Parameters
stateCurrent app shell state.
logEntriesRecent log entries for the optional overlay.
statsLinesOptional streaming statistics overlay lines.
Returns
A render-ready shell view model.

◆ fill_view_model_overlay()

void ui::fill_view_model_overlay ( const app::ClientState & state,
const std::vector< logging::LogEntry > & logEntries,
const std::vector< std::string > & statsLines,
ShellViewModel * viewModel )

Fill the diagnostics overlay with streaming stats and recent log lines.

Parameters
stateCurrent reducer-owned client state.
logEntriesRetained log entries available for overlay display.
statsLinesPreformatted streaming statistics lines.
viewModelView model being assembled for rendering.

◆ fill_view_model_panel_state()

void ui::fill_view_model_panel_state ( const app::ClientState & state,
ShellViewModel * viewModel )

Populate which shell-view panels are currently active.

Parameters
stateCurrent reducer-owned client state.
viewModelView model being assembled for rendering.

◆ fill_view_model_selected_menu_details()

void ui::fill_view_model_selected_menu_details ( const app::ClientState & state,
ShellViewModel * viewModel )

Copy the currently selected menu row label and description into the view model.

Parameters
stateCurrent reducer-owned client state.
viewModelView model being assembled for rendering.

◆ screen_uses_split_menu_layout()

bool ui::screen_uses_split_menu_layout ( app::ScreenId screen)

Return whether a screen uses the split menu-and-detail layout.

Parameters
screenScreen identifier to inspect.
Returns
true when the screen renders a split menu layout.