__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
if (__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetName(L"Animation");
__pAccessibilityElement->SetTrait(L"Animation");
pContainer->AddElement(*__pAccessibilityElement);
if (__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height));
}
return;
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
FloatRectangle floatBounds = GetClientBoundsF();
- int blockHeight = 0;
+ float blockHeight = 0.0f;
GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, blockHeight);
- Rectangle bounds = _CoordinateSystemUtils::ConvertToInteger(floatBounds);
- bounds.height = blockHeight;
if (pContainer != null)
{
__pHueBarElement->SetLabel("Hue Slider");
__pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pHueBarElement->SetHint(hintText);
- __pHueBarElement->SetBounds(bounds);
+ __pHueBarElement->SetBounds(floatBounds);
pContainer->AddElement(*__pHueBarElement);
String hueValue;
__pSaturationBarElement->SetLabel("Saturation Slider");
__pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pSaturationBarElement->SetHint(hintText);
- __pSaturationBarElement->SetBounds(Rectangle(bounds.x, bounds.y + blockHeight, bounds.width, blockHeight));
+ __pSaturationBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + blockHeight, floatBounds.width, blockHeight));
pContainer->AddElement(*__pSaturationBarElement);
String saturationValue;
__pLuminanceBarElement->SetLabel("Luminance Slider");
__pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pLuminanceBarElement->SetHint(hintText);
- __pLuminanceBarElement->SetBounds(Rectangle(bounds.x, bounds.y + 2 * blockHeight, bounds.width, blockHeight));
+ __pLuminanceBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + 2 * blockHeight, floatBounds.width, blockHeight));
pContainer->AddElement(*__pLuminanceBarElement);
String luminanceValue;
itemStatus = pDrawItem->GetStatus();
- int fontSize = GetFontSize();
+ float fontSize = GetFontSize();
TextSimple* pSimpleText = null;
TextObject* pTextObject = new (std::nothrow) TextObject;
FloatDimension textArea;
- int fontSize = 0;
+ float fontSize = 0;
GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_FONT_SIZE, __pDateTimeBar->GetOrientation(), fontSize);
SysAssertf(__pFont != null, "Font instance is null");
result r = E_SUCCESS;
_Button* pSaveButton = null;
_Button* pCancelButton = null;
- Rectangle intBounds;
FloatRectangle bounds;
String text;
_ControlOrientation orientation = GetOrientation();
r = AttachSystemChild(*pFooter);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- GET_SHAPE_CONFIG(DATETIMEPICKER::FOOTER_HEIGHT, orientation, intBounds.height);
- GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, intBounds.y);
- bounds.height = _CoordinateSystemUtils::ConvertToFloat(intBounds.height);
- bounds.y = _CoordinateSystemUtils::ConvertToFloat(intBounds.y);
+ GET_SHAPE_CONFIG(DATETIMEPICKER::FOOTER_HEIGHT, orientation, bounds.height);
+ GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, bounds.y);
+
bounds.x = 0.0f;
bounds.y = GetBoundsF().height - bounds.y - bounds.height;
bounds.width = GetBoundsF().width;
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed.");
- Rectangle displayBoxBounds = _CoordinateSystemUtils::ConvertToInteger(pBox->GetDisplayBoxBounds());
+ FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds();
int displayBoxId = pBox->GetDisplayBoxId();
String hintText(L"Double tap to edit");
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed.");
- Rectangle amPmBoxBounds = _CoordinateSystemUtils::ConvertToInteger(pAmPmBox->GetDisplayBoxBounds());
+ FloatRectangle amPmBoxBounds = pAmPmBox->GetDisplayBoxBounds();
if (__pDisplayVisualElement)
{
displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y;
}
- pElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(displayBoxBounds));
+ pElement->SetBounds(displayBoxBounds);
}
}
index++;
}
void
-_DateTimePicker::OnFontInfoRequested(unsigned long& style, int& size)
+_DateTimePicker::OnFontInfoRequested(unsigned long& style, float& size)
{
style = FONT_STYLE_PLAIN;
{
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- Rectangle dayBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY));
- Rectangle monthBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH));
- Rectangle yearBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR));
+ FloatRectangle dayBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY);
+ FloatRectangle monthBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH);
+ FloatRectangle yearBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR);
if (__pAccessibilityEditDateElement == null)
{
}
if (__pAccessibilityYearElement)
{
- __pAccessibilityYearElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR)));
+ __pAccessibilityYearElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR));
}
if (__pAccessibilityMonthElement)
{
- __pAccessibilityMonthElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH)));
+ __pAccessibilityMonthElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH));
}
if (__pAccessibilityDayElement)
{
- __pAccessibilityDayElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY)));
+ __pAccessibilityDayElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY));
}
return;
}
void
-_EditDate::OnFontInfoRequested(unsigned long& style, int& size)
+_EditDate::OnFontInfoRequested(unsigned long& style, float& size)
{
__pEditDatePresenter->OnFontInfoRequested(style, size);
}
void
-_EditDatePresenter::OnFontInfoRequested(unsigned long& style, int& size)
+_EditDatePresenter::OnFontInfoRequested(unsigned long& style, float& size)
{
style = FONT_STYLE_PLAIN;
size = __dateFontSize;
_EditTime::CreateAccessibilityElement(void)
{
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- Rectangle hourBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR));
- Rectangle minuteBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE));
- Rectangle ampmBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM));
+ FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR);
+ FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE);
+ FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM);
pContainer->AddListener(*this);
if (__pAccessibilityEditTimeElement == null)
}
if (__pAccessibilityHourElement)
{
- __pAccessibilityHourElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR)));
+ __pAccessibilityHourElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR));
}
if (__pAccessibilityMinuteElement)
{
- __pAccessibilityMinuteElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE)));
+ __pAccessibilityMinuteElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE));
}
if (__pAccessibilityAmPmElement)
{
- __pAccessibilityAmPmElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM)));
+ __pAccessibilityAmPmElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM));
}
return;
}
void
-_EditTime::OnFontInfoRequested(unsigned long& style, int& size)
+_EditTime::OnFontInfoRequested(unsigned long& style, float& size)
{
__pEditTimePresenter->OnFontInfoRequested(style, size);
, __textObject()
, __pFont(null)
, __titleObject()
- , __amPmTextSize(0)
- , __titleFontSize(0)
- , __timeFontSize(0)
+ , __amPmTextSize(0.0f)
+ , __titleFontSize(0.0f)
+ , __timeFontSize(0.0f)
, __isAnimating(false)
, __isEditTimeInitialized(false)
{
SysAssertf((pCanvas != null), "Failed to get canvas.");
FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f);
- int colonWidth = 0;
- int colonMargin = 0;
- int colonHeight = 0;
- float colonMarginF = 0.0f;
+ float colonMargin = 0.0f;
Dimension textArea;
SetTimeConversion();
- GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonWidth);
+ GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonBounds.width);
GET_SHAPE_CONFIG(EDITTIME::COLON_MARGIN, __pEditTime->GetOrientation(), colonMargin);
- GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), colonHeight);
+ GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), colonBounds.height);
- colonBounds.width = _CoordinateSystemUtils::ConvertToFloat(colonWidth);
- colonMarginF = _CoordinateSystemUtils::ConvertToFloat(colonMargin);
- colonBounds.height = _CoordinateSystemUtils::ConvertToFloat(colonHeight);
-
- colonBounds.x = hourBounds.x + hourBounds.width + colonMarginF;
+ colonBounds.x = hourBounds.x + hourBounds.width + colonMargin;
colonBounds.y = hourBounds.y + (hourBounds.height - colonBounds.height) / 2.0f;
if (__title.IsEmpty() == false)
}
result
-_EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, int textSize)
+_EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, float textSize)
{
result r = E_SUCCESS;
FloatPoint startPoint(0.0f, 0.0f);
- int titleHeight = 0;
+ float titleHeight = 0;
GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, __pEditTime->GetOrientation(), titleHeight);
- startPoint.y = _CoordinateSystemUtils::ConvertToFloat(titleHeight);
-
- __bounds = FloatRectangle(startPoint.x, startPoint.y, bounds.width, bounds.height);
+ __bounds = FloatRectangle(0.0f, titleHeight, bounds.width, bounds.height);
FloatPoint point = touchinfo.GetCurrentPosition();
}
void
-_EditTimePresenter::OnFontInfoRequested(unsigned long& style, int& size)
+_EditTimePresenter::OnFontInfoRequested(unsigned long& style, float& size)
{
style = FONT_STYLE_PLAIN;
size = __timeFontSize;
{
result r = E_SUCCESS;
- int titleTimeMargin = 0;
- int timeHeight = 0;
- int editTimeHeight = 0;
-
- float fTitleTimeMargin = 0.0f;
- float fTimeHeight = 0.0f;
- float fEditTimeHeight = 0.0f;
+ float titleTimeMargin = 0;
+ float timeHeight = 0;
+ float editTimeHeight = 0;
GET_SHAPE_CONFIG(EDITTIME::TEXT_FONT_SIZE, __pEditTime->GetOrientation(), __titleFontSize);
GET_SHAPE_CONFIG(EDITTIME::TIME_FONT_SIZE, __pEditTime->GetOrientation(), __timeFontSize);
GET_SHAPE_CONFIG(EDITTIME::TIME_HEIGHT, __pEditTime->GetOrientation(), timeHeight);
GET_SHAPE_CONFIG(EDITTIME::HEIGHT, __pEditTime->GetOrientation(), editTimeHeight);
- fTitleTimeMargin = _CoordinateSystemUtils::ConvertToFloat(titleTimeMargin);
- fTimeHeight = _CoordinateSystemUtils::ConvertToFloat(timeHeight);
- fEditTimeHeight = _CoordinateSystemUtils::ConvertToFloat(editTimeHeight);
-
- if (__pEditTime->GetBoundsF().height > fEditTimeHeight)
+ if (__pEditTime->GetBoundsF().height > editTimeHeight)
{
- fEditTimeHeight = __pEditTime->GetBoundsF().height;
+ editTimeHeight = __pEditTime->GetBoundsF().height;
}
if (__title.IsEmpty() == false)
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
- __titleBounds.y = (fEditTimeHeight - (__titleBounds.height + fTitleTimeMargin + fTimeHeight)) / 2.0f;
+ __titleBounds.y = (editTimeHeight - (__titleBounds.height + titleTimeMargin + timeHeight)) / 2.0f;
__titleObject.SetBounds(__titleBounds);
}
void
_EditTimePresenter::UpdateTimeFormat(void)
{
-
if (!__is24hoursSet)
{
String key(L"http://tizen.org/setting/locale.time.format.24hour");
__pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
pNewVisualElement->SetBounds(FloatRectangle(0.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
- rect.x = static_cast<int>(__pContentProvider->GetBounds().x);
- rect.y = static_cast<int>(__pContentProvider->GetBounds().y);
- rect.width = static_cast<int>(__pContentProvider->GetBounds().width);
- rect.height = static_cast<int>(__pContentProvider->GetBounds().height);
+ rect.x = __pContentProvider->GetBounds().x;
+ rect.y = __pContentProvider->GetBounds().y;
+ rect.width = __pContentProvider->GetBounds().width;
+ rect.height = __pContentProvider->GetBounds().height;
textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
__pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
pOldVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
- rect.x = static_cast<int>(__pContentProvider->GetBounds().x);
- rect.y = static_cast<int>(__pContentProvider->GetBounds().y);
- rect.width = static_cast<int>(__pContentProvider->GetBounds().width);
- rect.height = static_cast<int>(__pContentProvider->GetBounds().height);
+ rect.x = __pContentProvider->GetBounds().x;
+ rect.y = __pContentProvider->GetBounds().y;
+ rect.width = __pContentProvider->GetBounds().width;
+ rect.height = __pContentProvider->GetBounds().height;
textPoint.x = (rect.width - newTextDim.width) / 2.0f;
textPoint.y = (rect.height - newTextDim.height) / 2.0f;
return;
- CATCH:
+CATCH:
__isAnimating = false;
__pContentProvider->Destroy();
{
__pAccessibilityElement = new _AccessibilityElement(true);
SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetName(L"ProgressingImage");
__pAccessibilityElement->SetLabel(L"Progressing");
{
if (__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
}
return E_SUCCESS;
}
{
if (__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
}
return;
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetLabel(__titleText);
__pAccessibilityElement->SetName(L"SliderControl");
__pAccessibilityElement->SetTrait(L"Slider");
{
if(__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
}
return E_SUCCESS;
}
if (__pAccessibilityElement)
{
- __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
+ __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
}
return;
}
void
-_Slider::OnFontInfoRequested(unsigned long& style, int& size)
+_Slider::OnFontInfoRequested(unsigned long& style, float& size)
{
__pSliderPresenter->OnFontInfoRequested(style, size);
return;
, __isCustomHandle(false)
, __isCustomPressedTextColor(false)
, __groupStyle(GROUP_STYLE_NONE)
- , __fontSize(0)
+ , __fontSize(0.0f)
, __barOffset(0.0f)
{
}
}
void
-_SliderPresenter::OnFontInfoRequested(unsigned long& style, int& size)
+_SliderPresenter::OnFontInfoRequested(unsigned long& style, float& size)
{
style = FONT_STYLE_BOLD;
size = __fontSize;
result r = E_SUCCESS;
currTokenLength = text.GetLength();
- int tokenFontSize = 0;
+ float tokenFontSize = 0;\r
pTextObject = new (std::nothrow) TextObject;
SysTryReturnVoidResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_TokenEditPresenter::InitializeDescriptionText(void)
{
result r = E_SUCCESS;
- int descriptionTextSize = 0;
+ float descriptionTextSize = 0;\r
__pDescriptionTextTextObject = new (std::nothrow) TextObject();
SysTryReturnResult(NID_UI_CTRL, __pDescriptionTextTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
SetKeypadEnabled(true);
- int tokenLeftMargin = 0;
- int tokenRightMargin = 0;
- int tokenTopMargin = 0;
- int tokenBottomMargin = 0;
- int tokenHeight = 0;
+ float tokenLeftMargin = 0;\r
+ float tokenRightMargin = 0;\r
+ float tokenTopMargin = 0;\r
+ float tokenBottomMargin = 0;\r
+ float tokenHeight = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
FloatRectangle tempDspRect(__initTextRect.x, __initTextRect.y, __clientRect.width, tokenHeight);
SetTextBounds(tempDspRect);
- int textSize = 0;
+ float textSize = 0;\r
GET_SHAPE_CONFIG(TOKENEDIT::TEXT_SIZE, orientation, textSize);
Font* pFont = new (std::nothrow) Font();
{
int drawStartIndex = 0;
int tokenCount = 0;
- int tokenTextLeftMargin = 0;
- int tokenVerticalSpacing = 0;
+ float tokenTextLeftMargin = 0;\r
+ float tokenVerticalSpacing = 0;\r
bool isCustomBitmap = false;
SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
int tokenCount = __pTokenList->GetCount();
- int tokenLeftMargin = 0;
- int tokenRighttMargin = 0;
- int tokenTopMargin = 0;
- int tokenBottomMargin = 0;
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenHorizontalSpacing = 0;
- int tokenTextLeftMargin = 0;
- int tokenTextRightMargin = 0;
- int descriptionTextRightMargin = 0;
+ float tokenLeftMargin = 0;\r
+ float tokenRighttMargin = 0;\r
+ float tokenTopMargin = 0;\r
+ float tokenBottomMargin = 0;\r
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenHorizontalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextRightMargin = 0;\r
+ float descriptionTextRightMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
{
result r = E_SUCCESS;
- int tokenTopMargin = 0;
- int tokenHeight = 0;
- int tokenMinWidth = 0;
- int tokenVerticalSpacing = 0;
- int tokenHorizontalSpacing = 0;
- int tokenTextLeftMargin = 0;
- int tokenTextRightMargin = 0;
+ float tokenTopMargin = 0;\r
+ float tokenHeight = 0;\r
+ float tokenMinWidth = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenHorizontalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextRightMargin = 0;\r
_ControlOrientation orientation = GetEditView()->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
- int tokenTextLeftMargin = 0;
- int tokenTextVerticalMargin = 0;
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextVerticalMargin = 0;\r
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin);
result r = E_SUCCESS;
TextSimple* pSimpleText = null;
- int tokenTopMargin = 0;
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenTextLeftMargin = 0;
- int tokenTextRightMargin = 0;
- int tokenTitleWidth = 0;
+ float tokenTopMargin = 0;\r
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextRightMargin = 0;\r
+ float tokenTitleWidth = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
if (__pDescriptionTextTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName())
{
- int descriptionTextSize = 0;
+ float descriptionTextSize = 0;\r
GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize);
pDescriptionFont = new (std::nothrow) Font();
{
result r = E_SUCCESS;
- int tokenTextRightMargin = 0;
- int tokenMinimumSize = 0;
+ float tokenTextRightMargin = 0;\r
+ float tokenMinimumSize = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
{
result r = E_SUCCESS;
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenTextLeftMargin = 0;
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
_TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
{
bool needToScroll = false;
- int tokenTopMargin = 0;
- int tokenBottomMargin = 0;
- int tokenVerticalSpacing = 0;
+ float tokenTopMargin = 0;\r
+ float tokenBottomMargin = 0;\r
+ float tokenVerticalSpacing = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
float
_TokenEditPresenter::CalculateFlexibleHeightF(void)
{
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenTopMargin = 0;
- int tokenBottomMargin = 0;
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenTopMargin = 0;\r
+ float tokenBottomMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
return E_SUCCESS;
}
- int tokenBottomMargin = 0;
+ float tokenBottomMargin = 0;\r
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin;
pToken->ResetToken(GetText());
TrimTokenAndAdjustEllipsisAt(__edittingTokenIndex);
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenTextLeftMargin = 0;
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
SetCursorDisabled(false);
}
- int tokenTopMargin = 0;
-
+ float tokenTopMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
if (pToken)
{
- int tokenHeight = 0;
- int tokenVerticalSpacing = 0;
- int tokenTextLeftMargin = 0;
+ float tokenHeight = 0;\r
+ float tokenVerticalSpacing = 0;\r
+ float tokenTextLeftMargin = 0;\r
SetCursorPosition(__previousCursorPosition);
_Scroll* pScroll = GetScrollBar();
if (pScroll)
{
- int tokenBottomMargin = 0;
+ float tokenBottomMargin = 0;\r
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin;
pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
SysTryReturn(NID_UI_CTRL, pToken != null, -1.0f, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
- int tokenMinimumSize = 0;
+ float tokenMinimumSize = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
SysTryReturn(NID_UI_CTRL, pToken != null, -1.0f, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
- int tokenTextLeftMargin = 0;
- int tokenTextRightMargin = 0;
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextRightMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
{
int tokenCount = __pTokenList->GetCount();
- int tokenMinimumSize = 0;
- int tokenTextLeftMargin = 0;
- int tokenTextRightMargin = 0;
+ float tokenMinimumSize = 0;\r
+ float tokenTextLeftMargin = 0;\r
+ float tokenTextRightMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
void
_TokenEditPresenter::ShrinkTokens()
{
- int tokenTextRightMargin = 0;
+ float tokenTextRightMargin = 0;\r
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
float
_TokenEditPresenter::GetPickedTokenEndPoint(int index, Tizen::Graphics::FloatRectangle tokenDispRect)
{
- int tokenTextRightMargin = 0;
+ float tokenTextRightMargin = 0;\r
float endValue = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
__scrollValue = 0.0f;
__maxScrollValue = 0.0f;
- int tokenBottomMargin = 0;
+ float tokenBottomMargin = 0;\r
float newScrollValue = 0.0f;
FloatRectangle windowBounds = GetInitialBoundsF();
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
- virtual void OnFontInfoRequested(unsigned long& style, int& size);
+ virtual void OnFontInfoRequested(unsigned long& style, float& size);
Tizen::Graphics::Font* GetDateTimeFont(void);
result InitializeFont(void);
virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
- virtual void OnFontInfoRequested(unsigned long& style, int& size);
+ virtual void OnFontInfoRequested(unsigned long& style, float& size);
virtual void OnSettingChanged(Tizen::Base::String& key);
Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const;
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control);
void OnFontChanged(Tizen::Graphics::Font* pFont);
- void OnFontInfoRequested(unsigned long& style, int& size);
+ void OnFontInfoRequested(unsigned long& style, float& size);
virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally);
virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){}
virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
void OnFontChanged(Tizen::Graphics::Font* pFont);
- void OnFontInfoRequested(unsigned long& style, int& size);
+ void OnFontInfoRequested(unsigned long& style, float& size);
virtual void OnSettingChanged(Tizen::Base::String& key);
Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const;
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control);
void OnFontChanged(Tizen::Graphics::Font* pFont);
- void OnFontInfoRequested(unsigned long& style, int& size);
+ void OnFontInfoRequested(unsigned long& style, float& size);
result Initialize(void);
void UpdateTimeFormat(void);
void SetTimeConversion(void);
result DrawTitle(Tizen::Graphics::Canvas& canvas);
- result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, int textSize = 0);
+ result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, float textSize = 0.0f);
result DrawColon(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds);
_DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const;
void SetLastSelectedId(_DateTimeId boxId);
Tizen::Graphics::Font* __pFont;
Tizen::Graphics::_Text::TextObject __titleObject;
- int __amPmTextSize;
- int __titleFontSize;
- int __timeFontSize;
+ float __amPmTextSize;
+ float __titleFontSize;
+ float __timeFontSize;
bool __isAnimating;
bool __isEditTimeInitialized;
}; // _EditTimePresenter
virtual result OnAttachedToMainTree(void);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
- virtual void OnFontInfoRequested(unsigned long& style, int& size);
+ virtual void OnFontInfoRequested(unsigned long& style, float& size);
// accessibility listener
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual void OnBoundsChanged(void);
void OnFontChanged(Tizen::Graphics::Font* pFont);
- void OnFontInfoRequested(unsigned long& style, int& size);
+ void OnFontInfoRequested(unsigned long& style, float& size);
static _SliderPresenter* CreateInstanceN(const _Slider& slider);
result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap);
bool __isCustomHandle;
bool __isCustomPressedTextColor;
GroupStyle __groupStyle;
- int __fontSize;
+ float __fontSize;
float __barOffset;
}; // _SliderPresenter