Struct mg::Mg [−][src]
Implementations
impl<COMM, SETT> Mg<COMM, SETT> where
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
[src]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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]
&mut self,
parse_result: ParseResult<COMM>,
activated: bool
)
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]
&mut self,
command: String,
activated: bool,
prefix: Option<u32>
) -> Option<Msg<COMM, SETT>>
Handle the command activate event.
pub fn handle_special_command(
&mut self,
activation_type: ActivationType,
command: &str
) -> Option<Msg<COMM, SETT>>
[src]
&mut self,
activation_type: ActivationType,
command: &str
) -> Option<Msg<COMM, SETT>>
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
pub fn blocking_custom_dialog(
&mut self,
responder: Box<dyn Responder>,
builder: DialogBuilder
)
[src]
&mut self,
responder: Box<dyn Responder>,
builder: DialogBuilder
)
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]
&mut self,
responder: Box<dyn Responder>,
message: String,
default_answer: String
)
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]
&mut self,
responder: Box<dyn Responder>,
message: String,
choices: Vec<char>
)
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]
&mut self,
responder: Box<dyn Responder>,
message: String
)
Show a blocking yes/no question.
pub fn input(
&mut self,
responder: Box<dyn Responder>,
message: String,
default_answer: String
)
[src]
&mut self,
responder: Box<dyn Responder>,
message: String,
default_answer: String
)
Ask a question to the user.
pub fn question(
&mut self,
responder: Box<dyn Responder>,
message: String,
choices: &[char]
)
[src]
&mut self,
responder: Box<dyn Responder>,
message: String,
choices: &[char]
)
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]
&mut self,
responder: Box<dyn Responder>,
message: String
)
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
pub fn inhibit_key_press(
current_mode: &Rc<Cell<Mode>>,
key: &EventKey
) -> Inhibit
[src]
current_mode: &Rc<Cell<Mode>>,
key: &EventKey
) -> Inhibit
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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]
current_mode: &Rc<Cell<Mode>>,
key: &EventKey
) -> Inhibit
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]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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.
fn container(&self) -> &Self::Container
[src]
fn other_containers(&self) -> Self::Containers
[src]
fn add_widget<WIDGET: Widget>(
container: &ContainerComponent<Self>,
widget: &Component<WIDGET>
) -> Container
[src]
container: &ContainerComponent<Self>,
widget: &Component<WIDGET>
) -> Container
impl<COMM, SETT> Update for Mg<COMM, SETT> where
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
[src]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
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.
fn update(&mut self, event: Msg<COMM, SETT>)
[src]
fn model(
relm: &Relm<Self>,
(user_modes, settings_filename, include_path, default_config): (Modes, Result<PathBuf>, Option<PathBuf>, Vec<DefaultConfig>)
) -> Model<COMM, SETT>
[src]
relm: &Relm<Self>,
(user_modes, settings_filename, include_path, default_config): (Modes, Result<PathBuf>, Option<PathBuf>, Vec<DefaultConfig>)
) -> Model<COMM, SETT>
pub fn subscriptions(&mut self, _relm: &Relm<Self>)
[src]
impl<COMM, SETT> Widget for Mg<COMM, SETT> where
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
[src]
COMM: Clone + EnumFromStr + EnumMetaData + SpecialCommand + 'static,
SETT: Default + EnumMetaData + Settings + SettingCompletion + 'static,
An Mg application window contains a status bar where the user can type a command and a central widget.
fn init_view(&mut self)
[src]
fn view(relm: &Relm<Self>, __relm_model: Self::Model) -> Self
[src]
type Root = Window
The type of the root widget.
fn root(&self) -> Self::Root
[src]
pub fn on_add<W>(&self, _parent: W) where
W: IsA<Widget> + IsA<Object>,
[src]
W: IsA<Widget> + IsA<Object>,
pub fn parent_id() -> Option<&'static str>
[src]
pub fn run(model_param: Self::ModelParam) -> Result<(), ()> where
Self: 'static,
[src]
Self: 'static,
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]
COMM: Unpin,
SETT: Unpin,
impl<COMM, SETT> !UnwindSafe for Mg<COMM, SETT>
[src]
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, 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>,