pub struct PreviewUI {
pub view: Preview,
pub config: PreviewConfig,
pub scroll: [u16; 2],
/* private fields */
}Fields§
§view: Preview§config: PreviewConfig§scroll: [u16; 2]Implementations§
Source§impl PreviewUI
impl PreviewUI
pub fn new( view: Preview, config: PreviewConfig, [ui_width, ui_height]: [u16; 2], ) -> Self
pub fn update_dimensions(&mut self, area: &Rect)
pub fn reevaluate_show_condition( &mut self, [ui_width, ui_height]: [u16; 2], hide: bool, )
Sourcepub fn setting(&self) -> Option<&PreviewSetting>
pub fn setting(&self) -> Option<&PreviewSetting>
None if not show OR if max = 0 (disabled layour)
pub fn visible(&self) -> bool
pub fn command(&self) -> &str
pub fn border(&self) -> &BorderSetting
pub fn get_initial_command(&self) -> &str
pub fn cycle_layout(&mut self)
pub fn set_layout(&mut self, idx: u8) -> 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 offset(&self) -> usize
pub fn target_line(&self) -> Option<usize>
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: Option<isize>)
pub fn make_preview(&mut 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