Skip to main content

text_document_formatting/
dtos.rs

1// Generated by Qleany v1.5.1 from feature_dtos.tera
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
6pub struct SetTextFormatDto {
7    pub position: i64,
8    pub anchor: i64,
9    pub font_family: Option<String>,
10    pub font_point_size: Option<i64>,
11    pub font_weight: Option<i64>,
12    pub font_bold: Option<bool>,
13    pub font_italic: Option<bool>,
14    pub font_underline: Option<bool>,
15    pub font_overline: Option<bool>,
16    pub font_strikeout: Option<bool>,
17    pub letter_spacing: Option<i64>,
18    pub word_spacing: Option<i64>,
19    pub underline_style: Option<UnderlineStyle>,
20    pub vertical_alignment: Option<CharVerticalAlignment>,
21}
22
23#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
24pub enum UnderlineStyle {
25    #[default]
26    NoUnderline,
27    SingleUnderline,
28    DashUnderline,
29    DotLine,
30    DashDotLine,
31    DashDotDotLine,
32    WaveUnderline,
33    SpellCheckUnderline,
34}
35
36#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
37pub enum CharVerticalAlignment {
38    #[default]
39    Normal,
40    SuperScript,
41    SubScript,
42    Middle,
43    Bottom,
44    Top,
45    Baseline,
46}
47#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
48pub struct MergeTextFormatDto {
49    pub position: i64,
50    pub anchor: i64,
51    pub font_family: Option<String>,
52    pub font_bold: Option<bool>,
53    pub font_italic: Option<bool>,
54    pub font_underline: Option<bool>,
55}
56#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
57pub struct SetBlockFormatDto {
58    pub position: i64,
59    pub anchor: i64,
60    pub alignment: Option<Alignment>,
61    pub heading_level: Option<i64>,
62    pub indent: Option<i64>,
63    pub marker: Option<MarkerType>,
64}
65
66#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
67pub enum Alignment {
68    #[default]
69    Left,
70    Right,
71    Center,
72    Justify,
73}
74
75#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
76pub enum MarkerType {
77    #[default]
78    NoMarker,
79    Unchecked,
80    Checked,
81}
82#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
83pub struct SetFrameFormatDto {
84    pub position: i64,
85    pub anchor: i64,
86    pub frame_id: i64,
87    pub height: Option<i64>,
88    pub width: Option<i64>,
89    pub top_margin: Option<i64>,
90    pub bottom_margin: Option<i64>,
91    pub left_margin: Option<i64>,
92    pub right_margin: Option<i64>,
93    pub padding: Option<i64>,
94    pub border: Option<i64>,
95}
96#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
97pub struct SetTableFormatDto {
98    pub table_id: i64,
99    pub border: Option<i64>,
100    pub cell_spacing: Option<i64>,
101    pub cell_padding: Option<i64>,
102    pub width: Option<i64>,
103    pub alignment: Option<Alignment>,
104}
105#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
106pub struct SetTableCellFormatDto {
107    pub cell_id: i64,
108    pub padding: Option<i64>,
109    pub border: Option<i64>,
110    pub vertical_alignment: Option<CellVerticalAlignment>,
111    pub background_color: Option<String>,
112}
113
114#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
115pub enum CellVerticalAlignment {
116    #[default]
117    Top,
118    Middle,
119    Bottom,
120}