SysAssertf((_SlidableGroupedListImpl::GetInstance(*this) == null), "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::CreateSlidableGroupedListImplN(this, itemDivider, bFastScroll);
+ _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::CreateSlidableGroupedListImplN(this, rect, itemDivider, bFastScroll);
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
_pControlImpl = pImpl;
- r = Control::SetBounds(rect.x, rect.y, rect.width, rect.height);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
r = pImpl->SetListStyle(style);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
#include "FUiCtrl_CustomListItemFormatImpl.h"
#include "FUiCtrl_PanelImpl.h"
#include "FUi_ResourceManager.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
_TextElementView* pTextElementView = new (std::nothrow) _TextElementView(pText);
SysTryReturn(NID_UI_CTRL, (pTextElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pTextElementView->Construct(elementParams.pElementFormatData->rect);
+ pTextElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect));
pTextElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl);
elementParams.pTableViewItemBase->AddControl(*pTextElementView);
pTextElementView->SetModel(pTextElementModel);
_BitmapElementView* pBitmapElementView = new (std::nothrow) _BitmapElementView();
SysTryReturn(NID_UI_CTRL, (pBitmapElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pBitmapElementView->Construct(elementParams.pElementFormatData->rect);
+ pBitmapElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect));
pBitmapElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl);
elementParams.pTableViewItemBase->AddControl(*pBitmapElementView);
pBitmapElementView->SetModel(pBitmapElementModel);
_CustomElementView* pCustomElementView = new (std::nothrow) _CustomElementView();
SysTryReturn(NID_UI_CTRL, (pCustomElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pCustomElementView->Construct(elementParams.pElementFormatData->rect);
+ pCustomElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect));
pCustomElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl);
elementParams.pTableViewItemBase->AddControl(*pCustomElementView);
pCustomElementView->SetModel(pCustomElementModel);
_CheckElementView* pCheckElementView = new (std::nothrow) _CheckElementView();
SysTryReturn(NID_UI_CTRL, (pCheckElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pCheckElementView->Construct(checkBoxBounds);
+ pCheckElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect));
pCheckElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl);
elementParams.pTableViewItemBase->AddControl(*pCheckElementView);
pCheckElementView->SetModel(pCheckElementModel);
if (__pText)
{
- Rectangle bounds = GetBounds();
- bounds.x = 0;
- bounds.y = 0;
+ FloatRectangle bounds = GetBoundsF();
+ bounds.x = 0.0f;
+ bounds.y = 0.0f;
_ListBaseImpl* pListBaseImpl = _CustomListItemImpl::GetListBaseImplFromElement(*this);
SysTryCatch(NID_UI_CTRL, (pListBaseImpl != null), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _ListBaseImpl instance.");
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap))
{
- pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, GetWidth(), GetHeight()), *pBitmap);
+ pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, GetWidthF(), GetHeightF()), *pBitmap);
}
else
{
- pCanvas->DrawBitmap(Rectangle(0, 0, GetWidth(), GetHeight()), *pBitmap);
+ pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, GetWidthF(), GetHeightF()), *pBitmap);
}
}
if (isDividerEnabled)
{
- int lineWidth = 0;
+ float lineWidth = 0.0f;
GET_SHAPE_CONFIG(LIST::CHECK_ELEMENT_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, lineWidth);
- Rectangle bounds = GetBounds();
- int dividerHeight = 0;
+ FloatRectangle bounds = GetBoundsF();
+ float dividerHeight = 0.0f;
- dividerHeight = bounds.height / 2;
- bounds.y = bounds.y + ((bounds.height - dividerHeight) / 2);
+ dividerHeight = bounds.height / 2.0f;
+ bounds.y = bounds.y + ((bounds.height - dividerHeight) / 2.0f);
if (leftDivider)
{
- pCanvas->SetLineWidth(lineWidth / 2);
+ pCanvas->SetLineWidth(lineWidth / 2.0f);
pCanvas->SetForegroundColor(__leftHalfDividerColor);
- pCanvas->DrawLine(Point(0, bounds.y), Point(0, dividerHeight + bounds.y));
+ pCanvas->DrawLine(FloatPoint(0.0f, bounds.y), FloatPoint(0.0f, dividerHeight + bounds.y));
- pCanvas->SetLineWidth(lineWidth / 2);
+ pCanvas->SetLineWidth(lineWidth / 2.0f);
pCanvas->SetForegroundColor(__rightHalfDividerColor);
- pCanvas->DrawLine(Point(1, bounds.y), Point(1, dividerHeight + bounds.y));
+ pCanvas->DrawLine(FloatPoint(1.0f, bounds.y), FloatPoint(1.0f, dividerHeight + bounds.y));
}
if (rightDivider)
{
- pCanvas->SetLineWidth(lineWidth / 2);
+ pCanvas->SetLineWidth(lineWidth / 2.0f);
pCanvas->SetForegroundColor(__leftHalfDividerColor);
- pCanvas->DrawLine(Point(bounds.width - lineWidth, bounds.y), Point(bounds.width - lineWidth, dividerHeight + bounds.y));
+ pCanvas->DrawLine(FloatPoint(bounds.width - lineWidth, bounds.y), FloatPoint(bounds.width - lineWidth, dividerHeight + bounds.y));
- pCanvas->SetLineWidth(lineWidth / 2);
+ pCanvas->SetLineWidth(lineWidth / 2.0f);
pCanvas->SetForegroundColor(__rightHalfDividerColor);
- pCanvas->DrawLine(Point(bounds.width - lineWidth + 1, bounds.y), Point(bounds.width - lineWidth + 1, dividerHeight + bounds.y));
+ pCanvas->DrawLine(FloatPoint(bounds.width - lineWidth + 1.0f, bounds.y), FloatPoint(bounds.width - lineWidth + 1.0f, dividerHeight + bounds.y));
}
}
#include "FUiCtrl_CustomListImpl.h"
#include "FUiCtrl_ListListener.h"
#include "FUiCtrl_ListItemBaseImpl.h"
-
+#include "FUi_CoordinateSystemUtils.h"
#include "FUiCtrl_TableViewItemProvider.h"
using namespace Tizen::Base;
{
result r = E_SUCCESS;
- r = GET_SIZE_INFO(CustomList).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ r = GET_SIZE_INFO(CustomList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r));
_TableView* pCore = null;
{
result r = E_SUCCESS;
- r = InitializeBoundsProperties(GET_SIZE_INFO(CustomList), rect, GetCore().GetOrientation());
+ r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
pTableViewGroupItemData = new (std::nothrow) _TableViewGroupItemData();
SysTryReturn(NID_UI_CTRL, pTableViewGroupItemData, null, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = pTableViewGroupItemData->Construct(Dimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height));
+ r = pTableViewGroupItemData->Construct(FloatDimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height));
SysTryCatch(NID_UI_CTRL, pTableViewGroupItemData, , E_SYSTEM, "[%s] Failed to create an item.", GetErrorMessage(r));
-
pTableViewGroupItemData->groupIndex = tableViewItemParams.groupIndex;
tableViewItemParams.pItem->__pCustomListItemImpl->__pTableViewGroupItemData = pTableViewGroupItemData;
pTableViewItemData = new (std::nothrow) _TableViewItemData();
SysTryReturn(NID_UI_CTRL, pTableViewItemData, null, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = pTableViewItemData->Construct(Dimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ r = pTableViewItemData->Construct(FloatDimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height), TABLE_VIEW_ANNEX_STYLE_NORMAL);
SysTryCatch(NID_UI_CTRL, pTableViewItemData, , E_SYSTEM, "[%s] Failed to create an item.", GetErrorMessage(r));
pTableViewItemData->groupIndex = tableViewItemParams.groupIndex;
#include "FUiCtrl_ListItemBaseImpl.h"
#include "FUiCtrl_CustomListImpl.h"
#include "FUi_UiBuilder.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
extern const int INVALID_INDEX;
-static const int _EXPANDABLE_ARROW_X_POSITION = 5;
-static const int _EXPANDABLE_ARROW_Y_POSITION = 20;
+static const float _EXPANDABLE_ARROW_X_POSITION = 5.0f;
+static const float _EXPANDABLE_ARROW_Y_POSITION = 20.0f;
static const char* ARROW_ELEMENT_NAME = "Arrow";
_ExpandableListItemDataProvider::_ExpandableListItemDataProvider(_ExpandableListImpl* pList)
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
- const Rectangle bounds = GetBounds();
+ const FloatRectangle bounds = GetBoundsF();
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pNormalBitmap))
{
- r = pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, bounds.width, bounds.height), *__pNormalBitmap);
+ r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pNormalBitmap);
}
else
{
- r = pCanvas->DrawBitmap(Rectangle(0, 0, bounds.width, bounds.height), *__pNormalBitmap);
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pNormalBitmap);
}
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pEffectBitmap))
{
- r = pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, bounds.width, bounds.height), *__pEffectBitmap);
+ r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pEffectBitmap);
}
else
{
- r = pCanvas->DrawBitmap(Rectangle(0, 0, bounds.width, bounds.height), *__pEffectBitmap);
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pEffectBitmap);
}
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
- r = GET_SIZE_INFO(ExpandableList).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ r = GET_SIZE_INFO(ExpandableList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
_TableView* pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
{
result r = E_SUCCESS;
- r = InitializeBoundsProperties(GET_SIZE_INFO(CustomList), rect, GetCore().GetOrientation());
+ r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
_ExpandableListArrowBitmap* pArrowIcon = new (std::nothrow) _ExpandableListArrowBitmap();
SysTryReturn(NID_UI_CTRL, pArrowIcon, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = pArrowIcon->Construct(Rectangle((GetCore().GetBounds().width - (size + _EXPANDABLE_ARROW_X_POSITION)), _EXPANDABLE_ARROW_Y_POSITION, size, size), GROUP_STYLE_NONE);
+ r = pArrowIcon->Construct(FloatRectangle((GetCore().GetBoundsF().width - (size + _EXPANDABLE_ARROW_X_POSITION)), _EXPANDABLE_ARROW_Y_POSITION, size, size), GROUP_STYLE_NONE);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pArrowIcon->SetName(ARROW_ELEMENT_NAME);
isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP);
if (isCustomBitmap)
{
- pArrowIcon->SetBitmap(*__pOpenedPressedImage);
+ pArrowIcon->SetBitmap(*__pOpenedPressedImage);
}
else
{
- pArrowIcon->SetBitmap(*__pOpenedPressedImage, __pEffectOpenedImage);
+ pArrowIcon->SetBitmap(*__pOpenedPressedImage, __pEffectOpenedImage);
}
}
else
if (isCustomBitmap)
{
- pArrowIcon->SetBitmap(*__pClosedPressedImage);
+ pArrowIcon->SetBitmap(*__pClosedPressedImage);
}
else
{
- pArrowIcon->SetBitmap(*__pClosedPressedImage, __pEffectClosedImage);
+ pArrowIcon->SetBitmap(*__pClosedPressedImage, __pEffectClosedImage);
}
}
#include "FUiCtrl_FastScroll.h"
#include "FUiCtrl_FastScrollIndex.h"
#include "FUiCtrl_ListListener.h"
-
+#include "FUi_CoordinateSystemUtils.h"
#include "FUi_UiBuilder.h"
#include "FUi_ResourceSizeInfo.h"
#include "FUi_ResourceManager.h"
_TableView* pCore = null;
_GroupedListImpl* pImpl = null;
- r = GET_SIZE_INFO(GroupedList).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ r = GET_SIZE_INFO(GroupedList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
if(fastScroll == true)
pImpl = new (std::nothrow) _GroupedListImpl(pControl, pCore);
SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(GroupedList), bounds, pCore->GetOrientation());
+ r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(GroupedList), _CoordinateSystemUtils::ConvertToFloat(bounds), pCore->GetOrientation());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pCore->SetItemDividerEnabled(itemDivider);
CATCH:
delete pCore;
- pCore = null;
-
delete pImpl;
- pImpl = null;
return null;
}
#include "FUiCtrl_CustomListElements.h"
#include "FUiCtrl_CustomListItemImpl.h"
#include "FUiCtrl_Label.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base::Collection;
using namespace Tizen::Base;
font.Construct(GetFont(), FONT_STYLE_PLAIN, textSize);
pText->SetFont(&font, 0, pText->GetTextLength());
- Dimension listDimension = GetCore().GetSize();
+ FloatDimension listDimension = GetCore().GetSizeF();
- pText->SetBounds(Rectangle(0, 0, listDimension.width, 1));
+ pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f));
pText->Compose();
- Dimension labelDimension = pText->GetTextExtent(0, pText->GetTextLength());
- labelDimension.height = pText->GetTotalHeight();
+ FloatDimension labelDimension = pText->GetTextExtentF(0, pText->GetTextLength());
+ labelDimension.height = pText->GetTotalHeightF();
if (labelDimension.width > listDimension.width)
{
- pText->SetBounds(Rectangle(0, 0, listDimension.width, 1));
+ pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f));
pText->Compose();
- int labelHeight = pText->GetTotalHeight();
+ float labelHeight = pText->GetTotalHeightF();
labelDimension.width = listDimension.width;
labelDimension.height = ((listDimension.height < labelHeight) ? listDimension.height : labelHeight);
delete pText;
- Rectangle bounds = GetCore().GetBounds();
+ FloatRectangle bounds = GetCore().GetBoundsF();
- __pEmptyText->SetBounds(Rectangle((bounds.width - labelDimension.width)/2, (bounds.height - labelDimension.height)/2, labelDimension.width, labelDimension.height));
+ __pEmptyText->SetBounds(FloatRectangle((bounds.width - labelDimension.width)/2.0f, (bounds.height - labelDimension.height)/2.0f, labelDimension.width, labelDimension.height));
__pEmptyText->SetBackgroundColor(Color(0, 0, 0, 0));
__pEmptyText->SetTextColor(__emptyTextColor);
__pEmptyText->SetTextConfig(textSize, LABEL_TEXT_STYLE_NORMAL);
#include "FUiCtrl_ListListener.h"
#include "FUi_ResourceSizeInfo.h"
#include "FUi_UiBuilder.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base;
using namespace Tizen::Graphics;
int height = __pListImpl->__row1Height + __pListImpl->__row2Height;
pCustomListItemImpl->height = height;
- SysTryReturnVoidResult(NID_UI_CTRL, pItem, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", itemIndex);
- Rectangle rect = pItem->GetBounds();
- pItem->SetSize(rect.width, height);
-
- //return true;
+ FloatRectangle rect = pItem->GetBoundsF();
+ pItem->SetSize(FloatDimension(rect.width, height));
}
result
SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_SYSTEM,
"A system error has occurred. Failed to get the canvas.");
- pCanvas->FillRectangle(Color::GetColor(COLOR_ID_MAGENTA), rect);
+ pCanvas->FillRectangle(Color::GetColor(COLOR_ID_MAGENTA), _CoordinateSystemUtils::ConvertToFloat(rect));
pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_WHITE));
Font font;
- font.Construct(FONT_STYLE_PLAIN, 18);
+ font.Construct(FONT_STYLE_PLAIN, 18.0f);
pCanvas->SetFont(font);
- if (pCanvas->DrawText(Point(rect.x + 5, rect.y + 5), String(text)) != E_SUCCESS)
+ if (pCanvas->DrawText(FloatPoint(rect.x + 5.0f, rect.y + 5.0f), String(text)) != E_SUCCESS)
{
return E_SYSTEM;
}
{
result r = E_SUCCESS;
- r = GET_SIZE_INFO(List).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ r = GET_SIZE_INFO(List).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
_TableView* pCore = null;
_ListImpl* pImpl = null;
- pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+ pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, true, TABLE_VIEW_SCROLL_BAR_STYLE_FIXED);
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
- r = InitializeBoundsProperties(GET_SIZE_INFO(CustomList), rect, GetCore().GetOrientation());
+ r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
#include "FUiCtrl_FastScroll.h"
#include "FUiCtrl_FastScrollIndex.h"
#include "FUi_ResourceSizeInfo.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Graphics;
using namespace Tizen::Base;
}
_SlidableGroupedListImpl*
-_SlidableGroupedListImpl::CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, bool itemDivider, bool fastScroll)
+_SlidableGroupedListImpl::CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, const Rectangle& bounds, bool itemDivider, bool fastScroll)
{
+ result r = E_SUCCESS;
+
+ r = GET_SIZE_INFO(SlidableGroupedList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
TableViewScrollBarStyle scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE;
if (fastScroll == true)
}
_TableView* pTableView = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, itemDivider, scrollStyle);
- result r = GetLastResult();
+ r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pTableView, null, r, "[%s] Propagating.", GetErrorMessage(r));
_SlidableGroupedListImpl* pImpl = new (std::nothrow) _SlidableGroupedListImpl(pControl, pTableView);
SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(SlidableGroupedList), _CoordinateSystemUtils::ConvertToFloat(bounds), pTableView->GetOrientation());
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
return pImpl;
CATCH:
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.itemIndex = index;
tableViewItemParams.groupIndex = -1;
tableViewItemParams.isDividerEnabled = _isDividerEnabled;
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.groupIndex = __bottomGroup;
tableViewItemParams.itemIndex = (itemIndex + topIndex);
tableViewItemParams.isDividerEnabled = _isDividerEnabled;
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.itemId = itemId;
tableViewItemParams.itemIndex = pGroupObject->__topIndex;
tableViewItemParams.groupIndex = __topGroup;
#include "FUi_UiBuilder.h"
#include "FUiCtrl_TableViewItemProvider.h"
#include "FUiCtrl_TableViewPresenter.h"
+#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base;
{
result r = E_SUCCESS;
- r = GET_SIZE_INFO(SlidableList).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
+ r = GET_SIZE_INFO(SlidableList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
if (IsFailed(r))
{
return null;
{
result r = E_SUCCESS;
- r = InitializeBoundsProperties(GET_SIZE_INFO(SlidableList), rect, GetCore().GetOrientation());
+ r = InitializeBoundsPropertiesF(GET_SIZE_INFO(SlidableList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.itemIndex = index;
tableViewItemParams.groupIndex = -1;
tableViewItemParams.isDividerEnabled = _isDividerEnabled;
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.itemIndex = _itemsList.GetCount() + __topIndex;
tableViewItemParams.groupIndex = -1;
tableViewItemParams.isDividerEnabled = _isDividerEnabled;
_TableViewItemParams tableViewItemParams;
tableViewItemParams.pItem = (const_cast<CustomListItem*>(&item));
- tableViewItemParams.width = GetCore().GetBounds().width;
+ tableViewItemParams.width = GetCore().GetBoundsF().width;
tableViewItemParams.itemIndex = (__topIndex - 1);
tableViewItemParams.groupIndex = -1;
tableViewItemParams.isDividerEnabled = _isDividerEnabled;
struct _TableViewItemParams
{
CustomListItem* pItem;
- int width;
+ float width;
int groupIndex;
int itemIndex;
int itemId;
void StartTextSlideTimer(void);
void StopTextSlideTimer(void);
public:
- int height;
+ float height;
int itemId;
Tizen::Base::Collection::LinkedList elements;
public:
_SlidableGroupedListImpl(Control* pList, _TableView* pCore);
~_SlidableGroupedListImpl(void);
- static _SlidableGroupedListImpl* CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, bool itemDivider, bool fastScroll);
+ static _SlidableGroupedListImpl* CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider, bool fastScroll);
//@See doxygen
void AddSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener);
static Tizen::Ui::_ControlImpl::SizeInfo& GetListSizeInfo(void);
static Tizen::Ui::_ControlImpl::SizeInfo& GetOverlayPanelSizeInfo(void);
static Tizen::Ui::_ControlImpl::SizeInfo& GetSlidableListSizeInfo(void);
+ static Tizen::Ui::_ControlImpl::SizeInfo& GetSlidableGroupedListSizeInfo(void);
static Tizen::Ui::_ControlImpl::SizeInfo& GetWebSizeInfo(void);
static Tizen::Ui::_ControlImpl::SizeInfo& GetMapSizeInfo(void);
static Tizen::Ui::_ControlImpl::SizeInfo& GetEditDateSizeInfo(void);
static _ControlImpl::SizeInfo sizeInfo;
return sizeInfo;
}
+
+_ControlImpl::SizeInfo&
+SizeInfo::GetSlidableGroupedListSizeInfo(void)
+{
+ static _ControlImpl::SizeInfo sizeInfo;
+ return sizeInfo;
+}
+
_ControlImpl::SizeInfo&
SizeInfo::GetWebSizeInfo(void)
{