Struct reedline::DescriptionMenu
source · pub struct DescriptionMenu { /* private fields */ }
Expand description
Completion menu definition
Implementations§
source§impl DescriptionMenu
impl DescriptionMenu
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_selection_rows(self, selection_rows: u16) -> Self
pub fn with_selection_rows(self, selection_rows: u16) -> Self
Menu builder with new selection rows value
sourcepub fn with_description_rows(self, description_rows: usize) -> Self
pub fn with_description_rows(self, description_rows: usize) -> Self
Menu builder with new description rows value
Trait Implementations§
source§impl Default for DescriptionMenu
impl Default for DescriptionMenu
source§impl Menu for DescriptionMenu
impl Menu for DescriptionMenu
source§fn can_quick_complete(&self) -> bool
fn can_quick_complete(&self) -> bool
The menu stays active even with one record
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 menu does not need to partially complete
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
Calculates the real required lines for the menu considering how many lines
wrap the terminal or if entries have multiple lines
Creates the menu representation as a string which will be painted by the painter
source§fn set_cursor_pos(&mut self, _pos: (u16, u16))
fn set_cursor_pos(&mut self, _pos: (u16, u16))
Sets the position of the cursor (currently only required by the IDE menu)
source§impl MenuBuilder for DescriptionMenu
impl MenuBuilder for DescriptionMenu
source§fn settings_mut(&mut self) -> &mut MenuSettings
fn settings_mut(&mut self) -> &mut MenuSettings
Get mutable MenuSettings
required for the builder functions
source§fn with_text_style(self, color: Style) -> Self
fn with_text_style(self, color: Style) -> Self
Menu builder with new value for text style
source§fn with_selected_text_style(self, color: Style) -> Self
fn with_selected_text_style(self, color: Style) -> Self
Menu builder with new value for selected text style
source§fn with_description_text_style(self, color: Style) -> Self
fn with_description_text_style(self, color: Style) -> Self
Menu builder with new value for description style
source§fn with_match_text_style(self, color: Style) -> Self
fn with_match_text_style(self, color: Style) -> Self
Menu builder with new value for match style
This is the style of the part of the input text, the suggestions
are based on
source§fn with_selected_match_text_style(self, color: Style) -> Self
fn with_selected_match_text_style(self, color: Style) -> Self
Menu builder with new value for selected match style
This is the style of the part of the input text, the suggestions
are based on
source§fn with_marker(self, marker: &str) -> Self
fn with_marker(self, marker: &str) -> Self
Menu builder with new value for marker
source§fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
Menu builder with new value for only_buffer_difference
Auto Trait Implementations§
impl RefUnwindSafe for DescriptionMenu
impl Send for DescriptionMenu
impl Sync for DescriptionMenu
impl Unpin for DescriptionMenu
impl UnwindSafe for DescriptionMenu
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
Mutably borrows from an owned value. Read more