ratatui_toolkit/widgets/markdown_widget/widget/constructors/
pane_title.rs

1//! Constructor for pane title.
2
3use crate::widgets::markdown_widget::widget::MarkdownWidget;
4
5impl<'a> MarkdownWidget<'a> {
6    /// Set the title for the Pane that wraps the widget.
7    ///
8    /// This is typically the filename being displayed.
9    /// Only used when `has_pane` is true (default).
10    ///
11    /// # Arguments
12    ///
13    /// * `title` - The title to display in the pane's title bar
14    ///
15    /// # Returns
16    ///
17    /// The modified `MarkdownWidget` instance.
18    pub fn with_pane_title(mut self, title: impl Into<String>) -> Self {
19        self.pane_title = Some(title.into());
20        self
21    }
22}