SimpleStyling

Struct SimpleStyling 

Source
pub struct SimpleStyling { /* private fields */ }

Implementations§

Source§

impl SimpleStyling

Source

pub fn builder() -> SimpleStylingBuilder

Source

pub fn new() -> Self

Source§

impl SimpleStyling

Source

pub fn increment_id(&mut self)

Source

pub fn set_font_size(&mut self, font_size: usize)

Source

pub fn set_line_height(&mut self, line_height: f32)

Source

pub fn set_font_family(&mut self, font_family: Vec<FamilyOwned>)

Source

pub fn set_weight(&mut self, weight: Weight)

Source

pub fn set_italic_style(&mut self, italic_style: Style)

Source

pub fn set_stretch(&mut self, stretch: Stretch)

Source

pub fn set_tab_width(&mut self, tab_width: usize)

Source

pub fn set_atomic_soft_tabs(&mut self, atomic_soft_tabs: bool)

Trait Implementations§

Source§

impl Clone for SimpleStyling

Source§

fn clone(&self) -> SimpleStyling

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SimpleStyling

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SimpleStyling

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Styling for SimpleStyling

Source§

fn id(&self) -> u64

The id for caching the styling.
Source§

fn font_size(&self, _edid: EditorId, _line: usize) -> usize

Source§

fn line_height(&self, _edid: EditorId, _line: usize) -> f32

Source§

fn font_family(&self, _edid: EditorId, _line: usize) -> Cow<'_, [FamilyOwned]>

Source§

fn weight(&self, _edid: EditorId, _line: usize) -> Weight

Source§

fn italic_style(&self, _edid: EditorId, _line: usize) -> Style

Source§

fn stretch(&self, _edid: EditorId, _line: usize) -> Stretch

Source§

fn tab_width(&self, _edid: EditorId, _line: usize) -> usize

Source§

fn atomic_soft_tabs(&self, _edid: EditorId, _line: usize) -> bool

Whether the cursor should treat leading soft tabs as if they are hard tabs
Source§

fn apply_attr_styles( &self, _edid: EditorId, _style: &EditorStyle, _line: usize, _default: Attrs<'_>, _attrs: &mut AttrsList, )

Apply custom attribute styles to the line
Source§

fn apply_layout_styles( &self, _edid: EditorId, _style: &EditorStyle, _line: usize, _layout_line: &mut TextLayoutLine, )

Source§

fn indent_line( &self, _edid: EditorId, line: usize, _line_content: &str, ) -> usize

Which line the indentation line should be based off of This is used for lining it up under a scope.
Source§

fn paint_caret(&self, _edid: EditorId, _line: usize) -> bool

Whether it should draw the cursor caret on the given line. Note that these are extra conditions on top of the typical hide cursor & the editor being active conditions This is called whenever we paint the line.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,