// Tizen Native SDK
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.tizenopensource.org/license
+// http://floralicense.org/license/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an AS IS BASIS,
* @brief This file contains the definitions of the SlideShowPopUp class.
*/
-#include <FAppUiApp.h>
#include <FUiScenes.h>
#include "GlResourceManager.h"
-#include "GlSlideShowPopUp.h"
#include "GlSlideSettingListener.h"
+#include "GlSlideShowPopUp.h"
using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-
static const int ID_FORMAT_START = 501;
static const int ID_FORMAT_SETTING = 502;
static const int ID_CANCEL_BUTTON = 503;
-
SlideShowPopUp::SlideShowPopUp(void)
-:__pList(null)
+ : __pList(null)
+ , __pListener(null)
{
-
}
SlideShowPopUp::~SlideShowPopUp(void)
{
-
}
bool
{
Button* pCancelButton = null;
Popup::Construct(L"IDL_SLIDESHOW_SETTING_POPUP");
+ Popup::SetPropagatedKeyEventListener(this);
__pList = static_cast<ListView*>(GetControl(L"IDC_POPUP_LIST"));
__pList->SetItemProvider(*this);
__pList->AddListViewItemEventListener(*this);
- pCancelButton = static_cast< Button* >(GetControl(L"IDC_BUTTON", true));
+ pCancelButton = static_cast<Button*>(GetControl(L"IDC_BUTTON", true));
if (pCancelButton != null)
{
}
return true;
-
}
result
SlideShowPopUp::OnTerminating(void)
{
- result r = E_SUCCESS;
- return r;
+ return E_SUCCESS;
}
void
Popup::Show();
}
break;
+
default:
break;
}
void
SlideShowPopUp::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
{
-
if (__pListener != null)
{
__pListener->OnSlideSettingPopUpItemSelected(index);
}
+}
+bool
+SlideShowPopUp::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("ENTER");
+
+ if(keyEventInfo.GetKeyCode() == KEY_BACK)
+ {
+ Popup::SetShowState(false);
+ Popup::Show();
+ }
+ return false;
}
ListItemBase*
SlideShowPopUp::CreateItem(int index, int itemWidth)
{
- result r = E_FAILURE;
ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
int listItemHeight = 112;
CustomItem* pItem = new (std::nothrow) CustomItem();
- r = pItem->Construct(Dimension(GetClientAreaBounds().width, listItemHeight), style);
+ result r = pItem->Construct(Dimension(GetClientAreaBounds().width, listItemHeight), style);
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color::GetColor(COLOR_ID_WHITE));
if (IsFailed(r))
switch (index)
{
-
case 0:
{
- pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_START,
+ pItem->AddElement(Rectangle(25, 0, GetClientAreaBounds().width -50, listItemHeight), ID_FORMAT_START,
ResourceManager::GetString(L"IDS_MEDIABR_OPT_START_SLIDESHOW"), true);
}
break;
case 1:
{
- pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_SETTING,
+ pItem->AddElement(Rectangle(25, 0, GetClientAreaBounds().width -50, listItemHeight), ID_FORMAT_SETTING,
ResourceManager::GetString(L"IDS_MEDIABR_BODY_SLIDESHOW_SETTINGS"), true);
}
break;
{
__pListener = listner;
}
-