result r = E_SUCCESS;
currTokenLength = text.GetLength();
- float tokenFontSize = 0;\r
+ float tokenFontSize = 0.0f;
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;
- float descriptionTextSize = 0;\r
+ float descriptionTextSize = 0.0f;
__pDescriptionTextTextObject = new (std::nothrow) TextObject();
SysTryReturnResult(NID_UI_CTRL, __pDescriptionTextTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
SetKeypadEnabled(true);
- float tokenLeftMargin = 0;\r
- float tokenRightMargin = 0;\r
- float tokenTopMargin = 0;\r
- float tokenBottomMargin = 0;\r
- float tokenHeight = 0;\r
+ float tokenLeftMargin = 0.0f;
+ float tokenRightMargin = 0.0f;
+ float tokenTopMargin = 0.0f;
+ float tokenBottomMargin = 0.0f;
+ float tokenHeight = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
FloatRectangle tempDspRect(__initTextRect.x, __initTextRect.y, __clientRect.width, tokenHeight);
SetTextBounds(tempDspRect);
- float textSize = 0;\r
+ float textSize = 0.0f;
GET_SHAPE_CONFIG(TOKENEDIT::TEXT_SIZE, orientation, textSize);
Font* pFont = new (std::nothrow) Font();
}
else
{
- _EditPresenter::DrawText();
+ _VisualElement* pTextVisualElement = null;
+ pTextVisualElement = GetTextVisualElement();
+ if (pTextVisualElement)
+ {
+ _EditPresenter::DrawText();
+ }
+ else
+ {
+ Canvas* pCanvas = __pTokenEdit->GetCanvasN();
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of Control.");
+
+ _EditPresenter::DrawText(*pCanvas);
+ }
}
}
{
int drawStartIndex = 0;
int tokenCount = 0;
- float tokenTextLeftMargin = 0;\r
- float tokenVerticalSpacing = 0;\r
+ float tokenTextLeftMargin = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
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();
- 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
+ float tokenLeftMargin = 0.0f;
+ float tokenRighttMargin = 0.0f;
+ float tokenTopMargin = 0.0f;
+ float tokenBottomMargin = 0.0f;
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenHorizontalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextRightMargin = 0.0f;
+ float descriptionTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
{
result r = E_SUCCESS;
- 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
+ float tokenTopMargin = 0.0f;
+ float tokenHeight = 0.0f;
+ float tokenMinWidth = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenHorizontalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextRightMargin = 0.0f;
_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();
- float tokenTextLeftMargin = 0;\r
- float tokenTextVerticalMargin = 0;\r
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextVerticalMargin = 0.0f;
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;
- float tokenTopMargin = 0;\r
- float tokenHeight = 0;\r
- float tokenVerticalSpacing = 0;\r
- float tokenTextLeftMargin = 0;\r
- float tokenTextRightMargin = 0;\r
- float tokenTitleWidth = 0;\r
+ float tokenTopMargin = 0.0f;
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextRightMargin = 0.0f;
+ float tokenTitleWidth = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
if (__pDescriptionTextTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName())
{
- float descriptionTextSize = 0;\r
+ float descriptionTextSize = 0.0f;
GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize);
pDescriptionFont = new (std::nothrow) Font();
{
result r = E_SUCCESS;
- float tokenTextRightMargin = 0;\r
- float tokenMinimumSize = 0;\r
+ float tokenTextRightMargin = 0.0f;
+ float tokenMinimumSize = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
{
result r = E_SUCCESS;
- float tokenHeight = 0;\r
- float tokenVerticalSpacing = 0;\r
- float tokenTextLeftMargin = 0;\r
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
_TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
{
bool needToScroll = false;
- float tokenTopMargin = 0;\r
- float tokenBottomMargin = 0;\r
- float tokenVerticalSpacing = 0;\r
+ float tokenTopMargin = 0.0f;
+ float tokenBottomMargin = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
float
_TokenEditPresenter::CalculateFlexibleHeightF(void)
{
- float tokenHeight = 0;\r
- float tokenVerticalSpacing = 0;\r
- float tokenTopMargin = 0;\r
- float tokenBottomMargin = 0;\r
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenTopMargin = 0.0f;
+ float tokenBottomMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
return E_SUCCESS;
}
- float tokenBottomMargin = 0;\r
+ float tokenBottomMargin = 0.0f;
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin;
pToken->ResetToken(GetText());
TrimTokenAndAdjustEllipsisAt(__edittingTokenIndex);
- float tokenHeight = 0;\r
- float tokenVerticalSpacing = 0;\r
- float tokenTextLeftMargin = 0;\r
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
SetCursorDisabled(false);
}
- float tokenTopMargin = 0;\r
+ float tokenTopMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
if (pToken)
{
- float tokenHeight = 0;\r
- float tokenVerticalSpacing = 0;\r
- float tokenTextLeftMargin = 0;\r
+ float tokenHeight = 0.0f;
+ float tokenVerticalSpacing = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
SetCursorPosition(__previousCursorPosition);
_Scroll* pScroll = GetScrollBar();
if (pScroll)
{
- float tokenBottomMargin = 0;\r
+ float tokenBottomMargin = 0.0f;
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin;
__pressedTokenIndex--;
}
+ if (GetTokenCount() == 0 && __animatingIndex == 0)
+ {
+ DrawText();
+ }
__animatingIndex = -1;
InitializeCursor();
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.");
- float tokenMinimumSize = 0;\r
+ float tokenMinimumSize = 0.0f;
_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.");
- float tokenTextLeftMargin = 0;\r
- float tokenTextRightMargin = 0;\r
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
{
int tokenCount = __pTokenList->GetCount();
- float tokenMinimumSize = 0;\r
- float tokenTextLeftMargin = 0;\r
- float tokenTextRightMargin = 0;\r
+ float tokenMinimumSize = 0.0f;
+ float tokenTextLeftMargin = 0.0f;
+ float tokenTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
void
_TokenEditPresenter::ShrinkTokens()
{
- float tokenTextRightMargin = 0;\r
+ float tokenTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
float
_TokenEditPresenter::GetPickedTokenEndPoint(int index, Tizen::Graphics::FloatRectangle tokenDispRect)
{
- float tokenTextRightMargin = 0;\r
+ float tokenTextRightMargin = 0.0f;
float endValue = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
__scrollValue = 0.0f;
__maxScrollValue = 0.0f;
- float tokenBottomMargin = 0;\r
+ float tokenBottomMargin = 0.0f;
float newScrollValue = 0.0f;
FloatRectangle windowBounds = GetInitialBoundsF();