Removed SetMenuButton and Review comments fixed
authorAmith Kumar Mahale <amith.m@samsung.com>
Thu, 20 Jun 2013 15:27:53 +0000 (20:57 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Fri, 21 Jun 2013 04:50:46 +0000 (10:20 +0530)
Fix for N_SE-41947 and Changed Context menu to option menu

Change-Id: Icb7e93a9fe99038ffb36860c3e12658d506d05dd
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/ClEventDetailsForm.h
inc/ClMainForm.h
inc/ClReminderForm.h
inc/ClVcsSelectorForm.h
res/screen-size-normal/IDL_EVENT_DETAILS_FORM.xml
res/screen-size-normal/IDL_MAIN_FORM.xml
src/ClEventDetailsForm.cpp
src/ClMainForm.cpp
src/ClReminderForm.cpp
src/ClVcsSelectorForm.cpp

index 57cc4f6..1321b3f 100644 (file)
@@ -38,6 +38,7 @@ class EventDetailsForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
+       , public virtual Tizen::Ui::Controls::IFormMenuEventListener
        , public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
        , public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
@@ -83,6 +84,7 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnCalendarEventChanged(void);
+       virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form &source);
 
 private:
        Tizen::Ui::Controls::TableViewItem* CreateMainItemN(int itemWidth, const Tizen::Base::String& title,
@@ -100,7 +102,7 @@ private:
 private:
        EventPresentationModel* __pPm;
        Tizen::Ui::Controls::SectionTableView* __pTableView;
-       Tizen::Ui::Controls::ContextMenu* __pContextMenuSub;
+       Tizen::Ui::Controls::OptionMenu* __pOptionMenuSub;
        CalendarSelectorPopup* __pCalendarSelectorPopup;
        SharePopup* __pSharePopup;
        ThreeButtonPopup* __pThreeButtonPopup;
index 4884386..e7cedb4 100644 (file)
@@ -28,6 +28,7 @@ class MainForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
+       , public virtual Tizen::Ui::Controls::IFormMenuEventListener
 {
 public:
        result Initialize(void);
@@ -41,6 +42,7 @@ public:
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form &source);
 
 private:
        void InitializeViewMenu(void);
@@ -48,7 +50,7 @@ private:
 
 private:
        Tizen::Ui::Controls::ContextMenu* __pContextMenuView;
-       Tizen::Ui::Controls::ContextMenu* __pContextMenuSub;
+       Tizen::Ui::Controls::OptionMenu* __pOptionMenuSub;
 }; // MainForm
 
 #endif // _CL_MAIN_FORM_H_
index 426fcfa..eba3500 100644 (file)
@@ -28,6 +28,7 @@
 class ReminderForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
+       , public virtual Tizen::Ui::IKeypadEventListener
        , public virtual Tizen::Ui::ITextEventListener
        , public virtual Tizen::Ui::Controls::IEditTextFilter
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
@@ -77,6 +78,10 @@ public:
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
+       virtual void OnKeypadOpened(Tizen::Ui::Control& source);
+       virtual void OnKeypadClosed(Tizen::Ui::Control& source);
+       virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
 
 private:
        enum ReminderType
index e7ecf1f..ddd5168 100644 (file)
@@ -32,6 +32,7 @@ class VcsSelectorForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
+       , public virtual Tizen::Ui::Controls::IFormMenuEventListener
        , public virtual Tizen::Ui::Controls::IListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IListViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
@@ -61,6 +62,7 @@ public:
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form &source);
 
 private:
        Tizen::Graphics::Color GetCalendarColor(const Tizen::Social::RecordId& calendarId) const;
@@ -71,7 +73,7 @@ private:
 private:
        Tizen::Base::Collection::IList* __pList;
        Tizen::Ui::Controls::ListView* __pListViewContents;
