--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.tizenopensource.org/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _APP_RESOURCE_ID_H_
+#define _APP_RESOURCE_ID_H_
+
+extern const wchar_t* IDF_FORM_MAIN;
+extern const wchar_t* IDC_BUTTON_STT;
+extern const wchar_t* IDC_BUTTON_TTS;
+
+extern const wchar_t* IDF_FORM_STT;
+extern const wchar_t* IDC_BUTTON_START;
+extern const wchar_t* IDC_BUTTON_STOP;
+extern const wchar_t* IDC_BUTTON_CANCEL;
+extern const wchar_t* IDC_LISTVIEW_LANGS;
+extern const wchar_t* IDC_LABEL_INFO;
+
+extern const wchar_t* IDF_FORM_TTS;
+extern const wchar_t* IDC_BUTTON_SPEAK;
+extern const wchar_t* IDC_BUTTON_PAUSE;
+extern const wchar_t* IDC_BUTTON_RESUME;
+extern const wchar_t* IDC_BUTTON_STOP;
+extern const wchar_t* IDC_EDITFIELD_TEXT;
+extern const wchar_t* IDC_CHECKBUTTON_MODE;
+
+#endif // _APP_RESOURCE_ID_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License) = L"";
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.tizenopensource.org/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "AppResourceId.h"
+
+const wchar_t* IDF_FORM_MAIN = L"IDF_FORM_MAIN";
+const wchar_t* IDF_FORM_STT = L"IDF_FORM_STT";
+const wchar_t* IDF_FORM_TTS = L"IDF_FORM_TTS";
+
+const wchar_t* IDC_BUTTON_STT = L"IDC_BUTTON_STT";
+const wchar_t* IDC_BUTTON_TTS = L"IDC_BUTTON_TTS";
+const wchar_t* IDC_BUTTON_START = L"IDC_BUTTON_START";
+const wchar_t* IDC_BUTTON_STOP = L"IDC_BUTTON_STOP";
+const wchar_t* IDC_BUTTON_CANCEL = L"IDC_BUTTON_CANCEL";
+const wchar_t* IDC_LISTVIEW_LANGS = L"IDC_LISTVIEW_LANGS";
+const wchar_t* IDC_LABEL_INFO = L"IDC_LABEL_INFO";
+const wchar_t* IDC_BUTTON_SPEAK = L"IDC_BUTTON_SPEAK";
+const wchar_t* IDC_BUTTON_PAUSE = L"IDC_BUTTON_PAUSE";
+const wchar_t* IDC_BUTTON_RESUME = L"IDC_BUTTON_RESUME";
+const wchar_t* IDC_EDITFIELD_TEXT = L"IDC_EDITFIELD_TEXT";
+const wchar_t* IDC_CHECKBUTTON_MODE = L"IDC_CHECKBUTTON_MODE";
#include <FApp.h>
#include "SpeechAppMainForm.h"
+#include "AppResourceId.h"
using namespace Tizen::Base;
using namespace Tizen::App;
bool
SpeechAppMainForm::Initialize(void)
{
- Construct(L"IDF_FORM_MAIN");
+ Construct(IDF_FORM_MAIN);
return true;
}
SetFormBackEventListener(this);
- Tizen::Ui::Controls::Button* pButtonStt = static_cast< Button* >(GetControl(L"IDC_BUTTON_STT"));
+ Tizen::Ui::Controls::Button* pButtonStt = static_cast< Button* >(GetControl(IDC_BUTTON_STT));
if (pButtonStt != null)
{
pButtonStt->SetActionId(ID_BUTTON_STT);
pButtonStt->AddActionEventListener(*this);
}
- Tizen::Ui::Controls::Button* pButtonTts = static_cast< Button* >(GetControl(L"IDC_BUTTON_TTS"));
+ Tizen::Ui::Controls::Button* pButtonTts = static_cast< Button* >(GetControl(IDC_BUTTON_TTS));
if (pButtonTts != null)
{
pButtonTts->SetActionId(ID_BUTTON_TTS);
#include <FGraphics.h>
#include <FLocales.h>
#include "SpeechAppSttForm.h"
+#include "AppResourceId.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
bool
SpeechAppSttForm::Initialize(void)
{
- Construct(L"IDF_FORM_STT");
+ Construct(IDF_FORM_STT);
return true;
}
SetFormBackEventListener(this);
- __pButtonStart = static_cast< Button* >(GetControl(L"IDC_BUTTON_START"));
+ __pButtonStart = static_cast< Button* >(GetControl(IDC_BUTTON_START));
if (__pButtonStart != null)
{
__pButtonStart->SetActionId(ID_BUTTON_START);
__pButtonStart->SetEnabled(true);
}
- __pButtonStop = static_cast< Button* >(GetControl(L"IDC_BUTTON_STOP"));
+ __pButtonStop = static_cast< Button* >(GetControl(IDC_BUTTON_STOP));
if (__pButtonStop != null)
{
__pButtonStop->SetActionId(ID_BUTTON_STOP);
__pButtonStop->SetEnabled(false);
}
- __pButtonCancel = static_cast< Button* >(GetControl(L"IDC_BUTTON_CANCEL"));
+ __pButtonCancel = static_cast< Button* >(GetControl(IDC_BUTTON_CANCEL));
if (__pButtonCancel != null)
{
__pButtonCancel->SetActionId(ID_BUTTON_CANCEL);
__pButtonCancel->SetEnabled(false);
}
- __pLabel = static_cast< Label* >(GetControl(L"IDC_LABEL_INFO"));
+ __pLabel = static_cast< Label* >(GetControl(IDC_LABEL_INFO));
if (__pLabel != null)
{
__pLabel->SetText("Information box");
void
SpeechAppSttForm::OnSpeechToTextInitialized(void)
{
- Tizen::Ui::Controls::ListView* pList = static_cast< ListView* >(GetControl(L"IDC_LISTVIEW_LANGS"));
+ Tizen::Ui::Controls::ListView* pList = static_cast< ListView* >(GetControl(IDC_LISTVIEW_LANGS));
if (pList != null)
{
pList->SetItemProvider(*this);
#include <FUiScenes.h>
#include <FLocales.h>
#include "SpeechAppTtsForm.h"
+#include "AppResourceId.h"
using namespace Tizen::Base;
using namespace Tizen::Ui;
bool
SpeechAppTtsForm::Initialize()
{
- Construct(L"IDF_FORM_TTS");
+ Construct(IDF_FORM_TTS);
return true;
}
SetFormBackEventListener(this);
- __pButtonSpeak = static_cast< Button* >(GetControl(L"IDC_BUTTON_SPEAK"));
+ __pButtonSpeak = static_cast< Button* >(GetControl(IDC_BUTTON_SPEAK));
if (__pButtonSpeak != null)
{
__pButtonSpeak->SetActionId(ID_BUTTON_SPEAK);
__pButtonSpeak->SetEnabled(true);
}
- __pButtonPause = static_cast< Button* >(GetControl(L"IDC_BUTTON_PAUSE"));
+ __pButtonPause = static_cast< Button* >(GetControl(IDC_BUTTON_PAUSE));
if (__pButtonPause != null)
{
__pButtonPause->SetActionId(ID_BUTTON_PAUSE);
__pButtonPause->SetEnabled(false);
}
- __pButtonResume = static_cast< Button* >(GetControl(L"IDC_BUTTON_RESUME"));
+ __pButtonResume = static_cast< Button* >(GetControl(IDC_BUTTON_RESUME));
if (__pButtonResume != null)
{
__pButtonResume->SetActionId(ID_BUTTON_RESUME);
__pButtonResume->SetEnabled(false);
}
- __pButtonStop = static_cast< Button* >(GetControl(L"IDC_BUTTON_STOP"));
+ __pButtonStop = static_cast< Button* >(GetControl(IDC_BUTTON_STOP));
if (__pButtonStop != null)
{
__pButtonStop->SetActionId(ID_BUTTON_STOP);
__pButtonStop->SetEnabled(false);
}
- CheckButton* pAppendCheckbutton = static_cast< CheckButton* >(GetControl("IDC_CHECKBUTTON_MODE"));
+ CheckButton* pAppendCheckbutton = static_cast< CheckButton* >(GetControl(IDC_CHECKBUTTON_MODE));
if (pAppendCheckbutton != null)
{
pAppendCheckbutton->SetSelected(true);
{
result r = E_SUCCESS;
- Tizen::Ui::Controls::EditField* pEditField = static_cast< EditField* >(GetControl(L"IDC_EDITFIELD_TEXT"));
+ Tizen::Ui::Controls::EditField* pEditField = static_cast< EditField* >(GetControl(IDC_EDITFIELD_TEXT));
switch (actionId)
{
Locale* pLocale = static_cast< Locale* >(pArgs->GetAt(1));
AppLog("[%ls] Received locale of STT", pLocale->GetLocaleCodeString().GetPointer());
- Tizen::Ui::Controls::EditField* pEditField = static_cast< EditField* >(GetControl(L"IDC_EDITFIELD_TEXT"));
+ Tizen::Ui::Controls::EditField* pEditField = static_cast< EditField* >(GetControl(IDC_EDITFIELD_TEXT));
pEditField->SetText(*pStr);
__sttLocale = *pLocale;