*/
#include <FBaseSysLog.h>
+#include <FApp_AppInfo.h>
#include <FGrp_TextTextSimple.h>
-#include "FApp_AppInfo.h"
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_Math.h"
#include "FUi_ResourceManager.h"
#include "FUi_UiBuilder.h"
#include "FUiCtrl_FastScrollEvent.h"
#include "FUiCtrl_FastScrollEventArg.h"
-#include "FUiCtrl_Label.h"
#include "FUiCtrl_GroupedListViewImpl.h"
#include "FUiCtrl_GroupedListViewItemProviderAdaptor.h"
+#include "FUiCtrl_Label.h"
#include "FUiCtrl_ListItemEvent.h"
#include "FUiCtrl_ListItemEventArg.h"
#include "FUiCtrl_ListViewItem.h"
#include "FUiCtrl_ScrollEvent.h"
#include "FUiCtrl_ScrollEventArg.h"
-#ifdef MEMORY_LEAK_CHECK
-#include "mem_leak_check.h"
-#endif
-
using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics;
using namespace Tizen::Graphics::_Text;
_GroupedListViewImpl::~_GroupedListViewImpl()
{
- if (__pListItemEvent != null)
- {
- delete __pListItemEvent;
- __pListItemEvent = null;
- }
+ delete __pListItemEvent;
+ __pListItemEvent = null;
- if (__pLinkEvent != null)
- {
- delete __pLinkEvent;
- __pLinkEvent = null;
- }
+ delete __pLinkEvent;
+ __pLinkEvent = null;
- if (__pScrollEvent != null)
- {
- delete __pScrollEvent;
- __pScrollEvent = null;
- }
+ delete __pScrollEvent;
+ __pScrollEvent = null;
- if (__pFastScrollEvent != null)
- {
- delete __pFastScrollEvent;
- __pFastScrollEvent = null;
- }
+ delete __pFastScrollEvent;
+ __pFastScrollEvent = null;
if (__pEmptyBitmap != null)
{
__pEmptyText = null;
}
- if (__pTouchEventHandler != null)
- {
- delete __pTouchEventHandler;
- __pTouchEventHandler = null;
- }
+ delete __pTouchEventHandler;
+ __pTouchEventHandler = null;
if (__pLongPressedGesture != null)
{
else
{
SysTryReturn(NID_UI_CTRL, false, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] The specified itemAlignment is out of range.");
+ "[E_OUT_OF_RANGE] The specified itemAlignment is out of range.");
}
SetLastResultReturn(r);
int groupCount = GetCore().GetGroupCount();
int itemCount = GetCore().GetItemCountAt(groupIndex);
- if ((groupIndex < 0) || (groupIndex > groupCount) ||
- (itemIndex < -1) || (itemIndex > itemCount) ||
- ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (itemIndex == itemCount)))
+ if ((groupIndex < 0) || (groupIndex > groupCount) || (itemIndex < -1) || (itemIndex > itemCount) ||
+ ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (itemIndex == itemCount)))
{
SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
return E_OUT_OF_RANGE;
GetCore().GetFirstLoadedItemIndex(topGroupIndex, topItemIndex);
GetCore().GetLastLoadedItemIndex(bottomGroupIndex, bottomItemIndex);
- if ((topGroupIndex > groupIndex) || (bottomGroupIndex < groupIndex)
- || ((topGroupIndex == groupIndex) && (topItemIndex > itemIndex))
- || ((bottomGroupIndex == groupIndex) && (bottomItemIndex < itemIndex)))
+ if ((topGroupIndex > groupIndex) || (bottomGroupIndex < groupIndex) ||
+ ((topGroupIndex == groupIndex) && (topItemIndex > itemIndex)) ||
+ ((bottomGroupIndex == groupIndex) && (bottomItemIndex < itemIndex)))
{
// not yet loaded item
SetLastResultReturn(r);
itemDrawingStatus = pListViewItem->GetDrawingStatus();
itemSelected = pListViewItem->GetSelectionState();
touchPosition = pListViewItem->GetLastTouchPressedPositionF();
-
- pListViewItem = null;
}
GetCore().UnloadItem(groupIndex, itemIndex);
- GetCore().LoadItem(groupIndex, itemIndex);
-
- pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
+ pListViewItem = static_cast<_ListViewItem*>(GetCore().LoadItem(groupIndex, itemIndex));
if ((pListViewItem != null) && (itemDrawingStatus != TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL))
{
if (__pListItemEvent != null)
{
_ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndexFrom, itemIndexFrom, groupIndexTo, itemIndexTo,
- NOTIFY_TYPE_REORDERED_ITEM);
+ NOTIFY_TYPE_REORDERED_ITEM);
__pListItemEvent->Fire(*pArg);
}
}
if ((__pLinkEvent != null) && (itemInfo.pUiLinkInfo != null))
{
IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(itemInfo.pUiLinkInfo->textInfo,
- itemInfo.pUiLinkInfo->linkType,
- itemInfo.pUiLinkInfo->linkInfo);
+ itemInfo.pUiLinkInfo->linkType, itemInfo.pUiLinkInfo->linkInfo);
SysTryReturnVoidResult(NID_UI_CTRL, (pLinkEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
__pLinkEvent->Fire(*pLinkEventArg);
else
{
_ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, itemInfo.elementId, 0,
- static_cast<NotifyType>(status));
+ static_cast<NotifyType>(status));
__pListItemEvent->Fire(*pArg);
}
}
result
-_GroupedListViewImpl::OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds)
+_GroupedListViewImpl::OnBoundsChanging(const FloatRectangle& bounds)
{
if (GetCore().GetBoundsF().width != bounds.width)
{
void
_GroupedListViewImpl::OnFontInfoRequested(unsigned long& style, float& size)
{
- float textSize = 0;
- GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, textSize);
-
+ GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, size);
style = FONT_STYLE_PLAIN;
- size = textSize;
}
bool
}
static _GroupedListViewRegister GroupedListViewRegisterToUIbuilder;
}}} // Tizen::Ui::Controls
-
*/
#include <FBaseSysLog.h>
+#include <FApp_AppInfo.h>
#include <FGrp_TextTextSimple.h>
-#include "FApp_AppInfo.h"
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_Math.h"
#include "FUi_ResourceManager.h"
#include "FUiCtrl_ScrollEvent.h"
#include "FUiCtrl_ScrollEventArg.h"
-#ifdef MEMORY_LEAK_CHECK
-#include "mem_leak_check.h"
-#endif
-
using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics;
using namespace Tizen::Graphics::_Text;
_ListViewImpl::~_ListViewImpl()
{
- if (__pListItemEvent != null)
- {
- delete __pListItemEvent;
- __pListItemEvent = null;
- }
+ delete __pListItemEvent;
+ __pListItemEvent = null;
- if (__pLinkEvent != null)
- {
- delete __pLinkEvent;
- __pLinkEvent = null;
- }
+ delete __pLinkEvent;
+ __pLinkEvent = null;
- if (__pScrollEvent != null)
- {
- delete __pScrollEvent;
- __pScrollEvent = null;
- }
+ delete __pScrollEvent;
+ __pScrollEvent = null;
- if (__pFastScrollEvent != null)
- {
- delete __pFastScrollEvent;
- __pFastScrollEvent = null;
- }
+ delete __pFastScrollEvent;
+ __pFastScrollEvent = null;
if (__pEmptyBitmap != null)
{
__pEmptyText = null;
}
- if (__pTouchEventHandler != null)
- {
- delete __pTouchEventHandler;
- __pTouchEventHandler = null;
- }
+ delete __pTouchEventHandler;
+ __pTouchEventHandler = null;
if (__pLongPressedGesture != null)
{
const char*
_ListViewImpl::GetPublicClassName(void) const
{
- return "Controls::ListView";
+ return "Tizen::Ui::Controls::ListView";
}
const ListView&
{
pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider);
SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] The memory is insufficient.");
pProviderAdaptor->SetListViewItemEventListener(*this);
else
{
SysTryReturn(NID_UI_CTRL, false, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] The specified itemAlignment is out of range.");
+ "[E_OUT_OF_RANGE] The specified itemAlignment is out of range.");
}
SetLastResultReturn(r);
int itemCount = GetCore().GetItemCountAt(0);
- if ((index < 0) || (index > itemCount) ||
- ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (index == itemCount)))
+ if ((index < 0) || (index > itemCount) || ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (index == itemCount)))
{
SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
return E_OUT_OF_RANGE;
itemDrawingStatus = pListViewItem->GetDrawingStatus();
itemSelected = pListViewItem->GetSelectionState();
touchPosition = pListViewItem->GetLastTouchPressedPositionF();
-
- pListViewItem = null;
}
GetCore().UnloadItem(0, index);
- GetCore().LoadItem(0, index);
-
- pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, index));
+ pListViewItem = static_cast<_ListViewItem*>(GetCore().LoadItem(0, index));
if ((pListViewItem != null) && (itemDrawingStatus != TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL))
{
if ((__pLinkEvent != null) && (itemInfo.pUiLinkInfo != null))
{
IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(itemInfo.pUiLinkInfo->textInfo,
- itemInfo.pUiLinkInfo->linkType,
- itemInfo.pUiLinkInfo->linkInfo);
+ itemInfo.pUiLinkInfo->linkType, itemInfo.pUiLinkInfo->linkInfo);
SysTryReturnVoidResult(NID_UI_CTRL, (pLinkEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
__pLinkEvent->Fire(*pLinkEventArg);
void
_ListViewImpl::OnFontInfoRequested(unsigned long& style, float& size)
{
- float textSize = 0.0f;
- GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, textSize);
-
+ GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, size);
style = FONT_STYLE_PLAIN;
- size = textSize;
}
bool
static _ListViewRegister ListViewRegisterToUIbuilder;
}}} // Tizen::Ui::Controls
-