| 1 |
#ifndef _DemoEditor_h_ |
| 2 |
#define _DemoEditor_h_ |
| 3 |
/* DemoEditor.h |
| 4 |
* |
| 5 |
* Copyright (C) 2009-2011,2012,2015-2018,2020,2022,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 "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 |
Interpreter interpreterReference; |
| 32 |
|
| 33 |
void v9_destroy () noexcept |
| 34 |
override; |
| 35 |
void v1_info () |
| 36 |
override; |
| 37 |
void v_goAway () |
| 38 |
override; |
| 39 |
bool v_hasMenuBar () |
| 40 |
override { return false; } |
| 41 |
bool v_canFullScreen () |
| 42 |
override { return true; } |
| 43 |
bool v_scriptable () |
| 44 |
override { return false; } |
| 45 |
void v_createChildren () |
| 46 |
override; |
| 47 |
void v_createMenus () |
| 48 |
override; |
| 49 |
}; |
| 50 |
|
| 51 |
void DemoEditor_init (DemoEditor me); |
| 52 |
autoDemoEditor DemoEditor_create (); |
| 53 |
bool Demo_hasGraphics (Graphics graphics); |
| 54 |
|
| 55 |
void Demo_open (); |
| 56 |
void Demo_close (); |
| 57 |
struct autoDemoOpen { |
| 58 |
autoDemoOpen () { Demo_open (); } |
| 59 |
~autoDemoOpen () { Demo_close (); } |
| 60 |
}; |
| 61 |
|
| 62 |
int Demo_windowTitle (conststring32 title); |
| 63 |
int Demo_show (); |
| 64 |
void Demo_waitForInput (Interpreter interpreter); |
| 65 |
void Demo_peekInput (Interpreter interpreter); |
| 66 |
bool Demo_clicked (); |
| 67 |
double Demo_x (); |
| 68 |
double Demo_y (); |
| 69 |
bool Demo_keyPressed (); |
| 70 |
char32 Demo_key (); |
| 71 |
bool Demo_shiftKeyPressed (); |
| 72 |
bool Demo_commandKeyPressed (); |
| 73 |
bool Demo_optionKeyPressed (); |
| 74 |
/* Shortcuts: */ |
| 75 |
bool Demo_input (conststring32 keys); |
| 76 |
bool Demo_clickedIn (double left, double right, double bottom, double top); |
| 77 |
void Demo_timer (double duration); |
| 78 |
|
| 79 |
void Demo_saveToPdfFile (MelderFile file); |
| 80 |
|
| 81 |
void Demo_interpreterGoesAway (Interpreter interpreter); |
| 82 |
|
| 83 |
#endif // !_DemoEditor_h_ |