, __fontSize(0.0f)
, __pTextSlideTimer(null)
, __textRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
- , __pTabLargeSelectedBitmap(null)
+ , __pTextSlideClippedBitmap(null)
{
}
__pTextSlideTimer = null;
}
- if (__pTabLargeSelectedBitmap)
+ if (__pTextSlideClippedBitmap)
{
- delete __pTabLargeSelectedBitmap;
- __pTabLargeSelectedBitmap = null;
+ delete __pTextSlideClippedBitmap;
+ __pTextSlideClippedBitmap = null;
}
}
DrawBackground();
}
- DrawSubTitleEffectBitmap();
+ if (__pButton->GetSubTitleEffectBitmap() != null)
+ {
+ DrawSubTitleEffectBitmap();
+ }
+
DrawBitmap();
if (!__pButton->GetText().IsEmpty())
}
}
- if (__pTabLargeSelectedBitmap)
- {
- delete __pTabLargeSelectedBitmap;
- __pTabLargeSelectedBitmap = null;
- }
-
- __pTabLargeSelectedBitmap = new (std::nothrow) Bitmap();
-
- if (__pButton->UserDefinedText())
- {
- __pTabLargeSelectedBitmap->Construct(*pCanvas, __pButton->GetUserDefinedTextAreaF());
- }
- else
- {
- __pTabLargeSelectedBitmap->Construct(*pCanvas, __textRect);
- }
-
delete pCanvas;
return;
void
_ButtonPresenter::DrawText(void)
{
- TimerForTitleSlideInit();
+ TimerForTextSlideInit();
//TextSimple* pSimpleText = null;
TextObjectAlignment horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER;
TextObjectAlignment verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE;
__pTextObject->SetBounds(__textRect);
}
+ if (__pTextSlideClippedBitmap)
+ {
+ delete __pTextSlideClippedBitmap;
+ __pTextSlideClippedBitmap = null;
+ }
+
+ __pTextSlideClippedBitmap = new (std::nothrow) Bitmap();
+
+ if (__pButton->UserDefinedText())
+ {
+ __pTextSlideClippedBitmap->Construct(*pCanvas, __pButton->GetUserDefinedTextAreaF());
+ }
+ else
+ {
+ __pTextSlideClippedBitmap->Construct(*pCanvas, __textRect);
+ }
+
__pTextObject->SetAlignment(horizontalAlign | verticalAlign);
if (__pButton->GetButtonStatus() == _BUTTON_STATUS_SELECTED && __pButton->IsTabTextSlide())
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
}
+ SetTextSize(__pButton->GetTextSizeF());
__pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__pTextObject->Compose();
DrawTabTextDimBitmap();
- TimerForTitleSlideStart();
+ TimerForTextSlideStart();
}
else
{
{
_KeyCode keyCode = keyInfo.GetKeyCode();
- if (__pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
+ if (__pButton->IsFocused() && __pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
{
if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
if (onTimer == __pTextSlideTimer)
{
- TimerForTitleSlideTimeout();
+ TimerForTextSlideTimeout();
}
return;
}
result
-_ButtonPresenter::TimerForTitleSlideInit(void)
+_ButtonPresenter::TimerForTextSlideInit(void)
{
result r = E_SUCCESS;
}
result
-_ButtonPresenter::TimerForTitleSlideStart(void)
+_ButtonPresenter::TimerForTextSlideStart(void)
{
result r = E_SUCCESS;
}
result
-_ButtonPresenter::TimerForTitleSlideTimeout(void)
+_ButtonPresenter::TimerForTextSlideTimeout(void)
{
Canvas* pCanvas = __pButton->GetCanvasN();
SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pCanvas is invalid!");
{
pCanvas->Clear(__pButton->GetUserDefinedTextAreaF());
- if (__pTabLargeSelectedBitmap)
+ if (__pTextSlideClippedBitmap)
{
- pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__pButton->GetUserDefinedTextAreaF()), *__pTabLargeSelectedBitmap);
+ pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__pButton->GetUserDefinedTextAreaF()), *__pTextSlideClippedBitmap);
}
}
else
{
pCanvas->Clear(__textRect);
- if (__pTabLargeSelectedBitmap)
+ if (__pTextSlideClippedBitmap)
{
- pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__textRect), *__pTabLargeSelectedBitmap);
+ pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__textRect), *__pTextSlideClippedBitmap);
}
}
if (__pTextObject->GetRepeatCount() < 3)
{
- TimerForTitleSlideStart();
+ TimerForTextSlideStart();
}
}
else
pButtonElement->SetName(name);
pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
- FloatRectangle floatRect = GetButtonBoundsF(position);
- pButtonElement->SetBounds(FloatRectangle(0,floatRect.y, pButton->GetBoundsF().width, floatRect.height));
+ pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, pButton->GetBoundsF().width, pButton->GetBoundsF().height));
}
}
}
if (pPressedBackgroundEffectBitmap)
{
- //pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap);
+ pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap);
delete pPressedBackgroundEffectBitmap;
}
if (pHighlightedBackgroundEffectBitmap)
float headerButtonItemHeight = 0.0f;
float headerLeftMargin = 0.0f;
float headerRightMargin = 0.0f;
- float tabLeftMargin = 0.0f;
GET_SHAPE_CONFIG(HEADER::TOP_MARGIN, GetOrientation(), headerTopMargin);
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_GAP, GetOrientation(), buttonItemGap);
GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin);
GET_SHAPE_CONFIG(HEADER::RIGHT_MARGIN, GetOrientation(), headerRightMargin);
- GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin);
if (__pButtonItems[LEFT_BUTTON])
{
- headerLeftButtonWidth = __pButtonItems[LEFT_BUTTON]->GetSizeF().width;
+ headerLeftButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[LEFT_BUTTON]->GetSizeF()).width;
}
if (__pButtonItems[RIGHT_BUTTON])
{
- headerRightButtonWidth = __pButtonItems[RIGHT_BUTTON]->GetSizeF().width;
+ headerRightButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[RIGHT_BUTTON]->GetSizeF()).width;
}
if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
if (__pButtonItems[LEFT_BUTTON])
{
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth + 1, headerButtonItemHeight));
+ headerRightButtonWidth, headerButtonItemHeight));
__pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
headerLeftButtonWidth, headerButtonItemHeight));
else
{
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth + 1, headerButtonItemHeight));
+ headerRightButtonWidth, headerButtonItemHeight));
if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
{
else if (__pButtonItems[LEFT_BUTTON])
{
__pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin,
- headerLeftButtonWidth + 1, headerButtonItemHeight));
+ headerLeftButtonWidth, headerButtonItemHeight));
if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
{
float fontSize = 0.0f;
float multilineFontSize = 0.0f;
float segmentedItemHeight = 0.0f;
- float tabLeftMargin = 0.0f;
float vmargin = 0.0f;
- GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin);
-
if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE)
{
segmentedItemHeight = __itemArea.height;
if (__itemCount == 1)
{
- itemWidth[0] = __itemArea.width - tabLeftMargin * 2;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
+ itemWidth[0] = __itemArea.width;
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
}
else if (__itemCount == 2)
{
- itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2) / 2;
+ itemWidth[0] = itemWidth[1] = __itemArea.width / 2;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
}
else if (__itemCount == 3)
{
- itemWidth[0] = itemWidth[1] = itemWidth[2] = (__itemArea.width - tabLeftMargin * 2) / 3;
+ itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3;
itemWidth[1] += 1;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2] + 1, segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
}
else
{
- itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = (__itemArea.width - tabLeftMargin * 2) / 4;
+ itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = __itemArea.width / 4;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1],
- vmargin, itemWidth[2], segmentedItemHeight));
- __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2],
- vmargin, itemWidth[3], segmentedItemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1], vmargin, itemWidth[2], segmentedItemHeight));
+ __pItems.at(3)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1] + itemWidth[2], vmargin, itemWidth[3], segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
float sideMargin = 0.0f;
float itemButtonLeftGap = 0.0f;
float itemButtonRightGap = 0.0f;
- float tabLeftMargin = 0.0f;
float iconSize = 0.0f;
float footerLeftMargin = 0.0f;
float segmentedItemHeight = 0.0f;
GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize);
GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin);
- GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin);
GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, GetOrientation(), sideMargin);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight);
GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin);
GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
-
- float tabRightMargin = tabLeftMargin;
-
itemHeight = GetSizeF().height;
if (__itemCount == 1)
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2);
+ __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2);
}
else
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin);
+ __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap);
}
}
else
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin);
+ __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin);
}
-
- iconSize = 0;
}
blockWidth[0] = __itemArea.width;
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
}
}
else
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2);
+ __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2);
}
else
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin);
+ __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap);
}
}
else
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin);
+ __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin);
}
-
- iconSize = 0;
}
blockWidth[0] = blockWidth[1] = __itemArea.width / 2;
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
}
}
else
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
}
}
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2);
+ __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2);
}
else
{
- tabLeftMargin = footerLeftMargin;
itemButtonLeftGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin);
+ __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap);
}
}
else
{
if (__pButtonItems[RIGHT_BUTTON])
{
- tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
- __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin);
+ __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin);
}
else
{
- __itemArea.width -= tabLeftMargin * 2;
+ ;//empty
}
-
- iconSize = 0;
}
blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3;
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
(GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
(GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
}
{
if (__pButtonItems[RIGHT_BUTTON])
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2],
(GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
}
else
{
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
(GetSizeF().height - itemHeight) / 2, blockWidth[2] + 1, itemHeight));
}
}
else if (__itemCount == 4)
{
- __itemArea.width -= tabLeftMargin * 2;
-
blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1],
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1],
(GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
- __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2],
+ __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2],
(GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
for (int i = 0; i < __itemCount; i++)
}
else if (__itemCount == 5)
{
- __itemArea.width -= tabLeftMargin * 2;
-
blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = __itemArea.width / 5;
- __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1],
+ __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1],
(GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
- __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2],
+ __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2],
(GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
- __pItems.at(4)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3],
+ __pItems.at(4)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3],
(GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight));
for (int i = 0; i < __itemCount; i++)