cool_rust_input

Trait CustomInput

Source
pub trait CustomInput {
    // Provided methods
    fn handle_key_press(
        &mut self,
        key: &Event,
        current_text: String,
    ) -> KeyPressResult { ... }
    fn before_draw_text(
        &mut self,
        terminal_size: (u16, u16),
        current_text: String,
    ) { ... }
    fn after_draw_text(
        &mut self,
        terminal_size: (u16, u16),
        current_text: String,
    ) { ... }
    fn get_offset(
        &mut self,
        terminal_size: (u16, u16),
        current_text: String,
    ) -> (u16, u16) { ... }
    fn get_size(
        &mut self,
        terminal_size: (u16, u16),
        current_text: String,
    ) -> (u16, u16) { ... }
}

Provided Methods§

Source

fn handle_key_press( &mut self, key: &Event, current_text: String, ) -> KeyPressResult

Source

fn before_draw_text(&mut self, terminal_size: (u16, u16), current_text: String)

Source

fn after_draw_text(&mut self, terminal_size: (u16, u16), current_text: String)

Source

fn get_offset( &mut self, terminal_size: (u16, u16), current_text: String, ) -> (u16, u16)

Source

fn get_size( &mut self, terminal_size: (u16, u16), current_text: String, ) -> (u16, u16)

Implementors§