pub struct PreviewUI {
pub view: Preview,
pub config: PreviewConfig,
pub layout_idx: usize,
pub area: Rect,
pub scroll: [u16; 2],
/* private fields */
}Fields§
§view: Preview§config: PreviewConfig§layout_idx: usize§area: Rectcontent area
scroll: [u16; 2]Implementations§
Source§impl PreviewUI
impl PreviewUI
pub fn new(view: Preview, config: PreviewConfig) -> Self
pub fn update_dimensions(&mut self, area: &Rect)
pub fn layout(&self) -> Option<&PreviewLayout>
pub fn command(&self) -> &str
pub fn cycle_layout(&mut self)
pub fn set_layout(&mut self, idx: u8) -> bool
pub fn is_show(&self) -> bool
pub fn show(&mut self, show: bool) -> bool
pub fn toggle_show(&mut self)
pub fn wrap(&mut self, wrap: bool)
pub fn is_wrap(&self) -> bool
pub fn up(&mut self, n: u16)
pub fn down(&mut self, n: u16)
pub fn scroll(&mut self, horizontal: bool, val: i8)
pub fn set_target(&mut self, target: isize)
pub fn make_preview(&self) -> Paragraph<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreviewUI
impl RefUnwindSafe for PreviewUI
impl Send for PreviewUI
impl Sync for PreviewUI
impl Unpin for PreviewUI
impl UnsafeUnpin for PreviewUI
impl UnwindSafe for PreviewUI
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> 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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformExt for T
impl<T> TransformExt for T
fn transform<Q>(self, transform: impl FnOnce(T) -> Q) -> Q
fn modify<Q>(self, modify: impl FnOnce(&mut T) -> Q) -> T
Source§fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
Example Read more