1 #ifndef _DemoEditor_h_
2 #define _DemoEditor_h_
3 /* DemoEditor.h
4 *
5 * Copyright (C) 2009-2011,2012,2015-2018,2020 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.
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
defaultProgress(double,conststring32)21 #include "Editor.h"
22
23 Thing_define (DemoEditor, Editor) {
24 GuiDrawingArea drawingArea;
25 autoGraphics graphics;
26 void *praatPicture;
27 bool clicked, keyPressed, shiftKeyPressed, commandKeyPressed, optionKeyPressed;
28 integer x, y;
29 char32 key;
30 bool waitingForInput, userWantsToClose, fullScreen;
31
32 void v_destroy () noexcept
33 override;
34 void v_info ()
35 override;
36 void v_goAway ()
37 override;
38 bool v_hasMenuBar ()
39 override { return false; }
40 bool v_canFullScreen ()
41 override { return true; }
42 bool v_scriptable ()
43 override { return false; }
44 void v_createChildren ()
45 override;
46 void v_createMenus ()
47 override;
48 };
49
50 void DemoEditor_init (DemoEditor me);
51 autoDemoEditor DemoEditor_create ();
Melder_setProgressProc(MelderProgress::ProgressProc proc)52
53 void Demo_open ();
54 void Demo_close ();
55 struct autoDemoOpen {
Melder_setMonitorProc(MelderProgress::MonitorProc proc)56 autoDemoOpen () { Demo_open (); }
57 ~autoDemoOpen () { Demo_close (); }
58 };
59
60 int Demo_windowTitle (conststring32 title);
61 int Demo_show ();
62 void Demo_waitForInput (Interpreter interpreter);
63 void Demo_peekInput (Interpreter interpreter);
64 bool Demo_clicked ();
65 double Demo_x ();
66 double Demo_y ();
67 bool Demo_keyPressed ();
68 char32 Demo_key ();
69 bool Demo_shiftKeyPressed ();
70 bool Demo_commandKeyPressed ();
71 bool Demo_optionKeyPressed ();
72 /* Shortcuts: */
73 bool Demo_input (conststring32 keys);
74 bool Demo_clickedIn (double left, double right, double bottom, double top);
75 void Demo_timer (double duration);
76
77 /* End of file DemoEditor.h */
78 #endif
79