pub struct OpenWithDialog {
pub extension: String,
pub mime_type: String,
pub apps: Vec<String>,
pub selected_index: usize,
pub visible: bool,
}Expand description
Model for an “Open With” dialog, presenting available apps for a file type.
Fields§
§extension: StringFile extension being opened.
mime_type: StringMIME type of the file.
apps: Vec<String>Available applications.
selected_index: usizeCurrently highlighted index.
visible: boolWhether the dialog is visible.
Implementations§
Source§impl OpenWithDialog
impl OpenWithDialog
Sourcepub fn from_registry(registry: &AssociationRegistry, ext: &str) -> Self
pub fn from_registry(registry: &AssociationRegistry, ext: &str) -> Self
Create a dialog from an association registry and file extension.
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Move selection up.
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Move selection down.
Sourcepub fn selected_app(&self) -> Option<&str>
pub fn selected_app(&self) -> Option<&str>
Get the currently selected application.