ratatui_toolkit/widgets/markdown_widget/state/scroll_state/constructors/new.rs
1//! Constructor for ScrollState.
2
3use crate::widgets::markdown_widget::state::scroll_state::ScrollState;
4
5impl ScrollState {
6 /// Create a new scroll state with default settings.
7 pub fn new() -> Self {
8 Self {
9 scroll_offset: 0,
10 viewport_height: 20,
11 total_lines: 0,
12 current_line: 1,
13 filter: None,
14 filter_mode: false,
15 }
16 }
17}