if (__pLabelId != null)
{
String string;
- GET_STRING_CONFIG(__pLabelId, string);
+ Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pLabelId, string);
out = string;
}
else if(__label.GetLength() > 0)
if (__pTraitId != null)
{
String string;
- GET_STRING_CONFIG(__pTraitId, string);
+ Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pTraitId, string);
+ out += L", ";
out += string;
}
else if(__traitString.GetLength() > 0)
if (__pValueId != null)
{
String string;
- GET_STRING_CONFIG(__pValueId, string);
+ Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pValueId, string);
+ out += L", ";
out += string;
}
else if(__value.GetLength() > 0)
if (__pStatusId != null)
{
String string;
- GET_STRING_CONFIG(__pStatusId, string);
+ Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pStatusId, string);
+ out += L", ";
out += string;
}
else if(__status.GetLength() > 0)
if (__pHintId != null)
{
String string;
- GET_STRING_CONFIG(__pHintId, string);
+ Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pHintId, string);
+ out += L", ";
out += string;
}
else if(__hint.GetLength() > 0)
void
_AccessibilityElement::SetLabelWithStringId(const char* id)
{
+ if(__pLabelId)
+ {
+ delete [] __pLabelId;
+ __pLabelId = null;
+ }
int length = strlen(id);
if(length == 0)
{
- __pLabelId = null;
return;
}
__pLabelId = new char[length+1];
strcpy(__pLabelId, id);
- __pLabelId[length] = '0';
+ __pLabelId[length] = '\0';
}
void
_AccessibilityElement::SetTraitWithStringId(const char* id)
{
+ if(__pTraitId)
+ {
+ delete [] __pTraitId;
+ __pTraitId = null;
+ }
int length = strlen(id);
if(length == 0)
{
- __pTraitId = null;
return;
}
__pTraitId = new char[length+1];
strcpy(__pTraitId, id);
- __pTraitId[length] = '0';
+ __pTraitId[length] = '\0';
}
void
_AccessibilityElement::SetHintWithStringId(const char* id)
{
+ if(__pHintId)
+ {
+ delete [] __pHintId;
+ __pHintId = null;
+ }
+
int length = strlen(id);
if(length == 0)
{
- __pHintId = null;
return;
}
__pHintId = new char[length+1];
strcpy(__pHintId, id);
- __pHintId[length] = '0';
+ __pHintId[length] = '\0';
}
void
_AccessibilityElement::SetStatusWithStringId(const char* id)
{
+ if(__pStatusId)
+ {
+ delete [] __pStatusId;
+ __pStatusId = null;
+ }
int length = strlen(id);
if(length == 0)
{
- __pStatusId = null;
return;
}
__pStatusId = new char[length+1];
strcpy(__pStatusId, id);
- __pStatusId[length] = '0';
+ __pStatusId[length] = '\0';
}
void
_AccessibilityElement::SetValueWithStringId(const char* id)
{
+ if(__pValueId)
+ {
+ delete [] __pValueId;
+ __pValueId = null;
+ }
int length = strlen(id);
if(length == 0)
{
- __pValueId = null;
return;
}
__pValueId = new char[length+1];
strcpy(__pValueId, id);
- __pValueId[length] = '0';
+ __pValueId[length] = '\0';
}
}}
{
__pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetName(L"Animation");
- __pAccessibilityElement->SetTrait(L"Animation");
+ __pAccessibilityElement->SetLabel(L"Processing");
+ //__pAccessibilityElement->SetTrait(L"");
pContainer->AddElement(*__pAccessibilityElement);
}
}
__pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
__pTextElement->SetLabel(GetText());
- __pTextElement->SetTrait(L"Button");
+ __pTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pTextElement->SetName(L"ButtonText");
pContainer->AddElement(*__pTextElement);
}
__pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
__pButtonElement->SetLabel(label + GetText());
- __pButtonElement->SetTrait(L"Tickbox");
+ __pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TICKBOX_T_TTS");
__pButtonElement->SetName(L"CheckButtonText");
if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
}
__pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF()));
__pDetailButtonElement->SetLabel(L"More");
- __pDetailButtonElement->SetTrait(L"Button");
+ __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pDetailButtonElement->SetName(L"MoreButtonText");
}
}
}
__pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
__pButtonElement->SetLabel(label + GetText());
- __pButtonElement->SetTrait(L"Radio Button");
+ __pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_RADIO_BUTTON_T_TTS");
__pButtonElement->SetName(L"CheckButtonText");
if (__checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
}
__pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF()));
__pDetailButtonElement->SetLabel(L"More");
- __pDetailButtonElement->SetTrait(L"Button");
+ __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pDetailButtonElement->SetName(L"MoreButtonText");
}
}
}
__pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
__pButtonElement->SetLabel(label + GetText());
- __pButtonElement->SetTrait(L"On off button");
+ __pButtonElement->SetTrait("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS");
__pButtonElement->SetName(L"CheckButtonText");
}
UpdateAccessibilityCheckStatus();
{
if(__selected)
{
- __pButtonElement->SetValue(L"tick");
+ __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_TICK_T_TTS");
}
else
{
- __pButtonElement->SetValue(L"untick");
+ __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_UNTICK_T_TTS");
}
}
}
{
if(__selected)
{
- __pButtonElement->SetValue(L"selected");
+ __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
}
else
{
{
if(__selected)
{
- __pButtonElement->SetValue(L"on");
+ __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON");
}
else
{
- __pButtonElement->SetValue(L"off");
+ __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF");
}
}
}
__pHueBarElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- String hintText(L"flick up and down to adjust");
-
__pHueBarElement->SetName("ColorPickerColorSlider");
__pHueBarElement->SetLabel("Hue Slider");
- __pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
- __pHueBarElement->SetHint(hintText);
+ __pHueBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
__pHueBarElement->SetSupportOperatingGesture(false);
__pHueBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y, floatBounds.width, blockHeight));
pContainer->AddElement(*__pHueBarElement);
__pSaturationBarElement->SetName("ColorPickerSaturationSlider");
__pSaturationBarElement->SetLabel("Saturation Slider");
__pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
- __pSaturationBarElement->SetHint(hintText);
+ __pSaturationBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
__pSaturationBarElement->SetSupportOperatingGesture(false);
__pSaturationBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + blockHeight, floatBounds.width, blockHeight));
pContainer->AddElement(*__pSaturationBarElement);
__pLuminanceBarElement->SetName("ColorPickerBrightnessSlider");
__pLuminanceBarElement->SetLabel("Luminance Slider");
__pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
- __pLuminanceBarElement->SetHint(hintText);
+ __pLuminanceBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
__pLuminanceBarElement->SetSupportOperatingGesture(false);
__pLuminanceBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + 2 * blockHeight, floatBounds.width, blockHeight));
pContainer->AddElement(*__pLuminanceBarElement);
SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
pElementContextMenu->SetSupportOperatingGesture(false);
- pElementContextMenu->SetTrait(L"Contextual popup");
+ pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElementContextMenu->SetHint(L"double tap to close");
pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
pContainer->AddElement(*pElementContextMenu);
pElement->SetLabel(pItem->GetText());
}
- pElement->SetTrait(L"Contextual popup");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElement->SetBounds(pItem->GetDrawRect());
pContainer->AddElement(*pElement);
__pContextMenu->AddAccessibilityElement(*pElement);
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
- pElement->SetTrait(L"Contextual popup");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
pContainer->AddElement(*pElement);
}
SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
pElementContextMenu->SetSupportOperatingGesture(false);
- pElementContextMenu->SetTrait(L"Contextual popup");
+ pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElementContextMenu->SetHint(L"double tap to close");
pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
pContainerContextMenu->AddElement(*pElementContextMenu);
String labelText = itemText;
pAccessibilityElement->SetBounds(itemBounds);
pAccessibilityElement->SetLabel(labelText);
- pAccessibilityElement->SetTrait(GetAccessibilityTraitValue());
+ pAccessibilityElement->SetTraitWithStringId(GetAccessibilityTraitValue());
pContainer->AddElement(*pAccessibilityElement);
__accessibilityElements.Add(pAccessibilityElement);
String labelText = itemText;
pAccessibilityElement->SetBounds(itemBounds);
pAccessibilityElement->SetLabel(labelText);
- pAccessibilityElement->SetTrait(GetAccessibilityTraitValue());
+ pAccessibilityElement->SetTraitWithStringId(GetAccessibilityTraitValue());
pContainer->InsertElement(*pAccessibilityElement, index);
__accessibilityElements.InsertAt(pAccessibilityElement, index);
return;
}
-AccessibilityTraits
-_DateTimeBar::GetAccessibilityTraitValue()
+const char*
+_DateTimeBar::GetAccessibilityTraitValue() const
{
- AccessibilityTraits traitsValue = ACCESSIBILITY_TRAITS_NONE;
+ const char* ACCESSIBILITY_TRAITS_DAY = "IDS_TPLATFORM_BODY_DAY_LC";
+ const char* ACCESSIBILITY_TRAITS_MONTH = "IDS_TPLATFORM_BODY_MONTH_LC";
+ const char* ACCESSIBILITY_TRAITS_YEAR = "IDS_TPLATFORM_BODY_YEAR_LC";
+ const char* ACCESSIBILITY_TRAITS_HOUR = "IDS_TPLATFORM_BODY_HOUR_LC";
+ const char* ACCESSIBILITY_TRAITS_MINUTE = "IDS_TPLATFORM_BODY_MINUTE_LC";
+ char* traitsValue = null;
if (GetSelectedBoxId() == DATETIME_ID_DAY)
{
- traitsValue = ACCESSIBILITY_TRAITS_DAY;
+ traitsValue = const_cast<char*>(ACCESSIBILITY_TRAITS_DAY);
}
else if (GetSelectedBoxId() == DATETIME_ID_MONTH)
{
- traitsValue = ACCESSIBILITY_TRAITS_MONTH;
+ traitsValue = const_cast<char*>(ACCESSIBILITY_TRAITS_MONTH);
}
else if (GetSelectedBoxId() == DATETIME_ID_YEAR)
{
- traitsValue = ACCESSIBILITY_TRAITS_YEAR;
+ traitsValue = const_cast<char*>(ACCESSIBILITY_TRAITS_YEAR);
}
else if (GetSelectedBoxId() == DATETIME_ID_HOUR)
{
- traitsValue = ACCESSIBILITY_TRAITS_HOUR;
+ traitsValue = const_cast<char*>(ACCESSIBILITY_TRAITS_HOUR);
}
else if (GetSelectedBoxId() == DATETIME_ID_MINUTE)
{
- traitsValue = ACCESSIBILITY_TRAITS_MINUTE;
+ traitsValue = const_cast<char*>(ACCESSIBILITY_TRAITS_MINUTE);
}
return traitsValue;
_DateTimePicker::SetAccessibilityElementText(int index, const String& text, bool isAmPm)
{
_AccessibilityElement* pElement = null;
- String hintAmPmText(L"Double tap to change to ");
if (__accessibilityElements.GetAt(index, pElement) == E_SUCCESS)
{
dateTimeUtils.GetAmPm(amText, AM_TYPE);
dateTimeUtils.GetAmPm(pmText, PM_TYPE);
- if (text == amText)
- {
- hintAmPmText.Append(pmText);
- }
- else
- {
- hintAmPmText.Append(amText);
- }
-
- pElement->SetHint(hintAmPmText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_CHANGE_T_TTS");
}
}
switch (displayBoxId)
{
case DATETIME_ID_DAY:
- pElement->SetTrait(ACCESSIBILITY_TRAITS_DAY);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC");
pElement->SetHint(hintText);
break;
case DATETIME_ID_MONTH:
- pElement->SetTrait(ACCESSIBILITY_TRAITS_MONTH);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC");
pElement->SetHint(hintText);
break;
case DATETIME_ID_YEAR:
- pElement->SetTrait(ACCESSIBILITY_TRAITS_YEAR);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC");
pElement->SetHint(hintText);
break;
case DATETIME_ID_HOUR:
- pElement->SetTrait(ACCESSIBILITY_TRAITS_HOUR);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC");
pElement->SetHint(hintText);
break;
case DATETIME_ID_MINUTE:
- pElement->SetTrait(ACCESSIBILITY_TRAITS_MINUTE);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC");
pElement->SetHint(hintText);
break;
}
}
}
- // AmPm Button
- String hintAmPmText(L"Double tap to change");
-
pAmPmBox = __pPresenter->GetAmPmBox();
if (pAmPmBox != null)
{
pElement->SetLabel(pAmPmBox->GetText());
pElement->SetBounds(amPmBoxBounds);
- pElement->SetTrait(ACCESSIBILITY_TRAITS_BUTTON);
- pElement->SetHint(hintAmPmText);
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_CHANGE_T_TTS");
pContainer->AddElement(*pElement);
}
{
__pClearButtonTextAccessibilityElement = new _AccessibilityElement(true);
__pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
- __pClearButtonTextAccessibilityElement->SetLabel(L"all clear, button");
- __pClearButtonTextAccessibilityElement->SetTrait(L"Edit Field");
+ __pClearButtonTextAccessibilityElement->SetLabel(L"all clear");
+ __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton");
pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement);
}
__pClearButtonTextAccessibilityElement = new _AccessibilityElement(true);
__pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
__pClearButtonTextAccessibilityElement->SetLabel(L"all clear");
- __pClearButtonTextAccessibilityElement->SetTrait(L"Button");
+ __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton");
pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement);
}
__pAccessibilityYearElement = new _AccessibilityElement(true);
__pAccessibilityYearElement->SetBounds(yearBounds);
- __pAccessibilityYearElement->SetTrait(ACCESSIBILITY_TRAITS_YEAR);
+ __pAccessibilityYearElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC");
__pAccessibilityYearElement->SetHint(hintText);
__pAccessibilityMonthElement = new _AccessibilityElement(true);
__pAccessibilityMonthElement->SetBounds(monthBounds);
- __pAccessibilityMonthElement->SetTrait(ACCESSIBILITY_TRAITS_MONTH);
+ __pAccessibilityMonthElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC");
__pAccessibilityMonthElement->SetHint(hintText);
__pAccessibilityDayElement = new _AccessibilityElement(true);
__pAccessibilityDayElement->SetBounds(dayBounds);
- __pAccessibilityDayElement->SetTrait(ACCESSIBILITY_TRAITS_DAY);
+ __pAccessibilityDayElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC");
__pAccessibilityDayElement->SetHint(hintText);
_DateTimeUtils dateTimeUtils;
__pAccessibilityHourElement = new _AccessibilityElement(true);
__pAccessibilityHourElement->SetBounds(hourBounds);
- __pAccessibilityHourElement->SetTrait(ACCESSIBILITY_TRAITS_HOUR);
+ __pAccessibilityHourElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC");
__pAccessibilityHourElement->SetHint(hintText);
pContainer->AddElement(*__pAccessibilityHourElement);
__pAccessibilityMinuteElement = new _AccessibilityElement(true);
__pAccessibilityMinuteElement->SetBounds(minuteBounds);
- __pAccessibilityMinuteElement->SetTrait(ACCESSIBILITY_TRAITS_MINUTE);
+ __pAccessibilityMinuteElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC");
__pAccessibilityMinuteElement->SetHint(hintText);
pContainer->AddElement(*__pAccessibilityMinuteElement);
{
__pAccessibilityAmPmElement = new _AccessibilityElement(true);
__pAccessibilityAmPmElement->SetBounds(ampmBounds);
- __pAccessibilityAmPmElement->SetTrait(ACCESSIBILITY_TRAITS_BUTTON);
+ __pAccessibilityAmPmElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
pContainer->AddElement(*__pAccessibilityAmPmElement);
__pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height));
SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityAmPmElement != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__pAccessibilityAmPmElement->SetBounds(ampmBounds);
- __pAccessibilityAmPmElement->SetTrait(ACCESSIBILITY_TRAITS_BUTTON);
+ __pAccessibilityAmPmElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
pContainer->AddElement(*__pAccessibilityAmPmElement);
__pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height));
FloatRectangle floatRect = __pRenderer->GetCanvasImageBounds(__pPresenter->SearchCanvasIndex(GetCurrentItemIndex()));
Rectangle rect(floatRect.x, floatRect.y, floatRect.width, floatRect.height);
pGalleryElement->SetBounds(rect);
- pGalleryElement->SetTrait(L"Image");
+ pGalleryElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_IMAGE");
pGalleryElement->SetName(L"GalleryImage");
pContainer->AddElement(*pGalleryElement);
SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pAccessibilityElement->SetName(L"ListView");
pContainer->RemoveAllElement();
if (__pAccessibilityElement == null)
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_IMAGE);
+ __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_IMAGE");
}
if (__pAccessibilityElement != null && itemIndex >= 0)
}
__pAccessibilityElement->Activate(true);
- __pAccessibilityElement->SetValue(IsChecked() ? L"selected" : L"");
+ if(IsChecked())
+ {
+ __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
+ }
__pAccessibilityElement->SetName(L"IconListViewItem" + Integer::ToString(itemIndex + 1));
__pAccessibilityElement->SetLabel(GetText());
__pAccessibilityElement->SetBounds(rect);
SysTryReturnVoidResult(NID_UI_CTRL, __pTextElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
__pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
__pTextElement->SetLabel(GetText());
- __pTextElement->SetTrait(ACCESSIBILITY_TRAITS_LABEL);
__pTextElement->SetName(L"LabelText");
pContainer->AddElement(*__pTextElement);
SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pAccessibilityElement->SetName(L"ListView");
pContainer->RemoveAllElement();
pElementMessageBox->SetSupportOperatingGesture(false);
pElementMessageBox->SetName(L"MessageBox");
- pElementMessageBox->SetTrait(L"MessageBox");
pElementMessageBox->SetHint(L"double tap to close");
pElementMessageBox->SetBounds(FloatRectangle(0.0f, 0.0f, __pMessageBox->GetBoundsF().width, __pMessageBox->GetBoundsF().height));
pContainer->AddElement(*pElementMessageBox);
__pAccessibilityElement->SetLabel(L"Progressing");
String string;
- string.Append(GetPercentComplete());
- __pAccessibilityElement->SetValue(string + L" percent");
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
+ string.Insert(GetPercentComplete(), 0);
+ __pAccessibilityElement->SetValue(string);
r = pContainer->AddElement(*__pAccessibilityElement);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pAccessibilityElement)
{
String string;
- string.Append(GetPercentComplete());
- __pAccessibilityElement->SetValue(string + L" percent");
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
+ string.Insert(GetPercentComplete(), 0);
+ __pAccessibilityElement->SetValue(string);
}
return r;
if (__pAccessibilityElement)
{
String string;
- string.Append(GetPercentComplete());
- __pAccessibilityElement->SetValue(string + L" percent");
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
+ string.Insert(GetPercentComplete(), 0);
+ __pAccessibilityElement->SetValue(string);
}
return r;
* @brief This is the implementation file for the _Slider class.
*/
+#include <stdio.h>
#include <FBaseSysLog.h>
#include <FBaseErrorDefine.h>
#include <FGrp_BitmapImpl.h>
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetLabel(__titleText);
__pAccessibilityElement->SetName(L"SliderControl");
- __pAccessibilityElement->SetTrait(L"Slider");
- __pAccessibilityElement->SetHint(L"flick up and down to adjust");
+ __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_SLIDER_T_TTS");
+ __pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
SetAccessibilityElementValue();
r = pContainer->AddElement(*__pAccessibilityElement);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
{
if (__pAccessibilityElement)
{
- String string;
- string.Append(__pSliderPresenter->GetValue());
- string.Append(L" of ");
- string.Append(__pSliderPresenter->GetMaxValue());
- __pAccessibilityElement->SetValue(string);
+ String string;
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
+ char buffer[10] = {0,};
+ sprintf(buffer, "%d", GetValue());
+ string.Replace(L"%1$d", buffer);
+ memset(buffer, 0, 10);
+ sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ string.Replace(L"%2$d", buffer);
+ __pAccessibilityElement->SetValue(string);
}
return;
{
SetValue(GetValue() + 1);
String string;
- string.Append(__pSliderPresenter->GetValue());
- string.Append(L" of ");
- string.Append(__pSliderPresenter->GetMaxValue());
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
+ char buffer[10] = {0,};
+ sprintf(buffer, "%d", GetValue());
+ string.Replace(L"%1$d", buffer);
+ memset(buffer, 0, 10);
+ sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ string.Replace(L"%2$d", buffer);
_AccessibilityManager::GetInstance()->ReadContent(string);
-
Invalidate();
return true;
}
_Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
SetValue(GetValue() - 1);
-
String string;
- string.Append(__pSliderPresenter->GetValue());
- string.Append(L" of ");
- string.Append(__pSliderPresenter->GetMaxValue());
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
+ char buffer[10] = {0,};
+ sprintf(buffer, "%d", GetValue());
+ string.Replace(L"%1$d", buffer);
+ memset(buffer, 0, 10);
+ sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ string.Replace(L"%2$d", buffer);
_AccessibilityManager::GetInstance()->ReadContent(string);
Invalidate();
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pAccessibilityElement->SetTrait(L"Tab");
- pAccessibilityElement->SetHint(L"double tap to move to content");
+ pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TAB_T_TTS");
+ pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
if (GetStyle() != _TAB_STYLE_ICON)
{
if (status == _TABITEM_STATUS_SELECTED)
{
- pAccessibilityElement->SetStatus("Selected");
+ pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pAccessibilityElement->SetHintDisabled(true);
}
else
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pAccessibilityElement->SetTrait(L"Tab");
- pAccessibilityElement->SetHint(L"double tap to move to content");
+ pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TAB_T_TTS");
+ pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
if (GetStyle() != _TAB_STYLE_ICON)
{
if (status == _TABITEM_STATUS_SELECTED)
{
- pAccessibilityElement->SetStatus("Selected");
+ pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pAccessibilityElement->SetHintDisabled(true);
}
else
if (itemStatus == _TABITEM_STATUS_SELECTED)
{
- pAccessibilityElement->SetStatus("Selected");
+ pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pAccessibilityElement->SetHintDisabled(true);
}
else
pElement = pItem->GetAccessibilityElement();
if(pElement != null)
{
- pElement->SetStatus(L"Selected");
+ pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pElement->SetHintDisabled(true);
}
pElement->Construct(L"", FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f));
pElement->SetName(L"Category" + Integer::ToString(i + 1));
pElement->SetLabel(pItem->GetText());
- pElement->SetTrait(L"Category");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CATEGORY");
FloatRectangle itemBounds = pItem->GetBounds();
itemBounds.x += __sideMargin;
pElement->SetBounds(itemBounds);
{
pElement->SetName(L"Category" + Integer::ToString(i + 1));
pElement->SetLabel(pItem->GetText());
- pElement->SetTrait(L"Category");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CATEGORY");
FloatRectangle itemBounds = pItem->GetBounds();
itemBounds.x += __sideMargin;
pElement->SetBounds(itemBounds);
if (pItem->GetStatus() != ITEM_STATUS_SELECTED)
{
- pElement->SetHint(L"Double tap to move to contents");
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
}
}
}
_AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0);
if (pElement)
{
- pElement->SetStatus(L"Selected");
+ pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pElement->SetHintDisabled(true);
}
_AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0);
if (pElement)
{
- pElement->SetStatus(L"Selected");
+ pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS");
pElement->SetHintDisabled(true);
}
}
__pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height));
}
- __pTitleTextElement->SetTrait(L"Title");
+ __pTitleTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TITLE");
__pTitleTextElement->SetName(L"HeaderTitleText");
return r;
if (position == BACK_BUTTON)
{
pButtonElement->SetLabel("Back");
- pButtonElement->SetTrait("Button");
+ pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
}
else if (position == MENU_BUTTON)
{
pButtonElement->SetLabel("Menu");
- pButtonElement->SetTrait("Button");
+ pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
}
else
{
- pButtonElement->SetTrait(L"Button");
+ pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
}
FloatRectangle floatRect = GetButtonBoundsF(position);
pButtonElement->SetBounds(FloatRectangle(0,floatRect.y, pButton->GetBoundsF().width, floatRect.height));
|| style == TOOLBAR_SEGMENTED || style == TOOLBAR_TAB_WITH_TITLE
|| style == TOOLBAR_TAB)
{
- pElement->SetHint(L"Double tap to move to contents");
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
pButton->GetAccessibilityContainer()->AddListener(*__pAccessibilityListener);
}
}
if (pBackButtonElement)
{
pBackButtonElement->SetLabel("Hide");
- pBackButtonElement->SetTrait("Button");
+ pBackButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
}
}
else
if (pBackButtonElement)
{
pBackButtonElement->SetLabel("Back");
- pBackButtonElement->SetTrait("Button");
+ pBackButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
}
}
void InsertAccessibilityElementAt(int index, const Tizen::Graphics::FloatRectangle& itemBounds, const Tizen::Base::String& itemText);
void RemoveAllAccessibilityElement(void);
void RemoveAccessibilityElementAt(int index);
- Tizen::Ui::AccessibilityTraits GetAccessibilityTraitValue();
+ const char* GetAccessibilityTraitValue() const;
Tizen::Base::String GetMonthValue(int month) const;
void SetFont(Tizen::Graphics::Font& pFont);
void SetParentWindowBounds(Tizen::Graphics::FloatRectangle& parentWindowBounds);