-       Tizen::Ui::Controls::ContextMenu* __pContextMenuSub;
+       Tizen::Ui::Controls::OptionMenu* __pOptionMenuSub;
        Tizen::Locales::DateTimeFormatter* __pDateTimeFormatter;
        Tizen::Locales::DateTimeFormatter* __pDateFormatter;
        Tizen::Locales::DateTimeFormatter* __pTimeFormatter;
index 4c2805a..146a596 100644 (file)
@@ -4,7 +4,7 @@
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
 
-<Scene Bversion="2.0.0.201305071547" Dversion="20120315">
+<Scene Bversion="2.0.0.201306151404" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_EVENT_DETAILS_FORM">
         <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
         <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
     </Form>
     <Footer>
-        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="true"/>
+        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="true" showMenuButton="false"/>
         <itemSet>
             <footerItem accessibilityHint="" actionId="60001" disabledIconPath="" highlightedIconPath="" normalIconPath="" pressedIconPath="" selectedIconPath="" text="::IDS_CLD_SK3_EDIT"/>
-            <buttonItem accessibilityHint="" actionId="60010" disabledBGBitmapPath="" disabledIconPath="" highlightedBGBitmapPath="" highlightedIconPath="P01_icon_more_press.png" normalBGBitmapPath="" normalIconPath="P01_icon_more.png" position="BUTTON_POSITION_LEFT" pressedBGBitmapPath="" pressedIconPath="P01_icon_more_press.png" style="BUTTON_ITEM_STYLE_ICON" text="" type="left"/>
         </itemSet>
     </Footer>
     <SectionTableView id="IDC_SECTIONTABLEVIEW" parent="IDL_EVENT_DETAILS_FORM">
index 26db4d8..8022039 100644 (file)
@@ -4,7 +4,7 @@
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
 
-<Scene Bversion="2.0.0.201305071547" Dversion="20120315">
+<Scene Bversion="2.0.0.201306151404" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_MAIN_FORM">
         <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
         <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
     </Form>
     <Footer>
-        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="true"/>
+        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="true" showMenuButton="false"/>
         <itemSet>
             <footerItem accessibilityHint="" actionId="10011" disabledIconPath="" highlightedIconPath="" normalIconPath="" pressedIconPath="" selectedIconPath="" text="::IDS_CLD_SK3_CREATE"/>
-            <buttonItem accessibilityHint="" actionId="10019" disabledBGBitmapPath="" disabledIconPath="" highlightedBGBitmapPath="" highlightedIconPath="P01_icon_more_press.png" normalBGBitmapPath="" normalIconPath="P01_icon_more.png" position="BUTTON_POSITION_LEFT" pressedBGBitmapPath="" pressedIconPath="P01_icon_more_press.png" style="BUTTON_ITEM_STYLE_ICON" text="" type="left"/>
         </itemSet>
     </Footer>
     <Header>
index 6271aa1..29cf55c 100644 (file)
@@ -125,7 +125,7 @@ static const int H_SUB_MENU_HALF_BUTTON = 36;
 EventDetailsForm::EventDetailsForm(void)
        : __pPm(null)
        , __pTableView(null)
-       , __pContextMenuSub(null)
+       , __pOptionMenuSub(null)
        , __pCalendarSelectorPopup(null)
        , __pSharePopup(null)
        , __pThreeButtonPopup(null)
@@ -150,9 +150,11 @@ EventDetailsForm::OnInitializing(void)
        __pPm->Construct();
 
        SetFormBackEventListener(this);
+       SetFormMenuEventListener(this);
        Footer* pFooter = GetFooter();
        pFooter->AddActionEventListener(*this);
 
+
        __pTableView = dynamic_cast<SectionTableView*>(GetControl(L"IDC_SECTIONTABLEVIEW"));
        TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get sectiontableview.");
 
