Debian Codegraph @

dwtools/VowelEditor.h

raw
1 #ifndef _VowelEditor_h_
2 #define _VowelEditor_h_
3 /* VowelEditor.h
4 *
5 * Copyright (C) 2008-2017 David Weenink, 2022,2023 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 2 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. See the GNU
15 * 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 "RealTier.h"
22 #include "Table.h"
23 #include "ScriptEditor.h"
24
25 Thing_define (TrajectoryPoint, AnyPoint) {
26 double f1, f2;
27 struct MelderColour colour;
28 };
29
30 Thing_define (Trajectory, Function) {
31 SortedSetOfDoubleOf<structTrajectoryPoint> points;
32
33 AnyTier_METHODS
34 };
35
36 #include "VowelEditor_enums.h"
37
38 Thing_define (VowelEditor, Editor) {
39 autoGraphics graphics; // the drawing
40 int width, height; // size of drawing area in pixels
41 autoTable marks; // Vowel, F1, F2, Colour
42 autoTrajectory trajectory;
43 autoVEC extraFrequencyBandwidthPairs;
44 GuiDrawingArea drawingArea;
45 GuiButton playButton, reverseButton, publishButton;
46 GuiText f0TextField, f0SlopeTextField, durationTextField, extendTextField;
47 GuiLabel startInfo, endInfo;
48
49 bool v_scriptable ()
50 override { return false; }
51 void v_createChildren ()
52 override;
53 void v_createMenus ()
54 override;
55 void v_createMenuItems_help (EditorMenu menu)
56 override;
57
58 #include "VowelEditor_prefs.h"
59 void v9_repairPreferences () override;
60
61 /* only in cb_mouse: */
62 double anchorTime;
63 double previousX;
64 double previousY;
65 double dt;
66 };
67
68 autoVowelEditor VowelEditor_create (conststring32 title);
69
70 #endif /* _VowelEditor_h_ */