pub struct App {Show 31 fields
pub phase: Phase,
pub screen: Screen,
pub focus: Focus,
pub input: Option<CurrentEu4Input>,
pub selectable: bool,
pub excluded: BTreeSet<String>,
pub source_path: Option<PathBuf>,
pub mod_scroll: usize,
pub filter: Option<MergeDisposition>,
pub query: String,
pub selected: usize,
pub detail_scroll: u16,
pub input_pane: InputPane,
pub mod_detail_scroll: u16,
pub issues_scroll: u16,
pub hit: Cell<HitAreas>,
pub settings: AnalysisSettings,
pub analyzed_with: Option<(AnalysisSettings, BTreeSet<String>)>,
pub game_base_available: bool,
pub options: Option<usize>,
pub confirming_exclusions: bool,
pub confirming_build: bool,
pub refusal: Option<String>,
pub notice: Option<String>,
pub effect: Option<Effect>,
pub mouse_capture: bool,
pub help: bool,
pub drag_anchor: Option<Position>,
pub selection: Option<(Position, Position)>,
pub selection_bounds: Rect,
pub copy_selection: bool,
/* private fields */
}Expand description
The browser’s whole visible state. It only reads: no key leads to a decision, an artifact, or a write.
Fields§
§phase: Phase§screen: Screen§focus: Focus§input: Option<CurrentEu4Input>§selectable: boolWhether the current input snapshot can still be analyzed with some selection of its mods. Each snapshot is analyzed at most once.
excluded: BTreeSet<String>Mods, by playset id, the user left out of the next analysis. Kept across refreshes; ids no longer in the playset are ignored.
source_path: Option<PathBuf>The INPUT_SOURCE foch merge takes for this input, or None for the
current EU4 playset.
mod_scroll: usize§filter: Option<MergeDisposition>§query: String§selected: usizeIndex into App::visible_units.
detail_scroll: u16§input_pane: InputPaneThe focused panel of the playset screen.
mod_detail_scroll: u16§issues_scroll: u16§hit: Cell<HitAreas>Filled in by each frame; read by mouse handling.
settings: AnalysisSettings§analyzed_with: Option<(AnalysisSettings, BTreeSet<String>)>The settings and exclusions of the analysis being run or browsed.
game_base_available: boolWhether the input source can supply the EU4 base as an ancestor.
options: Option<usize>Cursor row while the options panel is open.
confirming_exclusions: boolAsking whether to analyze without the excluded mods.
confirming_build: boolAsking whether to build base data, which writes Foch’s data directory.
refusal: Option<String>Why the last key could not do what it asks, until the next key.
notice: Option<String>What the last key did, until the next key.
effect: Option<Effect>Waiting for the run loop to carry it out.
mouse_capture: bool§help: bool§drag_anchor: Option<Position>Where the left button went down, while it is held.
selection: Option<(Position, Position)>The screen cells a drag covers, from where it started to where it is; highlighted, and copied when the button is released.
selection_bounds: RectThe inside of the panel the drag started in: a selection never leaves it, so it copies only that panel’s text and no borders.
copy_selection: boolThe finished selection is waiting to be copied from the next frame.
Implementations§
Source§impl App
impl App
pub fn analysis(&self) -> Option<&AnalysisView>
Sourcepub fn effective_settings(&self) -> AnalysisSettings
pub fn effective_settings(&self) -> AnalysisSettings
The settings an analysis started now would use.
Sourcepub fn settings_changed(&self) -> bool
pub fn settings_changed(&self) -> bool
Whether the options or exclusions changed since the browsed analysis ran.
pub fn mods(&self) -> &[DetectedPlaysetMod]
pub fn is_excluded(&self, playset_mod: &DetectedPlaysetMod) -> bool
Sourcepub fn effective_exclusions(&self) -> BTreeSet<String>
pub fn effective_exclusions(&self) -> BTreeSet<String>
The exclusions that name a mod of the current playset.
Sourcepub fn excluded_positions(&self) -> BTreeSet<usize>
pub fn excluded_positions(&self) -> BTreeSet<usize>
Playset positions of the excluded mods, as input preparation takes them.
Sourcepub fn problem_mods(&self) -> Vec<&DetectedPlaysetMod>
pub fn problem_mods(&self) -> Vec<&DetectedPlaysetMod>
Mods that cannot be analyzed and are not excluded yet.
pub fn included_count(&self) -> usize
Sourcepub fn needs_base_data(&self) -> bool
pub fn needs_base_data(&self) -> bool
Whether the analysis would use the game base while its base data is not ready.
pub fn can_analyze(&self) -> bool
Sourcepub fn data_build_args(&self) -> Option<DataBuildArgs>
pub fn data_build_args(&self) -> Option<DataBuildArgs>
The foch data build arguments B runs: the inspected EU4
installation, installed into Foch’s data directory.
Sourcepub fn merge_args(&self, out: PathBuf) -> MergeArgs
pub fn merge_args(&self, out: PathBuf) -> MergeArgs
The foch merge arguments of the analysis a runs. The browser
analyzes through exactly these, writing nothing, so cli_command
reproduces its analysis.
Sourcepub fn cli_command(&self) -> String
pub fn cli_command(&self) -> String
The foch command that runs the analysis a would run, so a script
or agent can reproduce it without the browser.
pub fn is_working(&self) -> bool
Sourcepub fn visible_units(&self) -> Vec<usize>
pub fn visible_units(&self) -> Vec<usize>
Indices of the units that pass the disposition filter and the query, in review order.
pub fn selected_unit(&self) -> Option<&MergeUnitOutcome>
pub fn handle_key(&mut self, key: KeyEvent) -> Option<AppCommand>
Sourcepub fn focused_text(&self) -> String
pub fn focused_text(&self) -> String
The text of the focused panel, for c.
Sourcepub fn handle_mouse(&mut self, mouse: MouseEvent)
pub fn handle_mouse(&mut self, mouse: MouseEvent)
A click focuses the panel under the pointer and, in a list, selects the row; the wheel scrolls the panel under the pointer. Mouse input is ignored while a dialog is open.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl !Sync for App
impl Send for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.