summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/csv_export.gml
blob: d2def8652c747bfa386e4c8ca1408eedb004f033 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
@GUI::Widget {
    layout: @GUI::VerticalBoxLayout {
        margins: [20, 20, 20, 20]
    }

    @GUI::HorizontalSplitter {
        @GUI::Widget {
            name: "csv_options"

            layout: @GUI::VerticalBoxLayout {
            }

            @GUI::Widget {
                layout: @GUI::HorizontalBoxLayout {
                }

                @GUI::GroupBox {
                    title: "Delimiter"

                    layout: @GUI::VerticalBoxLayout {
                        // FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
                        margins: [10, 20, 10, 10]
                    }

                    @GUI::RadioButton {
                        name: "delimiter_comma_radio"
                        text: "Comma"
                        autosize: true
                    }

                    @GUI::RadioButton {
                        name: "delimiter_semicolon_radio"
                        text: "Semicolon"
                        autosize: true
                    }

                    @GUI::RadioButton {
                        name: "delimiter_tab_radio"
                        text: "Tab"
                        autosize: true
                    }

                    @GUI::RadioButton {
                        name: "delimiter_space_radio"
                        text: "Space"
                        autosize: true
                    }

                    @GUI::Widget {
                        fixed_height: 25

                        layout: @GUI::HorizontalBoxLayout {
                        }

                        @GUI::RadioButton {
                            name: "delimiter_other_radio"
                            text: "Other: "
                            autosize: true
                        }

                        @GUI::TextBox {
                            name: "delimiter_other_text_box"
                            text: ""
                        }
                    }
                }

                @GUI::GroupBox {
                    title: "Quote"

                    layout: @GUI::VerticalBoxLayout {
                        // FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
                        margins: [10, 20, 10, 10]
                    }

                    @GUI::RadioButton {
                        name: "quote_single_radio"
                        text: "Single Quotes"
                        autosize: true
                    }

                    @GUI::RadioButton {
                        name: "quote_double_radio"
                        text: "Double Quotes"
                        autosize: true
                    }

                    @GUI::Widget {
                        fixed_height: 25

                        layout: @GUI::HorizontalBoxLayout {
                        }

                        @GUI::RadioButton {
                            name: "quote_other_radio"
                            text: "Other: "
                            autosize: true
                        }

                        @GUI::TextBox {
                            name: "quote_other_text_box"
                            text: ""
                        }
                    }

                    @GUI::Widget {
                    }

                    @GUI::Widget {
                        fixed_height: 25

                        layout: @GUI::HorizontalBoxLayout {
                        }

                        @GUI::Label {
                            text: "Escape by "
                            autosize: true
                        }

                        @GUI::ComboBox {
                            name: "quote_escape_combo_box"
                            model_only: true
                        }
                    }

                    @GUI::Widget {
                    }
                }
            }

            @GUI::Widget {
                fixed_height: 25

                layout: @GUI::HorizontalBoxLayout {
                }

                @GUI::CheckBox {
                    name: "export_header_check_box"
                    text: "Export with headers"
                }

                @GUI::CheckBox {
                    name: "quote_all_fields_check_box"
                    text: "Quote all fields"
                }
            }
        }

        @GUI::GroupBox {
            title: "Data Preview"
            fixed_width: 150

            layout: @GUI::VerticalBoxLayout {
                // FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
                margins: [10, 20, 10, 10]
            }

            @GUI::TextEditor {
                name: "data_preview_text_editor"
                mode: "ReadOnly"
            }
        }
    }
}