pub struct LineNumbers {
pub relative: bool,
pub align: Alignment,
pub main_align: Alignment,
pub show_wraps: bool,
/* private fields */
}Expand description
Shows a column of line numbers beside the Buffer
There are various fields that you can use to configure how the
LineNumbers will be displayed. They control things like the
line numbers and the relativeness of the number displayed.
This is a default struct of Duat, that is, it is automatically
placed around every Buffer, but you can disable that behavior
by removing the "BufferWidgets" hook.
Fields§
§relative: boolWether to show relative numbering
The default is false
align: AlignmentWhere to align the numbers
The default is Alignment::Left
main_align: AlignmentWhere to align the main line number
The default is Alignment::Right
show_wraps: boolWether to show wrapped line’s numbers
The default is false
Implementations§
Source§impl LineNumbers
impl LineNumbers
Sourcepub fn builder() -> LineNumbersOpts
pub fn builder() -> LineNumbersOpts
Returns a LineNumbersOpts, used to create a new
LineNumbers
Trait Implementations§
Source§impl Widget for LineNumbers
impl Widget for LineNumbers
Source§fn needs_update(&self, pa: &Pass) -> bool
fn needs_update(&self, pa: &Pass) -> bool
Source§fn on_mouse_event(pa: &mut Pass, handle: &Handle<Self>, event: MouseEvent)
fn on_mouse_event(pa: &mut Pass, handle: &Handle<Self>, event: MouseEvent)
How to handle a
MouseEvent Read moreSource§fn get_print_opts(&self) -> PrintOpts
fn get_print_opts(&self) -> PrintOpts
Auto Trait Implementations§
impl Freeze for LineNumbers
impl !RefUnwindSafe for LineNumbers
impl Send for LineNumbers
impl Sync for LineNumbers
impl Unpin for LineNumbers
impl !UnwindSafe for LineNumbers
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
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.