pub struct GutterStyle { /* private fields */ }Expand description
Optional line-number presentation supplied by the application or UI layer.
Unspecified properties inherit the editor’s defaults. Keeping them optional lets a per-editor override follow later theme changes for every other property.
Implementations§
Source§impl GutterStyle
impl GutterStyle
Sourcepub fn with_gap(self, gap: impl Into<AbsoluteLength>) -> Self
pub fn with_gap(self, gap: impl Into<AbsoluteLength>) -> Self
Sets the gap before the body text, after any folding controls.
Accepts rems that follow window zoom or pixels for a fixed gap.
Sourcepub fn with_line_number_color(self, color: Hsla) -> Self
pub fn with_line_number_color(self, color: Hsla) -> Self
Sets the color of line numbers outside the current line.
Sourcepub fn with_active_line_number_color(self, color: Hsla) -> Self
pub fn with_active_line_number_color(self, color: Hsla) -> Self
Sets the color of the current line number.
Sourcepub fn with_line_number_font_family(
self,
family: impl Into<SharedString>,
) -> Self
pub fn with_line_number_font_family( self, family: impl Into<SharedString>, ) -> Self
Sets the line-number font independently of the body font.
Sourcepub fn with_line_number_font_size(self, size: impl Into<AbsoluteLength>) -> Self
pub fn with_line_number_font_size(self, size: impl Into<AbsoluteLength>) -> Self
Sets the line-number font size without changing the body row height.
Accepts rems that follow window zoom or pixels for a fixed font size.
Sourcepub fn gap(&self) -> Option<AbsoluteLength>
pub fn gap(&self) -> Option<AbsoluteLength>
Returns the explicitly specified gap.
Sourcepub fn line_number_color(&self) -> Option<Hsla>
pub fn line_number_color(&self) -> Option<Hsla>
Returns the explicitly specified normal line-number color.
Sourcepub fn active_line_number_color(&self) -> Option<Hsla>
pub fn active_line_number_color(&self) -> Option<Hsla>
Returns the explicitly specified current-line number color.
Sourcepub fn line_number_font_family(&self) -> Option<&SharedString>
pub fn line_number_font_family(&self) -> Option<&SharedString>
Returns the explicitly specified line-number font family.
Sourcepub fn line_number_font_size(&self) -> Option<AbsoluteLength>
pub fn line_number_font_size(&self) -> Option<AbsoluteLength>
Returns the explicitly specified line-number font size.
Trait Implementations§
Source§impl Clone for GutterStyle
impl Clone for GutterStyle
Source§impl Debug for GutterStyle
impl Debug for GutterStyle
Source§impl Default for GutterStyle
impl Default for GutterStyle
Source§impl PartialEq for GutterStyle
impl PartialEq for GutterStyle
impl StructuralPartialEq for GutterStyle
Auto Trait Implementations§
impl Forget for GutterStyle
impl Freeze for GutterStyle
impl Move for GutterStyle
impl RefUnwindSafe for GutterStyle
impl Send for GutterStyle
impl Sync for GutterStyle
impl Unpin for GutterStyle
impl UnsafeUnpin for GutterStyle
impl UnwindSafe for GutterStyle
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().