pub struct IdeMenu { /* private fields */ }
Expand description
Menu to present suggestions like similar to Ide completion menus
Implementations§
Source§impl IdeMenu
impl IdeMenu
Sourcepub fn with_min_completion_width(self, width: u16) -> Self
pub fn with_min_completion_width(self, width: u16) -> Self
Menu builder with new value for min completion width
Sourcepub fn with_max_completion_width(self, width: u16) -> Self
pub fn with_max_completion_width(self, width: u16) -> Self
Menu builder with new value for max completion width
Sourcepub fn with_max_completion_height(self, height: u16) -> Self
pub fn with_max_completion_height(self, height: u16) -> Self
Menu builder with new value for max completion height
Sourcepub fn with_padding(self, padding: u16) -> Self
pub fn with_padding(self, padding: u16) -> Self
Menu builder with new value for padding
Sourcepub fn with_default_border(self) -> Self
pub fn with_default_border(self) -> Self
Menu builder with the default border
Sourcepub fn with_border(
self,
top_right: char,
top_left: char,
bottom_right: char,
bottom_left: char,
horizontal: char,
vertical: char,
) -> Self
pub fn with_border( self, top_right: char, top_left: char, bottom_right: char, bottom_left: char, horizontal: char, vertical: char, ) -> Self
Menu builder with new value for border
Sourcepub fn with_cursor_offset(self, cursor_offset: i16) -> Self
pub fn with_cursor_offset(self, cursor_offset: i16) -> Self
Menu builder with new value for cursor offset
Sourcepub fn with_description_mode(self, description_mode: DescriptionMode) -> Self
pub fn with_description_mode(self, description_mode: DescriptionMode) -> Self
Menu builder with new description mode
Sourcepub fn with_min_description_width(self, min_description_width: u16) -> Self
pub fn with_min_description_width(self, min_description_width: u16) -> Self
Menu builder with new min description width
Sourcepub fn with_max_description_width(self, max_description_width: u16) -> Self
pub fn with_max_description_width(self, max_description_width: u16) -> Self
Menu builder with new max description width
Sourcepub fn with_max_description_height(self, max_description_height: u16) -> Self
pub fn with_max_description_height(self, max_description_height: u16) -> Self
Menu builder with new max description height
Sourcepub fn with_description_offset(self, description_offset: u16) -> Self
pub fn with_description_offset(self, description_offset: u16) -> Self
Menu builder with new description offset
Sourcepub fn with_correct_cursor_pos(self, correct_cursor_pos: bool) -> Self
pub fn with_correct_cursor_pos(self, correct_cursor_pos: bool) -> Self
Menu builder with new correct cursor pos
Trait Implementations§
Source§impl Menu for IdeMenu
impl Menu for IdeMenu
Source§fn can_quick_complete(&self) -> bool
fn can_quick_complete(&self) -> bool
The ide menu can to quick complete if there is only one element
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)
Update 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 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
Source§fn get_values(&self) -> &[Suggestion]
fn get_values(&self) -> &[Suggestion]
Source§fn set_cursor_pos(&mut self, pos: (u16, u16))
fn set_cursor_pos(&mut self, pos: (u16, u16))
Source§impl MenuBuilder for IdeMenu
impl MenuBuilder for IdeMenu
Source§fn settings_mut(&mut self) -> &mut MenuSettings
fn settings_mut(&mut self) -> &mut MenuSettings
Source§fn with_text_style(self, color: Style) -> Self
fn with_text_style(self, color: Style) -> Self
Source§fn with_selected_text_style(self, color: Style) -> Self
fn with_selected_text_style(self, color: Style) -> Self
Source§fn with_description_text_style(self, color: Style) -> Self
fn with_description_text_style(self, color: Style) -> Self
Source§fn with_match_text_style(self, color: Style) -> Self
fn with_match_text_style(self, color: Style) -> Self
Source§fn with_selected_match_text_style(self, color: Style) -> Self
fn with_selected_match_text_style(self, color: Style) -> Self
Source§fn with_marker(self, marker: &str) -> Self
fn with_marker(self, marker: &str) -> Self
Source§fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
fn with_only_buffer_difference(self, only_buffer_difference: bool) -> Self
Auto Trait Implementations§
impl Freeze for IdeMenu
impl RefUnwindSafe for IdeMenu
impl Send for IdeMenu
impl Sync for IdeMenu
impl Unpin for IdeMenu
impl UnwindSafe for IdeMenu
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