@@ -482,17 +484,17 @@ EventDetailsForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI
 
                                if (__pPm->IsEditable() == true)
                                {
-                                       if (__pContextMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE) < 0)
+                                       if (__pOptionMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE) < 0)
                                        {
-                                               __pContextMenuSub->InsertItemAt(0, ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_EVENT_DETAILS_FORM_DELETE);
+                                               __pOptionMenuSub->InsertItemAt(0, ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_EVENT_DETAILS_FORM_DELETE);
                                        }
                                }
                                else
                                {
-                                       int deleteIndex = __pContextMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE);
+                                       int deleteIndex = __pOptionMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE);
                                        if (deleteIndex >= 0)
                                        {
-                                               __pContextMenuSub->RemoveItemAt(deleteIndex);
+                                               __pOptionMenuSub->RemoveItemAt(deleteIndex);
                                        }
                                }
                        }
@@ -591,12 +593,6 @@ void
 EventDetailsForm::OnActionPerformed(const Control& source, int actionId)
 {
        result r = E_SUCCESS;
-       if (actionId == IDA_DETAIL_FORM_FOOTER_SUB_MENU)
-       {
-               __pContextMenuSub->SetShowState(true);
-               __pContextMenuSub->Show();
-               return;
-       }
 
        switch (actionId)
        {
@@ -1031,16 +1027,15 @@ EventDetailsForm::CreateSaveToItemN(int itemWidth, const String& accountName, co
 void
 EventDetailsForm::InitializeSubMenu(void)
 {
-       __pContextMenuSub = new (std::nothrow) ContextMenu();
-       __pContextMenuSub->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
-       __pContextMenuSub->AddActionEventListener(*this);
+       __pOptionMenuSub = new (std::nothrow) OptionMenu();
+       __pOptionMenuSub->Construct();
+       __pOptionMenuSub->AddActionEventListener(*this);
 
        Rectangle bounds = GetFooter()->GetBounds();
-       __pContextMenuSub->SetAnchorPosition(Point(bounds.x + W_SUB_MENU_MARGIN, bounds.y + bounds.height / 2 - H_SUB_MENU_HALF_BUTTON));
 
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_EVENT_DETAILS_FORM_DELETE);
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_COM_SK4_SHARE), IDA_EVENT_DETAILS_FORM_SHARE);
-       __pContextMenuSub->SetShowState(false);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_EVENT_DETAILS_FORM_DELETE);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_COM_SK4_SHARE), IDA_EVENT_DETAILS_FORM_SHARE);
+       __pOptionMenuSub->SetShowState(false);
 }
 
 result
@@ -1054,3 +1049,10 @@ EventDetailsForm::SendAppControlResult(AppCtrlResult appControlResult)
 
        return r;
 }
+
+void
+EventDetailsForm::OnFormMenuRequested(Tizen::Ui::Controls::Form &source)
+{
+       __pOptionMenuSub->SetShowState(true);
+       __pOptionMenuSub->Show();
+}
index 2bb7e79..f01dcf0 100644 (file)
@@ -36,7 +36,7 @@ using namespace Tizen::Ui::Scenes;
 
 MainForm::MainForm(void)
        : __pContextMenuView(null)
-       , __pContextMenuSub(null)
+       , __pOptionMenuSub(null)
 {
 }
 
@@ -54,7 +54,7 @@ result
 MainForm::OnInitializing(void)
 {
        SetFormBackEventListener(this);
-
+       SetFormMenuEventListener(this);
        GetHeader()->AddActionEventListener(*this);
        GetFooter()->AddActionEventListener(*this);
 
@@ -68,7 +68,7 @@ result
 MainForm::OnTerminating(void)
 {
        delete __pContextMenuView;
-       delete __pContextMenuSub;
+       delete __pOptionMenuSub;
        return E_SUCCESS;
 }
 
@@ -87,12 +87,6 @@ MainForm::OnActionPerformed(const Control& source, int actionId)
                __pContextMenuView->Show();
                return;
        }
-       else if (actionId == IDA_MAIN_FORM_FOOTER_SUB_MENU)
-       {
-               __pContextMenuSub->SetShowState(true);
-               __pContextMenuSub->Show();
-               return;
-       }
 
        Panel* pPanel = SceneManager::GetInstance()->GetCurrentScene()->GetPanel();
        if (pPanel)
