OptimalCeilingTierEditor.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* OptimalCeilingTierEditor.cpp
  2. *
  3. * Copyright (C) 2015 David Weenink
  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. #include "OptimalCeilingTierEditor.h"
  19. #include "EditorM.h"
  20. Thing_implement (OptimalCeilingTierEditor, RealTierEditor, 0);
  21. static void menu_cb_OptimalCeilingTierHelp (OptimalCeilingTierEditor, EDITOR_ARGS_DIRECT) { Melder_help (U"OptimalCeilingTier"); }
  22. void structOptimalCeilingTierEditor :: v_createHelpMenuItems (EditorMenu menu) {
  23. OptimalCeilingTierEditor_Parent :: v_createHelpMenuItems (menu);
  24. EditorMenu_addCommand (menu, U"OptimalCeilingTier help", 0, menu_cb_OptimalCeilingTierHelp);
  25. }
  26. void structOptimalCeilingTierEditor :: v_play (double fromTime, double toTime) {
  27. if (our d_sound.data) {
  28. Sound_playPart (our d_sound.data, fromTime, toTime, theFunctionEditor_playCallback, this);
  29. } else {
  30. //OptimalCeilingTier_playPart (data, fromTime, toTime, false);
  31. }
  32. }
  33. autoOptimalCeilingTierEditor OptimalCeilingTierEditor_create (conststring32 title, OptimalCeilingTier octier, Sound sound, bool ownSound) {
  34. try {
  35. autoOptimalCeilingTierEditor me = Thing_new (OptimalCeilingTierEditor);
  36. RealTierEditor_init (me.get(), title, (RealTier) octier, sound, ownSound);
  37. return me;
  38. } catch (MelderError) {
  39. Melder_throw (U"OptimalCeilingTier window not created.");
  40. }
  41. }
  42. /* End of file OptimalCeilingTierEditor.cpp */