| 1 | /* PitchEditor.cpp |
| 2 | * |
| 3 | * Copyright (C) 1992-2012,2014-2022 Paul Boersma |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | * See the GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "PitchEditor.h"cxx . . $ `<file>/foned/PitchEditor.h`/ |
| 20 | #include "EditorM.h"cxx . . $ `<file>/sys/EditorM.h`/ |
| 21 | |
| 22 | Thing_implementcxx . . $ `sys/Thing.h:65:9`! (PitchEditor, FunctionEditor, 0); |
| 23 | |
| 24 | static void menu_cb_PitchEditorHelpcxx . . $ menu_cb_PitchEditorHelp(434da0a709198e97). (PitchEditorcxx . . $ PitchEditor#, EDITOR_ARGScxx . . $ `sys/EditorM.h:25:9`!) { Melder_helpcxx . . $ Melder_help(ff00d524ab0355ec). (U"PitchEditor"); } |
| 25 | static void menu_cb_PitchHelpcxx . . $ menu_cb_PitchHelp(434da0a709198e97). (PitchEditorcxx . . $ PitchEditor#, EDITOR_ARGScxx . . $ `sys/EditorM.h:25:9`!) { Melder_helpcxx . . $ Melder_help(ff00d524ab0355ec). (U"Pitch"); } |
| 26 | |
| 27 | void structPitchEditorcxx . . $ structPitchEditor# :: v_createMenuItems_helpcxx . . $ structPitchEditor#v_createMenuItems_help(6ea9c8c6ea2f58a9). (EditorMenucxx . . $ EditorMenu# menu) { |
| 28 | PitchEditor_Parentcxx . . $ PitchEditor_Parent# :: v_createMenuItems_helpcxx . . $ structFunctionEditor#v_createMenuItems_help(6ea9c8c6ea2f58a9). (menu); |
| 29 | EditorMenu_addCommandcxx . . $ EditorMenu_addCommand(b3c50ad5ffa1d58a). (menu, U"PitchEditor help", U'?', menu_cb_PitchEditorHelpcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97).); |
| 30 | EditorMenu_addCommandcxx . . $ EditorMenu_addCommand(b3c50ad5ffa1d58a). (menu, U"Pitch help", 0, menu_cb_PitchHelpcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97).); |
| 31 | } |
| 32 | |
| 33 | autoPitchEditorcxx . . $ autoPitchEditor# PitchEditor_createcxx . . $ PitchEditor_create(9a18808c8872da4). (conststring32cxx . . $ conststring32# title, Pitchcxx . . $ Pitch# pitch) { |
| 34 | try { |
| 35 | autoPitchEditorcxx . . $ autoPitchEditor# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (PitchEditor); |
| 36 | mycxx . . $ `melder/melder.h:44:9`! pitchAreacxx . . $ structPitchEditor#pitchArea(a7c0b3918ecb0692).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). PitchArea_createcxx . . $ PitchArea_create(d692bc7b384acd1f). (true, nullptr, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 37 | FunctionEditor_initcxx . . $ FunctionEditor_init(719bc58b4917372e). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), title, pitch); |
| 38 | return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 39 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 40 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"Pitch window not created."); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | /* End of file PitchEditor.cpp */ |