use crate::{DcsvResult, Value};
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum CellAlignType {
None,
Left,
Center,
Right,
}
pub trait VCont {
fn new() -> Self;
fn move_row(&mut self, src_index: usize, target_index: usize) -> DcsvResult<()>;
fn move_column(&mut self, src_index: usize, target_index: usize) -> DcsvResult<()>;
fn rename_column(&mut self, column_index: usize, new_name: &str) -> DcsvResult<()>;
fn set_column(&mut self, column_index: usize, value: Value) -> DcsvResult<()>;
fn edit_row(&mut self, row_index: usize, values: &[Option<Value>]) -> DcsvResult<()>;
fn set_row(&mut self, row_index: usize, values: &[Value]) -> DcsvResult<()>;
fn get_cell(&self, x: usize, y: usize) -> Option<&Value>;
fn set_cell(&mut self, x: usize, y: usize, value: Value) -> DcsvResult<()>;
fn insert_row(&mut self, row_index: usize, source: Option<&[Value]>) -> DcsvResult<()>;
fn delete_row(&mut self, row_index: usize) -> bool;
fn insert_column(&mut self, column_index: usize, column_name: &str) -> DcsvResult<()>;
fn delete_column(&mut self, column_index: usize) -> DcsvResult<()>;
fn get_row_count(&self) -> usize;
fn get_column_count(&self) -> usize;
fn drop_data(&mut self);
fn apply_all<F: FnMut(&mut Value)>(&mut self, f: F);
fn update_width_global(&mut self);
fn get_formatted_string(&self, line_delimiter: &str, align_type: CellAlignType) -> String;
fn get_string_table(&self, align_type: CellAlignType) -> Vec<Vec<String>>;
}