include/tts/tts_speechsettingspanel.h

Go to the documentation of this file.
00001 
00002 // Name:        ttsspeechsettingspanel.h
00003 // Purpose:     
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     19/02/2009 07:08:51
00007 // RCS-ID:      
00008 // Copyright:   (c) Anthemion Software Limited
00009 // Licence:     New BSD License
00011 
00012 #ifndef _TTSSPEECHSETTINGSPANEL_H_
00013 #define _TTSSPEECHSETTINGSPANEL_H_
00014 
00015 /*
00016  * Includes
00017  */
00018 
00020 #include "wx/hyperlink.h"
00021 #include "wx/valgen.h"
00022 #include "wx/spinctrl.h"
00024 
00025 #include "tts/tts.h"
00026 
00027 /*
00028  * Forward declarations
00029  */
00030 
00032 class wxBoxSizer;
00033 class wxHyperlinkCtrl;
00034 class wxSpinCtrl;
00036 
00037 /*
00038  * Control identifiers
00039  */
00040 
00042 #define SYMBOL_WXTTSSPEECHSETTINGSPANEL_STYLE wxTAB_TRAVERSAL
00043 #define SYMBOL_WXTTSSPEECHSETTINGSPANEL_TITLE wxEmptyString
00044 #define SYMBOL_WXTTSSPEECHSETTINGSPANEL_IDNAME ID_WXTTSSPEECHSETTINGSPANEL
00045 #define SYMBOL_WXTTSSPEECHSETTINGSPANEL_SIZE wxSize(400, 300)
00046 #define SYMBOL_WXTTSSPEECHSETTINGSPANEL_POSITION wxDefaultPosition
00048 
00049 
00055 class wxTTSSpeechSettingsPanel: public wxPanel
00056 {    
00057     DECLARE_DYNAMIC_CLASS( wxTTSSpeechSettingsPanel )
00058     DECLARE_EVENT_TABLE()
00059 
00060 public:
00062     wxTTSSpeechSettingsPanel();
00063     wxTTSSpeechSettingsPanel( wxWindow* parent, wxWindowID id = SYMBOL_WXTTSSPEECHSETTINGSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXTTSSPEECHSETTINGSPANEL_POSITION, const wxSize& size = SYMBOL_WXTTSSPEECHSETTINGSPANEL_SIZE, long style = SYMBOL_WXTTSSPEECHSETTINGSPANEL_STYLE );
00064 
00066     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXTTSSPEECHSETTINGSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXTTSSPEECHSETTINGSPANEL_POSITION, const wxSize& size = SYMBOL_WXTTSSPEECHSETTINGSPANEL_SIZE, long style = SYMBOL_WXTTSSPEECHSETTINGSPANEL_STYLE );
00067 
00069     ~wxTTSSpeechSettingsPanel();
00070 
00072     void Init();
00073 
00075     void CreateControls();
00076 
00078     void ApplyInfo(wxTTSSpeechSettingsInfo& info);
00079 
00081     void SetInfo(const wxTTSSpeechSettingsInfo& info) { m_info = info; ApplyInfo(m_info); }
00082 
00084     const wxTTSSpeechSettingsInfo& GetInfo() const { return m_info; }
00085 
00087     virtual bool TransferDataToWindow();
00088     virtual bool TransferDataFromWindow();
00089 
00091     static void SetShowToolTips(bool show) { m_showToolTips = show; }
00092     static bool GetShowToolTips() { return m_showToolTips; }
00093 
00095 
00097     void OnApplicationPreferencesEngineSelected( wxCommandEvent& event );
00098 
00100     void OnApplicationPreferencesEngineProgramLocationUpdate( wxUpdateUIEvent& event );
00101 
00103     void OnApplicationPreferencesBrowseEngineProgramLocationClick( wxCommandEvent& event );
00104 
00106     void OnApplicationPreferencesBrowseEngineProgramLocationUpdate( wxUpdateUIEvent& event );
00107 
00109     void OnApplicationPreferencesEngineDataFolderUpdate( wxUpdateUIEvent& event );
00110 
00112     void OnApplicationPreferencesBrowseEspeakDataFolderClick( wxCommandEvent& event );
00113 
00115     void OnApplicationPreferencesBrowseEspeakDataFolderUpdate( wxUpdateUIEvent& event );
00116 
00118     void OnApplicationPreferencesEspeakVoiceUpdate( wxUpdateUIEvent& event );
00119 
00121     void OnApplicationPreferencesEspeakVoiceVariantUpdate( wxUpdateUIEvent& event );
00122 
00124     void OnApplicationPreferencesSpeechSpeedUpdate( wxUpdateUIEvent& event );
00125 
00127     void OnApplicationPreferencesSpeechVolumeUpdate( wxUpdateUIEvent& event );
00128 
00130     void OnApplicationPreferencesSpeechPitchUpdate( wxUpdateUIEvent& event );
00131 
00133     void OnApplicationPreferencesTestSpeechClick( wxCommandEvent& event );
00134 
00136     void OnApplicationPreferencesEditPronunciationsClick( wxCommandEvent& event );
00137 
00139     void OnApplicationPreferencesResetSpeechSettingsClick( wxCommandEvent& event );
00140 
00142 
00144 
00146     wxBitmap GetBitmapResource( const wxString& name );
00147 
00149     wxIcon GetIconResource( const wxString& name );
00151 
00153     static bool ShowToolTips();
00154 
00156     wxBoxSizer* m_innerSizer;
00157     wxChoice* m_speechEngineCtrl;
00158     wxHyperlinkCtrl* m_urlCtrl;
00159     wxTextCtrl* m_engineProgramLocation;
00160     wxTextCtrl* m_engineDataFolder;
00161     wxComboBox* m_speechVoice;
00162     wxComboBox* m_speechVoiceVariant;
00163     wxSpinCtrl* m_speechSpeed;
00164     wxSpinCtrl* m_speechVolume;
00165     wxSpinCtrl* m_speechPitch;
00166     wxTextCtrl* m_speechTestText;
00167     wxBoxSizer* m_buttonGroupSizer;
00168     wxButton* m_testSpeechCtrl;
00169     wxButton* m_editCustomPronunciationsCtrl;
00170     wxButton* m_resetSpeechSettingsCtrl;
00172     enum {
00173         ID_WXTTSSPEECHSETTINGSPANEL = 13001,
00174         ID_APPLICATION_PREFERENCES_ENGINE = 13002,
00175         ID_APPLICATION_PREFERENCES_GET_ESPEAK = 13003,
00176         ID_APPLICATION_PREFERENCES_ENGINE_PROGRAM_LOCATION = 13004,
00177         ID_APPLICATION_PREFERENCES_BROWSE_ENGINE_PROGRAM_LOCATION = 13005,
00178         ID_APPLICATION_PREFERENCES_ENGINE_DATA_FOLDER = 13006,
00179         ID_APPLICATION_PREFERENCES_BROWSE_ESPEAK_DATA_FOLDER = 13007,
00180         ID_APPLICATION_PREFERENCES_ESPEAK_VOICE = 13008,
00181         ID_APPLICATION_PREFERENCES_ESPEAK_VOICE_VARIANT = 13009,
00182         ID_APPLICATION_PREFERENCES_SPEECH_SPEED = 13010,
00183         ID_APPLICATION_PREFERENCES_SPEECH_VOLUME = 13011,
00184         ID_APPLICATION_PREFERENCES_SPEECH_PITCH = 13012,
00185         ID_APPLICATION_PREFERENCES_SPEECH_TEST_TEXT = 13013,
00186         ID_APPLICATION_PREFERENCES_TEST_SPEECH = 13014,
00187         ID_APPLICATION_PREFERENCES_EDIT_PRONUNCIATIONS = 13015,
00188         ID_APPLICATION_PREFERENCES_RESET_SPEECH_SETTINGS = 13016
00189     };
00191 
00192     wxTTSSpeechSettingsInfo m_info;
00193     bool                    m_ignoreEvents;
00194     static bool             m_showToolTips;
00195 };
00196 
00197 #endif
00198     // _TTSSPEECHSETTINGSPANEL_H_

Generated on Wed May 6 19:20:19 2009 for AxTk by  doxygen 1.5.1