1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::CellOption;
use papergrid::{Entity, Grid, Settings};
#[derive(Debug)]
pub struct Indent(usize, usize, usize, usize);
impl Indent {
pub fn new(left: usize, right: usize, top: usize, bottom: usize) -> Self {
Self(left, right, top, bottom)
}
}
impl CellOption for Indent {
fn change_cell(&self, grid: &mut Grid, row: usize, column: usize) {
grid.set(
Entity::Cell(row, column),
Settings::new().indent(self.0, self.1, self.2, self.3),
)
}
}