Merge "fixed bug(N_SE-46042, N_SE-46098)" into tizen_2.2
authorChulheon <ch.jeong47@samsung.com>
Sun, 14 Jul 2013 07:59:05 +0000 (07:59 +0000)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Sun, 14 Jul 2013 07:59:05 +0000 (07:59 +0000)
69 files changed:
inc/FUiUiConfigurationTypes.h
res/common/usr/share/osp/bitmaps/480x800/white/00_sub_title_ef.#.png
res/common/usr/share/osp/bitmaps/720x1280/white/00_sub_title_ef.#.png
src/graphics/FGrp_BufferInfoImpl.cpp
src/graphics/inc/FGrp_BufferInfoImpl.h
src/ui/FUi_Control.cpp
src/ui/FUi_ControlManager.cpp
src/ui/FUi_EcoreEvas.cpp
src/ui/FUi_FocusManagerImpl.cpp
src/ui/FUi_ModalLoopManager.cpp
src/ui/FUi_OrientationAgent.cpp [changed mode: 0644->0755]
src/ui/FUi_PublicOrientationEvent.cpp
src/ui/FUi_ResourceManager.cpp [changed mode: 0644->0755]
src/ui/FUi_UiEventManager.cpp
src/ui/FUi_Window.cpp
src/ui/animations/FUiAnim_EflLayer.cpp
src/ui/controls/FUiCtrl_ButtonPresenter.cpp
src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp
src/ui/controls/FUiCtrl_ContextMenuItem.cpp
src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp
src/ui/controls/FUiCtrl_DateTimePresenter.cpp
src/ui/controls/FUiCtrl_EditDatePresenter.cpp
src/ui/controls/FUiCtrl_EditTimePresenter.cpp
src/ui/controls/FUiCtrl_Form.cpp
src/ui/controls/FUiCtrl_FormImpl.cpp [changed mode: 0644->0755]
src/ui/controls/FUiCtrl_Frame.cpp [changed mode: 0644->0755]
src/ui/controls/FUiCtrl_FrameImpl.cpp [changed mode: 0644->0755]
src/ui/controls/FUiCtrl_Gallery.cpp
src/ui/controls/FUiCtrl_GalleryPresenter.cpp
src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp
src/ui/controls/FUiCtrl_IconListPresenter.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp
src/ui/controls/FUiCtrl_ListViewItem.cpp
src/ui/controls/FUiCtrl_MessageBox.cpp
src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp
src/ui/controls/FUiCtrl_OptionMenu.cpp
src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp
src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp [changed mode: 0644->0755]
src/ui/controls/FUiCtrl_Popup.cpp
src/ui/controls/FUiCtrl_ProgressPopup.cpp
src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp
src/ui/controls/FUiCtrl_ScrollPanel.cpp
src/ui/controls/FUiCtrl_TableView.cpp
src/ui/controls/FUiCtrl_TableViewItem.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp
src/ui/controls/FUiCtrl_TokenEditPresenter.cpp
src/ui/controls/FUiCtrl_Toolbar.cpp
src/ui/controls/FUiCtrl_ToolbarPresenter.cpp
src/ui/inc/FUiAnim_EflLayer.h
src/ui/inc/FUiCtrl_CheckButtonPresenter.h
src/ui/inc/FUiCtrl_ContextMenuListPresenter.h
src/ui/inc/FUiCtrl_Form.h
src/ui/inc/FUiCtrl_Frame.h
src/ui/inc/FUiCtrl_GalleryViewEvent.h
src/ui/inc/FUiCtrl_GalleryViewEventHandler.h
src/ui/inc/FUiCtrl_MessageBox.h
src/ui/inc/FUiCtrl_MessageBoxPresenter.h
src/ui/inc/FUiCtrl_OptionMenuPresenter.h
src/ui/inc/FUiCtrl_Popup.h
src/ui/inc/FUiCtrl_ProgressPopup.h
src/ui/inc/FUiCtrl_ScrollPanel.h
src/ui/inc/FUiCtrl_TokenEditPresenter.h
src/ui/inc/FUi_ControlManager.h
src/ui/inc/FUi_FocusManagerImpl.h
src/ui/inc/FUi_Window.h
src/ui/resource/FUi_ResourceConfigParser.cpp
src/ui/resource/FUi_ResourceHeaderConfig.cpp
src/ui/scenes/FUiScenes_SceneManagerImpl.cpp

