Struct broot::command::PanelInput
source · pub struct PanelInput {
pub input_field: InputField,
/* private fields */
}
Expand description
Wrap the input of a panel, receive events and make commands
Fields§
§input_field: InputField
Implementations§
source§impl PanelInput
impl PanelInput
pub fn new(area: Area) -> Self
pub fn set_content(&mut self, content: &str)
pub fn get_content(&self) -> String
pub fn display( &mut self, w: &mut W, active: bool, mode: Mode, area: Area, panel_skin: &PanelSkin ) -> Result<(), ProgramError>
sourcepub fn on_event(
&mut self,
w: &mut W,
event: TimedEvent,
con: &AppContext,
sel_info: SelInfo<'_>,
app_state: &AppState,
mode: Mode,
panel_state_type: PanelStateType
) -> Result<Command, ProgramError>
pub fn on_event( &mut self, w: &mut W, event: TimedEvent, con: &AppContext, sel_info: SelInfo<'_>, app_state: &AppState, mode: Mode, panel_state_type: PanelStateType ) -> Result<Command, ProgramError>
consume the event to
- maybe change the input
- build a command then redraw the input field