pub struct View {
pub content: String,
pub on_mouse: Option<OnMouseFn>,
pub cursor: Option<Cursor>,
pub background_color: Option<Color>,
pub foreground_color: Option<Color>,
pub window_title: String,
pub alt_screen: bool,
pub report_focus: bool,
pub disable_bracketed_paste_mode: bool,
pub mouse_mode: MouseMode,
pub keyboard_enhancements: KeyboardEnhancements,
pub progress_bar: Option<ProgressBar>,
}Expand description
View represents a declarative terminal view in Bubble Tea v2.0.8.
Fields§
§content: StringScreen content formatted string.
on_mouse: Option<OnMouseFn>Optional mouse event interceptor.
cursor: Option<Cursor>Optional cursor configuration.
background_color: Option<Color>Optional background color.
foreground_color: Option<Color>Optional foreground color.
window_title: StringWindow title string.
alt_screen: boolAlternate screen buffer toggle.
report_focus: boolFocus reporting toggle.
disable_bracketed_paste_mode: boolDisable bracketed paste mode toggle.
mouse_mode: MouseModeMouse tracking mode.
keyboard_enhancements: KeyboardEnhancementsKeyboard enhancements requested.
progress_bar: Option<ProgressBar>Optional terminal progress bar.
Implementations§
Source§impl View
impl View
Sourcepub fn new(content: &str) -> Self
pub fn new(content: &str) -> Self
v := tea.NewView("Hello, World!")
```</upstream-comment>Sourcepub fn set_content(&mut self, s: &str)
pub fn set_content(&mut self, s: &str)
Helper method to set view content.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for View
impl !UnwindSafe for View
impl Freeze for View
impl Send for View
impl Sync for View
impl Unpin for View
impl UnsafeUnpin for View
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