index 17ff3c3..17388e1 100644 (file)
 
 namespace Tizen { namespace Ui {
 
+/**
+ * @struct     ColorKey
+ * @brief              This struct provides the color keys of controls.
+ *
+ * @since 2.1
+ *
+ * The %ColorKey struct provides the color keys of controls.
+ *
+ */
 struct _OSP_EXPORT_ ColorKey
 {
+       /**
+        * @struct      Button
+        * @brief               This struct provides the color keys of %Button.
+        *
+        * @since 2.1
+        *
+        * The %Button struct provides the color keys of %Button.
+        *
+        */
        struct _OSP_EXPORT_ Button
        {
                /**
@@ -90,6 +108,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      CheckButton
+        * @brief               This struct provides the color keys of %CheckButton.
+        *
+        * @since 2.1
+        *
+        * The %CheckButton struct provides the color keys of %CheckButton.
+        *
+        */
        struct CheckButton
        {
                /**
@@ -281,6 +308,16 @@ struct _OSP_EXPORT_ ColorKey
                */
                _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_NORMAL;
        };
+
+       /**
+        * @struct      ColorPicker
+        * @brief               This struct provides the color keys of %ColorPicker.
+        *
+        * @since 2.1
+        *
+        * The %ColorPicker struct provides the color keys of %ColorPicker.
+        *
+        */
        struct _OSP_EXPORT_ ColorPicker
        {
                /**
@@ -347,6 +384,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int HANDLER_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      ContextMenu
+        * @brief               This struct provides the color keys of %ContextMenu.
+        *
+        * @since 2.1
+        *
+        * The %ContextMenu struct provides the color keys of %ContextMenu.
+        *
+        */
        struct _OSP_EXPORT_ ContextMenu
        {
                /**
@@ -441,6 +487,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED;
        };
 
+       /**
+        * @struct      DateTimeBar
+        * @brief               This struct provides the color keys of %DateTimeBar.
+        *
+        * @since 2.1
+        *
+        * The %DateTimeBar struct provides the color keys of %DateTimeBar.
+        *
+        */
        struct _OSP_EXPORT_ DateTimeBar
        {
                /**
@@ -464,6 +519,16 @@ struct _OSP_EXPORT_ ColorKey
                */
                _OSP_EXPORT_ static const int TEXT_PRESSED;
        };
+
+       /**
+        * @struct      DateTimePicker
+        * @brief               This struct provides the color keys of %DateTimePicker.
+        *
+        * @since 2.1
+        *
+        * The %DateTimePicker struct provides the color keys of %DateTimePicker.
+        *
+        */
        struct _OSP_EXPORT_ DateTimePicker
        {
                /**
@@ -620,6 +685,16 @@ struct _OSP_EXPORT_ ColorKey
                */
                _OSP_EXPORT_ static const int TITLE_DISABLED;
        };
+
+       /**
+        * @struct      Edit
+        * @brief               This struct provides the color keys of %Edit.
+        *
+        * @since 2.1
+        *
+        * The %Edit struct provides the color keys of %Edit.
+        *
+        */
        struct _OSP_EXPORT_ Edit
        {
                /**
@@ -749,6 +824,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int CURSOR_NORMAL;
        };
 
+       /**
+        * @struct      EditDate
+        * @brief               This struct provides the color keys of %EditDate.
+        *
+        * @since 2.1
+        *
+        * The %EditDate struct provides the color keys of %EditDate.
+        *
+        */
        struct _OSP_EXPORT_ EditDate
        {
                /**
@@ -822,6 +906,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      EditTime
+        * @brief               This struct provides the color keys of %EditTime.
+        *
+        * @since 2.1
+        *
+        * The %EditTime struct provides the color keys of %EditTime.
+        *
+        */
        struct _OSP_EXPORT_ EditTime
        {
                /**
@@ -951,6 +1044,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      FastScroll
+        * @brief               This struct provides the color keys of %FastScroll.
+        *
+        * @since 2.1
+        *
+        * The %FastScroll struct provides the color keys of %FastScroll.
+        *
+        */
        struct _OSP_EXPORT_ FastScroll
        {
                /**
@@ -1010,6 +1112,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int POPUP_TEXT_NORMAL;
        };
 
+       /**
+        * @struct      Footer
+        * @brief               This struct provides the color keys of %Footer.
+        *
+        * @since 2.1
+        *
+        * The %Footer struct provides the color keys of %Footer.
+        *
+        */
        struct _OSP_EXPORT_ Footer
        {
                /**
@@ -1587,6 +1698,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL;
        };
 
+       /**
+        * @struct      Form
+        * @brief               This struct provides the color keys of %Form.
+        *
+        * @since 2.1
+        *
+        * The %Form struct provides the color keys of %Form.
+        *
+        */
        struct _OSP_EXPORT_ Form
        {
                /**
@@ -1597,6 +1717,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BG_NORMAL;
        };
 
+       /**
+        * @struct      Gallery
+        * @brief               This struct provides the color keys of %Gallery.
+        *
+        * @since 2.1
+        *
+        * The %Gallery struct provides the color keys of %Gallery.
+        *
+        */
        struct _OSP_EXPORT_ Gallery
        {
                /**
@@ -1607,6 +1736,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL;
        };
 
+       /**
+        * @struct      Header
+        * @brief               This struct provides the color keys of %Header.
+        *
+        * @since 2.1
+        *
+        * The %Header struct provides the color keys of %Header.
+        *
+        */
        struct _OSP_EXPORT_ Header
        {
                /**
@@ -2240,6 +2378,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      IconList
+        * @brief               This struct provides the color keys of %IconList.
+        *
+        * @since 2.1
+        *
+        * The %IconList struct provides the color keys of %IconList.
+        *
+        */
        struct _OSP_EXPORT_ IconList
        {
                /**
@@ -2327,6 +2474,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int ITEM_BORDER_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      InputPad
+        * @brief               This struct provides the color keys of %InputPad.
+        *
+        * @since 2.1
+        *
+        * The %InputPad struct provides the color keys of %InputPad.
+        *
+        */
        struct _OSP_EXPORT_ InputPad
        {
                /**
@@ -2407,6 +2563,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BUTTON_BG_DISABLED;
        };
 
+       /**
+        * @struct      Label
+        * @brief               This struct provides the color keys of %Label.
+        *
+        * @since 2.1
+        *
+        * The %Label struct provides the color keys of %Label.
+        *
+        */
        struct _OSP_EXPORT_ Label
        {
                /**
@@ -2417,6 +2582,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int TEXT_NORMAL;
        };
 
+       /**
+        * @struct      MessageBox
+        * @brief               This struct provides the color keys of %MessageBox.
+        *
+        * @since 2.1
+        *
+        * The %MessageBox struct provides the color keys of %MessageBox.
+        *
+        */
        struct _OSP_EXPORT_ MessageBox
        {
                /**
@@ -2511,6 +2685,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_HIGHLIGHTED;
        };
 
+       /**
+        * @struct      OptionMenu
+        * @brief               This struct provides the color keys of %OptionMenu.
+        *
+        * @since 2.1
+        *
+        * The %OptionMenu struct provides the color keys of %OptionMenu.
+        *
+        */
        struct _OSP_EXPORT_ OptionMenu
        {
                /**
@@ -2619,6 +2802,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_02_NORMAL;
        };
 
+       /**
+        * @struct      Panel
+        * @brief               This struct provides the color keys of %Panel.
+        *
+        * @since 2.1
+        *
+        * The %Panel struct provides the color keys of %Panel.
+        *
+        */
        struct _OSP_EXPORT_ Panel
        {
                /**
@@ -2629,6 +2821,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int GROUPED_STYLE_BG_NORMAL;
        };
 
+       /**
+        * @struct      Popup
+        * @brief               This struct provides the color keys of %Popup.
+        *
+        * @since 2.1
+        *
+        * The %Popup struct provides the color keys of %Popup.
+        *
+        */
        struct _OSP_EXPORT_ Popup
        {
                /**
@@ -2653,6 +2854,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int TITLE_BG_NORMAL;
        };
 
+       /**
+        * @struct      Progress
+        * @brief               This struct provides the color keys of %Progress.
+        *
+        * @since 2.1
+        *
+        * The %Progress struct provides the color keys of %Progress.
+        *
+        */
        struct _OSP_EXPORT_ Progress
        {
                /**
@@ -2670,6 +2880,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BAR_NORMAL;
        };
 
+       /**
+        * @struct      Scroll
+        * @brief               This struct provides the color keys of %Scroll.
+        *
+        * @since 2.1
+        *
+        * The %Scroll struct provides the color keys of %Scroll.
+        *
+        */
        struct _OSP_EXPORT_ Scroll
        {
                /**
@@ -2708,6 +2927,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BUTTON_BG_PRESSED;
        };
 
+       /**
+        * @struct      SearchBar
+        * @brief               This struct provides the color keys of %SearchBar.
+        *
+        * @since 2.1
+        *
+        * The %SearchBar struct provides the color keys of %SearchBar.
+        *
+        */
        struct _OSP_EXPORT_ SearchBar
        {
                /**
@@ -2865,6 +3093,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int BG_NORMAL;
        };
 
+       /**
+        * @struct      Slider
+        * @brief               This struct provides the color keys of %Slider.
+        *
+        * @since 2.1
+        *
+        * The %Slider struct provides the color keys of %Slider.
+        *
+        */
        struct _OSP_EXPORT_ Slider
        {
                /**
@@ -2973,6 +3210,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int OVERLAY_TEXT_NORMAL;
        };
 
+       /**
+        * @struct      SplitPanel
+        * @brief               This struct provides the color keys of %SplitPanel.
+        *
+        * @since 2.1
+        *
+        * The %SplitPanel struct provides the color keys of %SplitPanel.
+        *
+        */
        struct _OSP_EXPORT_ SplitPanel
        {
                /**
@@ -2997,6 +3243,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int DIVIDER_BG_DISABLED;
        };
 
+       /**
+        * @struct      TabBar
+        * @brief               This struct provides the color keys of %TabBar.
+        *
+        * @since 2.1
+        *
+        * The %TabBar struct provides the color keys of %TabBar.
+        *
+        */
        struct _OSP_EXPORT_ TabBar
        {
                /**
@@ -3070,6 +3325,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int ARROW_BG_NORMAL;
        };
 
+       /**
+        * @struct      Tab
+        * @brief               This struct provides the color keys of %Tab.
+        *
+        * @since 2.1
+        *
+        * The %Tab struct provides the color keys of %Tab.
+        *
+        */
        struct _OSP_EXPORT_ Tab
        {
                /**
@@ -3143,6 +3407,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED;
        };
 
+       /**
+        * @struct      TableView
+        * @brief               This struct provides the color keys of %TableView.
+        *
+        * @since 2.1
+        *
+        * The %TableView struct provides the color keys of %TableView.
+        *
+        */
        struct _OSP_EXPORT_ TableView
        {
                /**
@@ -3419,6 +3692,15 @@ struct _OSP_EXPORT_ ColorKey
                _OSP_EXPORT_ static const int ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL;
        };
 
+       /**
+        * @struct      TokenEdit
+        * @brief               This struct provides the color keys of %TokenEdit.
+        *
+        * @since 2.1
+        *
+        * The %TokenEdit struct provides the color keys of %TokenEdit.
+        *
+        */
        struct _OSP_EXPORT_ TokenEdit
        {
                /**
index e4bf512..190015c 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_sub_title_ef.#.png and b/res/common/usr/share/osp/bitmaps/480x800/white/00_sub_title_ef.#.png differ
index e4bf512..2627ac6 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_sub_title_ef.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_sub_title_ef.#.png differ
index 3530bb9..e94aae2 100644 (file)
@@ -32,6 +32,7 @@ namespace Tizen { namespace Graphics
 _BufferInfoImpl::_BufferInfoImpl()
        : __handleType(HANDLE_TYPE_NONE)
        , __handle(INVALID_BUFFER_HANDLE)
+       , __pUserData(null)
        , __orientation(ORIENTATION_PORTRAIT)
        , __rotation(ROTATION_0)
 {
@@ -40,6 +41,7 @@ _BufferInfoImpl::_BufferInfoImpl()
 _BufferInfoImpl::_BufferInfoImpl(const _BufferInfoImpl& src)
        : __handleType(src.__handleType)
        , __handle(src.__handle)
+       , __pUserData(src.__pUserData)
        , __orientation(src.__orientation)
        , __rotation(ROTATION_0)
 {
@@ -78,20 +80,34 @@ _BufferInfoImpl::GetHandle(HandleType handleType) const
        }
 }
 
+void*
+_BufferInfoImpl::GetUserData(HandleType handleType) const
+{
+       switch (handleType)
+       {
+       case HANDLE_TYPE_OVERLAY_REGION:
+               return __pUserData;
+       default:
+               return null;
+       }
+}
+
 void
-_BufferInfoImpl::SetHandle(HandleType handleType, int handle)
+_BufferInfoImpl::SetHandle(HandleType handleType, int handle, void* pUserData)
 {
        switch (handleType)
        {
        case HANDLE_TYPE_NONE:
                __handleType = HANDLE_TYPE_NONE;
                __handle = INVALID_BUFFER_HANDLE;
+               __pUserData = null;
                break;
        case HANDLE_TYPE_OVERLAY_REGION:
        case HANDLE_TYPE_VE_SURFACE:
        case HANDLE_TYPE_CANVAS_TEXTURE:
                __handleType = handleType;
                __handle = handle;
+               __pUserData = pUserData;
                break;
        }
 }
@@ -162,3 +178,4 @@ _BufferInfoImpl::GetInstance(const BufferInfo& bufferInfo)
 }
 
 }} // Tizen::Graphics
+
index 08c45cd..283d9c1 100644 (file)
@@ -85,11 +85,13 @@ public:
         */
        int GetHandle(HandleType handleType) const;
 
+       void* GetUserData(HandleType handleType) const;
+
        /*
         * Sets the handle of the current instance of _BufferInfoImpl.
         *
         */
-       void SetHandle(HandleType handleType, int handle);
+       void SetHandle(HandleType handleType, int handle, void* pUserData = null);
 
        /*
         * Gets the orientation of the current instance of _BufferInfoImpl.
@@ -145,6 +147,7 @@ private:
 
        HandleType __handleType;
        int __handle;
+       void* __pUserData;
        Orientation __orientation;
        Rectangle __bounds;
        Rotation __rotation;
index 636ace1..24a9a53 100644 (file)
@@ -693,6 +693,11 @@ _Control::OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo)
 bool
 _Control::OnFocusGained(const _Control& source)
 {
+       bool isfocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled();
+       if (isfocusMode)
+       {
+               DrawFocus();
+       }
        return false;
 }
 
@@ -1615,7 +1620,7 @@ _Control::CallOnDetachingFromMainTree(_Control& control)
                _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this);
                if ((&control) == pFocusTraversalControl)
                {
-                       pTop->SetFocusTraversalControl(this);
+                       pTop->SetFocusTraversalControl(&control, false);
                }
        }
 
@@ -4816,7 +4821,6 @@ _Control::SetVisualElement(_ControlVisualElement* pVisualElement)
 _VisualElement*
 _Control::GetVisualElement(void) const
 {
-       //SysAssert(__pVisualElement);
        return __pVisualElement;
 }
 
@@ -4825,7 +4829,7 @@ _Control::PrintDescription(bool printChildren, int level)
 {
        int count = PrintDescription(printChildren, 0, level);
 
-       SysLog(NID_UI, "%d controls were printed.", count);
+       SysSecureLog(NID_UI, "%d controls were printed.", count);
 }
 
 int
@@ -4848,13 +4852,13 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        indent.Append(format);
 
        String delimiter(L"-------------------------------------------------------------------------------------------");
-       SysLog(NID_UI, "%ls", delimiter.GetPointer());
+       SysSecureLog(NID_UI, "%ls", delimiter.GetPointer());
 
        // Public
        String publicDescription = GetControlDelegate().GetDescription();
        if (!publicDescription.IsEmpty())
        {
-               SysLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
+               SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
        }
 
        _ControlManager* pControlManager = _ControlManager::GetInstance();
@@ -4868,7 +4872,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        }
 
        // Core
-       SysLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
+       SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
                indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer(), IsEnabled(), GetEnableState(), IsVisible(), GetVisibleState(),
                IsFocusable(), focused, IsClipToParent(), IsMovable(), IsResizable(), GetInputEnableState());
 
@@ -4878,14 +4882,14 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        Rectangle clientBounds = GetClientBounds();
        Rectangle absoluteBounds = GetAbsoluteBounds();
 
-       SysLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+       SysSecureLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
                indent.GetPointer(), bounds.x, bounds.y, bounds.width, bounds.height,
                min.width, min.height, max.width, max.height,
                GetVerticalScrollPosition(), GetHorizontalScrollPosition(),
                clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height,
                absoluteBounds.x, absoluteBounds.y, absoluteBounds.width, absoluteBounds.height);
 
-       SysLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
+       SysSecureLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
                indent.GetPointer(), __backgroundColor.GetRGB32(), IsLayoutable(), GetOrientation(), IsDragEnabled(), IsDropEnabled(), GetArea(), GetLayer());
 
        Canvas* pCanvas = GetCanvasN();
@@ -4895,13 +4899,13 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                Color canvasBackgroundColor = pCanvas->GetBackgroundColor();
                Color canvasForegroundColor = pCanvas->GetForegroundColor();
 
-               SysLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
+               SysSecureLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
                        indent.GetPointer(), canvasBounds.x, canvasBounds.y, canvasBounds.width, canvasBounds.height, canvasBackgroundColor.GetRGB32(), canvasForegroundColor.GetRGB32());
 
                delete pCanvas;
        }
 
-       SysLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
+       SysSecureLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
                indent.GetPointer(), __pDataBindingContext, __pControlDelegate, __pUserData, __destroying);
 
        // Ownees
@@ -4920,23 +4924,23 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
 
        if (!ownees.IsEmpty())
        {
-               SysLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
+               SysSecureLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
        }
 
        _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*__pVisualElement);
 
-       SysLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
+       SysSecureLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
                indent.GetPointer(), __pVisualElement, pVisualElementImpl, __pVisualElementContentProvider, __pVisualElementEventListener);
 
        // Layout
-       SysLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
+       SysSecureLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
                indent.GetPointer(), __pLayoutItemHandler, __pPortraitLayout, __pLandscapeLayout, __pLayoutContainer);
 
        // Derived class
        String description = GetDescription();
        if (!description.IsEmpty())
        {
-               SysLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
+               SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
        }
 
        // Print Gesture List
@@ -4952,7 +4956,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                pEnumerator->GetCurrent(pGestureDetector);
                if (pGestureDetector)
                {
-                       SysLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
+                       SysSecureLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
                }
        }
 
@@ -4968,7 +4972,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                pStartedGestureEnumerator->GetKey(pStartedGestureDetector);
                if (pStartedGestureDetector)
                {
-                       SysLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
+                       SysSecureLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
                }
        }
 
index 648ecc3..15ddaa1 100644 (file)
@@ -138,6 +138,28 @@ _UiPrintTree(int level)
                _UiPrintControl(*pWindow, true, level);
        }
 }
+
+_OSP_EXPORT_ void
+_UiPrintControlList(int level)
+{
+       _ControlManager* pControlManager = _ControlManager::GetInstance();
+       SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+       int count = pControlManager->GetControlCount();
+       for (int i = 0; i< count; i++)
+       {
+               _Control* pControl = pControlManager->GetControl((count-1) - i);
+               if (pControl != null)
+               {
+                       SysSecureLog(NID_UI, "[Control Manager] pControl index %d", i);
+                       _UiPrintControl(*pControl, true, level);
+               }
+               else
+               {
+                       SysSecureLog(NID_UI, "[Control Manager] pControl is null");
+               }
+       }
+}
 }
 
 namespace Tizen { namespace Ui
@@ -207,6 +229,11 @@ _ControlManager::Register(_Control* pObject)
                return _ControlHandle();
        }
 
+       if (__pAllControlList)
+       {
+               __pAllControlList->Add(pObject);
+       }
+
        return __objectManager.Register(*pObject);
 }
 
@@ -219,6 +246,11 @@ _ControlManager::Release(const _ControlHandle& handle)
                SysLog(NID_UI, "A _Control Released()");
        }
 
+       if (__pAllControlList)
+       {
+               __pAllControlList->Remove(pObject);
+       }
+
        return __objectManager.Unregister(handle);
 }
 
@@ -305,6 +337,7 @@ _ControlManager::GetLogicalBaseScreenSize(void) const
 _ControlManager::_ControlManager(void) // [ToDo] exception check.
        : __pWindowList(null)
        , __pAllWindowList(null)
+       , __pAllControlList(null)
        , __isCoordinateSystemLogical(true)
        , __logicalCoordinateSystem(0)
        , __logicalBaseScreenSize(BASE_SCREEN_SIZE_NONE)
@@ -347,6 +380,9 @@ _ControlManager::_ControlManager(void) // [ToDo] exception check.
        __pAllWindowList = new (std::nothrow)LinkedListT<_Window*>;
        SysTryCatch(NID_UI, __pAllWindowList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+       __pAllControlList = new (std::nothrow)LinkedListT<_Control*>;
+       SysTryCatch(NID_UI, __pAllControlList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
        __pGestureList = new (std::nothrow)LinkedListT<_TouchGestureDetector*>;
        SysTryCatch(NID_UI, __pGestureList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
@@ -375,6 +411,12 @@ CATCH:
                __pAllWindowList = null;
        }
 
+       if (__pAllControlList)
+       {
+               delete __pAllControlList;
+               __pAllControlList = null;
+       }
+
        if (__pGestureList)
        {
                delete __pGestureList;
@@ -386,6 +428,16 @@ _ControlManager::~_ControlManager(void)
 {
        _Clipboard::ReleaseInstance();
 
+       if (GetUsedHandleCount() != 0)
+       {
+               SysLog(NID_UI, "[Control Manager] The number of unreleased handle: %d", GetUsedHandleCount());
+       }
+
+       if (GetControlCount() != 0)
+       {
+               SysLog(NID_UI, "[Control Manager] The number of unreleased control: %d", GetControlCount());
+       }
+
        if (__pWindowList)
        {
                delete __pWindowList;
@@ -398,6 +450,12 @@ _ControlManager::~_ControlManager(void)
                __pAllWindowList = null;
        }
 
+       if (__pAllControlList)
+       {
+               delete __pAllControlList;
+               __pAllControlList = null;
+       }
+
        if (__pGestureList)
        {
                delete __pGestureList;
@@ -406,12 +464,6 @@ _ControlManager::~_ControlManager(void)
 
        DestroyEcoreEvasMgr();
 
-       if (GetUsedHandleCount() != 0)
-       {
-               SysLog(NID_UI, "[Control Manager] The number of unreleased controls: %d", GetUsedHandleCount());
-       }
-
-
        _IndicatorManager::ReleaseInstance();
 
        _DisplayManager::ReleaseInstance();
@@ -706,6 +758,21 @@ _ControlManager::CallOnDetachingFromMainTree(_Control& control)
        _Control* pChild = null;
        _Control::ControlList& children = control.GetChildList();
 
+       _Window* pTop = control.GetRootWindow();
+       if (pTop)
+       {
+               _Control* pControl = pTop->GetFocusControl(&control);
+               if ((&control) == pControl)
+               {
+                       pTop->SetFocusControl(&control, false);
+               }
+               _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(&control);
+               if ((&control) == pFocusTraversalControl)
+               {
+                       pTop->SetFocusTraversalControl(&control, false);
+               }
+       }
+
        r = control.GetControlDelegate().OnDetachingFromMainTree();
        SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -790,6 +857,21 @@ _ControlManager::CloseWindow(_Window& window) // [ToDo] exception check.
        return E_SUCCESS;
 }
 
+_Control*
+_ControlManager::GetControl(int index) const
+{
+       _Control* pControl;
+       __pAllControlList->GetAt(index, pControl);
+
+       return pControl;
+}
+
+int
+_ControlManager::GetControlCount(void) const
+{
+       return __pAllControlList->GetCount();
+}
+
 _Window*
 _ControlManager::GetWindow(int index) const
 {
@@ -805,6 +887,7 @@ _ControlManager::GetWindowCount(void) const
        return __pWindowList->GetCount();
 }
 
+
 _Window*
 _ControlManager::GetAllWindow(int index) const
 {
@@ -852,7 +935,10 @@ _ControlManager::AttachWindow(_Window& window)
                }
        }
 
-       __pAllWindowList->Add(&window);
+       if (__pAllWindowList->Contains(&window) == false)
+       {
+               __pAllWindowList->Add(&window);
+       }
 
        return __pWindowList->Add(&window);
 }
@@ -997,7 +1083,7 @@ _ControlManager::GetScreenRotation(void) const
                SysLog(NID_UI, "It's failed to get the flag of auto-rotate.");
        }
 
-       SysLog(NID_UI, "[Window Manager Rotation] AUTO_ROTATION = %d", autoRotate);
+       SysLog(NID_UI, "[WM ROTATION] AUTO_ROTATION = %d", autoRotate);
 
        if (autoRotate == false)
        {
@@ -1035,7 +1121,7 @@ _ControlManager::GetScreenRotation(void) const
                                                _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas();
                                                if (pEcoreEvas)
                                                {
-                                                       SysLog(NID_UI, "[Window Manager Rotation] ROTATION_UNKNOWN");
+                                                       SysLog(NID_UI, "[WM ROTATION] ROTATION_UNKNOWN");
                                                        device_rotation = pEcoreEvas->GetWindowRotation(*pCurrentFrame);
                                                }
                                        }
@@ -1045,11 +1131,11 @@ _ControlManager::GetScreenRotation(void) const
                                break;
                        }
 
-                       SysLog(NID_UI, "[Window Manager Rotation] device_rotation = %d", device_rotation);
+                       SysLog(NID_UI, "[WM ROTATION] device_rotation = %d", device_rotation);
                }
                else
                {
-                       SysLog(NID_UI, "[Window Manager Rotation] device_rotation = error");
+                       SysLog(NID_UI, "[WM ROTATION] device_rotation = error");
                }
 
                return ::Convert(device_rotation);
index 7d4546b..2f69919 100644 (file)
@@ -109,7 +109,7 @@ OnWindowStateChanged(Ecore_Evas* pEcoreEvas)
 
        Ecore_X_Window targetWin = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
 
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] OnWindowStateChanged is called.", targetWin);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] OnWindowStateChanged is called.", targetWin);
 
        int winCount = pControlManager->GetAllWindowCount();
        for (int i = 0; i < winCount; i++)
@@ -1201,7 +1201,7 @@ _EcoreEvas::_EcoreEvas(void)
        , __openClipboard(false)
 {
        int ret = appcore_unset_rotation_cb();
-       SysLog(NID_UI, "[Window Manager Rotation] appcore_unset_rotation_cb = %d", ret);
+       SysLog(NID_UI, "[WM ROTATION] appcore_unset_rotation_cb = %d", ret);
 
        __pWindowVisibilityChanged = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, OnWindowVisibilityChanged, (void*) this);
        SysTryReturnVoidResult(NID_UI, __pWindowVisibilityChanged, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
@@ -1356,7 +1356,6 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas
                rotatePartial = false;
        }
 
-       Evas_Object* pWinObj = pLayer->GetElmWin();
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
 
        int rootW = 0;
@@ -1369,18 +1368,17 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas
                {
                        ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation);
 
-                       evas_object_move(pWinObj, 0, 0);
 
                        if ((orientation == 0) || (orientation == 180))
                        {
-                               evas_object_resize(pWinObj, rootW, rootH);
+                               pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH));
                        }
                        else
                        {
-                               evas_object_resize(pWinObj, rootH, rootW);
+                               pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW));
                        }
 
-                       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, FULL SCREEN] Rotate bounds(rot = %d).", win, orientation);
+                       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, FULL SCREEN] Rotate bounds(ROT %d).", win, orientation);
                }
        }
        else
@@ -1393,7 +1391,6 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas
                Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds());
                int rotate = ecore_evas_rotation_get(pEcoreEvas);
 
-
                int winX = winBounds.x;
                int winY = winBounds.y;
 
@@ -1421,16 +1418,16 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas
                int h = 0;
                Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
-               evas_object_move(pWinObj, winX, winY);
 
                if (ret == EINA_FALSE)
                {
-                       evas_object_resize(pWinObj, winBounds.width, winBounds.height);
-                       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+                       pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+                       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
                }
                else
                {
-                       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
+                       pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+                       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
                }
        }
 }
@@ -1544,7 +1541,7 @@ _EcoreEvas::SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner)
        {
                ecore_x_icccm_transient_for_unset(ownee);
                ecore_x_icccm_transient_for_set(ownee, owner);
-               SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", ownee, owner);
+               SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", ownee, owner);
        }
 }
 
@@ -2282,20 +2279,24 @@ _EcoreEvas::SetWindowLevel(const _Window& window, _WindowLevel level)
 
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
        ecore_x_icccm_transient_for_unset(win);
+       SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_unset", win);
 
        if (level == _WINDOW_LEVEL_NORMAL)
        {
                ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL);
+               SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NORMAL", win);
        }
        else if (level == _WINDOW_LEVEL_NOTIFICATION_HIGH)
        {
                ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION);
                utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_HIGH);
+               SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_HIGH", win);
        }
        else if (level == _WINDOW_LEVEL_NOTIFICATION_MIDDLE)
        {
                ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION);
                utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_NORMAL);
+               SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_NORMAL", win);
        }
 
        SetLastResult(E_SUCCESS);
@@ -2411,16 +2412,16 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
        int h = 0;
        Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
-       evas_object_move(pWinObject, winX, winY);
 
        if (ret == EINA_FALSE)
        {
-               evas_object_resize(pWinObject, winBounds.width, winBounds.height);
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+               pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
        }
        else
        {
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+               pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
        }
 
        SetLastResult(E_SUCCESS);
@@ -2499,16 +2500,16 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
        int h = 0;
        Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
-       evas_object_move(pWinObject, winX, winY);
 
        if (ret == EINA_FALSE)
        {
-               evas_object_resize(pWinObject, winBounds.width, winBounds.height);
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+               pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
        }
        else
        {
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+               pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
        }
 
        SetLastResult(E_SUCCESS);
@@ -2552,12 +2553,12 @@ _EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner)
                {
                        ecore_x_icccm_transient_for_unset(owneeWin);
                        ecore_x_icccm_transient_for_set(owneeWin, ownerWin);
-                       SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin);
+                       SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin);
                }
        }
        else
        {
-               SysLog(NID_UI, "[Window Order Group][Window : 0x%x] Skip to transient_for_set", owneeWin);
+               SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] Skip to transient_for_set", owneeWin);
        }
 
        // Ownee window
@@ -2583,7 +2584,9 @@ _EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner)
                bool preferredRoation = pOwnerWindow->GetPreferredRotation();
                if (preferredRoation == true)
                {
-                       int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
+                       //int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
+                       int preferredRotation = 0;
+                       ecore_x_e_window_rotation_preferred_rotation_get(ownerWin, &preferredRotation);
                        SetWindowPreferredRotation(ownee, preferredRotation);
                }
                else
@@ -2628,7 +2631,7 @@ _EcoreEvas::SetWindowPreferredRotation(const _Window& window, int rotation, bool
        {
                ecore_x_e_window_rotation_app_set(win, EINA_TRUE);
        }
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set window preferred rotation(%d).", win, rotation);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window preferred rotation(%d).", win, rotation);
        ecore_evas_wm_rotation_preferred_rotation_set(pLayer->GetEcoreEvas(), rotation);
 
        _Window* pWindow = const_cast<_Window*>(&window);
@@ -2677,7 +2680,7 @@ _EcoreEvas::SetWindowAvailabledRotation(const _Window& window, int* rotations, u
                ecore_x_e_window_rotation_app_set(win, EINA_TRUE);
        }
 
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set window available rotation(%d).", win, count);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window available rotation(%d).", win, count);
        ecore_evas_wm_rotation_available_rotations_set(pLayer->GetEcoreEvas(), rotations, count);
 }
 
@@ -2705,7 +2708,7 @@ _EcoreEvas::SetWindowRotationBounds(const _Window& window, int rotation, const T
        Rectangle winBounds = _CoordinateSystemUtils::Transform(bounds);
 
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
        ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
 }
 
@@ -2722,7 +2725,7 @@ _EcoreEvas::SetWindowRotationBounds(const _Window& window, int rotation, const T
        Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF);
 
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
        ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
 }
 
index cf6bae7..ee16e36 100644 (file)
@@ -50,6 +50,7 @@ _FocusManagerImpl* _FocusManagerImpl::__pInstance = null;
 _FocusManagerImpl::_FocusManagerImpl(void)
        : __pCurrentFocusUiControl(null)
        , __isFocusMode(false)
+       , __focusDirection(FOCUS_DIRECTION_DOWNWARD)
 {
 #ifdef _FOCUS_UI_
        result r = _UiEventManager::GetInstance()->AddPostKeyEventListener(*this);
@@ -278,7 +279,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
        else
        {
                _Control* pTraversalControl = FindTraversalControlFromChild(pControl);
-               pTop->SetFocusTraversalControl(pTraversalControl);
+               pTop->SetFocusTraversalControl(pTraversalControl, true);
        }
 
 
@@ -295,7 +296,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
                {
                        if (IsFocusControlListControl(pControl))
                        {
-                               pTop->SetFocusTraversalControl(pControl);
+                               pTop->SetFocusTraversalControl(pControl, true);
                        }
                        pControl->DrawFocus();
                        return;
@@ -309,7 +310,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
                {
                        pFocusControl->SetFocused();
                        pFocusControl->DrawFocus();
-                       pTop->SetFocusTraversalControl(pFocusControl);
+                       pTop->SetFocusTraversalControl(pFocusControl, true);
                        return;
                }
        }
@@ -320,7 +321,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
                {
                        pFocusControl->SetFocused();
                        pFocusControl->DrawFocus();
-                       pTop->SetFocusTraversalControl(pFocusControl);
+                       pTop->SetFocusTraversalControl(pFocusControl, true);
                        return;
                }
        }
@@ -386,7 +387,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
                        index ++;
                }
 
-               pTop->SetFocusTraversalControl(pNextFocusControl);
+               pTop->SetFocusTraversalControl(pNextFocusControl, true);
                if (pNextFocusControl && findNextFocusControl == true)
                {
                        _Control* pParentControl =  pNextFocusControl->GetParent();
@@ -416,7 +417,7 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                return false;
        }
        _KeyCode keyCode = keyInfo.GetKeyCode();
-       FocusDirection focusDirection = FOCUS_DIRECTION_DOWNWARD;
+       __focusDirection = FOCUS_DIRECTION_DOWNWARD;
        _Control* pControl = const_cast<_Control*> (&source);
 
        switch(keyCode)
@@ -425,18 +426,18 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                {
                        if (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT)
                        {
-                               focusDirection = FOCUS_DIRECTION_UPWARD;
+                               __focusDirection = FOCUS_DIRECTION_UPWARD;
                        }                       
                        break;
                }
        case _KEY_UP :
                {
-                       focusDirection = FOCUS_DIRECTION_UPWARD;
+                       __focusDirection = FOCUS_DIRECTION_UPWARD;
                        break;
                }
        case _KEY_DOWN :
                {
-                       focusDirection = FOCUS_DIRECTION_DOWNWARD;
+                       __focusDirection = FOCUS_DIRECTION_DOWNWARD;
                        break;
                }
        default :
@@ -444,7 +445,16 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                        return false;
                }       
        }
-       StartFocusTraversal(pControl, focusDirection);  
+       StartFocusTraversal(pControl, __focusDirection);        
+       return false;
+}
+
+bool _FocusManagerImpl::IsForwardDirection(void) const
+{
+       if (__focusDirection == FOCUS_DIRECTION_DOWNWARD)
+       {
+               return true;
+       }
        return false;
 }
 
index af004c4..e1d351d 100644 (file)
@@ -72,6 +72,7 @@ _ModalLoopManager::~_ModalLoopManager(void)
 int
 _ModalLoopManager::BeginMainLoop(void)
 {
+       __lastExitCode = -1;
        __nestedMainLoop++;
        ::GetEcoreEvasMgr()->BeginMainLoop();
 
old mode 100644 (file)
new mode 100755 (executable)
index 690d85a..26680f9
@@ -48,9 +48,12 @@ using namespace Tizen::Base::Runtime;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Graphics;
 
-namespace Tizen { namespace Ui {
+namespace
+{
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
 
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+namespace Tizen { namespace Ui {
 
 _OrientationAgent*
 _OrientationAgent::CreateInstanceN(Control& publicControl)
@@ -153,7 +156,7 @@ _OrientationAgent::Update(bool draw)
        // Request rotation to window manager -> async -> Update VEs
        // Window(not rotation) -> sync -> UpdateVEs
 
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update : START ----------");
+       SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : START ----------", this);
 
        _ControlImplManager* pImplManager = _ControlImplManager::GetInstance();
        SysAssert(pImplManager);
@@ -194,7 +197,7 @@ _OrientationAgent::Update(bool draw)
                }
 
                OrientationStatus status = pImplManager->GetOrientationStatus(__mode);
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Update : __mode(%d) -> status(%d)", handle, __mode, status);
+               SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x] Update : __mode(%d) -> status(%d)", this, handle, __mode, status);
 
                if (__updateStatus == true)
                {
@@ -251,7 +254,7 @@ _OrientationAgent::Update(bool draw)
                __draw = draw;
 //     }
 
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update : END ----------");
+       SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : END ----------", this);
 }
 
 void
@@ -263,7 +266,7 @@ _OrientationAgent::UpdateOrientation(void)
        // Update window bounds
        // Invalidate
 
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- UpdateOrientation : START ----------");
+       SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : START ----------", this);
 
        _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
        if (!pEcoreEvas)
@@ -348,9 +351,9 @@ _OrientationAgent::UpdateOrientation(void)
        pImpl->Invalidate(true);
 
        Rectangle bounds = pRootWindow->GetBounds();
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, rot = %d, %d, %d, %d, %d] Update Orientation.", pRootWindow->GetNativeHandle(), rotation, bounds.x, bounds.y, bounds.width, bounds.height);
+       SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x, ROT %d, %d, %d, %d, %d] Update Orientation.", this, pRootWindow->GetNativeHandle(), rotation, bounds.x, bounds.y, bounds.width, bounds.height);
 
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- UpdateOrientation : END ----------");
+       SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : END ----------", this);
 }
 
 void
index 3973a93..216da0c 100644 (file)
@@ -132,7 +132,7 @@ _PublicOrientationEvent::FireImpl(IEventListener& listener, const IEventArg& arg
        const _PublicOrientationEventArg* pArg = dynamic_cast <const _PublicOrientationEventArg*>(&arg);
        SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid.");
 
-       SysLog(NID_UI, "[Window Manager Rotation] Fire the public orientation event with %d -> 0x%x", pArg->GetOrientationStatus(), __pSource);
+       SysLog(NID_UI, "[WM ROTATION] Fire the public orientation event with %d -> 0x%x", pArg->GetOrientationStatus(), __pSource);
 
        pEventListener->OnOrientationChanged(*__pSource, (OrientationStatus)(pArg->GetOrientationStatus()));
 
old mode 100644 (file)
new mode 100755 (executable)
index 476cd19..a5bacef
@@ -1350,6 +1350,8 @@ _ResourceManager::LoadBlackPalette(void)
        ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA);
        ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA);
+       ADD_PALETTE(BASIC::B052L5D, 0x3FFAFAFA);
+       ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF);
        ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA);
        ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA);
@@ -1389,7 +1391,7 @@ _ResourceManager::LoadBlackPalette(void)
        ADD_PALETTE(BASIC::B061L2, 0xFF49577B);
        ADD_PALETTE(BASIC::B061L3, 0xFF969A9C);
        ADD_PALETTE(BASIC::B061L4, 0xFF1D263C);
-       ADD_PALETTE(BASIC::B061L5, 0xFF222222);
+       ADD_PALETTE(BASIC::B061L5, 0xFF000000);
        ADD_PALETTE(BASIC::B061L6, 0xFF333537);
        ADD_PALETTE(BASIC::B0621L1, 0x00000000);
        ADD_PALETTE(BASIC::B0621L2, 0x00000000);
@@ -1555,11 +1557,15 @@ _ResourceManager::LoadBlackPalette(void)
        ADD_PALETTE(BASIC::W0641D, 0x996B6D79);
        ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A);
        ADD_PALETTE(BASIC::W0711, 0xFF525767);
+       ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF);
+       ADD_PALETTE(BASIC::W0711D, 0xFF3E414E);
        ADD_PALETTE(BASIC::W0712, 0xFF4267A9);
        ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF);
        ADD_PALETTE(BASIC::W0714, 0xFF263E5F);
        ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF);
-       ADD_PALETTE(BASIC::W0721, 0x00000000);
+       ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
+       ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
+       ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
        ADD_PALETTE(BASIC::W0811, 0xFF253296);
        ADD_PALETTE(BASIC::W0812, 0x00000000);
        ADD_PALETTE(BASIC::W0813, 0xFF595959);
@@ -1664,6 +1670,8 @@ _ResourceManager::LoadWhitePalette(void)
        ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::B052L4D, 0x7F282828);
        ADD_PALETTE(BASIC::B052L5, 0xFF282828);
+       ADD_PALETTE(BASIC::B052L5D, 0x7F282828);
+       ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA);
        ADD_PALETTE(BASIC::B052L6, 0xFF282828);
        ADD_PALETTE(BASIC::B052L6D, 0x7F282828);
        ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD);
@@ -1703,7 +1711,7 @@ _ResourceManager::LoadWhitePalette(void)
        ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE);
        ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9);
        ADD_PALETTE(BASIC::B061L4, 0xFF444444);
-       ADD_PALETTE(BASIC::B061L5, 0xFF222222);
+       ADD_PALETTE(BASIC::B061L5, 0xFF000000);
        ADD_PALETTE(BASIC::B061L6, 0xFF17191C);
        ADD_PALETTE(BASIC::B0621L1, 0x00000000);
        ADD_PALETTE(BASIC::B0621L2, 0x00000000);
@@ -1798,18 +1806,18 @@ _ResourceManager::LoadWhitePalette(void)
        ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8);
        ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9);
        ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9);
-       ADD_PALETTE(BASIC::F031L1, 0xFF3A3A3A);
+       ADD_PALETTE(BASIC::F031L1, 0xFF282828);
        ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA);
-       ADD_PALETTE(BASIC::F031L1D, 0x7F3A3A3A);
+       ADD_PALETTE(BASIC::F031L1D, 0x7F282828);
        ADD_PALETTE(BASIC::F031L2, 0x00000000);
        ADD_PALETTE(BASIC::F031L2P, 0x00000000);
        ADD_PALETTE(BASIC::F031L2D, 0x00000000);
        ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA);
-       ADD_PALETTE(BASIC::F032L1, 0xFF656565);
+       ADD_PALETTE(BASIC::F032L1, 0xFF282828);
        ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA);
-       ADD_PALETTE(BASIC::F032L1D, 0x7F656565);
+       ADD_PALETTE(BASIC::F032L1D, 0x7F282828);
        ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA);
        ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA);
@@ -1868,12 +1876,16 @@ _ResourceManager::LoadWhitePalette(void)
        ADD_PALETTE(BASIC::W0641P, 0xFF0079D4);
        ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED);
        ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF);
-       ADD_PALETTE(BASIC::W0711, 0xFF769DCC);
+       ADD_PALETTE(BASIC::W0711, 0xFF6C90BC);
+       ADD_PALETTE(BASIC::W0711P, 0xFF007AD8);
+       ADD_PALETTE(BASIC::W0711D, 0xFF607DA1);
        ADD_PALETTE(BASIC::W0712, 0x00000000);
        ADD_PALETTE(BASIC::W0713, 0xFF4093F7);
        ADD_PALETTE(BASIC::W0714, 0x00000000);
        ADD_PALETTE(BASIC::W0715, 0xFF2889FF);
-       ADD_PALETTE(BASIC::W0721, 0x00000000);
+       ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
+       ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
+       ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
        ADD_PALETTE(BASIC::W0811, 0xFF5787C2);
        ADD_PALETTE(BASIC::W0812, 0x00000000);
        ADD_PALETTE(BASIC::W0813, 0xFF494949);
index 76e37bf..70ab006 100644 (file)
@@ -371,16 +371,19 @@ _UiEventManager::GetEventListeners(_UiEventType eventType, _UiListenerType liste
 
        if (listenerType == _UI_LISTENER_POST)
        {
+               SysTryReturn(NID_UI, __pPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] PostEventListenerMap is null.");
                __pPostEventListenerMap->GetValue(eventType, pEventListeners);
        }
        else if (listenerType == _UI_LISTENER_TARGET_POST)
        {
+               SysTryReturn(NID_UI, __pTargetPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] TargetPostEventListenerMap is null.");
                __pTargetPostEventListenerMap->GetValue(eventType, pEventListeners);
        }
        else
        {
                result r = E_SUCCESS;
 
+               SysTryReturn(NID_UI, __pEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] EventListenerMap is null.");
                r = __pEventListenerMap->GetValue(eventType, pEventListeners);
                SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
        }
@@ -799,6 +802,7 @@ _UiEventManager::~_UiEventManager(void)
 {
        RemoveAllEventListenerList(__pEventListenerMap.get());
        RemoveAllEventListenerList(__pPostEventListenerMap.get());
+       RemoveAllEventListenerList(__pTargetPostEventListenerMap.get());
 }
 
 }} // Tizen::Ui
index ac9160c..1cd9442 100644 (file)
@@ -336,12 +336,12 @@ _Window::CreateRootVisualElement(_WindowType windowType)
 
        if (__type == _WINDOW_TYPE_MAIN)
        {
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, BASIC] Create.", GetNativeHandle());
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, BASIC] Create.", GetNativeHandle());
        }
        else
        {
                pEcoreEvas->SetWindowType(*this, _WINDOW_TYPE_SUB);
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, UTILITY] Create.", GetNativeHandle());
+               SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, UTILITY] Create.", GetNativeHandle());
        }
 
        return E_SUCCESS;
@@ -410,7 +410,7 @@ _Window::SetActivationEnabled(bool enable)
 bool
 _Window::IsActivationEnabled(void)
 {
-       if (__type == _WINDOW_TYPE_VE)
+       if (__type == _WINDOW_TYPE_VE || IsSystemWindow())
        {
                return IsFocusable();
        }
@@ -660,7 +660,7 @@ _Window::OnWindowStateChanged(void)
        int rotation = pEcoreEvas->GetWindowRotation(*this);
 
        Rectangle winBounds = GetBounds();
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev rot = %d, cur rot = %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation);
+       SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev ROT %d, cur ROT %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation);
 
        if (rotation == __rotation)
        {
@@ -705,7 +705,7 @@ _Window::OnWindowStateChanged(void)
        }
 
        // <3>
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : START ----------");
+       SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : START ----------");
 
        _ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
        ChangeLayout(controlOrientation, false);
@@ -734,7 +734,7 @@ _Window::OnWindowStateChanged(void)
 
        Invalidate(true);
 
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : END ----------");
+       SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : END ----------");
        SetOrientationCallbackModeEnabled(false);
 }
 
@@ -995,10 +995,18 @@ _Window::GetFocusTraversalControl(_Control* pControl) const
 {
        return __pFocusTraversalControl;
 }
+
 void
-_Window::SetFocusTraversalControl(_Control* pControl)
+_Window::SetFocusTraversalControl(_Control* pControl, bool on)
 {
-       __pFocusTraversalControl = pControl;
+       if (on)
+       {
+               __pFocusTraversalControl = pControl;
+       }
+       else
+       {
+               __pFocusTraversalControl = this;
+       }
 }
 
 void
index 07da1fe..73369a6 100644 (file)
@@ -44,14 +44,10 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Animations;
 
-//#define _NEED_DAMAGE_HANDER_
-
-//#define PRINT printf
+//#define PRINT(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
 #define PRINT(...)
 
 
-
-
 namespace
 {
 #define __UNUSED__
@@ -59,62 +55,20 @@ namespace
 
 Ecore_Idle_Enterer* __pOnIdleLoopIterator = null;
 
-
-//static const double fpsLimitInterval = 1.0 / 55.0;
-static bool __needPreRender = false;
-Eina_Bool
-OnIdleLoopIterate(void* pData)
-{
-       _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
-
-//     PRINT("OnIdleLoopIterate()\n");
-
-
-       if (!pDisplayManager)
-       {
-               return ECORE_CALLBACK_CANCEL; // for remove callback
-       }
-
-       Tizen::Ui::Animations::_AnimationManager* pAnimationManager = Tizen::Ui::Animations::_AnimationManager::GetInstance();
-
-       if (!pAnimationManager)
-       {
-               return ECORE_CALLBACK_CANCEL; // for remove callback
-       }
-
-       //CHECK ME : how about the performance?
-//     double currentTime = ecore_time_get();
-//     static double prevFlushTime = 0;
-
-//     if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99)
-       {
-               pAnimationManager->ProcessAnimationTick();
-
-//             prevFlushTime = currentTime;
-
-               pDisplayManager->RenderAll();
-
-               pDisplayManager->Flush();
-       }
-
-       return ECORE_CALLBACK_RENEW;
-}
-
-// WARNING: Without this, idle-enterer will be called after evas destroyed which may cause crash while accessing ecore-evas.
+#ifdef USE_WORKAROUND
 void
-OnEcoreEvasFree(Ecore_Evas* pEcoreEvas)
+OnRenderFlushPost(void* pData, Evas* pEvas, void* ev)
 {
-       ecore_evas_manual_render_set(pEcoreEvas, EINA_FALSE);
+//     _EflLayer* pLayer = (_EflLayer*)pData;
+//     int w, h;
+//     evas_output_size_get(pLayer->GetEvas(), &w, &h);
+//     int rotate = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
+//     PRINT("[%#x] OnRenderFlushPost size(%d,%d) rotate=%d\n", (unsigned int)pData, w, h, rotate);
 }
-#endif
-
-
-#ifdef _NEED_DAMAGE_HANDER_
 
 Eina_Bool
 OnXWindowDamaged(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
 {
-#if 1
        _Ecore_X_Event_Window_Damage* pEvent = (_Ecore_X_Event_Window_Damage*)pEventInfo;
 
        if (pData)
@@ -123,24 +77,15 @@ OnXWindowDamaged(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
 
                if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
                {
-                       FloatRectangle bounds = pLayer->GetBounds();
-
-                       evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
-                       pLayer->SetEvasRenderNeeded();
-
-                       _DisplayManager::GetInstance()->AddWakeUpEvent();
-
-                       PRINT("OnXWindowDamaged(%p)[%d,%d,%d,%d]------------\n", pLayer->GetEvas(), pEvent->x, pEvent->y, pEvent->w, pEvent->h);
+                       PRINT("[%#x] OnXWindowDamaged[%d,%d,%d,%d]------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h);
                }
        }
-#endif
        return EINA_TRUE;
 }
 
 Eina_Bool
 OnXWindowConfigured(void* pData, int type, void* pEventInfo)
 {
-#if 0
        _Ecore_X_Event_Window_Configure* pEvent = (_Ecore_X_Event_Window_Configure*)pEventInfo;
 
        if (pData)
@@ -149,17 +94,12 @@ OnXWindowConfigured(void* pData, int type, void* pEventInfo)
 
                if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
                {
-                       FloatRectangle bounds = pLayer->GetBounds();
-
-                       evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
-                       pLayer->SetEvasRenderNeeded();
+                       int w, h;
+                       evas_output_size_get(pLayer->GetEvas(), &w, &h);
+                       PRINT("[%#x] OnXWindowConfigured[%d,%d,%d,%d]       evas(%d,%d)------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h);
 
-                       _DisplayManager::GetInstance()->AddWakeUpEvent();
-
-                       PRINT("OnXWindowConfigured(%p)[%d,%d,%d,%d]------------\n", pLayer->GetEvas(), pEvent->x, pEvent->y, pEvent->w, pEvent->h);
                }
        }
-#endif
 
        return EINA_TRUE;
 }
@@ -175,13 +115,9 @@ OnXWindowHidden(void* pData, int type, void* pEventInfo)
        }
 
        _EflLayer* pLayer = (_EflLayer*)pData;
-       PRINT("############ Hidden (%p, 0x%x) \n" , pLayer, pEvent->win);
-
        if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
        {
-               PRINT("############ Hidden (%p) -> EventDone() \n" , pData);
-               pLayer->SetVisibilityChangeCompleted();
-               _DisplayManager::GetInstance()->AddWakeUpEvent();
+               PRINT("[%#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData);
        }
 
        return EINA_TRUE;
@@ -198,25 +134,68 @@ OnXWindowShown(void* pData, int type, void* pEventInfo)
        }
 
        _EflLayer* pLayer = (_EflLayer*)pData;
-       PRINT("############ Shown (%p, 0x%x) \n" , pLayer, pEvent->win);
-
        if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
        {
-               PRINT("############ Shown (%p) -> EventDone() \n" , pData);
 
-               FloatRectangle bounds = pLayer->GetBounds();
+               //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270);
+               PRINT("[%#x] ############ Shown -> EventDone() \n" , (unsigned int)pData);
+       }
+
+       return EINA_TRUE;
+}
+#endif // USE_WORKAROUND
+
+
+
+//static const double fpsLimitInterval = 1.0 / 55.0;
+static bool __needPreRender = false;
+Eina_Bool
+OnIdleLoopIterate(void* pData)
+{
+       _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+
+//     PRINT("OnIdleLoopIterate()\n");
+
+
+       if (!pDisplayManager)
+       {
+               return ECORE_CALLBACK_CANCEL; // for remove callback
+       }
 
-               evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
+       Tizen::Ui::Animations::_AnimationManager* pAnimationManager = Tizen::Ui::Animations::_AnimationManager::GetInstance();
 
-               pLayer->SetVisibilityChangeCompleted();
-               _DisplayManager::GetInstance()->AddWakeUpEvent();
+       if (!pAnimationManager)
+       {
+               return ECORE_CALLBACK_CANCEL; // for remove callback
        }
 
-       return EINA_TRUE;
+       //CHECK ME : how about the performance?
+//     double currentTime = ecore_time_get();
+//     static double prevFlushTime = 0;
+
+//     if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99)
+       {
+               pAnimationManager->ProcessAnimationTick();
+
+//             prevFlushTime = currentTime;
+
+               pDisplayManager->RenderAll();
+
+               pDisplayManager->Flush();
+       }
+
+       return ECORE_CALLBACK_RENEW;
 }
 
+// WARNING: Without this, idle-enterer will be called after evas destroyed which may cause crash while accessing ecore-evas.
+void
+OnEcoreEvasFree(Ecore_Evas* pEcoreEvas)
+{
+       ecore_evas_manual_render_set(pEcoreEvas, EINA_FALSE);
+}
 #endif
 
+
 void
 PreRenderCallback(Ecore_Evas* ee)
 {
@@ -237,7 +216,11 @@ PreRenderCallback(Ecore_Evas* ee)
                }
 #endif
 
-               _DisplayManager::GetInstance()->Render(*pEflLayer->GetRootVisualElement());
+               _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+               if (pDisplayManager)
+               {
+                       pDisplayManager->Render(*pEflLayer->GetRootVisualElement());
+               }
        }
 }
 
@@ -248,7 +231,11 @@ PostRenderCallback(Ecore_Evas* ee)
 
        if (pEflLayer && pEflLayer->GetRootVisualElement())
        {
-               _DisplayManager::GetInstance()->PostRender(*pEflLayer->GetRootVisualElement());
+               _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+               if (pDisplayManager)
+               {
+                       pDisplayManager->PostRender(*pEflLayer->GetRootVisualElement());
+               }
        }
 }
 
@@ -260,41 +247,43 @@ namespace Tizen { namespace Ui { namespace Animations
 int _EflLayer::_countOfLayer = 0;
 
 _EflLayer::_EflLayer(void)
-       : _pEvas(null)
+       : _pRootVisualElement(null)
+       , _pEvas(null)
        , _pEcoreEvas(null)
        , _pWindow(null)
-       , _pOnWindowDamagedHandler(null)
-       , _pOnWindowConfiguredHandler(null)
-       , _pOnWindowHideHandler(null)
-       , _pOnWindowShowHandler(null)
-       , _needEvasRender(0)
+       , _needBoundsChangeRequest(false)
        , _needShowStateChangeRequest(false)
        , _isShow(false)
-       , _isVisibilityChangeInProgress(false)
        , _needAsyncVisibilityChangeRequest(true)
        , _isMainType(true)
        , _needRender(true)
+       , _pOnWindowDamagedHandler(null)
+       , _pOnWindowConfiguredHandler(null)
+       , _pOnWindowHideHandler(null)
+       , _pOnWindowShowHandler(null)
        , __isWinObject(true)
+       , __bounds()
 {
        _countOfLayer++;
 }
 
 _EflLayer::_EflLayer(bool isMainType)
-       : _pEvas(null)
+       : _pRootVisualElement(null)
+       , _pEvas(null)
        , _pEcoreEvas(null)
        , _pWindow(null)
-       , _pOnWindowDamagedHandler(null)
-       , _pOnWindowConfiguredHandler(null)
-       , _pOnWindowHideHandler(null)
-       , _pOnWindowShowHandler(null)
-       , _needEvasRender(0)
+       , _needBoundsChangeRequest(false)
        , _needShowStateChangeRequest(false)
        , _isShow(false)
-       , _isVisibilityChangeInProgress(false)
        , _needAsyncVisibilityChangeRequest(true)
        , _isMainType(isMainType)
        , _needRender(true)
+       , _pOnWindowDamagedHandler(null)
+       , _pOnWindowConfiguredHandler(null)
+       , _pOnWindowHideHandler(null)
+       , _pOnWindowShowHandler(null)
        , __isWinObject(true)
+       , __bounds()
 {
        _countOfLayer++;
 }
@@ -314,7 +303,8 @@ _EflLayer::~_EflLayer(void)
                __pOnIdleLoopIterator = null;
 
        }
-#ifdef _NEED_DAMAGE_HANDER_
+
+#ifdef USE_WORKAROUND
        if (_pOnWindowDamagedHandler)
        {
                ecore_event_handler_del(_pOnWindowDamagedHandler);
@@ -337,7 +327,7 @@ _EflLayer::~_EflLayer(void)
                ecore_event_handler_del(_pOnWindowShowHandler);
                _pOnWindowShowHandler = null;
        }
-#endif
+#endif // USE_WORKAROUND
 
 #endif
 
@@ -371,10 +361,12 @@ _EflLayer::OnConstructed(void)
        if(_isMainType)
        {
                _pWindow = elm_win_add(NULL, NULL, ELM_WIN_BASIC);
+               PRINT("[%#x] CREATE WINDOW [MAIN TYPE]\n", (unsigned int)this);
        }
        else
        {
                _pWindow = elm_win_add(NULL, NULL, ELM_WIN_UTILITY);
+               PRINT("[%#x] CREATE WINDOW [UTIL TYPE]\n", (unsigned int)this);
        }
 
        SysTryReturnResult(NID_UI, _pWindow, E_SYSTEM, "A system error has been occurred.");
@@ -421,7 +413,8 @@ _EflLayer::Initialize(Evas_Object* pWindow)
        }
 
 // CHECK ME: Is this needed for GL mode?
-#ifdef _NEED_DAMAGE_HANDER_
+
+#ifdef USE_WORKAROUND
        if(_pOnWindowDamagedHandler == null)
        {
                _pOnWindowDamagedHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, OnXWindowDamaged, this);
@@ -441,8 +434,9 @@ _EflLayer::Initialize(Evas_Object* pWindow)
        {
                _pOnWindowShowHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, OnXWindowShown, this);
        }
+       evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this);
+#endif // USE_WORKAROUND
 
-#endif
 
 #ifdef VE_VSYNC_UPDATE
        if(__pOnIdleLoopIterator == null)
@@ -484,11 +478,15 @@ _EflLayer::Configure(_RootVisualElement& rootElement)
 result
 _EflLayer::SetBounds(const FloatRectangle& bounds)
 {
-       if (_pWindow)
-       {
-               evas_object_move(_pWindow, bounds.x, bounds.y);
-               evas_object_resize(_pWindow, bounds.width, bounds.height);
-       }
+       if (__bounds == bounds)
+               return E_SUCCESS;
+
+       __bounds = bounds;
+       evas_object_move(_pWindow, __bounds.x, __bounds.y);
+       evas_object_resize(_pWindow, __bounds.width, __bounds.height);
+       PRINT("[%#x] Initialzing evas_object_move(%f, %f) \n", (unsigned int)this, __bounds.x, __bounds.y);
+       PRINT("[%#x] Initialzing evas_object_resize(%f, %f) \n", (unsigned int)this, __bounds.width, __bounds.height);
+
        return E_SUCCESS;
 }
 
@@ -497,19 +495,7 @@ _EflLayer::GetBounds(void) const
 {
        if (_pWindow)
        {
-               int x = 0;
-               int y = 0;
-               int w = 0;
-               int h = 0;
-
-               evas_object_geometry_get(_pWindow, null, null, &w, &h);
-
-               if (__isWinObject == true)
-               {
-                       elm_win_screen_position_get(_pWindow, &x, &y);
-               }
-
-               return FloatRectangle(x, y, w, h);
+               return __bounds;
        }
 
        return FloatRectangle();
@@ -518,7 +504,6 @@ _EflLayer::GetBounds(void) const
 result
 _EflLayer::SetShowState(bool show)
 {
-#ifdef ECORE_EVAS_ASYNC_VISIBILITY_BUG_HACK
        if (_isShow == show)
        {
                return E_SUCCESS;
@@ -528,29 +513,21 @@ _EflLayer::SetShowState(bool show)
        {
                // Show State is not applied yet. Need cancel the visibility change request.
                _needShowStateChangeRequest = false;
-               PRINT("Cancel SetShowState request (%d)\n", show);
+               PRINT("[%#x] Cancel SetShowState request (%d)\n", (unsigned int)this, show);
        }
        else
        {
                _needShowStateChangeRequest = true;
-               _DisplayManager::GetInstance()->AddWakeUpEvent();
-               PRINT("SetShowState request (%d)\n", show);
-       }
 
-       _isShow = show;
-#else
-       if (_pWindow)
-       {
-               if (show)
+               _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+               if (pDisplayManager)
                {
-                       evas_object_show(_pWindow);
-               }
-               else
-               {
-                       evas_object_hide(_pWindow);
+                       pDisplayManager->AddWakeUpEvent();
                }
+               PRINT("[%#x] SetShowState request (%d)\n", (unsigned int)this, show);
        }
-#endif
+
+       _isShow = show;
 
        return E_SUCCESS;
 }
@@ -571,14 +548,13 @@ _EflLayer::SetOpacity(float opacity)
        {
                opacity = 1.0f;
        }
-       else if(opacity<0.0f)
+       else if(opacity < 0.0f)
        {
                opacity = 0.0f;
        }
 
        if (_FloatCompare(opacity, 1.0f))
        {
-//             ecore_evas_alpha_set(_pEcoreEvas, EINA_FALSE);
                if (__isWinObject == true)
                {
                        elm_win_alpha_set(_pWindow, EINA_FALSE);
@@ -591,8 +567,6 @@ _EflLayer::SetOpacity(float opacity)
        }
        else if (opacity < 1.0f)
        {
-
-//             ecore_evas_alpha_set(_pEcoreEvas, EINA_TRUE);
                if (__isWinObject == true)
                {
                        elm_win_alpha_set(_pWindow, EINA_TRUE);
@@ -603,18 +577,23 @@ _EflLayer::SetOpacity(float opacity)
                a = opacity*255;
                evas_object_color_set(_pWindow, r, g, b, a);
        }
+       PRINT("[%#x] ALPHA SET(opacity=%f)\n", (unsigned int)this, opacity);
 }
 
 float
 _EflLayer::GetOpacity(void)
 {
        if (!_pWindow)
-                       return 0.0f;
+       {
+               return 0.0f;
+       }
 
        int r,g,b,a;
        evas_object_color_get(_pWindow, &r, &g, &b, &a);
        if (a > 255)
+       {
                return 1.0f;
+       }
 
        return a / 255.0f;
 
@@ -625,70 +604,36 @@ _EflLayer::Flush(void)
 {
        if (_pEcoreEvas)
        {
-               PRINT("Flush StateChange(%p) - is Pending(%d) \n",this , _isVisibilityChangeInProgress);
-
-               if (_needShowStateChangeRequest && (!_needAsyncVisibilityChangeRequest || !_isVisibilityChangeInProgress))
+               if (_needShowStateChangeRequest)
                {
                        if (_isShow)
                        {
                                evas_object_show(_pWindow);
-
-                               // QUICK-DIRTY HACK TO BE REMOVED !!!
-#ifdef ECORE_EVAS_ASYNC_VISIBILITY_BUG_HACK
-                               ecore_x_sync();
-                               ecore_x_flush();
-                               usleep(30 * 1000);
-
-                               FloatRectangle bounds = GetBounds();
-                               evas_damage_rectangle_add(_pEvas, 0, 0, (int)bounds.width, (int)bounds.height);
-#endif
-
-                               PRINT("evas_object_show(%p) \n", this);
+                               PRINT("[%#x] evas_object_show \n", (unsigned int)this);
                        }
                        else
                        {
                                evas_object_hide(_pWindow);
-                               PRINT("evas_object_hide(%p) \n", this);
+                               PRINT("[%#x] evas_object_hide \n", (unsigned int)this);
                        }
-
-#ifdef _NEED_DAMAGE_HANDER_
-                       _isVisibilityChangeInProgress = true;
-#endif
                        _needShowStateChangeRequest = false;
                }
 
-               if (_needEvasRender > 0)
-               {
-                       _DisplayManager::GetInstance()->AddWakeUpEvent();
-                       _needEvasRender--;
-               }
                FloatRectangle rect = GetBounds();
                if(!_needRender)
                {
-                       PRINT("_needRender = false bounds(%f %f %f %f)\n", rect.x, rect.y, rect.width, rect.height);
+                       PRINT("[%#x] _needRender = false bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height);
                        return;
                }
 
-               PRINT("ecore_evas_manual_render bounds(%f %f %f %f)\n", rect.x, rect.y, rect.width, rect.height);
+               //PRINT("[%#x] ecore_evas_manual_render bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height);
 
                __needPreRender = false;
                ecore_evas_manual_render(_pEcoreEvas);
                __needPreRender = true;
        }
 
-#if 0
-       if (_pEvas)
-       {
-               if(show)
-               {
-                       evas_render_idle_flush(_pEvas);
-               }
-               else
-               {
-                       evas_render(_pEvas);
-               }
-       }
-#endif
+
 }
 
 
index 7616306..5a52827 100644 (file)
@@ -303,7 +303,7 @@ _ButtonPresenter::Draw(void)
                DrawText();
        }
 
-       if (__showUnderlineBitmap && __pButton->GetToolbarItemBackgroundBitmap(status) == null)
+       if (__showUnderlineBitmap && __pButton->GetToolbarItemBackgroundBitmap(status) == null && status != _BUTTON_STATUS_PRESSED)
        {
                DrawUnderlineBitmap();
        }
@@ -1195,7 +1195,7 @@ _ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control)
                return;
        }
 
-       if (__pButton->IsEnabled())
+       if (__pButton->GetEnableState())
        {
                __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
                __pButton->Invalidate();
index bbd00fb..afa898c 100644 (file)
@@ -62,6 +62,8 @@ _CheckButtonPresenter::_CheckButtonPresenter(void)
        , __onOffHandlerPosition(0.0f)
        , __onOffHandlerPressed(false)
        , __onOffHandlerMoved(false)
+       , __highlightedIndex(0)
+       , __detailedPressed(false)
 {
 
 }
@@ -502,7 +504,7 @@ _CheckButtonPresenter::DrawBackground(void)
                        pHighlightedReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBgBitmap,
                                        Color::GetColor(COLOR_ID_MAGENTA), __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_HIGHLIGHTED));
 
-                       if (pHighlightedReColorBgBitmap)
+                       if (pHighlightedReColorBgBitmap && __highlightedIndex == 0)
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedReColorBgBitmap))
                                {
@@ -641,14 +643,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
                                Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
 
-                               if (pCircleNormalBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
-                               }
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightNormalBitmap)
+                                       if (pDetailedRightNormalBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightNormalBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -743,14 +760,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
                                Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
 
-                               if (pCirclePressedBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
-                               }
+                                       if (pCirclePressedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightPressedBitmap)
+                                       if (pDetailedRightPressedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       if (pCirclePressedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightPressedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -798,7 +830,7 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                                Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
                        }
 
-                       if (pReColorMarkBgHighlightedBitmap)
+                       if (pReColorMarkBgHighlightedBitmap && __highlightedIndex == 1)
                        {
                                pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorMarkBgHighlightedBitmap);
                        }
@@ -811,14 +843,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
                                Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
 
-                               if (pCircleNormalBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
-                               }
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightHighlightedBitmap)
+                                       if (pDetailedRightHighlightedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightHighlightedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -854,7 +901,7 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                        pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
                                }
 
-                               if (pReColorCircleHighlightedBitmap)
+                               if (pReColorCircleHighlightedBitmap && __highlightedIndex == 2)
                                {
                                        pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
                                }
@@ -876,14 +923,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
                                Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
 
-                               if (pCircleSelectedBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
-                               }
+                                       if (pCircleSelectedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightSelectedBitmap)
+                                       if (pDetailedRightSelectedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+                                       if (pCircleSelectedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
+                                       }
+
+                                       if (pDetailedRightSelectedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -925,14 +987,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
                                Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
 
-                               if (pCircleNormalBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
-                               }
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightNormalBitmap)
+                                       if (pDetailedRightNormalBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightNormalBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -1013,14 +1090,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
                                Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
 
-                               if (pCirclePressedBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
-                               }
+                                       if (pCirclePressedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightPressedBitmap)
+                                       if (pDetailedRightPressedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       if (pCirclePressedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightPressedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -1058,14 +1150,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
                                Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
 
-                               if (pCircleNormalBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
-                               }
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightHighlightedBitmap)
+                                       if (pDetailedRightHighlightedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+                                       if (pCircleNormalBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+                                       }
+
+                                       if (pDetailedRightHighlightedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -1101,7 +1208,7 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                        pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
                                }
 
-                               if (pReColorCircleHighlightedBitmap)
+                               if (pReColorCircleHighlightedBitmap && __highlightedIndex == 1)
                                {
                                        pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
                                }
@@ -1116,14 +1223,29 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
                                Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
 
-                               if (pCircleSelectedBitmap)
+                               if (__detailedPressed == true)
                                {
-                                       pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
-                               }
+                                       if (pCircleSelectedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+                                       }
 
-                               if (pDetailedRightSelectedBitmap)
+                                       if (pDetailedRightSelectedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+                                       }
+                               }
+                               else
                                {
-                                       pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+                                       if (pCircleSelectedBitmap)
+                                       {
+                                               pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
+                                       }
+
+                                       if (pDetailedRightSelectedBitmap)
+                                       {
+                                               pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+                                       }
                                }
 
                                if (pReColorCircleBitmap)
@@ -1230,7 +1352,7 @@ _CheckButtonPresenter::DrawCheckBitmap(void)
                                pReColorOnOffBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffBgHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
                        }
 
-                       if (pReColorOnOffBgHighlightedBitmap)
+                       if (pReColorOnOffBgHighlightedBitmap && __highlightedIndex == 1)
                        {
                                pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorOnOffBgHighlightedBitmap);
                        }
@@ -1456,6 +1578,17 @@ _CheckButtonPresenter::OnTouchPressed(const _Control& source, const _TouchInfo&
                        __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
                }
        }
+       else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+       {
+               if (__detailedButtonBounds.Contains(touchPoint))
+               {
+                       __detailedPressed = true;
+               }
+               else
+               {
+                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+               }
+       }
        else
        {
                __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
@@ -1492,17 +1625,32 @@ _CheckButtonPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
        _CheckButtonStatus status = __pCheckButton->GetCheckButtonStatus();
        CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
 
-       if (status == _CHECK_BUTTON_STATUS_NORMAL && __onOffHandlerPressed == false)
+       if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
        {
-               if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+               if (status == _CHECK_BUTTON_STATUS_NORMAL && __onOffHandlerPressed == false)
                {
-                       AdjustHandlerPosition();
-
-                       __onOffHandlerPressed = false;
                        __onOffHandlerMoved = false;
+
+                       return true;
                }
+       }
+       else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+       {
+               if (status == _CHECK_BUTTON_STATUS_NORMAL && __detailedPressed == true)
+               {
+                       __detailedPressed = false;
 
-               return true;
+                       __pCheckButton->Invalidate();
+
+                       return true;
+               }
+       }
+       else
+       {
+               if (status == _CHECK_BUTTON_STATUS_NORMAL)
+               {
+                       return true;
+               }
        }
 
        if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON
@@ -1525,9 +1673,7 @@ _CheckButtonPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
 
        if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
        {
-               detailedBounds.width = detailedBounds.width - checkButtonLeftMargin - checkButtonDetailedBitmapWidth;
-
-               if (detailedBounds.Contains(touchPoint))
+               if (!__detailedButtonBounds.Contains(touchPoint))
                {
                        PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
 
@@ -1698,14 +1844,53 @@ _CheckButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to
        FloatRectangle bounds = __pCheckButton->GetClientBoundsF();
        bool isInCheckButtonArea = bounds.Contains(touchPoint);
        bool isInOnOffHandlerArea = __onOffSlidingButtonBounds.Contains(touchPoint);
+       bool isDetailedArea = __detailedButtonBounds.Contains(touchPoint);
 
-       if (__onOffHandlerPressed == true)
+       CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
+       if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
        {
-               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+               if (__onOffHandlerPressed == true)
+               {
+                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+               }
+               else
+               {
+                       if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false )
+                       {
+                               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                       }
+                       else
+                       {
+                               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+                       }
+               }
+       }
+       else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+       {
+               if (isDetailedArea == true && __touchMoveHandled == false)
+               {
+                       __detailedPressed = true;
+
+                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+               }
+               else
+               {
+                       __detailedPressed = false;
+
+                       if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false )
+                       {
+                               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                       }
+                       else
+                       {
+                               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+                       }
+               }
        }
        else
        {
-               if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false )
+               if (isInCheckButtonArea == true && __touchMoveHandled == false)
                {
                        __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
                }
@@ -1715,8 +1900,6 @@ _CheckButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to
                }
        }
 
-       CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
-
        if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
        {
                if (isInOnOffHandlerArea == true && __onOffHandlerPressed == true)
@@ -1847,7 +2030,7 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition)
                                                detailedHighlightedBgColor);
                        }
 
-                       if (pReColorBgBitmap)
+                       if (pReColorBgBitmap && __highlightedIndex == 1)
                        {
                                pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
                        }
@@ -1943,7 +2126,7 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition)
                                                detailedHighlightedBgColor);
                        }
 
-                       if (pReColorBgBitmap)
+                       if (pReColorBgBitmap && __highlightedIndex == 1)
                        {
                                pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
                        }
@@ -2006,15 +2189,53 @@ _CheckButtonPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI
 {
        _KeyCode keyCode = keyInfo.GetKeyCode();
 
+       CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
        if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
        {
                if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED)
                {
-                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                       if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+                       {
+                               if (__highlightedIndex == 1)
+                               {
+                                       __onOffHandlerPressed = true;
+                               }
+                               else
+                               {
+                                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                               }
+                       }
+                       else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+                       {
+                               if (__highlightedIndex == 2)
+                               {
+                                       __detailedPressed = true;
+                               }
+                               else
+                               {
+                                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                               }
+                       }
+                       else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+                       {
+                               if (__highlightedIndex == 1)
+                               {
+                                       __detailedPressed = true;
+                               }
+                               else
+                               {
+                                       __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                               }
+                       }
+                       else
+                       {
+                               __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+                       }
                }
        }
 
-       __pCheckButton->Draw();
+       __pCheckButton->Invalidate();
 
        return false;
 }
@@ -2024,10 +2245,80 @@ _CheckButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& key
 {
        _KeyCode keyCode = keyInfo.GetKeyCode();
 
-       if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
+       CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
+       if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT)
        {
-               CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+               if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
+               {
+                       __highlightedIndex = 0;
+               }
+               else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+               {
+                       if (__highlightedIndex == 0)
+                       {
+                               __highlightedIndex = 1;
+                       }
+                       else if (__highlightedIndex == 1)
+                       {
+                               __highlightedIndex = 2;
+                       }
+                       else if (__highlightedIndex == 2)
+                       {
+                               __highlightedIndex = 0;
+                       }
+               }
+               else
+               {
+                       if (__highlightedIndex == 0)
+                       {
+                               __highlightedIndex = 1;
+                       }
+                       else if (__highlightedIndex == 1)
+                       {
+                               __highlightedIndex = 0;
+                       }
+               }
 
+               __pCheckButton->Invalidate();
+       }
+       else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT)
+       {
+               if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
+               {
+                       __highlightedIndex = 0;
+               }
+               else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+               {
+                       if (__highlightedIndex == 0)
+                       {
+                               __highlightedIndex = 2;
+                       }
+                       else if (__highlightedIndex == 1)
+                       {
+                               __highlightedIndex = 0;
+                       }
+                       else if (__highlightedIndex == 2)
+                       {
+                               __highlightedIndex = 1;
+                       }
+               }
+               else
+               {
+                       if (__highlightedIndex == 0)
+                       {
+                               __highlightedIndex = 1;
+                       }
+                       else if (__highlightedIndex == 1)
+                       {
+                               __highlightedIndex = 0;
+                       }
+               }
+
+               __pCheckButton->Invalidate();
+       }
+       else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
+       {
                if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON
                                || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
                {
@@ -2040,22 +2331,69 @@ _CheckButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& key
 
                __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
 
-               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+               if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+               {
+                       if (__highlightedIndex != 2)
+                       {
+                               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
 
-               __pCheckButton->FireActionEvent();
+                               __pCheckButton->FireActionEvent();
 
-               if (__pCheckButton->GetRadioGroup() != null)
-               {
-                       __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+                               if (__pCheckButton->GetRadioGroup() != null)
+                               {
+                                       __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+                               }
+                       }
+                       else
+                       {
+                               __detailedPressed = false;
+                       }
                }
+               else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+               {
+                       if (__highlightedIndex != 1)
+                       {
+                               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
 
-               if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING)
+                               __pCheckButton->FireActionEvent();
+
+                               if (__pCheckButton->GetRadioGroup() != null)
+                               {
+                                       __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+                               }
+                       }
+                       else
+                       {
+                               __detailedPressed = false;
+                       }
+               }
+               else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING)
                {
+                       PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+
+                       __pCheckButton->FireActionEvent();
+
+                       if (__pCheckButton->GetRadioGroup() != null)
+                       {
+                               __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+                       }
+
                        AdjustHandlerPosition();
 
                        __onOffHandlerPressed = false;
                        __onOffHandlerMoved = false;
                }
+               else
+               {
+                       PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+
+                       __pCheckButton->FireActionEvent();
+
+                       if (__pCheckButton->GetRadioGroup() != null)
+                       {
+                               __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+                       }
+               }
        }
 
        return false;
@@ -2476,6 +2814,8 @@ _CheckButtonPresenter::OnFocusModeStateChanged(void)
 bool
 _CheckButtonPresenter::OnFocusGained(const _Control& source)
 {
+       __highlightedIndex = 0;
+
        if (__pCheckButton->IsFocusModeStateEnabled() == true)
        {
                if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED)
index e9f9a86..49bc955 100644 (file)
@@ -391,14 +391,14 @@ _ContextMenuItem::DrawItem(void)
 void
 _ContextMenuItem::DrawItemUpperDivider(void)
 {
+       FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+       Color dividerLineColor = Color(0, 0, 0, 0);
+
        if (__pUpperDividerLineLabel == null)
        {
                __pUpperDividerLineLabel = _Label::CreateLabelN();
                SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-               FloatRectangle bounds = GetBoundsF();
-               __pUpperDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, 0.0f, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
-
                AttachChild(*__pUpperDividerLineLabel);
 
                _AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer();
@@ -408,12 +408,13 @@ _ContextMenuItem::DrawItemUpperDivider(void)
                }
        }
 
-       Color dividerLineColor = Color(0, 0, 0, 0);
+       bounds = GetBoundsF();
        if (__selected == false)
        {
                dividerLineColor = __upperDividerLineColor;
        }
 
+       __pUpperDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, 0.0f, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
        __pUpperDividerLineLabel->SetBackgroundColor(dividerLineColor);
        __pUpperDividerLineLabel->Invalidate();
 }
@@ -486,14 +487,14 @@ _ContextMenuItem::DrawItemBackground(void)
 void
 _ContextMenuItem::DrawItemLowerDivider(void)
 {
+       FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+       Color dividerLineColor(0, 0, 0, 0);
+
        if (__pLowerDividerLineLabel == null)
        {
                __pLowerDividerLineLabel = _Label::CreateLabelN();
                SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-               FloatRectangle bounds = GetBoundsF();
-               __pLowerDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, bounds.height - __dividerHeight, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
-
                AttachChild(*__pLowerDividerLineLabel);
 
                _AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer();
@@ -503,12 +504,13 @@ _ContextMenuItem::DrawItemLowerDivider(void)
                }
        }
 
-       Color dividerLineColor = Color(0, 0, 0, 0);
+       bounds = GetBoundsF();
        if (__selected == false)
        {
                dividerLineColor = __lowerDividerLineColor;
        }
 
+       __pLowerDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, bounds.height - __dividerHeight, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
        __pLowerDividerLineLabel->SetBackgroundColor(dividerLineColor);
        __pLowerDividerLineLabel->Invalidate();
 }
index b8a23dc..d050a29 100644 (file)
@@ -222,48 +222,20 @@ _ContextMenuListPresenter::CreateItem(const Base::String& text, int actionId, co
                return null;
        }
 
-       // calculate item size
-       float bitmapWidth = (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __itemBitmapWidth : 0.0f;
-
        FloatDimension textArea(0.0f, 0.0f);
        FloatDimension itemSize(0.0f, 0.0f);
 
-       __pFont->GetTextExtent(text, text.GetLength(), textArea);
-       float labelTopMargin = 0.0f;
-       float iconGap = 0.0f;
-       float textGap = 0.0f;
-       float textLabelX = 0.0f;
-       GET_SHAPE_CONFIG(LABEL::TOP_MARGIN,  _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
-       GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TEXT_GAP, _CONTROL_ORIENTATION_PORTRAIT, textGap);
-       iconGap = __itemGap;
+       CalculateItemSize(text, itemType, textArea, itemSize);
 
-       if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
-       {
-               textArea.width  +=  2.0 * iconGap;
-               itemSize.width =  textArea.width + bitmapWidth + textGap;
-               textLabelX = iconGap + bitmapWidth;
-       }
-       else
-       {
-               textArea.width  += 2.0f * textGap;
-               itemSize.width = textArea.width;
-       }
-
-       textArea.height += 2.0f * labelTopMargin;
-       itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
-
-       itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+       pItem->SetSize(itemSize);
 
-       if (itemSize.width > __itemMaxWidth)
+       float textLabelX = 0.0f;
+       if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
        {
-               textArea.width -= itemSize.width - __itemMaxWidth;
-               itemSize.width = __itemMaxWidth;
+               textLabelX = __itemGap + __itemBitmapWidth;
        }
 
-       pItem->SetSize(itemSize);
-
        // add text label
-
        pLabel = _Label::CreateLabelN();
        pLabel->SetText(text);
        ContextMenuCoreItemStatus itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL;
@@ -291,6 +263,44 @@ _ContextMenuListPresenter::CreateItem(const Base::String& text, int actionId, co
        return pItem;
 }
 
+void
+_ContextMenuListPresenter::CalculateItemSize(const String &text, ContextMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize)
+{
+       float bitmapWidth = (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __itemBitmapWidth : 0.0f;
+
+       __pFont->GetTextExtent(text, text.GetLength(), textArea);
+       float labelTopMargin = 0.0f;
+       float iconGap = 0.0f;
+       float textGap = 0.0f;
+       GET_SHAPE_CONFIG(LABEL::TOP_MARGIN,  _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
+       GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TEXT_GAP, _CONTROL_ORIENTATION_PORTRAIT, textGap);
+       iconGap = __itemGap;
+
+       if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
+       {
+               textArea.width  +=  2.0 * iconGap;
+               itemSize.width =  textArea.width + bitmapWidth + textGap;
+       }
+       else
+       {
+               textArea.width  += 2.0f * textGap;
+               itemSize.width = textArea.width;
+       }
+
+       textArea.height += 2.0f * labelTopMargin;
+       itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
+
+       itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+
+       if (itemSize.width > __itemMaxWidth)
+       {
+               textArea.width -= itemSize.width - __itemMaxWidth;
+               itemSize.width = __itemMaxWidth;
+       }
+
+       return;
+}
+
 result
 _ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap,
                                                                   const Tizen::Graphics::Bitmap* pPressedBitmap,
@@ -365,6 +375,8 @@ _ContextMenuListPresenter::SetItem(int index, const Tizen::Base::String& text, i
                SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
        }
 
+       CalculateItemMaximumWidth();
+
        return E_SUCCESS;
 }
 
@@ -390,6 +402,8 @@ _ContextMenuListPresenter::DeleteItem(int index)
        r = __pModel->RemoveItem(index);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
 
+       CalculateItemMaximumWidth();
+
        return r;
 }
 
@@ -865,6 +879,31 @@ _ContextMenuListPresenter::AdjustItemPosition(void)
        }
 }
 
+void
+_ContextMenuListPresenter::CalculateItemMaximumWidth(void)
+{
+       FloatDimension itemSize(0.0f, 0.0f);
+       FloatDimension textArea(0.0f, 0.0f);
+       float maxItemWidth = 0.0f;
+
+       for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
+       {
+               _ContextMenuItem* pItem = null;
+
+               pItem = __pModel->GetItem(i);
+               SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
+
+               CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
+
+               if (maxItemWidth < itemSize.width)
+               {
+                       maxItemWidth = itemSize.width;
+               }
+       }
+
+       __itemWidth = maxItemWidth;
+}
+
 int
 _ContextMenuListPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const
 {
index c00d339..513a5b1 100644 (file)
@@ -729,8 +729,6 @@ _DateTimePresenter::OnActionPerformed(const _Control& source, int actionId)
 bool
 _DateTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
-       int boxId = 0;
-
        if (!__keypadEnabled)
        {
                return false;
@@ -738,17 +736,6 @@ _DateTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo
 
        _KeyCode keyCode = keyInfo.GetKeyCode();
 
-       if (__focusedBoxIndex < __outputBoxMaxCount)
-       {
-               boxId = __pDisplayBox[__focusedBoxIndex]->GetDisplayBoxId();
-
-               if ((keyCode != _KEY_RIGHT) && (keyCode != _KEY_LEFT) && (keyCode != _KEY_TAB) && (boxId == DATETIME_ID_MONTH))
-               {
-                       //month can be changed only with touch on input pad
-                       return true;
-               }
-       }
-
        switch (keyCode)
        {
                case _KEY_RIGHT:
@@ -944,11 +931,39 @@ _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue)
        else if (boxId == DATETIME_ID_MONTH)
        {
                PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView);
-               newNumber = inputPadReturnValue;
-               __inputComposing = DATETIME_INPUT_BEGIN;
+
+               if (__inputComposing == DATETIME_INPUT_BEGIN && __keypadEnabled)
+               {
+                       currentNumber = GetNumberInBox(boxId);
+                       newNumber = currentNumber * 10 + inputPadReturnValue;
+
+                       if (newNumber > 12)
+                       {
+                               newNumber = 12;
+                       }
+                       else if (newNumber < 1)
+                       {
+                               newNumber = 1;
+                       }
+
+                       ChangeFocusBox();
+               }
+               else
+               {
+                       if (inputPadReturnValue == 0)
+                       {
+                               return;
+                       }
+                       newNumber = inputPadReturnValue;
+                       __inputComposing = DATETIME_INPUT_BEGIN;
+
+                       if (!__keypadEnabled || newNumber > 1)
+                       {
+                               ChangeFocusBox();
+                       }
+               }
 
                SetNumberInBox(boxId, newNumber);
-               ChangeFocusBox();
        }
        else
        {
index 54c3687..a78027b 100644 (file)
@@ -1353,6 +1353,7 @@ _EditDatePresenter::Animate(void)
        FloatPoint textPoint;
        TextSimple* pOldSimpleText = null;
        TextSimple* pNewSimpleText = null;
+       bool isCustomBitmap = false;
 
        _DateTimeUtils dateTimeUtils;
        monthString = dateTimeUtils.GetMonthString(GetMonth());
@@ -1389,6 +1390,7 @@ _EditDatePresenter::Animate(void)
        VisualElementPropertyAnimation* pNewBoundsAnimation = null;
        VisualElementPropertyAnimation* pOldBoundsAnimation = null;
        Canvas *pCanvas = null;
+       Canvas *pContentCanvas = null;
        Color contentBgColor;
        Color textPressedColor;
        float contentTextMargin;
@@ -1459,17 +1461,50 @@ _EditDatePresenter::Animate(void)
        pNewVisualElement->SetShowState(true);
        pOldVisualElement->SetShowState(true);
 
-       __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + contentTextMargin), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 2.0f))));
+       __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f))));
 
        pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
        pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
 
-       pCanvas = pEditDateElement->GetCanvasN(__pContentProvider->GetBounds());
-       pCanvas->SetBackgroundColor(contentBgColor);
+       pContentCanvas = pEditDateElement->GetCanvasN(__pContentProvider->GetBounds());
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pContentCanvas->Clear();
+
+       pCanvas = pEditDateElement->GetCanvasN(rect);
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
        pCanvas->Clear();
+       rect.x = 0.0f;
+       rect.y = 0.0f;
+       r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
+       isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+
+       if (!isCustomBitmap)
+       {
+               result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap);
+
+               if (res != E_SUCCESS)
+               {
+                       SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res));
+               }
+       }
+
        delete pCanvas;
        pCanvas = null;
 
+       if (r != E_SUCCESS)
+       {
+               pContentCanvas->SetBackgroundColor(contentBgColor);
+               pContentCanvas->Clear();
+       }
+
+       delete pContentCanvas;
+       pContentCanvas = null;
+
        pEditDateElement->AttachChild(*__pContentProvider);
        __pContentProvider->AttachChild(*pOldVisualElement);
        __pContentProvider->AttachChild(*pNewVisualElement);
@@ -1568,6 +1603,9 @@ CATCH:
        delete pNewSimpleText;
        pNewSimpleText = null;
 
+       delete pContentCanvas;
+       pContentCanvas = null;
+
        return;
 }
 
index 47de18b..9cbba23 100644 (file)
@@ -1708,6 +1708,9 @@ _EditTimePresenter::Animate(void)
        String hourString;
        String minuteString;
        String newValue;
+       TextSimple* pOldSimpleText = null;
+       TextSimple* pNewSimpleText = null;
+       bool isCustomBitmap = false;
 
        _DateTimeUtils dateTimeUtils;
        int hours = GetHour();
@@ -1747,12 +1750,15 @@ _EditTimePresenter::Animate(void)
        VisualElementPropertyAnimation* pNewBoundsAnimation = null;
        VisualElementPropertyAnimation* pOldBoundsAnimation = null;
        Canvas *pCanvas = null;
+       Canvas *pContentCanvas = null;
        Color contentBgColor;
        Color textNormalColor;
        Color textPressedColor;
+       float contentTextMargin;
 
        GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_PRESSED, contentBgColor);
        GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textPressedColor);
+       GET_SHAPE_CONFIG(EDITDATE::CONTENT_TEXT_MARGIN, __pEditTime->GetOrientation(), contentTextMargin);
 
        __pFont->GetTextExtent(newValue, newValue.GetLength(), newTextDim);
        __pFont->GetTextExtent(__lastSelectedValue, __lastSelectedValue.GetLength(), oldTextDim);
@@ -1817,45 +1823,48 @@ _EditTimePresenter::Animate(void)
 
        pOldVisualElement->SetShowState(true);
 
-       if (newTextDim.width > oldTextDim.width)
-       {
-               textPoint.x = (rect.width - newTextDim.width) / 2.0f;
-               textPoint.y = (rect.height - newTextDim.height) / 2.0f;
-               __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
-               pNewVisualElement->SetBounds(FloatRectangle(0.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
+       __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f))));
 
-               rect.x = __pContentProvider->GetBounds().x;
-               rect.y = __pContentProvider->GetBounds().y;
-               rect.width = __pContentProvider->GetBounds().width;
-               rect.height = __pContentProvider->GetBounds().height;
+       pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
+       pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
 
-               textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
-               textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
+       pContentCanvas = pEditTimeElement->GetCanvasN(__pContentProvider->GetBounds());
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+       pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pContentCanvas->Clear();
 
-               pOldVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
-       }
-       else
+       pCanvas = pEditTimeElement->GetCanvasN(rect);
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pCanvas->Clear();
+       rect.x = 0.0f;
+       rect.y = 0.0f;
+       r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
+       isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+
+       if (!isCustomBitmap)
        {
-               textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
-               textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
-               __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
-               pOldVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
+               result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap);
 
-               rect.x = __pContentProvider->GetBounds().x;
-               rect.y = __pContentProvider->GetBounds().y;
-               rect.width = __pContentProvider->GetBounds().width;
-               rect.height = __pContentProvider->GetBounds().height;
+               if (res != E_SUCCESS)
+               {
+                       SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res));
+               }
+       }
 
-               textPoint.x = (rect.width - newTextDim.width) / 2.0f;
-               textPoint.y = (rect.height - newTextDim.height) / 2.0f;
+       delete pCanvas;
+       pCanvas = null;
 
-               pNewVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
+       if (r != E_SUCCESS)
+       {
+               pContentCanvas->SetBackgroundColor(contentBgColor);
+               pContentCanvas->Clear();
        }
 
-       pCanvas = pEditTimeElement->GetCanvasN(rect);
-       pCanvas->SetBackgroundColor(contentBgColor);
-       pCanvas->Clear();
-       delete pCanvas;
+       delete pContentCanvas;
+       pContentCanvas = null;
 
        pEditTimeElement->AttachChild(*__pContentProvider);
 
@@ -1867,8 +1876,8 @@ _EditTimePresenter::Animate(void)
 
        pNewBoundsAnimation->SetDuration(300);
        pNewBoundsAnimation->SetPropertyName("bounds.position");
-       pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x * 1.0f, newTextDim.height * 1.0f)));
-       pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x * 1.0f, 0.0f)));
+       pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height)));
+       pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f)));
        pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
 
        pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
@@ -1876,10 +1885,13 @@ _EditTimePresenter::Animate(void)
 
        pOldBoundsAnimation->SetDuration(300);
        pOldBoundsAnimation->SetPropertyName("bounds.position");
-       pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x * 1.0f, 0.0f)));
-       pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x * 1.0f, oldTextDim.height * -1.0f)));
+       pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f)));
+       pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f)));
        pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
 
+       pOldSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+       SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
        pCanvas = pOldVisualElement->GetCanvasN();
        r = GetLastResult();
        SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -1887,13 +1899,23 @@ _EditTimePresenter::Animate(void)
        pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
        pCanvas->Clear();
        pCanvas->SetForegroundColor(textPressedColor);
-       (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
-       pCanvas->SetFont(*__pFont);
-       pCanvas->DrawText(FloatPoint(0.0f, 0.0f), __lastSelectedValue);
+
+       (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+       (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN);
+       __textObject.RemoveAll();
+       __textObject.AppendElement(*pOldSimpleText);
+
+       __textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
+       __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength());
+       __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height));
+       __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas));
 
        delete pCanvas;
        pCanvas = null;
 
+       pNewSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+       SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
        pCanvas = pNewVisualElement->GetCanvasN();
        r = GetLastResult();
        SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -1901,9 +1923,16 @@ _EditTimePresenter::Animate(void)
        pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
        pCanvas->Clear();
        pCanvas->SetForegroundColor(textPressedColor);
-       (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
-       pCanvas->SetFont(*__pFont);
-       pCanvas->DrawText(FloatPoint(0.0f, 0.0f), newValue);
+
+       (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+       (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN);
+       __textObject.RemoveAll();
+       __textObject.AppendElement(*pNewSimpleText);
+
+       __textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
+       __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength());
+       __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height));
+       __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas));
 
        delete pCanvas;
        pCanvas = null;
@@ -1930,8 +1959,14 @@ CATCH:
        delete pOldBoundsAnimation;
        pOldBoundsAnimation = null;
 
-       delete pCanvas;
-       pCanvas = null;
+       delete pOldSimpleText;
+       pOldSimpleText = null;
+
+       delete pNewSimpleText;
+       pNewSimpleText = null;
+
+       delete pContentCanvas;
+       pContentCanvas = null;
 
        return;
 }
index 6b2e2ac..9309e96 100644 (file)
@@ -2948,7 +2948,7 @@ _Form::SetIndicatorShowState(bool state)
        }
        else if (!pFrame && IsAttachedToMainTree())
        {
-               r = __pIndicator->SetIndicatorShowState(false);
+               __pIndicator->SetShowState(false);
        }
 
        __indicatorShowState = state;
@@ -3165,6 +3165,8 @@ _Form::AttachedToMainTree(void)
                }
        }
 
+       AdjustClientBounds();
+
        return r;
 }
 
@@ -3607,4 +3609,12 @@ _Form::SetFocusTraversalControl(_Control* pControl)
 {
        __pFocusTraversalControl = pControl;
 }
+
+void
+_Form::OnFormActivated(void)
+{
+       AddIndicatorObject();
+}
+
+
 }}} // Tizen::Ui::Controls
old mode 100644 (file)
new mode 100755 (executable)
index f7c238a..28f28e1
@@ -59,10 +59,13 @@ using namespace Tizen::Ui::Animations;
 
 #define OPTIONKEY      SOFTKEY_COUNT
 
-namespace Tizen { namespace Ui { namespace Controls
+namespace
 {
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
 
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+namespace Tizen { namespace Ui { namespace Controls
+{
 
 Dimension
 _FormImpl::FormSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const
@@ -335,6 +338,15 @@ _FormImpl::SetFormStyle(unsigned long formStyle)
                }
                else
                {
+                       if (OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT || OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+                       {
+                               GetCore().SetIndicatorShowState(true);
+                       }
+                       else
+                       {
+                               GetCore().SetIndicatorShowState(false);
+                       }
+
                        GetCore().SetIndicatorAutoHide(false, false);
                }
                r = GetLastResult();
@@ -1249,6 +1261,10 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                                {
                                        GetCore().SetIndicatorShowState(true);
                                }
+                               else
+                               {
+                                       GetCore().SetIndicatorShowState(false);
+                               }
                        }
                }
                GetCore().AdjustClientBounds();
@@ -1262,7 +1278,6 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                pIndicator->OnChangeLayout(orientation);
        }
 
-
        float adjHeight = 0.0f;
 
        if (GetCore().HasHeader())
old mode 100644 (file)
new mode 100755 (executable)
index 48336c7..823ae37
@@ -55,7 +55,7 @@ using namespace Tizen::Graphics;
 
 namespace Tizen { namespace Ui { namespace Controls {
 
-const String _ACTIVATE_FRAME = L"ActivateFrame";
+const wchar_t* _ACTIVATE_FRAME = L"ActivateFrame";
 
 _Frame::_Frame(void)
        : __pFramePresenter(null)
@@ -362,6 +362,7 @@ _Frame::SetCurrentForm(const _Form* pForm)
        }
 
        pNewForm->SetVisibleState(true);
+       pNewForm->OnFormActivated();
        _Control* pFocus = pNewForm->GetFocusControl();
        if (pFocus)
        {
@@ -948,7 +949,7 @@ _Frame::SetFocusControl(const _Control* pControl , bool on)
                if (on)
                {
                        pForm->SetFocusControl(pControl);
-                       if (isCurrentForm && pFrame->IsActivated())
+                       if (isCurrentForm && pFrame && pFrame->IsActivated())
                        {
                                pControlMgr->SetFocusControl(*pControl);
                        }
@@ -1014,7 +1015,7 @@ _Frame::GetFocusTraversalControl(_Control* pControl) const
 }
 
 void
-_Frame::SetFocusTraversalControl(_Control* pControl)
+_Frame::SetFocusTraversalControl(_Control* pControl, bool on)
 {
        _Form* pForm = null;
        _Control* pTempControl = pControl;
@@ -1043,7 +1044,14 @@ _Frame::SetFocusTraversalControl(_Control* pControl)
 
        if (pForm)
        {
-               pForm->SetFocusTraversalControl(pControl);
+               if (on)
+               {
+                       pForm->SetFocusTraversalControl(pControl);
+               }
+               else
+               {
+                       pForm->SetFocusTraversalControl(pForm);
+               }
        }
 }
 }}} // Tizen::Ui::Controls
old mode 100644 (file)
new mode 100755 (executable)
index 94a8dfa..5c0b378
@@ -39,9 +39,13 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Animations;
 
+namespace
+{
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
+
 namespace Tizen { namespace Ui { namespace Controls {
 
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
 
 const _FrameImpl*
 _FrameImpl::GetInstance(const Frame& frame)
index e613656..1cb886d 100644 (file)
@@ -566,7 +566,10 @@ _Gallery::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
 bool
 _Gallery::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
 {
-       return true;
+       _GalleryViewEventInfo viewEventInfo;
+       _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_CANCELED, &viewEventInfo);
+
+       return GetPresenter().PostEvent(viewEvent);
 }
 
 // Windowing Event Callbacks
index 38a09f5..b7b9d2c 100644 (file)
@@ -498,6 +498,9 @@ _GalleryPresenter::PostEvent(_GalleryViewEvent& event)
        case GALLERY_VIEW_EVENT_BOUNDS_CHANGED:
                return OnBoundsChanged();
 
+       case GALLERY_VIEW_EVENT_TOUCH_CANCELED:
+               return __pGalleryViewEventHandler->OnTouchCanceled();
+
        default:
                SysTryReturn(NID_UI_CTRL, false, false, E_INVALID_ARG,
                                        "[E_INVALID_ARG] The event type(%d) is invalid type", event.GetEventType());
index 9f58879..73cc8da 100644 (file)
@@ -236,7 +236,7 @@ CATCH:
 }
 
 bool
-_GalleryViewEventHandler::ResetTouch()
+_GalleryViewEventHandler::ResetTouch(void)
 {
        result r = E_SUCCESS;
 
@@ -395,6 +395,14 @@ CATCH:
        return true;
 }
 
+bool
+_GalleryViewEventHandler::OnTouchCanceled(void)
+{
+       ResetTouch();
+
+       return true;
+}
+
 void
 _GalleryViewEventHandler::OnTransitionCancel(void)
 {
index c7812d5..91bea1a 100644 (file)
@@ -1738,6 +1738,7 @@ _IconListPresenter::DrawEmptyList(void)
 
                if (pCanvas == null)
                {
+                       Color backgroundColor = Color(0, 0, 0, 0);
                        if (__pEmptyListVE != null)
                        {
                                pCanvas = __pEmptyListVE->GetCanvasN();
@@ -1745,9 +1746,10 @@ _IconListPresenter::DrawEmptyList(void)
                        else
                        {
                                pCanvas = __pVE->GetCanvasN();
+                               backgroundColor = __pIconListView->GetBackgroundColor();
                        }
                        SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-                       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+                       pCanvas->SetBackgroundColor(backgroundColor);
                        pCanvas->Clear();
                }
 
@@ -3144,6 +3146,7 @@ _IconListPresenter::FireEventAfterTouchRelease(int index)
                if (__selectedOverlayBitmapId >= 0)
                {
                        FireIconListViewItemEvent(EVENT_TYPE_OVERLAY_BITMAP_SELECTED, index, __selectedOverlayBitmapId);
+                       __selectedOverlayBitmapId = INVALID_INDEX;
                        return;
                }
 
index 3fed93a..0a7aef3 100644 (file)
@@ -140,7 +140,7 @@ _Indicator::SetIndicatorShowState(bool state)
 void
 _Indicator::SetIndicatorAutoHide(bool portrait, bool landscape)
 {
-       Ecore_X_Window win;
+       Ecore_X_Window win = 0;
        if (__pWindow)
        {
                win = (Ecore_X_Window)__pWindow->GetNativeHandle();
@@ -426,7 +426,7 @@ _Indicator::ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pV
 void
 _Indicator::OnChangeLayout(_ControlOrientation orientation)
 {
-       Ecore_X_Window win;
+       Ecore_X_Window win = 0;
        if (__pWindow)
        {
                win = (Ecore_X_Window)__pWindow->GetNativeHandle();
@@ -465,7 +465,6 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation)
                }
                else
                {
-                       SetIndicatorShowState(false);
                        SetIndicatorOpacity(__opacity);
                        ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
                }
@@ -606,6 +605,7 @@ _Indicator::IsNotificationTrayOpenEnabled(void) const
                        return false;
                }
        }
+       return false;
 }
 
 void
@@ -682,20 +682,23 @@ _Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point)
                return HIT_TEST_NOWHERE;
        }
 
-       _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
        Evas_Object* pImageObject = null;
-       if (pImpl)
+       if (this->__pCurrentVisualElement)
        {
-               _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
-               if (pNativeNode)
+               _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
+               if (pImpl)
                {
-                       VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
-                       if (pPortraitSurface)
+                       _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
+                       if (pNativeNode)
                        {
-                               _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
-                               if (pSurface)
+                               VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
+                               if (pPortraitSurface)
                                {
-                                       pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+                                       _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
+                                       if (pSurface)
+                                       {
+                                               pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+                                       }
                                }
                        }
                }
index 9917177..17b8797 100644 (file)
@@ -70,7 +70,13 @@ _ListItemBaseImpl::~_ListItemBaseImpl(void)
 {
        if (__pListViewItem != null)
        {
+               _TableViewItem* pContextItem = __pListViewItem->GetContextItem();
                __pListViewItem->Release();
+
+               if (pContextItem)
+               {
+                       pContextItem->Release();
+               }
        }
 
        delete __pEvent;
@@ -235,6 +241,11 @@ _ListItemBaseImpl::GetBackgroundColor(ListItemDrawingStatus status) const
 result
 _ListItemBaseImpl::SetContextItem(const _ListContextItemImpl* pItem)
 {
+       if (__pListViewItem->GetContextItem())
+       {
+               __pListViewItem->GetContextItem()->Release();
+       }
+
        if (pItem == null)
        {
                __pListViewItem->SetContextItem(null);
@@ -246,6 +257,9 @@ _ListItemBaseImpl::SetContextItem(const _ListContextItemImpl* pItem)
        if (pContextItem != null)
        {
                __pListViewItem->SetItemWidth(__itemSize.width);
+
+               pContextItem->AddRef();
+
                __pListViewItem->SetContextItem(pContextItem);
                __pListViewItem->SetContextItemEventListener(*this);
 
index 9b980f0..5abc71d 100644 (file)
@@ -110,6 +110,7 @@ _ListViewItem::~_ListViewItem(void)
        if ((pContextItem != null) && (__pContextItemEventListener != null))
        {
                pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener);
+               __pContextItemEventListener = null;
        }
 
        _AccessibilityContainer* pContainer = GetAccessibilityContainer();
@@ -1002,6 +1003,7 @@ _ListViewItem::SetContextItemActivationState(bool activate)
                else
                {
                        pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener);
+                       __pContextItemEventListener = null;
                }
        }
 }
index 80d11f1..ab46837 100644 (file)
@@ -515,6 +515,13 @@ _MessageBox::OnSettingChanged(String& key)
        }
 }
 
+void
+_MessageBox::OnDrawFocus(void)
+{
+       __pMsgboxPresenter->OnDrawFocus();
+       return;
+}
+
 bool
 _MessageBox::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element)
 {
index 90db10e..5170f68 100644 (file)
@@ -352,6 +352,7 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll.");
        __pScrollPanel->SetBounds(__textBounds);
        __pScrollPanel->AttachChild(*__pLabel);
+       __pScrollPanel->SetFocusable(false);
        __pMessageBox->AttachChild(*__pScrollPanel);
 
        __buttonBgBounds = FloatRectangle(transLeftMargin + __bgImageMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin) - (2 * __bgImageMargin), bottomHeight - __bgImageMargin);
@@ -666,21 +667,21 @@ _MessageBoxPresenter::GetButtonString(void)
 
        case MSGBOX_STYLE_OKCANCEL:
                __buttonNum = 2;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]);
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
                break;
 
        case MSGBOX_STYLE_YESNO:
                __buttonNum = 2;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]);
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[0]);
                break;
 
        case MSGBOX_STYLE_YESNOCANCEL:
                __buttonNum = 3;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[2]);
                GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]);
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[2]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
                break;
 
        case MSGBOX_STYLE_ABORTRETRYIGNORE:
@@ -699,8 +700,8 @@ _MessageBoxPresenter::GetButtonString(void)
 
        case MSGBOX_STYLE_RETRYCANCEL:
                __buttonNum = 2;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[0]);
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
                break;
 
        default:
@@ -1071,11 +1072,11 @@ _MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle)
                switch (btnPos)
                {
                case 0:
-                       SetReturnValue(MSGBOX_RESULT_OK);
+                       SetReturnValue(MSGBOX_RESULT_CANCEL);
                        break;
 
                case 1:
-                       SetReturnValue(MSGBOX_RESULT_CANCEL);
+                       SetReturnValue(MSGBOX_RESULT_OK);
                        break;
                }
                break;
@@ -1084,11 +1085,11 @@ _MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle)
                switch (btnPos)
                {
                case 0:
-                       SetReturnValue(MSGBOX_RESULT_YES);
+                       SetReturnValue(MSGBOX_RESULT_NO);
                        break;
 
                case 1:
-                       SetReturnValue(MSGBOX_RESULT_NO);
+                       SetReturnValue(MSGBOX_RESULT_YES);
                        break;
                }
                break;
@@ -1097,7 +1098,7 @@ _MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle)
                switch (btnPos)
                {
                case 0:
-                       SetReturnValue(MSGBOX_RESULT_YES);
+                       SetReturnValue(MSGBOX_RESULT_CANCEL);
                        break;
 
                case 1:
@@ -1105,7 +1106,7 @@ _MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle)
                        break;
 
                case 2:
-                       SetReturnValue(MSGBOX_RESULT_CANCEL);
+                       SetReturnValue(MSGBOX_RESULT_YES);
                        break;
                }
                break;
@@ -1148,11 +1149,11 @@ _MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle)
                switch (btnPos)
                {
                case 0:
-                       SetReturnValue(MSGBOX_RESULT_RETRY);
+                       SetReturnValue(MSGBOX_RESULT_CANCEL);
                        break;
 
                case 1:
-                       SetReturnValue(MSGBOX_RESULT_CANCEL);
+                       SetReturnValue(MSGBOX_RESULT_RETRY);
                        break;
                }
                break;
@@ -1367,6 +1368,23 @@ _MessageBoxPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
        return true;
 }
 
+void
+_MessageBoxPresenter::OnDrawFocus(void)
+{
+       _ControlImpl* pImpl = null;
+       _Button* pButtonCore = null;
+
+       if (__pButtons != null)
+       {
+               pImpl = _ControlImpl::GetInstance(*__pButtons[0]);
+               pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
+               __pButtons[0]->SetFocus();
+               __pMessageBox->SetFocusTraversalControl(pButtonCore, true);
+       }
+
+       return;
+}
+
 bool
 _MessageBoxPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element)
 {
@@ -1633,7 +1651,7 @@ _MessageBoxPresenter::_MessageBoxButtonListener::OnKeyPressed(const Tizen::Ui::C
 
                if (pFocusControl != null)
                {
-                       pTop->SetFocusTraversalControl(pFocusControl);
+                       pTop->SetFocusTraversalControl(pFocusControl, true);
                        _Control* pParentControl =  pFocusControl->GetParent();
 
                        if (pParentControl != null)
index 9afb398..3905327 100644 (file)
@@ -497,6 +497,12 @@ _OptionMenu::OnDetachingFromMainTree(void)
 void
 _OptionMenu::OnActivated(void)
 {
+       _TouchManager* pTouchManager = _TouchManager::GetInstance();
+
+       if (pTouchManager)
+       {
+               pTouchManager->SetTouchCanceled(null);
+       }
        SetTouchCapture(false, false);
 
        return _Window::OnActivated();
index da80ff1..e9c71bc 100755 (executable)
@@ -218,32 +218,18 @@ _OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap*
        // calculate item size
        float bitmapWidth = 0.0f;
 
-       FloatDimension textArea(0.0f, 0.0f);
-       FloatDimension itemSize(0.0f, 0.0f);
-
-       __pFont->GetTextExtent(text, text.GetLength(), textArea);
-       float labelLeftMargin = 0.0f, labelTopMargin = 0.0f;
-       GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
-       GET_SHAPE_CONFIG(LABEL::TOP_MARGIN,  _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
-       textArea.width  += 2.0f * labelLeftMargin;
-       textArea.height += 2.0f * labelTopMargin;
-       itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
-       itemSize.width =  __leftMargin + textArea.width + __rightMargin;
-
        if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
        {
                bitmapWidth = __itemBitmapWidth;
-               itemSize.width =  itemSize.width + bitmapWidth;
        }
 
-       itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+       FloatDimension textArea(0.0f, 0.0f);
+       FloatDimension itemSize(0.0f, 0.0f);
 
-       if (itemSize.width > __itemMaxWidth)
-       {
-               textArea.width -= itemSize.width - __itemMaxWidth;
-               itemSize.width = __itemMaxWidth;
-       }
+       CalculateItemSize(text, itemType, textArea, itemSize);
 
+       float labelLeftMargin = 0.0f;
+       GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
        pItem->SetSize(itemSize);
 
        // add text label
@@ -287,6 +273,35 @@ _OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap*
        return pItem;
 }
 
+void
+_OptionMenuPresenter::CalculateItemSize(const String &text, OptionMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize)
+{
+       float labelLeftMargin = 0.0f;
+       float labelTopMargin = 0.0f;
+       __pFont->GetTextExtent(text, text.GetLength(), textArea);
+
+       GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
+       GET_SHAPE_CONFIG(LABEL::TOP_MARGIN,  _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
+
+       textArea.width  += 2.0f * labelLeftMargin;
+       textArea.height += 2.0f * labelTopMargin;
+       itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
+       itemSize.width =  __leftMargin + textArea.width + __rightMargin;
+
+       if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
+       {
+               itemSize.width =  itemSize.width + __itemBitmapWidth;
+       }
+
+       itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+
+       if (itemSize.width > __itemMaxWidth)
+       {
+               textArea.width -= itemSize.width - __itemMaxWidth;
+               itemSize.width = __itemMaxWidth;
+       }
+}
+
 result
 _OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
 {
@@ -423,49 +438,29 @@ _OptionMenuPresenter::GetSubItemActionIdAt(int mainIndex, int subIndex) const
        return pItem->GetActionId();
 }
 
-FloatDimension
-_OptionMenuPresenter::GetMainItemMaximumWidth(void)
+void
+_OptionMenuPresenter::CalculateItemMaximumWidth(void)
 {
-       float labelLeftMargin = 0.0f;
        FloatDimension itemSize(0.0f, 0.0f);
-       FloatDimension maxItemTextArea(0.0f, 0.0f);
-
-       GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
+       FloatDimension textArea(0.0f, 0.0f);
+       float maxItemWidth = 0.0f;
 
        for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
        {
-               FloatDimension currentItemTextArea(0.0f, 0.0f);
                _OptionMenuItem* pItem = null;
 
                pItem = __pModel->GetItem(i);
-               SysTryReturn(NID_UI_CTRL, pItem != null, FloatDimension(0.0f, 0.0f), E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
-
-               String itemText = pItem->GetText();
-
-               __pFont->GetTextExtent(itemText, itemText.GetLength(), currentItemTextArea);
+               SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
 
-               if (currentItemTextArea.width > maxItemTextArea.width)
-               {
-                       maxItemTextArea = currentItemTextArea;
-               }
+               CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
 
-               if (pItem->GetType() == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
+               if (maxItemWidth < itemSize.width)
                {
-                       itemSize.width =  itemSize.width + __itemBitmapWidth;
+                       maxItemWidth = itemSize.width;
                }
        }
 
-       maxItemTextArea.width  += 2.0f * labelLeftMargin;
-       itemSize.width +=  __leftMargin + maxItemTextArea.width + __rightMargin;
-
-       itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
-
-       if (itemSize.width > __itemMaxWidth)
-       {
-               itemSize.width = __itemMaxWidth;
-       }
-
-       return itemSize;
+       __itemWidth = maxItemWidth;
 }
 
 result
@@ -484,10 +479,7 @@ _OptionMenuPresenter::SetItem(int index, const String& text, int actionId, const
                return r;
        }
 
-       FloatDimension maxItemTextArea = GetMainItemMaximumWidth();
-       pItem->SetSize(maxItemTextArea);
-
-       __itemWidth = maxItemTextArea.width;
+       CalculateItemMaximumWidth();
 
        return r;
 }
@@ -504,9 +496,7 @@ _OptionMenuPresenter::DeleteItem(int index)
        r = __pModel->RemoveItem(index);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
 
-       FloatDimension maxItemTextArea = GetMainItemMaximumWidth();
-
-       __itemWidth = maxItemTextArea.width;
+       CalculateItemMaximumWidth();
 
        return r;
 }
old mode 100644 (file)
new mode 100755 (executable)
index e4a7f65..40dad82
@@ -574,7 +574,7 @@ _OverlayRegionMediaCapability::Construct(void)
        long long length = attributes.GetFileSize();
        SysTryReturnResult(NID_UI_CTRL, length > 0, E_SYSTEM, "The size of file(%s) is zero.", fileName.GetPointer());
 
-       std::unique_ptr<char> pXmlBuffer(new (std::nothrow) char[length]);
+       std::unique_ptr<char[]> pXmlBuffer(new (std::nothrow) char[length]);
        SysTryReturnResult(NID_UI_CTRL, pXmlBuffer != null, E_OUT_OF_MEMORY, "The Buffer of Xml is null");
 
        File fileObj;
index c64b61c..c6d3c6b 100644 (file)
@@ -705,7 +705,12 @@ _Popup::OnBoundsChanged(void)
                        _pTitleTextAccessibilityElement->SetBounds(__pPopupPresenter->GetTitleTextBounds());
                }
        }
+}
 
+void
+_Popup::OnDrawFocus(void)
+{
+       return;
 }
 
 bool
@@ -813,6 +818,10 @@ _Popup::OnChangeLayout(_ControlOrientation orientation)
                                {
                                        __pIndicator->SetIndicatorShowState(true);
                                }
+                               else
+                               {
+                                       __pIndicator->SetIndicatorShowState(false);
+                               }
                        }
                        __pIndicator->OnChangeLayout(orientation);
                }
index 09d05ea..a5fcc64 100644 (file)
@@ -1076,6 +1076,23 @@ _ProgressPopup::OnSettingChanged(String& key)
 }
 
 void
+_ProgressPopup::OnDrawFocus(void)
+{
+       _ControlImpl* pImpl = null;
+       _Button* pButtonCore = null;
+
+       if (__pButton != null)
+       {
+               pImpl = _ControlImpl::GetInstance(*__pButton);
+               pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
+               __pButton->SetFocus();
+               SetFocusTraversalControl(pButtonCore, true);
+       }
+
+       return;
+}
+
+void
 _ProgressPopup::SetButtonText(void)
 {
        String buttonText;
index 77ba40b..58c6af7 100644 (file)
@@ -329,6 +329,7 @@ _ProgressPopupPresenter::SetTextObject(void)
                SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll.");
 
                __pScrollPanel->SetBounds(__textBounds);
+               __pScrollPanel->SetFocusable(false);
                __pScrollPanel->AttachChild(*__pLabel);
                __pProgressPopup->AttachChild(*__pScrollPanel);
        }
index c5135a9..ee35aef 100644 (file)
@@ -227,7 +227,7 @@ CATCH:
 }
 
 result
-_ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter)
+_ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle)
 {
        ClearLastResult();
 
@@ -257,7 +257,10 @@ _ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter)
        r = GetLastResult();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
-       AcquireHandle();
+       if (acquireHandle)
+       {
+               AcquireHandle();
+       }
 
        r = AddGestureDetector(*__pGestureFlick);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
index 105d1dc..bfc6b9f 100644 (file)
@@ -162,7 +162,7 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa
        r = pPresenter->Construct(this);
        SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       r = _ScrollPanel::Initialize(*pPresenter);
+       r = _ScrollPanel::Initialize(*pPresenter, false);
        SetTableViewPresenter(pPresenter);
        SetScrollAreaAutoResizingEnabled(false);
 
index 3af8ab4..9900dcb 100644 (file)
@@ -4782,6 +4782,11 @@ _TableViewItem::OnAccessibilityValueDecreased(const _AccessibilityContainer& con
 bool
 _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (!IsFocusModeStateEnabled())
+       {
+               return false;
+       }
+
        _KeyCode keyCode = keyInfo.GetKeyCode();
        IListT<_Control*>* pFocusList = GetFocusListN();
        SysTryReturn(NID_UI_CTRL, pFocusList != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult()));
@@ -5015,6 +5020,11 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 bool
 _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (!IsFocusModeStateEnabled())
+       {
+               return false;
+       }
+
        _KeyCode keyCode = keyInfo.GetKeyCode();
 
        if(keyCode == _KEY_ENTER)
index f504c42..cab5d28 100644 (file)
@@ -1830,7 +1830,7 @@ _TableViewPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchI
                return response;
        }
 
-       if (IsScrollAnimationRunning())
+       if (IsScrollAnimationRunning() && (GetScrollPosition() == GetScrollPositionInternal()))
        {
                pItem->SetTouchPressOnScroll(true);
                return response;
@@ -5312,6 +5312,11 @@ _TableViewPresenter::OnOcurredOverflowItems(const int currentCashSize, const int
 bool
 _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (!__pTableView->IsFocusModeStateEnabled())
+       {
+               return false;
+       }
+
        _KeyCode keyCode = keyInfo.GetKeyCode();
        _Control* pFocusedControl = null;
        _Window* pTop = source.GetRootWindow();
@@ -5363,6 +5368,19 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                                        }
 
                                        pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+                                       if (!pItem->GetVisibleState())
+                                       {
+                                               TableViewItemTag firstItemPos = {-1, -1};
+                                               GetFirstItem(firstItemPos);
+                                               if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex)
+                                               {
+                                                       return false;
+                                               }
+
+                                               continue;
+                                       }
+
                                        if (pItem->GetBoundsF().y < GetScrollPosition())
                                        {
                                                ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
@@ -5411,6 +5429,19 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                                        }
 
                                        pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+                                       if (!pItem->GetVisibleState())
+                                       {
+                                               TableViewItemTag lastItemPos = {-1, -1};
+                                               GetLastItem(lastItemPos);
+
+                                               if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
+                                               {
+                                                       return false;
+                                               }
+
+                                               continue;
+                                       }
                                        if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
                                        {
                                                ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
@@ -5441,6 +5472,11 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
 bool
 _TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (!__pTableView->IsFocusModeStateEnabled())
+       {
+               return false;
+       }
+
         _KeyCode keyCode = keyInfo.GetKeyCode();
 
        if (keyCode == _KEY_UP || keyCode == _KEY_DOWN)
@@ -5454,6 +5490,11 @@ _TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyIn
 void
 _TableViewPresenter::OnDrawFocus(void)
 {
+       if (!__pTableView->IsFocusModeStateEnabled())
+       {
+               return;
+       }
+
         _Control* pFocusedControl = null;
        _Window* pTop = __pTableView->GetRootWindow();
        if (pTop)
index 15de9e7..43e6623 100644 (file)
@@ -30,6 +30,7 @@
 #include "FUi_CoordinateSystemUtils.h"
 #include "FUi_AccessibilityContainer.h"
 #include "FUi_AccessibilityElement.h"
+#include "FUiAnim_VisualElementImpl.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
@@ -951,7 +952,7 @@ _TokenEditPresenter::DrawToken(int count)
                pTokenElement->SetAnimationProvider(null);
                if (pToken->isImplicitAnimation)
                {
-                       VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenElement, true);
+                       VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenElement);
                        pTokenElement->AddAnimation(*pAnimation);
                        delete pAnimation;
                        pToken->isImplicitAnimation = false;
@@ -1775,7 +1776,7 @@ _TokenEditPresenter::GetLineSpacingF(void) const
 }
 
 VisualElementAnimation*
-_TokenEditPresenter::CreateAnimationN(VisualElement& source, bool create)
+_TokenEditPresenter::CreateAnimationN(VisualElement& source)
 {
        VisualElementAnimation* pAnimation = null;
        VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup();
@@ -1794,16 +1795,9 @@ _TokenEditPresenter::CreateAnimationN(VisualElement& source, bool create)
                SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
                pOpacityAnimation->SetPropertyName("opacity");
-               if (!create)
-               {
-                       pOpacityAnimation->SetStartValue(Variant(1.0f));
-                       pOpacityAnimation->SetEndValue(Variant(0.0f));
-               }
-               else
-               {
-                       pOpacityAnimation->SetStartValue(Variant(0.0f));
-                       pOpacityAnimation->SetEndValue(Variant(1.0f));
-               }
+
+               pOpacityAnimation->SetStartValue(Variant(0.0f));
+               pOpacityAnimation->SetEndValue(Variant(1.0f));
 
                pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY);
                pOpacityAnimation->SetTimingFunction(__pTimingFunction);
@@ -1820,17 +1814,8 @@ _TokenEditPresenter::CreateAnimationN(VisualElement& source, bool create)
                startValue.width = startValue.width * 0.9;
                startValue.height = startValue.height * 0.9;
 
-               if (!create)
-               {
-                       pBoundsAnimation->SetStartValue(Variant(source.GetBounds()));
-                       pBoundsAnimation->SetEndValue(Variant(startValue));
-                       pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
-               }
-               else
-               {
-                       pBoundsAnimation->SetStartValue(Variant(startValue));
-                       pBoundsAnimation->SetEndValue(Variant(source.GetBounds()));
-               }
+               pBoundsAnimation->SetStartValue(Variant(startValue));
+               pBoundsAnimation->SetEndValue(Variant(source.GetBounds()));
 
                pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS);
                pBoundsAnimation->SetTimingFunction(__pTimingFunction);
@@ -3304,6 +3289,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
 
                                _Token* pToken = null;
                                _VisualElement* pTokenVisualElement = null;
+
                                if (__animatingIndex == (GetTokenCount() - 1))
                                {
                                        pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
@@ -3311,9 +3297,10 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                        {
                                                pTokenVisualElement = pToken->GetVisualElement();
                                                SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
-                                               pTokenVisualElement->RemoveAnimation(L"TokenAnimation");
+                                               pTokenVisualElement->RemoveAllAnimations();
                                        }
                                }
+
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
                                if (pToken)
                                {
@@ -3336,9 +3323,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                if (pTokenVisualElement && __animatingIndex >= 0)
                                {
                                        __isAnimationInProgress = true;
-                                       VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenVisualElement, false);
-                                       pTokenVisualElement->AddAnimation(L"TokenAnimation", *pAnimation);
-                                       delete pAnimation;
+                                       PerformRemoveTokenAnimation(*pTokenVisualElement);
                                }
                        }
 
@@ -3695,6 +3680,31 @@ _TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation
 }
 
 void
+_TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue)
+{
+       VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation));
+       VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance());
+
+       if (pPresentation && pAnimation)
+       {
+               float diffX = 0.0f;
+               float diffY = 0.0f;
+
+               diffX = pPresentation->GetBounds().x;
+               diffY = pPresentation->GetBounds().y;
+
+               Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height));
+               _VisualElementImpl::GetInstance(*pPresentation)->SetProperty(VePropBounds, newBounds);
+       }
+       else
+       {
+               SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get presentation instance of visual element.");
+       }
+
+       target.ReleasePresentationInstance();
+}
+
+void
 _TokenEditPresenter::OnTimerExpired(Timer& timer)
 {
        Timer* onTimer = &timer;
@@ -4623,4 +4633,51 @@ _TokenEditPresenter::PrepareFocusUiMode(void)
        return;
 }
 
+void
+_TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source)
+{
+       if (__pTimingFunction == null)
+       {
+               __pTimingFunction = new (std::nothrow) SineTimingFunction();
+               SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       }
+
+       AnimationTransaction::Begin();
+
+       VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+       SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+       pOpacityAnimation->SetPropertyName("opacity");
+       pOpacityAnimation->SetStartValue(Variant(1.0f));
+       pOpacityAnimation->SetEndValue(Variant(0.0f));
+
+       pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY);
+       pOpacityAnimation->SetTimingFunction(__pTimingFunction);
+
+       source.AddAnimation("OpacityAnimation", *pOpacityAnimation);
+       delete pOpacityAnimation;
+
+       VisualElementValueAnimation* pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation();               //deletion will happen in catch/ in Destroy animation
+       SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+       pBoundsAnimation->SetTimingFunction(__pTimingFunction);
+       FloatRectangle startValue = source.GetBounds();
+       startValue.x = startValue.x + startValue.width * 0.05;
+       startValue.y = startValue.y + startValue.height * 0.05;
+       startValue.width = startValue.width * 0.9;
+       startValue.height = startValue.height * 0.9;
+
+       pBoundsAnimation->SetStartValue(Variant(source.GetBounds()));
+       pBoundsAnimation->SetEndValue(Variant(startValue));
+       pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
+       pBoundsAnimation->SetVisualElementAnimationTickEventListener(this);
+       pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS);
+       source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation);
+       delete pBoundsAnimation;
+
+       AnimationTransaction::Commit();
+
+       return;
+}
+
 }}} //Tizen::Ui::Controls
index bfb7597..2227b11 100644 (file)
@@ -2800,6 +2800,7 @@ _Toolbar::SetTitleTextColor(const Color& color)
        return E_SUCCESS;
 }
 
+#if 1
 result
 _Toolbar::SetTransparent(bool transparent)
 {
@@ -2949,6 +2950,207 @@ _Toolbar::SetTransparent(bool transparent)
 
        return E_SUCCESS;
 }
+#endif
+
+#if 0
+result
+_Toolbar::SetTransparent(bool transparent)
+{
+       if (__style == TOOLBAR_SOFTKEY)
+       {
+               return E_SUCCESS;
+       }
+
+       __transparent = transparent;
+
+       InitToolbarColor();
+
+       Bitmap* pMagentaBackgroundBitmap = null;
+
+       if (__isUserBackgroundBitmap == false)
+       {
+               if (__pToolbarBackgroundBitmap)
+               {
+                       delete __pToolbarBackgroundBitmap;
+                       __pToolbarBackgroundBitmap = null;
+               }
+
+               if (__pToolbarBackgroundEffectBitmap)
+               {
+                       delete __pToolbarBackgroundEffectBitmap;
+                       __pToolbarBackgroundEffectBitmap = null;
+               }
+
+               if (__transparent == true)
+               {
+                       if (__header == true)
+                       {
+                               GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+                               bool customTheme = IS_CUSTOM_BITMAP(HEADER::TRANSLUCENT_BG_NORMAL);
+                               if (customTheme == false)
+                               {
+                                       GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+                               }
+                       }
+                       else
+                       {
+                               GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+                               bool customTheme = IS_CUSTOM_BITMAP(FOOTER::TRANSLUCENT_BG_NORMAL);
+                               if (customTheme == false)
+                               {
+                                       GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+                               }
+                       }
+               }
+               else
+               {
+                       if (__header == true)
+                       {
+                               GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+                               bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL);
+                               if (customTheme == false)
+                               {
+                                       GET_BITMAP_CONFIG_N(HEADER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+                               }
+                       }
+                       else
+                       {
+                               GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+                               bool customTheme = IS_CUSTOM_BITMAP(FOOTER::BG_NORMAL);
+                               if (customTheme == false)
+                               {
+                                       GET_BITMAP_CONFIG_N(FOOTER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+                               }
+                       }
+               }
+
+               if (__transparent == true)
+               {
+                       __isUserBackgroundBitmap = true;
+
+                       Color tempColor;
+
+                       if (__header == true)
+                       {
+                               GET_COLOR_CONFIG(HEADER::TRANSLUCENT_BG_NORMAL, tempColor);
+                       }
+                       else
+                       {
+                               GET_COLOR_CONFIG(FOOTER::TRANSLUCENT_BG_NORMAL, tempColor);
+                       }
+
+                       if (pMagentaBackgroundBitmap)
+                       {
+                               __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap),
+                                               Color::GetColor(COLOR_ID_MAGENTA), tempColor);
+
+                               if (__pToolbarBackgroundBitmap)
+                               {
+                                       __pToolbarBackgroundBitmap->SetAlphaConstant(0x7F);
+                               }
+                       }
+
+                       SetTitleTextColor(__transTitleTextColor);
+                       SetDescriptionTextColor(__transDescriptionTextColor);
+
+                       for (int i = 0; i < __itemCount ; i ++)
+                       {
+                               if (__pItems.at(i) != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+                               }
+                       }
+
+                       for (int i = 0; i < BUTTON_MAX; i++)
+                       {
+                               if (__pButtonItems[i] != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+                               }
+                       }
+               }
+               else // not transparent
+               {
+                       __isUserBackgroundBitmap = false;
+
+                       __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap),
+                                       Color::GetColor(COLOR_ID_MAGENTA), GetColor());
+
+                       SetTitleTextColor(__titleTextColor);
+                       SetDescriptionTextColor(__descriptionTextColor);
+
+                       for (int i = 0; i < __itemCount ; i ++)
+                       {
+                               if (__pItems.at(i) != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+                               }
+                       }
+
+                       for (int i = 0; i < BUTTON_MAX; i++)
+                       {
+                               if (__pButtonItems[i] != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+                               }
+                       }
+               }
+       }
+       else // __isUserBackgroundBitmap == true
+       {
+               if (__transparent == true)
+               {
+                       SetTitleTextColor(__transTitleTextColor);
+                       SetDescriptionTextColor(__transDescriptionTextColor);
+
+                       for (int i = 0; i < __itemCount ; i ++)
+                       {
+                               if (__pItems.at(i) != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+                               }
+                       }
+
+                       for (int i = 0; i < BUTTON_MAX; i++)
+                       {
+                               if (__pButtonItems[i] != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+                               }
+                       }
+               }
+               else // not transparent
+               {
+                       SetTitleTextColor(__titleTextColor);
+                       SetDescriptionTextColor(__descriptionTextColor);
+
+                       for (int i = 0; i < __itemCount ; i ++)
+                       {
+                               if (__pItems.at(i) != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+                               }
+                       }
+
+                       for (int i = 0; i < BUTTON_MAX; i++)
+                       {
+                               if (__pButtonItems[i] != null)
+                               {
+                                       ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+                               }
+                       }
+               }
+       }
+
+       delete pMagentaBackgroundBitmap;
+
+       return E_SUCCESS;
+}
+#endif
 
 result
 _Toolbar::SetWaitingAnimationPosition(ToolbarAnimationPosition animationPos, float x, float y)
@@ -3240,7 +3442,7 @@ _Toolbar::OnDrawFocus(void)
                {
                        if (__highlightedItemIndex < __itemCount)
                        {
-                               if (__pItems.at(__highlightedItemIndex))
+                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                {
                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                        {
@@ -3379,7 +3581,7 @@ _Toolbar::OnFocusModeStateChanged(void)
        {
                if (__highlightedItemIndex < __itemCount)
                {
-                       if (__pItems.at(__highlightedItemIndex))
+                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                        {
                                if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                {
@@ -3555,7 +3757,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source)
        }
        else // itemCount != 0
        {
-               if (__pItems.at(__highlightedItemIndex))
+               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                {
                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                        {
@@ -3667,12 +3869,15 @@ _Toolbar::OnFooterFocusGained(const _Control& source)
                {
                        __highlightedItemIndex = GetSelectedItemIndex();
 
-                       if (__pItems.at(__highlightedItemIndex))
+                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                        {
-                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                               {
+                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                               __highlighted = true;
+                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                       __highlighted = true;
+                               }
                        }
                }
                else // not segmented
@@ -3689,7 +3894,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source)
                                }
                                else
                                {
-                                       if (__pItems.at(__highlightedItemIndex))
+                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                        {
                                                if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                {
@@ -3733,7 +3938,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source)
                        }
                        else
                        {
-                               if (__pItems.at(__highlightedItemIndex))
+                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                {
                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                        {
@@ -3833,7 +4038,7 @@ _Toolbar::OnFocusLost(const _Control& source)
        {
                if (__highlightedItemIndex < __itemCount)
                {
-                       if(__pItems.at(__highlightedItemIndex))
+                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                        {
                                if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                {
@@ -3921,25 +4126,31 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                        {
                                if (__highlightedItemIndex < (__itemCount - 1)) // 0,1
                                {
-                                       if (__pItems.at(__highlightedItemIndex) != null)
+                                       if (__highlightedItemIndex == selectedItemIndex)
                                        {
-                                               if (__highlightedItemIndex == selectedItemIndex)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
                                                                __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
                                                        }
                                                }
-                                               else
+                                       }
+                                       else
+                                       {
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
                                                                __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
                                                        }
                                                }
+                                       }
 
-                                               __highlightedItemIndex++;
+                                       __highlightedItemIndex++;
 
+                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
+                                       {
                                                if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                {
                                                        __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
@@ -3967,16 +4178,19 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                        {
                                                if (__highlightedItemIndex == __itemCount - 1)
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex) != null)
+                                                       if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__highlightedItemIndex == selectedItemIndex)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
                                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                                        {
                                                                                __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
                                                                        }
                                                                }
-                                                               else
+                                                       }
+                                                       else
+                                                       {
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
                                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                                        {
@@ -4079,7 +4293,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex))
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
@@ -4201,63 +4415,81 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                                        __highlightedItemIndex = 0;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex < __itemCount - 1)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex++;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex == __itemCount -1)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
@@ -4290,47 +4522,59 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                                        __highlightedItemIndex = 0;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex < __itemCount - 1)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex++;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -4343,47 +4587,62 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex++;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex == __itemCount -1)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
@@ -4411,39 +4670,48 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex++;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
 
-                                                               if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
-                                                               {
-                                                                       if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+                                                                       if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
                                                                        {
-                                                                               __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
+                                                                               if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+                                                                               {
+                                                                                       __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
+                                                                               }
                                                                        }
                                                                }
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -4455,7 +4723,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex))
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
@@ -4620,39 +4888,48 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                }
                                        }
 
-                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                        {
-                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                               {
+                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                               __highlighted = true;
-                                       }
-                                       else
-                                       {
-                                               OnKeyReleased(source, keyInfo);
+                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                       __highlighted = true;
+                                               }
+                                               else
+                                               {
+                                                       OnKeyReleased(source, keyInfo);
+                                               }
                                        }
                                }
                                else if (__highlightedItemIndex > 0)
                                {
-                                       if (__pItems.at(__highlightedItemIndex) != null)
+                                       if (__highlightedItemIndex == selectedItemIndex)
                                        {
-                                               if (__highlightedItemIndex == selectedItemIndex)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
                                                                __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
                                                        }
                                                }
-                                               else
+                                       }
+                                       else
+                                       {
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
                                                                __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
                                                        }
                                                }
+                                       }
 
-                                               __highlightedItemIndex--;
+                                       __highlightedItemIndex--;
 
+                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
+                                       {
                                                if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                {
                                                        __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
@@ -4681,7 +4958,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex))
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
@@ -4795,16 +5072,22 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
@@ -4829,31 +5112,40 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex--;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex == __itemCount + 1)
@@ -4868,16 +5160,19 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                                        __highlightedItemIndex = __itemCount - 1;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -4887,16 +5182,22 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
@@ -4921,31 +5222,40 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex--;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -4962,31 +5272,40 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex--;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                                else if (__highlightedItemIndex == __itemCount)
@@ -5001,16 +5320,19 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                                        __highlightedItemIndex--;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -5024,39 +5346,48 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                {
                                                        if (__highlightedItemIndex == selectedItemIndex)
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+                                                                       }
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                                {
-                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                                       {
+                                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       }
                                                                }
                                                        }
 
                                                        __highlightedItemIndex--;
 
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
 
-                                                               if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex)
-                                                               {
-                                                                       if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+                                                                       if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex)
                                                                        {
-                                                                               __pToolbarPresenter->SetItemFit(__highlightedItemIndex);
+                                                                               if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+                                                                               {
+                                                                                       __pToolbarPresenter->SetItemFit(__highlightedItemIndex);
+                                                                               }
                                                                        }
                                                                }
-                                                       }
-                                                       else
-                                                       {
-                                                               OnKeyReleased(source, keyInfo);
+                                                               else
+                                                               {
+                                                                       OnKeyReleased(source, keyInfo);
+                                                               }
                                                        }
                                                }
                                        }
@@ -5068,7 +5399,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex))
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
                                                        if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
                                                        {
@@ -5192,19 +5523,28 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
                                                                || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               }
                                                        }
                                                }
                                                else
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       __pItems.at(__highlightedItemIndex)->Invalidate();
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
                                                        }
                                                }
                                        }
@@ -5248,19 +5588,28 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
                                                                || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               }
                                                        }
                                                }
                                                else
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       __pItems.at(__highlightedItemIndex)->Invalidate();
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
                                                        }
                                                }
                                        }
@@ -5291,19 +5640,28 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
                                                                || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               }
                                                        }
                                                }
                                                else
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       __pItems.at(__highlightedItemIndex)->Invalidate();
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
                                                        }
                                                }
                                        }
@@ -5331,19 +5689,28 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
                                                if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
                                                                || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       SetItemHighlighted(__highlightedItemIndex, true, false);
+                                                               }
                                                        }
                                                }
                                                else
                                                {
-                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                        {
-                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+                                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                               {
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                                                                       __pItems.at(__highlightedItemIndex)->Invalidate();
 
-                                                               __lastHighlightedItemIndex = __highlightedItemIndex;
-                                                               __highlighted = true;
+                                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+                                                                       __lastHighlightedItemIndex = __highlightedItemIndex;
+                                                                       __highlighted = true;
+                                                               }
                                                        }
                                                }
                                        }
@@ -5548,9 +5915,12 @@ _Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                                {
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
-                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       {
+                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       }
                                                }
                                        }
                                        else if (__highlightedItemIndex == __itemCount)
@@ -5578,9 +5948,12 @@ _Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                                {
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
-                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       {
+                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       }
                                                }
                                        }
                                        else if (__highlightedItemIndex == __itemCount)
@@ -5601,9 +5974,12 @@ _Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                                {
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
-                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       {
+                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       }
                                                }
                                        }
                                        else if (__highlightedItemIndex == __itemCount)
@@ -5621,9 +5997,12 @@ _Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                                {
                                        if (__highlightedItemIndex < __itemCount)
                                        {
-                                               if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                               if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
                                                {
-                                                       __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+                                                       {
+                                                               __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                                                       }
                                                }
                                        }
                                }
@@ -7381,7 +7760,7 @@ _Toolbar::RearrangeItems(void)
                                        }
                                        else
                                        {
-                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
                                                                headerRightButtonWidth, headerButtonItemHeight));
                                                __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
                                                                headerLeftButtonWidth, headerButtonItemHeight));
@@ -7430,7 +7809,7 @@ _Toolbar::RearrangeItems(void)
                                        }
                                        else
                                        {
-                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
                                                                headerRightButtonWidth, headerButtonItemHeight));
                                                __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
                                                                headerLeftButtonWidth, headerButtonItemHeight));
@@ -7476,7 +7855,7 @@ _Toolbar::RearrangeItems(void)
                                }
                                else
                                {
-                                       __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+                                       __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
                                                        headerRightButtonWidth, headerButtonItemHeight));
 
                                        if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
@@ -7518,7 +7897,7 @@ _Toolbar::RearrangeItems(void)
                        }
                        else
                        {
-                               __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth , vmargin,
+                               __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth + 1, vmargin,
                                                headerLeftButtonWidth, headerButtonItemHeight));
 
                                if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
@@ -7794,6 +8173,8 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
                if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
                {
                        blockWidth[0] = blockWidth[1] = (GetSizeF().width - dividerWidth ) / 2;
+
+                       blockWidth[1] += 1;
                }
                else
                {
@@ -7835,7 +8216,7 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
 
                        __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
                        __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
-                       __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],vmargin, blockWidth[2], segmentedItemHeight));
+                       __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],vmargin, blockWidth[2] + 2, segmentedItemHeight));
                }
                else
                {
@@ -7883,7 +8264,7 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
                        __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + dividerWidth * 2,
                                        vmargin, blockWidth[2], segmentedItemHeight));
                        __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                                       vmargin, GetSizeF().width - (blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3), segmentedItemHeight));
+                                       vmargin, blockWidth[3] + 1, segmentedItemHeight));
                }
                else
                {
@@ -8066,7 +8447,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
                        }
                }
                else
@@ -8079,7 +8460,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
                        }
                }
 
@@ -8149,7 +8530,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                                __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
                                __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
                                __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
+                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
                        }
                }
                else
@@ -8166,7 +8547,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
                                __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
                                __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
+                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
                        }
                }
 
@@ -8198,7 +8579,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
                                (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
                __pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3], segmentedItemHeight));
+                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3] + 1, segmentedItemHeight));
 
                for (int i = 0; i < __itemCount ; i++)
                {
@@ -8275,7 +8656,7 @@ _Toolbar::RearrangeTabItmes(void)
                itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth) / 2;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1] + 1, segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
 
@@ -8294,7 +8675,7 @@ _Toolbar::RearrangeTabItmes(void)
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
                __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2], segmentedItemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2] + 2, segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
 
@@ -8316,7 +8697,7 @@ _Toolbar::RearrangeTabItmes(void)
                __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2,
                                vmargin, itemWidth[2], segmentedItemHeight));
                __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2] + dividerWidth * 3,
-                               vmargin, itemWidth[3], segmentedItemHeight));
+                               vmargin, itemWidth[3] + 1, segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
@@ -8513,7 +8894,7 @@ _Toolbar::RearrangeButtonItems(void)
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
                        }
                }
                else
@@ -8526,7 +8907,7 @@ _Toolbar::RearrangeButtonItems(void)
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
                        }
                }
 
@@ -8596,7 +8977,7 @@ _Toolbar::RearrangeButtonItems(void)
                                __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
                                __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
                                __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                                       (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
+                                                       (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
                        }
                }
                else
@@ -8613,7 +8994,7 @@ _Toolbar::RearrangeButtonItems(void)
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
                                __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
                                __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
+                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
                        }
                }
 
@@ -8644,7 +9025,7 @@ _Toolbar::RearrangeButtonItems(void)
                __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
                                (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
                __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                               (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
+                               (GetSizeF().height - itemHeight) / 2, blockWidth[3] + 1, itemHeight));
 
                for (int i = 0; i < __itemCount; i++)
                {
@@ -8675,7 +9056,7 @@ _Toolbar::RearrangeButtonItems(void)
                __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
                                (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
                __pItems.at(4)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3] + dividerWidth * 4,
-                               (GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight));
+                               (GetSizeF().height - itemHeight) / 2, blockWidth[4] + 1, itemHeight));
 
                for (int i = 0; i < __itemCount; i++)
                {
index 53f5529..f559788 100644 (file)
@@ -368,7 +368,35 @@ _ToolbarPresenter::DrawDivider(void)
        pCanvas->SetBackgroundColor(backgroundColor);
        pCanvas->Clear();
 
-       if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+       if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED)
+       {
+               if (__pToolbar->GetButton(RIGHT_BUTTON))
+               {
+                       if (__pToolbar->GetButton(LEFT_BUTTON))
+                       {
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap
+                                               - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                       }
+                       else
+                       {
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                       }
+               }
+               else
+               {
+                       if (__pToolbar->GetButton(LEFT_BUTTON))
+                       {
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                       }
+               }
+       }
+       else if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
        {
                if (__pToolbar->GetButton(RIGHT_BUTTON))
                {
@@ -401,13 +429,13 @@ _ToolbarPresenter::DrawDivider(void)
                if (__pToolbar->GetButton(RIGHT_BUTTON))
                {
                        DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
-                                       dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+                                       (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                }
 
                if (__pToolbar->GetButton(LEFT_BUTTON))
                {
                        DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width,
-                                       dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+                                       (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                }
        }
 
@@ -2049,8 +2077,10 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
 
        float textDimWidth = 0.0f;
        float textDimHeight = 0.0f;
+       float leftMargin = 0.0f;
 
        GET_SHAPE_CONFIG(HEADER::TAB_TEXT_DIM_WIDTH, __pToolbar->GetOrientation(), textDimWidth);
+       GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, __pToolbar->GetOrientation(), leftMargin);
 
        ToolbarStyle style = __pToolbar->GetStyle();
 
@@ -2062,7 +2092,7 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
        {
                if (__pToolbar->GetDescriptionText() != L"")
                {
-                       textDimHeight = __titleRect.height;
+                       textDimHeight = __titleRect.height + __titleRect.y;
                }
                else
                {
@@ -2070,23 +2100,31 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
                }
        }
 
-       Color titleTextDimColor;
-       GET_COLOR_CONFIG(HEADER::TITLE_TEXT_DIM_NORMAL, titleTextDimColor);
+       //Color titleTextDimColor;
+       //GET_COLOR_CONFIG(HEADER::TITLE_TEXT_DIM_NORMAL, titleTextDimColor);
 
        Bitmap* pTitleTextDimLeftBitmap = null;
        GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimLeftBitmap);
 
        Bitmap* pReColorTitleTextDimLeftBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimLeftBitmap,
-                       Color::GetColor(COLOR_ID_MAGENTA), titleTextDimColor);
+                       Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor());
 
        if (pReColorTitleTextDimLeftBitmap)
        {
                Canvas* pCanvas = __pToolbar->GetCanvasN();
                FloatRectangle bounds = FloatRectangle(0.0f, 0.0f, textDimWidth, textDimHeight);
 
+               if (__pToolbar->GetTitleIcon() != null)
+               {
+                       bounds.x += __titleRect.x;
+               }
+
                if (pCanvas == null)
                {
                        SysLog(NID_UI_CTRL, "Cannot get a canvas.");
+
+                       delete pReColorTitleTextDimLeftBitmap;
+
                        return;
                }
 
@@ -2100,7 +2138,6 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
                                        FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimLeftBitmap->GetWidthF(), pReColorTitleTextDimLeftBitmap->GetHeightF()));
                }
 
-               delete pTitleTextDimLeftBitmap;
                delete pReColorTitleTextDimLeftBitmap;
                delete pCanvas;
        }
@@ -2109,16 +2146,23 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
        GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimRightBitmap);
 
        Bitmap* pReColorTitleTextDimRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimRightBitmap,
-                       Color::GetColor(COLOR_ID_MAGENTA), titleTextDimColor);
+                       Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor());
 
        if (pReColorTitleTextDimRightBitmap)
        {
                Canvas* pCanvas = __pToolbar->GetCanvasN();
                FloatRectangle bounds = FloatRectangle(__titleRect.width, 0.0f, textDimWidth, textDimHeight);
 
+               if (__pToolbar->GetTitleIcon() != null)
+               {
+                       bounds.x += (__titleRect.x - leftMargin);
+               }
+
                if (pCanvas == null)
                {
                        SysLog(NID_UI_CTRL, "Cannot get a canvas.");
+
+                       delete pReColorTitleTextDimRightBitmap;
                        return;
                }
 
@@ -2132,7 +2176,6 @@ _ToolbarPresenter::DrawTitleTextDimBitmap(void)
                                        FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimRightBitmap->GetWidthF(), pReColorTitleTextDimRightBitmap->GetHeightF()));
                }
 
-               delete pTitleTextDimRightBitmap;
                delete pReColorTitleTextDimRightBitmap;
                delete pCanvas;
        }
index 701a8a7..76a4552 100644 (file)
@@ -35,6 +35,8 @@
 #include <FGrpFloatRectangle.h>
 #include "FUiAnim_NativeLayer.h"
 
+//#define USE_WORKAROUND
+
 namespace Tizen { namespace Ui { namespace Animations
 {
 
@@ -57,6 +59,18 @@ public:
        void SetOpacity(float opacity);
        float GetOpacity(void);
 
+       result SetRotation(int angle);
+       result SetInternalBounds(void);
+
+       void SetOwner(_EflLayer* pOwner);
+
+       int GetRotation(void);
+
+       _RootVisualElement* GetRootVisualElement(void) const
+       {
+               return _pRootVisualElement;
+       }
+
        Evas* GetEvas(void) const
        {
                return _pEvas;
@@ -72,16 +86,6 @@ public:
                return _pWindow;
        }
 
-       void SetEvasRenderNeeded(void)
-       {
-               _needEvasRender = 1;
-       }
-
-       void SetVisibilityChangeCompleted(void)
-       {
-               _isVisibilityChangeInProgress = false;
-       }
-
        bool IsAsyncVisibilityChangeNeeded(void) const
        {
                return _needAsyncVisibilityChangeRequest;
@@ -106,25 +110,25 @@ protected:
        virtual result Configure(_RootVisualElement& rootElement);
 
 protected:
+       _RootVisualElement* _pRootVisualElement;
        Evas* _pEvas;
        Ecore_Evas* _pEcoreEvas;
        Evas_Object* _pWindow;
-       Ecore_Event_Handler* _pOnWindowDamagedHandler;
-       Ecore_Event_Handler* _pOnWindowConfiguredHandler;
-       Ecore_Event_Handler* _pOnWindowHideHandler;
-       Ecore_Event_Handler* _pOnWindowShowHandler;
-       int _needEvasRender;
+       bool _needBoundsChangeRequest;
        bool _needShowStateChangeRequest;
        bool _isShow;
-       bool _isVisibilityChangeInProgress;
        bool _needAsyncVisibilityChangeRequest;
        bool _isMainType;
        bool _needRender;
-
        static int _countOfLayer;
+       Ecore_Event_Handler* _pOnWindowDamagedHandler;
+       Ecore_Event_Handler* _pOnWindowConfiguredHandler;
+       Ecore_Event_Handler* _pOnWindowHideHandler;
+       Ecore_Event_Handler* _pOnWindowShowHandler;
 
 private:
        bool __isWinObject;
+       Tizen::Graphics::FloatRectangle __bounds;
 };
 
 }}} //namespace Tizen { namespace Ui { namespace Animations
index a214134..48de954 100644 (file)
@@ -142,6 +142,8 @@ private:
        float __onOffHandlerPosition;
        bool __onOffHandlerPressed;
        bool __onOffHandlerMoved;
+       int __highlightedIndex;
+       bool __detailedPressed;
 }; // _CheckButtonPresenter
 
 }}} // Tizen::Ui::Controls
index 4e5f803..0ccff3a 100644 (file)
@@ -62,6 +62,7 @@ public:
        virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
        virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
        virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+       void CalculateItemSize(const Base::String& text, ContextMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize);
        virtual result DeleteItem(int index);
        virtual result DeleteItemAll(void);
        virtual int CalculateShowItemCount(void);
@@ -103,6 +104,7 @@ private:
 
        _ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
        int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const;
+       void CalculateItemMaximumWidth(void);
 
 private:
        _ContextMenuListPresenter(const _ContextMenuListPresenter& rhs);
index 17a95fa..795b73d 100644 (file)
@@ -227,6 +227,7 @@ public:
        virtual void OnBoundsChanged(void);
        virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
        virtual void OnVisibleStateChanged(void);
+       void OnFormActivated(void);
 
 // Focus UI
        Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
index a6b72de..9fdccf4 100644 (file)
@@ -90,7 +90,7 @@ public:
        virtual void ResetFocusList(void);
        virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
        virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
-       virtual void SetFocusTraversalControl(_Control* pControl);
+       virtual void SetFocusTraversalControl(_Control* pControl, bool on);
 
 // Focus
        virtual _Control* GetFocusControl(const _Control* pControl) const;
index 75a1e0b..72bf83a 100644 (file)
@@ -30,7 +30,8 @@ enum GalleryViewEventType
        GALLERY_VIEW_EVENT_TOUCH_DOUBLE_PRESSED,
        GALLERY_VIEW_EVENT_TOUCH_MOVED,
        GALLERY_VIEW_EVENT_TOUCH_PINCH_ZOOM,
-       GALLERY_VIEW_EVENT_TOUCH_FLICK
+       GALLERY_VIEW_EVENT_TOUCH_FLICK,
+       GALLERY_VIEW_EVENT_TOUCH_CANCELED
 };
 
 class _GalleryViewEventInfo;
index 51bd407..5f092a0 100644 (file)
@@ -67,7 +67,8 @@ public:
        bool OnTouchPinchZoom(_GalleryViewEventInfo& eventInfo);
        bool OnTouchMoved(_GalleryViewEventInfo& eventInfo);
        bool OnTouchFlicked(_GalleryViewEventInfo& eventInfo);
-       bool ResetTouch();
+       bool OnTouchCanceled(void);
+       bool ResetTouch(void);
 
        //notiListener
        virtual void OnTransitionCancel(void);
index 76014e8..5b67210 100644 (file)
@@ -77,6 +77,7 @@ public:
 
        virtual void OnBoundsChanged(void);
        virtual void OnSettingChanged(Tizen::Base::String& key);
+       virtual void OnDrawFocus(void);
 
        virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
        virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
index 96ed378..b609192 100644 (file)
@@ -75,6 +75,7 @@ public:
        virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
        virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
        virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
+       virtual void OnDrawFocus(void);
 
        bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
 
index cc7b015..155a58a 100644 (file)
@@ -90,7 +90,8 @@ public:
        virtual result ApplyColorProperty(void);
        int GetSubItemIndexFromActionId(int actionId) const;
        int GetSubItemActionIdAt(int mainIndex, int subIndex) const;
-       Tizen::Graphics::FloatDimension GetMainItemMaximumWidth(void);
+       void CalculateItemMaximumWidth(void);
+       void CalculateItemSize(const Base::String& text, OptionMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize);
 
        virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
        virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
index 1b5e865..3602f8a 100644 (file)
@@ -107,6 +107,7 @@ public:
        virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds);
 
        virtual void OnBoundsChanged(void);
+       virtual void OnDrawFocus(void);
        virtual bool IsLayoutChangable(void) const;
        virtual void OnOwnerChanged(_Control* pOldOwner);
        virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
index 15b4843..21d648f 100644 (file)
@@ -89,6 +89,8 @@ public:
        virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
        virtual void OnSettingChanged(Tizen::Base::String& key);
 
+       virtual void OnDrawFocus(void);
+
 public:
        result AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener);
 
index bd6a4a2..49e66d8 100644 (file)
@@ -233,7 +233,7 @@ public:
 protected:
        _ScrollPanel(void);
 
-       virtual result Initialize(const _ScrollPanelPresenter& presenter);
+       virtual result Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle = true);
 
        // Accessor
        virtual result SetScrollPanelPresenter(const _ScrollPanelPresenter* presenter);
index d83272e..8d5e8ea 100644 (file)
@@ -46,6 +46,7 @@ class _TokenEditPresenter
        : public Tizen::Ui::Controls::_EditPresenter
        , virtual public Tizen::Base::Runtime::IEventListener
        , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
+       , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener
 {
 public:
        _TokenEditPresenter(void);
@@ -118,7 +119,7 @@ public:
 
        float GetLineSpacingF() const;
 
-       Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source, bool create);
+       Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source);
 
        virtual bool IsGuideTextActivated(void) const;
        virtual void DrawText(void);
@@ -147,6 +148,8 @@ public:
        virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
        virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){}
        virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){}
+       virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue);
+
        void OnBoundsChanged(void);
 
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
@@ -177,6 +180,7 @@ public:
        void SetDrawFocusState(bool focusState);
        int GetFocusedTokenIndex(void) const;
        void PrepareFocusUiMode(void);
+       void PerformRemoveTokenAnimation(Tizen::Ui::Animations::VisualElement& source);
 
 private:
        bool DrawToken(int count = -1);
index f63957f..2453f2a 100644 (file)
@@ -74,6 +74,10 @@ public:
        result OpenWindow(_Window& window, bool invalidate);
        result CloseWindow(_Window& window);
 
+// For control list
+       _Control* GetControl(int index) const;
+       int GetControlCount(void) const;
+
 // Orientation
        _ControlOrientation GetOrientation(void) const;
        void SetOrientation(_ControlOrientation orientation);
@@ -170,6 +174,7 @@ private:
        Tizen::Base::_ObjectManagerT <_Control> __objectManager;
        Tizen::Base::Collection::LinkedListT<_Window*>* __pWindowList;
        Tizen::Base::Collection::LinkedListT<_Window*>* __pAllWindowList;
+       Tizen::Base::Collection::LinkedListT<_Control*>* __pAllControlList;
 
        bool __isCoordinateSystemLogical;
        int __logicalCoordinateSystem;
index 46ca982..60ffd63 100644 (file)
@@ -96,6 +96,7 @@ public:
 
        static void ReleaseInstance(void);
        bool IsFocusModeStateEnabled(void) const;
+       bool IsForwardDirection(void) const;
 
 private:
        /**
@@ -137,6 +138,7 @@ private:
        static _FocusManagerImpl* __pInstance;
        Tizen::Ui::_Control* __pCurrentFocusUiControl;
        bool __isFocusMode;
+       FocusDirection __focusDirection;
 }; // _FocusManagerImpl
 
 }}//Tizen::Ui
index 627f6c2..d4850b1 100644 (file)
@@ -126,7 +126,7 @@ public:
        virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
        virtual void ResetFocusList(void);
        virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
-       virtual void SetFocusTraversalControl(_Control* pControl);
+       virtual void SetFocusTraversalControl(_Control* pControl, bool on);
 
        // Dimming
        result SetDimmingEnabled(bool enabled);
index 0c99b31..ad0372c 100644 (file)
@@ -2235,6 +2235,10 @@ ConfigParser::GetImageKeyTable(void)
                        const char* key ="TOKENEDIT::BG_NORMAL";
                        __pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE);
                }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::BG_NORMAL";
+                       __pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE);
+               }
        }
        return __pImageKeyTable;
 }
@@ -4291,6 +4295,90 @@ ConfigParser::GetColorKeyTable(void)
                        const char* key ="TOKENEDIT::GUIDE_TEXT_NORMAL";
                        __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR);
                }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::BG_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::BG_SELECTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_SELECTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::BG_HIGHLIGHTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_HIGHLIGHTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::BG_DISABLED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_DISABLED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TEXT_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_NORMAL_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TEXT_SELECTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_SELECTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TEXT_HIGHLIGHTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_HIGHLIGHTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TEXT_DISABLED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_DISABLED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_NORMAL_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_PRESSED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_PRESSED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_HIGHLIGHTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_HIGHLIGHTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_DISABLED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_DISABLED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_BG_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_NORMAL_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_BG_PRESSED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_PRESSED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_BG_HIGHLIGHTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_HIGHLIGHTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_BG_DISABLED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_DISABLED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_NORMAL_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_PRESSED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_PRESSED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_HIGHLIGHTED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_HIGHLIGHTED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_DISABLED";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_DISABLED_COLOR);
+               }
+               {
+                       const char* key ="EXPANDABLEEDITAREA::GUIDE_TEXT_NORMAL";
+                       __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR);
+               }
        }
        return __pColorKeyTable;
 }
index 79660a1..8c0900a 100644 (file)
@@ -139,7 +139,7 @@ START_UI_CONFIG(HEADER);
        ADD_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, $B0514);
        ADD_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, $B013);
 
-       ADD_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, $B0511);
+       //ADD_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, $B0511);
        ADD_COLOR_CONFIG(TITLE_TEXT_DIM_TRANSLUCENT_NORMAL, $B013);
 
        ADD_COLOR_CONFIG(SUB_TITLE_EFFECT_NORMAL, $B0511);
index 7ef400b..016c4e1 100644 (file)
@@ -1270,7 +1270,7 @@ _SceneManagerImpl::GotoScene(bool forward, const SceneId& sceneId, SceneTransiti
                }
                if (doAnimation)
                {
-                       ReserveDestroyingScene(previousSceneId);                // Destroy the Scene after animator finished(stopped).
+                       ReserveDestroyingScene(previousSceneId);        // Destroy the Scene after animator finished(stopped).
                }
                else
                {