[−][src]Trait broot::app::AppState
a panel state, stackable to allow reverting to a previous one
Required methods
pub 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>
execute the internal with the optional given invocation.
The invocation comes from the input and may be related to a different verb (the verb may have been triggered by a key shorctut)
pub fn selected_path(&self) -> &Path
[src]
pub fn selection(&self) -> Selection<'_>
[src]
pub fn refresh(&mut self, screen: Screen, con: &AppContext) -> Command
[src]
pub fn tree_options(&self) -> TreeOptions
[src]
pub 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 in response to a command being a change of tree options. This may or not be a new state
pub fn display(
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
[src]
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
Provided methods
pub fn clear_pending(&mut self)
[src]
called on start of on_command
pub 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>
pub 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>
pub fn on_pattern(
&mut self,
_pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
_pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub 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>
a generic implementation of on_internal which may be called by states when they don't have a specific behavior to execute
pub 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>
pub 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>
change the state, does no rendering
pub 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
return a cmdresult asking for the opening of a preview
pub fn do_pending_task(
&mut self,
_screen: Screen,
_con: &AppContext,
_dam: &mut Dam
)
[src]
&mut self,
_screen: Screen,
_con: &AppContext,
_dam: &mut Dam
)
pub fn get_pending_task(&self) -> Option<&'static str>
[src]
pub fn get_flags(&self) -> Vec<Flag>
[src]
return the flags to display
pub fn get_starting_input(&self) -> String
[src]
pub fn set_selected_path(&mut self, _path: PathBuf, _con: &AppContext)
[src]
pub fn no_verb_status(
&self,
_has_previous_state: bool,
_con: &AppContext
) -> Status
[src]
&self,
_has_previous_state: bool,
_con: &AppContext
) -> Status
return the status which should be used when there's no verb edited
pub 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
Implementors
impl AppState for BrowserState
[src]
pub fn get_pending_task(&self) -> Option<&'static str>
[src]
pub fn selected_path(&self) -> &Path
[src]
pub fn selection(&self) -> Selection<'_>
[src]
pub fn tree_options(&self) -> TreeOptions
[src]
pub 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
pub fn clear_pending(&mut self)
[src]
pub 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>
pub 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>
pub fn on_pattern(
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub 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>
pub fn no_verb_status(
&self,
has_previous_state: bool,
con: &AppContext
) -> Status
[src]
&self,
has_previous_state: bool,
con: &AppContext
) -> Status
pub fn do_pending_task(
&mut self,
screen: Screen,
con: &AppContext,
dam: &mut Dam
)
[src]
&mut self,
screen: 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
pub 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>
pub fn refresh(&mut self, screen: Screen, con: &AppContext) -> Command
[src]
pub fn get_flags(&self) -> Vec<Flag>
[src]
pub fn get_starting_input(&self) -> String
[src]
impl AppState for FilesystemState
[src]
pub fn selected_path(&self) -> &Path
[src]
pub fn tree_options(&self) -> TreeOptions
[src]
pub 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
pub fn selection(&self) -> Selection<'_>
[src]
pub fn refresh(&mut self, _screen: Screen, _con: &AppContext) -> Command
[src]
pub fn on_pattern(
&mut self,
pattern: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
pattern: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub 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>
pub 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>
pub 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>
impl AppState for HelpState
[src]
pub fn selected_path(&self) -> &Path
[src]
pub fn tree_options(&self) -> TreeOptions
[src]
pub 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
pub fn selection(&self) -> Selection<'_>
[src]
pub fn refresh(&mut self, _screen: Screen, _con: &AppContext) -> Command
[src]
pub fn on_pattern(
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub fn display(
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
panel_skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
[src]
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
panel_skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
pub 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>
impl AppState for PreviewState
[src]
pub fn get_pending_task(&self) -> Option<&'static str>
[src]
pub fn on_pattern(
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
pat: InputPattern,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub fn do_pending_task(
&mut self,
_screen: Screen,
con: &AppContext,
dam: &mut Dam
)
[src]
&mut self,
_screen: Screen,
con: &AppContext,
dam: &mut Dam
)
do the preview filtering if required and not yet done
pub fn selected_path(&self) -> &Path
[src]
pub fn set_selected_path(&mut self, path: PathBuf, con: &AppContext)
[src]
pub fn selection(&self) -> Selection<'_>
[src]
pub fn tree_options(&self) -> TreeOptions
[src]
pub 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
pub fn refresh(&mut self, _screen: Screen, con: &AppContext) -> Command
[src]
pub 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>
pub fn display(
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
panel_skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
[src]
&mut self,
w: &mut W,
screen: Screen,
state_area: Area,
panel_skin: &PanelSkin,
con: &AppContext
) -> Result<(), ProgramError>
pub fn no_verb_status(
&self,
has_previous_state: bool,
con: &AppContext
) -> Status
[src]
&self,
has_previous_state: bool,
con: &AppContext
) -> Status
pub 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>