tree_table/args/
args_align.rs1use crate::CellAlign;
2use crate::SpanKey;
3use crate::statics::default_emit_event_for_api;
4use crate::statics::default_expand_for_api;
5use crate::statics::default_save_selection_for_api;
6use crate::statics::default_undo_for_api;
7
8#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
9#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
10#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
11#[derive(Debug, Clone, PartialEq)]
12pub struct CellAlignArgs {
13 pub key: SpanKey,
14 pub align: Option<CellAlign>,
17 #[cfg_attr(feature = "serde", serde(default = "default_emit_event_for_api"))]
18 pub emit: bool,
19 #[cfg_attr(feature = "serde", serde(default = "default_undo_for_api"))]
20 pub undo: bool,
21 #[cfg_attr(feature = "serde", serde(default = "default_save_selection_for_api"))]
22 pub save_selection: bool,
23 #[cfg_attr(feature = "serde", serde(default = "default_expand_for_api"))]
24 pub expand: bool,
25}
26
27impl Default for CellAlignArgs {
28 fn default() -> Self {
29 CellAlignArgs {
30 key: SpanKey::None,
31 align: None,
32 emit: default_emit_event_for_api(),
33 undo: default_undo_for_api(),
34 save_selection: default_save_selection_for_api(),
35 expand: default_expand_for_api(),
36 }
37 }
38}