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
Queue menu event
Source§fn reset_position(&mut self)
fn reset_position(&mut self)
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)
Apply via CompletionDisplay::accept (guards against stale spans)
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 set_active(&mut self, active: bool)
fn set_active(&mut self, active: bool)
Source§fn clear_input(&mut self)
fn clear_input(&mut self)
Source§fn on_activate(&mut self)
fn on_activate(&mut self)
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)
quick_completion option is true, the len of the values
is calculated to know if there is only one value so it can be selected
immediatelySource§fn get_values(&self) -> &[Suggestion]
fn get_values(&self) -> &[Suggestion]
Source§fn results_are_provisional(&self) -> bool
fn results_are_provisional(&self) -> bool
Source§fn is_awaiting_first_answer(&self) -> bool
fn is_awaiting_first_answer(&self) -> bool
Source§fn set_cursor_pos(&mut self, pos: (u16, u16))
fn set_cursor_pos(&mut self, pos: (u16, u16))
Source§fn on_deactivate(&mut self)
fn on_deactivate(&mut self)
Source§fn reload(
&mut self,
updated: bool,
editor: &mut Editor,
completer: &mut dyn Completer,
)
fn reload( &mut self, updated: bool, editor: &mut Editor, completer: &mut dyn Completer, )
Source§fn is_visible(&self) -> bool
fn is_visible(&self) -> bool
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
Source§fn with_input_mode(self, mode: InputMode) -> Self
fn with_input_mode(self, mode: InputMode) -> Self
only_buffer_difference when set.Source§fn with_output_mode(self, mode: OutputMode) -> Self
fn with_output_mode(self, mode: OutputMode) -> Self
OutputMode::SuggestedSpan when unset.Auto Trait Implementations§
impl Freeze for IdeMenu
impl RefUnwindSafe for IdeMenu
impl Send for IdeMenu
impl Sync for IdeMenu
impl Unpin for IdeMenu
impl UnsafeUnpin 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