alma 0.1.1

A Bevy-native modal text editor with Vim-style navigation.
Documentation
//! Shared presentation style accessors.

use bevy::prelude::Color;

use crate::presentation::{ResolvedTheme, SurfaceRole};

/// Returns the shared text color for the scene.
#[must_use]
pub fn scene_text_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::EditorText).color()
}

/// Returns the editor background color.
#[must_use]
pub fn editor_background_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::EditorBackground).color()
}

/// Returns the cursor cell background color.
#[must_use]
pub fn cursor_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::Cursor).color()
}

/// Returns the visual selection cell background color.
#[must_use]
pub fn selection_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::Selection).color()
}

/// Returns the search match cell background color.
#[must_use]
pub fn search_match_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::SearchMatch).color()
}

/// Returns the text color used for the character under the cursor.
#[must_use]
pub fn cursor_text_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::CursorText).color()
}

/// Returns the status bar background color.
#[must_use]
pub fn status_bar_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::StatusBar).color()
}

/// Returns the status line text color.
#[must_use]
pub fn status_text_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::StatusText).color()
}

/// Returns the status line error text color.
#[must_use]
pub fn status_error_text_color(theme: &ResolvedTheme) -> Color {
    theme.surface(SurfaceRole::StatusErrorText).color()
}