SetKeypadEnabled(true);
- float tokenLeftMargin = 0.0f;
- float tokenRightMargin = 0.0f;
+ float leftMargin = 0.0f;
+ float rightMargin = 0.0f;
float tokenTopMargin = 0.0f;
float tokenBottomMargin = 0.0f;
float tokenHeight = 0.0f;
Color focusTokenColor;
Bitmap* pTokenBgFocusBitmap = null;
- GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, tokenRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
GET_COLOR_CONFIG(TOKENEDIT::BG_FOCUS, focusTokenColor);
// For drawing token in specific area
- __clientRect.x = tokenLeftMargin;
+ __clientRect.x = leftMargin;
__clientRect.y = tokenTopMargin;
- __clientRect.width = __pTokenEdit->GetBoundsF().width - tokenLeftMargin - tokenRightMargin;
+ __clientRect.width = __pTokenEdit->GetBoundsF().width - leftMargin - rightMargin;
__clientRect.height = __pTokenEdit->GetBoundsF().height - tokenTopMargin - tokenBottomMargin;
__initTextRect = GetTextBoundsF();
int tokenCount = __pTokenList->GetCount();
- float tokenLeftMargin = 0.0f;
- float tokenRightMargin = 0.0f;
+ float leftMargin = 0.0f;
+ float rightMargin = 0.0f;
float tokenTopMargin = 0.0f;
float tokenBottomMargin = 0.0f;
float tokenHeight = 0.0f;
float descriptionTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
- GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, tokenRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
}
else // Set description text.
{
- pToken->displayRect.x = tokenLeftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
+ pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
pToken->displayRect.y = tokenTopMargin + __scrollValue + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) + __lineSpacing;
}
findPrevTokenLoopFlag = false;
}
- float tempTextWidth = tokenEditBounds.width - pPreviousToken->displayRect.x - pPreviousToken->displayRect.width - tokenHorizontalSpacing - tokenRightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ float tempTextWidth = tokenEditBounds.width - pPreviousToken->displayRect.x - pPreviousToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
if (tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin > tempTextWidth) // Line change
{
- pToken->displayRect.x = tokenLeftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
+ pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
pToken->displayRect.y = pPreviousToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing;
__lineAdded++;
}
{
result r = E_SUCCESS;
- float tokenLeftMargin = 0.0f;
- float tokenRightMargin = 0.0f;
+ float leftMargin = 0.0f;
+ float rightMargin = 0.0f;
float tokenTopMargin = 0.0f;
float tokenHeight = 0.0f;
float tokenMinWidth = 0.0f;
float descriptionTextRightMargin = 0.0f;
_ControlOrientation orientation = GetEditView()->GetOrientation();
- GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, tokenRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_MIN_WIDTH, orientation, tokenMinWidth);
}
else
{
- tokenTextRect.x = tokenLeftMargin + __pTokenEdit->GetHorizontalMargin(EDIT_TEXT_LEFT_MARGIN);
+ tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMargin(EDIT_TEXT_LEFT_MARGIN);
}
tokenTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) + textBoundsAlignValue;
- tokenTextRect.width -= tokenTextRect.x + tokenRightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ tokenTextRect.width -= tokenTextRect.x + rightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
tokenTextRect.height = textObjectMaxHeight;
SetTextBounds(tokenTextRect);
SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
float tempTextRectWidth = 0.0f;
- tempTextRectWidth = tokenEditBounds.width - pToken->displayRect.x - pToken->displayRect.width - tokenHorizontalSpacing - tokenRightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ tempTextRectWidth = tokenEditBounds.width - pToken->displayRect.x - pToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
if (tokenMinWidth > tempTextRectWidth) // Line change
{
- tokenTextRect.x = tokenLeftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
+ tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
tokenTextRect.y = pToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing + textBoundsAlignValue;
}
else
tokenTextRect.y = pToken->displayRect.y + textBoundsAlignValue;
}
- tokenTextRect.width -= tokenTextRect.x + tokenRightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ tokenTextRect.width -= tokenTextRect.x + rightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
tokenTextRect.height = textObjectMaxHeight;
SetTextBounds(tokenTextRect);
{
result r = E_SUCCESS;
- float tokenRightMargin = 0.0f;
+ float rightMargin = 0.0f;
float tokenMinimumSize = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
- GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, tokenRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_MIN_WIDTH, orientation, tokenMinimumSize);
_Token* pToken = null;
FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF();
FloatRectangle tokenRect = pToken->displayRect;
- float remainWidth = tokenEditBounds.width - tokenRightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ float remainWidth = tokenEditBounds.width - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
float dspTokenWidth = tokenRect.x + tokenRect.width;
float dspTokenGap = dspTokenWidth - remainWidth;