| 1 |
#ifndef _NotebookEditor_h_ |
| 2 |
#define _NotebookEditor_h_ |
| 3 |
/* NotebookEditor.h |
| 4 |
* |
| 5 |
* Copyright (C) 2023,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 "ManPages.h" |
| 22 |
#include "Notebook.h" |
| 23 |
#include "TextEditor.h" |
| 24 |
#include "Interpreter.h" |
| 25 |
|
| 26 |
Thing_define (NotebookEditor, TextEditor) { |
| 27 |
autoInterpreterStack interpreterStack; |
| 28 |
autoUiForm argsDialog; |
| 29 |
|
| 30 |
void v9_destroy () noexcept |
| 31 |
override; |
| 32 |
void v_nameChanged () |
| 33 |
override; |
| 34 |
void v_goAway () |
| 35 |
override; |
| 36 |
bool v_scriptable () |
| 37 |
override { return false; } |
| 38 |
void v_createMenus () |
| 39 |
override; |
| 40 |
void v_createMenuItems_help (EditorMenu menu) |
| 41 |
override; |
| 42 |
conststring32 v_extension () const |
| 43 |
override { return U".praatnb"; } |
| 44 |
}; |
| 45 |
|
| 46 |
void NotebookEditor_init (NotebookEditor me, |
| 47 |
conststring32 initialText |
| 48 |
); |
| 49 |
autoNotebookEditor NotebookEditor_createFromText ( |
| 50 |
conststring32 initialText // may be null |
| 51 |
); |
| 52 |
|
| 53 |
autoNotebookEditor NotebookEditor_createFromNotebook_canBeNull ( |
| 54 |
Notebook notebook |
| 55 |
); |
| 56 |
|
| 57 |
bool NotebookEditors_dirty (); // are there any modified and unsaved notebooks? Ask before quitting the program. |
| 58 |
|
| 59 |
void NotebookEditor_debug_printAllOpenNotebookEditors (); |
| 60 |
|
| 61 |
extern CollectionOf <structNotebookEditor> theReferencesToAllOpenNotebookEditors; |
| 62 |
|
| 63 |
/* End of file NotebookEditor.h */ |
| 64 |
#endif |