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