| 1 | /* PitchTierEditor.cpp |
| 2 | * |
| 3 | * Copyright (C) 1992-2012,2015,2016,2018,2020-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 "PitchTierEditor.h"cxx . . $ `<file>/foned/PitchTierEditor.h`/ |
| 20 | #include "EditorM.h"cxx . . $ `<file>/sys/EditorM.h`/ |
| 21 | |
| 22 | Thing_implementcxx . . $ `sys/Thing.h:65:9`! (PitchTierEditor, FunctionEditor, 0); |
| 23 | |
| 24 | static void menu_cb_PitchTierEditorHelpcxx . . $ menu_cb_PitchTierEditorHelp(523f63fbc4a918a). (PitchTierEditorcxx . . $ PitchTierEditor#, EDITOR_ARGScxx . . $ `sys/EditorM.h:25:9`!) { |
| 25 | HELPcxx . . $ `sys/EditorM.h:631:9`! (U"PitchTierEditor") |
| 26 | } |
| 27 | |
| 28 | static void menu_cb_PitchTierHelpcxx . . $ menu_cb_PitchTierHelp(523f63fbc4a918a). (PitchTierEditorcxx . . $ PitchTierEditor#, EDITOR_ARGScxx . . $ `sys/EditorM.h:25:9`!) { |
| 29 | HELPcxx . . $ `sys/EditorM.h:631:9`! (U"PitchTier") |
| 30 | } |
| 31 | |
| 32 | void structPitchTierEditorcxx . . $ structPitchTierEditor# :: v_createMenuItems_helpcxx . . $ structPitchTierEditor#v_createMenuItems_help(6ea9c8c6ea2f58a9). (EditorMenucxx . . $ EditorMenu# menu) { |
| 33 | PitchTierEditor_Parentcxx . . $ PitchTierEditor_Parent# :: v_createMenuItems_helpcxx . . $ structFunctionEditor#v_createMenuItems_help(6ea9c8c6ea2f58a9). (menu); |
| 34 | EditorMenu_addCommandcxx . . $ EditorMenu_addCommand(b3c50ad5ffa1d58a). (menu, U"PitchTierEditor help", 0, menu_cb_PitchTierEditorHelpcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97).); |
| 35 | EditorMenu_addCommandcxx . . $ EditorMenu_addCommand(b3c50ad5ffa1d58a). (menu, U"PitchTier help", 0, menu_cb_PitchTierHelpcxx . . $ MelderCallback#MelderCallback(aaa169a015c1cf97).); |
| 36 | } |
| 37 | |
| 38 | autoPitchTierEditorcxx . . $ autoPitchTierEditor# PitchTierEditor_createcxx . . $ PitchTierEditor_create(cea62f872858ba2f). (conststring32cxx . . $ conststring32# title, PitchTiercxx . . $ PitchTier# pitchTier, Soundcxx . . $ Sound# optionalSoundToCopy) { |
| 39 | try { |
| 40 | autoPitchTierEditorcxx . . $ autoPitchTierEditor# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (PitchTierEditor); |
| 41 | mycxx . . $ `melder/melder.h:44:9`! pitchTierAreacxx . . $ structPitchTierEditor#pitchTierArea(5efea739f7a1b3bd).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). PitchTierArea_createcxx . . $ PitchTierArea_create(bf18cc666085bdec). (true, nullptr, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 42 | if (optionalSoundToCopy) |
| 43 | mycxx . . $ `melder/melder.h:44:9`! soundAreacxx . . $ structPitchTierEditor#soundArea(f75ec617f241a3e6).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). SoundArea_createcxx . . $ SoundArea_create(4b60938fec9a8242). (false, optionalSoundToCopy, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 44 | FunctionEditor_initcxx . . $ FunctionEditor_init(719bc58b4917372e). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), title, pitchTier); |
| 45 | return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 46 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 47 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"PitchTier window not created."); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /* End of file PitchTierEditor.cpp */ |