ratatui_toolkit/widgets/markdown_widget/widget/constructors/toc_scroll_offset.rs
1//! Set the TOC scroll offset.
2
3use crate::widgets::markdown_widget::widget::MarkdownWidget;
4
5impl<'a> MarkdownWidget<'a> {
6 /// Set the TOC scroll offset.
7 ///
8 /// # Arguments
9 ///
10 /// * `offset` - The scroll offset for the TOC list
11 ///
12 /// # Returns
13 ///
14 /// Self for method chaining.
15 pub fn toc_scroll_offset(mut self, offset: usize) -> Self {
16 self.toc_scroll_offset = offset;
17 self
18 }
19}