@@ -124,31 +118,37 @@ MainForm::InitializeViewMenu(void)
 void
 MainForm::InitializeSubMenu(void)
 {
-       __pContextMenuSub = new (std::nothrow) ContextMenu();
-       __pContextMenuSub->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
-       __pContextMenuSub->AddActionEventListener(*this);
+       __pOptionMenuSub = new (std::nothrow) OptionMenu();
+       __pOptionMenuSub->Construct();
+       __pOptionMenuSub->AddActionEventListener(*this);
 
        Rectangle bounds = GetFooter()->GetButtonBounds(BUTTON_POSITION_LEFT);
        Point point = GetFooter()->ConvertToScreenPosition(Point(bounds.x, bounds.y));
-       __pContextMenuSub->SetAnchorPosition(point);
 
        Bitmap* pBitmap = ResourceManager::GetBitmapN(L"P01_more_icon_goto.png");
-       __pContextMenuSub->AddItem(ResourceManager::GetString(L"IDS_CLD_BUTTON_GO_TO"), IDA_SUB_MENU_GO_TO_DATE, *pBitmap);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(L"IDS_CLD_BUTTON_GO_TO"), IDA_SUB_MENU_GO_TO_DATE, *pBitmap);
        delete pBitmap;
 
        pBitmap = ResourceManager::GetBitmapN(L"P01_more_icon_delete.png");
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_SUB_MENU_DELETE, *pBitmap);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_SUB_MENU_DELETE, *pBitmap);
        delete pBitmap;
 
        pBitmap = ResourceManager::GetBitmapN(L"P01_more_icon_search.png");
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_BUTTON_SEARCH), IDA_SUB_MENU_SEARCH, *pBitmap);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_BUTTON_SEARCH), IDA_SUB_MENU_SEARCH, *pBitmap);
        delete pBitmap;
 
-//     __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_SUB_MENU_CALENDARS), IDA_SUB_MENU_CALENDARS);
 
        pBitmap = ResourceManager::GetBitmapN(L"P01_more_icon_setting.png");
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_OPT_SETTINGS), IDA_SUB_MENU_SETTING, *pBitmap);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_OPT_SETTINGS), IDA_SUB_MENU_SETTING, *pBitmap);
        delete pBitmap;
 
-       __pContextMenuSub->SetShowState(false);
+       __pOptionMenuSub->SetShowState(false);
+}
+
+void
+MainForm::OnFormMenuRequested(Tizen::Ui::Controls::Form &source)
+{
+
+       __pOptionMenuSub->SetShowState(true);
+       __pOptionMenuSub->Show();
 }
index 1d58f5d..320b225 100644 (file)
@@ -216,6 +216,7 @@ ReminderForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
                __pEditFieldReminderTime->SetEditTextFilter(this);
                __pEditFieldReminderTime->SetText(__customReminderTimeOffset);
                __pEditFieldReminderTime->SetEnabled(__reminderType == REMINDER_TYPE_CUSTOM);
+               __pEditFieldReminderTime->AddKeypadEventListener(*this);
                pItem->AddControl(__pEditFieldReminderTime);
                pItem->SetIndividualSelectionEnabled(__pEditFieldReminderTime, __reminderType == REMINDER_TYPE_CUSTOM);
 
@@ -554,6 +555,7 @@ ReminderForm::OnActionPerformed(const Control& source, int actionId)
        {
        case IDA_REMINDER_FORM_TIME_UNIT:
        {
+
                Point point = __pButtonReminderTimeUnit->ConvertToScreenPosition(__pButtonReminderTimeUnit->GetPosition());
                point.x -= __pButtonReminderTimeUnit->GetWidth();
                __pContextMenuTimeUnitSelector->SetAnchorPosition(point);
@@ -594,3 +596,24 @@ ReminderForm::OnActionPerformed(const Control& source, int actionId)
                break;
        }
 }
