3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.tizenopensource.org/license
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef _SPEECH_APP_TTS_FORM_H_
19 #define _SPEECH_APP_TTS_FORM_H_
25 class SpeechAppTtsForm
26 : public Tizen::Ui::Controls::Form
27 , public Tizen::Ui::IActionEventListener
28 , public Tizen::Ui::Controls::IFormBackEventListener
29 , public Tizen::Ui::Scenes::ISceneEventListener
30 , public Tizen::Uix::Speech::ITextToSpeechEventListener
34 SpeechAppTtsForm(void);
35 virtual ~SpeechAppTtsForm(void);
37 result OnInitializing(void);
38 result OnTerminating(void);
40 void ShowMsgBox(void);
42 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
43 virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
44 virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
46 virtual void OnTextToSpeechInitialized(void);
47 virtual void OnTextToSpeechStatusChanged(Tizen::Uix::Speech::TextToSpeechStatus status);
48 virtual void OnTextToSpeechErrorOccurred(Tizen::Uix::Speech::TextToSpeechError error);
49 virtual void OnTextToSpeechCompleted(void);
51 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
52 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
55 static const int ID_BUTTON_SPEAK = 101;
56 static const int ID_BUTTON_PAUSE = 102;
57 static const int ID_BUTTON_RESUME = 103;
58 static const int ID_BUTTON_STOP = 104;
59 static const int ID_BUTTON_APPEND_MODE_CHECKED = 105;
60 static const int ID_BUTTON_APPEND_MODE_UNCHECKED = 106;
61 static const RequestId REQUEST_ID_EXIT = 1001;
64 Tizen::Uix::Speech::TextToSpeech* __pTts;
65 Tizen::Uix::Speech::TextToSpeechRequestMode __requestMode;
66 Tizen::Locales::Locale __sttLocale;
68 Tizen::Ui::Controls::Button* __pButtonSpeak;
69 Tizen::Ui::Controls::Button* __pButtonPause;
70 Tizen::Ui::Controls::Button* __pButtonResume;
71 Tizen::Ui::Controls::Button* __pButtonStop;