SpectrumEditor.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _SpectrumEditor_h_
  2. #define _SpectrumEditor_h_
  3. /* SpectrumEditor.h
  4. *
  5. * Copyright (C) 1992-2011,2012,2013,2015 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 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. #include "FunctionEditor.h"
  21. #include "Spectrum.h"
  22. Thing_define (SpectrumEditor, FunctionEditor) {
  23. double minimum, maximum, cursorHeight;
  24. GuiMenuItem publishBandButton, publishSoundButton;
  25. void v_createMenus ()
  26. override;
  27. void v_createHelpMenuItems (EditorMenu menu)
  28. override;
  29. void v_dataChanged ()
  30. override;
  31. void v_draw ()
  32. override;
  33. bool v_click (double xWC, double yWC, bool shiftKeyPressed)
  34. override;
  35. void v_play (double tmin, double tmax)
  36. override;
  37. void v_createMenuItems_view (EditorMenu menu)
  38. override;
  39. conststring32 v_format_domain ()
  40. override { return U"Frequency domain:"; }
  41. const char * v_format_short ()
  42. override { return "%.0f"; }
  43. const char * v_format_long ()
  44. override { return "%.2f"; }
  45. int v_fixedPrecision_long ()
  46. override { return 2; }
  47. conststring32 v_format_units ()
  48. override { return U"hertz"; }
  49. const char * v_format_totalDuration ()
  50. override { return u8"Total bandwidth %.2f hertz"; }
  51. const char * v_format_window ()
  52. override { return u8"Visible part %.2f hertz"; }
  53. const char * v_format_selection ()
  54. override { return u8"%.2f Hz"; }
  55. #include "SpectrumEditor_prefs.h"
  56. };
  57. autoSpectrumEditor SpectrumEditor_create (conststring32 title, Spectrum data);
  58. /* End of file SpectrumEditor.h */
  59. #endif