Struct broot::browser::BrowserState [−][src]
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 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: Screen,
con: &AppContext,
in_new_panel: bool,
keep_pattern: bool
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
screen: Screen,
con: &AppContext,
in_new_panel: bool,
keep_pattern: bool
) -> Result<AppStateCmdResult, ProgramError>
pub fn go_to_parent(
&mut self,
screen: Screen,
con: &AppContext,
in_new_panel: bool
) -> AppStateCmdResult
[src]
&mut self,
screen: Screen,
con: &AppContext,
in_new_panel: bool
) -> AppStateCmdResult
Trait Implementations
impl AppState for BrowserState
[src]
fn set_mode(&mut self, mode: Mode)
[src]
fn get_mode(&self) -> Mode
[src]
fn get_pending_task(&self) -> Option<&'static str>
[src]
fn selected_path(&self) -> &Path
[src]
fn selection(&self) -> Selection<'_>
[src]
fn tree_options(&self) -> TreeOptions
[src]
fn with_new_options(
&mut self,
screen: Screen,
change_options: &dyn Fn(&mut TreeOptions),
in_new_panel: bool,
con: &AppContext
) -> AppStateCmdResult
[src]
&mut self,
screen: Screen,
change_options: &dyn Fn(&mut TreeOptions),
in_new_panel: bool,
con: &AppContext
) -> AppStateCmdResult
build a cmdResult asking for the addition of a new state being a browser state similar to the current one but with different options
fn clear_pending(&mut self)
[src]
fn on_click(
&mut self,
_x: u16,
y: u16,
_screen: Screen,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_x: u16,
y: u16,
_screen: Screen,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
fn on_double_click(
&mut self,
_x: u16,
y: u16,
screen: Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_x: u16,
y: u16,
screen: 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: Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
internal_exec: &InternalExecution,
input_invocation: Option<&VerbInvocation>,
trigger_type: TriggerType,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
fn no_verb_status(&self, has_previous_state: bool, con: &AppContext) -> Status
[src]
fn do_pending_task(&mut self, screen: Screen, con: &AppContext, dam: &mut Dam)
[src]
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_mode_verb(&mut self, mode: Mode, con: &AppContext) -> AppStateCmdResult
[src]
fn on_internal_generic(
&mut self,
_w: &mut W,
internal_exec: &InternalExecution,
input_invocation: Option<&VerbInvocation>,
_trigger_type: TriggerType,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_w: &mut W,
internal_exec: &InternalExecution,
input_invocation: Option<&VerbInvocation>,
_trigger_type: TriggerType,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
fn execute_verb(
&mut self,
w: &mut W,
verb: &Verb,
invocation: Option<&VerbInvocation>,
trigger_type: TriggerType,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
verb: &Verb,
invocation: Option<&VerbInvocation>,
trigger_type: TriggerType,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
fn on_command(
&mut self,
w: &mut W,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
w: &mut W,
cc: &CmdContext<'_>,
screen: Screen
) -> Result<AppStateCmdResult, ProgramError>
fn open_preview(
&mut self,
prefered_mode: Option<PreviewMode>,
close_if_open: bool,
cc: &CmdContext<'_>
) -> AppStateCmdResult
[src]
&mut self,
prefered_mode: Option<PreviewMode>,
close_if_open: bool,
cc: &CmdContext<'_>
) -> AppStateCmdResult
fn set_selected_path(&mut self, _path: PathBuf, _con: &AppContext)
[src]
fn get_status(
&self,
cmd: &Command,
other_path: &Option<PathBuf>,
has_previous_state: bool,
con: &AppContext
) -> Status
[src]
&self,
cmd: &Command,
other_path: &Option<PathBuf>,
has_previous_state: bool,
con: &AppContext
) -> Status
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,