bubbles/core/
view.rs

1use crossterm::style::Color;
2
3use super::dimension::Dimension;
4
5#[derive(Clone)]
6pub struct View {
7    pub content: String,
8    pub dimension: Dimension,
9    pub background: Color,
10    pub color: Color,
11}
12
13impl View {
14    pub fn new(content: String, dimension: Dimension, color: Color, background: Color) -> Self {
15        Self {
16            content,
17            color,
18            dimension,
19            background,
20        }
21    }
22}
23
24impl Default for View {
25    fn default() -> Self {
26        Self {
27            content: "".to_owned(),
28            dimension: Dimension::default(),
29            color: Color::Black,
30            background: Color::Black,
31        }
32    }
33}