Struct mg::Mg[][src]

pub struct Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
{ /* fields omitted */ }

Implementations

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn default_completers() -> Completers[src]

Get the default completers. One to complete the commands, the other to complete the settings.

pub fn delete_current_completion_item(&self)[src]

Delete the current completion item.

pub fn show_completion(&self)[src]

Show the completion view.

pub fn update_completions(&self)[src]

Update the items of the completion view.

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn get_foreground_color(&self) -> RGBA[src]

Get the color of the text.

pub fn reset_colors(&self)[src]

Reset the background and foreground colors of the status bar.

pub fn set_dark_theme(&mut self, use_dark: bool)[src]

Use the dark variant of the theme if available.

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn action_to_command(&self, action: &str) -> ShortcutCommand[src]

Convert an action String to a command String.

pub fn command_activate(&mut self, input: String)[src]

Handle the command entry activate event.

pub fn execute_commands(
    &mut self,
    parse_result: ParseResult<COMM>,
    activated: bool
)
[src]

Execute the commands and show the errors contained in the parse result.

pub fn handle_command(
    &mut self,
    command: String,
    activated: bool,
    prefix: Option<u32>
) -> Option<Msg<COMM, SETT>>
[src]

Handle the command activate event.

pub fn handle_special_command(
    &mut self,
    activation_type: ActivationType,
    command: &str
) -> Option<Msg<COMM, SETT>>
[src]

Handle a special command activate or key press event.

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn blocking_custom_dialog(
    &mut self,
    responder: Box<dyn Responder>,
    builder: DialogBuilder
)
[src]

Ask a question to the user and block until the user provides it (or cancel).

pub fn blocking_input(
    &mut self,
    responder: Box<dyn Responder>,
    message: String,
    default_answer: String
)
[src]

Ask a question to the user and block until the user provides it (or cancel).

pub fn blocking_question(
    &mut self,
    responder: Box<dyn Responder>,
    message: String,
    choices: Vec<char>
)
[src]

Ask a multiple-choice question to the user and block until the user provides it (or cancel).

pub fn blocking_yes_no_question(
    &mut self,
    responder: Box<dyn Responder>,
    message: String
)
[src]

Show a blocking yes/no question.

pub fn input(
    &mut self,
    responder: Box<dyn Responder>,
    message: String,
    default_answer: String
)
[src]

Ask a question to the user.

pub fn question(
    &mut self,
    responder: Box<dyn Responder>,
    message: String,
    choices: &[char]
)
[src]

Ask a multiple-choice question to the user.

pub fn set_dialog_answer(&mut self, answer: &str)[src]

Set the answer to return to the caller of the dialog.

pub fn show_dialog(&mut self, dialog_builder: DialogBuilder)[src]

Show a dialog created with a DialogBuilder.

pub fn show_dialog_without_shortcuts(&mut self, dialog_builder: DialogBuilder)[src]

Show a dialog created with a DialogBuilder which does not contain shortcut.

pub fn yes_no_question(
    &mut self,
    responder: Box<dyn Responder>,
    message: String
)
[src]

Show a yes/no question.

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn inhibit_key_press(
    current_mode: &Rc<Cell<Mode>>,
    key: &EventKey
) -> Inhibit
[src]

Check if the key should be inhibitted.

pub fn key_press(&mut self, key: &EventKey)[src]

Handle the key press event.

pub fn key_release(&mut self, key: &EventKey)[src]

Handle the key release event.

impl<COMM, SETT> Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

pub fn add_to_shortcut(&mut self, key: Key)[src]

Add the key to the current shortcut.

pub fn clear_shortcut(&mut self)[src]

Clear the current shortcut buffer.

pub fn handle_input_shortcut(&mut self, key: &EventKey) -> bool[src]

Handle a shortcut in input mode.

pub fn inhibit_handle_shortcut(
    current_mode: &Rc<Cell<Mode>>,
    key: &EventKey
) -> Inhibit
[src]

Check if the key should be inhibitted for the shortcut.

pub fn handle_shortcut(&mut self, key: &EventKey) -> Option<Msg<COMM, SETT>>[src]

Handle a possible input of a shortcut.

Trait Implementations

impl<COMM, SETT> Container for Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

type Container = Box

The type of the containing widget, i.e. where the child widgets will be added.

type Containers = MgContainers

Type to contain the additional container widgets.

impl<COMM, SETT> Update for Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

type Msg = Msg<COMM, SETT>

The type of the messages sent to the update() method.

type Model = Model<COMM, SETT>

The type of the model.

type ModelParam = (Modes, Result<PathBuf>, Option<PathBuf>, Vec<DefaultConfig>)

The type of the parameter of the model() function used to initialize the model.

impl<COMM, SETT> Widget for Mg<COMM, SETT> where
    COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
    SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static, 
[src]

An Mg application window contains a status bar where the user can type a command and a central widget.

type Root = Window

The type of the root widget.

Auto Trait Implementations

impl<COMM, SETT> !RefUnwindSafe for Mg<COMM, SETT>[src]

impl<COMM, SETT> !Send for Mg<COMM, SETT>[src]

impl<COMM, SETT> !Sync for Mg<COMM, SETT>[src]

impl<COMM, SETT> Unpin for Mg<COMM, SETT> where
    COMM: Unpin,
    SETT: Unpin
[src]

impl<COMM, SETT> !UnwindSafe for Mg<COMM, SETT>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.