pub struct EditorCustomStyle(/* private fields */);Expand description
The custom style elements that are specific to an Editor.
Implementations§
Source§impl EditorCustomStyle
impl EditorCustomStyle
Sourcepub fn hide_gutter(self, hide: bool) -> EditorCustomStyle
pub fn hide_gutter(self, hide: bool) -> EditorCustomStyle
Sets whether the gutter should be hidden.
Sourcepub fn gutter_accent_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn gutter_accent_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the text accent color of the gutter.
This is the color of the line number for the current line. It will default to the current Text Color
Sourcepub fn gutter_dim_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn gutter_dim_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the text dim color of the gutter.
This is the color of the line number for all lines except the current line. If this is not specified it will default to the gutter accent color.
Sourcepub fn gutter_left_padding(self, padding: f64) -> EditorCustomStyle
pub fn gutter_left_padding(self, padding: f64) -> EditorCustomStyle
Sets the padding to the left of the numbers in the gutter.
Sourcepub fn gutter_right_padding(self, padding: f64) -> EditorCustomStyle
pub fn gutter_right_padding(self, padding: f64) -> EditorCustomStyle
Sets the padding to the right of the numbers in the gutter.
Sourcepub fn gutter_current_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn gutter_current_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the background color of the current line in the gutter
Sourcepub fn selection_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn selection_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the background color to be applied around selected text.
Sourcepub fn indent_style(self, indent_style: IndentStyle) -> EditorCustomStyle
pub fn indent_style(self, indent_style: IndentStyle) -> EditorCustomStyle
Sets the indent style.
Sourcepub fn indent_guide_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn indent_guide_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the color of the indent guide.
Sourcepub fn wrap_method(self, wrap: WrapMethod) -> EditorCustomStyle
pub fn wrap_method(self, wrap: WrapMethod) -> EditorCustomStyle
Sets the method for wrapping lines.
Sourcepub fn cursor_color(self, cursor: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn cursor_color(self, cursor: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the color of the cursor.
Sourcepub fn scroll_beyond_last_line(self, scroll_beyond: bool) -> EditorCustomStyle
pub fn scroll_beyond_last_line(self, scroll_beyond: bool) -> EditorCustomStyle
Allow scrolling beyond the last line of the document.
Sourcepub fn current_line_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn current_line_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the background color of the current line.
Sourcepub fn visible_whitespace(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn visible_whitespace(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the color of visible whitespace characters.
Sourcepub fn render_white_space(
self,
render_white_space: RenderWhitespace,
) -> EditorCustomStyle
pub fn render_white_space( self, render_white_space: RenderWhitespace, ) -> EditorCustomStyle
Sets which white space characters should be rendered.
Sourcepub fn cursor_surrounding_lines(self, lines: usize) -> EditorCustomStyle
pub fn cursor_surrounding_lines(self, lines: usize) -> EditorCustomStyle
Set the number of lines to keep visible above and below the cursor.
Default: 1
Sourcepub fn indent_guide(self, show: bool) -> EditorCustomStyle
pub fn indent_guide(self, show: bool) -> EditorCustomStyle
Sets whether the indent guides should be displayed.
Sourcepub fn modal(self, modal: bool) -> EditorCustomStyle
pub fn modal(self, modal: bool) -> EditorCustomStyle
Sets the editor’s mode to modal or non-modal.
Sourcepub fn modal_relative_line(self, modal_relative_line: bool) -> EditorCustomStyle
pub fn modal_relative_line(self, modal_relative_line: bool) -> EditorCustomStyle
Determines if line numbers are relative in modal mode.
Sourcepub fn smart_tab(self, smart_tab: bool) -> EditorCustomStyle
pub fn smart_tab(self, smart_tab: bool) -> EditorCustomStyle
Enables or disables smart tab behavior, which inserts the indent style detected in the file when the tab key is pressed.
Sourcepub fn phantom_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn phantom_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the color of phantom text
Sourcepub fn placeholder_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
pub fn placeholder_color(self, color: AlphaColor<Srgb>) -> EditorCustomStyle
Sets the color of the placeholder text.
Sourcepub fn preedit_underline_color(
self,
color: AlphaColor<Srgb>,
) -> EditorCustomStyle
pub fn preedit_underline_color( self, color: AlphaColor<Srgb>, ) -> EditorCustomStyle
Sets the color of the underline for preedit text.
Auto Trait Implementations§
impl Freeze for EditorCustomStyle
impl !RefUnwindSafe for EditorCustomStyle
impl !Send for EditorCustomStyle
impl !Sync for EditorCustomStyle
impl Unpin for EditorCustomStyle
impl UnsafeUnpin for EditorCustomStyle
impl !UnwindSafe for EditorCustomStyle
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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