pub struct ColumnarMenu { /* private fields */ }Expand description
Menu to present suggestions in a columnar fashion It presents a description of the suggestion if available
Implementations§
Source§impl ColumnarMenu
impl ColumnarMenu
Sourcepub fn with_text_style(self, text_style: Style) -> Self
pub fn with_text_style(self, text_style: Style) -> Self
Menu builder with new value for text style
Sourcepub fn with_selected_text_style(self, selected_text_style: Style) -> Self
pub fn with_selected_text_style(self, selected_text_style: Style) -> Self
Menu builder with new value for text style
Sourcepub fn with_description_text_style(self, description_text_style: Style) -> Self
pub fn with_description_text_style(self, description_text_style: Style) -> Self
Menu builder with new value for text style
Sourcepub fn with_columns(self, columns: u16) -> Self
pub fn with_columns(self, columns: u16) -> Self
Menu builder with new columns value
Sourcepub fn with_column_width(self, col_width: Option<usize>) -> Self
pub fn with_column_width(self, col_width: Option<usize>) -> Self
Menu builder with new column width value
Sourcepub fn with_column_padding(self, col_padding: usize) -> Self
pub fn with_column_padding(self, col_padding: usize) -> Self
Menu builder with new column width value
Sourcepub fn with_marker(self, marker: String) -> Self
pub fn with_marker(self, marker: String) -> Self
Menu builder with marker
Sourcepub fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
pub fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
Menu builder with new only buffer difference
Trait Implementations§
Source§impl Default for ColumnarMenu
impl Default for ColumnarMenu
Source§impl Menu for ColumnarMenu
impl Menu for ColumnarMenu
Source§fn can_quick_complete(&self) -> bool
fn can_quick_complete(&self) -> bool
The columnar menu can to quick complete if there is only one element
Source§fn can_partially_complete(
&mut self,
values_updated: bool,
editor: &mut Editor,
completer: &mut dyn Completer,
) -> bool
fn can_partially_complete( &mut self, values_updated: bool, editor: &mut Editor, completer: &mut dyn Completer, ) -> bool
The columnar menu can try to find the common string and replace it in the given line buffer
Selects what type of event happened with the menu
Source§fn update_values(&mut self, editor: &mut Editor, completer: &mut dyn Completer)
fn update_values(&mut self, editor: &mut Editor, completer: &mut dyn Completer)
Updates menu values
Source§fn update_working_details(
&mut self,
editor: &mut Editor,
completer: &mut dyn Completer,
painter: &Painter,
)
fn update_working_details( &mut self, editor: &mut Editor, completer: &mut dyn Completer, painter: &Painter, )
The working details for the menu changes based on the size of the lines collected from the completer
Source§fn replace_in_buffer(&self, editor: &mut Editor)
fn replace_in_buffer(&self, editor: &mut Editor)
The buffer gets replaced in the Span location
Source§fn get_values(&self) -> &[Suggestion]
fn get_values(&self) -> &[Suggestion]
Gets values from filler that will be displayed in the menu
Auto Trait Implementations§
impl Freeze for ColumnarMenu
impl RefUnwindSafe for ColumnarMenu
impl Send for ColumnarMenu
impl Sync for ColumnarMenu
impl Unpin for ColumnarMenu
impl UnwindSafe for ColumnarMenu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more