pub struct MarkdownViewer { /* private fields */ }Expand description
The main Markdown viewer widget.
Implementations§
Source§impl MarkdownViewer
impl MarkdownViewer
pub const fn new(id_salt: &'static str) -> Self
Sourcepub fn show_scrollable(
&self,
ui: &mut Ui,
cache: &mut MarkdownCache,
style: &MarkdownStyle,
source: &str,
scroll_to_y: Option<f32>,
)
pub fn show_scrollable( &self, ui: &mut Ui, cache: &mut MarkdownCache, style: &MarkdownStyle, source: &str, scroll_to_y: Option<f32>, )
Render markdown in a scrollable area with viewport culling.
Only blocks overlapping the visible viewport are actually rendered; off-screen blocks are replaced by empty space allocations.
If scroll_to_y is Some(y), the scroll area will jump to that offset.
Sourcepub fn show(
&self,
ui: &mut Ui,
cache: &mut MarkdownCache,
style: &MarkdownStyle,
source: &str,
)
pub fn show( &self, ui: &mut Ui, cache: &mut MarkdownCache, style: &MarkdownStyle, source: &str, )
Render markdown inline (no scroll area, no culling).
Auto Trait Implementations§
impl Freeze for MarkdownViewer
impl RefUnwindSafe for MarkdownViewer
impl Send for MarkdownViewer
impl Sync for MarkdownViewer
impl Unpin for MarkdownViewer
impl UnsafeUnpin for MarkdownViewer
impl UnwindSafe for MarkdownViewer
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