src/views/BaseView/Info.cpp
src/views/BaseView/FbBaseView.cpp
src/layouts/FbAllLayout.cpp
+ src/layouts/FbPhotoLayout.cpp
+ src/layouts/FbVideoLayout.cpp
+ src/layouts/FbMusicLayout.cpp
src/views/BaseView/GengridItemClass.cpp
src/views/BaseView/SortCtxPopup.cpp
src/views/BaseView/SourceCtxPopup.cpp
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
+protected:
+ //! Show this layout instance. This function is invoked by CLayoutMgr.
+ virtual void t_OnShow(void);
+ //! Hide this layout instance. this function is invoked by CLayoutMgr.
+ virtual void t_OnHide(void);
+
public:
CFbAllLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {}
virtual ~CFbAllLayout() {}
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
+protected:
+ //! Show this layout instance. This function is invoked by CLayoutMgr.
+ virtual void t_OnShow(void);
+ //! Hide this layout instance. this function is invoked by CLayoutMgr.
+ virtual void t_OnHide(void);
+
public:
CFbMusicLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {}
virtual ~CFbMusicLayout() {}
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
+protected:
+ //! Show this layout instance. This function is invoked by CLayoutMgr.
+ virtual void t_OnShow(void);
+ //! Hide this layout instance. this function is invoked by CLayoutMgr.
+ virtual void t_OnHide(void);
+
public:
CFbPhotoLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {}
virtual ~CFbPhotoLayout() {}
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
+protected:
+ //! Show this layout instance. This function is invoked by CLayoutMgr.
+ virtual void t_OnShow(void);
+ //! Hide this layout instance. this function is invoked by CLayoutMgr.
+ virtual void t_OnHide(void);
+
public:
CFbVideoLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {}
virtual ~CFbVideoLayout() {}
}
+void CFbAllLayout::t_OnShow(void)
+{
+ _DBG();
+
+ m->pFileGrid->Update(false);
+// CBaseLayout::t_OnShow();
+ return;
+}
+
+
+void CFbAllLayout::t_OnHide(void)
+{
+// CBaseLayout::t_OnHide();
+ return;
+}
+
+
bool CFbAllLayout::Create(CLayoutMgr *mgr, void *data)
{
ASSERT(!m);
+#include <Elementary.h>
+#include <AppCommon.h>
+#include <BaseView.h>
+#include <ViewMgr.h>
+#include <BaseLayout.h>
+#include <LayoutMgr.h>
+
+#include "dbg.h"
+#include "define.h"
+#include "FileGrid.h"
+
+#include <CtxPopup.h>
+#include "FbBaseView.h"
+#include "FbMusicLayout.h"
+
+
+struct SFbMusicLayout {
+ Evas_Object *eoWin;
+ Evas_Object *eoBase;
+ CFileGrid *pFileGrid;
+
+ CLayoutMgr *pLayoutMgr;
+ CViewMgr *pViewMgr;
+};
+
+
+bool CFbMusicLayout::t_CreateFileGrid(Evas_Object *layout)
+{
+ return true;
+}
+
+
+void CFbMusicLayout::t_DestroyFileGrid(void)
+{
+ return;
+}
+
+
+void CFbMusicLayout::t_OnShow(void)
+{
+ return;
+}
+
+
+void CFbMusicLayout::t_OnHide(void)
+{
+ return;
+}
+
+
+bool CFbMusicLayout::Create(CLayoutMgr *mgr, void *data)
+{
+ return true;
+}
+
+
+void CFbMusicLayout::Destroy(void)
+{
+ return;
+}
+
+
+void CFbMusicLayout::Update(bool flag)
+{
+ return;
+}
+
+
+void CFbMusicLayout::SetFocus(Eina_Bool flag)
+{
+ return;
+}
+
+
+Evas_Object* CFbMusicLayout::Grid(void)
+{
+ return NULL;
+}
+
+
+void CFbMusicLayout::Action(void)
+{
+ return;
+}
+#include <Elementary.h>
+#include <AppCommon.h>
+#include <BaseView.h>
+#include <ViewMgr.h>
+#include <BaseLayout.h>
+#include <LayoutMgr.h>
+
+#include "dbg.h"
+#include "define.h"
+#include "FileGrid.h"
+
+#include <CtxPopup.h>
+#include "FbBaseView.h"
+#include "FbPhotoLayout.h"
+
+
+struct SFbPhotoLayout {
+ Evas_Object *eoWin;
+ Evas_Object *eoBase;
+ CFileGrid *pFileGrid;
+
+ CLayoutMgr *pLayoutMgr;
+ CViewMgr *pViewMgr;
+};
+
+
+bool CFbPhotoLayout::t_CreateFileGrid(Evas_Object *layout)
+{
+ return true;
+}
+
+
+void CFbPhotoLayout::t_DestroyFileGrid(void)
+{
+ return;
+}
+
+
+void CFbPhotoLayout::t_OnShow(void)
+{
+ return;
+}
+
+
+void CFbPhotoLayout::t_OnHide(void)
+{
+ return;
+}
+
+
+bool CFbPhotoLayout::Create(CLayoutMgr *mgr, void *data)
+{
+ return true;
+}
+
+
+void CFbPhotoLayout::Destroy(void)
+{
+ return;
+}
+
+
+void CFbPhotoLayout::Update(bool flag)
+{
+ return;
+}
+
+
+void CFbPhotoLayout::SetFocus(Eina_Bool flag)
+{
+ return;
+}
+
+
+Evas_Object* CFbPhotoLayout::Grid(void)
+{
+ return NULL;
+}
+
+
+void CFbPhotoLayout::Action(void)
+{
+ return;
+}
+#include <Elementary.h>
+#include <AppCommon.h>
+#include <BaseView.h>
+#include <ViewMgr.h>
+#include <BaseLayout.h>
+#include <LayoutMgr.h>
+
+#include "dbg.h"
+#include "define.h"
+#include "FileGrid.h"
+
+#include <CtxPopup.h>
+#include "FbBaseView.h"
+#include "FbVideoLayout.h"
+
+
+struct SFbVideoLayout {
+ Evas_Object *eoWin;
+ Evas_Object *eoBase;
+ CFileGrid *pFileGrid;
+
+ CLayoutMgr *pLayoutMgr;
+ CViewMgr *pViewMgr;
+};
+
+
+bool CFbVideoLayout::t_CreateFileGrid(Evas_Object *layout)
+{
+ return true;
+}
+
+
+void CFbVideoLayout::t_DestroyFileGrid(void)
+{
+ return;
+}
+
+
+void CFbVideoLayout::t_OnShow(void)
+{
+ return;
+}
+
+
+void CFbVideoLayout::t_OnHide(void)
+{
+ return;
+}
+
+
+bool CFbVideoLayout::Create(CLayoutMgr *mgr, void *data)
+{
+ return true;
+}
+
+
+void CFbVideoLayout::Destroy(void)
+{
+ return;
+}
+
+
+void CFbVideoLayout::Update(bool flag)
+{
+ return;
+}
+
+
+void CFbVideoLayout::SetFocus(Eina_Bool flag)
+{
+ return;
+}
+
+
+Evas_Object* CFbVideoLayout::Grid(void)
+{
+ return NULL;
+}
+
+
+void CFbVideoLayout::Action(void)
+{
+ return;
+}
CViewMgr* viewmgr = NULL;
_DBG(" ******************* OnService *********************");
- _DBG("222");
elm_win_activate(ad.win);
r = service_get_extra_data(service, PARAM_SOURCE, &source);
#include <LayoutMgr.h>
#include <BaseLayout.h>
#include "FbAllLayout.h"
+#include "FbPhotoLayout.h"
+#include "FbVideoLayout.h"
+#include "FbMusicLayout.h"
#define TOTAL_GROUP_BTNS 4
#define TOTAL_TOP_BTNS 2
Evas_Object *eoBtnSort;
CCtxPopup *pCtxPopup;
-
CPopup *pPopup;
- CLayoutMgr *pLayoutMgr;
- CFbAllLayout *pFbAllLayout;
-#if 0
- CBaseLayout *pCurrentLayout;
+ CLayoutMgr *pLayoutMgr;
+
+ char* *pCurrentLayoutId;
+ CFbAllLayout *pFbAllLayout;
CFbPhotoLayout *pFbPhotoLayout;
CFbMusicLayout *pFbMusicLayout;
CFbVideoLayout *pFbVideoLayout;
-#endif
SFbBaseView() {
int a;
#if 1
m->pFbAllLayout->Update(true);
#else
- m->pCurrentLayout->Update(true);
+ m->pLayoutMgr->Show(Current_layout);
#endif
break;
#if 1
m->pFbAllLayout->Update(false);
#else
- m->pCurrentLayout->Update(true);
+ m->pLayoutMgr->Show(Current_layout);
#endif
break;
switch(id)
{
case E_GRP_ALL:
- m->pFbAllLayout->Update(false);
+ m->pLayoutMgr->Show(FB_ALL_LAYOUT);
break;
case E_GRP_PHOTO:
- m->pFbPhotoLayout->Update(false);
+ m->pLayoutMgr->Show(FB_PHOTO_LAYOUT);
break;
case E_GRP_VIDEO:
- m->pFbVideoLayout->Update(false);
+ m->pLayoutMgr->Show(FB_VIDEO_LAYOUT);
break;
case E_GRP_MUSIC:
- m->pFbMusicLayout->Update(false);
+ m->pLayoutMgr->Show(FB_MUSIC_LAYOUT);
break;
default:
_DBG("Fix it: it can not make it , MouseClicked");
t_CreateTopSession();
t_CreateLeftSession();
_DBG("UpdateLayout");
+#if 1
m->pFbAllLayout->Update(false);
+#else
+ m->pLayoutMgr->Show(Current_layout);
+#endif
}
void CFbBaseView::t_SetSelectedGroupButton(Evas_Object* obj)
void CFbBaseView::t_OnUpdate(void *data)
{
+ // TODO: When does this function is called? If it don't be used, Remove it.
_DBG();
m->pFbAllLayout->Action();
}
_CHECK(m->pLayoutMgr = new CLayoutMgr)
_CHECK(m->pLayoutMgr->Create(eoBase, NULL))
_CHECK(m->pFbAllLayout = new CFbAllLayout(FB_ALL_LAYOUT))
+ _CHECK(m->pFbPhotoLayout = new CFbPhotoLayout(FB_PHOTO_LAYOUT))
+ _CHECK(m->pFbVideoLayout = new CFbVideoLayout(FB_VIDEO_LAYOUT))
+ _CHECK(m->pFbMusicLayout = new CFbMusicLayout(FB_MUSIC_LAYOUT))
_CHECK(m->pFbAllLayout->Create(m->pLayoutMgr, NULL))
+ _CHECK(m->pFbPhotoLayout->Create(m->pLayoutMgr, NULL))
+ _CHECK(m->pFbVideoLayout->Create(m->pLayoutMgr, NULL))
+ _CHECK(m->pFbMusicLayout->Create(m->pLayoutMgr, NULL))
_CHECK(m->pLayoutMgr->AddLayout(m->pFbAllLayout))
+ _CHECK(m->pLayoutMgr->AddLayout(m->pFbPhotoLayout))
+ _CHECK(m->pLayoutMgr->AddLayout(m->pFbVideoLayout))
+ _CHECK(m->pLayoutMgr->AddLayout(m->pFbMusicLayout))
_CHECK(CUsbConnectionListener::Create())
_WHEN_SUCCESS{}
_CHECK_FAIL{ CUsbConnectionListener::Destroy(); }
+ _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout); }
+ _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout); }
+ _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout); }
_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbAllLayout); }
+ _CHECK_FAIL{ m->pFbMusicLayout->Destroy(); }
+ _CHECK_FAIL{ m->pFbVideoLayout->Destroy(); }
+ _CHECK_FAIL{ m->pFbPhotoLayout->Destroy(); }
_CHECK_FAIL{ m->pFbAllLayout->Destroy(); }
+ _CHECK_FAIL{ delete m->pFbMusicLayout; m->pFbMusicLayout = NULL; }
+ _CHECK_FAIL{ delete m->pFbVideoLayout; m->pFbVideoLayout = NULL; }
+ _CHECK_FAIL{ delete m->pFbPhotoLayout; m->pFbPhotoLayout = NULL; }
_CHECK_FAIL{ delete m->pFbAllLayout; m->pFbAllLayout = NULL; }
_CHECK_FAIL{ m->pLayoutMgr->Destroy(); }
_CHECK_FAIL{ delete m->pLayoutMgr; m->pLayoutMgr = NULL; }
CBaseView::Destroy();
CUsbConnectionListener::Destroy();
+ m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout);
+ m->pFbMusicLayout->Destroy();
+ delete m->pFbMusicLayout;
+
+ m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout);
+ m->pFbVideoLayout->Destroy();
+ delete m->pFbVideoLayout;
+
+ m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout);
+ m->pFbPhotoLayout->Destroy();
+ delete m->pFbPhotoLayout;
+
m->pLayoutMgr->RemoveLayout(m->pFbAllLayout);
m->pFbAllLayout->Destroy();
delete m->pFbAllLayout;
m->pCtxPopup = NULL;
}
if (CInfo::SourceType() != E_TV) {
+#if 1
m->pFbAllLayout->Update(false);
+#else
+ m->pLayoutMgr->Show(Current_layout);
+#endif
elm_object_focus_set(t_SelectedGroupButton(), EINA_TRUE);
}
}