eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

menus.cpp 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /***************************************************************************
  2. * Copyright (C) 2005 to 2007 by Jonathan Duddington *
  3. * email: [email protected] *
  4. * *
  5. * This program 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 3 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * 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 program; if not, see: *
  17. * <http://www.gnu.org/licenses/>. *
  18. ***************************************************************************/
  19. #include "wx/wx.h"
  20. #include "main.h"
  21. wxMenu *speak_menu;
  22. wxMenuBar *MakeMenu(int type)
  23. {//==========================
  24. wxMenu *file_menu;
  25. wxMenu *help_menu;
  26. wxMenu *option_menu = NULL;
  27. wxMenu *paths_menu;
  28. wxMenu *data_menu = NULL;
  29. wxMenu *tools_menu;
  30. wxMenu *voice_menu;
  31. wxMenu *vowelchart_menu;
  32. wxMenu *lexicon_menu;
  33. // FILE MENU
  34. file_menu = new wxMenu;
  35. file_menu->Append(MENU_SPECTRUM, _("&Open..."));
  36. file_menu->Append(MENU_SPECTRUM2, _("O&pen2..."));
  37. // file_menu->Append(MENU_PROSODY, _T("&Prosody window"));
  38. if(type==0)
  39. {
  40. }
  41. else
  42. if(type==1)
  43. {
  44. file_menu->Append(SPECTSEQ_SAVE, _("&Save"));
  45. file_menu->Append(SPECTSEQ_SAVEAS, _("Save &As..."));
  46. file_menu->Append(SPECTSEQ_SAVESELECT, _("Save Selection"));
  47. file_menu->Append(SPECTSEQ_SAVEPITCH, _T("Save Pitch &Envelope"));
  48. file_menu->Append(SPECTSEQ_CLOSE, _("&Close"));
  49. // file_menu->Append(MENU_CLOSE_ALL, _T("Close &All"));
  50. }
  51. else
  52. if(type==2)
  53. {
  54. file_menu->Append(SPECTSEQ_SAVE, _("&Save"));
  55. file_menu->Append(SPECTSEQ_SAVEAS, _("Save &As..."));
  56. // file_menu->Append(SPECTSEQ_SAVEPITCH, _T("Save Pitch &Envelope"));
  57. file_menu->Append(SPECTSEQ_CLOSE, _("&Close"));
  58. // file_menu->Append(MENU_CLOSE_ALL, _T("Close &All"));
  59. }
  60. file_menu->Append(MENU_QUIT, _("&Quit"));
  61. // SPEAK_MENU
  62. speak_menu = new wxMenu;
  63. speak_menu->Append(MENU_SPEAK_TRANSLATE, _("&Translate"));
  64. speak_menu->Append(MENU_SPEAK_RULES, _("Show &Rules"));
  65. speak_menu->Append(MENU_SPEAK_TEXT, _("&Speak"));
  66. speak_menu->AppendSeparator();
  67. speak_menu->Append(MENU_SPEAK_FILE, _("Speak &file..."));
  68. speak_menu->Append(MENU_SPEAK_PAUSE, _("&Pause"));
  69. speak_menu->Append(MENU_SPEAK_STOP, _("St&op"));
  70. // VOICE MENU
  71. voice_menu = new wxMenu;
  72. voice_menu->Append(MENU_SPEAK_VOICE, _("Select &Voice.."));
  73. voice_menu->Append(MENU_SPEAK_VOICE_VARIANT, _("Select Voice Va&riant..."));
  74. // DATA MENU
  75. data_menu = new wxMenu;
  76. data_menu->Append(MENU_COMPILE_PH, _("Compile &phoneme data"));
  77. data_menu->Append(MENU_COMPILE_DICT, _("Compile &dictionary"));
  78. data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (&debug)"));
  79. data_menu->Append(MENU_COMPILE_MBROLA, _("Compile &mbrola phonemes list..."));
  80. // OPTIONS MENU
  81. paths_menu = new wxMenu;
  82. paths_menu->Append(MENU_PATH0, _("Master phonemes file..."));
  83. paths_menu->Append(MENU_PATH1, _("Phoneme data source..."));
  84. paths_menu->Append(MENU_PATH2, _("Dictionary data source..."));
  85. paths_menu->Append(MENU_PATH3, _("Synthesized sound WAV file..."));
  86. paths_menu->AppendSeparator();
  87. paths_menu->Append(MENU_PATH4, _("Voice file to modify formant peaks..."));
  88. option_menu = new wxMenu;
  89. option_menu->Append(MENU_PATHS, _("Set &paths"), paths_menu);
  90. option_menu->Append(MENU_PARAMS, _("Speed..."));
  91. // TOOLS
  92. vowelchart_menu = new wxMenu;
  93. vowelchart_menu->Append(MENU_VOWELCHART1, _("From compiled phoneme data"));
  94. vowelchart_menu->Append(MENU_VOWELCHART2, _("From list of formants..."));
  95. vowelchart_menu->Append(MENU_VOWELCHART3, _("From directory of vowel files..."));
  96. lexicon_menu = new wxMenu;
  97. lexicon_menu->Append(MENU_LEXICON_RU, _("Russian (lexicon.dict)"));
  98. lexicon_menu->Append(MENU_LEXICON_DE, _("German"));
  99. lexicon_menu->Append(MENU_LEXICON_IT, _("Italian"));
  100. lexicon_menu->Append(MENU_LEXICON_IT2, _("Italian, pass 2"));
  101. tools_menu = new wxMenu;
  102. tools_menu->Append(MENU_VOWELCHART, _("Make &Vowels Chart"), vowelchart_menu);
  103. // tools_menu->Append(MENU_LOAD_WAV, _T("Analyse WAV file"));
  104. tools_menu->Append(MENU_LEXICON, _("Compare &Lexicon"), lexicon_menu);
  105. tools_menu->Append(MENU_TO_UTF8, _("Convert file to &UTF8..."));
  106. tools_menu->Append(MENU_COUNT_WORDS, _("Count word &frequencies..."));
  107. tools_menu->Append(MENU_TEST , _("Test (temporary)"));
  108. // tools_menu->Append(MENU_TEST2 , _T("Test2"));
  109. // HELP MENU
  110. help_menu = new wxMenu;
  111. help_menu->Append(MENU_DOCS, _("eSpeak &Documentation"));
  112. help_menu->Append(MENU_ABOUT, _("&About"));
  113. wxMenuBar *menu_bar = new wxMenuBar;
  114. menu_bar->Append(file_menu, _("&File"));
  115. menu_bar->Append(speak_menu, _("&Speak"));
  116. menu_bar->Append(voice_menu, _("&Voice"));
  117. menu_bar->Append(option_menu, _("&Options"));
  118. menu_bar->Append(tools_menu, _("&Tools"));
  119. menu_bar->Append(data_menu, _("&Compile"));
  120. menu_bar->Append(help_menu, _("&Help"));
  121. return(menu_bar);
  122. } // end of MakeMenu