+
+void
+ReminderForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
+{
+       __pButtonReminderTimeUnit->SetEnabled(false);
+}
+void
+ReminderForm::OnKeypadOpened(Tizen::Ui::Control& source)
+{
+       __pButtonReminderTimeUnit->SetEnabled(true);
+       __pButtonReminderTimeUnit->Invalidate(true);
+
+}
+void
+ReminderForm::OnKeypadClosed(Tizen::Ui::Control& source)
+{
+}
+void
+ReminderForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
+{
+}
index 169475e..bae4740 100644 (file)
@@ -47,7 +47,7 @@ static const int H_HALF_BUTTON = 36;
 VcsSelectorForm::VcsSelectorForm(void)
        : __pList(null)
        , __pListViewContents(null)
-       , __pContextMenuSub(null)
+       , __pOptionMenuSub(null)
        , __pDateTimeFormatter(null)
        , __pDateFormatter(null)
        , __pTimeFormatter(null)
@@ -77,6 +77,7 @@ VcsSelectorForm::OnInitializing(void)
        InitializeSubMenu();
 
        SetFormBackEventListener(this);
+       SetFormMenuEventListener(this);
        GetFooter()->AddActionEventListener(*this);
 
        __pDateTimeFormatter = ResourceManager::CreateDateTimeFormatterN(Locales::DATE_TIME_STYLE_SHORT);
@@ -98,7 +99,7 @@ result
 VcsSelectorForm::OnTerminating(void)
 {
        delete __pList;
-       delete __pContextMenuSub;
+       delete __pOptionMenuSub;
        delete __pDateTimeFormatter;
        delete __pDateFormatter;
        delete __pTimeFormatter;
@@ -111,10 +112,6 @@ VcsSelectorForm::OnActionPerformed(const Control& source, int actionId)
 {
        switch (actionId)
        {
-       case IDA_VCS_SELECTOR_FORM_SUB_MENU:
-               __pContextMenuSub->SetShowState(true);
-               __pContextMenuSub->Show();
-               break;
        case IDA_VCS_SELECTOR_FORM_SUB_MENU_ADD_TO_CALENDAR:
        {
                ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
@@ -375,15 +372,15 @@ VcsSelectorForm::GetDateRangeText(const DateTime& start, const DateTime& end, bo
 void
 VcsSelectorForm::InitializeSubMenu(void)
 {
-       __pContextMenuSub = new (std::nothrow) ContextMenu();
-       __pContextMenuSub->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
-       __pContextMenuSub->AddActionEventListener(*this);
+       __pOptionMenuSub = new (std::nothrow) OptionMenu();
+       __pOptionMenuSub->Construct();
+       __pOptionMenuSub->AddActionEventListener(*this);
 
        Rectangle bounds = GetFooter()->GetBounds();
-       __pContextMenuSub->SetAnchorPosition(Point(bounds.x + W_MENU_MARGIN, bounds.y + bounds.height / 2 - H_HALF_BUTTON));
+       //__pOptionMenuSub->SetAnchorPosition(Point(bounds.x + W_MENU_MARGIN, bounds.y + bounds.height / 2 - H_HALF_BUTTON));
 
-       __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_EMAIL_OPT_ADD_TO_CALENDAR), IDA_VCS_SELECTOR_FORM_SUB_MENU_ADD_TO_CALENDAR);
-       __pContextMenuSub->SetShowState(false);
+       __pOptionMenuSub->AddItem(ResourceManager::GetString(IDS_EMAIL_OPT_ADD_TO_CALENDAR), IDA_VCS_SELECTOR_FORM_SUB_MENU_ADD_TO_CALENDAR);
+       __pOptionMenuSub->SetShowState(false);
 }
 
 bool
@@ -421,3 +418,11 @@ VcsSelectorForm::IsAllItemAdded(void) const
 
        return true;
 }
+
+void
+VcsSelectorForm::OnFormMenuRequested(Tizen::Ui::Controls::Form &source)
+{
+
+       __pOptionMenuSub->SetShowState(true);
+       __pOptionMenuSub->Show();
+}