elm_object_focus_next_object_set(m->srcbtn, m->srcbtn, ELM_FOCUS_DOWN);
elm_object_focus_next_object_set(m->sortbtn, m->sortbtn, ELM_FOCUS_DOWN);
- elm_object_part_text_set(m->base, MUSIC_PART_NO_CONTENT, MUSIC_STR_EMPTY);
- elm_object_part_text_set(m->base, MUSIC_PART_NO_CONTENT_SUB, MUSIC_STR_EMPTY);
+ elm_object_part_text_set(Base(), MUSIC_PART_NO_CONTENT, MUSIC_STR_EMPTY);
+ elm_object_part_text_set(Base(), MUSIC_PART_NO_CONTENT_SUB, MUSIC_STR_EMPTY);
}
elm_object_focus_next_object_set(m->srcbtn, m->group_btn[GROUP_BTN_SONG], ELM_FOCUS_DOWN);
elm_object_focus_next_object_set(m->sortbtn, m->group_btn[GROUP_BTN_SONG], ELM_FOCUS_DOWN);
- elm_object_part_text_set(m->base, MUSIC_PART_NO_CONTENT, _(NO_MUSIC_MESSAGE));
- elm_object_part_text_set(m->base, MUSIC_PART_NO_CONTENT_SUB, _(NO_MUSIC_MESSAGE_SUB));
+ elm_object_part_text_set(Base(), MUSIC_PART_NO_CONTENT, _(NO_MUSIC_MESSAGE));
+ elm_object_part_text_set(Base(), MUSIC_PART_NO_CONTENT_SUB, _(NO_MUSIC_MESSAGE_SUB));
}
const char *layoutId = NULL;
Evas_Object *evasLayout = NULL;
- elm_object_part_content_unset(m->base, MUSIC_PART_CONTENT);
+ elm_object_part_content_unset(Base(), MUSIC_PART_CONTENT);
if (m->c_grpbtn == m->group_btn[GROUP_BTN_SONG]) {
layoutId = MUSIC_SONG_LAYOUT;
m_UpdateEmptyFocusSequence();
}
else {
- elm_object_part_content_set(m->base, MUSIC_PART_CONTENT, evasLayout);
+ elm_object_part_content_set(Base(), MUSIC_PART_CONTENT, evasLayout);
m->lmgr->Show(layoutId);
m_UpdateFocusSequence();
}
CSourceCtxPopup *srcCtxPopup = NULL;
m->btntype = btnType;
srcCtxPopup = new CSourceCtxPopup;
- srcCtxPopup->Create(m->base, &cb);
+ srcCtxPopup->Create(Base(), &cb);
m->srcCtxPopup = srcCtxPopup;
}
}
}
- sortCtxPopup->Create(m->base, &cb, sortBtnType);
+ sortCtxPopup->Create(Base(), &cb, sortBtnType);
m->sortCtxPopup = sortCtxPopup;
}
else {
scale = elm_config_scale_get();
- popup = elm_popup_add(m->base);
+ popup = elm_popup_add(Base());
if (!popup)
return NULL;
{
double scale = elm_config_scale_get();
- m->plsonglbl = elm_label_add(m->base);
+ m->plsonglbl = elm_label_add(Base());
if (!m->plsonglbl)
return;
elm_label_slide_go(m->plsonglbl);
evas_object_size_hint_weight_set(m->plsonglbl, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
- elm_object_part_content_set(m->base, MUSIC_PART_PLAYSONG_LBL,
+ elm_object_part_content_set(Base(), MUSIC_PART_PLAYSONG_LBL,
m->plsonglbl);
evas_object_show(m->plsonglbl);
}
btninfo[BTN_SORT].style = MUSIC_STYLE_SORT_BTN;
btninfo[BTN_SORT].type = BASE_VIEW_SORT_BUTTON;
- elm_object_part_text_set(m->base, MUSIC_PART_TITLE,
+ elm_object_part_text_set(Base(), MUSIC_PART_TITLE,
_(MUSIC_TEXT_TITLE));
m_AddPlaysongLabel();
for (i = 0; i < TOTAL_TOP_BTNS; i++) {
- btn = s_AddButton(m->base);
+ btn = s_AddButton(Base());
if (!btn) {
_ERR(" Adding btn failed ");
return;
}
elm_object_style_set(btn, btninfo[i].style);
- elm_object_part_content_set(m->base, btninfo[i].part, btn);
+ elm_object_part_content_set(Base(), btninfo[i].part, btn);
Connect(btn, btninfo[i].type,
TYPE_KEY_DOWN | TYPE_KEY_UP | TYPE_MOUSE_MOVE | TYPE_CLICKED);
btninfo[GROUP_BTN_PLAYLIST].icon_path = MUSIC_IMAGE_GRPBTN_PLAYLISTS;
btninfo[GROUP_BTN_PLAYLIST].type = BASE_VIEW_GROUP_PLAYLIST;
- box = CCommonUI::AddBox(m->base);
+ box = CCommonUI::AddBox(Base());
if (!box)
return;
}
}
- elm_object_part_content_set(m->base, MUSIC_PART_GROUPBTN_BOX, box);
+ elm_object_part_content_set(Base(), MUSIC_PART_GROUPBTN_BOX, box);
}
}
-bool CMusicBaseView::Create(void *data)
+bool CMusicBaseView::Create(void *data, Evas_Object *eoBase)
{
ASSERT(!m);
_CREATE_BEGIN{
+ Evas_Object *eoBase;
+
_CHECK(m = new SMusicBaseView)
_CHECK(m->win = CViewMgr::GetInstance()->Window())
_CHECK(m->pController = new CMusicController)
_CHECK(m->pController->Create())
- _CHECK(m->base = CCommonUI::AddBase(m->win, MUSIC_BASE_VIEW))
+ _CHECK(eoBase = CCommonUI::AddBase(m->win, MUSIC_BASE_VIEW))
+ _CHECK(CBaseView::Create(NULL, eoBase))
_CHECK(m->lmgr = new CLayoutMgr)
- _CHECK(m->lmgr->Create(m->base, NULL))
- _CHECK(CBaseView::Create(NULL))
+ _CHECK(m->lmgr->Create(eoBase, NULL))
_CHECK(m->layoutSong = new CSongLayout(MUSIC_SONG_LAYOUT))
_CHECK(m->layoutSong->Create(m->lmgr, m_Argument(data)))
_CHECK(m->lmgr->AddLayout(m->layoutSong))
_CHECK(m->layoutFolder->Create(m->lmgr))
_CHECK(m->lmgr->AddLayout(m->layoutFolder))
_CHECK(m->pHandleVolume = new CHandleVolume)
- _CHECK(m->pHandleVolume->Create(m->base))
+ _CHECK(m->pHandleVolume->Create(eoBase))
_CHECK(m->pController->AddListener(this))
_WHEN_SUCCESS{
m->layoutGenre->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this);
m->layoutPlaylists->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this);
- elm_object_part_content_unset(m->base, MUSIC_PART_CONTENT);
+ elm_object_part_content_unset(eoBase, MUSIC_PART_CONTENT);
m_SetSourceType();
- evas_object_data_set(m->base, BASE_VIEW_DATA, m);
+ evas_object_data_set(eoBase, BASE_VIEW_DATA, m);
m_CreateFullView();
m_UpdateFocusSequence();
- Connect(m->base, BASE_VIEW, TYPE_KEY_DOWN | TYPE_KEY_UP);
+ Connect(eoBase, BASE_VIEW, TYPE_KEY_DOWN | TYPE_KEY_UP);
}
_CHECK_FAIL{ m->pController->RemoveListener(this); }
_CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutSong); }
_CHECK_FAIL{ m->layoutSong->Destroy(); }
_CHECK_FAIL{ delete m->layoutSong; }
- _CHECK_FAIL{ CBaseView::Destroy(); }
_CHECK_FAIL{ m->lmgr->Destroy(); }
_CHECK_FAIL{ delete m->lmgr; }
- _CHECK_FAIL{ evas_object_del(m->base); }
+ _CHECK_FAIL{ CBaseView::Destroy(); }
+ _CHECK_FAIL{ evas_object_del(eoBase); }
_CHECK_FAIL{ m->pController->Destroy(); }
_CHECK_FAIL{ delete m->pController; }
_CHECK_FAIL{ /* win */ }
{
ASSERT(m);
+ Evas_Object *eoBase = Base();
+
+ Disconnect(eoBase);
+
m->pController->RemoveListener(this);
m->pHandleVolume->Destroy();
m->layoutSong->Destroy();
delete m->layoutSong;
- CBaseView::Destroy();
m->lmgr->Destroy();
delete m->lmgr;
- evas_object_del(m->base);
+
+ CBaseView::Destroy();
+ evas_object_del(eoBase);
m->pController->Destroy();
delete m->pController;
}
-Evas_Object* CMusicBaseView::Base(void)
-{
- ASSERT(m);
-
- return m->base;
-}
-
-
void CMusicBaseView::t_OnShow(void)
{
ASSERT(m);
- evas_object_show(m->base);
+ evas_object_show(Base());
if (!m->fresh_view) {
elm_object_focus_set(m->plbackbtn, EINA_TRUE);
{
ASSERT(m);
- evas_object_hide(m->base);
+ evas_object_hide(Base());
}