Debian Codegraph @

sys/Ui.cpp

raw symbols SCIP
1 /* Ui.cpp
2 *
3 * Copyright (C) 1992-2026 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "../kar/longchar.h"cxx . . $ `<file>/kar/longchar.h`/
20 #include "machine.h"cxx . . $ `<file>/sys/machine.h`/
21 #include "GuiP.h"cxx . . $ `<file>/sys/GuiP.h`/
22 #include "Collection.h"cxx . . $ `<file>/sys/Collection.h`/
23 #include "UiP.h"cxx . . $ `<file>/sys/UiP.h`/
24 #include "ScriptEditor.h"cxx . . $ `<file>/sys/ScriptEditor.h`/
25 #include "Graphics.h"cxx . . $ `<file>/sys/Graphics.h`/ // colours
26 #include "NUM2.h"cxx . . $ `<file>/dwsys/NUM2.h`/ // get elements of ranges
27
28 #include "enums_getText.h"cxx . . $ `<file>/melder/enums_getText.h`/
29 #include "Ui_enums.h"cxx . . $ `<file>/sys/Ui_enums.h`/
30 #include "enums_getValue.h"cxx . . $ `<file>/melder/enums_getValue.h`/
31 #include "Ui_enums.h"cxx . . $ `<file>/sys/Ui_enums.h`/
32
33 kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat# theRealMatrixFormatcxx . . $ theRealMatrixFormat.;
34 kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat# theStringArrayFormatcxx . . $ theStringArrayFormat.;
35
36 void Ui_prefscxx . . $ Ui_prefs(49f6e7a06ebc5aa8). () {
37 Preferences_addEnumcxx . . $ `sys/Preferences.h:45:9`! (U"Ui.realMatrixFormat", & theRealMatrixFormat, kUi_realMatrixFormat, (int) kUi_realMatrixFormat::DEFAULT);
38 Preferences_addEnumcxx . . $ `sys/Preferences.h:45:9`! (U"Ui.stringArrayFormat", & theStringArrayFormat, kUi_stringArrayFormat, (int) kUi_stringArrayFormat::DEFAULT);
39 }
40
41 static conststring32cxx . . $ conststring32# formatNumericMatrixcxx . . $ formatNumericMatrix(d7fd7450609ee870). (constMATcxx . . $ constMAT# cells, kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat# format) {
42 static MelderStringcxx . . $ MelderString# buffer;
43 MelderString_emptycxx . . $ MelderString_empty(93db1090f27e5462). (& buffer);
44 switch (format) {
45 case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::ONE_ROW_PER_LINE_cxx . . $ kUi_realMatrixFormat#ONE_ROW_PER_LINE_.: {
46 for (integercxx . . $ integer# irow = 1; irow <= cells.nrowcxx . . $ constmatrix#nrow.; irow ++) {
47 for (integercxx . . $ integer# icol = 1; icol <= cells.ncolcxx . . $ constmatrix#ncol.; icol ++) {
48 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, cells [cxx . . $ constmatrix#`operator[]`(aae4ad074ae650ba).irow] [cxx . . $ constvector#`operator[]`(e616e229aa94bfcf).icol]);
49 if (icol < cells.ncolcxx . . $ constmatrix#ncol.)
50 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U' ');
51 }
52 if (irow < cells.nrowcxx . . $ constmatrix#nrow.)
53 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U'\n');
54 }
55 } break; case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::FORMULA_cxx . . $ kUi_realMatrixFormat#FORMULA_.: {
56 if (NUMisEmptycxx . . $ NUMisEmpty(d1d1b198a4d2bdd0). (cells)) {
57 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U"zero## (0, 0)");
58 } else {
59 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U"{ ");
60 for (integercxx . . $ integer# irow = 1; irow <= cells.nrowcxx . . $ constmatrix#nrow.; irow ++) {
61 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U"{ ");
62 for (integercxx . . $ integer# icol = 1; icol <= cells.ncolcxx . . $ constmatrix#ncol.; icol ++) {
63 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, cells [cxx . . $ constmatrix#`operator[]`(aae4ad074ae650ba).irow] [cxx . . $ constvector#`operator[]`(e616e229aa94bfcf).icol]);
64 if (icol < cells.ncolcxx . . $ constmatrix#ncol.)
65 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U", ");
66 }
67 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U" }");
68 if (irow < cells.nrowcxx . . $ constmatrix#nrow.)
69 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U", ");
70 }
71 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U" }");
72 }
73 } break; case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::UNDEFINEDcxx . . $ kUi_realMatrixFormat#UNDEFINED.: {
74 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown numeric matrix format.");
75 }
76 }
77 return buffer.stringcxx . . $ MelderString#string.;
78 }
79
80 static void MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (MelderStringcxx . . $ MelderString# *buffer, conststring32cxx . . $ conststring32# string) {
81 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (buffer, U'"');
82 for (const char32cxx . . $ char32# *p = & string [0]; *p != U'\0'; p ++)
83 if (*p == U'"')
84 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (buffer, U"\"\"");
85 else
86 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (buffer, *p);
87 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (buffer, U'"');
88 }
89
90 static conststring32cxx . . $ conststring32# formatStringArraycxx . . $ formatStringArray(aa2959be07713b05). (constSTRVECcxx . . $ constSTRVEC# strings, kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat# format) {
91 static MelderStringcxx . . $ MelderString# buffer;
92 MelderString_emptycxx . . $ MelderString_empty(93db1090f27e5462). (& buffer);
93 switch (format) {
94 case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::WHITESPACE_SEPARATED_cxx . . $ kUi_stringArrayFormat#WHITESPACE_SEPARATED_.: {
95 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
96 if (str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U'"') || Melder_findHorizontalOrVerticalSpacecxx . . $ Melder_findHorizontalOrVerticalSpace(efea2b2856d283a0). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]))
97 MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
98 else
99 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
100 if (i < strings.sizecxx . . $ _conststringvector#size.)
101 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U' ');
102 }
103 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::COMMA_SEPARATED_cxx . . $ kUi_stringArrayFormat#COMMA_SEPARATED_.: {
104 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
105 if (str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U'"') || str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U','))
106 MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
107 else
108 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
109 if (i < strings.sizecxx . . $ _conststringvector#size.)
110 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U',');
111 }
112 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::SEMICOLON_SEPARATED_cxx . . $ kUi_stringArrayFormat#SEMICOLON_SEPARATED_.: {
113 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
114 if (str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U'"') || str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U';'))
115 MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
116 else
117 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
118 if (i < strings.sizecxx . . $ _conststringvector#size.)
119 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U';');
120 }
121 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::PIPE_SEPARATED_cxx . . $ kUi_stringArrayFormat#PIPE_SEPARATED_.: {
122 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
123 if (str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U'"') || str32chrcxx . . $ str32chr(328a9ede0fba853a). (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], U'|'))
124 MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
125 else
126 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
127 if (i < strings.sizecxx . . $ _conststringvector#size.)
128 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U'|');
129 }
130 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::ONE_PER_LINE_cxx . . $ kUi_stringArrayFormat#ONE_PER_LINE_.: {
131 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
132 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
133 if (i < strings.sizecxx . . $ _conststringvector#size.)
134 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& buffer, U'\n');
135 }
136 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::FORMULA_cxx . . $ kUi_stringArrayFormat#FORMULA_.: {
137 if (NUMisEmptycxx . . $ NUMisEmpty(72eec41a35d7e37c). (strings)) {
138 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U"empty$# (0)");
139 } else {
140 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U"{ ");
141 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
142 MelderString_appendQuotedcxx . . $ MelderString_appendQuoted(57da5e9024108ba). (& buffer, strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]);
143 if (i < strings.sizecxx . . $ _conststringvector#size.)
144 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U", ");
145 }
146 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& buffer, U" }");
147 }
148 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::UNDEFINEDcxx . . $ kUi_stringArrayFormat#UNDEFINED.: {
149 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown string array format.");
150 }
151 }
152 return buffer.stringcxx . . $ MelderString#string.;
153 }
154
155 /***** class UiField: the things that have values in an UiForm dialog *****/
156
157 Thing_implementcxx . . $ `sys/Thing.h:65:9`! (UiField, Thing, 0);
158
159 static autoUiFieldcxx . . $ autoUiField# UiField_createcxx . . $ UiField_create(4fc15b67205ba7c0). (_kUiField_typecxx . . $ _kUiField_type# type, conststring32cxx . . $ conststring32# labelTextOrNull) {
160 autoUiFieldcxx . . $ autoUiField# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (UiField);
161 mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. = type;
162 if (labelTextOrNull) {
163 /*
164 The label text is for instance "Pitch ceiling (Hz)".
165 */
166 mycxx . . $ `melder/melder.h:44:9`! labelTextcxx . . $ structUiField#labelText. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (labelTextOrNull);
167
168 /*
169 The name is for instance "Pitch ceiling".
170 */
171 char32cxx . . $ char32# shortName [1+100], *p;
172 str32ncpycxx . . $ str32ncpy(a0fb29e7f5bbd1dc). (shortName, labelTextOrNull, 100);
173 shortName [100] = U'\0';
174 /*
175 Strip parentheses and the occasional colon off the parameter name.
176 */
177 if (!! (p = (char32cxx . . $ char32# *) str32chrcxx . . $ str32chr(328a9ede0fba853a). (shortName, U'('))) {
178 *p = U'\0';
179 if (p - shortName > 0 && p [-1] == U' ')
180 p [-1] = U'\0';
181 }
182 p = shortName;
183 if (*p != U'\0' && p [Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (p) - 1] == U':')
184 p [Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (p) - 1] = U'\0'; // unlikely
185 Thing_setNamecxx . . $ Thing_setName(b5a42e5e01c267b5). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), shortName);
186 }
187 return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).;
188 }
189
190 /***** class UiOption: radio buttons and menu options *****/
191
192 Thing_implementcxx . . $ `sys/Thing.h:65:9`! (UiOption, Thing, 0);
193
194 static autoUiOptioncxx . . $ autoUiOption# UiOption_createcxx . . $ UiOption_create(377f69b3c34b6a8b). (conststring32cxx . . $ conststring32# optionText) {
195 autoUiOptioncxx . . $ autoUiOption# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (UiOption);
196 Thing_setNamecxx . . $ Thing_setName(b5a42e5e01c267b5). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), optionText);
197 return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).;
198 }
199
200 UiOptioncxx . . $ UiOption# UiForm_addOptioncxx . . $ UiForm_addOption(fb534d753ea2b6de). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# optionText) {
201 if (! me)
202 return nullptr;
203 UiFieldcxx . . $ UiField# you = mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu.;
204 if (! you)
205 return nullptr;
206 Melder_assertcxx . . $ `melder/melder_assert.h:39:10`! (yourcxx . . $ `melder/melder.h:46:9`! type == _kUiField_type::CHOICE_ || yourcxx . . $ `melder/melder.h:46:9`! type == _kUiField_type::OPTIONMENU_);
207 autoUiOptioncxx . . $ autoUiOption# option = UiOption_createcxx . . $ UiOption_create(377f69b3c34b6a8b). (optionText);
208 return yourcxx . . $ `melder/melder.h:46:9`! optionscxx . . $ structUiField#options.. addItem_movecxx . . $ CollectionOf#addItem_move(bcc0cff787be24fe). (optioncxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f)..movecxx . . $ autoSomeThing#move(25acc3554b7d1642).());
209 }
210
211 /***** Things to do with UiField objects. *****/
212
213 static void UiField_setDefaultcxx . . $ UiField_setDefault(be6b1002ca2abf35). (UiFieldcxx . . $ UiField# me) {
214 switch (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.) {
215 case _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_.:
216 case _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_.:
217 case _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_.:
218 {
219 // do nothing
220 }
221 break;
222 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
223 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
224 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
225 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
226 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
227 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
228 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
229 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
230 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
231 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
232 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
233 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
234 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
235 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
236 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
237 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
238 {
239 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., mycxx . . $ `melder/melder.h:44:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
240 }
241 break;
242 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
243 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
244 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
245 {
246 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu., (int) mycxx . . $ `melder/melder.h:44:9`! realVectorDefaultFormatcxx . . $ structUiField#realVectorDefaultFormat.);
247 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., mycxx . . $ `melder/melder.h:44:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
248 }
249 break;
250 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
251 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
252 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
253 {
254 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu., (int) mycxx . . $ `melder/melder.h:44:9`! integerVectorDefaultFormatcxx . . $ structUiField#integerVectorDefaultFormat.);
255 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., mycxx . . $ `melder/melder.h:44:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
256 }
257 break;
258 case _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_.:
259 {
260 theRealMatrixFormatcxx . . $ theRealMatrixFormat. = (kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
261 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., formatNumericMatrixcxx . . $ formatNumericMatrix(d7fd7450609ee870). (mycxx . . $ `melder/melder.h:44:9`! numericMatrixDefaultValuecxx . . $ structUiField#numericMatrixDefaultValue..getcxx . . $ automatrix#get(b2b81450b5bdda66).(), theRealMatrixFormatcxx . . $ theRealMatrixFormat.));
262 }
263 break;
264 case _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
265 {
266 theStringArrayFormatcxx . . $ theStringArrayFormat. = (kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
267 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., formatStringArraycxx . . $ formatStringArray(aa2959be07713b05). (mycxx . . $ `melder/melder.h:44:9`! stringArrayDefaultValuecxx . . $ structUiField#stringArrayDefaultValue..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).(), theStringArrayFormatcxx . . $ theStringArrayFormat.));
268 }
269 break;
270 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
271 {
272 GuiCheckButton_setValuecxx . . $ GuiCheckButton_setValue(7c4273eb49c3ef26). (mycxx . . $ `melder/melder.h:44:9`! checkButtoncxx . . $ structUiField#checkButton., mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.);
273 }
274 break;
275 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
276 {
277 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
278 if (i == mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.) {
279 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
280 GuiRadioButton_setcxx . . $ GuiRadioButton_set(669e3d212ae3e4fb). (b -> radioButtoncxx . . $ structUiOption#radioButton.);
281 }
282 }
283 }
284 break;
285 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
286 {
287 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu., mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.);
288 }
289 break;
290 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
291 {
292 if (mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. > 0)
293 GuiList_selectItemcxx . . $ GuiList_selectItem(f9b5f8b1da8fd2dd). (mycxx . . $ `melder/melder.h:44:9`! listcxx . . $ structUiField#list., mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.);
294 }
295 }
296 }
297
298 static void UiField_widgetToValuecxx . . $ UiField_widgetToValue(be6b1002ca2abf35). (UiFieldcxx . . $ UiField# me) {
299 switch (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.)
300 {
301 case _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_.:
302 case _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_.:
303 case _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_.:
304 {
305 // do nothing
306 }
307 break;
308 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
309 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
310 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
311 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
312 {
313 autostring32cxx . . $ autostring32# text = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.); // the text as typed by the user
314 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (nullptr, text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.);
315 if (isundefcxx . . $ isundef(f8197d536af80c96). (mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.) && mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. != _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.)
316 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” has the value “undefined”.");
317 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. < 0.0)
318 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be greater than or equal to 0.0.");
319 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. <= 0.0)
320 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be greater than 0.0.");
321 if (mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable.)
322 *mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable. = mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.;
323 }
324 break;
325 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
326 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
327 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
328 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
329 {
330 autostring32cxx . . $ autostring32# text = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
331 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. && (str32equcxx . . $ `melder/melder_str32.h:122:9`! (text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"Left") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"Mono"))) {
332 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 1;
333 } else if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. && (str32equcxx . . $ `melder/melder_str32.h:122:9`! (text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"Right") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"Stereo"))) {
334 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 2;
335 } else {
336 double realValue;
337 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (nullptr, text.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & realValue);
338 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (realValue);
339 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerValue == realValue,
340 U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a whole number.");
341 }
342 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.) {
343 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerValue >= 0,
344 U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a nonnegative whole number.");
345 }
346 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.) {
347 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerValue >= 1,
348 U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a positive whole number.");
349 }
350 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.) {
351 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerValue >= 0,
352 U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a positive whole number or zero.");
353 }
354 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
355 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
356 }
357 break;
358 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
359 {
360 mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
361 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (*Melder_findEndOfInk (mycxx . . $ `melder/melder.h:44:9`! stringValue.get()) == U'\0',
362 U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a single ink-word and cannot contain a space.");
363 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
364 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
365 }
366 break;
367 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
368 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
369 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
370 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
371 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
372 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
373 {
374 mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
375 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
376 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
377 }
378 break;
379 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
380 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
381 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
382 {
383 autostring32cxx . . $ autostring32# stringValue = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
384 kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# format = (kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
385 switch (format) {
386 case kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#::WHITESPACE_SEPARATED_cxx . . $ kUi_realVectorFormat#WHITESPACE_SEPARATED_.: {
387 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespace_VECcxx . . $ splitByWhitespace_VEC(be643ff064625b8d). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
388 } break; case kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#::FORMULA_cxx . . $ kUi_realVectorFormat#FORMULA_.: {
389 VECcxx . . $ VEC# resultcxx . . $ vector#vector(49f6e7a06ebc5aa8).;
390 bool ownedByInterpreter;
391 Interpreter_numericVectorExpressioncxx . . $ Interpreter_numericVectorExpression(e47164ae4c0553fe). (nullptr, stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & result, & ownedByInterpreter);
392 if (ownedByInterpreter) {
393 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue.. adoptFromAmbiguousOwnercxx . . $ autovector#adoptFromAmbiguousOwner(bc17ed9a4b778f50). (result);
394 } else {
395 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). copy_VECcxx . . $ copy_VEC(d4415e68b25283a8). (resultcxx . . $ constvectorview#constvectorview(eac9d6ec4c4bfecd).);
396 }
397 } break; case kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#::UNDEFINEDcxx . . $ kUi_realVectorFormat#UNDEFINED.: {
398 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown real vector format.");
399 }
400 }
401 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.)
402 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
403 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0.0)
404 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than or equal to 0.0.");
405 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.)
406 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
407 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0.0)
408 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than 0.0.");
409 if (mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable.)
410 *mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. =cxx . . $ constvector#`operator=`(73c689d4201df564). mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
411 }
412 break;
413 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
414 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
415 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
416 {
417 autostring32cxx . . $ autostring32# stringValue = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
418 kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# format = (kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
419 switch (format) {
420 case kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::WHITESPACE_SEPARATED_cxx . . $ kUi_integerVectorFormat#WHITESPACE_SEPARATED_.: {
421 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). iround_INTVECcxx . . $ iround_INTVEC(8e12c8178b2404dc). (splitByWhitespace_VECcxx . . $ constvector#constvector(eac9d6ec4c4bfecd). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).()).getcxx . . $ autovector#get(e8d1da7fe68a6585).());
422 } break; case kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::RANGES_cxx . . $ kUi_integerVectorFormat#RANGES_.: {
423 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespaceWithRanges_INTVECcxx . . $ splitByWhitespaceWithRanges_INTVEC(40f9f82be0ce91de). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
424 } break; case kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::FORMULA_cxx . . $ kUi_integerVectorFormat#FORMULA_.: {
425 VECcxx . . $ VEC# resultcxx . . $ vector#vector(49f6e7a06ebc5aa8).;
426 bool ownedByInterpreter;
427 Interpreter_numericVectorExpressioncxx . . $ Interpreter_numericVectorExpression(e47164ae4c0553fe). (nullptr, stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & result, & ownedByInterpreter);
428 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). raw_INTVECcxx . . $ raw_INTVEC(dab5d3ef28d6a25). (result.sizecxx . . $ vector#size.);
429 for (integercxx . . $ integer# i = 1; i <= result.sizecxx . . $ vector#size.; i ++) {
430 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] = Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (result [cxx . . $ vector#`operator[]`(8a4599b8835d1ce1).i]);
431 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i] == result [i],
432 U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", result [i], U" but should be a whole number.");
433 }
434 } break; case kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::UNDEFINEDcxx . . $ kUi_integerVectorFormat#UNDEFINED.: {
435 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown integer vector format.");
436 }
437 }
438 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.)
439 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
440 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0)
441 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than or equal to 0.");
442 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.)
443 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
444 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0)
445 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than 0.");
446 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable.)
447 *mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. =cxx . . $ constvector#`operator=`(9741bbfc20e560ef). mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
448 }
449 break;
450 case _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_.:
451 {
452 autostring32cxx . . $ autostring32# stringValue = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
453 kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat# format = (kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
454 switch (format) {
455 case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::ONE_ROW_PER_LINE_cxx . . $ kUi_realMatrixFormat#ONE_ROW_PER_LINE_.: {
456 mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue. =cxx . . $ automatrix#`operator=`(a0f46581f260c488). splitByLinesAndWhitespace_MATcxx . . $ splitByLinesAndWhitespace_MAT(2b142147f85942aa). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
457 } break; case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::FORMULA_cxx . . $ kUi_realMatrixFormat#FORMULA_.: {
458 MATcxx . . $ MAT# resultcxx . . $ matrix#matrix(49f6e7a06ebc5aa8).;
459 bool ownedByInterpreter;
460 Interpreter_numericMatrixExpressioncxx . . $ Interpreter_numericMatrixExpression(dd630cc19a2beb06). (nullptr, stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & result, & ownedByInterpreter);
461 if (ownedByInterpreter) {
462 mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue.. adoptFromAmbiguousOwnercxx . . $ automatrix#adoptFromAmbiguousOwner(eed9513d24570b3d). (result);
463 } else {
464 mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue. =cxx . . $ automatrix#`operator=`(a0f46581f260c488). copy_MATcxx . . $ copy_MAT(a392b09ce3fc3972). (resultcxx . . $ constmatrixview#constmatrixview(eed9513d24570b3d).);
465 }
466 } break; case kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::UNDEFINEDcxx . . $ kUi_realMatrixFormat#UNDEFINED.: {
467 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown matrix format.");
468 }
469 }
470 if (mycxx . . $ `melder/melder.h:44:9`! numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable.)
471 *mycxx . . $ `melder/melder.h:44:9`! numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable. =cxx . . $ constmatrix#`operator=`(10afdece15caa8a1). mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue..getcxx . . $ automatrix#get(b2b81450b5bdda66).();
472 }
473 break;
474 case _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
475 {
476 autostring32cxx . . $ autostring32# stringValue = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
477 theStringArrayFormatcxx . . $ theStringArrayFormat. = (kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#) GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
478 switch (theStringArrayFormatcxx . . $ theStringArrayFormat.) {
479 case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::WHITESPACE_SEPARATED_cxx . . $ kUi_stringArrayFormat#WHITESPACE_SEPARATED_.: {
480 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitByWhitespace_STRVECcxx . . $ splitByWhitespace_STRVEC(d3c03a92d990d008). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
481 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::COMMA_SEPARATED_cxx . . $ kUi_stringArrayFormat#COMMA_SEPARATED_.: {
482 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitBy_STRVECcxx . . $ splitBy_STRVEC(7166cd7864177c8). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U",");
483 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::SEMICOLON_SEPARATED_cxx . . $ kUi_stringArrayFormat#SEMICOLON_SEPARATED_.: {
484 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitBy_STRVECcxx . . $ splitBy_STRVEC(7166cd7864177c8). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U";");
485 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::PIPE_SEPARATED_cxx . . $ kUi_stringArrayFormat#PIPE_SEPARATED_.: {
486 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitBy_STRVECcxx . . $ splitBy_STRVEC(7166cd7864177c8). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"|");
487 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::ONE_PER_LINE_cxx . . $ kUi_stringArrayFormat#ONE_PER_LINE_.: {
488 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitBy_STRVECcxx . . $ splitBy_STRVEC(7166cd7864177c8). (stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"\n");
489 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::FORMULA_cxx . . $ kUi_stringArrayFormat#FORMULA_.: {
490 if (stringValue [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0] == U'\0') {
491 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). autoSTRVECcxx . . $ _autostringautovector#_autostringautovector(49f6e7a06ebc5aa8).(); // interpret the empty string as zero elements, as for all other formats
492 } else {
493 STRVECcxx . . $ STRVEC# resultcxx . . $ _stringvector#_stringvector(49f6e7a06ebc5aa8).;
494 bool ownedByInterpreter;
495 Interpreter_stringArrayExpressioncxx . . $ Interpreter_stringArrayExpression(4cd1c45f7f524604). (nullptr, stringValue.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & result, & ownedByInterpreter);
496 if (ownedByInterpreter) {
497 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue.. adoptFromAmbiguousOwnercxx . . $ _autostringautovector#adoptFromAmbiguousOwner(889d620ca03d505c). (result);
498 } else {
499 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). copy_STRVECcxx . . $ copy_STRVEC(cfa8029879abedac). (resultcxx . . $ _conststringvector#_conststringvector(93d9e701af42cb0d).);
500 }
501 }
502 } break; case kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::UNDEFINEDcxx . . $ kUi_stringArrayFormat#UNDEFINED.: {
503 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Unknown string array format.");
504 }
505 }
506 if (mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable.)
507 *mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable. =cxx . . $ _conststringvector#`operator=`(42d0cafead7a246e). mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).();
508 }
509 break;
510 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
511 {
512 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = GuiCheckButton_getValuecxx . . $ GuiCheckButton_getValue(a8338fe19a656ed0). (mycxx . . $ `melder/melder.h:44:9`! checkButtoncxx . . $ structUiField#checkButton.);
513 if (mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable.)
514 *mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
515 }
516 break;
517 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
518 {
519 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
520 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
521 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
522 if (GuiRadioButton_getValuecxx . . $ GuiRadioButton_getValue(529b6fd83844103f). (b -> radioButtoncxx . . $ structUiOption#radioButton.))
523 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
524 }
525 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0)
526 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"No option chosen for “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
527 if (mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable.)
528 *mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable. = int (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.) - mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.;
529 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
530 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
531 }
532 break;
533 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
534 {
535 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (mycxx . . $ `melder/melder.h:44:9`! optionMenucxx . . $ structUiField#optionMenu.);
536 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0)
537 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"No option chosen for “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
538 if (mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable.)
539 *mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable. = int (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.) - mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.;
540 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
541 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
542 }
543 break;
544 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
545 {
546 autoINTVECcxx . . $ autoINTVEC# selected = GuiList_getSelectedPositionscxx . . $ GuiList_getSelectedPositions(21bc371a31941fa7). (mycxx . . $ `melder/melder.h:44:9`! listcxx . . $ structUiField#list.);
547 if (selected.sizecxx . . $ autovector#size. == 0) {
548 Melder_warningcxx . . $ Melder_warning(6298c93241566110). (U"No items selected.");
549 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 1;
550 } else {
551 if (selected.sizecxx . . $ autovector#size. > 1)
552 Melder_warningcxx . . $ Melder_warning(6298c93241566110). (U"More than one item selected.");
553 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = selected [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).1];
554 }
555 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. >= 1 && mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. <= mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.)
556 mycxx . . $ `melder/melder.h:44:9`! previouslySelectedListStringcxx . . $ structUiField#previouslySelectedListString. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.]);
557 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
558 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
559 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
560 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = (char32cxx . . $ char32# *) mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.];
561 }
562 break;
563 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
564 {
565 autostring32cxx . . $ autostring32# string = GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text.);
566 MelderColourcxx . . $ MelderColour# colour = MelderColour_fromColourNameOrRGBStringcxx . . $ MelderColour_fromColourNameOrRGBString(ddf3ca81f5326095). (string.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
567 if (colour.validcxx . . $ MelderColour#valid(50ce9a9e25b4a850).()) {
568 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). colour;
569 } else {
570 double greyValue;
571 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (nullptr, string.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & greyValue);
572 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColourcxx . . $ MelderColour# (greyValue);
573 }
574 if (mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable.)
575 *mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.;
576 }
577 }
578 }
579
580 /***** History mechanism. *****/
581
582 static MelderStringcxx . . $ MelderString# theHistorycxx . . $ theHistory.;
583 void UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string) {
584 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& theHistorycxx . . $ theHistory., string);
585 }
586 void UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string) {
587 if (! string)
588 return;
589 for (const char32cxx . . $ char32# *p = & string [0]; *p != U'\0'; p ++) {
590 if (*p == U'"')
591 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& theHistorycxx . . $ theHistory., U"\"\"");
592 else
593 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& theHistorycxx . . $ theHistory., *p);
594 }
595 }
596 void UiHistory_write_colonizecxx . . $ UiHistory_write_colonize(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string) {
597 if (! string)
598 return;
599 for (const char32cxx . . $ char32# *p = & string [0]; *p != U'\0'; p ++) {
600 if (*p == U'.' && p [1] == U'.' && p [2] == U'.') {
601 MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& theHistorycxx . . $ theHistory., U":");
602 p += 2;
603 } else {
604 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& theHistorycxx . . $ theHistory., *p);
605 }
606 }
607 }
608 char32cxx . . $ char32# *UiHistory_getcxx . . $ UiHistory_get(7f2d784185c6d30e). () {
609 return theHistorycxx . . $ theHistory..stringcxx . . $ MelderString#string.;
610 }
611 void UiHistory_clearcxx . . $ UiHistory_clear(49f6e7a06ebc5aa8). () {
612 MelderString_emptycxx . . $ MelderString_empty(93db1090f27e5462). (& theHistorycxx . . $ theHistory.);
613 }
614
615 /***** class UiForm: dialog windows *****/
616
617 Thing_implementcxx . . $ `sys/Thing.h:65:9`! (UiForm, Thing, 0);
618
619 bool (*theAllowExecutionHookHintcxx . . $ theAllowExecutionHookHint.) (void *closure) = nullptr;
620 void *theAllowExecutionClosureHintcxx . . $ theAllowExecutionClosureHint. = nullptr;
621
622 void Ui_setAllowExecutionHookcxx . . $ Ui_setAllowExecutionHook(1e9af8188bc9e75f). (bool (*allowExecutionHook) (void *closure), void *allowExecutionClosure) {
623 theAllowExecutionHookHintcxx . . $ theAllowExecutionHookHint. = allowExecutionHook;
624 theAllowExecutionClosureHintcxx . . $ theAllowExecutionClosureHint. = allowExecutionClosure;
625 }
626
627 void structUiFormcxx . . $ structUiForm# :: v9_destroycxx . . $ structUiForm#v9_destroy(ced63f7c635d850d). () noexcept {
628 if (ourcxx . . $ `melder/melder.h:42:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.) {
629 tracecxx . . $ `melder/melder_debug.h:60:10`! (U"form <<", ourcxx . . $ `melder/melder.h:42:9`! d_dialogForm -> name.get(), U">>, invoking-button title <<", ourcxx . . $ `melder/melder.h:42:9`! invokingButtonTitle.get(), U">>");
630 GuiObject_destroycxx . . $ GuiObject_destroy(5d22bdacc48458e8). (ourcxx . . $ `melder/melder.h:42:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm. -> d_widgetcxx . . $ structGuiThing#d_widget.); // BUG: make sure this destroys the shell
631 }
632 ourcxx . . $ `melder/melder.h:42:9`! UiForm_Parentcxx . . $ UiForm_Parent# :: v9_destroycxx . . $ structThing#v9_destroy(ced63f7c635d850d). ();
633 }
634
635 static void gui_button_cb_revertcxx . . $ gui_button_cb_revert(1fa82188b4c2b55d). (UiFormcxx . . $ UiForm# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
636 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++)
637 UiField_setDefaultcxx . . $ UiField_setDefault(be6b1002ca2abf35). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
638 }
639
640 static void gui_dialog_cb_closecxx . . $ gui_dialog_cb_close(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me) {
641 if (mycxx . . $ `melder/melder.h:44:9`! cancelCallbackcxx . . $ structUiForm#cancelCallback.)
642 mycxx . . $ `melder/melder.h:44:9`! cancelCallbackcxx . . $ structUiForm#cancelCallback. (me, mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure.);
643 GuiThing_hidecxx . . $ GuiThing_hide(20e88c25f0ba841). (mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.);
644 if (mycxx . . $ `melder/melder.h:44:9`! destroyWhenUnmanagedcxx . . $ structUiForm#destroyWhenUnmanaged.)
645 forgetcxx . . $ `sys/Thing.h:158:9`! (me);
646 }
647 static void gui_button_cb_cancelcxx . . $ gui_button_cb_cancel(1fa82188b4c2b55d). (UiFormcxx . . $ UiForm# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
648 if (mycxx . . $ `melder/melder.h:44:9`! cancelCallbackcxx . . $ structUiForm#cancelCallback.)
649 mycxx . . $ `melder/melder.h:44:9`! cancelCallbackcxx . . $ structUiForm#cancelCallback. (me, mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure.);
650 GuiThing_hidecxx . . $ GuiThing_hide(20e88c25f0ba841). (mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.);
651 if (mycxx . . $ `melder/melder.h:44:9`! destroyWhenUnmanagedcxx . . $ structUiForm#destroyWhenUnmanaged.)
652 forgetcxx . . $ `sys/Thing.h:158:9`! (me);
653 }
654
655 static void UiForm_okOrApplycxx . . $ UiForm_okOrApply(fa387e867edbcfd5). (UiFormcxx . . $ UiForm# me, GuiButtoncxx . . $ GuiButton# button, int hide) {
656 if (mycxx . . $ `melder/melder.h:44:9`! allowExecutionHookcxx . . $ structUiForm#allowExecutionHook. && ! mycxx . . $ `melder/melder.h:44:9`! allowExecutionHookcxx . . $ structUiForm#allowExecutionHook. (mycxx . . $ `melder/melder.h:44:9`! allowExecutionClosurecxx . . $ structUiForm#allowExecutionClosure.)) {
657 Melder_flushErrorcxx . . $ Melder_flushError(6298c93241566110). (U"Cannot execute command window “", mycxx . . $ `melder/melder.h:44:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"”.");
658 return;
659 }
660 try {
661 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++)
662 UiField_widgetToValuecxx . . $ UiField_widgetToValue(be6b1002ca2abf35). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
663 } catch (MelderErrorcxx . . $ MelderError#) {
664 Melder_flushErrorcxx . . $ Melder_flushError(6298c93241566110). (U"Please correct command window “", mycxx . . $ `melder/melder.h:44:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"” or cancel.");
665 return;
666 }
667 if (mycxx . . $ `melder/melder.h:44:9`! okButtoncxx . . $ structUiForm#okButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! okButtoncxx . . $ structUiForm#okButton., false);
668 if (mycxx . . $ `melder/melder.h:44:9`! applyButtoncxx . . $ structUiForm#applyButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! applyButtoncxx . . $ structUiForm#applyButton., false);
669 if (mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton., false);
670 if (mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton., false);
671 if (mycxx . . $ `melder/melder.h:44:9`! helpButtoncxx . . $ structUiForm#helpButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! helpButtoncxx . . $ structUiForm#helpButton., false);
672 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons.; i ++)
673 if (mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i])
674 GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i], false);
675
676 #if defined (_WIN32)
677 GdiFlush ();
678 #endif
679 if (mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm.) {
680 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons.; i ++)
681 if (button == mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i])
682 mycxx . . $ `melder/melder.h:44:9`! clickedContinueButtoncxx . . $ structUiForm#clickedContinueButton. = i;
683 }
684 /*
685 Keep the gate for error handling.
686 */
687 try {
688 mycxx . . $ `melder/melder.h:44:9`! okCallbackcxx . . $ structUiForm#okCallback. (me, 0, nullptr, nullptr, nullptr, nullptr, false, mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure., mycxx . . $ `melder/melder.h:44:9`! optionalEditorcxx . . $ structUiForm#optionalEditor.);
689 /*
690 Write everything to history. Before destruction!
691 */
692 if (! mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm.) {
693 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\n");
694 UiHistory_write_colonizecxx . . $ UiHistory_write_colonize(ff00d524ab0355ec). (mycxx . . $ `melder/melder.h:44:9`! invokingButtonTitlecxx . . $ structUiForm#invokingButtonTitle..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
695 int size = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.;
696 while (size >= 1 && _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [size] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.))
697 size --; // ignore trailing fields without a value
698 int next = 0;
699 for (int ifield = 1; ifield <= size; ifield ++) {
700 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
701 switch (field -> typecxx . . $ structUiField#type.)
702 {
703 case _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_.:
704 case _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_.:
705 case _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_.:
706 {
707 // do nothing
708 }
709 break;
710 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
711 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
712 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
713 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
714 {
715 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", " : U" ");
716 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (field -> realValuecxx . . $ structUiField#realValue.));
717 }
718 break;
719 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
720 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
721 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
722 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
723 {
724 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", " : U" ");
725 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_integercxx . . $ Melder_integer(7b348ebc2004441d). (field -> integerValuecxx . . $ structUiField#integerValue.));
726 }
727 break;
728 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
729 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
730 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
731 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
732 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
733 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
734 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
735 {
736 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", \"" : U" \"");
737 UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (field -> stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
738 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
739 }
740 break;
741 case _kUiField_typecxx . . $ _kUiField_type#:: REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
742 case _kUiField_typecxx . . $ _kUiField_type#:: NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
743 case _kUiField_typecxx . . $ _kUiField_type#:: POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
744 {
745 if (NUMisEmptycxx . . $ NUMisEmpty(3c471b8d64252e9b). (field -> realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).())) {
746 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", zero# (0)" : U" zero# (0)");
747 } else {
748 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", { " : U" { ");
749 for (integercxx . . $ integer# i = 1; i <= field -> realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++) {
750 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (field -> realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i]));
751 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (i == field -> realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size. ? U" }" : U", ");
752 }
753 }
754 } break;
755 case _kUiField_typecxx . . $ _kUiField_type#:: INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
756 case _kUiField_typecxx . . $ _kUiField_type#:: NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
757 case _kUiField_typecxx . . $ _kUiField_type#:: NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
758 {
759 if (NUMisEmptycxx . . $ NUMisEmpty(3c471b8d64252e9b). (field -> integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).())) {
760 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", zero# (0)" : U" zero# (0)");
761 } else {
762 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", { " : U" { ");
763 for (integercxx . . $ integer# i = 1; i <= field -> integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++) {
764 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_integercxx . . $ Melder_integer(7b348ebc2004441d). (field -> integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i]));
765 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (i == field -> integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size. ? U" }" : U", ");
766 }
767 }
768 } break;
769 case _kUiField_typecxx . . $ _kUiField_type#:: REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_.:
770 {
771 if (NUMisEmptycxx . . $ NUMisEmpty(43b61114f729c675). (field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue..getcxx . . $ automatrix#get(b2b81450b5bdda66).())) {
772 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", zero## (0, 0)" : U" zero## (0, 0)");
773 } else {
774 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", { " : U" { ");
775 for (integercxx . . $ integer# irow = 1; irow <= field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue..nrowcxx . . $ automatrix#nrow.; irow ++) {
776 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"{ ");
777 for (integercxx . . $ integer# icol = 1; icol <= field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue..ncolcxx . . $ automatrix#ncol.; icol ++) {
778 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue. [cxx . . $ automatrix#`operator[]`(2d545b3cb3f8e666).irow] [cxx . . $ vector#`operator[]`(8a4599b8835d1ce1).icol]));
779 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (icol == field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue..ncolcxx . . $ automatrix#ncol. ? U" }" : U", ");
780 }
781 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (irow == field -> numericMatrixValuecxx . . $ structUiField#numericMatrixValue..nrowcxx . . $ automatrix#nrow. ? U" }" : U", ");
782 }
783 }
784 } break;
785 case _kUiField_typecxx . . $ _kUiField_type#:: STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
786 {
787 if (NUMisEmptycxx . . $ NUMisEmpty(72eec41a35d7e37c). (fieldcxx . . $ _conststringvector#_conststringvector(93d9e701af42cb0d). -> stringArrayValuecxx . . $ structUiField#stringArrayValue..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).())) {
788 UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (next -- ? U", empty$# (0)" : U" empty$# (0)");
789 } else {
790 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", { " : U" { ");
791 for (integercxx . . $ integer# i = 1; i <= field -> stringArrayValuecxx . . $ structUiField#stringArrayValue..sizecxx . . $ _autostringautovector#size.; i ++) {
792 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
793 UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (field -> stringArrayValuecxx . . $ structUiField#stringArrayValue. [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).i].getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
794 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
795 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (i == field -> stringArrayValuecxx . . $ structUiField#stringArrayValue..sizecxx . . $ _autostringautovector#size. ? U" }" : U", ");
796 }
797 }
798 } break;
799 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
800 {
801 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (field -> integerValuecxx . . $ structUiField#integerValue. ? (next -- ? U", \"yes\"" : U" \"yes\"") : (next -- ? U", \"no\"" : U" \"no\""));
802 }
803 break;
804 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
805 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
806 {
807 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).field -> integerValuecxx . . $ structUiField#integerValue.];
808 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", \"" : U" \"");
809 UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
810 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
811 }
812 break;
813 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
814 {
815 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", \"" : U" \"");
816 UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (field -> stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).field -> integerValuecxx . . $ structUiField#integerValue.]);
817 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
818 }
819 break;
820 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
821 {
822 conststring32cxx . . $ conststring32# colourString = MelderColour_namePrettyOrNullcxx . . $ MelderColour_namePrettyOrNull(7dfff7c3df3cd0ae). (field -> colourValuecxx . . $ structUiField#colourValue.);
823 if (colourString) {
824 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", \"" : U" \"");
825 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (colourString);
826 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (U"\"");
827 } else if (field -> colourValuecxx . . $ structUiField#colourValue.. isGreycxx . . $ MelderColour#isGrey(50ce9a9e25b4a850).()) {
828 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", " : U" ");
829 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (field -> colourValuecxx . . $ structUiField#colourValue.. redcxx . . $ MelderColour#red.));
830 } else {
831 colourString = MelderColour_nameRGBcxx . . $ MelderColour_nameRGB(7dfff7c3df3cd0ae). (field -> colourValuecxx . . $ structUiField#colourValue.);
832 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (next -- ? U", " : U" ");
833 UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (colourString);
834 }
835 }
836 }
837 }
838 }
839 if (hide) {
840 GuiThing_hidecxx . . $ GuiThing_hide(20e88c25f0ba841). (mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.);
841 if (mycxx . . $ `melder/melder.h:44:9`! destroyWhenUnmanagedcxx . . $ structUiForm#destroyWhenUnmanaged.) {
842 forgetcxx . . $ `sys/Thing.h:158:9`! (me);
843 return;
844 }
845 }
846 } catch (MelderErrorcxx . . $ MelderError#) {
847 /*
848 If a solution has already been suggested, or the "error" was actually a conscious user action, do not add anything more.
849 */
850 if (! str32strcxx . . $ str32str(2de17cd8f7c584a6). (Melder_getErrorcxx . . $ Melder_getError(1912f6684645c851). (), U"Please ") && ! str32strcxx . . $ str32str(2de17cd8f7c584a6). (Melder_getErrorcxx . . $ Melder_getError(1912f6684645c851). (), U"You could ") &&
851 ! str32strcxx . . $ str32str(2de17cd8f7c584a6). (Melder_getErrorcxx . . $ Melder_getError(1912f6684645c851). (), U"You interrupted ") && ! str32strcxx . . $ str32str(2de17cd8f7c584a6). (Melder_getErrorcxx . . $ Melder_getError(1912f6684645c851). (), U"Interrupted!"))
852 {
853 /*
854 Otherwise, show a generic message.
855 */
856 if (str32strcxx . . $ str32str(2de17cd8f7c584a6). (Melder_getErrorcxx . . $ Melder_getError(1912f6684645c851). (), U"Selection changed!")) {
857 Melder_appendErrorcxx . . $ Melder_appendError(6298c93241566110). (U"Please change the selection in the object list, or click Cancel in the command window “",
858 mycxx . . $ `melder/melder.h:44:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"”.");
859 } else {
860 Melder_appendErrorcxx . . $ Melder_appendError(6298c93241566110). (U"Please change something in the command window “",
861 mycxx . . $ `melder/melder.h:44:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"”, or click Cancel in that window.");
862 }
863 }
864 Melder_flushErrorcxx . . $ Melder_flushError(49f6e7a06ebc5aa8). ();
865 }
866 if (mycxx . . $ `melder/melder.h:44:9`! okButtoncxx . . $ structUiForm#okButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! okButtoncxx . . $ structUiForm#okButton., true);
867 if (mycxx . . $ `melder/melder.h:44:9`! applyButtoncxx . . $ structUiForm#applyButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! applyButtoncxx . . $ structUiForm#applyButton., true);
868 if (mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton., true);
869 if (mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton., true);
870 if (mycxx . . $ `melder/melder.h:44:9`! helpButtoncxx . . $ structUiForm#helpButton.) GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! helpButtoncxx . . $ structUiForm#helpButton., true);
871 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons.; i ++)
872 if (mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i])
873 GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i], true);
874 }
875
876 static void gui_button_cb_okcxx . . $ gui_button_cb_ok(1fa82188b4c2b55d). (UiFormcxx . . $ UiForm# me, GuiButtonEventcxx . . $ GuiButtonEvent# event) {
877 UiForm_okOrApplycxx . . $ UiForm_okOrApply(fa387e867edbcfd5). (me, event -> buttoncxx . . $ structGuiButtonEvent#button., true);
878 }
879
880 static void gui_dialog_cb_defaultcxx . . $ gui_dialog_cb_default(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me) {
881 UiForm_okOrApplycxx . . $ UiForm_okOrApply(fa387e867edbcfd5). (me,
882 mycxx . . $ `melder/melder.h:44:9`! defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton. >= 1 && mycxx . . $ `melder/melder.h:44:9`! defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton. <= mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons. ? mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [mycxx . . $ `melder/melder.h:44:9`! defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton.] : nullptr,
883 true
884 );
885 }
886
887 static void gui_button_cb_applycxx . . $ gui_button_cb_apply(1fa82188b4c2b55d). (UiFormcxx . . $ UiForm# me, GuiButtonEventcxx . . $ GuiButtonEvent# event) {
888 UiForm_okOrApplycxx . . $ UiForm_okOrApply(fa387e867edbcfd5). (me, event -> buttoncxx . . $ structGuiButtonEvent#button., false);
889 }
890
891 static void gui_button_cb_helpcxx . . $ gui_button_cb_help(1fa82188b4c2b55d). (UiFormcxx . . $ UiForm# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
892 Melder_helpcxx . . $ Melder_help(ff00d524ab0355ec). (mycxx . . $ `melder/melder.h:44:9`! helpTitlecxx . . $ structUiForm#helpTitle..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
893 }
894
895 static void gui_button_cb_browseInfilecxx . . $ gui_button_cb_browseInfile(b5248afa955024ce). (UiFieldcxx . . $ UiField# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
896 autoStringSetcxx . . $ autoStringSet# chosenFilePath = GuiFileSelect_getInfileNamescxx . . $ GuiFileSelect_getInfileNames(5a0c946482488abf). (nullptr, U"Open file", false);
897 if (chosenFilePath->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab).sizecxx . . $ CollectionOf#size. != 0)
898 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., chosenFilePath->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab).atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).1] -> stringcxx . . $ structSimpleString#string..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
899 }
900 static void gui_button_cb_browseOutfilecxx . . $ gui_button_cb_browseOutfile(b5248afa955024ce). (UiFieldcxx . . $ UiField# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
901 autostring32cxx . . $ autostring32# chosenFilePath = GuiFileSelect_getOutfileNamecxx . . $ GuiFileSelect_getOutfileName(575be6c40acafffe). (nullptr, U"Save file", U"");
902 if (chosenFilePath)
903 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., chosenFilePath.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
904 }
905 static void gui_button_cb_browseFoldercxx . . $ gui_button_cb_browseFolder(b5248afa955024ce). (UiFieldcxx . . $ UiField# me, GuiButtonEventcxx . . $ GuiButtonEvent# /* event */) {
906 autostring32cxx . . $ autostring32# chosenFolderPath = GuiFileSelect_getFolderNamecxx . . $ GuiFileSelect_getFolderName(5af1513ecf60daff). (nullptr, U"Choose folder");
907 if (chosenFolderPath)
908 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (mycxx . . $ `melder/melder.h:44:9`! textcxx . . $ structUiField#text., chosenFolderPath.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
909 }
910
911 autoUiFormcxx . . $ autoUiForm# UiForm_createcxx . . $ UiForm_create(b3c832b012a1002d). (GuiWindowcxx . . $ GuiWindow# parent, Editorcxx . . $ Editor# optionalEditor, conststring32cxx . . $ conststring32# title,
912 UiCallbackcxx . . $ UiCallback# okCallback, void *buttonClosure,
913 conststring32cxx . . $ conststring32# invokingButtonTitle, conststring32cxx . . $ conststring32# helpTitle)
914 {
915 autoUiFormcxx . . $ autoUiForm# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (UiForm);
916 mycxx . . $ `melder/melder.h:44:9`! d_dialogParentcxx . . $ structUiForm#d_dialogParent. = parent;
917 mycxx . . $ `melder/melder.h:44:9`! optionalEditorcxx . . $ structUiForm#optionalEditor. = optionalEditor;
918 Thing_setNamecxx . . $ Thing_setName(b5a42e5e01c267b5). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), title);
919 mycxx . . $ `melder/melder.h:44:9`! okCallbackcxx . . $ structUiForm#okCallback. = okCallback;
920 mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure. = buttonClosure;
921 mycxx . . $ `melder/melder.h:44:9`! invokingButtonTitlecxx . . $ structUiForm#invokingButtonTitle. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (invokingButtonTitle);
922 mycxx . . $ `melder/melder.h:44:9`! helpTitlecxx . . $ structUiForm#helpTitle. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (helpTitle);
923 return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).;
924 }
925
926 void UiForm_setPauseFormcxx . . $ UiForm_setPauseForm(d24abb1496621b13). (UiFormcxx . . $ UiForm# me,
927 int numberOfContinueButtons, int defaultContinueButton, int cancelContinueButton,
928 conststring32cxx . . $ conststring32# continue1, conststring32cxx . . $ conststring32# continue2, conststring32cxx . . $ conststring32# continue3,
929 conststring32cxx . . $ conststring32# continue4, conststring32cxx . . $ conststring32# continue5, conststring32cxx . . $ conststring32# continue6,
930 conststring32cxx . . $ conststring32# continue7, conststring32cxx . . $ conststring32# continue8, conststring32cxx . . $ conststring32# continue9,
931 conststring32cxx . . $ conststring32# continue10,
932 void (*cancelCallback) (UiFormcxx . . $ UiForm# dia, void *closure))
933 {
934 mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm. = true;
935 mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons. = numberOfContinueButtons;
936 mycxx . . $ `melder/melder.h:44:9`! defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton. = defaultContinueButton;
937 mycxx . . $ `melder/melder.h:44:9`! cancelContinueButtoncxx . . $ structUiForm#cancelContinueButton. = cancelContinueButton;
938 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [1] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue1);
939 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [2] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue2);
940 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [3] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue3);
941 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [4] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue4);
942 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [5] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue5);
943 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [6] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue6);
944 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [7] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue7);
945 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [8] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue8);
946 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [9] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue9);
947 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [10] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (continue10);
948 mycxx . . $ `melder/melder.h:44:9`! cancelCallbackcxx . . $ structUiForm#cancelCallback. = cancelCallback;
949 }
950
951 static void commonOkCallbackcxx . . $ commonOkCallback(744a0abd3c8513c). (UiFormcxx . . $ UiForm# /* dia */, integercxx . . $ integer# /* narg */, Stackelcxx . . $ Stackel# /* args */, conststring32cxx . . $ conststring32# /* sendingString */,
952 Interpretercxx . . $ Interpreter# interpreter, conststring32cxx . . $ conststring32# /* invokingButtonTitle */, bool /* modified */, void *closure, Editorcxx . . $ Editor# /* optionalEditor */)
953 {
954 EditorCommandcxx . . $ EditorCommand# cmd = (EditorCommandcxx . . $ EditorCommand#) closure;
955 cmd -> commandCallbackcxx . . $ structEditorCommand#commandCallback. (cxx . . $ MelderCallback#`operator()`(e7ade0e2880b4e44).cmd -> sendercxx . . $ structEditorCommand#sender., cmd, cmd -> d_uiformcxx . . $ structEditorCommand#d_uiform..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0, nullptr, nullptr, interpreter);
956 }
957
958 autoUiFormcxx . . $ autoUiForm# UiForm_createEcxx . . $ UiForm_createE(4a101de89d32d0cd). (EditorCommandcxx . . $ EditorCommand# cmd, conststring32cxx . . $ conststring32# title, conststring32cxx . . $ conststring32# invokingButtonTitle, conststring32cxx . . $ conststring32# helpTitle) {
959 Editorcxx . . $ Editor# editor = cmd -> d_editorcxx . . $ structEditorCommand#d_editor.;
960 autoUiFormcxx . . $ autoUiForm# dia = UiForm_createcxx . . $ UiForm_create(b3c832b012a1002d). (editor -> windowFormcxx . . $ structEditor#windowForm., editor, title, commonOkCallbackcxx . . $ commonOkCallback(744a0abd3c8513c)., cmd, invokingButtonTitle, helpTitle);
961 dia ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). commandcxx . . $ structUiForm#command. = cmd;
962 return diacxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).;
963 }
964
965 static UiFieldcxx . . $ UiField# UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (UiFormcxx . . $ UiForm# me, _kUiField_typecxx . . $ _kUiField_type# type, conststring32cxx . . $ conststring32# labelText) {
966 if (mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. == MAXIMUM_NUMBER_OF_FIELDScxx . . $ `sys/Ui.h:177:9`!)
967 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot have more than ", MAXIMUM_NUMBER_OF_FIELDScxx . . $ `sys/Ui.h:177:9`!, U"fields in a form.");
968 mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [++ mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.] =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). UiField_createcxx . . $ UiField_create(4fc15b67205ba7c0). (type, labelText);
969 return mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
970 }
971
972 UiFieldcxx . . $ UiField# UiForm_addRealcxx . . $ UiForm_addReal(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
973 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
974 {
975 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_., labelText);
976 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
977 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
978 thycxx . . $ `melder/melder.h:45:9`! realVariablecxx . . $ structUiField#realVariable. = variable;
979 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
980 return thee;
981 }
982
983 UiFieldcxx . . $ UiField# UiForm_addRealOrUndefinedcxx . . $ UiForm_addRealOrUndefined(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
984 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
985 {
986 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_., labelText);
987 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
988 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
989 thycxx . . $ `melder/melder.h:45:9`! realVariablecxx . . $ structUiField#realVariable. = variable;
990 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
991 return thee;
992 }
993
994 UiFieldcxx . . $ UiField# UiForm_addNonnegativecxx . . $ UiForm_addNonnegative(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
995 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
996 {
997 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_., labelText);
998 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
999 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1000 thycxx . . $ `melder/melder.h:45:9`! realVariablecxx . . $ structUiField#realVariable. = variable;
1001 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1002 return thee;
1003 }
1004
1005 UiFieldcxx . . $ UiField# UiForm_addPositivecxx . . $ UiForm_addPositive(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
1006 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1007 {
1008 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_., labelText);
1009 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1010 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1011 thycxx . . $ `melder/melder.h:45:9`! realVariablecxx . . $ structUiField#realVariable. = variable;
1012 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1013 return thee;
1014 }
1015
1016 UiFieldcxx . . $ UiField# UiForm_addIntegercxx . . $ UiForm_addInteger(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
1017 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1018 {
1019 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_., labelText);
1020 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1021 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1022 thycxx . . $ `melder/melder.h:45:9`! integerVariablecxx . . $ structUiField#integerVariable. = variable;
1023 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1024 return thee;
1025 }
1026
1027 UiFieldcxx . . $ UiField# UiForm_addNatural0cxx . . $ UiForm_addNatural0(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
1028 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1029 {
1030 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_., labelText);
1031 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1032 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1033 thycxx . . $ `melder/melder.h:45:9`! integerVariablecxx . . $ structUiField#integerVariable. = variable;
1034 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1035 return thee;
1036 }
1037
1038 UiFieldcxx . . $ UiField# UiForm_addNatural1cxx . . $ UiForm_addNatural1(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
1039 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1040 {
1041 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_., labelText);
1042 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1043 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1044 thycxx . . $ `melder/melder.h:45:9`! integerVariablecxx . . $ structUiField#integerVariable. = variable;
1045 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1046 return thee;
1047 }
1048
1049 UiFieldcxx . . $ UiField# UiForm_addWordcxx . . $ UiForm_addWord(5d4a87e816a21170). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1050 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1051 {
1052 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_., labelText);
1053 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1054 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1055 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1056 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1057 return thee;
1058 }
1059
1060 UiFieldcxx . . $ UiField# UiForm_addSentencecxx . . $ UiForm_addSentence(5d4a87e816a21170). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1061 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1062 {
1063 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_., labelText);
1064 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1065 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1066 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1067 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1068 return thee;
1069 }
1070
1071 UiFieldcxx . . $ UiField# UiForm_addHeadingcxx . . $ UiForm_addHeading(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText) {
1072 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_., U""); // this field gets no name; so that the user can give it any title
1073 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1074 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1075 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (labelText);
1076 return thee;
1077 }
1078
1079 UiFieldcxx . . $ UiField# UiForm_addCommentcxx . . $ UiForm_addComment(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText) {
1080 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_., U""); // this field gets no name; so that the user can give it any title
1081 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1082 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1083 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (labelText);
1084 return thee;
1085 }
1086
1087 UiFieldcxx . . $ UiField# UiForm_addCaptioncxx . . $ UiForm_addCaption(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText) {
1088 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_., U""); // this field gets no name; so that the user can give it any title
1089 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1090 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1091 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (labelText);
1092 return thee;
1093 }
1094
1095 UiFieldcxx . . $ UiField# UiForm_addBooleancxx . . $ UiForm_addBoolean(b90450cfcf0b1b39). (UiFormcxx . . $ UiForm# me, bool *variable, conststring32cxx . . $ conststring32# variableName,
1096 conststring32cxx . . $ conststring32# labelText, bool defaultValue)
1097 {
1098 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_., labelText);
1099 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1100 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1101 thycxx . . $ `melder/melder.h:45:9`! boolVariablecxx . . $ structUiField#boolVariable. = variable;
1102 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1103 return thee;
1104 }
1105
1106 UiFieldcxx . . $ UiField# UiForm_addTextcxx . . $ UiForm_addText(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1107 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1108 {
1109 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_., labelText);
1110 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1111 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1112 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1113 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1114 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1115 return thee;
1116 }
1117
1118 UiFieldcxx . . $ UiField# UiForm_addFormulacxx . . $ UiForm_addFormula(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1119 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1120 {
1121 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_., labelText);
1122 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1123 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1124 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1125 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1126 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1127 return thee;
1128 }
1129
1130 UiFieldcxx . . $ UiField# UiForm_addInfilecxx . . $ UiForm_addInfile(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1131 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1132 {
1133 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_., labelText);
1134 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1135 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1136 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1137 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1138 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1139 return thee;
1140 }
1141
1142 UiFieldcxx . . $ UiField# UiForm_addOutfilecxx . . $ UiForm_addOutfile(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1143 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1144 {
1145 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_., labelText);
1146 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1147 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1148 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1149 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1150 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1151 return thee;
1152 }
1153
1154 UiFieldcxx . . $ UiField# UiForm_addFoldercxx . . $ UiForm_addFolder(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
1155 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1156 {
1157 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_., labelText);
1158 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1159 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1160 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = variable;
1161 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1162 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1163 return thee;
1164 }
1165
1166 UiFieldcxx . . $ UiField# UiForm_addRealVectorcxx . . $ UiForm_addRealVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1167 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1168 {
1169 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_., labelText);
1170 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1171 thycxx . . $ `melder/melder.h:45:9`! realVectorDefaultFormatcxx . . $ structUiField#realVectorDefaultFormat. = defaultFormat;
1172 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1173 thycxx . . $ `melder/melder.h:45:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. = variable;
1174 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1175 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1176 return thee;
1177 }
1178
1179 UiFieldcxx . . $ UiField# UiForm_addNonnegativeVectorcxx . . $ UiForm_addNonnegativeVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1180 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1181 {
1182 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_., labelText);
1183 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1184 thycxx . . $ `melder/melder.h:45:9`! realVectorDefaultFormatcxx . . $ structUiField#realVectorDefaultFormat. = defaultFormat;
1185 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1186 thycxx . . $ `melder/melder.h:45:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. = variable;
1187 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1188 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1189 return thee;
1190 }
1191
1192 UiFieldcxx . . $ UiField# UiForm_addPositiveVectorcxx . . $ UiForm_addPositiveVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1193 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1194 {
1195 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_., labelText);
1196 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1197 thycxx . . $ `melder/melder.h:45:9`! realVectorDefaultFormatcxx . . $ structUiField#realVectorDefaultFormat. = defaultFormat;
1198 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1199 thycxx . . $ `melder/melder.h:45:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. = variable;
1200 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1201 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1202 return thee;
1203 }
1204
1205 UiFieldcxx . . $ UiField# UiForm_addIntegerVectorcxx . . $ UiForm_addIntegerVector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1206 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1207 {
1208 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_., labelText);
1209 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1210 thycxx . . $ `melder/melder.h:45:9`! integerVectorDefaultFormatcxx . . $ structUiField#integerVectorDefaultFormat. = defaultFormat;
1211 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1212 thycxx . . $ `melder/melder.h:45:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. = variable;
1213 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1214 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1215 return thee;
1216 }
1217
1218 UiFieldcxx . . $ UiField# UiForm_addNatural0Vectorcxx . . $ UiForm_addNatural0Vector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1219 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1220 {
1221 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_., labelText);
1222 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1223 thycxx . . $ `melder/melder.h:45:9`! integerVectorDefaultFormatcxx . . $ structUiField#integerVectorDefaultFormat. = defaultFormat;
1224 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1225 thycxx . . $ `melder/melder.h:45:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. = variable;
1226 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1227 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1228 return thee;
1229 }
1230
1231 UiFieldcxx . . $ UiField# UiForm_addNatural1Vectorcxx . . $ UiForm_addNatural1Vector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1232 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines)
1233 {
1234 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_., labelText);
1235 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1236 thycxx . . $ `melder/melder.h:45:9`! integerVectorDefaultFormatcxx . . $ structUiField#integerVectorDefaultFormat. = defaultFormat;
1237 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1238 thycxx . . $ `melder/melder.h:45:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. = variable;
1239 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1240 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1241 return thee;
1242 }
1243
1244 UiFieldcxx . . $ UiField# UiForm_addRealMatrixcxx . . $ UiForm_addRealMatrix(5d5d08370bfb8861). (UiFormcxx . . $ UiForm# me, constMATcxx . . $ constMAT# *variable, conststring32cxx . . $ conststring32# variableName,
1245 conststring32cxx . . $ conststring32# labelText, constMATVUcxx . . $ constMATVU# defaultValue, integercxx . . $ integer# numberOfLines)
1246 {
1247 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_., labelText);
1248 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1249 thycxx . . $ `melder/melder.h:45:9`! numericMatrixDefaultValuecxx . . $ structUiField#numericMatrixDefaultValue. =cxx . . $ automatrix#`operator=`(a0f46581f260c488). copy_MATcxx . . $ copy_MAT(a392b09ce3fc3972). (defaultValue);
1250 thycxx . . $ `melder/melder.h:45:9`! numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable. = variable;
1251 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1252 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1253 return thee;
1254 }
1255
1256 UiFieldcxx . . $ UiField# UiForm_addStringArraycxx . . $ UiForm_addStringArray(94f57f7e3f1d78aa). (UiFormcxx . . $ UiForm# me, constSTRVECcxx . . $ constSTRVEC# *variable, conststring32cxx . . $ conststring32# variableName,
1257 conststring32cxx . . $ conststring32# labelText, constSTRVECcxx . . $ constSTRVEC# defaultValue, integercxx . . $ integer# numberOfLines)
1258 {
1259 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_., labelText);
1260 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1261 thycxx . . $ `melder/melder.h:45:9`! stringArrayDefaultValuecxx . . $ structUiField#stringArrayDefaultValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). copy_STRVECcxx . . $ copy_STRVEC(cfa8029879abedac). (defaultValue);
1262 thycxx . . $ `melder/melder.h:45:9`! stringArrayFormatcxx . . $ structUiField#stringArrayFormat. = theStringArrayFormatcxx . . $ theStringArrayFormat.;
1263 thycxx . . $ `melder/melder.h:45:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable. = variable;
1264 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1265 thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines. = Melder_clippedcxx . . $ Melder_clipped(5eb09607cedc971b). (1_integercxx . . $ `operator""_integer`(85240eb457c3721a)., numberOfLines, 33_integercxx . . $ `operator""_integer`(85240eb457c3721a).);
1266 return thee;
1267 }
1268
1269 UiFieldcxx . . $ UiField# UiForm_addChoicecxx . . $ UiForm_addChoice(d89e2083c962d687). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
1270 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base)
1271 {
1272 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_., labelText);
1273 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = thee;
1274 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1275 thycxx . . $ `melder/melder.h:45:9`! intVariablecxx . . $ structUiField#intVariable. = intVariable;
1276 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = stringVariable;
1277 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1278 thycxx . . $ `melder/melder.h:45:9`! subtractcxx . . $ structUiField#subtract. = ( base == 1 ? 0 : 1 );
1279 return thee;
1280 }
1281
1282 UiFieldcxx . . $ UiField# UiForm_addChoiceEnumcxx . . $ UiForm_addChoiceEnum(127838258719f907). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
1283 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base, enum_generic_getValuecxx . . $ enum_generic_getValue# getValueFunction)
1284 {
1285 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_., labelText);
1286 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = thee;
1287 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1288 thycxx . . $ `melder/melder.h:45:9`! intVariablecxx . . $ structUiField#intVariable. = intVariable;
1289 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = stringVariable;
1290 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1291 thycxx . . $ `melder/melder.h:45:9`! subtractcxx . . $ structUiField#subtract. = ( base == 1 ? 0 : 1 );
1292 thycxx . . $ `melder/melder.h:45:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. = getValueFunction;
1293 return thee;
1294 }
1295
1296 UiFieldcxx . . $ UiField# UiForm_addOptionMenucxx . . $ UiForm_addOptionMenu(d89e2083c962d687). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
1297 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base)
1298 {
1299 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_., labelText);
1300 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = thee;
1301 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1302 thycxx . . $ `melder/melder.h:45:9`! intVariablecxx . . $ structUiField#intVariable. = intVariable;
1303 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = stringVariable;
1304 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1305 thycxx . . $ `melder/melder.h:45:9`! subtractcxx . . $ structUiField#subtract. = ( base == 1 ? 0 : 1 );
1306 return thee;
1307 }
1308
1309 UiFieldcxx . . $ UiField# UiForm_addOptionMenuEnumcxx . . $ UiForm_addOptionMenuEnum(127838258719f907). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
1310 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base, enum_generic_getValuecxx . . $ enum_generic_getValue# getValueFunction)
1311 {
1312 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_., labelText);
1313 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = thee;
1314 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1315 thycxx . . $ `melder/melder.h:45:9`! intVariablecxx . . $ structUiField#intVariable. = intVariable;
1316 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = stringVariable;
1317 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1318 thycxx . . $ `melder/melder.h:45:9`! subtractcxx . . $ structUiField#subtract. = ( base == 1 ? 0 : 1 );
1319 thycxx . . $ `melder/melder.h:45:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. = getValueFunction;
1320 return thee;
1321 }
1322
1323 UiFieldcxx . . $ UiField# UiForm_addListcxx . . $ UiForm_addList(c5dedd83e834332f). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *integerVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
1324 conststring32cxx . . $ conststring32# labelText, constSTRVECcxx . . $ constSTRVEC# strings, integercxx . . $ integer# defaultValue)
1325 {
1326 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_., labelText);
1327 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1328 thycxx . . $ `melder/melder.h:45:9`! stringscxx . . $ structUiField#strings. =cxx . . $ _conststringvector#`operator=`(90af58159cab4862). strings;
1329 thycxx . . $ `melder/melder.h:45:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. = defaultValue;
1330 thycxx . . $ `melder/melder.h:45:9`! integerVariablecxx . . $ structUiField#integerVariable. = integerVariable;
1331 thycxx . . $ `melder/melder.h:45:9`! stringVariablecxx . . $ structUiField#stringVariable. = stringVariable;
1332 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1333 return thee;
1334 }
1335
1336 UiFieldcxx . . $ UiField# UiForm_addColourcxx . . $ UiForm_addColour(336d3133f8cc3777). (UiFormcxx . . $ UiForm# me, MelderColourcxx . . $ MelderColour# *colourVariable, conststring32cxx . . $ conststring32# variableName,
1337 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1338 {
1339 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_., labelText);
1340 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1341 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1342 thycxx . . $ `melder/melder.h:45:9`! colourVariablecxx . . $ structUiField#colourVariable. = colourVariable;
1343 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1344 return thee;
1345 }
1346
1347 UiFieldcxx . . $ UiField# UiForm_addChannelcxx . . $ UiForm_addChannel(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
1348 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue)
1349 {
1350 UiFieldcxx . . $ UiField# thee = UiForm_addFieldcxx . . $ UiForm_addField(cbabb8941351074e). (me, _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_., labelText);
1351 mycxx . . $ `melder/melder.h:44:9`! referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu. = nullptr;
1352 thycxx . . $ `melder/melder.h:45:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (defaultValue);
1353 thycxx . . $ `melder/melder.h:45:9`! integerVariablecxx . . $ structUiField#integerVariable. = variable;
1354 thycxx . . $ `melder/melder.h:45:9`! variableNamecxx . . $ structUiField#variableName. = variableName;
1355 return thee;
1356 }
1357
1358 #define DIALOG_Xcxx . . $ `sys/Ui.cpp:1358:9`! 150
1359 #define DIALOG_Ycxx . . $ `sys/Ui.cpp:1359:9`! 70
1360 #define HELP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1360:9`! 60
1361 #define STANDARDS_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1361:9`! 100
1362 #define REVERT_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1362:9`! 60
1363 #define STOP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1363:9`! 50
1364 #define HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! 20
1365 #define LIST_HEIGHTcxx . . $ `sys/Ui.cpp:1365:9`! 192
1366
1367 static MelderStringcxx . . $ MelderString# theFinishBuffercxx . . $ theFinishBuffer.;
1368
1369 static void appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). () {
1370 integercxx . . $ integer# length = theFinishBuffercxx . . $ theFinishBuffer..lengthcxx . . $ MelderString#length.;
1371 if (length < 1)
1372 return;
1373 char32cxx . . $ char32# lastCharacter = theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string. [length - 1];
1374 if (lastCharacter == U':' || lastCharacter == U'?' || lastCharacter == U'.')
1375 return;
1376 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& theFinishBuffercxx . . $ theFinishBuffer., U':');
1377 }
1378
1379 static int multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (integercxx . . $ integer# numberOfLines) {
1380 if (numberOfLines <= 1)
1381 return Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`!;
1382 #if defined (macintosh)
1383 return numberOfLines * (Gui_TEXTFIELD_HEIGHT - 9) + 21; // 15 is the minimum, but 21 gives some feedback about what is outside (2020-10-19)
1384 #elif defined (_WIN32)
1385 return numberOfLines * (Gui_TEXTFIELD_HEIGHT - 4) + 21; // 21 is the mininum (2020-10-19)
1386 #elif defined (linuxcxx . . $ `<built-in>:480:9`!)
1387 return numberOfLines * (Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`! - 8) + 15; // 13 is the minimum, but if there is no horizontal scrollbar, there is a line more (2020-10-19)
1388 #else
1389 return numberOfLines * Gui_TEXTFIELD_HEIGHT;
1390 #endif
1391 }
1392
1393 void UiForm_finishcxx . . $ UiForm_finish(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me) {
1394 if (! mycxx . . $ `melder/melder.h:44:9`! d_dialogParentcxx . . $ structUiForm#d_dialogParent. && ! mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm.)
1395 return;
1396
1397 int size = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.;
1398 int dialogHeight = 0;
1399 const int textFieldHeight = Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`!;
1400 const int headerLabelHeight = textFieldHeight
1401 #ifdef _WIN32
1402 - 6;
1403 #else
1404 - 10;
1405 #endif
1406 const int commentContinuationHeight = headerLabelHeight - 5;
1407 int dialogWidth = 520, dialogCentre = dialogWidth / 2, fieldX = dialogCentre + Gui_LABEL_SPACINGcxx . . $ `sys/Gui.h:101:9`! / 2;
1408 int labelWidth = fieldX - Gui_LABEL_SPACINGcxx . . $ `sys/Gui.h:101:9`! - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, fieldWidth = labelWidth, halfFieldWidth = fieldWidth / 2 - 6;
1409
1410 GuiFormcxx . . $ GuiForm# form;
1411 bool okButtonIsDefault = true;
1412
1413 /*
1414 Compute height. Cannot leave this to the default geometry management system.
1415 */
1416 for (integercxx . . $ integer# ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++ ) {
1417 UiFieldcxx . . $ UiField# thee = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), previous = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield - 1].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
1418 dialogHeight +=
1419 ifield == 1 ?
1420 Gui_TOP_DIALOG_SPACINGcxx . . $ `sys/Gui.h:90:10`!
1421 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_. || previous -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_. ?
1422 Gui_VERTICAL_DIALOG_SPACING_DIFFERENTcxx . . $ `sys/Gui.h:95:9`!
1423 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. >= _kUiField_typecxx . . $ _kUiField_type#::LABELLED_TEXT_MIN_cxx . . $ _kUiField_type#LABELLED_TEXT_MIN_. && thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. <= _kUiField_typecxx . . $ _kUiField_type#::LABELLED_TEXT_MAX_cxx . . $ _kUiField_type#LABELLED_TEXT_MAX_. && str32nequcxx . . $ `melder/melder_str32.h:123:9`! (thycxx . . $ `melder/melder.h:45:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"right ", 6) &&
1424 previous -> typecxx . . $ structUiField#type. >= _kUiField_typecxx . . $ _kUiField_type#::LABELLED_TEXT_MIN_cxx . . $ _kUiField_type#LABELLED_TEXT_MIN_. && previous -> typecxx . . $ structUiField#type. <= _kUiField_typecxx . . $ _kUiField_type#::LABELLED_TEXT_MAX_cxx . . $ _kUiField_type#LABELLED_TEXT_MAX_. &&
1425 str32nequcxx . . $ `melder/melder_str32.h:123:9`! (previous -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"left ", 5) ?
1426 - textFieldHeight
1427 :
1428 Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1429 const bool thouHastVerticallyAddedLabel =
1430 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_. ||
1431 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_. ||
1432 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_. ||
1433 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_. || thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_. ||
1434 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_. ||
1435 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.
1436 ;
1437 if (thouHastVerticallyAddedLabel)
1438 dialogHeight += (headerLabelHeight + Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!) * !! thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText.;
1439 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. = dialogHeight;
1440 dialogHeight +=
1441 thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_. ?
1442 Gui_CHECKBUTTON_HEIGHTcxx . . $ `sys/Gui.h:100:9`!
1443 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_. ?
1444 thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size. * Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`! + (thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size. - 1) * Gui_RADIOBUTTON_SPACINGcxx . . $ `sys/Gui.h:99:9`!
1445 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_. ?
1446 Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!
1447 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_. ?
1448 LIST_HEIGHTcxx . . $ `sys/Ui.cpp:1365:9`!
1449 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_. && thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0] != U'\0' &&
1450 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()) - 1] != U'.' && ifield != mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. ?
1451 headerLabelHeight
1452 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_. && thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0] != U'\0' &&
1453 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()) - 1] == U':' && ifield != mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. ?
1454 headerLabelHeight
1455 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_. && thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0] != U'\0' &&
1456 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()) - 1] != U'.' && ifield != mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. ?
1457 commentContinuationHeight
1458 : thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_. && thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0] != U'\0' &&
1459 thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()) - 1] != U'.' && ifield != mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. ?
1460 headerLabelHeight
1461 : thouHastVerticallyAddedLabel ?
1462 multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.)
1463 :
1464 textFieldHeight;
1465 }
1466 dialogHeight += 2 * Gui_BOTTOM_DIALOG_SPACINGcxx . . $ `sys/Gui.h:92:9`! + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!;
1467 mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm. = GuiDialog_createcxx . . $ GuiDialog_create(9df51e4563bc0c17). (mycxx . . $ `melder/melder.h:44:9`! d_dialogParentcxx . . $ structUiForm#d_dialogParent., DIALOG_Xcxx . . $ `sys/Ui.cpp:1358:9`!, DIALOG_Ycxx . . $ `sys/Ui.cpp:1359:9`!, dialogWidth, dialogHeight,
1468 mycxx . . $ `melder/melder.h:44:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), gui_dialog_cb_closecxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, GuiDialog_Modalitycxx . . $ GuiDialog_Modality#::MODELESScxx . . $ GuiDialog_Modality#MODELESS.);
1469 GuiDialog_setDefaultCallbackcxx . . $ GuiDialog_setDefaultCallback(4348c95d8f00ecbd). (mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm., gui_dialog_cb_defaultcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me);
1470
1471 form = mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.;
1472
1473 for (integercxx . . $ integer# ifield = 1; ifield <= size; ifield ++) {
1474 UiFieldcxx . . $ UiField# thee = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
1475 switch (thycxx . . $ `melder/melder.h:45:9`! typecxx . . $ structUiField#type.)
1476 {
1477 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
1478 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
1479 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
1480 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
1481 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
1482 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
1483 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
1484 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
1485 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
1486 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
1487 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
1488 {
1489 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1490 #if defined (macintosh)
1491 ylabel += 3;
1492 #endif
1493 if (str32nequcxx . . $ `melder/melder_str32.h:123:9`! (thycxx . . $ `melder/melder.h:45:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"left ", 5)) {
1494 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).() + 5);
1495 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1496 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form, 0, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! + labelWidth, ylabel, ylabel + textFieldHeight,
1497 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!);
1498 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, fieldX, fieldX + halfFieldWidth, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`!, 0);
1499 } else if (str32nequcxx . . $ `melder/melder_str32.h:123:9`! (thycxx . . $ `melder/melder.h:45:9`! namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"right ", 6)) {
1500 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, fieldX + halfFieldWidth + 12, fieldX + fieldWidth,
1501 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`!, 0);
1502 } else {
1503 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1504 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1505 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form, 0, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! + labelWidth,
1506 ylabel, ylabel + textFieldHeight,
1507 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!
1508 );
1509 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, fieldX, fieldX + fieldWidth, // or once the dialog is a Form: - Gui_RIGHT_DIALOG_SPACING,
1510 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`!, 0);
1511 }
1512 }
1513 break;
1514 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
1515 {
1516 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1517 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1518 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1519 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1520 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1521 ylabel, ylabel + textFieldHeight,
1522 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1523 );
1524 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1525 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1526 }
1527 break;
1528 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
1529 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
1530 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
1531 {
1532 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1533 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1534 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1535 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1536 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1537 ylabel, ylabel + textFieldHeight,
1538 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1539 );
1540 thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu. = GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (form,
1541 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 200, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1542 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., 0
1543 );
1544 for (int format = (int) kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#::MINcxx . . $ kUi_realVectorFormat#MIN.; format <= (int) kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#::MAXcxx . . $ kUi_realVectorFormat#MAX.; format ++)
1545 GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., kUi_realVectorFormat_getTextcxx . . $ kUi_realVectorFormat_getText(f636b00df1c01afd). ((kUi_realVectorFormatcxx . . $ kUi_realVectorFormat#) format));
1546 //GuiOptionMenu_setValue (thy optionMenu, (int) thy realVectorDefaultFormat); // SUPERFLUOUS
1547 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1548 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1549 }
1550 break;
1551 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
1552 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
1553 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
1554 {
1555 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1556 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1557 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1558 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1559 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1560 ylabel, ylabel + textFieldHeight,
1561 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1562 );
1563 thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu. = GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (form,
1564 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 200, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1565 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., 0
1566 );
1567 for (int format = (int) kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::MINcxx . . $ kUi_integerVectorFormat#MIN.; format <= (int) kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#::MAXcxx . . $ kUi_integerVectorFormat#MAX.; format ++)
1568 GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., kUi_integerVectorFormat_getTextcxx . . $ kUi_integerVectorFormat_getText(7b7a9a8f61ea668c). ((kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat#) format));
1569 //GuiOptionMenu_setValue (thy optionMenu, (int) thy integerVectorDefaultFormat); // SUPERFLUOUS
1570 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1571 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1572 }
1573 break;
1574 case _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_.:
1575 {
1576 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1577 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1578 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1579 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1580 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1581 ylabel, ylabel + textFieldHeight,
1582 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1583 );
1584 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1585 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1586 thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu. = GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (form,
1587 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 200, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1588 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., 0
1589 );
1590 for (int format = (int) kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::MINcxx . . $ kUi_realMatrixFormat#MIN.; format <= (int) kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#::MAXcxx . . $ kUi_realMatrixFormat#MAX.; format ++)
1591 GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., kUi_realMatrixFormat_getTextcxx . . $ kUi_realMatrixFormat_getText(7fbbbd1b1d5adb94). ((kUi_realMatrixFormatcxx . . $ kUi_realMatrixFormat#) format));
1592 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., (int) theRealMatrixFormatcxx . . $ theRealMatrixFormat.);
1593 okButtonIsDefault = false; // because otherwise, the Enter key would be ambiguous
1594 }
1595 break;
1596 case _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
1597 {
1598 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1599 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1600 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1601 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1602 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1603 ylabel, ylabel + textFieldHeight,
1604 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1605 );
1606 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1607 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1608 thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu. = GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (form,
1609 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 200, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1610 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., 0
1611 );
1612 for (int format = (int) kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::MINcxx . . $ kUi_stringArrayFormat#MIN.; format <= (int) kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#::MAXcxx . . $ kUi_stringArrayFormat#MAX.; format ++)
1613 GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., kUi_stringArrayFormat_getTextcxx . . $ kUi_stringArrayFormat_getText(b5e13fbd33e21b5d). ((kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat#) format));
1614 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., (int) theStringArrayFormatcxx . . $ theStringArrayFormat.);
1615 }
1616 break;
1617 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
1618 {
1619 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1620 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1621 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1622 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1623 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1624 ylabel, ylabel + textFieldHeight,
1625 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1626 );
1627 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1628 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1629 }
1630 break;
1631 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
1632 {
1633 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1634 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1635 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1636 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1637 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100,
1638 ylabel, ylabel + textFieldHeight,
1639 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1640 );
1641 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1642 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_CHARWRAPcxx . . $ `sys/Gui.h:1124:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1643 thycxx . . $ `melder/melder.h:45:9`! pushButtoncxx . . $ structUiField#pushButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form,
1644 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1645 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3 - Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3, U"Browse...", gui_button_cb_browseInfilecxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., thee, 0
1646 );
1647 }
1648 break;
1649 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
1650 {
1651 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1652 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1653 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1654 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1655 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100,
1656 ylabel, ylabel + textFieldHeight,
1657 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1658 );
1659 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1660 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_CHARWRAPcxx . . $ `sys/Gui.h:1124:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1661 thycxx . . $ `melder/melder.h:45:9`! pushButtoncxx . . $ structUiField#pushButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form,
1662 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1663 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3 - Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3, U"Browse...", gui_button_cb_browseOutfilecxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., thee, 0
1664 );
1665 }
1666 break;
1667 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
1668 {
1669 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1670 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1671 const int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 5 - headerLabelHeight - Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`!;
1672 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1673 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100,
1674 ylabel, ylabel + textFieldHeight,
1675 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1676 );
1677 thycxx . . $ `melder/melder.h:45:9`! textcxx . . $ structUiField#text. = GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`!,
1678 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + multiLineTextHeightcxx . . $ multiLineTextHeight(a9e4e82268fd7bfa). (thycxx . . $ `melder/melder.h:45:9`! numberOfLinescxx . . $ structUiField#numberOfLines.), GuiText_CHARWRAPcxx . . $ `sys/Gui.h:1124:9`! | GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`!);
1679 thycxx . . $ `melder/melder.h:45:9`! pushButtoncxx . . $ structUiField#pushButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form,
1680 dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! - 100, dialogWidth - Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!,
1681 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3 - Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. - 3, U"Browse...", gui_button_cb_browseFoldercxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., thee, 0
1682 );
1683 }
1684 break;
1685 case _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_.:
1686 {
1687 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1688 #if defined (macintosh)
1689 ylabel += 2;
1690 #endif
1691 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1692 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1693 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1694 ylabel + 5, ylabel + 5 + textFieldHeight,
1695 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_BOLDcxx . . $ `sys/Gui.h:678:9`!
1696 );
1697 }
1698 break;
1699 case _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_.:
1700 {
1701 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1702 #if defined (macintosh)
1703 ylabel += 0;
1704 #endif
1705 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1706 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1707 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1708 ylabel + 5, ylabel + 5 + textFieldHeight,
1709 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., 0
1710 );
1711 }
1712 break;
1713 case _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_.:
1714 {
1715 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1716 #if defined (macintosh)
1717 ylabel += 0;
1718 #endif
1719 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1720 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form,
1721 Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, dialogWidth /* allow to extend into the margin */,
1722 ylabel - 10, ylabel - 10 + textFieldHeight,
1723 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!
1724 );
1725 }
1726 break;
1727 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
1728 {
1729 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1730 #if defined (macintosh)
1731 ylabel += 1;
1732 #endif
1733 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1734 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1735 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! + labelWidth, ylabel, ylabel + Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`!,
1736 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!);
1737 GuiRadioGroup_begincxx . . $ GuiRadioGroup_begin(49f6e7a06ebc5aa8). ();
1738 for (integercxx . . $ integer# ibutton = 1; ibutton <= thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; ibutton ++) {
1739 UiOptioncxx . . $ UiOption# button = thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).ibutton];
1740 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., button -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1741 button -> radioButtoncxx . . $ structUiOption#radioButton. = GuiRadioButton_createShowncxx . . $ GuiRadioButton_createShown(6b1e2d4d89108d7e). (form,
1742 fieldX, dialogWidth /* allow to extend into the margin */,
1743 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + (ibutton - 1) * (Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`! + Gui_RADIOBUTTON_SPACINGcxx . . $ `sys/Gui.h:99:9`!),
1744 thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + (ibutton - 1) * (Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`! + Gui_RADIOBUTTON_SPACINGcxx . . $ `sys/Gui.h:99:9`!) + Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`!,
1745 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., nullptrcxx . . $ MelderCallback#MelderCallback(fc624d2cd197112)., nullptr, 0
1746 );
1747 }
1748 GuiRadioGroup_endcxx . . $ GuiRadioGroup_end(49f6e7a06ebc5aa8). ();
1749 }
1750 break;
1751 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
1752 {
1753 int ylabel = thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y.;
1754 #if defined (macintosh)
1755 ylabel += 2;
1756 #endif
1757 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1758 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1759 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! + labelWidth, ylabel, ylabel + Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!,
1760 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!);
1761 thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu. = GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (form, fieldX, fieldX + fieldWidth, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`!, 0);
1762 for (integercxx . . $ integer# ibutton = 1; ibutton <= thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; ibutton ++) {
1763 UiOptioncxx . . $ UiOption# button = thycxx . . $ `melder/melder.h:45:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).ibutton];
1764 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., button -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1765 GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (thycxx . . $ `melder/melder.h:45:9`! optionMenucxx . . $ structUiField#optionMenu., theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string.);
1766 }
1767 }
1768 break;
1769 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
1770 {
1771 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1772 /*field -> label = GuiLabel_createShown (form, x, x + labelWidth, thy y, thy y + Gui_CHECKBUTTON_HEIGHT,
1773 theFinishBuffer.string, GuiLabel_RIGHT); */
1774 thycxx . . $ `melder/melder.h:45:9`! checkButtoncxx . . $ structUiField#checkButton. = GuiCheckButton_createShowncxx . . $ GuiCheckButton_createShown(623a0757f24fe0b2). (form,
1775 fieldX, dialogWidth /* allow to extend into the margin */, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + Gui_CHECKBUTTON_HEIGHTcxx . . $ `sys/Gui.h:100:9`!,
1776 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., nullptrcxx . . $ MelderCallback#MelderCallback(fc624d2cd197112)., nullptr, 0
1777 );
1778 }
1779 break;
1780 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
1781 {
1782 int listWidth = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. == 1 ? dialogWidth - fieldX : fieldWidth;
1783 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& theFinishBuffercxx . . $ theFinishBuffer., thycxx . . $ `melder/melder.h:45:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1784 appendColoncxx . . $ appendColon(49f6e7a06ebc5aa8). ();
1785 thycxx . . $ `melder/melder.h:45:9`! labelcxx . . $ structUiField#label. = GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (form, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`!, Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! + labelWidth, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 1, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + 21,
1786 theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string., GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`!);
1787 thycxx . . $ `melder/melder.h:45:9`! listcxx . . $ structUiField#list. = GuiList_createcxx . . $ GuiList_create(88aee17cb4a88a62). (form, fieldX, fieldX + listWidth, thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y., thycxx . . $ `melder/melder.h:45:9`! ycxx . . $ structUiField#y. + LIST_HEIGHTcxx . . $ `sys/Ui.cpp:1365:9`!, false, theFinishBuffercxx . . $ theFinishBuffer..stringcxx . . $ MelderString#string.);
1788 for (integercxx . . $ integer# i = 1; i <= thycxx . . $ `melder/melder.h:45:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.; i ++)
1789 GuiList_insertItemcxx . . $ GuiList_insertItem(896610c612ff86cf). (thycxx . . $ `melder/melder.h:45:9`! listcxx . . $ structUiField#list., thycxx . . $ `melder/melder.h:45:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], 0);
1790 GuiThing_showcxx . . $ GuiThing_show(20e88c25f0ba841). (thycxx . . $ `melder/melder.h:45:9`! listcxx . . $ structUiField#list.);
1791 }
1792 break;
1793 }
1794 }
1795 for (integercxx . . $ integer# ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++)
1796 UiField_setDefaultcxx . . $ UiField_setDefault(be6b1002ca2abf35). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
1797 /*separator = XmCreateSeparatorGadget (column, "separator", nullptr, 0);*/
1798 const int y = dialogHeight - Gui_BOTTOM_DIALOG_SPACINGcxx . . $ `sys/Gui.h:92:9`! - Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!;
1799 if (mycxx . . $ `melder/melder.h:44:9`! helpTitlecxx . . $ structUiForm#helpTitle.) {
1800 mycxx . . $ `melder/melder.h:44:9`! helpButtoncxx . . $ structUiForm#helpButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`!, HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! + HELP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1360:9`!, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1801 U"Help", gui_button_cb_helpcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, 0);
1802 }
1803 bool commentsOnly = true;
1804 for (integercxx . . $ integer# ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
1805 if (! _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.)) {
1806 commentsOnly = false;
1807 break;
1808 }
1809 }
1810 if (! commentsOnly) {
1811 if (mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm.) {
1812 mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form,
1813 HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`!, HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! + REVERT_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1362:9`!,
1814 y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!, U"Undo", gui_button_cb_revertcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, 0
1815 );
1816 } else {
1817 mycxx . . $ `melder/melder.h:44:9`! revertButtoncxx . . $ structUiForm#revertButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form,
1818 HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! + HELP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1360:9`! + Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`!,
1819 HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! + HELP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1360:9`! + Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`! + STANDARDS_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1361:9`!,
1820 y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!, U"Standards", gui_button_cb_revertcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, 0
1821 );
1822 }
1823 }
1824 if (mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm.) {
1825 int x = HELP_BUTTON_Xcxx . . $ `sys/Ui.cpp:1364:9`! + REVERT_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1362:9`! + Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`!;
1826 if (mycxx . . $ `melder/melder.h:44:9`! cancelContinueButtoncxx . . $ structUiForm#cancelContinueButton. == 0) {
1827 mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, x, x + STOP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1363:9`!, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1828 U"Stop", gui_button_cb_cancelcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, GuiButton_CANCELcxx . . $ `sys/Gui.h:468:9`!);
1829 x += STOP_BUTTON_WIDTHcxx . . $ `sys/Ui.cpp:1363:9`! + 7;
1830 } else {
1831 x += 30;
1832 }
1833 int room = dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! - x;
1834 int roomPerContinueButton = room / mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons.;
1835 int horizontalSpacing = (
1836 mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons. > 7 ?
1837 Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`! - 2 * (mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons. - 7)
1838 :
1839 Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`!
1840 );
1841 int continueButtonWidth = roomPerContinueButton - horizontalSpacing;
1842 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons.; i ++) {
1843 x = dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! - roomPerContinueButton * (mycxx . . $ `melder/melder.h:44:9`! numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons. - i + 1) + horizontalSpacing;
1844 mycxx . . $ `melder/melder.h:44:9`! continueButtonscxx . . $ structUiForm#continueButtons. [i] = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, x, x + continueButtonWidth, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1845 mycxx . . $ `melder/melder.h:44:9`! continueTextscxx . . $ structUiForm#continueTexts. [i].getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), gui_button_cb_okcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me,
1846 i == mycxx . . $ `melder/melder.h:44:9`! defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton. && okButtonIsDefault ? GuiButton_DEFAULTcxx . . $ `sys/Gui.h:467:9`! : i == mycxx . . $ `melder/melder.h:44:9`! cancelContinueButtoncxx . . $ structUiForm#cancelContinueButton. ? GuiButton_CANCELcxx . . $ `sys/Gui.h:468:9`! : 0
1847 );
1848 }
1849 } else {
1850 int x = dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! - Gui_OK_BUTTON_WIDTHcxx . . $ `sys/Gui.h:104:9`! - 2 * Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`!
1851 - Gui_APPLY_BUTTON_WIDTHcxx . . $ `sys/Gui.h:106:9`! - Gui_CANCEL_BUTTON_WIDTHcxx . . $ `sys/Gui.h:105:9`!;
1852 mycxx . . $ `melder/melder.h:44:9`! cancelButtoncxx . . $ structUiForm#cancelButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, x, x + Gui_CANCEL_BUTTON_WIDTHcxx . . $ `sys/Gui.h:105:9`!, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1853 U"Cancel", gui_button_cb_cancelcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, GuiButton_CANCELcxx . . $ `sys/Gui.h:468:9`!);
1854 x = dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! - Gui_OK_BUTTON_WIDTHcxx . . $ `sys/Gui.h:104:9`! - Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`! - Gui_APPLY_BUTTON_WIDTHcxx . . $ `sys/Gui.h:106:9`!;
1855 if (mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. > 1 || ! _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [1] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.))
1856 mycxx . . $ `melder/melder.h:44:9`! applyButtoncxx . . $ structUiForm#applyButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, x, x + Gui_APPLY_BUTTON_WIDTHcxx . . $ `sys/Gui.h:106:9`!, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1857 U"Apply", gui_button_cb_applycxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, 0);
1858 x = dialogWidth - Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! - Gui_OK_BUTTON_WIDTHcxx . . $ `sys/Gui.h:104:9`!;
1859 mycxx . . $ `melder/melder.h:44:9`! okButtoncxx . . $ structUiForm#okButton. = GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (form, x, x + Gui_OK_BUTTON_WIDTHcxx . . $ `sys/Gui.h:104:9`!, y, y + Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`!,
1860 mycxx . . $ `melder/melder.h:44:9`! isPauseFormcxx . . $ structUiForm#isPauseForm. ? U"Continue" : U"OK", gui_button_cb_okcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97)., me, okButtonIsDefault ? GuiButton_DEFAULTcxx . . $ `sys/Gui.h:467:9`! : 0);
1861 }
1862 /*GuiObject_show (separator);*/
1863 }
1864
1865 void UiForm_destroyWhenUnmanagedcxx . . $ UiForm_destroyWhenUnmanaged(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me) {
1866 mycxx . . $ `melder/melder.h:44:9`! destroyWhenUnmanagedcxx . . $ structUiForm#destroyWhenUnmanaged. = true;
1867 }
1868
1869 void UiForm_docxx . . $ UiForm_do(c04b2c306b4dc6f4). (UiFormcxx . . $ UiForm# me, bool modified) {
1870 mycxx . . $ `melder/melder.h:44:9`! allowExecutionHookcxx . . $ structUiForm#allowExecutionHook. = theAllowExecutionHookHintcxx . . $ theAllowExecutionHookHint.;
1871 mycxx . . $ `melder/melder.h:44:9`! allowExecutionClosurecxx . . $ structUiForm#allowExecutionClosure. = theAllowExecutionClosureHintcxx . . $ theAllowExecutionClosureHint.;
1872 Melder_assertcxx . . $ `melder/melder_assert.h:39:10`! (mycxx . . $ `melder/melder.h:44:9`! d_dialogForm);
1873 GuiThing_showcxx . . $ GuiThing_show(20e88c25f0ba841). (mycxx . . $ `melder/melder.h:44:9`! d_dialogFormcxx . . $ structUiForm#d_dialogForm.);
1874 if (modified)
1875 UiForm_okOrApplycxx . . $ UiForm_okOrApply(fa387e867edbcfd5). (me, nullptr, true);
1876 }
1877
1878 static void UiField_api_header_Ccxx . . $ UiField_api_header_C(8843678f51d875da). (UiFieldcxx . . $ UiField# me, UiFieldcxx . . $ UiField# next, bool isLastNonLabelField) {
1879 if (mycxx . . $ `melder/melder.h:44:9`! labelTextcxx . . $ structUiField#labelText. && str32chrcxx . . $ str32chr(328a9ede0fba853a). (mycxx . . $ `melder/melder.h:44:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U':'))
1880 tracecxx . . $ `melder/melder_debug.h:60:10`! (U"Form label with colon: ", mycxx . . $ `melder/melder.h:44:9`! labelText.get());
1881 if (_kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.)) {
1882 const bool weAreFollowedByAWideField =
1883 next && (next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_. || next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_. ||
1884 next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_. || next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_. ||
1885 next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_. ||
1886 next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_. ||
1887 next -> typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.);
1888 const bool weEndInAColon = Melder_endsWithcxx . . $ Melder_endsWith(1652f10ed0f82783). (mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U":");
1889 if (weEndInAColon)
1890 Melder_casualcxx . . $ Melder_casual(6298c93241566110). (U"Label with colon: ", mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1891 const bool weLabelTheFollowingField = weAreFollowedByAWideField && weEndInAColon;
1892 const bool weAreAComment = ! weLabelTheFollowingField;
1893 if (weAreAComment)
1894 MelderInfo_writeLinecxx . . $ MelderInfo_writeLine(3eb398314feba58b). (U"\t/* ", mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U" */");
1895 return;
1896 }
1897
1898 /*
1899 Write the type of the field.
1900 */
1901 bool isText = false, isBoolean = false, isEnum = false, isNonnegative = false, isPositive = false;
1902 switch (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.)
1903 {
1904 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
1905 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
1906 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
1907 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
1908 {
1909 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\tdouble ");
1910 isNonnegative = ( mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_. );
1911 isPositive = ( mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_. );
1912 }
1913 break;
1914 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
1915 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
1916 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
1917 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
1918 {
1919 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\tint64_t ");
1920 isNonnegative = ( mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_. );
1921 isPositive = ( mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_. );
1922 }
1923 break;
1924 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
1925 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
1926 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
1927 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
1928 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
1929 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
1930 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
1931 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
1932 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
1933 {
1934 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\tconst char *");
1935 isText = true;
1936 }
1937 break;
1938 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
1939 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
1940 {
1941 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\tconst char *");
1942 isText = true;
1943 isEnum = true;
1944 }
1945 break;
1946 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
1947 {
1948 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\tint32_t ");
1949 isBoolean = true;
1950 }
1951 break;
1952 default:
1953 {
1954 }
1955 }
1956
1957 /*
1958 Write the title of the field.
1959 */
1960 char32cxx . . $ char32# cName [100], *q = & cName [0];
1961 Melder_assertcxx . . $ `melder/melder_assert.h:39:10`! (mycxx . . $ `melder/melder.h:44:9`! labelText);
1962 const char32cxx . . $ char32# *p = & mycxx . . $ `melder/melder.h:44:9`! labelTextcxx . . $ structUiField#labelText. [cxx . . $ _autostring#`operator[]`(b190d49faf30c5be).0];
1963 *q ++ = Melder_toLowerCasecxx . . $ Melder_toLowerCase(cd1afca5b9692c51). (*p ++);
1964 bool up = false;
1965 for (; *p != U'\0'; p ++) {
1966 if (*p == U'(') {
1967 break;
1968 } else if (*p == U'\'') {
1969 continue;
1970 } else if (*p == U' ' || *p == U'-') {
1971 if (p [1] == U'(') { p ++; break; }
1972 up = true;
1973 } else if (*p == U'*') {
1974 *q ++ = U'S';
1975 *q ++ = U't';
1976 *q ++ = U'a';
1977 *q ++ = U'r';
1978 } else if (up) {
1979 *q ++ = Melder_toUpperCasecxx . . $ Melder_toUpperCase(cd1afca5b9692c51). (*p);
1980 up = false;
1981 } else {
1982 *q ++ = *p;
1983 }
1984 }
1985 *q = U'\0';
1986 if (! mycxx . . $ `melder/melder.h:44:9`! variableNamecxx . . $ structUiField#variableName.)
1987 Melder_warningcxx . . $ Melder_warning(6298c93241566110). (U"Missing variable name for field label: ", mycxx . . $ `melder/melder.h:44:9`! labelTextcxx . . $ structUiField#labelText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
1988 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (mycxx . . $ `melder/melder.h:44:9`! variableNamecxx . . $ structUiField#variableName. ? mycxx . . $ `melder/melder.h:44:9`! variableNamecxx . . $ structUiField#variableName. : cName);
1989 if (! isLastNonLabelField)
1990 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U",");
1991
1992 /*
1993 Get the units.
1994 */
1995 char32cxx . . $ char32# units [100];
1996 q = & units [0];
1997 if (*p == U'(') {
1998 for (p ++; *p != U'\0'; p ++) {
1999 if (*p == U')') {
2000 break;
2001 } else {
2002 *q ++ = *p;
2003 }
2004 }
2005 }
2006 *q = U'\0';
2007 const bool unitsAreAvailable = ( units [0] != U'\0' );
2008 const bool unitsContainRange = str32strcxx . . $ str32str(2de17cd8f7c584a6). (units, U"-");
2009
2010 /*
2011 Get the example.
2012 */
2013 conststring32cxx . . $ conststring32# example = mycxx . . $ `melder/melder.h:44:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); // BUG dangle
2014 const bool exampleIsAvailable = ( example && example [0] != U'\0' );
2015
2016 if (exampleIsAvailable) {
2017 /*
2018 Split up the default string.
2019 */
2020 char32cxx . . $ char32# defaultValue [100], defaultComment [100];
2021 str32cpycxx . . $ str32cpy(6ab934322573b179). (defaultValue, mycxx . . $ `melder/melder.h:44:9`! stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2022 str32cpycxx . . $ str32cpy(6ab934322573b179). (defaultComment, U"");
2023 if (unitsAreAvailable) {
2024 char32cxx . . $ char32# *parenthesis = str32chrcxx . . $ str32chr(328a9ede0fba853a). (defaultValue, U'(');
2025 if (parenthesis && parenthesis - defaultValue > 1) {
2026 parenthesis [-1] = U'\0';
2027 str32cpycxx . . $ str32cpy(6ab934322573b179). (defaultComment, parenthesis);
2028 }
2029 }
2030
2031 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" // ");
2032 if (isNonnegative)
2033 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"nonnegative, ");
2034 if (isPositive)
2035 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"positive, ");
2036 if (unitsContainRange)
2037 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (units, U", ");
2038 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"e.g. ");
2039 if (isText)
2040 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\"");
2041 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (defaultValue);
2042 if (isText)
2043 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\"");
2044 if (unitsAreAvailable && ! unitsContainRange) {
2045 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" ", units);
2046 }
2047 if (defaultComment [0]) {
2048 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" ", defaultComment);
2049 }
2050 } else if (isBoolean) {
2051 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" // boolean, e.g. ");
2052 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue., mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue. ? U" (true)" : U" (false)");
2053 } else if (isEnum) {
2054 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" // e.g. \"");
2055 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2056 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U"\"; other choice", ( mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size. > 2 ? U"s" : U"" ), U":");
2057 bool firstWritten = false;
2058 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2059 if (i == mycxx . . $ `melder/melder.h:44:9`! integerDefaultValuecxx . . $ structUiField#integerDefaultValue.)
2060 continue;
2061 if (firstWritten)
2062 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U",");
2063 MelderInfo_writecxx . . $ MelderInfo_write(3eb398314feba58b). (U" \"", mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U"\"");
2064 firstWritten = true;
2065 }
2066 }
2067 MelderInfo_writeLinecxx . . $ MelderInfo_writeLine(3eb398314feba58b). (U"");
2068 }
2069
2070 void UiForm_infocxx . . $ UiForm_info(6e424388870f3480). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# narg) {
2071 if (narg == -1) {
2072 /*
2073 The C interface.
2074 */
2075 int lastNonLabelFieldNumber = 0;
2076 for (int ifield = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield > 0; ifield --) {
2077 if (! _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.)) {
2078 lastNonLabelFieldNumber = ifield;
2079 break;
2080 }
2081 }
2082 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++)
2083 UiField_api_header_Ccxx . . $ UiField_api_header_C(8843678f51d875da). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), ifield == mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields. ? nullptr : mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield + 1].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), ifield == lastNonLabelFieldNumber);
2084 }
2085 }
2086
2087 static void UiField_argToValuecxx . . $ UiField_argToValue(bc446ad30dee327a). (UiFieldcxx . . $ UiField# me, Stackelcxx . . $ Stackel# arg, Interpretercxx . . $ Interpreter# /* interpreter */) {
2088 switch (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.)
2089 {
2090 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
2091 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
2092 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
2093 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
2094 {
2095 if (arg -> whichcxx . . $ structStackel#which. != Stackel_NUMBERcxx . . $ `sys/Formula.h:46:10`!)
2096 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a number, not ", arg -> whichText(), U".");
2097 mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. = arg -> numbercxx . . $ structStackel#$anonymous_type_0#number.;
2098 if (isundefcxx . . $ isundef(f8197d536af80c96). (mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.) && mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. != _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.)
2099 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” has the value “undefined”.");
2100 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. < 0.0)
2101 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” must be greater than or equal to 0.0.");
2102 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. <= 0.0)
2103 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” must be greater than 0.0.");
2104 if (mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable.)
2105 *mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable. = mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.;
2106 }
2107 break;
2108 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
2109 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
2110 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
2111 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
2112 {
2113 if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2114 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.) {
2115 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"All") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"Average")) {
2116 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2117 } else if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"Left") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"Mono")) {
2118 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 1;
2119 } else if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"Right") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"Stereo")) {
2120 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 2;
2121 } else {
2122 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Channel argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(),
2123 U"” can only be a number or one of the strings “All”, “Average”, “Left”, “Right”, “Mono” or “Stereo”.");
2124 }
2125 } else {
2126 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a number, not ", arg -> whichText(), U".");
2127 }
2128 } else if (arg -> whichcxx . . $ structStackel#which. == Stackel_NUMBERcxx . . $ `sys/Formula.h:46:10`!) {
2129 double realValue = arg -> numbercxx . . $ structStackel#$anonymous_type_0#number.;
2130 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (realValue);
2131 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerValue == realValue,
2132 U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a whole number.");
2133 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_. && mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. < 0)
2134 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a nonnegative whole number.");
2135 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_. && mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. < 1)
2136 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a positive whole number.");
2137 } else {
2138 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a number, not ", arg -> whichText(), U".");
2139 }
2140 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
2141 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2142 }
2143 break;
2144 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
2145 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
2146 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
2147 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
2148 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
2149 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
2150 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
2151 {
2152 if (arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2153 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a string, not ", arg -> whichText(), U".");
2154 mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2155 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2156 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); // BUG dangle
2157 }
2158 break;
2159 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
2160 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
2161 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
2162 {
2163 if (arg -> whichcxx . . $ structStackel#which. != Stackel_NUMERIC_VECTORcxx . . $ `sys/Formula.h:48:10`! && arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2164 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a numeric vector, not ", arg -> whichText(), U".");
2165 if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2166 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespace_VECcxx . . $ splitByWhitespace_VEC(be643ff064625b8d). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2167 } else if (arg -> ownedcxx . . $ structStackel#owned.) {
2168 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue.. adoptFromAmbiguousOwnercxx . . $ autovector#adoptFromAmbiguousOwner(bc17ed9a4b778f50). (arg -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector.);
2169 arg -> ownedcxx . . $ structStackel#owned. = false;
2170 } else {
2171 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). copy_VECcxx . . $ copy_VEC(d4415e68b25283a8). (argcxx . . $ constvectorview#constvectorview(eac9d6ec4c4bfecd). -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector.);
2172 }
2173 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.)
2174 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
2175 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0.0)
2176 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than or equal to 0.0.");
2177 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.)
2178 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
2179 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0.0)
2180 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than 0.0.");
2181 if (mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable.)
2182 *mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. =cxx . . $ constvector#`operator=`(73c689d4201df564). mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
2183 }
2184 break;
2185 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
2186 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
2187 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
2188 {
2189 if (arg -> whichcxx . . $ structStackel#which. != Stackel_NUMERIC_VECTORcxx . . $ `sys/Formula.h:48:10`! && arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2190 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a numeric vector, not ", arg -> whichText(), U".");
2191 if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2192 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespaceWithRanges_INTVECcxx . . $ splitByWhitespaceWithRanges_INTVEC(40f9f82be0ce91de). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2193 } else {
2194 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). raw_INTVECcxx . . $ raw_INTVEC(dab5d3ef28d6a25). (arg -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector..sizecxx . . $ vector#size.);
2195 for (integercxx . . $ integer# i = 1; i <= arg -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector..sizecxx . . $ vector#size.; i ++) {
2196 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] = Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (arg -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector. [cxx . . $ vector#`operator[]`(8a4599b8835d1ce1).i]);
2197 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i] == arg -> numericVector [i],
2198 U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", arg -> numericVector [i], U" but should be a whole number.");
2199 }
2200 }
2201 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.)
2202 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
2203 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0)
2204 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than or equal to 0.");
2205 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.)
2206 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
2207 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0)
2208 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than 0.");
2209 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable.)
2210 *mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. =cxx . . $ constvector#`operator=`(9741bbfc20e560ef). mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
2211 }
2212 break;
2213 case _kUiField_typecxx . . $ _kUiField_type#::REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_.:
2214 {
2215 if (arg -> whichcxx . . $ structStackel#which. != Stackel_NUMERIC_MATRIXcxx . . $ `sys/Formula.h:49:10`!)
2216 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a numeric matrix, not ", arg -> whichText(), U".");
2217 if (arg -> ownedcxx . . $ structStackel#owned.) {
2218 mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue.. adoptFromAmbiguousOwnercxx . . $ automatrix#adoptFromAmbiguousOwner(eed9513d24570b3d). (arg -> numericMatrixcxx . . $ structStackel#$anonymous_type_0#numericMatrix.);
2219 arg -> ownedcxx . . $ structStackel#owned. = false;
2220 } else {
2221 mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue. =cxx . . $ automatrix#`operator=`(a0f46581f260c488). copy_MATcxx . . $ copy_MAT(a392b09ce3fc3972). (argcxx . . $ constmatrixview#constmatrixview(eed9513d24570b3d). -> numericMatrixcxx . . $ structStackel#$anonymous_type_0#numericMatrix.);
2222 }
2223 if (mycxx . . $ `melder/melder.h:44:9`! numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable.)
2224 *mycxx . . $ `melder/melder.h:44:9`! numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable. =cxx . . $ constmatrix#`operator=`(10afdece15caa8a1). mycxx . . $ `melder/melder.h:44:9`! numericMatrixValuecxx . . $ structUiField#numericMatrixValue..getcxx . . $ automatrix#get(b2b81450b5bdda66).();
2225 }
2226 break;
2227 case _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
2228 {
2229 if (arg -> whichcxx . . $ structStackel#which. != Stackel_STRING_ARRAYcxx . . $ `sys/Formula.h:52:10`! && arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2230 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a string array, not ", arg -> whichText(), U".");
2231 if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2232 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitByWhitespace_STRVECcxx . . $ splitByWhitespace_STRVEC(d3c03a92d990d008). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2233 } else if (arg -> ownedcxx . . $ structStackel#owned.) {
2234 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue.. adoptFromAmbiguousOwnercxx . . $ _autostringautovector#adoptFromAmbiguousOwner(889d620ca03d505c). (arg -> stringArraycxx . . $ structStackel#$anonymous_type_0#stringArray.);
2235 arg -> ownedcxx . . $ structStackel#owned. = false;
2236 } else {
2237 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). copy_STRVECcxx . . $ copy_STRVEC(cfa8029879abedac). (argcxx . . $ _conststringvector#_conststringvector(93d9e701af42cb0d). -> stringArraycxx . . $ structStackel#$anonymous_type_0#stringArray.);
2238 }
2239 if (mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable.)
2240 *mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable. =cxx . . $ _conststringvector#`operator=`(42d0cafead7a246e). mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).();
2241 }
2242 break;
2243 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
2244 {
2245 if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2246 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"no") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"off")) {
2247 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2248 } else if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"yes") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), U"on")) {
2249 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 1;
2250 } else {
2251 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Boolean argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(),
2252 U"” can only be a number or one of the strings “yes” or “no”.");
2253 }
2254 } else if (arg -> whichcxx . . $ structStackel#which. == Stackel_NUMBERcxx . . $ `sys/Formula.h:46:10`!) {
2255 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = ( arg -> numbercxx . . $ structStackel#$anonymous_type_0#number. == 0.0 ? 0.0 : 1.0 );
2256 } else {
2257 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Boolean argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a number (0 or 1), not ", arg -> whichText(), U".");
2258 }
2259 if (mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable.)
2260 *mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2261 }
2262 break;
2263 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
2264 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
2265 {
2266 if (arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2267 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Option argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a string, not ", arg -> whichText(), U".");
2268 if (mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction.) {
2269 int value = mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2270 if (value == -1)
2271 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0; // zero
2272 else
2273 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).()) + mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.; // 1 or greater
2274 } else {
2275 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2276 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2277 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2278 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()))
2279 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2280 }
2281 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0) {
2282 /*
2283 Retry with different case.
2284 */
2285 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2286 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2287 if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()))
2288 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2289 }
2290 }
2291 }
2292 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0) {
2293 if (mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable.)
2294 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Option argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” cannot have the value “", arg -> getString(), U"”.");
2295 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.) {
2296 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).();
2297 return;
2298 }
2299 }
2300 if (mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable.)
2301 *mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable. = int (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.) - mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.;
2302 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2303 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
2304 }
2305 break;
2306 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
2307 {
2308 if (arg -> whichcxx . . $ structStackel#which. != Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!)
2309 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"List argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a string, not ", arg -> whichText(), U".");
2310 integercxx . . $ integer# i = 1;
2311 for (; i <= mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.; i ++)
2312 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(), mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]))
2313 break;
2314 if (i > mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.) {
2315 /*
2316 Not found. If the result should be only a number or only a string, it's an error.
2317 If the result should be both a number and a string, then the number can be 0 (signalling "not found")
2318 and the string provides a out-of-list alternative that could be translated to an existing one.
2319 */
2320 if (!! mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. != !! mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2321 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"List argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” cannot have the value “", arg -> getString(), U"”.");
2322 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2323 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2324 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).(); // FIXME: is the lifetime of arg long enough?
2325 } else {
2326 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2327 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
2328 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2329 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2330 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = (char32cxx . . $ char32# *) mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.]; // FIXME: const problem
2331 }
2332 }
2333 break;
2334 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
2335 {
2336 if (arg -> whichcxx . . $ structStackel#which. == Stackel_NUMBERcxx . . $ `sys/Formula.h:46:10`!) {
2337 if (arg -> numbercxx . . $ structStackel#$anonymous_type_0#number. < 0.0 || arg -> numbercxx . . $ structStackel#$anonymous_type_0#number. > 1.0)
2338 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Grey colour argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” has to lie between 0.0 and 1.0.");
2339 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.. redcxx . . $ MelderColour#red. = mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.. greencxx . . $ MelderColour#green. = mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.. bluecxx . . $ MelderColour#blue. = arg -> numbercxx . . $ structStackel#$anonymous_type_0#number.;
2340 } else if (arg -> whichcxx . . $ structStackel#which. == Stackel_STRINGcxx . . $ `sys/Formula.h:47:10`!) {
2341 autostring32cxx . . $ autostring32# string2 = Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (arg -> getStringcxx . . $ structStackel#getString(1912f6684645c851).());
2342 MelderColourcxx . . $ MelderColour# colour = MelderColour_fromColourNameOrRGBStringcxx . . $ MelderColour_fromColourNameOrRGBString(ddf3ca81f5326095). (string2.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2343 if (colour.validcxx . . $ MelderColour#valid(50ce9a9e25b4a850).())
2344 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). colour;
2345 else
2346 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot compute a colour from “", string2.get(), U"”.");
2347 } else if (arg -> whichcxx . . $ structStackel#which. == Stackel_NUMERIC_VECTORcxx . . $ `sys/Formula.h:48:10`!) {
2348 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColourcxx . . $ MelderColour# (argcxx . . $ constvector#constvector(eac9d6ec4c4bfecd). -> numericVectorcxx . . $ structStackel#$anonymous_type_0#numericVector.);
2349 } else
2350 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Colour argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a string or number or numeric vector, not ", arg -> whichText(), U".");
2351 if (mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable.)
2352 *mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.;
2353 }
2354 break;
2355 default:
2356 {
2357 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Unknown field type ", (int) mycxx . . $ `melder/melder.h:44:9`! type, U".");
2358 }
2359 }
2360 }
2361
2362 void UiForm_callcxx . . $ UiForm_call(ef7493db0e821287). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# narg, Stackelcxx . . $ Stackel# args, Interpretercxx . . $ Interpreter# interpreter) {
2363 integercxx . . $ integer# size = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields., iarg = 0;
2364 //while (size >= 1 && my field [size] -> type == _kUiField_type::LABEL_)
2365 // size --; // ignore trailing fields without a value
2366 for (integercxx . . $ integer# ifield = 1; ifield <= size; ifield ++) {
2367 if (_kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.))
2368 continue; // ignore non-trailing fields without a value
2369 iarg ++;
2370 if (iarg > narg)
2371 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Command requires more than the given ", narg, U" arguments: argument “", mycxx . . $ `melder/melder.h:44:9`! field [ifield] -> name.get(), U"” not given.");
2372 UiField_argToValuecxx . . $ UiField_argToValue(bc446ad30dee327a). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), & args [iarg], interpreter);
2373 }
2374 if (iarg < narg)
2375 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Command requires only ", iarg, U" arguments, not the ", narg, U" given.");
2376 mycxx . . $ `melder/melder.h:44:9`! okCallbackcxx . . $ structUiForm#okCallback. (me, 0, nullptr, nullptr, interpreter, nullptr, false, mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure., mycxx . . $ `melder/melder.h:44:9`! optionalEditorcxx . . $ structUiForm#optionalEditor.);
2377 }
2378
2379 /*
2380 DEPRECATED_2014 (i.e. remove in 2036)
2381 */
2382 static void UiField_stringToValuecxx . . $ UiField_stringToValue(83c72118beee8491). (UiFieldcxx . . $ UiField# me, conststring32cxx . . $ conststring32# string, Interpretercxx . . $ Interpreter# interpreter) {
2383 /*
2384 This belongs to the deprecated dots-based syntax described below at `UiForm_parseString`.
2385 This is included for backward compatibility (until 2036),
2386 but does not support newer expression types such as numeric vectors and matrices.
2387 */
2388 switch (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type.)
2389 {
2390 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
2391 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
2392 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
2393 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
2394 {
2395 if (str32spncxx . . $ str32spn(3d7336bffa454768). (string, U" \t") == Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (string))
2396 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” empty.");
2397 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (interpreter, string, & mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.);
2398 if (isundefcxx . . $ isundef(f8197d536af80c96). (mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.) && mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. != _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.)
2399 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” has the value “undefined”.");
2400 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. < 0.0)
2401 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” must be greater than or equal to 0.0.");
2402 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_. && mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue. <= 0.0)
2403 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” must be greater than 0.0.");
2404 if (mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable.)
2405 *mycxx . . $ `melder/melder.h:44:9`! realVariablecxx . . $ structUiField#realVariable. = mycxx . . $ `melder/melder.h:44:9`! realValuecxx . . $ structUiField#realValue.;
2406 }
2407 break;
2408 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
2409 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
2410 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
2411 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.: {
2412 if (str32spncxx . . $ str32spn(3d7336bffa454768). (string, U" \t") == Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (string))
2413 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” empty.");
2414 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. && (str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"All") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"Average"))) {
2415 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2416 } else if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. && (str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"Left") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"Mono"))) {
2417 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 1;
2418 } else if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. && (str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"Right") || str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, U"Stereo"))) {
2419 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 2;
2420 } else {
2421 double realValue;
2422 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (interpreter, string, & realValue);
2423 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (realValue);
2424 }
2425 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_. && mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. < 0)
2426 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a nonnegative whole number.");
2427 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_. && mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. < 1)
2428 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"“", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” should be a positive whole number.");
2429 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
2430 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2431 }
2432 break;
2433 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
2434 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
2435 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
2436 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
2437 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
2438 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
2439 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
2440 {
2441 mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (string);
2442 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2443 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); // BUG dangle
2444 }
2445 break;
2446 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
2447 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
2448 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
2449 {
2450 mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespace_VECcxx . . $ splitByWhitespace_VEC(be643ff064625b8d). (string);
2451 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.)
2452 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
2453 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0.0)
2454 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than or equal to 0.0.");
2455 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.)
2456 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..sizecxx . . $ autovector#size.; i ++)
2457 if (mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0.0)
2458 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! realVectorValue [i], U" but should be greater than 0.0.");
2459 if (mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable.)
2460 *mycxx . . $ `melder/melder.h:44:9`! realVectorVariablecxx . . $ structUiField#realVectorVariable. =cxx . . $ constvector#`operator=`(73c689d4201df564). mycxx . . $ `melder/melder.h:44:9`! realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
2461 }
2462 break;
2463 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
2464 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
2465 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
2466 {
2467 mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). splitByWhitespaceWithRanges_INTVECcxx . . $ splitByWhitespaceWithRanges_INTVEC(40f9f82be0ce91de). (string);
2468 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.)
2469 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
2470 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] < 0)
2471 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than or equal to 0.");
2472 if (mycxx . . $ `melder/melder.h:44:9`! typecxx . . $ structUiField#type. == _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.)
2473 for (integercxx . . $ integer# i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..sizecxx . . $ autovector#size.; i ++)
2474 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).i] <= 0)
2475 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Element ", i, U" of vector “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” is ", mycxx . . $ `melder/melder.h:44:9`! integerVectorValue [i], U" but should be greater than 0.");
2476 if (mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable.)
2477 *mycxx . . $ `melder/melder.h:44:9`! integerVectorVariablecxx . . $ structUiField#integerVectorVariable. =cxx . . $ constvector#`operator=`(9741bbfc20e560ef). mycxx . . $ `melder/melder.h:44:9`! integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
2478 }
2479 break;
2480 case _kUiField_typecxx . . $ _kUiField_type#::STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_.:
2481 mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). splitByWhitespace_STRVECcxx . . $ splitByWhitespace_STRVEC(d3c03a92d990d008). (string);
2482 if (mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable.)
2483 *mycxx . . $ `melder/melder.h:44:9`! stringArrayVariablecxx . . $ structUiField#stringArrayVariable. =cxx . . $ _conststringvector#`operator=`(42d0cafead7a246e). mycxx . . $ `melder/melder.h:44:9`! stringArrayValuecxx . . $ structUiField#stringArrayValue..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).();
2484 break;
2485 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
2486 {
2487 if (! string [0])
2488 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Empty argument for toggle button.");
2489 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = string [0] == U'1' || string [0] == U'y' || string [0] == U'Y' ||
2490 string [0] == U't' || string [0] == U'T';
2491 if (mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable.)
2492 *mycxx . . $ `melder/melder.h:44:9`! boolVariablecxx . . $ structUiField#boolVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2493 }
2494 break;
2495 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
2496 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
2497 {
2498 if (mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction.) {
2499 int value = mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. (string);
2500 if (value == -1)
2501 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0; // zero
2502 else
2503 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = mycxx . . $ `melder/melder.h:44:9`! getValueFunctioncxx . . $ structUiField#getValueFunction. (string) + mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.; // 1 or greater
2504 } else {
2505 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2506 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2507 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2508 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()))
2509 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2510 }
2511 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0) {
2512 /*
2513 Retry with different case.
2514 */
2515 for (int i = 1; i <= mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2516 UiOptioncxx . . $ UiOption# b = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2517 if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (string, b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()))
2518 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2519 }
2520 }
2521 }
2522 if (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. == 0)
2523 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Field “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” must not have the value “", string, U"”.");
2524 if (mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable.)
2525 *mycxx . . $ `melder/melder.h:44:9`! intVariablecxx . . $ structUiField#intVariable. = int (mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.) - mycxx . . $ `melder/melder.h:44:9`! subtractcxx . . $ structUiField#subtract.;
2526 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2527 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = mycxx . . $ `melder/melder.h:44:9`! optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.] -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
2528 }
2529 break;
2530 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
2531 {
2532 integercxx . . $ integer# i = 1;
2533 for (; i <= mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.; i ++)
2534 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (string, mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i]))
2535 break;
2536 if (i > mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.) {
2537 /*
2538 Not found. If the result should be only a number or only a string, it's an error.
2539 If the result should be both a number and a string, then the number can be 0 (signalling "not found")
2540 and the string provides a out-of-list alternative that could be translated to an existing one.
2541 */
2542 if (!! mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. != !! mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2543 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"List argument “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"” cannot have the value “", string, U"”.");
2544 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = 0;
2545 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2546 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = string;
2547 } else {
2548 mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue. = i;
2549 if (mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable.)
2550 *mycxx . . $ `melder/melder.h:44:9`! integerVariablecxx . . $ structUiField#integerVariable. = mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.;
2551 if (mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable.)
2552 *mycxx . . $ `melder/melder.h:44:9`! stringVariablecxx . . $ structUiField#stringVariable. = (char32cxx . . $ char32# *) mycxx . . $ `melder/melder.h:44:9`! stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).mycxx . . $ `melder/melder.h:44:9`! integerValuecxx . . $ structUiField#integerValue.]; // FIXME: const problem
2553 }
2554 }
2555 break;
2556 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
2557 {
2558 autostring32cxx . . $ autostring32# string2 = Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (string);
2559 MelderColourcxx . . $ MelderColour# colour = MelderColour_fromColourNameOrRGBStringcxx . . $ MelderColour_fromColourNameOrRGBString(ddf3ca81f5326095). (string2.getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2560 if (colour.validcxx . . $ MelderColour#valid(50ce9a9e25b4a850).()) {
2561 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). colour;
2562 } else {
2563 try {
2564 double greyValue;
2565 Interpreter_numericExpressioncxx . . $ Interpreter_numericExpression(8639512facf48b76). (interpreter, string2.getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), & greyValue);
2566 mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColourcxx . . $ MelderColour# (greyValue);
2567 } catch (MelderErrorcxx . . $ MelderError#) {
2568 Melder_clearErrorcxx . . $ Melder_clearError(49f6e7a06ebc5aa8). ();
2569 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot compute a colour from “", string2.get(), U"”.");
2570 }
2571 }
2572 if (mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable.)
2573 *mycxx . . $ `melder/melder.h:44:9`! colourVariablecxx . . $ structUiField#colourVariable. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). mycxx . . $ `melder/melder.h:44:9`! colourValuecxx . . $ structUiField#colourValue.;
2574 }
2575 break;
2576 default:
2577 {
2578 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Unknown field type ", (int) mycxx . . $ `melder/melder.h:44:9`! type, U".");
2579 }
2580 }
2581 }
2582
2583 /*
2584 DEPRECATED_2014 (i.e. remove in 2036)
2585 */
2586 void UiForm_parseStringcxx . . $ UiForm_parseString(530de004c8191cd7). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# arguments, Interpretercxx . . $ Interpreter# optionalInterpreter) {
2587 /*
2588 This implements the dots-based scripting style
2589 Create Sound from formula... sineWithNoise 1 0 1 44100 0.5 * sin (2*pi*377*x)
2590 This was deprecated with the advent of the colon-based scripting style
2591 Create Sound from formula: "sineWithNoise", 1, 0, 1, 44100, "0.5 * sin (2*pi*377*x)"
2592 or
2593 Create Sound from formula: "sineWithNoise", 1, 0, 1, 44100, ~ 0.5 * sin (2*pi*377*x)
2594 in 2014, i.e. 22 years after Praat started.
2595 If we want to conservatively support old scripts, we will have
2596 to continue to support the dots-based scripting style until 2036.
2597 */
2598 int size = mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.;
2599 while (size >= 1 && _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [size] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.))
2600 size --; // ignore trailing fields without a value
2601 for (int ifield = 1; ifield < size; ifield ++) {
2602 static char32cxx . . $ char32# stringValue [3000];
2603 int ichar = 0;
2604 if (_kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). typecxx . . $ structUiField#type.))
2605 continue; // ignore non-trailing fields without a value
2606 Melder_skipHorizontalOrVerticalSpacecxx . . $ Melder_skipHorizontalOrVerticalSpace(1babf4dbe7380927). (& arguments); // go to next argument
2607 /*
2608 The argument is everything up to the next space, or, if that starts with a double quote,
2609 everything between this quote and the matching double quote;
2610 in this case, the argument can represent a double quote by a sequence of two double quotes.
2611 Example: the string
2612 "I said ""hello"""
2613 will be passed to the dialog as a single argument containing the text
2614 I said "hello"
2615 */
2616 if (*arguments == U'"') {
2617 arguments ++; // do not include leading double quote
2618 for (;;) {
2619 if (*arguments == U'\0')
2620 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Missing matching quote.");
2621 if (*arguments == U'"' && * ++ arguments != U'"')
2622 break; // remember second quote
2623 stringValue [ichar ++] = *arguments ++;
2624 }
2625 } else {
2626 while (*arguments != U' ' && *arguments != U'\t' && *arguments != U'\0')
2627 stringValue [ichar ++] = *arguments ++;
2628 }
2629 stringValue [ichar] = U'\0'; // trailing null character
2630 try {
2631 UiField_stringToValuecxx . . $ UiField_stringToValue(83c72118beee8491). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), stringValue, optionalInterpreter);
2632 } catch (MelderErrorcxx . . $ MelderError#) {
2633 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Don't understand contents of field “", mycxx . . $ `melder/melder.h:44:9`! field [ifield] -> name.get(), U"”.");
2634 }
2635 }
2636 /*
2637 The last item is handled separately, because it consists of the rest of the line.
2638 Leading spaces are skipped, but trailing spaces are included.
2639 */
2640 if (size > 0) {
2641 Melder_skipHorizontalOrVerticalSpacecxx . . $ Melder_skipHorizontalOrVerticalSpace(1babf4dbe7380927). (& arguments); // rid leading spaces
2642 try {
2643 UiField_stringToValuecxx . . $ UiField_stringToValue(83c72118beee8491). (mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [size].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), arguments, optionalInterpreter);
2644 } catch (MelderErrorcxx . . $ MelderError#) {
2645 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Don't understand contents of field “", mycxx . . $ `melder/melder.h:44:9`! field [size] -> name.get(), U"”.");
2646 }
2647 }
2648 mycxx . . $ `melder/melder.h:44:9`! okCallbackcxx . . $ structUiForm#okCallback. (me, 0, nullptr, nullptr, optionalInterpreter, nullptr, false, mycxx . . $ `melder/melder.h:44:9`! buttonClosurecxx . . $ structUiForm#buttonClosure., mycxx . . $ `melder/melder.h:44:9`! optionalEditorcxx . . $ structUiForm#optionalEditor.);
2649 }
2650
2651 void UiForm_parseStringEcxx . . $ UiForm_parseStringE(9e24d991f2a74a22). (EditorCommandcxx . . $ EditorCommand# cmd, integercxx . . $ integer# narg, Stackelcxx . . $ Stackel# args, conststring32cxx . . $ conststring32# arguments, Interpretercxx . . $ Interpreter# interpreter) {
2652 if (args)
2653 UiForm_callcxx . . $ UiForm_call(ef7493db0e821287). (cmd -> d_uiformcxx . . $ structEditorCommand#d_uiform..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), narg, args, interpreter);
2654 else
2655 UiForm_parseStringcxx . . $ UiForm_parseString(530de004c8191cd7). (cmd -> d_uiformcxx . . $ structEditorCommand#d_uiform..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), arguments, interpreter);
2656 }
2657
2658 static void fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# dia) {
2659 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Wrong field in command window “", dia -> name.get(), U"”.");
2660 }
2661
2662 void UiForm_setRealcxx . . $ UiForm_setReal(a22e7040ac9461fc). (UiFormcxx . . $ UiForm# me, double *p_variable, double value) {
2663 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2664 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2665 if (field -> realVariablecxx . . $ structUiField#realVariable. == p_variable) {
2666 switch (field -> typecxx . . $ structUiField#type.)
2667 {
2668 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
2669 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
2670 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
2671 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
2672 {
2673 if (value == Melder_atofcxx . . $ Melder_atof(13d725aae188c0cd). (field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).())) {
2674 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2675 } else {
2676 char32cxx . . $ char32# s [40];
2677 str32cpycxx . . $ str32cpy(6ab934322573b179). (s, Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (value));
2678 /*
2679 If the default is overtly real, the shown value should be as well.
2680 */
2681 if ((str32chrcxx . . $ str32chr(328a9ede0fba853a). (field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U'.') || str32chrcxx . . $ str32chr(328a9ede0fba853a). (field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(), U'e')) &&
2682 ! (str32chrcxx . . $ str32chr(328a9ede0fba853a). (s, U'.') || str32chrcxx . . $ str32chr(328a9ede0fba853a). (s, U'e')))
2683 {
2684 str32cpycxx . . $ str32cpy(6ab934322573b179). (s + Melder_lengthcxx . . $ Melder_length(3fae411214b133ad). (s), U".0");
2685 }
2686 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., s);
2687 }
2688 }
2689 break;
2690 default:
2691 {
2692 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2693 }
2694 }
2695 return;
2696 }
2697 }
2698 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Real field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2699 }
2700
2701 void UiForm_setRealAsStringcxx . . $ UiForm_setRealAsString(e02283e21b9d129c). (UiFormcxx . . $ UiForm# me, double *p_variable, conststring32cxx . . $ conststring32# stringValue) {
2702 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2703 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2704 if (field -> realVariablecxx . . $ structUiField#realVariable. == p_variable) {
2705 switch (field -> typecxx . . $ structUiField#type.)
2706 {
2707 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
2708 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
2709 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
2710 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
2711 {
2712 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., stringValue);
2713 }
2714 break;
2715 default:
2716 {
2717 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2718 }
2719 }
2720 return;
2721 }
2722 }
2723 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Real field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2724 }
2725
2726 void UiForm_setIntegercxx . . $ UiForm_setInteger(cc02131c4de7319e). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_variable, integercxx . . $ integer# value) {
2727 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2728 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2729 if (field -> integerVariablecxx . . $ structUiField#integerVariable. == p_variable) {
2730 switch (field -> typecxx . . $ structUiField#type.)
2731 {
2732 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
2733 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
2734 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
2735 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
2736 {
2737 if (value == Melder_atoicxx . . $ Melder_atoi(c94c67ff4219bf83). (field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).())) {
2738 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., field -> stringDefaultValuecxx . . $ structUiField#stringDefaultValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
2739 } else {
2740 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., Melder_integercxx . . $ Melder_integer(7b348ebc2004441d). (value));
2741 }
2742 }
2743 break;
2744 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
2745 {
2746 if (value < 1 || value > field -> stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.)
2747 value = 1; // guard against incorrect prefs file
2748 GuiList_selectItemcxx . . $ GuiList_selectItem(f9b5f8b1da8fd2dd). (field -> listcxx . . $ structUiField#list., value);
2749 }
2750 break;
2751 default:
2752 {
2753 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2754 }
2755 }
2756 return;
2757 }
2758 }
2759 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Integer field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2760 }
2761
2762 void UiForm_setIntegerAsStringcxx . . $ UiForm_setIntegerAsString(79a3598602035dc5). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_variable, conststring32cxx . . $ conststring32# stringValue /* cattable */) {
2763 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2764 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2765 if (field -> integerVariablecxx . . $ structUiField#integerVariable. == p_variable) {
2766 switch (field -> typecxx . . $ structUiField#type.)
2767 {
2768 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
2769 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
2770 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
2771 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
2772 {
2773 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., stringValue);
2774 }
2775 break;
2776 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
2777 {
2778 integercxx . . $ integer# i = 1;
2779 for (; i <= field -> stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.; i ++)
2780 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (stringValue, field -> stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i])) break;
2781 if (i > field -> stringscxx . . $ structUiField#strings..sizecxx . . $ _conststringvector#size.)
2782 i = 1; // guard against incorrect prefs file
2783 GuiList_selectItemcxx . . $ GuiList_selectItem(f9b5f8b1da8fd2dd). (field -> listcxx . . $ structUiField#list., i);
2784 }
2785 break;
2786 default:
2787 {
2788 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2789 }
2790 }
2791 return;
2792 }
2793 }
2794 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Integer field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2795 }
2796
2797 void UiForm_setBooleancxx . . $ UiForm_setBoolean(68cdfc54e8c7e2d2). (UiFormcxx . . $ UiForm# me, bool *p_variable, bool value) {
2798 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2799 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2800 if (field -> boolVariablecxx . . $ structUiField#boolVariable. == p_variable) {
2801 switch (field -> typecxx . . $ structUiField#type.)
2802 {
2803 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
2804 {
2805 GuiCheckButton_setValuecxx . . $ GuiCheckButton_setValue(7c4273eb49c3ef26). (field -> checkButtoncxx . . $ structUiField#checkButton., value);
2806 }
2807 break;
2808 default:
2809 {
2810 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2811 }
2812 }
2813 return;
2814 }
2815 }
2816 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Boolean field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2817 }
2818
2819 void UiForm_setOptioncxx . . $ UiForm_setOption(cd5a6b0802c2ad1d). (UiFormcxx . . $ UiForm# me, int *p_variable, int value) {
2820 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2821 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2822 if (field -> intVariablecxx . . $ structUiField#intVariable. == p_variable) {
2823 switch (field -> typecxx . . $ structUiField#type.)
2824 {
2825 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
2826 {
2827 if (value < 1 || value > field -> optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.)
2828 value = 1; // guard against incorrect prefs file
2829 UiOptioncxx . . $ UiOption# option = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).value];
2830 GuiRadioButton_setcxx . . $ GuiRadioButton_set(669e3d212ae3e4fb). (option -> radioButtoncxx . . $ structUiOption#radioButton.);
2831 }
2832 break;
2833 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
2834 {
2835 if (value < 1 || value > field -> optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.)
2836 value = 1; // guard against incorrect prefs file
2837 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (field -> optionMenucxx . . $ structUiField#optionMenu., value);
2838 }
2839 break;
2840 default:
2841 {
2842 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2843 }
2844 }
2845 return;
2846 }
2847 }
2848 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Option field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2849 }
2850
2851 void UiForm_setOptionAsStringcxx . . $ UiForm_setOptionAsString(bf3e08a1450cc1f7). (UiFormcxx . . $ UiForm# me, int *p_variable, conststring32cxx . . $ conststring32# stringValue) {
2852 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2853 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2854 if (field -> intVariablecxx . . $ structUiField#intVariable. == p_variable) {
2855 switch (field -> typecxx . . $ structUiField#type.)
2856 {
2857 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
2858 {
2859 for (int i = 1; i <= field -> optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2860 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2861 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (stringValue, b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).())) {
2862 GuiRadioButton_setcxx . . $ GuiRadioButton_set(669e3d212ae3e4fb). (b -> radioButtoncxx . . $ structUiOption#radioButton.);
2863 }
2864 }
2865 /* If not found: do nothing (guard against incorrect prefs file). */
2866 }
2867 break;
2868 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
2869 {
2870 int optionValue = 0;
2871 for (int i = 1; i <= field -> optionscxx . . $ structUiField#options..sizecxx . . $ CollectionOf#size.; i ++) {
2872 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).i];
2873 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (stringValue, b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).())) {
2874 optionValue = i;
2875 break;
2876 }
2877 }
2878 GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (field -> optionMenucxx . . $ structUiField#optionMenu., optionValue);
2879 /* If not found: do nothing (guard against incorrect prefs file). */
2880 }
2881 break;
2882 default:
2883 {
2884 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2885 }
2886 }
2887 return;
2888 }
2889 }
2890 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Option field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2891 }
2892
2893 void UiForm_setStringcxx . . $ UiForm_setString(d49c239820409ff). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *p_variable, conststring32cxx . . $ conststring32# value /* cattable */) {
2894 if (! value) value = U""; // accept null strings
2895 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2896 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2897 if (field -> stringVariablecxx . . $ structUiField#stringVariable. == p_variable) {
2898 switch (field -> typecxx . . $ structUiField#type.)
2899 {
2900 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
2901 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
2902 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
2903 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
2904 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
2905 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
2906 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
2907 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
2908 {
2909 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., value);
2910 }
2911 break;
2912 case _kUiField_typecxx . . $ _kUiField_type#::HEADING_cxx . . $ _kUiField_type#HEADING_.:
2913 case _kUiField_typecxx . . $ _kUiField_type#::COMMENT_cxx . . $ _kUiField_type#COMMENT_.:
2914 case _kUiField_typecxx . . $ _kUiField_type#::CAPTION_cxx . . $ _kUiField_type#CAPTION_.:
2915 {
2916 GuiLabel_setTextcxx . . $ GuiLabel_setText(8fd1a6a47d1f7702). (field -> labelcxx . . $ structUiField#label., value);
2917 }
2918 break;
2919 default:
2920 {
2921 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2922 }
2923 }
2924 return;
2925 }
2926 }
2927 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Text field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2928 }
2929
2930 void UiForm_setListcxx . . $ UiForm_setList(374b0975054fab19). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_integerVariable, conststring32cxx . . $ conststring32# *p_stringVariable,
2931 constSTRVECcxx . . $ constSTRVEC# strings, integercxx . . $ integer# defaultValue) {
2932 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2933 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2934 if (field -> integerVariablecxx . . $ structUiField#integerVariable. == p_integerVariable || field -> stringVariablecxx . . $ structUiField#stringVariable. == p_stringVariable) {
2935 switch (field -> typecxx . . $ structUiField#type.)
2936 {
2937 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
2938 {
2939 field -> stringscxx . . $ structUiField#strings. =cxx . . $ _conststringvector#`operator=`(90af58159cab4862). strings;
2940 GuiList_deleteAllItemscxx . . $ GuiList_deleteAllItems(bb293b59cc37ad76). (field -> listcxx . . $ structUiField#list.);
2941 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++)
2942 GuiList_insertItemcxx . . $ GuiList_insertItem(896610c612ff86cf). (field -> listcxx . . $ structUiField#list., strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], 0);
2943
2944 integercxx . . $ integer# currentlySelectedStringIndex = defaultValue;
2945 if (field -> previouslySelectedListStringcxx . . $ structUiField#previouslySelectedListString.)
2946 for (integercxx . . $ integer# i = 1; i <= strings.sizecxx . . $ _conststringvector#size.; i ++) {
2947 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (strings [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).i], field -> previouslySelectedListStringcxx . . $ structUiField#previouslySelectedListString..getcxx . . $ _autostring#get(5a2a78a048fb49a8).())) {
2948 currentlySelectedStringIndex = i;
2949 break;
2950 }
2951 }
2952
2953 if (currentlySelectedStringIndex < 1 || currentlySelectedStringIndex > strings.sizecxx . . $ _conststringvector#size.)
2954 currentlySelectedStringIndex = 1;
2955 if (strings.sizecxx . . $ _conststringvector#size. > 0)
2956 GuiList_selectItemcxx . . $ GuiList_selectItem(f9b5f8b1da8fd2dd). (field -> listcxx . . $ structUiField#list., currentlySelectedStringIndex);
2957 }
2958 break;
2959 default:
2960 {
2961 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2962 }
2963 }
2964 return;
2965 }
2966 }
2967 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"List field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2968 }
2969
2970 void UiForm_setColourAsGreyValuecxx . . $ UiForm_setColourAsGreyValue(6be4d47026b8859a). (UiFormcxx . . $ UiForm# me, MelderColourcxx . . $ MelderColour# *p_variable, double greyValue) {
2971 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
2972 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2973 if (field -> colourVariablecxx . . $ structUiField#colourVariable. == p_variable) {
2974 switch (field -> typecxx . . $ structUiField#type.)
2975 {
2976 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
2977 {
2978 GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (field -> textcxx . . $ structUiField#text., Melder_doublecxx . . $ Melder_double(f05d861d9dbec9b2). (greyValue));
2979 }
2980 break;
2981 default:
2982 {
2983 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
2984 }
2985 }
2986 return;
2987 }
2988 }
2989 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"Colour field not found in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
2990 }
2991
2992 static UiFieldcxx . . $ UiField# findFieldcxx . . $ findField(36ce774e5b881e33). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
2993 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++)
2994 if (str32equcxx . . $ `melder/melder_str32.h:122:9`! (fieldName, mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield] ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()))
2995 return mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
2996 return nullptr;
2997 }
2998
2999 static UiFieldcxx . . $ UiField# findField_checkcxx . . $ findField_check(36ce774e5b881e33). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3000 UiFieldcxx . . $ UiField# result = findFieldcxx . . $ findField(36ce774e5b881e33). (me, fieldName);
3001 if (! result)
3002 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot find field “", fieldName, U"” in form.\n"
3003 U"The script may have changed while the form was open.\n"
3004 U"Please click Cancel in the form and try again.");
3005 return result;
3006 }
3007
3008 double UiForm_getReal_checkcxx . . $ UiForm_getReal_check(90f0f90face616f6). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3009 UiFieldcxx . . $ UiField# field = findField_checkcxx . . $ findField_check(36ce774e5b881e33). (me, fieldName);
3010 switch (field -> typecxx . . $ structUiField#type.)
3011 {
3012 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
3013 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
3014 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
3015 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
3016 {
3017 return field -> realValuecxx . . $ structUiField#realValue.;
3018 }
3019 break;
3020 default:
3021 {
3022 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot find a real value in field “", fieldName, U"” in the form.\n"
3023 U"The script may have changed while the form was open.\n"
3024 U"Please click Cancel in the form and try again.");
3025 }
3026 }
3027 return 0.0;
3028 }
3029
3030 integercxx . . $ integer# UiForm_getIntegercxx . . $ UiForm_getInteger(a2a8d8679a0481d3). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3031 UiFieldcxx . . $ UiField# field = findFieldcxx . . $ findField(36ce774e5b881e33). (me, fieldName);
3032 if (! field)
3033 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"(UiForm_getInteger:) No field “", fieldName, U"” in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
3034 switch (field -> typecxx . . $ structUiField#type.)
3035 {
3036 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
3037 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
3038 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
3039 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
3040 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
3041 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
3042 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
3043 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
3044 {
3045 return field -> integerValuecxx . . $ structUiField#integerValue.;
3046 }
3047 break;
3048 default:
3049 {
3050 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
3051 }
3052 }
3053 return 0;
3054 }
3055
3056 integercxx . . $ integer# UiForm_getInteger_checkcxx . . $ UiForm_getInteger_check(a2a8d8679a0481d3). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3057 UiFieldcxx . . $ UiField# field = findField_checkcxx . . $ findField_check(36ce774e5b881e33). (me, fieldName);
3058 switch (field -> typecxx . . $ structUiField#type.)
3059 {
3060 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
3061 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
3062 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
3063 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
3064 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
3065 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
3066 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
3067 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
3068 {
3069 return field -> integerValuecxx . . $ structUiField#integerValue.;
3070 }
3071 break;
3072 default:
3073 {
3074 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot find an integer value in field “", fieldName, U"” in the form.\n"
3075 U"The script may have changed while the form was open.\n"
3076 U"Please click Cancel in the form and try again.");
3077 }
3078 }
3079 return 0;
3080 }
3081
3082 char32cxx . . $ char32# * UiForm_getStringcxx . . $ UiForm_getString(dbfe1f22119c140b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3083 UiFieldcxx . . $ UiField# field = findFieldcxx . . $ findField(36ce774e5b881e33). (me, fieldName);
3084 if (! field)
3085 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"(UiForm_getString:) No field “", fieldName, U"” in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
3086 switch (field -> typecxx . . $ structUiField#type.)
3087 {
3088 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
3089 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
3090 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
3091 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
3092 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
3093 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
3094 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
3095 {
3096 return field -> stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); // BUG dangle
3097 }
3098 break;
3099 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
3100 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
3101 {
3102 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).field -> integerValuecxx . . $ structUiField#integerValue.];
3103 return b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
3104 }
3105 break;
3106 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
3107 {
3108 return (char32cxx . . $ char32# *) field -> stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).field -> integerValuecxx . . $ structUiField#integerValue.];
3109 }
3110 break;
3111 default:
3112 {
3113 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
3114 }
3115 }
3116 return nullptr;
3117 }
3118
3119 char32cxx . . $ char32# * UiForm_getString_checkcxx . . $ UiForm_getString_check(dbfe1f22119c140b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3120 UiFieldcxx . . $ UiField# field = findField_checkcxx . . $ findField_check(36ce774e5b881e33). (me, fieldName);
3121 switch (field -> typecxx . . $ structUiField#type.)
3122 {
3123 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
3124 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
3125 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
3126 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
3127 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
3128 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
3129 {
3130 return field -> stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
3131 }
3132 break;
3133 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
3134 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
3135 {
3136 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).field -> integerValuecxx . . $ structUiField#integerValue.];
3137 return b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).();
3138 }
3139 break;
3140 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
3141 {
3142 return (char32cxx . . $ char32# *) field -> stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).field -> integerValuecxx . . $ structUiField#integerValue.];
3143 }
3144 break;
3145 default:
3146 {
3147 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot find a string in field “", fieldName, U"” in the form.\n"
3148 U"The script may have changed while the form was open.\n"
3149 U"Please click Cancel in the form and try again.");
3150 }
3151 }
3152 return nullptr;
3153 }
3154
3155 VECcxx . . $ VEC# UiForm_getRealVectorcxx . . $ UiForm_getRealVector(c0137ef95408d49b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3156 UiFieldcxx . . $ UiField# field = findFieldcxx . . $ findField(36ce774e5b881e33). (me, fieldName);
3157 if (! field)
3158 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"(UiForm_getRealVector:) No field “", fieldName, U"” in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
3159 switch (field -> typecxx . . $ structUiField#type.)
3160 {
3161 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
3162 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
3163 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
3164 {
3165 return field -> realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
3166 }
3167 break;
3168 default:
3169 {
3170 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
3171 }
3172 }
3173 return VECcxx . . $ vector#vector(49f6e7a06ebc5aa8).();
3174 }
3175
3176 INTVECcxx . . $ INTVEC# UiForm_getIntegerVectorcxx . . $ UiForm_getIntegerVector(95a73fa817562995). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3177 UiFieldcxx . . $ UiField# field = findFieldcxx . . $ findField(36ce774e5b881e33). (me, fieldName);
3178 if (! field)
3179 Melder_crashcxx . . $ `melder/melder_error.h:98:9`! (U"(UiForm_getIntegerVector:) No field “", fieldName, U"” in command window “", mycxx . . $ `melder/melder.h:44:9`! name.get(), U"”.");
3180 switch (field -> typecxx . . $ structUiField#type.)
3181 {
3182 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
3183 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
3184 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
3185 {
3186 return field -> integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).();
3187 }
3188 break;
3189 default:
3190 {
3191 fatalFieldcxx . . $ fatalField(b4388889c5fb10c0). (me);
3192 }
3193 }
3194 return INTVECcxx . . $ vector#vector(49f6e7a06ebc5aa8).();
3195 }
3196
3197 MelderColourcxx . . $ MelderColour# UiForm_getColour_checkcxx . . $ UiForm_getColour_check(3a49b9f8fb3daf52). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName) {
3198 UiFieldcxx . . $ UiField# field = findField_checkcxx . . $ findField_check(36ce774e5b881e33). (me, fieldName);
3199 switch (field -> typecxx . . $ structUiField#type.)
3200 {
3201 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.: {
3202 return field -> colourValuecxx . . $ structUiField#colourValue.;
3203 }
3204 break;
3205 default:
3206 {
3207 Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Cannot find a colour value in field “", fieldName, U"” in the form.\n"
3208 U"The script may have changed while the form was open.\n"
3209 U"Please click Cancel in the form and try again.");
3210 }
3211 }
3212 return Melder_BLACKcxx . . $ Melder_BLACK.;
3213 }
3214
3215 void UiForm_Interpreter_addVariablescxx . . $ UiForm_Interpreter_addVariables(16bc4cf5fc9b4102). (UiFormcxx . . $ UiForm# me, Interpretercxx . . $ Interpreter# interpreter) {
3216 static MelderStringcxx . . $ MelderString# lowerCaseFieldName;
3217 for (int ifield = 1; ifield <= mycxx . . $ `melder/melder.h:44:9`! numberOfFieldscxx . . $ structUiForm#numberOfFields.; ifield ++) {
3218 UiFieldcxx . . $ UiField# field = mycxx . . $ `melder/melder.h:44:9`! fieldcxx . . $ structUiForm#field. [ifield].getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
3219 MelderString_copycxx . . $ MelderString_copy(65be51a793e0ff96). (& lowerCaseFieldName, field -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
3220 /*
3221 Change e.g. "Number of people" to "number_of_people".
3222 */
3223 lowerCaseFieldName.stringcxx . . $ MelderString#string. [0] = Melder_toLowerCasecxx . . $ Melder_toLowerCase(cd1afca5b9692c51). (lowerCaseFieldName.stringcxx . . $ MelderString#string. [0]);
3224 for (char32cxx . . $ char32# *p = & lowerCaseFieldName.stringcxx . . $ MelderString#string. [0]; *p != U'\0'; p ++) {
3225 if (Melder_isHorizontalSpacecxx . . $ Melder_isHorizontalSpace(b8d0204ce8416907). (*p))
3226 *p = U'_';
3227 }
3228 switch (field -> typecxx . . $ structUiField#type.)
3229 {
3230 case _kUiField_typecxx . . $ _kUiField_type#::REAL_cxx . . $ _kUiField_type#REAL_.:
3231 case _kUiField_typecxx . . $ _kUiField_type#::REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_.:
3232 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_.:
3233 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVE_cxx . . $ _kUiField_type#POSITIVE_.:
3234 {
3235 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3236 var -> numericValuecxx . . $ structInterpreterVariable#numericValue. = field -> realValuecxx . . $ structUiField#realValue.;
3237 }
3238 break;
3239 case _kUiField_typecxx . . $ _kUiField_type#::INTEGER_cxx . . $ _kUiField_type#INTEGER_.:
3240 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0_cxx . . $ _kUiField_type#NATURAL0_.:
3241 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1_cxx . . $ _kUiField_type#NATURAL1_.:
3242 case _kUiField_typecxx . . $ _kUiField_type#::CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.:
3243 case _kUiField_typecxx . . $ _kUiField_type#::BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_.:
3244 {
3245 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3246 var -> numericValuecxx . . $ structInterpreterVariable#numericValue. = field -> integerValuecxx . . $ structUiField#integerValue.;
3247 }
3248 break;
3249 case _kUiField_typecxx . . $ _kUiField_type#::CHOICE_cxx . . $ _kUiField_type#CHOICE_.:
3250 case _kUiField_typecxx . . $ _kUiField_type#::OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_.:
3251 {
3252 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3253 var -> numericValuecxx . . $ structInterpreterVariable#numericValue. = field -> integerValuecxx . . $ structUiField#integerValue.;
3254 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& lowerCaseFieldName, U'$');
3255 var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3256 UiOptioncxx . . $ UiOption# b = field -> optionscxx . . $ structUiField#options..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).field -> integerValuecxx . . $ structUiField#integerValue.];
3257 var -> stringValuecxx . . $ structInterpreterVariable#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (b -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
3258 }
3259 break;
3260 case _kUiField_typecxx . . $ _kUiField_type#::LIST_cxx . . $ _kUiField_type#LIST_.:
3261 {
3262 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3263 var -> numericValuecxx . . $ structInterpreterVariable#numericValue. = field -> integerValuecxx . . $ structUiField#integerValue.;
3264 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& lowerCaseFieldName, U'$');
3265 var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3266 var -> stringValuecxx . . $ structInterpreterVariable#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (field -> stringscxx . . $ structUiField#strings. [cxx . . $ _conststringvector#`operator[]`(2065423e0524e64a).field -> integerValuecxx . . $ structUiField#integerValue.]);
3267 }
3268 break;
3269 case _kUiField_typecxx . . $ _kUiField_type#::WORD_cxx . . $ _kUiField_type#WORD_.:
3270 case _kUiField_typecxx . . $ _kUiField_type#::SENTENCE_cxx . . $ _kUiField_type#SENTENCE_.:
3271 case _kUiField_typecxx . . $ _kUiField_type#::TEXT_cxx . . $ _kUiField_type#TEXT_.:
3272 case _kUiField_typecxx . . $ _kUiField_type#::FORMULA_cxx . . $ _kUiField_type#FORMULA_.:
3273 case _kUiField_typecxx . . $ _kUiField_type#::INFILE_cxx . . $ _kUiField_type#INFILE_.:
3274 case _kUiField_typecxx . . $ _kUiField_type#::OUTFILE_cxx . . $ _kUiField_type#OUTFILE_.:
3275 case _kUiField_typecxx . . $ _kUiField_type#::FOLDER_cxx . . $ _kUiField_type#FOLDER_.:
3276 {
3277 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& lowerCaseFieldName, U'$');
3278 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3279 var -> stringValuecxx . . $ structInterpreterVariable#stringValue. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (field -> stringValuecxx . . $ structUiField#stringValue..getcxx . . $ _autostring#get(5a2a78a048fb49a8).());
3280 }
3281 break;
3282 case _kUiField_typecxx . . $ _kUiField_type#::REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_.:
3283 case _kUiField_typecxx . . $ _kUiField_type#::NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_.:
3284 case _kUiField_typecxx . . $ _kUiField_type#::POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_.:
3285 {
3286 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& lowerCaseFieldName, U'#');
3287 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3288 var -> numericVectorValuecxx . . $ structInterpreterVariable#numericVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). copy_VECcxx . . $ copy_VEC(d4415e68b25283a8). (fieldcxx . . $ constvectorview#constvectorview(eac9d6ec4c4bfecd). -> realVectorValuecxx . . $ structUiField#realVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).()); // TODO: can we move this instead of copying it?
3289 }
3290 break;
3291 case _kUiField_typecxx . . $ _kUiField_type#::INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_.:
3292 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_.:
3293 case _kUiField_typecxx . . $ _kUiField_type#::NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_.:
3294 {
3295 MelderString_appendCharactercxx . . $ MelderString_appendCharacter(f4ab64866cffe712). (& lowerCaseFieldName, U'#');
3296 InterpreterVariablecxx . . $ InterpreterVariable# var = Interpreter_lookUpVariablecxx . . $ Interpreter_lookUpVariable(17b277cbad23fdab). (interpreter, lowerCaseFieldName.stringcxx . . $ MelderString#string.);
3297 var -> numericVectorValuecxx . . $ structInterpreterVariable#numericVectorValue. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). cast_VECcxx . . $ cast_VEC(f68cd76b4341e935). (fieldcxx . . $ constvector#constvector(eac9d6ec4c4bfecd). -> integerVectorValuecxx . . $ structUiField#integerVectorValue..getcxx . . $ autovector#get(e8d1da7fe68a6585).());
3298 }
3299 break;
3300 case _kUiField_typecxx . . $ _kUiField_type#::COLOUR_cxx . . $ _kUiField_type#COLOUR_.:
3301 {
3302 // to be implemented
3303 }
3304 break;
3305 default:
3306 {
3307 }
3308 }
3309 }
3310 }
3311
3312 int UiForm_getClickedContinueButtoncxx . . $ UiForm_getClickedContinueButton(4e51e78c3b9b4386). (UiFormcxx . . $ UiForm# me) {
3313 return mycxx . . $ `melder/melder.h:44:9`! clickedContinueButtoncxx . . $ structUiForm#clickedContinueButton.;
3314 }
3315
3316 /* End of file Ui.cpp */