Debian Codegraph @

sys/Ui.h

raw symbols SCIP
1 #cxx . . $ `<file>/sys/Ui.h`/ifndef _Ui_h_
2 #define _Ui_h_cxx . . $ `sys/Ui.h:2:9`!
3 /* Ui.h
4 *
5 * Copyright (C) 1992-2005,2007-2024,2026 Paul Boersma
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "Graphics.h"cxx . . $ `<file>/sys/Graphics.h`/
22 #include "Gui.h"cxx . . $ `<file>/sys/Gui.h`/
23 #include "Interpreter.h"cxx . . $ `<file>/sys/Interpreter.h`/
24 Thing_declarecxx . . $ autoEditorCommand# (EditorCommand);
25
26 #include "Ui_enums.h"cxx . . $ `<file>/sys/Ui_enums.h`/
27
28 /* Forms for getting arguments from the user. */
29
30 /* Example of usage:
31 {
32 static autoUiForm dia;
33 if (! dia) {
34 dia = UiForm_create
35 (topShell, // the parent GuiWindow of the dialog window
36 nullptr, // an optional editor
37 U"Create a new person", // the window title
38 DO_Person_create, // the function to call when the user clicks OK
39 nullptr, // the last argument to the OK routine (also for the other buttons); could be a ScriptEditor, or an EditorCommand, or an Interpreter, or nullptr
40 U"Create person...", // the invoking button title
41 U"Create person..."); // the help string; may be nullptr
42 static integer age;
43 UiForm_addNatural0 (dia.get(), & age, U"age", U"Age (years)", U"18");
44 static double length;
45 UiForm_addPositive (dia.get(), & length, U"length", U"Length (metres)", U"1.68 (= average)");
46 static bool beard;
47 UiForm_addBoolean (dia.get(), & beard, U"beard", U"Beard", false);
48 static int sex;
49 UiForm_addChoice (dia.get(), & sex, U"sex", U"Sex", 1);
50 UiForm_addOption (dia.get(), U"Female");
51 UiForm_addOption (dia.get(), U"Male");
52 UiForm_addWord (dia.get(), colour, U"colour", U"Colour", U"black");
53 UiForm_addComment (dia.get(), U"features", U"Some less conspicuous features:");
54 static integer numberOfBirthMarks;
55 UiForm_addNatural0 (dia.get(), & numberOfBirthMarks, U"numberOfBirthMarks", U"Number of birth marks", U"28");
56 static char *favouriteGreeting;
57 UiForm_addSentence (dia.get(), & favouriteGreeting, U"favouriteGreeting", U"Favourite greeting", U"Good morning");
58 UiForm_finish (dia.get());
59 }
60 UiForm_setReal (dia.get(), & length, myLength);
61 UiForm_setInteger (dia.get(), & numberOfBirthMarks, 30);
62 UiForm_do (dia.get(), false); // show dialog box
63 }
64 Real, Nonnegative, Positive, Integer, Natural0, Natural1, Channel, Word, and Sentence show a label and an editable text field.
65 Choice shows a label and has Option children stacked below it.
66 OptionMenu shows a label and has Option children in a menu.
67 Heading and Comment show only their value.
68 Text, RealVector and RealVector show an editable text field over the whole width of the form.
69 Boolean shows a labeled toggle button which is on (true) or off (false).
70 Option does the same inside a choice box or option menu.
71 List shows a scrollable list.
72 Colour shows a label and an editable text field for a grey value between 0.0 and 1.0, a colour name, or {r,g,b}.
73 Channel shows a label and an editable text field for a natural number or one of the texts "Left", "Right", "Mono" or "Stereo".
74 As shown in the example, Real, Nonnegative, Positive, Integer, Natural 0 and Natural1 may contain extra text;
75 this text is considered a comment.
76 When you click "Standards", the standard values (including comments)
77 are restored to all items in the form.
78 */
79
80 Thing_definecxx . . $ theClassInfo_UiOption. (UiOption, Thing) {
81 GuiRadioButtoncxx . . $ GuiRadioButton# radioButtoncxx . . $ structUiOption#radioButton.;
82 GuiObjectcxx . . $ GuiObject# menuItemcxx . . $ structUiOption#menuItem.;
83 };
84
85 enum class _kUiField_typecxx . . $ _kUiField_type# {
86 REAL_cxx . . $ _kUiField_type#REAL_. = 1,
87 LABELLED_TEXT_MIN_cxx . . $ _kUiField_type#LABELLED_TEXT_MIN_. = REAL_cxx . . $ _kUiField_type#REAL_.,
88 REAL_OR_UNDEFINED_cxx . . $ _kUiField_type#REAL_OR_UNDEFINED_. = 2,
89 NONNEGATIVE_cxx . . $ _kUiField_type#NONNEGATIVE_. = 3,
90 POSITIVE_cxx . . $ _kUiField_type#POSITIVE_. = 4,
91 INTEGER_cxx . . $ _kUiField_type#INTEGER_. = 5,
92 NATURAL0_cxx . . $ _kUiField_type#NATURAL0_. = 6,
93 NATURAL1_cxx . . $ _kUiField_type#NATURAL1_. = 7,
94 WORD_cxx . . $ _kUiField_type#WORD_. = 8,
95 SENTENCE_cxx . . $ _kUiField_type#SENTENCE_. = 9,
96 COLOUR_cxx . . $ _kUiField_type#COLOUR_. = 10,
97 CHANNEL_cxx . . $ _kUiField_type#CHANNEL_. = 11,
98 LABELLED_TEXT_MAX_cxx . . $ _kUiField_type#LABELLED_TEXT_MAX_. = CHANNEL_cxx . . $ _kUiField_type#CHANNEL_.,
99
100 HEADING_cxx . . $ _kUiField_type#HEADING_. = 12,
101 COMMENT_MIN_cxx . . $ _kUiField_type#COMMENT_MIN_. = HEADING_cxx . . $ _kUiField_type#HEADING_.,
102 COMMENT_cxx . . $ _kUiField_type#COMMENT_. = 13,
103 CAPTION_cxx . . $ _kUiField_type#CAPTION_. = 14,
104 COMMENT_MAX_cxx . . $ _kUiField_type#COMMENT_MAX_. = CAPTION_cxx . . $ _kUiField_type#CAPTION_.,
105
106 TEXT_cxx . . $ _kUiField_type#TEXT_. = 15,
107 FORMULA_cxx . . $ _kUiField_type#FORMULA_. = 16,
108 INFILE_cxx . . $ _kUiField_type#INFILE_. = 17,
109 OUTFILE_cxx . . $ _kUiField_type#OUTFILE_. = 18,
110 FOLDER_cxx . . $ _kUiField_type#FOLDER_. = 19,
111 REALVECTOR_cxx . . $ _kUiField_type#REALVECTOR_. = 20,
112 NONNEGATIVEVECTOR_cxx . . $ _kUiField_type#NONNEGATIVEVECTOR_. = 21,
113 POSITIVEVECTOR_cxx . . $ _kUiField_type#POSITIVEVECTOR_. = 22,
114 INTEGERVECTOR_cxx . . $ _kUiField_type#INTEGERVECTOR_. = 23,
115 NATURAL0VECTOR_cxx . . $ _kUiField_type#NATURAL0VECTOR_. = 24,
116 NATURAL1VECTOR_cxx . . $ _kUiField_type#NATURAL1VECTOR_. = 25,
117 REALMATRIX_cxx . . $ _kUiField_type#REALMATRIX_. = 26,
118 STRINGARRAY_cxx . . $ _kUiField_type#STRINGARRAY_. = 27,
119 BOOLEAN_cxx . . $ _kUiField_type#BOOLEAN_. = 28,
120 CHOICE_cxx . . $ _kUiField_type#CHOICE_. = 29,
121 OPTIONMENU_cxx . . $ _kUiField_type#OPTIONMENU_. = 30,
122 LIST_cxx . . $ _kUiField_type#LIST_. = 31,
123 };
124 inline bool _kUiField_type_isLabelledTextcxx . . $ _kUiField_type_isLabelledText(f95c651c41e10a91). (_kUiField_typecxx . . $ _kUiField_type# type) {
125 return type >= _kUiField_typecxx . . $ _kUiField_type# :: LABELLED_TEXT_MIN_cxx . . $ _kUiField_type#LABELLED_TEXT_MIN_. && type <= _kUiField_typecxx . . $ _kUiField_type# :: LABELLED_TEXT_MAX_cxx . . $ _kUiField_type#LABELLED_TEXT_MAX_.;
126 }
127 inline bool _kUiField_type_isCommentcxx . . $ _kUiField_type_isComment(f95c651c41e10a91). (_kUiField_typecxx . . $ _kUiField_type# type) {
128 return type >= _kUiField_typecxx . . $ _kUiField_type# :: COMMENT_MIN_cxx . . $ _kUiField_type#COMMENT_MIN_. && type <= _kUiField_typecxx . . $ _kUiField_type# :: COMMENT_MAX_cxx . . $ _kUiField_type#COMMENT_MAX_.;
129 }
130
131 Thing_definecxx . . $ classUiField. (UiField, Thing) {
132 _kUiField_typecxx . . $ _kUiField_type# typecxx . . $ structUiField#type.;
133 autostring32cxx . . $ autostring32# labelTextcxx . . $ structUiField#labelText.;
134 double realValuecxx . . $ structUiField#realValue.;
135 integercxx . . $ integer# integerValuecxx . . $ structUiField#integerValue., integerDefaultValuecxx . . $ structUiField#integerDefaultValue.;
136 autostring32cxx . . $ autostring32# stringValuecxx . . $ structUiField#stringValue., stringDefaultValuecxx . . $ structUiField#stringDefaultValue.;
137 kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# realVectorDefaultFormatcxx . . $ structUiField#realVectorDefaultFormat.; // for REALVECTOR_, NONNEGATIVEVECTOR_, POSITIVEVECTOR_
138 autoVECcxx . . $ autoVEC# realVectorValuecxx . . $ structUiField#realVectorValue., realVectorDefaultValuecxx . . $ structUiField#realVectorDefaultValue.; // for REALVECTOR_, NONNEGATIVEVECTOR_, POSITIVEVECTOR_
139 kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# integerVectorDefaultFormatcxx . . $ structUiField#integerVectorDefaultFormat.; // for INTEGERVECTOR_, NATURAL0VECTOR_, NATURAL1VECTOR_
140 autoINTVECcxx . . $ autoINTVEC# integerVectorValuecxx . . $ structUiField#integerVectorValue., integerVectorDefaultValuecxx . . $ structUiField#integerVectorDefaultValue.; // for INTEGERVECTOR_, NATURAL0VECTOR_, NATURAL1VECTOR_
141 autoMATcxx . . $ autoMAT# numericMatrixValuecxx . . $ structUiField#numericMatrixValue., numericMatrixDefaultValuecxx . . $ structUiField#numericMatrixDefaultValue.; // for REALMATRIX_
142 kUi_stringArrayFormatcxx . . $ kUi_stringArrayFormat# stringArrayFormatcxx . . $ structUiField#stringArrayFormat.; // for STRINGARRAY_
143 autoSTRVECcxx . . $ autoSTRVEC# stringArrayValuecxx . . $ structUiField#stringArrayValue., stringArrayDefaultValuecxx . . $ structUiField#stringArrayDefaultValue.; // for STRINGARRAY_
144 autostring32cxx . . $ autostring32# previouslySelectedListStringcxx . . $ structUiField#previouslySelectedListString.; // for LIST_
145 MelderColourcxx . . $ MelderColour# colourValuecxx . . $ structUiField#colourValue.;
146 OrderedOfcxx . . $ OrderedOf#<structUiOptioncxx . . $ structUiOption#> optionscxx . . $ structUiField#options.;
147 constSTRVECcxx . . $ constSTRVEC# stringscxx . . $ structUiField#strings.;
148 GuiLabelcxx . . $ GuiLabel# labelcxx . . $ structUiField#label.;
149 GuiTextcxx . . $ GuiText# textcxx . . $ structUiField#text.;
150 GuiCheckButtoncxx . . $ GuiCheckButton# checkButtoncxx . . $ structUiField#checkButton.;
151 GuiRadioButtoncxx . . $ GuiRadioButton# radioButtoncxx . . $ structUiField#radioButton.; // for CHOICE_
152 GuiListcxx . . $ GuiList# listcxx . . $ structUiField#list.;
153 GuiOptionMenucxx . . $ GuiOptionMenu# optionMenucxx . . $ structUiField#optionMenu.;
154 enum_generic_getValuecxx . . $ enum_generic_getValue# getValueFunctioncxx . . $ structUiField#getValueFunction.;
155 GuiButtoncxx . . $ GuiButton# pushButtoncxx . . $ structUiField#pushButton.; // like "Browse..." for INFILE_, OUTFILE_, FOLDER_ (2021-03-30)
156 int ycxx . . $ structUiField#y.;
157
158 conststring32cxx . . $ conststring32# variableNamecxx . . $ structUiField#variableName.; // a reference to a name known at compile time, for use by the Praat library
159 double *realVariablecxx . . $ structUiField#realVariable.;
160 integercxx . . $ integer# *integerVariablecxx . . $ structUiField#integerVariable.;
161 int *intVariablecxx . . $ structUiField#intVariable.;
162 bool *boolVariablecxx . . $ structUiField#boolVariable.;
163 conststring32cxx . . $ conststring32# *stringVariablecxx . . $ structUiField#stringVariable.;
164 MelderColourcxx . . $ MelderColour# *colourVariablecxx . . $ structUiField#colourVariable.;
165 constVECcxx . . $ constVEC# *realVectorVariablecxx . . $ structUiField#realVectorVariable.;
166 constINTVECcxx . . $ constINTVEC# *integerVectorVariablecxx . . $ structUiField#integerVectorVariable.;
167 constMATcxx . . $ constMAT# *numericMatrixVariablecxx . . $ structUiField#numericMatrixVariable.;
168 constSTRVECcxx . . $ constSTRVEC# *stringArrayVariablecxx . . $ structUiField#stringArrayVariable.;
169
170 int subtractcxx . . $ structUiField#subtract.;
171 integercxx . . $ integer# numberOfLinescxx . . $ structUiField#numberOfLines.;
172 };
173
174 using UiCallbackcxx . . $ UiCallback# = void (*) (UiFormcxx . . $ UiForm# _sendingForm, integercxx . . $ integer# _narg, Stackelcxx . . $ Stackel# _args, conststring32cxx . . $ conststring32# _sendingString,
175 Interpretercxx . . $ Interpreter# interpreter, conststring32cxx . . $ conststring32# _invokingButtonTitle, bool _isModified, void *_closure, Editorcxx . . $ Editor# optionalEditor);
176
177 #define MAXIMUM_NUMBER_OF_FIELDScxx . . $ `sys/Ui.h:177:9`! 50
178 #define MAXIMUM_NUMBER_OF_CONTINUE_BUTTONScxx . . $ `sys/Ui.h:178:9`! 10
179
180 Thing_definecxx . . $ ClassInfo# (UiForm, Thing) {
181 EditorCommandcxx . . $ EditorCommand# commandcxx . . $ structUiForm#command.;
182 GuiWindowcxx . . $ GuiWindow# d_dialogParentcxx . . $ structUiForm#d_dialogParent.;
183 Editorcxx . . $ Editor# optionalEditorcxx . . $ structUiForm#optionalEditor.;
184 autostring32cxx . . $ autostring32# invokingButtonTitlecxx . . $ structUiForm#invokingButtonTitle., helpTitlecxx . . $ structUiForm#helpTitle., scriptFilePathcxx . . $ structUiForm#scriptFilePath.;
185 UiCallbackcxx . . $ UiCallback# okCallbackcxx . . $ structUiForm#okCallback.;
186 void *buttonClosurecxx . . $ structUiForm#buttonClosure.;
187
188 /*
189 In case the validity of the form depends on the selected objects.
190 */
191 bool (*allowExecutionHookcxx . . $ structUiForm#allowExecutionHook.) (void *closure);
192 void *allowExecutionClosurecxx . . $ structUiForm#allowExecutionClosure.;
193
194 /*
195 In case the form is built by specifying buttons (rather than a system-built-in file dialog).
196 */
197 GuiDialogcxx . . $ GuiDialog# d_dialogFormcxx . . $ structUiForm#d_dialogForm.;
198 void (*applyCallbackcxx . . $ structUiForm#applyCallback.) (UiFormcxx . . $ UiForm# dia, void *closure);
199 void (*cancelCallbackcxx . . $ structUiForm#cancelCallback.) (UiFormcxx . . $ UiForm# dia, void *closure);
200 int numberOfContinueButtonscxx . . $ structUiForm#numberOfContinueButtons., defaultContinueButtoncxx . . $ structUiForm#defaultContinueButton., cancelContinueButtoncxx . . $ structUiForm#cancelContinueButton., clickedContinueButtoncxx . . $ structUiForm#clickedContinueButton.;
201 autostring32cxx . . $ autostring32# continueTextscxx . . $ structUiForm#continueTexts. [1 + MAXIMUM_NUMBER_OF_CONTINUE_BUTTONScxx . . $ `sys/Ui.h:178:9`!];
202 int numberOfFieldscxx . . $ structUiForm#numberOfFields.;
203 autoUiFieldcxx . . $ autoUiField# fieldcxx . . $ structUiForm#field. [1 + MAXIMUM_NUMBER_OF_FIELDScxx . . $ `sys/Ui.h:177:9`!];
204 UiFieldcxx . . $ UiField# referenceToLatestUsedChoiceOrOptionMenucxx . . $ structUiForm#referenceToLatestUsedChoiceOrOptionMenu.;
205 GuiButtoncxx . . $ GuiButton# okButtoncxx . . $ structUiForm#okButton., cancelButtoncxx . . $ structUiForm#cancelButton., revertButtoncxx . . $ structUiForm#revertButton., helpButtoncxx . . $ structUiForm#helpButton., applyButtoncxx . . $ structUiForm#applyButton., continueButtonscxx . . $ structUiForm#continueButtons. [1 + MAXIMUM_NUMBER_OF_CONTINUE_BUTTONScxx . . $ `sys/Ui.h:178:9`!];
206 bool destroyWhenUnmanagedcxx . . $ structUiForm#destroyWhenUnmanaged., isPauseFormcxx . . $ structUiForm#isPauseForm.;
207
208 /*
209 In case the form contains a file.
210 */
211 structMelderFilecxx . . $ structMelderFile# filecxx . . $ structUiForm#file.;
212 int shiftKeyPressedcxx . . $ structUiForm#shiftKeyPressed.;
213 bool allowMultipleFilescxx . . $ structUiForm#allowMultipleFiles.; // for input
214
215 void v9_destroycxx . . $ structUiForm#v9_destroy(ced63f7c635d850d). () noexcept
216 override;
217 };
218
219 /* The following functions work on the screen and from batch. */
220 autoUiFormcxx . . $ autoUiForm# UiForm_createcxx . . $ UiForm_create(b3c832b012a1002d). (GuiWindowcxx . . $ GuiWindow# parent, Editorcxx . . $ Editor# optionalEditor, conststring32cxx . . $ conststring32# title,
221 UiCallbackcxx . . $ UiCallback# okCallback, void *buttonClosure,
222 conststring32cxx . . $ conststring32# invokingButtonTitle, conststring32cxx . . $ conststring32# helpTitle
223 );
224 UiFieldcxx . . $ UiField# UiForm_addRealcxx . . $ UiForm_addReal(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
225 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
226 UiFieldcxx . . $ UiField# UiForm_addRealOrUndefinedcxx . . $ UiForm_addRealOrUndefined(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
227 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
228 UiFieldcxx . . $ UiField# UiForm_addNonnegativecxx . . $ UiForm_addNonnegative(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
229 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
230 UiFieldcxx . . $ UiField# UiForm_addPositivecxx . . $ UiForm_addPositive(d7880526ba4e7a26). (UiFormcxx . . $ UiForm# me, double *variable, conststring32cxx . . $ conststring32# variableName,
231 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
232 UiFieldcxx . . $ UiField# UiForm_addIntegercxx . . $ UiForm_addInteger(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
233 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
234 UiFieldcxx . . $ UiField# UiForm_addNatural0cxx . . $ UiForm_addNatural0(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
235 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
236 UiFieldcxx . . $ UiField# UiForm_addNatural1cxx . . $ UiForm_addNatural1(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
237 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
238 UiFieldcxx . . $ UiField# UiForm_addWordcxx . . $ UiForm_addWord(5d4a87e816a21170). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
239 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
240 UiFieldcxx . . $ UiField# UiForm_addSentencecxx . . $ UiForm_addSentence(5d4a87e816a21170). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
241 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
242 UiFieldcxx . . $ UiField# UiForm_addHeadingcxx . . $ UiForm_addHeading(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText);
243 UiFieldcxx . . $ UiField# UiForm_addCommentcxx . . $ UiForm_addComment(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText);
244 UiFieldcxx . . $ UiField# UiForm_addCaptioncxx . . $ UiForm_addCaption(6d0ce7320d446690). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# labelText);
245 UiFieldcxx . . $ UiField# UiForm_addBooleancxx . . $ UiForm_addBoolean(b90450cfcf0b1b39). (UiFormcxx . . $ UiForm# me, bool *variable, conststring32cxx . . $ conststring32# variableName,
246 conststring32cxx . . $ conststring32# labelText, bool defaultValue);
247 UiFieldcxx . . $ UiField# UiForm_addTextcxx . . $ UiForm_addText(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
248 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 1);
249 UiFieldcxx . . $ UiField# UiForm_addFormulacxx . . $ UiForm_addFormula(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
250 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 5);
251 UiFieldcxx . . $ UiField# UiForm_addInfilecxx . . $ UiForm_addInfile(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
252 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 3);
253 UiFieldcxx . . $ UiField# UiForm_addOutfilecxx . . $ UiForm_addOutfile(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
254 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 3);
255 UiFieldcxx . . $ UiField# UiForm_addFoldercxx . . $ UiForm_addFolder(25528465ffb71beb). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *variable, conststring32cxx . . $ conststring32# variableName,
256 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 3);
257 UiFieldcxx . . $ UiField# UiForm_addRealVectorcxx . . $ UiForm_addRealVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
258 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
259 UiFieldcxx . . $ UiField# UiForm_addNonnegativeVectorcxx . . $ UiForm_addNonnegativeVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
260 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
261 UiFieldcxx . . $ UiField# UiForm_addPositiveVectorcxx . . $ UiForm_addPositiveVector(5c557c1a40061fd6). (UiFormcxx . . $ UiForm# me, constVECcxx . . $ constVEC# *variable, conststring32cxx . . $ conststring32# variableName,
262 conststring32cxx . . $ conststring32# labelText, kUi_realVectorFormatcxx . . $ kUi_realVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
263 UiFieldcxx . . $ UiField# UiForm_addIntegerVectorcxx . . $ UiForm_addIntegerVector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
264 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
265 UiFieldcxx . . $ UiField# UiForm_addNatural0Vectorcxx . . $ UiForm_addNatural0Vector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
266 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
267 UiFieldcxx . . $ UiField# UiForm_addNatural1Vectorcxx . . $ UiForm_addNatural1Vector(2672c3a1aac61713). (UiFormcxx . . $ UiForm# me, constINTVECcxx . . $ constINTVEC# *variable, conststring32cxx . . $ conststring32# variableName,
268 conststring32cxx . . $ conststring32# labelText, kUi_integerVectorFormatcxx . . $ kUi_integerVectorFormat# defaultFormat, conststring32cxx . . $ conststring32# defaultValue, integercxx . . $ integer# numberOfLines = 7);
269 UiFieldcxx . . $ UiField# UiForm_addRealMatrixcxx . . $ UiForm_addRealMatrix(5d5d08370bfb8861). (UiFormcxx . . $ UiForm# me, constMATcxx . . $ constMAT# *variable, conststring32cxx . . $ conststring32# variableName,
270 conststring32cxx . . $ conststring32# labelText, constMATVUcxx . . $ constMATVU# defaultValue, integercxx . . $ integer# numberOfLines = 10);
271 UiFieldcxx . . $ UiField# UiForm_addStringArraycxx . . $ UiForm_addStringArray(94f57f7e3f1d78aa). (UiFormcxx . . $ UiForm# me, constSTRVECcxx . . $ constSTRVEC# *variable, conststring32cxx . . $ conststring32# variableName,
272 conststring32cxx . . $ conststring32# labelText, constSTRVECcxx . . $ constSTRVEC# defaultValue, integercxx . . $ integer# numberOfLines = 7);
273 UiFieldcxx . . $ UiField# UiForm_addChoicecxx . . $ UiForm_addChoice(d89e2083c962d687). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
274 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base);
275 UiFieldcxx . . $ UiField# UiForm_addChoiceEnumcxx . . $ UiForm_addChoiceEnum(127838258719f907). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
276 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base, enum_generic_getValuecxx . . $ enum_generic_getValue# getValueFunction);
277 UiFieldcxx . . $ UiField# UiForm_addOptionMenucxx . . $ UiForm_addOptionMenu(d89e2083c962d687). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
278 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base);
279 UiFieldcxx . . $ UiField# UiForm_addOptionMenuEnumcxx . . $ UiForm_addOptionMenuEnum(127838258719f907). (UiFormcxx . . $ UiForm# me, int *intVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
280 conststring32cxx . . $ conststring32# labelText, int defaultValue, int base, enum_generic_getValuecxx . . $ enum_generic_getValue# getValueFunction);
281 UiOptioncxx . . $ UiOption# UiForm_addOptioncxx . . $ UiForm_addOption(fb534d753ea2b6de). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# optionText);
282 UiFieldcxx . . $ UiField# UiForm_addListcxx . . $ UiForm_addList(c5dedd83e834332f). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *integerVariable, conststring32cxx . . $ conststring32# *stringVariable, conststring32cxx . . $ conststring32# variableName,
283 conststring32cxx . . $ conststring32# labelText, constSTRVECcxx . . $ constSTRVEC# strings, integercxx . . $ integer# defaultValue);
284 UiFieldcxx . . $ UiField# UiForm_addColourcxx . . $ UiForm_addColour(336d3133f8cc3777). (UiFormcxx . . $ UiForm# me, MelderColourcxx . . $ MelderColour# *colourVariable, conststring32cxx . . $ conststring32# variableName,
285 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
286 UiFieldcxx . . $ UiField# UiForm_addChannelcxx . . $ UiForm_addChannel(b8ca5bf767b50516). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *variable, conststring32cxx . . $ conststring32# variableName,
287 conststring32cxx . . $ conststring32# labelText, conststring32cxx . . $ conststring32# defaultValue);
288 void UiForm_finishcxx . . $ UiForm_finish(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me);
289
290 void UiForm_destroyWhenUnmanagedcxx . . $ UiForm_destroyWhenUnmanaged(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me);
291 void UiForm_setPauseFormcxx . . $ UiForm_setPauseForm(d24abb1496621b13). (UiFormcxx . . $ UiForm# me,
292 int numberOfContinueButtons, int defaultContinueButton, int cancelContinueButton,
293 conststring32cxx . . $ conststring32# continue1, conststring32cxx . . $ conststring32# continue2, conststring32cxx . . $ conststring32# continue3,
294 conststring32cxx . . $ conststring32# continue4, conststring32cxx . . $ conststring32# continue5, conststring32cxx . . $ conststring32# continue6,
295 conststring32cxx . . $ conststring32# continue7, conststring32cxx . . $ conststring32# continue8, conststring32cxx . . $ conststring32# continue9,
296 conststring32cxx . . $ conststring32# continue10,
297 void (*cancelCallback) (UiFormcxx . . $ UiForm# dia, void *closure));
298
299 /* The following nine functions set values in widgets. */
300 /* Do not call from batch. */
301 /* 'fieldName' is name from UiForm_addXXXXXX (), */
302 /* without anything from and including the first " (" or ":". */
303
304 /* Real, RealOrUndefined, Nonnegative, and Positive fields: */
305 void UiForm_setRealcxx . . $ UiForm_setReal(a22e7040ac9461fc). (UiFormcxx . . $ UiForm# me, double *p_variable, double value);
306 void UiForm_setRealAsStringcxx . . $ UiForm_setRealAsString(e02283e21b9d129c). (UiFormcxx . . $ UiForm# me, double *p_variable, conststring32cxx . . $ conststring32# stringValue /* cattable */);
307 /* Integer, Natural0, Natural1, Channel, and List fields: */
308 void UiForm_setIntegercxx . . $ UiForm_setInteger(cc02131c4de7319e). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_variable, integercxx . . $ integer# value);
309 void UiForm_setIntegerAsStringcxx . . $ UiForm_setIntegerAsString(79a3598602035dc5). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_variable, conststring32cxx . . $ conststring32# stringValue /* cattable */);
310 /* Word, Sentence, Text, Heading and Comment fields: */
311 void UiForm_setStringcxx . . $ UiForm_setString(d49c239820409ff). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# *p_variable, conststring32cxx . . $ conststring32# text /* cattable */);
312 /* Boolean fields: */
313 void UiForm_setBooleancxx . . $ UiForm_setBoolean(68cdfc54e8c7e2d2). (UiFormcxx . . $ UiForm# me, bool *p_variable, bool value);
314 /* Choice and OptionMenu fields: */
315 void UiForm_setOptioncxx . . $ UiForm_setOption(cd5a6b0802c2ad1d). (UiFormcxx . . $ UiForm# me, int *p_variable, int value);
316 void UiForm_setOptionAsStringcxx . . $ UiForm_setOptionAsString(bf3e08a1450cc1f7). (UiFormcxx . . $ UiForm# me, int *p_variable, conststring32cxx . . $ conststring32# stringValue /* cattable */);
317 /* List fields: */
318 void UiForm_setListcxx . . $ UiForm_setList(374b0975054fab19). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# *p_integerVariable, conststring32cxx . . $ conststring32# *p_stringVariable,
319 constSTRVECcxx . . $ constSTRVEC# strings, integercxx . . $ integer# defaultValue);
320 /* Colour fields: */
321 void UiForm_setColourAsGreyValuecxx . . $ UiForm_setColourAsGreyValue(6be4d47026b8859a). (UiFormcxx . . $ UiForm# me, MelderColourcxx . . $ MelderColour# *p_variable, double greyValue);
322
323 void UiForm_docxx . . $ UiForm_do(c04b2c306b4dc6f4). (UiFormcxx . . $ UiForm# me, bool modified);
324 /*
325 Function:
326 put the form on the screen.
327 Behaviour:
328 If the user clicks "OK",
329 the form will call the `okCallback` that was registered with UiForm_create ().
330
331 If the user clicks "Apply",
332 the form will call the `okCallback` that was registered with UiForm_create (),
333 and the form disappears from the screen.
334
335 If the user clicks "Cancel", the form disappears from the screen.
336
337 If the user clicks "Help", the form calls `help` with the `helpTitle`
338 and stays on the screen.
339
340 When the form disappears from the screen, the values in the fields
341 will remain until the next invocation of UiForm_do () for the same form.
342 Arguments:
343 the above behaviour describes the action when `modified` is false.
344 If `modified` is true, the user does not have to click OK.
345 The form will still appear on the screen,
346 but the `okCallback` will be called immediately.
347 */
348 void UiForm_infocxx . . $ UiForm_info(6e424388870f3480). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# narg);
349
350 /*
351 The `okCallback` can use the following seven functions to ask arguments.
352 The field names are the `label` or `name` arguments to UiForm_addXXXXXX (),
353 without anything from parentheses or from a colon.
354 These functions work from the GUI as well as from a script.
355 */
356 integercxx . . $ integer# UiForm_getIntegercxx . . $ UiForm_getInteger(a2a8d8679a0481d3). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName); // Integer, Natural0, Natural1, Boolean, Choice, OptionMenu, List
357 char32cxx . . $ char32# * UiForm_getStringcxx . . $ UiForm_getString(dbfe1f22119c140b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName); // Word, Sentence, Text, RealMatrix, Choice, OptionMenu, List
358 MelderFilecxx . . $ MelderFile# UiForm_getFilecxx . . $ UiForm_getFile(86e298a6a3cbc716). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName); // Infile, Outfile
359 VECcxx . . $ VEC# UiForm_getRealVectorcxx . . $ UiForm_getRealVector(c0137ef95408d49b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName); // RealVector, NonnegativeVector, PositiveVector
360 INTVECcxx . . $ INTVEC# UiForm_getIntegerVectorcxx . . $ UiForm_getIntegerVector(95a73fa817562995). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName); // IntegerVector, Natural0Vector, Natural1Vector
361
362 double UiForm_getReal_checkcxx . . $ UiForm_getReal_check(90f0f90face616f6). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName);
363 integercxx . . $ integer# UiForm_getInteger_checkcxx . . $ UiForm_getInteger_check(a2a8d8679a0481d3). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName);
364 char32cxx . . $ char32# * UiForm_getString_checkcxx . . $ UiForm_getString_check(dbfe1f22119c140b). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName);
365 MelderColourcxx . . $ MelderColour# UiForm_getColour_checkcxx . . $ UiForm_getColour_check(3a49b9f8fb3daf52). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# fieldName);
366
367 void UiForm_callcxx . . $ UiForm_call(ef7493db0e821287). (UiFormcxx . . $ UiForm# me, integercxx . . $ integer# narg, Stackelcxx . . $ Stackel# args, Interpretercxx . . $ Interpreter# interpreter);
368 void UiForm_parseStringcxx . . $ UiForm_parseString(530de004c8191cd7). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# arguments, Interpretercxx . . $ Interpreter# interpreter);
369
370 autoUiFormcxx . . $ autoUiForm# UiInfile_createcxx . . $ UiInfile_create(50b46b1e7e1cbcb). (GuiWindowcxx . . $ GuiWindow# parent, Editorcxx . . $ Editor# optionalEditor, conststring32cxx . . $ conststring32# title,
371 UiCallbackcxx . . $ UiCallback# okCallback, void *okClosure,
372 conststring32cxx . . $ conststring32# invokingButtonTitle, conststring32cxx . . $ conststring32# helpTitle, bool allowMultipleFiles);
373
374 autoUiFormcxx . . $ autoUiForm# UiOutfile_createcxx . . $ UiOutfile_create(b3c832b012a1002d). (GuiWindowcxx . . $ GuiWindow# parent, Editorcxx . . $ Editor# optionalEditor, conststring32cxx . . $ conststring32# title,
375 UiCallbackcxx . . $ UiCallback# okCallback, void *okClosure,
376 conststring32cxx . . $ conststring32# invokingButtonTitle, conststring32cxx . . $ conststring32# helpTitle);
377
378 void UiInfile_docxx . . $ UiInfile_do(b4388889c5fb10c0). (UiFormcxx . . $ UiForm# me);
379
380 void UiOutfile_docxx . . $ UiOutfile_do(dd78e4d327935865). (UiFormcxx . . $ UiForm# me, conststring32cxx . . $ conststring32# defaultName);
381
382 MelderFilecxx . . $ MelderFile# UiFile_getFilecxx . . $ UiFile_getFile(fbc6b61177245f1d). (UiFormcxx . . $ UiForm# me);
383
384 void UiFile_hidecxx . . $ UiFile_hide(49f6e7a06ebc5aa8). ();
385 /*
386 Hides the visible UiFile that was opened most recently.
387 Normally, file selectors stay open until their okCallback has completed.
388 However, the okCallback may initiate an event loop allowing the user
389 to interact with the application, for instance in Melder_pause ().
390 In order that the user does not have to hide the modal file selector
391 manually (by clicking the Cancel button), the application can call
392 UiFile_hide () before Melder_pause ().
393 */
394
395 void UiHistory_writecxx . . $ UiHistory_write(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string);
396 void UiHistory_write_expandQuotescxx . . $ UiHistory_write_expandQuotes(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string);
397 void UiHistory_write_colonizecxx . . $ UiHistory_write_colonize(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# string);
398 char32cxx . . $ char32# *UiHistory_getcxx . . $ UiHistory_get(7f2d784185c6d30e). ();
399 void UiHistory_clearcxx . . $ UiHistory_clear(49f6e7a06ebc5aa8). ();
400
401 void Ui_setAllowExecutionHookcxx . . $ Ui_setAllowExecutionHook(1e9af8188bc9e75f). (bool (*allowExecutionHook) (void *closure), void *allowExecutionClosure);
402
403 void UiForm_Interpreter_addVariablescxx . . $ UiForm_Interpreter_addVariables(16bc4cf5fc9b4102). (UiFormcxx . . $ UiForm# me, Interpretercxx . . $ Interpreter# interpreter);
404 int UiForm_getClickedContinueButtoncxx . . $ UiForm_getClickedContinueButton(4e51e78c3b9b4386). (UiFormcxx . . $ UiForm# me);
405
406 void Ui_prefscxx . . $ Ui_prefs(49f6e7a06ebc5aa8). ();
407
408 /* End of file Ui.h */
409 #endif