[−][src]Struct broot::browser::BrowserState
An application state dedicated to displaying a tree. It's the first and main screen of broot.
Fields
tree: Tree
filtered_tree: Option<Tree>
pending_pattern: InputPattern
total_search_required: bool
Implementations
impl BrowserState
[src]
pub fn new(
path: PathBuf,
options: TreeOptions,
screen: &Screen,
con: &AppContext,
dam: &Dam
) -> Result<Option<BrowserState>, TreeBuildError>
[src]
path: PathBuf,
options: TreeOptions,
screen: &Screen,
con: &AppContext,
dam: &Dam
) -> Result<Option<BrowserState>, TreeBuildError>
build a new tree state if there's no error and there's no cancellation.
In case of cancellation return Ok(None)
. If dam is unlimited()
then
this can't be returned.
pub fn with_new_options(
&self,
screen: &Screen,
change_options: &dyn Fn(&mut TreeOptions),
in_new_panel: bool,
con: &AppContext
) -> AppStateCmdResult
[src]
&self,
screen: &Screen,
change_options: &dyn Fn(&mut TreeOptions),
in_new_panel: bool,
con: &AppContext
) -> AppStateCmdResult
pub fn root(&self) -> &Path
[src]
pub fn page_height(screen: &Screen) -> i32
[src]
pub fn displayed_tree(&self) -> &Tree
[src]
return a reference to the currently displayed tree, which is the filtered tree if there's one, the base tree if not.
pub fn displayed_tree_mut(&mut self) -> &mut Tree
[src]
return a mutable reference to the currently displayed tree, which is the filtered tree if there's one, the base tree if not.
pub fn open_selection_stay_in_broot(
&mut self,
screen: &mut Screen,
con: &AppContext,
in_new_panel: bool,
keep_pattern: bool
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
screen: &mut Screen,
con: &AppContext,
in_new_panel: bool,
keep_pattern: bool
) -> Result<AppStateCmdResult, ProgramError>
pub fn open_selection_quit_broot(
&mut self,
w: &mut W,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub fn go_to_parent(
&mut self,
screen: &mut Screen,
con: &AppContext,
in_new_panel: bool
) -> AppStateCmdResult
[src]
&mut self,
screen: &mut Screen,
con: &AppContext,
in_new_panel: bool
) -> AppStateCmdResult
Trait Implementations
impl AppState for BrowserState
[src]
fn get_pending_task(&self) -> Option<&'static str>
[src]
fn get_status(
&self,
cmd: &Command,
other_path: &Option<PathBuf>,
con: &AppContext
) -> Status
[src]
&self,
cmd: &Command,
other_path: &Option<PathBuf>,
con: &AppContext
) -> Status
fn selected_path(&self) -> &Path
[src]
fn selection_type(&self) -> SelectionType
[src]
fn clear_pending(&mut self)
[src]
fn on_click(
&mut self,
_x: u16,
y: u16,
_screen: &mut Screen,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_x: u16,
y: u16,
_screen: &mut Screen,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
fn on_double_click(
&mut self,
_x: u16,
y: u16,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_x: u16,
y: u16,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
fn on_pattern(
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
fn on_internal(
&mut self,
w: &mut W,
internal_exec: &InternalExecution,
input_invocation: Option<&VerbInvocation>,
trigger_type: TriggerType,
cc: &CmdContext,
screen: &mut Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
internal_exec: &InternalExecution,
input_invocation: Option<&VerbInvocation>,
trigger_type: TriggerType,
cc: &CmdContext,
screen: &mut Screen
) -> Result<AppStateCmdResult, ProgramError>
fn do_pending_task(
&mut self,
screen: &mut Screen,
con: &AppContext,
dam: &mut Dam
)
[src]
&mut self,
screen: &mut Screen,
con: &AppContext,
dam: &mut Dam
)
do some work, totally or partially, if there's some to do. Stop as soon as the dam asks for interruption
fn display(
&mut self,
w: &mut W,
_screen: &Screen,
area: Area,
panel_skin: &PanelSkin,
_con: &AppContext
) -> Result<(), ProgramError>
[src]
&mut self,
w: &mut W,
_screen: &Screen,
area: Area,
panel_skin: &PanelSkin,
_con: &AppContext
) -> Result<(), ProgramError>
fn refresh(&mut self, screen: &Screen, con: &AppContext) -> Command
[src]
fn get_flags(&self) -> Vec<Flag>
[src]
fn get_starting_input(&self) -> String
[src]
fn on_command(
&mut self,
w: &mut W,
cc: &CmdContext,
screen: &mut Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
cc: &CmdContext,
screen: &mut Screen
) -> Result<AppStateCmdResult, ProgramError>
Auto Trait Implementations
impl !RefUnwindSafe for BrowserState
impl Send for BrowserState
impl Sync for BrowserState
impl Unpin for BrowserState
impl UnwindSafe for BrowserState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,