void SetParameter(EDepth depth, ESelectType selType, CCategoryInfo *catInfo, CAlbumInfo *albumInfo);
Eina_List *CategorySongItemInfoList(void);
+ void SetCurrentCategory(CCategoryInfo *curCatInfo);
+ CCategoryInfo *CurrentCategory(void);
+
virtual void SetFocus(const char *btnStr);
public:
t.c_catinfo = NULL;
t_HandleItemSelect(itinfo);
+
+ m->layoutCatSongs->SetCurrentCategory(t.c_catinfo);
}
t_UpdateLayoutWithFocus();
{
ASSERT(m);
+ CCategoryInfo *catInfo;
+ Elm_Object_Item *item;
+
if (!focusFlag) {
if (t.depth != E_DEPTH_CATEGORY)
return;
return;
}
+ catInfo = m->layoutCatSongs->CurrentCategory();
+ if (catInfo && catInfo->FlagCreate()) {
+ item = m_FindItemByInfo(m->it_infolist, catInfo);
+ if (item) {
+ m->layoutCatSongs->SetCurrentCategory(NULL);
+ elm_gengrid_item_show(item, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ elm_object_item_focus_set(item, EINA_TRUE);
+ return;
+ }
+ }
+
elm_object_focus_set(t.grid, EINA_TRUE);
}
const char *focusBtnStr;
EFocusIderType idlerType;
+ CCategoryInfo *curCatInfo;
+
SCategorySongsLayout() {
memset(this, 0, sizeof(SCategorySongsLayout));
}
Evas_Object *layout = NULL;
CMusicController *mhandle = NULL;
CViewMgr *vmgr = NULL;
+ CCategoryInfo *catInfo = NULL;
_CHECK(m = new SCategorySongsLayout)
_CHECK(vmgr = CViewMgr::GetInstance())
_CHECK(mhandle = CMusicController::GetInstance())
_CHECK(layout = CCommonUI::AddBase(base, MUSIC_CATEGORY_SONGS_LAYOUT))
_CHECK(CExtBaseLayout::Create(layout))
+ _CHECK(catInfo = new CCategoryInfo)
_WHEN_SUCCESS{
m->win = win;
m->mhandle = mhandle;
m->mgr = mgr;
m->parent = parent;
+ m->curCatInfo = catInfo;
Connect(layout, CATEGORY_SONGS_LAYOUT, TYPE_KEY_DOWN);
}
+ _CHECK_FAIL{ delete catInfo; }
_CHECK_FAIL{ CExtBaseLayout::Destroy(); }
_CHECK_FAIL{ evas_object_del(layout); }
_CHECK_FAIL{}
Disconnect(Layout());
+ if (m->curCatInfo->FlagCreate())
+ m->curCatInfo->Destroy();
+ delete m->curCatInfo;
+
m_RemoveFocusIdler();
m_EmptySongList();
CExtBaseLayout::Destroy();
}
+void CCategorySongsLayout::SetCurrentCategory(CCategoryInfo *curCatInfo)
+{
+ ASSERT(m);
+
+ if (m->curCatInfo->FlagCreate())
+ m->curCatInfo->Destroy();
+
+ m->curCatInfo->Create();
+
+ if (curCatInfo)
+ m->curCatInfo->Duplicate(curCatInfo);
+ else {
+ CCategoryInfo *emptyInfo = new CCategoryInfo;
+ emptyInfo->Create();
+ m->curCatInfo->Duplicate(emptyInfo);
+ emptyInfo->Destroy();
+ delete emptyInfo;
+ }
+}
+
+
+CCategoryInfo*CCategorySongsLayout::CurrentCategory(void)
+{
+ ASSERT(m);
+
+ return m->curCatInfo;
+}
+
+
void CCategorySongsLayout::SetFocus(const char *btnStr)
{
ASSERT(m);