| 1 | #cxx . . $ `<file>/foned/FormantGridEditor.h`/ifndef _FormantGridEditor_h_ |
| 2 | #define _FormantGridEditor_h_cxx . . $ `foned/FormantGridEditor.h:2:9`! |
| 3 | /* FormantGridEditor.h |
| 4 | * |
| 5 | * Copyright (C) 2008-2018,2020,2022 Paul Boersma & David Weenink |
| 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 | |
| 21 | #include "FunctionEditor.h"cxx . . $ `<file>/foned/FunctionEditor.h`/ |
| 22 | #include "FormantGridArea.h"cxx . . $ `<file>/foned/FormantGridArea.h`/ |
| 23 | |
| 24 | Thing_definecxx . . $ mutableFormantGridEditor# (FormantGridEditor, FunctionEditor) { |
| 25 | DEFINE_FunctionAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865). (1, FormantGridArea, formantGridArea); |
| 26 | |
| 27 | void v1_dataChangedcxx . . $ structFormantGridEditor#v1_dataChanged(c0154a85f79216c7). (Editorcxx . . $ Editor# sender) override { |
| 28 | ourcxx . . $ `melder/melder.h:42:9`! structFunctionEditorcxx . . $ structFunctionEditor# :: v1_dataChangedcxx . . $ structFunctionEditor#v1_dataChanged(c0154a85f79216c7). (sender); |
| 29 | ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). _formantGridcxx . . $ structFormantGridArea#_formantGrid. = static_cast <FormantGridcxx . . $ FormantGrid#> (ourcxx . . $ `melder/melder.h:42:9`! datacxx . . $ structDataGui#data(e8441e10bf3a9c6e).()); |
| 30 | OrderedOfcxx . . $ OrderedOf#<structRealTiercxx . . $ structRealTier#>* tiers = |
| 31 | ( ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). editingBandwidthscxx . . $ structFormantGridArea#editingBandwidths. ? & ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). _formantGridcxx . . $ structFormantGridArea#_formantGrid. -> bandwidthscxx . . $ structFormantGrid#bandwidths. : & ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). _formantGridcxx . . $ structFormantGridArea#_formantGrid. -> formantscxx . . $ structFormantGrid#formants. ); |
| 32 | RealTiercxx . . $ RealTier# tier = tiers->atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). selectedFormantcxx . . $ structFormantGridArea#selectedFormant.]; |
| 33 | ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). functionChangedcxx . . $ structFunctionArea#functionChanged(18c8ee0a6873bee4). (tier); |
| 34 | } |
| 35 | void v_distributeAreascxx . . $ structFormantGridEditor#v_distributeAreas(49f6e7a06ebc5aa8). () override { |
| 36 | ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.0, 1.0); |
| 37 | } |
| 38 | void v_playcxx . . $ structFormantGridEditor#v_play(bc12c9ec15586e6a). (double startTime, double endTime) override { |
| 39 | FormantGridArea_playPartcxx . . $ FormantGridArea_playPart(9c4fed6f51f60245). (ourcxx . . $ `melder/melder.h:42:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), startTime, endTime, theFunctionEditor_playCallbackcxx . . $ MelderCallback#MelderCallback(b367fc31b94dacdb)., this); |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | inline autoFormantGridEditorcxx . . $ autoFormantGridEditor# FormantGridEditor_createcxx . . $ FormantGridEditor_create(c1f33b4d2c72f39f). (conststring32cxx . . $ conststring32# title, FormantGridcxx . . $ FormantGrid# formantGrid) { |
| 44 | try { |
| 45 | autoFormantGridEditorcxx . . $ autoFormantGridEditor# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (FormantGridEditor); |
| 46 | mycxx . . $ `melder/melder.h:44:9`! formantGridAreacxx . . $ structFormantGridEditor#formantGridArea(75a4fbdbdbc2f865).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). FormantGridArea_createcxx . . $ FormantGridArea_create(8cc7d800805206ad). (true, nullptr, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 47 | FunctionEditor_initcxx . . $ FunctionEditor_init(719bc58b4917372e). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), title, formantGrid); |
| 48 | return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 49 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 50 | Melder_throwcxx . . $ Melder_appendError(6298c93241566110). (U"FormantGrid window not created."); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /* End of file FormantGridEditor.h */ |
| 55 | #endif |