From 6b2c5a85bb15cefdb373e71d3e5f5f25b8900b2d Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Fri, 16 Aug 2013 11:00:43 +0900 Subject: [PATCH] add patch --- inc/FGrpCanvas.h | 6 +- inc/FUiClipboard.h | 74 +- inc/FUiClipboardItem.h | 5 +- inc/FUiControl.h | 2 +- inc/FUiCtrlDateTimePicker.h | 2 +- inc/FUiCtrlEditTime.h | 6 +- inc/FUiCtrlHeader.h | 8 +- inc/FUiCtrlOptionMenu.h | 2 +- inc/FUiCtrlTimePicker.h | 2 +- packaging/osp-uifw.spec | 5 +- .../share/osp/bitmaps/480x800/00_button_right.png | Bin 3032 -> 3088 bytes .../osp/bitmaps/480x800/black/00_popup_bg.#.png | Bin 0 -> 1263 bytes .../osp/bitmaps/480x800/black/00_popup_bg_ef.#.png | Bin 3855 -> 2038 bytes .../480x800/{ => black}/00_popup_bottom_bg.#.png | Bin .../bitmaps/480x800/black/00_popup_bottom_ef.#.png | Bin .../480x800/{ => black}/00_popup_title_bg.#.png | Bin .../bitmaps/480x800/black/00_popup_title_ef.#.png | Bin .../osp/bitmaps/480x800/default/00_popup_bg.#.png | Bin 0 -> 1263 bytes .../bitmaps/480x800/default/00_popup_bg_ef.#.png | Bin 3855 -> 2038 bytes .../480x800/default/00_popup_bottom_bg.#.png | Bin 0 -> 1132 bytes .../480x800/default/00_popup_bottom_ef.#.png | Bin .../480x800/default/00_popup_title_bg.#.png | Bin 0 -> 1152 bytes .../480x800/default/00_popup_title_ef.#.png | Bin .../bitmaps/480x800/white/00_button_right_ef.png | Bin 1346 -> 1160 bytes .../osp/bitmaps/480x800/white/00_popup_bg.#.png | Bin 0 -> 516 bytes .../osp/bitmaps/480x800/white/00_popup_bg_ef.#.png | Bin 3966 -> 4438 bytes .../bitmaps/480x800/white/00_popup_bottom_bg.#.png | Bin 0 -> 1132 bytes .../bitmaps/480x800/white/00_popup_bottom_ef.#.png | Bin .../bitmaps/480x800/white/00_popup_title_bg.#.png | Bin 0 -> 1152 bytes .../bitmaps/480x800/white/00_popup_title_ef.#.png | Bin .../osp/bitmaps/720x1280/black/00_popup_bg.#.png | Bin 0 -> 663 bytes .../bitmaps/720x1280/black/00_popup_bg_ef.#.png | Bin 4345 -> 4790 bytes .../black/00_popup_bottom_bg.#.png} | Bin 3049 -> 2991 bytes .../720x1280/black/00_popup_bottom_ef.#.png | Bin .../bitmaps/720x1280/black/00_popup_title_bg.#.png | Bin 0 -> 1205 bytes .../bitmaps/720x1280/black/00_popup_title_ef.#.png | Bin .../osp/bitmaps/720x1280/default/00_popup_bg.#.png | Bin 0 -> 663 bytes .../bitmaps/720x1280/default/00_popup_bg_ef.#.png | Bin 4345 -> 4790 bytes .../00_popup_bottom_bg.#.png} | Bin 3163 -> 2991 bytes .../720x1280/default/00_popup_bottom_ef.#.png | Bin .../720x1280/default/00_popup_title_bg.#.png | Bin 0 -> 1205 bytes .../720x1280/default/00_popup_title_ef.#.png | Bin .../bitmaps/720x1280/white/00_button_right_ef.png | Bin 3341 -> 1167 bytes .../osp/bitmaps/720x1280/white/00_popup_bg.#.png | Bin 0 -> 676 bytes .../bitmaps/720x1280/white/00_popup_bg_ef.#.png | Bin 4641 -> 5097 bytes .../720x1280/{ => white}/00_popup_bottom_bg.#.png | Bin .../720x1280/white/00_popup_bottom_ef.#.png | Bin .../720x1280/{ => white}/00_popup_title_bg.#.png | Bin .../bitmaps/720x1280/white/00_popup_title_ef.#.png | Bin src/app/FApp_CoordinateInfo.cpp | 187 ++++ src/app/FApp_ThemeInfo.cpp | 151 +++ src/app/FApp_UiAppImpl.cpp | 22 +- src/app/inc/FApp_CoordinateInfo.h | 85 ++ src/app/inc/FApp_ThemeInfo.h | 84 ++ src/graphics/FGrp_Bitmap.cpp | 31 +- src/graphics/FGrp_Bitmap.h | 2 +- src/graphics/FGrp_BitmapImpl.cpp | 35 +- src/graphics/FGrp_Canvas.cpp | 132 ++- src/graphics/FGrp_CanvasCairo.cpp | 20 +- src/graphics/FGrp_CanvasImpl.cpp | 38 +- src/graphics/FGrp_CanvasPixman.cpp | 95 +- src/graphics/FGrp_Font.cpp | 18 +- src/graphics/FGrp_FontBidiUtil.cpp | 60 +- src/graphics/FGrp_FontImpl.cpp | 46 + src/graphics/FGrp_FontRsrcManager.cpp | 29 +- src/graphics/FGrp_FontRsrcManager.h | 10 +- src/graphics/inc/FGrp_BitmapImpl.h | 1 + src/graphics/inc/FGrp_FontImpl.h | 9 + src/graphics/opengl/FGrpEgl.cpp | 199 +++- src/graphics/opengl/FGrpGles1.cpp | 4 + src/graphics/text/FGrp_TextTextComposite.cpp | 14 +- src/graphics/text/FGrp_TextTextCutLinkParser.cpp | 124 ++- src/ui/CMakeLists.txt | 3 +- src/ui/FUi_AccessibilityContainer.cpp | 2 +- src/ui/FUi_AccessibilityElement.cpp | 15 +- src/ui/FUi_AccessibilityElementImpl.cpp | 1 + src/ui/FUi_AccessibilityManager.cpp | 23 +- src/ui/FUi_AccessibilityTtsPlayer.cpp | 25 +- src/ui/FUi_ActiveWindowEvent.cpp | 141 --- src/ui/FUi_ActiveWindowEvent.h | 52 - src/ui/FUi_Clipboard.cpp | 17 +- src/ui/FUi_Clipboard.h | 2 +- src/ui/FUi_Control.cpp | 173 ++- src/ui/FUi_ControlImpl.cpp | 150 ++- src/ui/FUi_ControlManager.cpp | 56 +- src/ui/FUi_DataBinding.cpp | 1116 +++++++++++++------- src/ui/FUi_DimmingLayer.cpp | 39 +- src/ui/FUi_EcoreEvas.cpp | 38 +- src/ui/FUi_EflUiEventManager.cpp | 95 +- src/ui/FUi_FocusManagerImpl.cpp | 26 +- src/ui/FUi_InputConnectionImpl.cpp | 4 +- src/ui/FUi_KeyEventManagerImpl.cpp | 4 +- src/ui/FUi_OrientationAgent.cpp | 4 +- src/ui/FUi_ResourceManager.cpp | 52 +- src/ui/FUi_TouchManager.cpp | 6 +- src/ui/FUi_UiFocusEvent.cpp | 12 + src/ui/FUi_UiTouchEvent.cpp | 4 +- src/ui/FUi_Window.cpp | 18 +- src/ui/animations/FUiAnim_Debug.cpp | 12 +- src/ui/animations/FUiAnim_EflLayer.cpp | 181 +++- .../animations/FUiAnim_EflLayerConfiguration.cpp | 73 ++ src/ui/animations/FUiAnim_TransactionNode.cpp | 12 +- src/ui/animations/FUiAnim_VisualElementImpl.cpp | 8 +- src/ui/controls/FUiCtrlDatePicker.cpp | 2 +- src/ui/controls/FUiCtrlSlider.cpp | 4 +- src/ui/controls/FUiCtrlTimePicker.cpp | 2 +- src/ui/controls/FUiCtrl_Animation.cpp | 21 +- src/ui/controls/FUiCtrl_AnimationImpl.cpp | 7 +- src/ui/controls/FUiCtrl_AnimationPresenter.cpp | 8 +- src/ui/controls/FUiCtrl_Button.cpp | 93 +- src/ui/controls/FUiCtrl_ButtonImpl.cpp | 2 +- src/ui/controls/FUiCtrl_ButtonPresenter.cpp | 148 +-- src/ui/controls/FUiCtrl_CheckButton.cpp | 57 +- src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp | 295 +++++- src/ui/controls/FUiCtrl_ColorChangeEvent.cpp | 2 +- src/ui/controls/FUiCtrl_ColorPicker.cpp | 30 +- src/ui/controls/FUiCtrl_ColorPickerImpl.cpp | 7 +- src/ui/controls/FUiCtrl_ColorPickerModel.cpp | 2 +- src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp | 22 +- src/ui/controls/FUiCtrl_ContextMenu.cpp | 2 + .../controls/FUiCtrl_ContextMenuGridPresenter.cpp | 2 +- .../controls/FUiCtrl_ContextMenuListPresenter.cpp | 18 +- src/ui/controls/FUiCtrl_DatePickerImpl.cpp | 9 +- src/ui/controls/FUiCtrl_DateTimeBar.cpp | 49 +- src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp | 82 +- src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp | 2 +- src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp | 4 +- src/ui/controls/FUiCtrl_DateTimeModel.cpp | 2 +- src/ui/controls/FUiCtrl_DateTimePicker.cpp | 33 +- src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp | 7 +- src/ui/controls/FUiCtrl_DateTimePresenter.cpp | 46 +- src/ui/controls/FUiCtrl_Edit.cpp | 7 +- src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 523 ++++----- src/ui/controls/FUiCtrl_EditDate.cpp | 44 +- src/ui/controls/FUiCtrl_EditDateImpl.cpp | 13 +- src/ui/controls/FUiCtrl_EditDatePresenter.cpp | 56 +- src/ui/controls/FUiCtrl_EditPresenter.cpp | 213 +++- src/ui/controls/FUiCtrl_EditTime.cpp | 51 +- src/ui/controls/FUiCtrl_EditTimeImpl.cpp | 13 +- src/ui/controls/FUiCtrl_EditTimePresenter.cpp | 66 +- src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp | 28 +- src/ui/controls/FUiCtrl_FastScrollPresenter.cpp | 2 +- src/ui/controls/FUiCtrl_Form.cpp | 49 +- src/ui/controls/FUiCtrl_FormImpl.cpp | 8 +- src/ui/controls/FUiCtrl_Frame.cpp | 7 +- src/ui/controls/FUiCtrl_FrameImpl.cpp | 5 +- src/ui/controls/FUiCtrl_GroupContainer.cpp | 44 +- src/ui/controls/FUiCtrl_GroupContainerImpl.cpp | 4 +- .../controls/FUiCtrl_GroupContainerPresenter.cpp | 14 +- src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp | 4 + src/ui/controls/FUiCtrl_HeaderImpl.cpp | 11 +- src/ui/controls/FUiCtrl_IconListPresenter.cpp | 4 +- src/ui/controls/FUiCtrl_Indicator.cpp | 56 - src/ui/controls/FUiCtrl_IndicatorManager.cpp | 20 + src/ui/controls/FUiCtrl_Keypad.cpp | 28 +- src/ui/controls/FUiCtrl_Label.cpp | 2 + src/ui/controls/FUiCtrl_ListViewImpl.cpp | 4 + src/ui/controls/FUiCtrl_ListViewItem.cpp | 7 +- src/ui/controls/FUiCtrl_MessageBox.cpp | 8 +- src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp | 70 +- src/ui/controls/FUiCtrl_OptionMenu.cpp | 33 +- src/ui/controls/FUiCtrl_OptionMenuImpl.cpp | 7 +- src/ui/controls/FUiCtrl_OptionMenuItem.cpp | 43 +- src/ui/controls/FUiCtrl_OptionMenuModel.cpp | 6 +- src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp | 35 +- src/ui/controls/FUiCtrl_OverlayAgent.cpp | 137 ++- src/ui/controls/FUiCtrl_OverlayPanel.cpp | 6 + src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp | 74 ++ src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp | 1 - src/ui/controls/FUiCtrl_Popup.cpp | 9 +- src/ui/controls/FUiCtrl_PopupImpl.cpp | 46 +- src/ui/controls/FUiCtrl_PopupPresenter.cpp | 44 +- src/ui/controls/FUiCtrl_Progress.cpp | 16 +- src/ui/controls/FUiCtrl_ProgressImpl.cpp | 4 +- src/ui/controls/FUiCtrl_ProgressPopup.cpp | 19 +- src/ui/controls/FUiCtrl_ProgressPresenter.cpp | 8 +- .../controls/FUiCtrl_PublicDateTimeChangeEvent.cpp | 2 +- src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp | 8 +- src/ui/controls/FUiCtrl_ScrollPanel.cpp | 5 + src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp | 11 +- src/ui/controls/FUiCtrl_SearchBar.cpp | 150 ++- src/ui/controls/FUiCtrl_SearchBarImpl.cpp | 89 +- src/ui/controls/FUiCtrl_SearchBarPresenter.cpp | 82 +- src/ui/controls/FUiCtrl_Slider.cpp | 77 +- src/ui/controls/FUiCtrl_SliderImpl.cpp | 20 +- src/ui/controls/FUiCtrl_SliderPresenter.cpp | 97 +- src/ui/controls/FUiCtrl_SplitPanel.cpp | 47 +- src/ui/controls/FUiCtrl_SplitPanelImpl.cpp | 10 +- src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp | 66 +- src/ui/controls/FUiCtrl_Tab.cpp | 79 +- src/ui/controls/FUiCtrl_TabBarPresenter.cpp | 5 - src/ui/controls/FUiCtrl_TabItem.cpp | 17 +- src/ui/controls/FUiCtrl_TableView.cpp | 66 +- src/ui/controls/FUiCtrl_TableViewItem.cpp | 493 +++++---- .../FUiCtrl_TableViewItemProviderAdaptor.cpp | 8 +- src/ui/controls/FUiCtrl_TableViewPresenter.cpp | 410 +++++-- src/ui/controls/FUiCtrl_TokenEdit.cpp | 20 +- src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 232 ++-- src/ui/controls/FUiCtrl_Toolbar.cpp | 662 ++++-------- src/ui/controls/FUiCtrl_ToolbarPresenter.cpp | 133 ++- .../renderer/FUiEffects_RendererEffectRenderer.cpp | 2 +- src/ui/inc/FUiAnim_EflLayer.h | 14 +- src/ui/inc/FUiAnim_EflLayerConfiguration.h | 46 + src/ui/inc/FUiCtrl_Button.h | 17 - src/ui/inc/FUiCtrl_ButtonPresenter.h | 8 +- src/ui/inc/FUiCtrl_CheckButton.h | 5 + src/ui/inc/FUiCtrl_DateTimeBar.h | 1 + src/ui/inc/FUiCtrl_DateTimePicker.h | 2 + src/ui/inc/FUiCtrl_EditCopyPasteManager.h | 2 + src/ui/inc/FUiCtrl_EditDate.h | 1 + src/ui/inc/FUiCtrl_EditDatePresenter.h | 2 +- src/ui/inc/FUiCtrl_EditPresenter.h | 3 + src/ui/inc/FUiCtrl_EditTime.h | 1 + src/ui/inc/FUiCtrl_EditTimePresenter.h | 3 +- src/ui/inc/FUiCtrl_MessageBox.h | 1 - src/ui/inc/FUiCtrl_MessageBoxPresenter.h | 1 - src/ui/inc/FUiCtrl_OverlayAgent.h | 31 +- src/ui/inc/FUiCtrl_OverlayPanelImpl.h | 3 + src/ui/inc/FUiCtrl_Popup.h | 1 - src/ui/inc/FUiCtrl_PopupImpl.h | 2 + src/ui/inc/FUiCtrl_ProgressPopup.h | 2 - src/ui/inc/FUiCtrl_ScrollPanelPresenter.h | 2 +- src/ui/inc/FUiCtrl_SearchBar.h | 5 +- src/ui/inc/FUiCtrl_SearchBarPresenter.h | 88 +- src/ui/inc/FUiCtrl_SliderPresenter.h | 1 + src/ui/inc/FUiCtrl_TableView.h | 16 + src/ui/inc/FUiCtrl_TableViewItem.h | 14 + src/ui/inc/FUiCtrl_TableViewPresenter.h | 18 + src/ui/inc/FUiCtrl_TokenEdit.h | 2 - src/ui/inc/FUi_AccessibilityElement.h | 7 +- src/ui/inc/FUi_Control.h | 13 +- src/ui/inc/FUi_DimmingLayer.h | 2 +- src/ui/inc/FUi_EcoreEvas.h | 8 - src/ui/inc/FUi_FocusManagerImpl.h | 2 +- src/ui/inc/FUi_ResourceContextMenuConfig.h | 1 + src/ui/inc/FUi_ResourceFooterConfig.h | 8 +- src/ui/inc/FUi_ResourceHeaderConfig.h | 23 +- src/ui/inc/FUi_ResourceManager.h | 9 +- src/ui/inc/FUi_ResourceOptionMenuConfig.h | 2 + src/ui/inc/FUi_ResourceSliderConfig.h | 52 +- src/ui/inc/FUi_UiFocusEvent.h | 1 + src/ui/inc/FUi_Window.h | 2 +- src/ui/resource/FUi_ResourceContextMenuConfig.cpp | 1 + src/ui/resource/FUi_ResourceFooterConfig.cpp | 22 +- .../resource/FUi_ResourceGroupContainerConfig.cpp | 2 +- src/ui/resource/FUi_ResourceHeaderConfig.cpp | 54 +- src/ui/resource/FUi_ResourceMessageBoxConfig.cpp | 12 +- src/ui/resource/FUi_ResourceOptionMenuConfig.cpp | 1 + src/ui/resource/FUi_ResourcePopupConfig.cpp | 20 +- src/ui/resource/FUi_ResourceSliderConfig.cpp | 6 +- src/ui/resource/FUi_ResourceTableViewConfig.cpp | 4 +- src/ui/resource/FUi_ResourceTokenEditConfig.cpp | 2 +- src/ui/scenes/FUiScenes_SceneManagerImpl.cpp | 10 + src/uifw/CMakeLists.txt | 2 + 254 files changed, 6024 insertions(+), 4004 deletions(-) create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png rename res/common/usr/share/osp/bitmaps/480x800/{ => black}/00_popup_bottom_bg.#.png (100%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bottom_ef.#.png rename res/common/usr/share/osp/bitmaps/480x800/{ => black}/00_popup_title_bg.#.png (100%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png rename res/common/usr/share/osp/bitmaps/{480x800/00_popup_bg.#.png => 720x1280/black/00_popup_bottom_bg.#.png} (88%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png rename res/common/usr/share/osp/bitmaps/720x1280/{00_popup_bg.#.png => default/00_popup_bottom_bg.#.png} (84%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg_ef.#.png rename res/common/usr/share/osp/bitmaps/720x1280/{ => white}/00_popup_bottom_bg.#.png (100%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bottom_ef.#.png rename res/common/usr/share/osp/bitmaps/720x1280/{ => white}/00_popup_title_bg.#.png (100%) mode change 100644 => 100755 mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png create mode 100644 src/app/FApp_CoordinateInfo.cpp create mode 100644 src/app/FApp_ThemeInfo.cpp mode change 100755 => 100644 src/app/FApp_UiAppImpl.cpp create mode 100644 src/app/inc/FApp_CoordinateInfo.h create mode 100644 src/app/inc/FApp_ThemeInfo.h delete mode 100644 src/ui/FUi_ActiveWindowEvent.cpp delete mode 100644 src/ui/FUi_ActiveWindowEvent.h mode change 100755 => 100644 src/ui/FUi_OrientationAgent.cpp create mode 100644 src/ui/animations/FUiAnim_EflLayerConfiguration.cpp mode change 100644 => 100755 src/ui/controls/FUiCtrl_PopupPresenter.cpp create mode 100644 src/ui/inc/FUiAnim_EflLayerConfiguration.h mode change 100644 => 100755 src/ui/resource/FUi_ResourceMessageBoxConfig.cpp mode change 100644 => 100755 src/ui/resource/FUi_ResourcePopupConfig.cpp diff --git a/inc/FGrpCanvas.h b/inc/FGrpCanvas.h index 0fa8c65..e7c598a 100644 --- a/inc/FGrpCanvas.h +++ b/inc/FGrpCanvas.h @@ -360,7 +360,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] pattern The list containing the information of dash pattern. + * @param[in] pattern The list containing the information of dash pattern @n + * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned. * @param[in] offset The offset into the dash pattern at which the stroke must start * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specific input parameter is invalid. @@ -373,7 +374,8 @@ public: * @since 2.1 * * @return An error code - * @param[in] pattern The list containing the information of dash pattern + * @param[in] pattern The list containing the information of dash pattern @n + * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned. * @param[in] offset The offset into the dash pattern at which the stroke must start * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specific input parameter is invalid. diff --git a/inc/FUiClipboard.h b/inc/FUiClipboard.h index 5ad4d93..8d5d027 100644 --- a/inc/FUiClipboard.h +++ b/inc/FUiClipboard.h @@ -166,10 +166,9 @@ public: * * @since 2.0 * - * @return The pointer to the system clipboard - * @remarks The copy and paste operation is performed through the system - * clipboard that can be obtained through this method. @n - * The method returns @c null if a system error occurs. + * @return The pointer to the system clipboard, @n + * else @c null if a system error has occurred + * @remarks The copy and paste operation is performed through the system clipboard. */ static Clipboard* GetInstance(void); @@ -181,12 +180,10 @@ public: * @return An error code * @param[in] item The item to save in the system clipboard * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is either invalid or not constructed. * @exception E_SYSTEM A system error has occurred. - * @remarks This method returns @c E_INVALID_ARG if the specified item is - * not constructed. @n - * For the text and image data type, the data itself is copied - * by the method and kept by the system clipboard. + * @remarks For the text, image data, and html types, the data itself is copied by the method and kept by the system clipboard. @n + * For the other types, only the file path is copied and kept. */ result CopyItem(const ClipboardItem& item); @@ -194,24 +191,17 @@ public: * Retrieves a collection of items that matches the specified data types from the * system clipboard. * - * @since 2.0 + * @since 2.0 * - * @return The pointer to a Tizen::Base::Collection::IList that contains a collection of ClipboardItem, @n - * else @c null if an error occurs - * @param[in] dataTypes The types of items @n Multiple data types can be - * combined using bitwise OR. + * @return The pointer to a Tizen::Base::Collection::IList that contains a collection of ClipboardItem, @n + * else @c null if an error has occurred @n + * The items are sorted in the reverse order in which they are copied to the system clipboard. So, the first item is the latest one among them. + * @param[in] dataTypes The types of items @n + * Multiple data types of ClipboardDataType can be combined using bitwise OR. * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The item of the specified data types is not found. * @exception E_SYSTEM A system error has occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. @n - * This method returns a pointer to an Tizen::Base::Collection::IList that contains - * a collection of ClipboardItem. The returned pointer to %Tizen::Base::Collection::IList - * and all the elements in %Tizen::Base::Collection::IList must be deleted by applications. @n - * The items in %Tizen::Base::Collection::IList are sorted in the reverse order in which - * they are copied to the system clipboard. So, the first - * item in %Tizen::Base::Collection::IList is the latest one among them. @n - * @c dataType can be a combination of ClipboardDataType. - * @see Tizen::Ui::ClipboardDataType + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); @@ -221,45 +211,33 @@ public: * @since 2.0 * * @return The pointer to a ClipboardItem instance, @n - * else @c null if an error occurs - * @param[in] dataTypes The types of items @n Multiple data types can be + * else @c null if an error has occurred or there is no matched item in the system clipboard + * @param[in] dataTypes The types of items @n Multiple data types of ClipboardDataType can be * combined using bitwise OR. * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The item of the specified data types is not found. * @exception E_SYSTEM A system error has occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. @n - * This method returns the pointer to a ClipboardItem instance. The - * returned %ClipboardItem must be deleted by applications. @n - * If there is no matched item in the system clipboard, this method - * returns @c null. @n - * @c dataType can be a combination of ClipboardDataType. - * @see Tizen::Ui::ClipboardDataType + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes); /** - * Shows the clipboard popup with the specified parameters. + * Shows the clipboard popup that is including the current contents of the system clipboard with the specified parameters. * * @since 2.0 * * @return An error code - * @param[in] dataTypes The types of items @n Multiple data types can be - * combined using bitwise OR. + * @param[in] dataTypes The types of items to decide whether the clipboard popup shows image items or not @n + * Multiple data types of ClipboardDataType can be combined using bitwise OR. @n + * If the value contains #CLIPBOARD_DATA_TYPE_IMAGE, all types of items are shown. @n + * If not, text items, html items, video items, and audio items are shown except image items. * @param[in] listener The clipboard popup event listener * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance - * prohibits the execution of the specified - * operation. + * @exception E_INVALID_OPERATION Either the clipboard popup is currently being shown or attempting to show the clipboard popup + * when the application is in the background. * @exception E_SYSTEM A system error has occurred. - * @remarks @c dataTypes can decide whether the clipboard popup shows image items or not. - * If @c dataTypes contains #CLIPBOARD_DATA_TYPE_IMAGE, all types of items are shown. - * If not, text items, html items, video items, and audio items are shown except image items. @n - * This method returns @c E_INVALID_OPERATION if the clipboard popup is currently - * being shown. Furthermore, attempting to show the clipboard popup when the application is - * in the background will return @c E_INVALID_OPERATION. @n - * The clipboard popup shows the current content of the system clipboard. The user - * can clear the system clipboard or choose a clipboard item for the paste operation. - * @see Tizen::Ui::ClipboardDataType + * @remarks The user can operate the system clipboard when the clipboard popup is shown, + * for example, clear the system clipboard or choose a clipboard item for the paste operation. */ static result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener& listener); @@ -271,8 +249,8 @@ public: * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * - No clipboard popup is currently being shown. * @exception E_SYSTEM A system error has occurred. - * @remarks This method returns @c E_INVALID_OPERATION if no clipboard popup is currently being shown. */ static result HidePopup(void); diff --git a/inc/FUiClipboardItem.h b/inc/FUiClipboardItem.h index 55eb180..941a6f4 100644 --- a/inc/FUiClipboardItem.h +++ b/inc/FUiClipboardItem.h @@ -94,9 +94,8 @@ public: * * @since 2.0 * - * @return The pointer to the data - * @remarks The application needs to type-cast the returned data object - * according to its data type. + * @return The pointer to the data @n + * The application needs to type-cast the returned data object according to its data type. */ Tizen::Base::Object* GetData(void) const; diff --git a/inc/FUiControl.h b/inc/FUiControl.h index dc3ce9e..94e423e 100644 --- a/inc/FUiControl.h +++ b/inc/FUiControl.h @@ -550,7 +550,7 @@ public: * @return The y position of the control * @see GetBounds() * @see GetPosition() - * @see Get() + * @see GetX() */ int GetY(void) const; diff --git a/inc/FUiCtrlDateTimePicker.h b/inc/FUiCtrlDateTimePicker.h index 3d45a31..b410c80 100644 --- a/inc/FUiCtrlDateTimePicker.h +++ b/inc/FUiCtrlDateTimePicker.h @@ -249,7 +249,7 @@ public: void SetDateTime(const Tizen::Base::DateTime& dateTime); /** - * Sets the date and time value of the %DateTimePicker control with the current date and time in the Coordinated Universal Time (UTC) mode. + * Sets the date and time value of the %DateTimePicker control with the current date and time in the wall time mode. * * @since 2.0 */ diff --git a/inc/FUiCtrlEditTime.h b/inc/FUiCtrlEditTime.h index 19e3880..838091f 100644 --- a/inc/FUiCtrlEditTime.h +++ b/inc/FUiCtrlEditTime.h @@ -159,7 +159,7 @@ public: void RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); /** - * Initializes this instance of %EditTime with the specified parameters. + * Initializes this instance of %EditTime to the current time in the wall time mode. * * @since 2.0 * @@ -174,7 +174,7 @@ public: result Construct(const Tizen::Graphics::Point& point, const Tizen::Base::String& title = L""); /** - * Initializes this instance of %EditTime with the specified parameters. + * Initializes this instance of %EditTime to the current time in the wall time mode. * * @since 2.1 * @@ -266,7 +266,7 @@ public: void SetTime(const Tizen::Base::DateTime& time); /** - * Sets the value of the %EditTime control using the current system time. + * Sets the value of the %EditTime control with the current system time in the wall time mode. * * @since 2.0 */ diff --git a/inc/FUiCtrlHeader.h b/inc/FUiCtrlHeader.h index 58fc1be..52b9d49 100644 --- a/inc/FUiCtrlHeader.h +++ b/inc/FUiCtrlHeader.h @@ -593,8 +593,8 @@ public: * @param[in] pBadgeIcon The bitmap for the icon * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n - * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB, @n - * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. + * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n + * or ::HEADER_STYLE_TAB_LARGE. */ result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); @@ -610,8 +610,8 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n - * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB, @n - * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. + * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n + * or ::HEADER_STYLE_TAB_LARGE. * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number. */ result SetButtonNumberedBadgeIcon(ButtonPosition position, int number); diff --git a/inc/FUiCtrlOptionMenu.h b/inc/FUiCtrlOptionMenu.h index ecb69a8..cf23ad3 100755 --- a/inc/FUiCtrlOptionMenu.h +++ b/inc/FUiCtrlOptionMenu.h @@ -65,7 +65,7 @@ enum OptionMenuItemStatus * with the menu item. * Note that %OptionMenu cannot be used in a Popup. * - * @image html ui_controls_optionmenu.png + * For more information on the class features, see OptionMenu. * * The following examples demonstrate how to use an %OptionMenu control. * diff --git a/inc/FUiCtrlTimePicker.h b/inc/FUiCtrlTimePicker.h index f0b82e4..0bc1d24 100644 --- a/inc/FUiCtrlTimePicker.h +++ b/inc/FUiCtrlTimePicker.h @@ -312,7 +312,7 @@ public: void SetTime(const Tizen::Base::DateTime& time); /** - * Sets the time value of the %TimePicker control with the current system time in the Coordinated Universal Time (UTC) mode. + * Sets the time value of the %TimePicker control with the current system time in the wall time mode. * * @since 2.0 */ diff --git a/packaging/osp-uifw.spec b/packaging/osp-uifw.spec index e0e9166..49be89c 100644 --- a/packaging/osp-uifw.spec +++ b/packaging/osp-uifw.spec @@ -1,9 +1,10 @@ +%define debug_package %{nil} %define __strip /bin/true Name: osp-uifw Summary: The UI Framework library of OSP -Version: 1.2.2.0 -Release: 61 +Version: 1.2.2.1 +Release: 62 Group: TO_BE/FILLED_IN License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_right.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_right.png index 028a11aee2ceeed494ab65cd5ea6e57c0d429686..8cf0f3b06d515ed31ccace2955457d2bb3e85209 100644 GIT binary patch delta 346 zcmV-g0j2)f7mygRzzTmmNklc^(LnG8Z0rQV zH}C<{nIfc1VWVXP5wQ?kLG&3EOZ!0bTZlo=Ik`J`JOb{p)%@(o% z0S5*Io(ZfGAk&T%@hVUUdca~Csa^+efLa-MybN3eD}MpLG*W+m3p8?*C1v05c3^m( zgql;uXG=M&2pFM#!}}`K@CGBamnm`wFhVV%Q9?Bm+Vln^v@J9?;4N=3LK{La3H3y% zopx5NUVR0ed~2|<6|Nq)d41pbBlDF{Ze$h0}fp!sSkwM@?e_AxsXfg04w-L(u>z>% delta 290 zcmV+-0p0$P7}yuEzzTl@NklM(8DD_FX7&O>9&C=$aUzSq5q;^yHctp^4Bwh5Qy8xF$yEStv=N zW1BB;xw;O;(~MAWT!;F%W7YF5HBfnUPx&H;=8#PcQ@Y)V3_*~`EO63hms3j o0WmNJlD{M_)BYMsG@kfp09CXRSbT%fhX4Qo07*qoM6N<$g3?uj3IG5A diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..295a4e559fcd58b433a72e96fd4c703b29527b3b GIT binary patch literal 1263 zcmbVMZD<>19KTXpO4&Y$pxwajdc`_llFMC^OYUsiUGgMdHq(VPWf^6%%iWXa*4|6+ zo|v?tmKD)<6&+GsE5eEhBI~Sv5WA$^Eew1vX{sN}K6uLfc#0w&NPlE{)aq}xI%L{)eNympRhimZsB z!4Oq7Dw9Z(5yOI{-|cnD9)=+~&dvDz9LGFDvL1$|J^1BZj8E`$0vjOL9tvx-l$?+P zu{B+I7ozeAnF380i$!o%+bn&Elg;b2)8mT=i4I+98*-EONf0BFmWY9iIpNrzF& z8U+-hu%%TOG&7M{C)Vw?K;e+lCCQ{2w};j=$FGXCjZ*MmGd7gA(<3INQ_waFmW=a} zYpa2A?Cz|{5yaLAdo2|wMH&KzT+pD7;vhuf8@Hk=f+yw+1Vs>t1c4{YGK|OsKsXp- z!=m2@ST0=S*bwXSgP@-YM7<){E5cDB2G?>8W}Pprt+mm6&B{WF@|Wx`BQG z02gEeF)$PI3IFSZYVO0-fc0>Eq3M^FSSU zjD=fczHsYzf~eab2V%N(<;JYoe0Jxi=mS(}?1!_jFD;_w)>AL`mybU?JYVR4_#6@% z0$DaOcXj*9f%|8=w|+U3%>Huq?dS4MU>o!DhsII)#6pwzfWGDCLlfT)Y&uBPADeq# z2i=$YmL^w@Tv6<)PX2cH{F&+BE^u^D=k(X_ee}*wEt+UtI^Ou0uZ!ua9j{Oy zU+kM&?G0aRFMoA@_Jcitd^7vfWW(pb%I8n-ZN0B$wdD-a=ow2i-1A-6U2LwdZRyzc z_CKE-k1Z0_o7+rgdErO7dErR?<^5f|FTOCh`_kaKmN##H|9AP*(Rbf}TQiSN9D1hk>d>CgwhjL@K2BAs(cR_Y)s<;+Ijj9_)HM>9Tl>mSmpV^5zo2-u K2b>HaJp2!w>$8^t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png old mode 100644 new mode 100755 index 7250b394138bf9ac4f9872a348d12b5e23228750..1e5610b9f3bad4d04e656efec4da78309ad93274 GIT binary patch literal 2038 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 K2b>HaJp2!w>$8^t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png old mode 100644 new mode 100755 index 7250b394138bf9ac4f9872a348d12b5e23228750..1e5610b9f3bad4d04e656efec4da78309ad93274 GIT binary patch literal 2038 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 N{1^3Z?P_7qq2IA%Z4v+g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bbcece2fdca08cbf3e9ab0ae2ee5b21f3770645a GIT binary patch literal 1152 zcmbVMO=uKX93K)eZ8Q=}pc*`kBej)g=WBOocZRI#d?rh?al2VekfNE)ykv*$%o}H3 zvYRv&6fG$M;O2%;t1qZRPnhClwT9eDh7di5Zl_9A@{^}`WVF#|xzHXH_I)-^{# z0hspW$tBQ95RD^FaS#pWdL;|Gv>D0JRoBO8g6Qn3`ldAo5IGD+9WO(zT)s+?j-8XA~$Rr()SuDqqfBYup7M%4!)3-_W*WORSMdrDZLprZraQIZozMnvzy|MNTF( zUQp^BTVlmTQdP9HuB74|r}K)U$Z|>*;{vaVvZ~jySuaGUXMwt2C(^r)O>K*n)Bu+-}=Xt{rRYPUt zx*Yi}>T%sLIN4wmN=i%f)CSgmlbA8s7$z!?*NUZngex#wZk9gYY&H+@aK{9=HEy&Y z-G|%ix2z@?s}G)hpV@upqt7*h!=BtX4WE6DexcqC_LSQvw1HCxZ`**5iO=8v z|K_bOP-{9=`1|wI9YM?D)7tW}zKP#EX6IIZYCXTd?Z1B>?W*OKx8M7&KHQ_9%q^Ce u9{haveDE*4G~4|{>B`kV8m4<+yfZ}1EZteUs5Ul5|AegGr~Rr7op}jh$bCBi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_right_ef.png index 608a090703cf2b5b33853197fc624d4a9d9fb944..479d13a7409efe52e907738608ea741e923b3d06 100644 GIT binary patch delta 484 zcmX@a)xo*JjVZ>-*vZkt$jQys($&?_(ACJ&!q~;x$;jN;($dt-#KKicp(3}y*VoD= zKe;qFHLt|e#a0O@qL-4HVg=FbY=BGeE(uCavr55ffs-pPy_5Br zo$8ws7K$@4F#Pd!aSW-rmGtNTfBVA@495by-F4l<`Hv{@o^kjyeV$k`^T%+F*`giw zmro~^%%AkOSWW1vzr*AIt-t0x6N_hm)R~dAf1%y-%2nr>lS~!PISQ+5o;!Kg?`FX1 z&zwsbXFW-taDHopMYGKO;HZWr%p2JS+L=Go`1dHgrg#l7!>YtA92cfwC2Z` zz||+NFh4r(@JG(mN2DYE@}=VnXF86Fvpt&o<4eHlq?8=4BjOD=TIPwZX8LHRFim;M zv|DzztVbptS+RVZe{1Je=kocJvJI7&+NoYo%JZuATG@Z{o90e2ZKjQ?s&=Z|PwZho qqTg^syyJe~w$<%YEk_v`*%){@40r7G)_esF2?kGBKbLh*2~7awn7F6_ delta 671 zcmeC+JjAuZjVZ>_(9PM&)YQ<$(Ztly(ACJ%!pz*l(#^%h(#X=#*vUdkp(3}y*VoD= zKe;qFHLt|e#a0O@qL-4HVg=P}giG(_MN9@z3ryT_DN<4>E(uCavr55jfdMYPll7RL z>Q8s?_GVyU+~(=x7*cU7>CgZF_JtEg@k2`NM}NjG1vkUzC$4iG2S2c{YP? zGFwujLK*9?Jv<)Vm+m}zeSQ6U=BOilM|=WKpZr#Dxl-?J)u$&Xl~z3Mnet=KoF6Bv ze|>owjyqoR1e{rvp=eE5Rjb7s%pE#TpO`BIXAU;XcIZ|7~jcy=^9_@LO_= z$KI@z6czui^^>@>Cm0$;7#bTdXUKHTC@}V$Zx{RU>}+%O46!Q9B_X$ejfX z?5e-5x%~b8{q@XGeKV2_HGVS`N(p2$8M2?)KHDtU=Oy|R44gR2dx z%O4-_-~H#$&(Agiag)@3O1!!pqT($%u|~^h@+5AKITv(PZ!S*>jXZPY$Q0L={wFs@ z#Kzuj4w^qH)lge|wV}r8fJecbbk3bP!C_PMq(fZQt~D`e_V(`$KUf8RGkv^$k?rq< d4H60m7#^p;o#j?~)rbKIJYD@<);T3K0RRdGAngDE diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..f32e3b94341c178ce0ec54d1f682a380d6af3258 GIT binary patch literal 516 zcmV+f0{i`mP)QF(00004XF*Lt006O% z3;baP00009a7bBm000ic000ic0Tn1pfB*mh8gxZibW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE-^4L^m3s900DqWL_t(&L+x2XZo)te+y^zNJ#p((@`HYhL)91bKZuG0_g00i zCutCbBs+E-sTCHo2*~T5o%K4-B;}lwhozLVm`g0+@e2f00nBNeEve$Rm6pk;#sn}e zqyL;SDN(K;;!tsn`NE>+q?{VIx>csUmS1mTd$H5NeWUvi-#f95*yF``YEH`O3@qgr zx&AiX#J*%q-GIAXRpvwBeqOpt|WlW&G0;z~0GaOr`eg62Pz>#Ce+Z*)9R> z=l~2cipx8wW3>X1cwD_ggf$G(zVq2Ad_HAKEw_MgAaVG<)lteftW}Jd&UsK z&DrSrT5t}Cp|Qc3meF7=7}GMK^*80%?*l1>EXuT?;Qs^8yll|n3II0%0000|D^ z_ww@lRz`oi zU$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6cm;e!*vpE?o5f_L!B}hR1Px(02F^oY!`4?i6S-;F^L}%k0Z0NWkO#^@9q0f3Xv3lIchAu>dPU)xk0{A5EKc;LJ1HL5<+>H9&h}K8jpuNx$=mc~Yx)5D~ zZbG-CFQRXwC(y4k7z_=gjj_UbVj?j~n6;P^%sxyT<{V}aGmd|m!(y@WSbeM=)*s8n z3b2LPD(q40S?myY0{aF>#HrxSaPGJ$91oX|tH2$>oxu&^CUFaRDZD1$2Jeq&<8$z( z_(ps;{yKgFzd(>CXcO!RA%rBtCPF2lm2i>pfbfz?B&rduiGf5eaU-#kc#L?NI7WO+ zk|F7lTu9L*A!&aH=@980=`QIdnM~FqJCdWw0`d-WGx-Af5&4Y-MZ!qJOM)%2L83;Y zLt;qcxg=gvQ_@LtwPdbjh2#mz>yk54cquI@7b&LHdZ`+zlTss6bJ7%PQ)z$cROu4w zBhpu-r)01)S~6}jY?%U?gEALn#wiFzo#H}aQ8rT=DHne!6I2XUo9abPq83xXqYhAK zWo2ZS$%e^h%ht%AmK~)bG%cDJErnJ}J5C#>y<4KR#Ayj<$@V3!ONN%r%Pp02l;g-1 z$+gMdmU|~pmv@s-mft1cDgRIbrJ$z}sF0L~^( zu2np!*sp&$r=+app_HyvrF21QMwzDUsGOu+u6#y$T7{xwufkO+S2?TllrBqmqNmU+ z>Amz>RYg@#RiSFV>VWEknzmY~TE1GF+Cz1MIzv5PyLvhF_J8+x#w zgi;89Ete8nzgY8PSY1jmyXF)a;mc^>(B7bo*HQ1NNg1st!zt28YLv>W*y3CdWx9U8f|c zqfXDAO`Q48?auQqHZJR2&bcD49D$*}0K=CFVH zaM$p%@X-k4h;j2>R4y()XvmDLKXQ&yjj zk&I!+oQOrohQ}U>eb4k~HZbSnyy9x(W?3$*y{ut1`L-RMF2=zfecGML3pepIMXnCMzuKM7DG`FS|cSFK2ts zWUhPew`);rS!;XpRP#3FjjeN9SHB)wAGf||gZhSo4HFwZHXhzY*p$5Kr+j~t{IdL4 zo5MGE7bq2MEEwP7v8AO@qL5!WvekBL-8R%V?zVyL=G&{be=K4bT`e{#t|)$A!YaA? zjp;X)-+bB;zhj`(vULAW%ue3U;av{94wp%n<(7@__S@Z2PA@Mif3+uO&y|X06?J4sZ|LsrRVw zXwYh?IEXozdGJYNSYzL}jBlHp6q<^gJ{;m58a*6zxVPD=x%r6Vks>dj zZ*&hXA3QVUFm(Q=>&<^lx4dp$yS?J};Be^hossB~(L3xrQ+HGDzPOipZ{hyN2j~Yy z52YSfJW_nr@U!mEZKIZ>r^j5!`X2{BzCX?yfA&kpFYhM`o{*nZOsY&aPnk`fns%SQ z@pR?WiD&807G?^6mHxH%xz6(+eslb-e>P%v;syW3r{7Cn%D;a+^lI6wp1FXzN3T;~ zFU%Lck$-deE#qz9yYP3D3t8{6?<+s(e(3(_^YOu_)K8!O1p}D#{JO;G(*OVf32;bR za{vGf5&!@T5&_cPe*6Fc02*{fSaefwW^{L9a%BKeVQFr3E>1;MAa*k@H7+qQF!XYv z000JINklHL=2**OPxWlLk&>EyxdLJqDVxw;#u+5`2<{g=Ab3#l zkf6$dYwqz38D!CcC^jIOM=*?B9x;a$Mr=a&8HbQ~RPeaq3Bi+sy#`!!k7vjr3rTcc zg1PAV$mM^CMUbM`7{|$DhR8G0J}0OV)H&cD&yayAI!X{*cJxBY`G^r}jTD9$nnz3| zaE9Z!;6=g9g8hO<1FrQREi%ZWgD%m;7B-b+?!~Yp=Mtj_3?aQzQVa=0^}KP?AZ?SN zS_iAHBm+wP2s1abJD>)Pc5^U%EQm zuk>_xW&~LWdN0$})o}$`bkH?6u!T)*;{%^T)S@D$(IQ!^1caVmLaM2yrTM#$&YipV z_x$`)I-UMU3`PEsnHSj)KY0JT=zedahb?Sk8z1hcwI$|a`x zMM5$`k_Wu*%_O?y%QaDIDuI-~V2QQ0wIys})7Zub#B@anB}RU+tdN)tBXiLK-aeD% z49li>B#!JJ`JXp7gH2-_ANbVube&ibwwpg5YJNQ>*Uad=;+;$f=10zyN(|j#YQcY| zv5gOWMiOJTN9bVz#K^B#1w9tAQc0cF5Sq zhZ4hoC^05hh&?NKK|qooE(5W{#x_3i38@WkOQU+p2jBR{uNQ{XNq3s}s z@6d>a5j$Fjh#hqzhHv1_vD<-IFdcu%Z~c#9>>J8k8L=H=?u4upY*>!%L~JKwTeXP) zzjN$Xtd%1na`6E=-)d}x1BC6pM&Gq(&y^{*iot9z%vzi%;<$)v}|#@;A~9J1r% z<8O*?s;~FdVk}nsHZ}#=w#!gKWziQgh{2iz1cp;fQ8x>BiRKGme>F5KRiCwqiHT1K z1_oX-`Jsmm+G^Rna&U04VRCZvGto&64ShL_4Q!cc@wJZ+E!^3}*3W;EU~7bMV3#^6 zjR$oyF+9@O+k16tYHDs}W#xueTEg1p<>ecbmoEKz^5lsnbj=WA3!84KlT-?RLDa0| zhnTN8Ot`6IVQ_zKP4!!?Er}mHJKHaJcXcdB0U2b`LD$&87B<!%@WCa=KQoF+?w8 z0)~*`;LU0kP(p7v;97t0(ISH^I_P4 zC8yEDD7|%$1*zLA^r+B19#leFJ=7Aq^2xP%Z>4W07fIi7Gtsmos_UGuRp)ks7Yv=t zY(ru$*$|?|oRt?u$9JP>V#TbFw(O?ZSVAQe6C3PfHjPp`^e@Co5get!&};wz002ov JPDHLkV1n8$TeAQF delta 3944 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 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..afb2ecab20b60704f399da33ab2322a368617f9a GIT binary patch literal 1132 zcmbVLOK8+U7>*QIQHz2ev?>k})IxXj*xh6ky4GwSy6Dz+yI_$XOq1C*Zj*`0)NG4~ zsvw9j^q>fWdh?_Rq6fi>4^$LH6pNm`ih`n`hzL%$-RhxuFeI6ofBx_L-$#48x3(^7 zTSQS*YjK-aChH3F@e32=KXBmZ2C}TedOz+%RUDZCq!b$sLQr(gAy|f{J+|)&?4+oc zs#EF5{iPkUh1`@G>!j+gPtX+A*;V&Vs|GO`ghP&(r$61Eq=94S>0Q|pTk=&n>}(qk zVBdIm#Tu_!l1+DQ2Ay@85V#PVpze-%p1n6>OFckE0R-7p zI%%;S2LvI-WwL_6bpW2_c!njfkmNFQR*-oS%se!)7T8s}tQj-5$SF?`W9-We6Gc%f zN~cgT#Bh=%#T-1JBpS(Z%)@3q>4oc?3>plr!11wzJP47q8DP*vtZM%L+s9Ag@0mYHGn2YK?R|aW(V{PBaFgf zo{gfgJuc65v>FVY{m?c7F=}L^?3u&bB@|%nlFq$ixI>G}f*)K9I4xP}G!4{q4u8 zr>zrUN#fn>u?MHuJkJg+*m`$+a_I@KclEu4_m{p`Ixe1CxwwP2oo8#7|6sZ{vTt5Z z9^1R_%D$F`%fOb2`5lwr?yNii^Nw0u^)PCPs1uiNByJ_nP9Cncu&b{h-y5|lUwTU) z+xo^wr-_PJMsWex}!Y@j3DM+(2|v`y8sjZt^dsYacGF6Z5DaU+>}Smfh{~ N{1^3Z?P_7qq2IA%Z4v+g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bbcece2fdca08cbf3e9ab0ae2ee5b21f3770645a GIT binary patch literal 1152 zcmbVMO=uKX93K)eZ8Q=}pc*`kBej)g=WBOocZRI#d?rh?al2VekfNE)ykv*$%o}H3 zvYRv&6fG$M;O2%;t1qZRPnhClwT9eDh7di5Zl_9A@{^}`WVF#|xzHXH_I)-^{# z0hspW$tBQ95RD^FaS#pWdL;|Gv>D0JRoBO8g6Qn3`ldAo5IGD+9WO(zT)s+?j-8XA~$Rr()SuDqqfBYup7M%4!)3-_W*WORSMdrDZLprZraQIZozMnvzy|MNTF( zUQp^BTVlmTQdP9HuB74|r}K)U$Z|>*;{vaVvZ~jySuaGUXMwt2C(^r)O>K*n)Bu+-}=Xt{rRYPUt zx*Yi}>T%sLIN4wmN=i%f)CSgmlbA8s7$z!?*NUZngex#wZk9gYY&H+@aK{9=HEy&Y z-G|%ix2z@?s}G)hpV@upqt7*h!=BtX4WE6DexcqC_LSQvw1HCxZ`**5iO=8v z|K_bOP-{9=`1|wI9YM?D)7tW}zKP#EX6IIZYCXTd?Z1B>?W*OKx8M7&KHQ_9%q^Ce u9{haveDE*4G~4|{>B`kV8m4<+yfZ}1EZteUs5Ul5|AegGr~Rr7op}jh$bCBi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..0e210b268bb55e49eb33d951d4f3948bb7989394 GIT binary patch literal 663 zcmV;I0%-k-P)N2bPDNB8 zb~7$DE-^4L^m3s900I+9L_t(|UhQ1LZo?o9B1f!5XYf`h z0s{rtL_mrnMKK4-9Eke^i0k!-?mp%qYeVuDQnUwvVdFJxw&aaUpHb-}LS&P8_YE*h zxrxzRP!Isu@*fJa@?)l!v&gVQfPyUgpddwGAGIjO!s_psgDmC*LctbQ xNr?#xrm)pwUnm%>%HnN5(_4R7*I2()zaLo*a7GzR$U*=B002ovPDHLkV1j018j%11 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png old mode 100644 new mode 100755 index ed543f1ca54c5e584b3eb91e24e115304e52aeb2..568bd40a6ac9cde6725dedcc4590000560d8082e GIT binary patch delta 4774 zcmV;X5?Sr}A+{xuBs~OYK}|sb0I`mI`%#ks001CkNK#Dz0EZ6%0E`a+0R2(`0D(XN z0DXA?0O^YW06gUY02$14JcV}v017#gIvamT$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n6F&ITuEN@2Ei>|D^ z_ww@lRz`oi zU$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6cm;e!*vpE?o5f_L!B}hR1Px(02F^oY!`4?i6S-;F^L}%k0Z0NWkO#^@9q0f3Xv3lIchAu>dPU)xk0{A5EKc;LJ1HL5<+>H9&h}K8jpuNx$=mc~Yx)5D~ zZbG-CFQRXwC(y4k7z_=gjj_UbVj?j~n6;P^%sxyT<{V}aGmd|m!(y@WSbeM=)*s8n z3b2LPD(q40S?myY0{aF>#HrxSaPGJ$91oX|tH2$>oxu&^CUFaRDZD1$2Jeq&<8$z( z_(ps;{yKgFzd(>CXcO!RA%rBtCPF2lm2i>pfbfz?B&rduiGf5eaU-#kc#L?NI7WO+ zk|F7lTu9L*A!&aH=@980=`QIdnM~FqJCdWw0`d-WGx-Af5&4Y-MZ!qJOM)%2L83;Y zLt;qcxg=gvQ_@LtwPdbjh2#mz>yk54cquI@7b&LHdZ`+zlTss6bJ7%PQ)z$cROu4w zBhpu-r)01)S~6}jY?%U?gEALn#wiFzo#H}aQ8rT=DHne!6I2XUo9abPq83xXqYhAK zWo2ZS$%e^h%ht%AmK~)bG%cDJErnJ}J5C#>y<4KR#Ayj<$@V3!ONN%r%Pp02l;g-1 z$+gMdmU|~pmv@s-mft1cDgRIbrJ$z}sF0L~^( zu2np!*sp&$r=+app_HyvrF21QMwzDUsGOu+u6#y$T7{xwufkO+S2?TllrBqmqNmU+ z>Amz>RYg@#RiSFV>VWEknzmY~TE1GF+Cz1MIzv5PyLvhF_J8+x#w zgi;89Ete8nzgY8PSY1jmyXF)a;mc^>(B7bo*HQ1NNg1st!zt28YLv>W*y3CdWx9U8f|c zqfXDAO`Q48?auQqHZJR2&bcD49D$*}0K=CFVH zaM$p%@X-k4h;j2>R4y()XvmDLKXQ&yjj zk&I!+oQOrohQ}U>eb4k~HZbSnyy9x(W?3$*y{ut1`L-RMF2=zfecGML3pepIMXnCMzuKM7DG`FS|cSFK2ts zWUhPew`);rS!;XpRP#3FjjeN9SHB)wAGf||gZhSo4HFwZHXhzY*p$5Kr+j~t{IdL4 zo5MGE7bq2MEEwP7v8AO@qL5!WvekBL-8R%V?zVyL=G&{be=K4bT`e{#t|)$A!YaA? zjp;X)-+bB;zhj`(vULAW%ue3U;av{94wp%n<(7@__S@Z2PA@Mif3+uO&y|X06?J4sZ|LsrRVw zXwYh?IEXozdGJYNSYzL}jBlHp6q<^gJ{;m58a*6zxVPD=x%r6Vks>dj zZ*&hXA3QVUFm(Q=>&<^lx4dp$yS?J};Be^hossB~(L3xrQ+HGDzPOipZ{hyN2j~Yy z52YSfJW_nr@U!mEZKIZ>r^j5!`X2{BzCX?yfA&kpFYhM`o{*nZOsY&aPnk`fns%SQ z@pR?WiD&807G?^6mHxH%xz6(+eslb-e>P%v;syW3r{7Cn%D;a+^lI6wp1FXzN3T;~ zFU%Lck$-deE#qz9yYP3D3t8{6?<+s(e(3(_^YOu_)K8!O1p}D#{JO;G(*OVf32;bR za{vGf5&!@T5&_cPe*6Fc02*{fSaefwW^{L9a%BKeVQFr3E>1;MAa*k@H7+qQF!XYv z000NUNklGT3=x^VHeR^Z&SxBM3+Eg? z{21nV8QdUbOAlnFzmIGd$y9F(*$Uqh{JyGvb*%O6q8p#_%G=X58oVb0CfkWO<_Kk~guzlf=eeJ|>au^PnTBC4jpWCr6Hm9O3n#0Z%+(csdw= z(2gC$A;WVyU<_lKb0Ek-7BZ2I4!ns@baR8_BnKi0ISLAQOP)gk`9ZF5hY2n2Iv$u0 zhC+YndBYLIi-wmBFS{e>0@oPBSmrPnvdBUvveAJqbfP;>5*s6eoO@439@L<4^r5MO zqOkPjxYLB$LNIPI5IJVY*9<2NOF3W+W0?bCWIz;|$VP`J*|xv2g`C7TA}n=XOd?2l zdha2~=bSu;VseQPwpaP@z} z4@Ty?;d8^hVQ=0(QP&x3I2h($Us=2O)7-xOZzDVCKo>gEjSbj>P4Z$QLA(C{k6oAt zSF3Uo-`pX2kIvWIva<-Pa&m{{J=P{dlL~)F5g<=aF0XD~h1^bw#pff_WdDecpbMSo#s+Nh zUMx&d`3FJ5lakDx^4_D26Pm{t4lQ0XL;f*L4T0bkveALApcCD3FJhy9SN3hdBM;h% zE-3#Lo^89vvOwHFZeStiPO^?ISyA}TjJQ%YIhUJP(1EU?6W!Q=E!c!@*hqiPxFHX- z2vR+@G!P0@PPS6YJ(B+v)sliTM1u3^K$iiX%0+C!CTuH3Pz6Q=`8h*bCb3mHU$Aq^ z_&ZkK|1yHpLnJtj4s->b=vGC=CTzn-7JF>Z4N(Tg^N$@q<(UOn;rY6qpJt647C9HD zJZfZPfKE~a8?XhNu#Fml%_4u;tERo@FH>kA32+2DVnqBP6&SbfOy@s0G-BZP++4K@}Kw_LOLH zfQ>OZu`)t}D?ul^u>o7KNrk2~K^_3%K@nu_A-VZ!!@|o3d3A&YSA%~}bYlayVADVZ zSpy-c9Spy)si16n*}W_oNcy!A5?l*9(Txq*f=$?l6R=skncO1d3Hl|%SJ3xO;JFbJ zJZJjQ=_@G&wNw-)$c}))+Jn}KAhzdL(KLd74SXZq&70vtbo;f?d$2S?b_i^;{UZO0 z{f&|j4C^Bd(eXHfC1(tmM7W5vR5Uh&_&4JDKV6zE^U3YVHa6+)| z%f!Tk6AuozQ;M~gUDLojnMsIFLUau^q)(UA~Pv6^(`_yHq=9> zMn04A1bIX^?vD)%J#^yXX``Qu#tHJ&xN%Rmd6CiRcM}lQ>$88xzFlhk`$1Yr>iUMa z_ntoK6*d=|@Qyy0ARPjyI<7xM#cZUH61)ZNHm{r$yGMJ^tH?+I;y^hM@PNn$*ch zdZgP1eMb@hc8P^}?7v;oEA2Fr_5AwGJp|U0p@O5TDo=mvgOPfDKbS%=iKIT*(zk@3 zC|$xl2>_II9<67AF&fWYLZ2sk$jti!ln9Hu3zOE}#1|v{V02J}o5Ho;-|!~vY<#$i zq$(_1I>Hu@`VW@J`z!1mlK$(^I8n%Y!un2L-`{fdxOv~vXON70)O%Hg6~=hDD3}9~ zAs{=-vshm0M2{x2_Pm8(P9_OY$WwV&hIwPN&NW_SqQ=%Vy+t?jg$a6rIb?l-s`R`l zsXki=nUon41O7iVRofAzSXF|}tMs!}hN|rP7a=VIO6TB4Z2$lO07*qoM6N<$g3*c# As{jB1 delta 4326 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 Ur#`%gV*mgE07*qoM6N<$f)U~cQ2+n{ diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_bg.#.png old mode 100644 new mode 100755 similarity index 88% rename from res/common/usr/share/osp/bitmaps/480x800/00_popup_bg.#.png rename to res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_bg.#.png index a9edb496fcbb973da9987fe452df28d1baaf03e3..802bdb445adcea5a245d4a94183f5abed887fea8 GIT binary patch delta 284 zcmaDUzFu6hGr-TCmrII^fq{Y7)59eQNXr7T7Y7@VbeD*C*r+&8P(k4v7CFGwFCF*rMX<})jX&1seXd%Cy%GDcbR{;@cARN@>G7I z*&iVb@2?+r@7OQ6O%=EQwvX~3#rzT6-h06S{Jd)b!1(*VL=z+SXA$=P}JE4=%(4jpv-7KeU9RIR0 pn86HYu!ZDyic$8`J!R+n9RNc5DQ~gSIuOK!U&63NiNZ!=G`dU!K7bj42#92a2aLoAP4=Kc@qv(;n2?D}Bu0$kiG^Qpcaw*O2b;FP z-|yS+=kxvFiO!Dwn;M%M34+*^Z`F!;-HM;KXExyX{+Ie%@bWU!dr>zmql)1JLbhN( zAoGqf0E)n{Mi0$_3_+|b+ofLATWFU|=){dkCmuQ;MiWG)IrI#32q3Z_4A^d#`s?}) zinOgP)x#H4<~lVpt;&?O^A zqaTi-EQLK?4#DvXg%x5qs3i)gj1CQtX5$R)I8j_x?En?Qe{QU*9h62rKo>y(M|>04 zqrANi#<_dCp-2&XBfak1xG2W32F(!%xG1k>Df}gF*_OoQl445ML^Y)`I>)jyD{4wg zlV}v0BJ$aw)v?=N+SQyydy|zkS+p`it9oruE+9v|M@i%dVdD%-L%vcfU3{ zJG*pFe9&^B(tMy~b^Xx3FZRa2pWW=)c}BSPdE3z~AMEzk3$J|iP;lYhA8*V)Ix+Y6 zukF{5FSNd!al##fd+LQN_piPG?LX6(4;^e?Y8Y#8c(0_EhL0sDe)@jz?TzBk+vavS z;Nq>*GZ(sN4$uG6XHM;Hdhp`SW0SwHxjI#DY#VrM^Tdf=U1zk3rHxJB7)Oqr{i<*A y>kp4Vzq9S*s`$wbx`Y<*O@5;PF|#l~O{^pCt{q>voLTc-^drgZ9oi-3?eWKfqL!%u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..0e210b268bb55e49eb33d951d4f3948bb7989394 GIT binary patch literal 663 zcmV;I0%-k-P)N2bPDNB8 zb~7$DE-^4L^m3s900I+9L_t(|UhQ1LZo?o9B1f!5XYf`h z0s{rtL_mrnMKK4-9Eke^i0k!-?mp%qYeVuDQnUwvVdFJxw&aaUpHb-}LS&P8_YE*h zxrxzRP!Isu@*fJa@?)l!v&gVQfPyUgpddwGAGIjO!s_psgDmC*LctbQ xNr?#xrm)pwUnm%>%HnN5(_4R7*I2()zaLo*a7GzR$U*=B002ovPDHLkV1j018j%11 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png old mode 100644 new mode 100755 index ed543f1ca54c5e584b3eb91e24e115304e52aeb2..568bd40a6ac9cde6725dedcc4590000560d8082e GIT binary patch delta 4774 zcmV;X5?Sr}A+{xuBs~OYK}|sb0I`mI`%#ks001CkNK#Dz0EZ6%0E`a+0R2(`0D(XN z0DXA?0O^YW06gUY02$14JcV}v017#gIvamT$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n6F&ITuEN@2Ei>|D^ z_ww@lRz`oi zU$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6cm;e!*vpE?o5f_L!B}hR1Px(02F^oY!`4?i6S-;F^L}%k0Z0NWkO#^@9q0f3Xv3lIchAu>dPU)xk0{A5EKc;LJ1HL5<+>H9&h}K8jpuNx$=mc~Yx)5D~ zZbG-CFQRXwC(y4k7z_=gjj_UbVj?j~n6;P^%sxyT<{V}aGmd|m!(y@WSbeM=)*s8n z3b2LPD(q40S?myY0{aF>#HrxSaPGJ$91oX|tH2$>oxu&^CUFaRDZD1$2Jeq&<8$z( z_(ps;{yKgFzd(>CXcO!RA%rBtCPF2lm2i>pfbfz?B&rduiGf5eaU-#kc#L?NI7WO+ zk|F7lTu9L*A!&aH=@980=`QIdnM~FqJCdWw0`d-WGx-Af5&4Y-MZ!qJOM)%2L83;Y zLt;qcxg=gvQ_@LtwPdbjh2#mz>yk54cquI@7b&LHdZ`+zlTss6bJ7%PQ)z$cROu4w zBhpu-r)01)S~6}jY?%U?gEALn#wiFzo#H}aQ8rT=DHne!6I2XUo9abPq83xXqYhAK zWo2ZS$%e^h%ht%AmK~)bG%cDJErnJ}J5C#>y<4KR#Ayj<$@V3!ONN%r%Pp02l;g-1 z$+gMdmU|~pmv@s-mft1cDgRIbrJ$z}sF0L~^( zu2np!*sp&$r=+app_HyvrF21QMwzDUsGOu+u6#y$T7{xwufkO+S2?TllrBqmqNmU+ z>Amz>RYg@#RiSFV>VWEknzmY~TE1GF+Cz1MIzv5PyLvhF_J8+x#w zgi;89Ete8nzgY8PSY1jmyXF)a;mc^>(B7bo*HQ1NNg1st!zt28YLv>W*y3CdWx9U8f|c zqfXDAO`Q48?auQqHZJR2&bcD49D$*}0K=CFVH zaM$p%@X-k4h;j2>R4y()XvmDLKXQ&yjj zk&I!+oQOrohQ}U>eb4k~HZbSnyy9x(W?3$*y{ut1`L-RMF2=zfecGML3pepIMXnCMzuKM7DG`FS|cSFK2ts zWUhPew`);rS!;XpRP#3FjjeN9SHB)wAGf||gZhSo4HFwZHXhzY*p$5Kr+j~t{IdL4 zo5MGE7bq2MEEwP7v8AO@qL5!WvekBL-8R%V?zVyL=G&{be=K4bT`e{#t|)$A!YaA? zjp;X)-+bB;zhj`(vULAW%ue3U;av{94wp%n<(7@__S@Z2PA@Mif3+uO&y|X06?J4sZ|LsrRVw zXwYh?IEXozdGJYNSYzL}jBlHp6q<^gJ{;m58a*6zxVPD=x%r6Vks>dj zZ*&hXA3QVUFm(Q=>&<^lx4dp$yS?J};Be^hossB~(L3xrQ+HGDzPOipZ{hyN2j~Yy z52YSfJW_nr@U!mEZKIZ>r^j5!`X2{BzCX?yfA&kpFYhM`o{*nZOsY&aPnk`fns%SQ z@pR?WiD&807G?^6mHxH%xz6(+eslb-e>P%v;syW3r{7Cn%D;a+^lI6wp1FXzN3T;~ zFU%Lck$-deE#qz9yYP3D3t8{6?<+s(e(3(_^YOu_)K8!O1p}D#{JO;G(*OVf32;bR za{vGf5&!@T5&_cPe*6Fc02*{fSaefwW^{L9a%BKeVQFr3E>1;MAa*k@H7+qQF!XYv z000NUNklGT3=x^VHeR^Z&SxBM3+Eg? z{21nV8QdUbOAlnFzmIGd$y9F(*$Uqh{JyGvb*%O6q8p#_%G=X58oVb0CfkWO<_Kk~guzlf=eeJ|>au^PnTBC4jpWCr6Hm9O3n#0Z%+(csdw= z(2gC$A;WVyU<_lKb0Ek-7BZ2I4!ns@baR8_BnKi0ISLAQOP)gk`9ZF5hY2n2Iv$u0 zhC+YndBYLIi-wmBFS{e>0@oPBSmrPnvdBUvveAJqbfP;>5*s6eoO@439@L<4^r5MO zqOkPjxYLB$LNIPI5IJVY*9<2NOF3W+W0?bCWIz;|$VP`J*|xv2g`C7TA}n=XOd?2l zdha2~=bSu;VseQPwpaP@z} z4@Ty?;d8^hVQ=0(QP&x3I2h($Us=2O)7-xOZzDVCKo>gEjSbj>P4Z$QLA(C{k6oAt zSF3Uo-`pX2kIvWIva<-Pa&m{{J=P{dlL~)F5g<=aF0XD~h1^bw#pff_WdDecpbMSo#s+Nh zUMx&d`3FJ5lakDx^4_D26Pm{t4lQ0XL;f*L4T0bkveALApcCD3FJhy9SN3hdBM;h% zE-3#Lo^89vvOwHFZeStiPO^?ISyA}TjJQ%YIhUJP(1EU?6W!Q=E!c!@*hqiPxFHX- z2vR+@G!P0@PPS6YJ(B+v)sliTM1u3^K$iiX%0+C!CTuH3Pz6Q=`8h*bCb3mHU$Aq^ z_&ZkK|1yHpLnJtj4s->b=vGC=CTzn-7JF>Z4N(Tg^N$@q<(UOn;rY6qpJt647C9HD zJZfZPfKE~a8?XhNu#Fml%_4u;tERo@FH>kA32+2DVnqBP6&SbfOy@s0G-BZP++4K@}Kw_LOLH zfQ>OZu`)t}D?ul^u>o7KNrk2~K^_3%K@nu_A-VZ!!@|o3d3A&YSA%~}bYlayVADVZ zSpy-c9Spy)si16n*}W_oNcy!A5?l*9(Txq*f=$?l6R=skncO1d3Hl|%SJ3xO;JFbJ zJZJjQ=_@G&wNw-)$c}))+Jn}KAhzdL(KLd74SXZq&70vtbo;f?d$2S?b_i^;{UZO0 z{f&|j4C^Bd(eXHfC1(tmM7W5vR5Uh&_&4JDKV6zE^U3YVHa6+)| z%f!Tk6AuozQ;M~gUDLojnMsIFLUau^q)(UA~Pv6^(`_yHq=9> zMn04A1bIX^?vD)%J#^yXX``Qu#tHJ&xN%Rmd6CiRcM}lQ>$88xzFlhk`$1Yr>iUMa z_ntoK6*d=|@Qyy0ARPjyI<7xM#cZUH61)ZNHm{r$yGMJ^tH?+I;y^hM@PNn$*ch zdZgP1eMb@hc8P^}?7v;oEA2Fr_5AwGJp|U0p@O5TDo=mvgOPfDKbS%=iKIT*(zk@3 zC|$xl2>_II9<67AF&fWYLZ2sk$jti!ln9Hu3zOE}#1|v{V02J}o5Ho;-|!~vY<#$i zq$(_1I>Hu@`VW@J`z!1mlK$(^I8n%Y!un2L-`{fdxOv~vXON70)O%Hg6~=hDD3}9~ zAs{=-vshm0M2{x2_Pm8(P9_OY$WwV&hIwPN&NW_SqQ=%Vy+t?jg$a6rIb?l-s`R`l zsXki=nUon41O7iVRofAzSXF|}tMs!}hN|rP7a=VIO6TB4Z2$lO07*qoM6N<$g3*c# As{jB1 delta 4326 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 Ur#`%gV*mgE07*qoM6N<$f)U~cQ2+n{ diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_bg.#.png old mode 100644 new mode 100755 similarity index 84% rename from res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg.#.png rename to res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_bg.#.png index 79ea0c3b332bb5deceb7e4a285324f4c309a8a07..802bdb445adcea5a245d4a94183f5abed887fea8 GIT binary patch delta 284 zcmcaDv0hxUGr-TCmrII^fq{Y7)59eQNXr7T7Y7@VbeD*C*r+&8P(k4v7CFGwFCF*rMX<})jX&1seXd%Cy%GDcbR{;@cARN@>G7I z*&iVb@2?+r@7OQ6O%=EQwvX~3#rzT6-h06)b?^zJ?5eI~~OVjw%`g<_;!XWE$re3v3tpsgWb%!rXPd`*Dr- z&f>D~7jwd9em$bt8KkSUkF7iCai7NRMIS2O7<>>@o&KVJ%R%=G4$QnJ5aPgm%fl@X zrX@Hoh+pSg{C>&gogVe4c3+5i5tOm>*z)O4*PV7perB99-Ipc#fuKd+&C9|CO+QX} zY%rew!j*~d!HSow-G3$+u*L})moc(;Y~Sbd!RDuh(k#1b;e)IjrtkS5+VOXr;2EZ} z;&%(nRx4Fc{-`ervwMSqfs%+|-vc$~!}kyJ<|*4hGzGh<9?5wihZf9kcqP2y6+^^V z&Wiht9~2i)USl*#@`F#_(#wjEwqD(G>6FK-&NIS`&GWlY_a?|5Z48&bCTzvJ?%Ewj z);kR8k~>1z&t%=W`p}J)7v=_hZCASS{n@=p@#2s7U-Li%0U8|Jg=c&_G$&s^|My9+ gBf)$d?ARH6=B@Z$zjVIuOK!U&63NiNZ!=G`dU!K7bj42#92a2aLoAP4=Kc@qv(;n2?D}Bu0$kiG^Qpcaw*O2b;FP z-|yS+=kxvFiO!Dwn;M%M34+*^Z`F!;-HM;KXExyX{+Ie%@bWU!dr>zmql)1JLbhN( zAoGqf0E)n{Mi0$_3_+|b+ofLATWFU|=){dkCmuQ;MiWG)IrI#32q3Z_4A^d#`s?}) zinOgP)x#H4<~lVpt;&?O^A zqaTi-EQLK?4#DvXg%x5qs3i)gj1CQtX5$R)I8j_x?En?Qe{QU*9h62rKo>y(M|>04 zqrANi#<_dCp-2&XBfak1xG2W32F(!%xG1k>Df}gF*_OoQl445ML^Y)`I>)jyD{4wg zlV}v0BJ$aw)v?=N+SQyydy|zkS+p`it9oruE+9v|M@i%dVdD%-L%vcfU3{ zJG*pFe9&^B(tMy~b^Xx3FZRa2pWW=)c}BSPdE3z~AMEzk3$J|iP;lYhA8*V)Ix+Y6 zukF{5FSNd!al##fd+LQN_piPG?LX6(4;^e?Y8Y#8c(0_EhL0sDe)@jz?TzBk+vavS z;Nq>*GZ(sN4$uG6XHM;Hdhp`SW0SwHxjI#DY#VrM^Tdf=U1zk3rHxJB7)Oqr{i<*A y>kp4Vzq9S*s`$wbx`Y<*O@5;PF|#l~O{^pCt{q>voLTc-^drgZ9oi-3?eWKfqL!%u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png old mode 100644 new mode 100755 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_right_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_right_ef.png index b94eb15dc4727cfe6cf6c3e89023812198d83291..1a377a260626407c917bfce786f1e7e9fd2798ae 100644 GIT binary patch literal 1167 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`VCv@RWM<^%YU%1^Xy|HWVQgvYV&Z0G;^gXP z=HhGu)9aF-T$-DjR|3?5_38s1qYsK$q=<$I0aFi%2~V~_4m{zf<^fZC5inV|r;B`KU|?kSba4!+ zxb^17M&70X0k#AKo(0l3ZW=M=FiG#|%xjRgV9HytR(9!9zYjK#v^iLN|JU#FemBWp zL}mJVh5p^s+XalWx1QvgwpjLUhP(Bxi+yg3th-;h3HLc|pY?(1%5$UNK2h8mp%skp zmNV&d*#7)bcvopD=l)l!(JA?ARb2a(AMQMq6z#cgl4FqfJ+ZpS+dJ-h`*pPKd?b3v z@zbOlv3vHx&ibL6FIBCzgX2UGHc!2{WoE-`k#m{1Ecco1@c#ImiG6+JKj}5SZ4IUu z4K|2Lab279$x3^%ChHlO%LjB!M0;GOf2>Sto;cfkhVHg2)%;hceD64KEIsFv(1Y;3 feQsC78yFcf)0c2W&IvyWDk3~x{an^LB{Ts5g_n%U delta 3338 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 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..71f46fc45437ae172e392f2a78c49a77b2b4ce99 GIT binary patch literal 676 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 +#include +#include +#include + +#include +#include +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::App; +using namespace Tizen::App::Package; +using namespace Tizen::Io; +using namespace Tizen::Graphics; + +namespace Tizen { namespace App +{ + +const wchar_t* _coord_info_file = L"uiscalability.info"; + +result +_CoordinateInfo::GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + result r; + + r = _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(isCoordinateSystemLogical, logicalCoordinateSystemInt, logicalBaseScreenSize); + + if (r != E_SUCCESS) + r = _CoordinateInfo::GetAppCoordinateSystemFromDatabase(isCoordinateSystemLogical, logicalCoordinateSystemInt, logicalBaseScreenSize); + + return r; +} + +result +_CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + // Get UI scalability info from info/[appId]uiscalability.info + String uiScalabilityInfoString; + result r = E_SUCCESS; + const String appId(_AppInfo::GetApplicationId()); + SysTryReturnResult(NID_APP, appId != null, E_OBJ_NOT_FOUND, "[%s] Cannot get application id", GetErrorMessage(r)); + + { + File uiScalabilityInfoFile; + const String scalabilityInfoFilePath(L"info/" + appId + L"/" + _coord_info_file); + + // Get UI Scalability Infomation + r = uiScalabilityInfoFile.Construct(_AppInfo::GetAppRootPath() + scalabilityInfoFilePath, L"r"); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = uiScalabilityInfoFile.Read(uiScalabilityInfoString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + StringTokenizer infoTokenizer(uiScalabilityInfoString, L" "); + + // Check MagicNumer of UI scalability info + { + String magicNumString(null); + r = infoTokenizer.GetNextToken(magicNumString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int magicNumber = 0; + r = Integer::Parse(magicNumString, magicNumber); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "[E_SYSTEM] The magic number(%d) is invalid.", magicNumber); + } + + // Get Application Coordinate Status (Logical or Physical) + String coordinateSystem(null); + r = infoTokenizer.GetNextToken(coordinateSystem); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (coordinateSystem.Equals(L"Physical", false)) + { + isCoordinateSystemLogical = false; + logicalCoordinateSystemInt = 0; + logicalBaseScreenSize = BASE_SCREEN_SIZE_DEFAULT; + + return E_SUCCESS; + } else if (coordinateSystem.Equals(L"Logical", false)){ + isCoordinateSystemLogical = true; + // Get Base Screen + String baseScreenSize(null); + r = infoTokenizer.GetNextToken(baseScreenSize); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + // logicalBaseScreenSize + if (baseScreenSize.Equals(L"Large", false)) + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; + } + else + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + // Get Application Logical Resolution + String logicalCoordinate(null); + r = infoTokenizer.GetNextToken(logicalCoordinate); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SysLog(NID_APP, "The current values of UI scalability information are coordinate status : %ls, base resolution : %ls and logical resolution : %ls.", coordinateSystem.GetPointer(), baseScreenSize.GetPointer(), logicalCoordinate.GetPointer()); + + } else { + SysLog(NID_APP, "Cannot recognize the UI scalability information (check [app_root_dir]/info/%ls/%s", appId.GetPointer(),_coord_info_file); + return E_FAILURE; + } + + return r; +} + +result +_CoordinateInfo::GetAppCoordinateSystemFromDatabase(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + _PackageInfoImpl infoImpl; + + { + result r = infoImpl.Construct(_AppInfo::GetPackageId()); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + String baseScreenSize; + String coordinateSystem; + String logicalCoordinate; + + result r = infoImpl.GetUiScalabilityInfo(baseScreenSize, coordinateSystem, logicalCoordinate); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (coordinateSystem.Equals(L"Physical", false)) + { + isCoordinateSystemLogical = false; + logicalCoordinateSystemInt = 0; + logicalBaseScreenSize = BASE_SCREEN_SIZE_DEFAULT; + + return E_SUCCESS; + } else { + isCoordinateSystemLogical = true; + } + + //Logical Resolution + r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // BaseScreenSize + if (baseScreenSize.Equals(L"Large", false)) + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; + } + else + { + // temp + logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + return r; +} + +} } //Tizen::App + diff --git a/src/app/FApp_ThemeInfo.cpp b/src/app/FApp_ThemeInfo.cpp new file mode 100644 index 0000000..5b9ee9a --- /dev/null +++ b/src/app/FApp_ThemeInfo.cpp @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_ThemeInfo.cpp + * @brief This is the implementation for the _ThemeInfo class. + */ + +#include +#include +#include +#include + +#include +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::App; +using namespace Tizen::App::Package; +using namespace Tizen::Io; + +namespace Tizen { namespace App +{ + +const wchar_t* _theme_info_file = L"uitheme.info"; + +result +_ThemeInfo::LoadThemeInformation(String& systemTheme, String& userTheme) +{ + result r; + + r = _ThemeInfo::LoadThemeInfoFromInfoFile(systemTheme, userTheme); + + if( r != E_SUCCESS) + _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme); + + return r; +} + +result +_ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme) +{ + AppId appId = _AppInfo::GetApplicationId(); + SysLog(NID_UI, "AppId = %ls" , appId.GetPointer()); + String uiThemeInfoString; + result r; + + // Get UI theme info from info/[appId]/uitheme.info + { + File uiThemeInfoFile; + const String themeInfoFilePath(L"info/" + appId + L"/" + _theme_info_file); + + r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r"); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = uiThemeInfoFile.Read(uiThemeInfoString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + StringTokenizer infoTokenizer(uiThemeInfoString, L" "); + + // Check magic number of UI theme info + { + String magicNumString(null); + r = infoTokenizer.GetNextToken(magicNumString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int magicNumber = 0; + r = Integer::Parse(magicNumString, magicNumber); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "[E_SYSTEM] The magic number(%d) is invalid.", magicNumber); + } + + // Get application UI theme info (SystemTheme, UserDefinedTheme) + String _systemTheme(null); + r = infoTokenizer.GetNextToken(_systemTheme); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_systemTheme.Equals(L"White", false)) + { + systemTheme = L"white"; + } + else if (_systemTheme.Equals(L"Default", false)) + { + systemTheme = L"default"; + } + else + { + // By default, black system theme + systemTheme = L"black"; + } + SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer()); + + // Get User Defined Theme + String _userTheme(null); + r = infoTokenizer.GetNextToken(_userTheme); + + if (!(_userTheme.IsEmpty())) + { + SysLog(NID_UI, "Custom theme :%ls" , _userTheme.GetPointer()); + userTheme = _userTheme; + } + + return E_SUCCESS; +} + +result +_ThemeInfo::LoadThemeInfoFromDatabase(String& systemTheme, String& userTheme) +{ + AppId appId = _AppInfo::GetApplicationId(); + SysLog(NID_UI, "AppId = %ls" , appId.GetPointer()); + _PackageAppInfoImpl packageManager; + packageManager.Construct(appId); + String key = packageManager.GetAppFeature(L"UserDefinedTheme"); + if (!(key.IsEmpty())) + { + SysLog(NID_UI, "Custom theme %ls" , key.GetPointer()); + userTheme = key; + } + key = packageManager.GetAppFeature(L"SystemTheme"); + if (key.IsEmpty()) + { + systemTheme = L"black"; + } + else + { + SysLog(NID_UI, "System theme %ls" , key.GetPointer()); + systemTheme = key; + systemTheme.ToLowerCase(); + } + return E_SUCCESS; +} + +} } //Tizen::App + diff --git a/src/app/FApp_UiAppImpl.cpp b/src/app/FApp_UiAppImpl.cpp old mode 100755 new mode 100644 index 0ab942b..b55ad62 --- a/src/app/FApp_UiAppImpl.cpp +++ b/src/app/FApp_UiAppImpl.cpp @@ -188,14 +188,30 @@ _UiAppImpl::OnService(service_s* service, bool initial) Frame* pFrame = dynamic_cast(__pFrameList->GetAt(0)); _EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + const int type = _AppInfo::GetAppType(); + + if (type & _APP_TYPE_IME_APP) + { + bundle* pBundle = _AppArg::GetBundleFromSvc(service); + const int pid = _AppArg::GetCallerPid(pBundle); + if (pid > 0) + { + SysLogException(NID_APP, E_SYSTEM, "ImeApp should not be the target for launch API (caller : %d).", pid); + _Process::Exit(-1); + } + } + // make OnForeground event if (pFrame != null) { // handle submode if (pEvas && _AppInfo::IsSubMode()) { + unsigned int win = 0; + service_get_window(service, &win); + _FrameImpl* pFrameImpl = _FrameImpl::GetInstance(*pFrame); - if (pFrameImpl != null) + if (static_cast(win) > 0 && pFrameImpl != null) { const unsigned int curHandle = pFrameImpl->GetNativeHandle(); @@ -203,7 +219,7 @@ _UiAppImpl::OnService(service_s* service, bool initial) const int pid = _AppArg::GetCallerPid(pBundle); if (pid <= 0 || ((kill(pid, 0) < 0) && errno == ESRCH)) { - SysLogException(NID_APP, E_SYSTEM, "Caller process %d not exist : terminating %d.", pid, getpid()); + SysLogException(NID_APP, E_SYSTEM, "Caller process %d with %d not exist : terminating %d.", pid, win, getpid()); _Process::Exit(-1); } @@ -340,7 +356,7 @@ long _UiAppImpl::OnWindowHandleRequest(void) { long handle = -1; - int type = _AppInfo::GetAppType(); + const int type = _AppInfo::GetAppType(); if (type & _APP_TYPE_IME_APP) { diff --git a/src/app/inc/FApp_CoordinateInfo.h b/src/app/inc/FApp_CoordinateInfo.h new file mode 100644 index 0000000..5b94f74 --- /dev/null +++ b/src/app/inc/FApp_CoordinateInfo.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_CoordinateInfo.h + * @brief This is the header file for the %_CoordinateInfo class. + */ + +#ifndef _FAPP_INTERNAL_COORDINATE_INFO_H_ +#define _FAPP_INTERNAL_COORDINATE_INFO_H_ + +//#include +#include +#include + + + +namespace Tizen { namespace App +{ + +/** + * @class _CoordinateInfo + * @brief This class handles the application coordinate system information + * + * This class handles the coordinate system + */ +class _CoordinateInfo +{ +public: + /** + * Get the application coordinate system + */ + static result GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + +private: + /** + * This is the default constructor for this class. + */ + _CoordinateInfo(void); + + /** + * This is the destructor for this class. + */ + ~_CoordinateInfo(void); + + /** + * This is the copy constructor for the this class. + */ + _CoordinateInfo(const _CoordinateInfo& value); + + /** + * This is the assignment operator for this class. + */ + _CoordinateInfo& operator =(const _CoordinateInfo& value); + + /** + * Get the application coordinate system from info file + */ + static result GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + + /** + * Get the application coordinate system from database + */ + static result GetAppCoordinateSystemFromDatabase(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + +}; //_CoordinateInfo + +} } //Tizen::App + +#endif // _FAPP_INTERNAL_COORDINATE_INFO_H_ + diff --git a/src/app/inc/FApp_ThemeInfo.h b/src/app/inc/FApp_ThemeInfo.h new file mode 100644 index 0000000..baad56f --- /dev/null +++ b/src/app/inc/FApp_ThemeInfo.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_ThemeInfo.h + * @brief This is the header file for the %_ThemeInfo class. + */ + +#ifndef _FAPP_INTERNAL_THEME_INFO_H_ +#define _FAPP_INTERNAL_THEME_INFO_H_ + +#include + +using namespace Tizen::Base; + +namespace Tizen { namespace App +{ + + +/** + * @class _ThemeInfo + * @brief This class handles the application theme information + * + * This class handles the theme + */ +class _ThemeInfo +{ +public: + /** + * Get the application theme + */ + static result LoadThemeInformation(String& systemTheme, String& userTheme); + +private: + /** + * This is the default constructor for this class. + */ + _ThemeInfo(void); + + /** + * This is the destructor for this class. + */ + ~_ThemeInfo(void); + + /** + * This is the copy constructor for the this class. + */ + _ThemeInfo(const _ThemeInfo& value); + + /** + * This is the assignment operator for this class. + */ + _ThemeInfo& operator =(const _ThemeInfo& value); + + /** + * Get the application theme from info file + */ + static result LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme); + + /** + * Get the application theme from database + */ + static result LoadThemeInfoFromDatabase(String& systemTheme, String& userTheme); + +}; //_ThemeInfo + +} } //Tizen::App + +#endif // _FAPP_INTERNAL_THEME_INFO_H_ + diff --git a/src/graphics/FGrp_Bitmap.cpp b/src/graphics/FGrp_Bitmap.cpp index 7d5e49a..da4b502 100755 --- a/src/graphics/FGrp_Bitmap.cpp +++ b/src/graphics/FGrp_Bitmap.cpp @@ -605,15 +605,20 @@ _Bitmap::Construct(const byte* pBuffer, int bufSize, const Dimension& dim, Bitma } result -_Bitmap::Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel) +_Bitmap::Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel, int pixelsPerLine) { + if (pixelsPerLine == 0) + { + pixelsPerLine = width; + } + switch (bitsPerPixel) { case 16: { typedef unsigned short Pixel; - __pScratchPad16 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, width); + __pScratchPad16 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, pixelsPerLine); __pBuffer = (unsigned char*) pExtBuffer; } break; @@ -621,7 +626,7 @@ _Bitmap::Construct(const void* pExtBuffer, int width, int height, int bitsPerPix { typedef unsigned long Pixel; - __pScratchPad32 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, width); + __pScratchPad32 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, pixelsPerLine); __pBuffer = (unsigned char*) pExtBuffer; } break; @@ -1115,7 +1120,15 @@ _Bitmap::__Lock(BufferInfo& info, long timeout) { info.width = __pScratchPad16->GetWidth(); info.height = __pScratchPad16->GetHeight(); - info.pitch = __pScratchPad16->GetWidth() * 2; + + { + unsigned short* pBuffer; + int pitch; + + __pScratchPad16->GetBuffer(pBuffer, pitch); + info.pitch = pitch * 2; + } + info.bitsPerPixel = 16; info.pixelFormat = PIXEL_FORMAT_RGB565; info.pPixels = (void*) this->__pBuffer; @@ -1125,7 +1138,15 @@ _Bitmap::__Lock(BufferInfo& info, long timeout) { info.width = __pScratchPad32->GetWidth(); info.height = __pScratchPad32->GetHeight(); - info.pitch = __pScratchPad32->GetWidth() * 4; + + { + unsigned long* pBuffer; + int pitch; + + __pScratchPad32->GetBuffer(pBuffer, pitch); + info.pitch = pitch * 4; + } + info.bitsPerPixel = 32; info.pixelFormat = PIXEL_FORMAT_ARGB8888; info.pPixels = (void*) this->__pBuffer; diff --git a/src/graphics/FGrp_Bitmap.h b/src/graphics/FGrp_Bitmap.h index ed90e82..17d1daa 100755 --- a/src/graphics/FGrp_Bitmap.h +++ b/src/graphics/FGrp_Bitmap.h @@ -52,7 +52,7 @@ public: result Construct(const _Bitmap& bitmap, const Rectangle& rect); result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); result Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim, BitmapPixelFormat pixelFormat); - result Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel); + result Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel, int pixelsPerLine = 0); bool IsValid(void) const; diff --git a/src/graphics/FGrp_BitmapImpl.cpp b/src/graphics/FGrp_BitmapImpl.cpp index 71106ac..48ff2e9 100755 --- a/src/graphics/FGrp_BitmapImpl.cpp +++ b/src/graphics/FGrp_BitmapImpl.cpp @@ -721,7 +721,7 @@ _BitmapImpl::Construct(const BufferInfo& bufferInfo) , "Unsupported format (BufferInfo::pixelFormat = %d)" , bufferInfo.pixelFormat); - result r = this->Construct(static_cast(bufferInfo.pPixels), bufferInfo.pitch * bufferInfo.height, Dimension(bufferInfo.width, bufferInfo.height), bitmapPixelFormat, false); + result r = this->Construct(static_cast(bufferInfo.pPixels), bufferInfo.width, bufferInfo.height, bitmapPixelFormat, bufferInfo.pitch); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -783,7 +783,7 @@ _BitmapImpl::Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory."); - SysTryReturnResult(NID_GRP, pBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.", rq_dim.width, rq_dim.height); + SysTryReturnResult(NID_GRP, pBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid."); SysTryReturnResult(NID_GRP, rq_dim.width > 0 && rq_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", rq_dim.width, rq_dim.height); @@ -820,6 +820,37 @@ _BitmapImpl::Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim } result +_BitmapImpl::Construct(const byte* pExtBuffer, int width, int height, BitmapPixelFormat pixelFormat, int pitch) +{ + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory."); + + SysTryReturnResult(NID_GRP, pExtBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.", width, height); + + SysTryReturnResult(NID_GRP, width > 0 && height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", width, height); + + SysTryReturnResult(NID_GRP, pixelFormat > BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + int bpp = _GetBytesPerPixel(pixelFormat); + + SysTryReturnResult(NID_GRP, bpp > 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + result r = this->_sharedItem->nativeBitmap->Construct(pExtBuffer, width, height, bpp * 8, pitch / bpp); + + if (!IsFailed(r)) + { + _Util::Dimension pcDim = { width, height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + } + + return r; +} + +result _BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, BufferScaling bufferScaling) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); diff --git a/src/graphics/FGrp_Canvas.cpp b/src/graphics/FGrp_Canvas.cpp index 251af9e..fd92850 100755 --- a/src/graphics/FGrp_Canvas.cpp +++ b/src/graphics/FGrp_Canvas.cpp @@ -1573,13 +1573,133 @@ _Canvas::DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap) { SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); - _Util::Point pointD = + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + { - double(point.x), - double(point.y) - }; + Rectangle clipRect; + this->__GetClipBounds(clipRect); + + bool pass = false; + + { + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x,clipRect.y, clipRect.width, clipRect.height); + + if (srcBufferInfo.pixelFormat == PIXEL_FORMAT_RGB565 && srcImage.enableColorKey == 0 && dstBufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 && !this->__isClipBoundsSet) + { + pixman_image_t* pPixmanSrc = pixman_image_create_bits(PIXMAN_r5g6b5, srcBufferInfo.width, srcBufferInfo.height, (uint32_t*)srcBufferInfo.pPixels, srcBufferInfo.pitch); + pixman_image_t* pPixmanDst = pixman_image_create_bits(PIXMAN_a8r8g8b8, dstBufferInfo.width, dstBufferInfo.height, (uint32_t*)dstBufferInfo.pPixels, dstBufferInfo.pitch); + + if (pPixmanSrc && pPixmanDst) + { + pixman_image_composite32(PIXMAN_OP_SRC, pPixmanSrc,NULL, pPixmanDst, 0, 0, 0, 0, point.x, point.y, srcBufferInfo.width, srcBufferInfo.height); + pass = true; + } + + if (pPixmanDst) + { + pixman_image_unref(pPixmanDst); + } + + if (pPixmanSrc) + { + pixman_image_unref(pPixmanSrc); + } + } + } + + { + Color color; - return this->DrawBitmap(pointD, bitmap); + bool isPixmanSupported = !(bitmap.__isOpaqueAllOver && GetCompositeMode() == COMPOSITE_MODE_SRC_OVER) && (!this->__useStableRenderer || bitmap.__isPremultiplied); + + if (isPixmanSupported) + { + Color color; + + isPixmanSupported = !((bitmap.GetBitsPerPixel() == 16) && (bitmap.GetMaskingColor(color) == E_SUCCESS)); + } + + if (isPixmanSupported) + { + _Util::Rectangle outRect = { 0, 0, -1, -1 }; + _Util::Rectangle dstRect = { point.x, point.y, srcBufferInfo.width, srcBufferInfo.height }; + _Util::Rectangle tgtRect = { clipRect.x, clipRect.y, clipRect.width, clipRect.height }; + + if (_Util::IntersectRect(outRect, tgtRect, dstRect)) + { + _Util::Bounds outBounds = { outRect.x, outRect.y, outRect.x + outRect.w, outRect.y + outRect.h }; + _Util::Bounds dstBounds = { dstRect.x, dstRect.y, dstRect.x + dstRect.w, dstRect.y + dstRect.h }; + _Util::Bounds srcBounds = + + { + (outBounds.x1 - dstBounds.x1), + (outBounds.y1 - dstBounds.y1), + srcBufferInfo.width + (outBounds.x2 - dstBounds.x2), + srcBufferInfo.height + (outBounds.y2 - dstBounds.y2), + }; + + srcBounds.x1 = (srcBounds.x1 >= 0) ? srcBounds.x1 :0; + srcBounds.y1 = (srcBounds.y1 >= 0) ? srcBounds.y1 :0; + srcBounds.x2 = (srcBounds.x2 <= srcBufferInfo.width) ? srcBounds.x2 : srcBufferInfo.width; + srcBounds.y2 = (srcBounds.y2 <= srcBufferInfo.height) ? srcBounds.y2 : srcBufferInfo.height; + + _Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcBounds.x1, srcBounds.y1, srcBounds.x2 - srcBounds.x1, srcBounds.y2 - srcBounds.y1); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(outRect.x, outRect.y, outRect.w, outRect.h); + + pixman_transform_t transform; + pixman_transform_init_identity(&transform); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::CopyPixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode()); + } + } + + if (!pass) + { + pass = _Pixman::CopyPixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode()); + } + } + } + + if (!pass) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, point.x - clipRect.x, point.y - clipRect.y, srcImage, alphaConstant); + } + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + return E_SUCCESS; + } } result @@ -4288,7 +4408,7 @@ _Canvas::__Copy(const Rectangle& destRect, const _Canvas& srcCanvas, const Recta _Util::Pixmap srcImageEx(clippedSrcRect.width, clippedSrcRect.height, sizeof(SystemPixel) * 8, pSrcAddr, srcPitch * sizeof(SystemPixel)); _Util::Pixmap dstImageEx(__pScratchPad->GetWidth(), __pScratchPad->GetHeight(), sizeof(SystemPixel) * 8, pDstAddr, dstPitch * sizeof(SystemPixel)); - Tizen::Graphics::_Effect::ScaleImage(dstImageEx, destRect.x, destRect.y, destRect.width, destRect.height, srcImageEx); + Tizen::Graphics::_Effect::ScaleImage(dstImageEx, destRect.x, destRect.y, destRect.width, destRect.height, srcImageEx, _Effect::ROP_COPY); } return E_SUCCESS; diff --git a/src/graphics/FGrp_CanvasCairo.cpp b/src/graphics/FGrp_CanvasCairo.cpp index e3f0a00..96e012b 100644 --- a/src/graphics/FGrp_CanvasCairo.cpp +++ b/src/graphics/FGrp_CanvasCairo.cpp @@ -105,7 +105,25 @@ ResetClip(cairo_t* pCairo) void SetDash(cairo_t* pCairo, double* pDashes, int dashCount, double offset) { - cairo_set_dash(pCairo, pDashes, dashCount, offset); + double sum = 0.0; + + for (int i = 0; i < dashCount; i++) + { + sum += pDashes[i]; + } + + if (sum == 0.0 && dashCount > 0) + { + // used the maximum value of integer type instead of double type(1.79769e+308). + const double infiniteValue = double(2147483647); + const double zeroDashes[2] = { 0.0, infiniteValue }; + + cairo_set_dash(pCairo, zeroDashes, 2, offset); + } + else + { + cairo_set_dash(pCairo, pDashes, dashCount, offset); + } } void diff --git a/src/graphics/FGrp_CanvasImpl.cpp b/src/graphics/FGrp_CanvasImpl.cpp index c6ecf2e..53477bf 100755 --- a/src/graphics/FGrp_CanvasImpl.cpp +++ b/src/graphics/FGrp_CanvasImpl.cpp @@ -1161,6 +1161,22 @@ _CanvasImpl::DrawBitmap(const FloatPoint& vcPointF, const _BitmapImpl& bitmap) SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + // This code is executed using neon.acceleration. + { + bool isXEqualToInteger = _Util::Abs(vcPointF.x - int(vcPointF.x)) <= 0.01; + bool isYEqualToInteger = _Util::Abs(vcPointF.y - int(vcPointF.y)) <= 0.01; + + bool isCompositeModeUnbound = GetCompositeMode() == COMPOSITE_MODE_SRC_IN + || GetCompositeMode() == COMPOSITE_MODE_DST_IN + || GetCompositeMode() == COMPOSITE_MODE_SRC_OUT + || GetCompositeMode() == COMPOSITE_MODE_DST_ATOP; + + if (isXEqualToInteger && isYEqualToInteger && !isCompositeModeUnbound) + { + return this->DrawBitmap(Point(int(vcPointF.x), int(vcPointF.y)), bitmap); + } + } + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); if (rtCanvasF.IsEmpty()) @@ -2425,6 +2441,14 @@ _CanvasImpl::SetDashPattern(const Tizen::Base::Collection::IListT& pattern, { SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + int dashValue = 0; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashValue); + SysTryReturn(NID_GRP, dashValue >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%d).", dashValue); + } + result r = E_SUCCESS; // It is NOT the strong guarantee for an exception @@ -2481,6 +2505,14 @@ _CanvasImpl::SetDashPattern(const Tizen::Base::Collection::IListT& patter { SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + float dashValue = 0.0f; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashValue); + SysTryReturn(NID_GRP, dashValue >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%f).", dashValue); + } + result r = E_SUCCESS; // It is NOT the strong guarantee for an exception @@ -2504,13 +2536,13 @@ _CanvasImpl::SetDashPattern(const Tizen::Base::Collection::IListT& patter } { - float dashIntValue = 0.0f; + float dashFloatValue = 0.0f; Tizen::Graphics::_Util::AccumList dashValueList; for (int i = 0; i < pattern.GetCount(); i++) { - pattern.GetAt(i, dashIntValue); - dashValueList.Push(double(dashIntValue)); + pattern.GetAt(i, dashFloatValue); + dashValueList.Push(double(dashFloatValue)); } r = this->_pNativeCanvas->SetDashPattern(dashValueList, double(offset)); diff --git a/src/graphics/FGrp_CanvasPixman.cpp b/src/graphics/FGrp_CanvasPixman.cpp index 3e6ba16..0167e18 100755 --- a/src/graphics/FGrp_CanvasPixman.cpp +++ b/src/graphics/FGrp_CanvasPixman.cpp @@ -263,98 +263,21 @@ bool CompositePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Grap } else { - premultipliedSrcImage.reset(srcImage.GetPremultipliedPixmap()); + bool pass = false; + bool isInternalSolutionEnable = !((dstImage.width == srcImage.width) && (dstImage.height == srcImage.height) && pixman_transform_is_identity(&transform)); - if (premultipliedSrcImage.get()) + if (isInternalSolutionEnable) { - pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, premultipliedSrcImage->width, premultipliedSrcImage->height, (uint32_t*)premultipliedSrcImage->pBitmap, premultipliedSrcImage->bytesPerLine)); - } - else - { - // slow but it does not create additional buffer - pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_x8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); - pPixmanMsk.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + premultipliedSrcImage.reset(srcImage.GetPremultipliedPixmap()); - if (pPixmanMsk == null) + if (premultipliedSrcImage.get()) { - return false; + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, premultipliedSrcImage->width, premultipliedSrcImage->height, (uint32_t*)premultipliedSrcImage->pBitmap, premultipliedSrcImage->bytesPerLine)); + pass = true; } } - } - break; - default: - return false; - } - - if (pPixmanSrc) - { - pixman_image_set_transform(pPixmanSrc, &transform); - if (pPixmanMsk) - { - pixman_image_set_transform(pPixmanMsk, &transform); - } - - pixman_image_set_filter(pPixmanSrc, filter, NULL, 0); - pixman_image_set_repeat(pPixmanSrc, repeatMethod); - - if (rop == PIXMAN_OP_COPY) - { - rop = PIXMAN_OP_SRC; - } - - pixman_image_composite32(pixman_op_t(rop), pPixmanSrc, pPixmanMsk, pPixmanDst, 0, 0, 0, 0, 0, 0, dstImage.width, dstImage.height); - - return true; - } - } - - return false; -} - -bool __CompositePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, int rop, pixman_filter_t filter, pixman_transform_t transform, pixman_repeat_t repeatMethod, pixman_region32_t resultRect) -{ - Tizen::Graphics::_Util::AutoDeletor pPixmanDst; - - switch (dstImage.depth) - { - case 16: - pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); - break; - case 32: - pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); - break; - default: - return false; - } - - if (pPixmanDst) - { - std::auto_ptr premultipliedSrcImage; - - Tizen::Graphics::_Util::AutoDeletor pPixmanMsk; - Tizen::Graphics::_Util::AutoDeletor pPixmanSrc; - - switch (srcImage.depth) - { - case 16: - // color key is not supporting - pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); - break; - case 32: - if (srcImage.isPremultiplied || rop == PIXMAN_OP_COPY) - { - pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); - } - else - { - premultipliedSrcImage.reset(srcImage.GetPremultipliedPixmap()); - - if (premultipliedSrcImage.get()) - { - pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, premultipliedSrcImage->width, premultipliedSrcImage->height, (uint32_t*)premultipliedSrcImage->pBitmap, premultipliedSrcImage->bytesPerLine)); - } - else + if (!pass) { // slow but it does not create additional buffer pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_x8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); @@ -383,8 +306,6 @@ bool __CompositePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Gr pixman_image_set_filter(pPixmanSrc, filter, NULL, 0); pixman_image_set_repeat(pPixmanSrc, repeatMethod); - pixman_image_set_clip_region32 (pPixmanDst, &resultRect); - if (rop == PIXMAN_OP_COPY) { rop = PIXMAN_OP_SRC; diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp index 86aec5c..16f3ca3 100644 --- a/src/graphics/FGrp_Font.cpp +++ b/src/graphics/FGrp_Font.cpp @@ -2362,12 +2362,19 @@ _Font::__GetFont(wchar_t character) return __pNativeFont; } + // Check the BlackList + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + + if (mgr.SearchBlackList(character)) + { + return __pNativeFont; + } + //------------------------------------------------------ // // 1-2. check if this glyph is in the fallback list. // //------------------------------------------------------ - _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); _IFont::FontMapT* pFallbackFontMap = __pNativeFont->GetFallbackMap(); #ifdef USE_HASHMAP_FOR_FONT @@ -2481,7 +2488,14 @@ _Font::__GetFont(wchar_t character) } } - return (pFallbackFont != null) ? pFallbackFont : __pNativeFont; + if (pFallbackFont == null) + { + mgr.AddBlackList(character); + + return __pNativeFont; + } + + return pFallbackFont; CATCH: // if failed find out fallback font, diff --git a/src/graphics/FGrp_FontBidiUtil.cpp b/src/graphics/FGrp_FontBidiUtil.cpp index 467dd05..bf5bd43 100755 --- a/src/graphics/FGrp_FontBidiUtil.cpp +++ b/src/graphics/FGrp_FontBidiUtil.cpp @@ -877,7 +877,7 @@ _FontGlyphList::_FontGlyphList(const _Util::String& reorderedText, void* pFace, } } } - else + else if (int(this->__glyphCount) < textLength) { int tempCount = this->__glyphCount; @@ -906,18 +906,18 @@ _FontGlyphList::_FontGlyphList(const _Util::String& reorderedText, void* pFace, pAuxInfo->xAdvance.Reset(pPosition->x_advance); pAuxInfo->yAdvance.Reset(pPosition->y_advance); - bool isColltionElement = false; + bool isCollationElement = false; if (script == G_UNICODE_SCRIPT_ARABIC) { - isColltionElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex + 1), *(reorderedText.pStart + textIndex))); + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex + 1), *(reorderedText.pStart + textIndex))); } else { - isColltionElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex), *(reorderedText.pStart + textIndex + 1))); + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex), *(reorderedText.pStart + textIndex + 1))); } - if (isColltionElement) + if (isCollationElement) { ++pAuxInfo; ++textIndex; @@ -932,6 +932,56 @@ _FontGlyphList::_FontGlyphList(const _Util::String& reorderedText, void* pFace, } } } + else if (int(this->__glyphCount) > textLength) + { + this->__pGlyphAuxInfo = new (std::nothrow) GlyphAuxInfo[this->__glyphCount]; + + if (this->__pGlyphAuxInfo) + { + memset(static_cast(this->__pGlyphAuxInfo), 0, sizeof(GlyphAuxInfo) * this->__glyphCount); + + hb_glyph_position_t* pPosition = hb_buffer_get_glyph_positions(hBuffer, NULL); + hb_glyph_info_t* pInfo = hb_buffer_get_glyph_infos(hBuffer, NULL); + + GlyphAuxInfo* pAuxInfo = &this->__pGlyphAuxInfo[0]; + GlyphAuxInfo* pAuxInfoEnd = pAuxInfo + this->__glyphCount; + + int textIndex = 0; + + while (pAuxInfo < pAuxInfoEnd) + { + pAuxInfo->isAvailable = true; + pAuxInfo->glyphIndex = pInfo->codepoint; + pAuxInfo->xOffset.Reset(pPosition->x_offset); + pAuxInfo->yOffset.Reset(pPosition->y_offset); + pAuxInfo->xAdvance.Reset(pPosition->x_advance); + pAuxInfo->yAdvance.Reset(pPosition->y_advance); + + bool isCollationElement = false; + + if (script == G_UNICODE_SCRIPT_ARABIC) + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex + 1), *(reorderedText.pStart + textIndex))); + } + else + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex), *(reorderedText.pStart + textIndex + 1))); + } + + if (isCollationElement) + { + ++pAuxInfo; + ++textIndex; + pAuxInfo->isAvailable = false; + } + + ++pInfo; + ++pPosition; + ++pAuxInfo; + ++textIndex; + } + } + } hb_buffer_destroy(hBuffer); hb_font_destroy(hSubFont); diff --git a/src/graphics/FGrp_FontImpl.cpp b/src/graphics/FGrp_FontImpl.cpp index b1ab5b8..2944b10 100755 --- a/src/graphics/FGrp_FontImpl.cpp +++ b/src/graphics/FGrp_FontImpl.cpp @@ -1033,6 +1033,52 @@ _FontImpl::GetTextExtentList(const Tizen::Base::String& string, int startIndex, return E_SUCCESS; } +result +_FontImpl::__GetTextExtent(const wchar_t* text, int textLength, int length, FloatDimension& vcDim, bool outline) const +{ + // This method must synchronize with _FontImpl::GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& vcDim, bool outline) + + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + int dummyCount = 0; + Dimension pcDim; + + result r = _pNativeFont->GetTextExtent(INT_MAX, _Util::String(text, textLength, 0, length), outline, dummyCount, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +result +_FontImpl::__GetTextExtent(float vcWidth, const wchar_t* text, int textLength, int startIndex, int length, bool outline, int& count, FloatDimension& vcDim) const +{ + // This method must synchronize with _FontImpl::GetTextExtent(float vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, FloatDimension& vcDim) + + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < textLength, E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + int pcWidth = _FloatToIntForPos(_ResUtil::ToPhyCoordW(vcWidth)); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text, textLength, startIndex, length), outline, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + }} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontRsrcManager.cpp b/src/graphics/FGrp_FontRsrcManager.cpp index 387a294..6a0ea05 100644 --- a/src/graphics/FGrp_FontRsrcManager.cpp +++ b/src/graphics/FGrp_FontRsrcManager.cpp @@ -72,6 +72,7 @@ const int _DEFAULT_FONT_FACE = 0; const char* _DEFAULT_SYSTEM_FONT = "DefaultSystemFont"; const char* _DEFAULT_SYSTEM_BOLD_FONT = "DefaultSystemBoldFont"; const _Util::FixedPoint26_6 _SYSTEM_DEFAULT_FONT_SIZE(16); +const int _BLACK_LIST_MAX_COUNT = 1000; class _FontNull : public Tizen::Graphics::_IFont @@ -294,7 +295,6 @@ _FontRsrcManager::_FontRsrcManager() __appFontMap.Construct(0, 0, fontHashCodeProviderEx, fontComparerEx); #endif - __defaultSystemFontPath.Clear(); __defaultSystemBoldFontPath.Clear(); __pDefaultSystemFont = null; @@ -549,7 +549,6 @@ _FontRsrcManager::AddFont(const _Util::WString& fontPath, SharedFontResource& ou return E_SUCCESS; } - bool _FontRsrcManager::SearchFont(const _Util::WString& fontName) { @@ -558,6 +557,31 @@ _FontRsrcManager::SearchFont(const _Util::WString& fontName) return (__SearchFont(fontName, sharedFont) == true); } +void +_FontRsrcManager::AddBlackList(const wchar_t unicode) +{ + if (__blackListUnicodeSet.size() > _BLACK_LIST_MAX_COUNT) + { + this->ClearBlackList(); + } + + __blackListUnicodeSet.insert(unicode); +} + +bool +_FontRsrcManager::SearchBlackList(const wchar_t unicode) const +{ + BlackListSetT::const_iterator blackListIterator = __blackListUnicodeSet.find(unicode); + + return (blackListIterator != __blackListUnicodeSet.end()); +} + +void +_FontRsrcManager::ClearBlackList() +{ + __blackListUnicodeSet.clear(); +} + result _FontRsrcManager::GetFont(const byte* pFontData, int fontDataSize, int style, _Util::FixedPoint26_6 size, SharedFontResource& out) { @@ -1082,6 +1106,7 @@ _FontRsrcManager::__ReloadFont(String fontName, bool isBold) #endif pFont->CleanCache(); + this->ClearBlackList(); } return true; diff --git a/src/graphics/FGrp_FontRsrcManager.h b/src/graphics/FGrp_FontRsrcManager.h index 8461b36..c5f585f 100644 --- a/src/graphics/FGrp_FontRsrcManager.h +++ b/src/graphics/FGrp_FontRsrcManager.h @@ -35,6 +35,7 @@ #include #endif +#include #include #include #include @@ -53,6 +54,7 @@ class _FontRsrcManager { public: typedef std::tr1::shared_ptr<_IFont> SharedFontResource; + typedef std::set BlackListSetT; #ifdef USE_HASHMAP_FOR_FONT typedef Tizen::Base::Collection::HashMapT <_Util::WString, SharedFontResource> FontMapT; typedef Tizen::Base::Collection::HashMapT <_Util::WString, _Util::WString> AppFontMapT; @@ -73,6 +75,10 @@ public: result AddFont(const _Util::WString& fontPath, SharedFontResource& out); bool SearchFont(const _Util::WString& fontName); + void AddBlackList(const wchar_t); + bool SearchBlackList(const wchar_t) const; + void ClearBlackList(void); + bool ReloadDefaultSystemFont(void); _FontMemoryManager& GetMemoryManager(void); _Font& GetDefaultSystemFont(void); @@ -90,8 +96,9 @@ private: bool __CreateFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** pOut); bool __CreateFont(int fontEngine, const char* filePath, long face, _IFont** pOut); bool __CreateStaticFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** pOut); - bool __SearchFont(const _Util::WString& fontName, SharedFontResource& out) const; bool __AddFont(const _Util::WString& key, const SharedFontResource& font); + bool __SearchFont(const _Util::WString& fontName, SharedFontResource& out) const; + void __RemoveUnusedFont(void); long __GetMaxFontEngine(void) const; const Tizen::Base::String& __GetDefaultSystemFontPath(bool isBold); @@ -103,6 +110,7 @@ private: private: FontMapT __fontRsrcMap; AppFontMapT __appFontMap; + BlackListSetT __blackListUnicodeSet; Tizen::Base::String __defaultSystemFontPath; Tizen::Base::String __defaultSystemBoldFontPath; diff --git a/src/graphics/inc/FGrp_BitmapImpl.h b/src/graphics/inc/FGrp_BitmapImpl.h index a7106d9..585e9c3 100755 --- a/src/graphics/inc/FGrp_BitmapImpl.h +++ b/src/graphics/inc/FGrp_BitmapImpl.h @@ -235,6 +235,7 @@ private: result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); result Construct(const byte* pBuffer, int bufferSize, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); + result Construct(const byte* pExtBuffer, int width, int height, BitmapPixelFormat pixelFormat, int pitch); bool __CheckValidity(bool canBufferExpand = true); bool __RealizeBuffer(void); diff --git a/src/graphics/inc/FGrp_FontImpl.h b/src/graphics/inc/FGrp_FontImpl.h index 68b5d36..b8b8d2d 100755 --- a/src/graphics/inc/FGrp_FontImpl.h +++ b/src/graphics/inc/FGrp_FontImpl.h @@ -50,6 +50,11 @@ class Font; class _Font; +namespace _Text +{ +class TextUtility; +} + struct _FloatPair { float first; @@ -224,7 +229,11 @@ private: _FontImpl(const _FontImpl& obj); _FontImpl& operator =(const _FontImpl& rhs); + result __GetTextExtent(const wchar_t* text, int textLength, int length, FloatDimension& dim, bool outline = false) const; + result __GetTextExtent(float width, const wchar_t* text, int textLength, int startIndex, int length, bool outline, int& count, FloatDimension& dim) const; + friend class _Font; + friend class _Text::TextUtility; }; // _FontImpl diff --git a/src/graphics/opengl/FGrpEgl.cpp b/src/graphics/opengl/FGrpEgl.cpp index 2744725..0c7c985 100644 --- a/src/graphics/opengl/FGrpEgl.cpp +++ b/src/graphics/opengl/FGrpEgl.cpp @@ -51,6 +51,8 @@ #include #include +#include + #include #include @@ -109,6 +111,7 @@ using namespace Tizen::Ui::Controls; using namespace Tizen::Ui::Animations; using namespace Tizen::Ui; using namespace Tizen::Base; +using namespace Tizen::Base::Collection; namespace Tizen { namespace Graphics { @@ -129,6 +132,8 @@ void _SaveCurrentContext(_SglInfo* pSglInfo); void _UnregisterRenderCallback(Evas_Object* pObject); int __registerCallbackCount = 0; _SglInfo* __pPreviousSglInfo = null; +Queue* __pSwapQueue = null; + bool __needRestoreContext = false; #endif @@ -152,6 +157,7 @@ const int INVALID_SGL_INDEX = 0; const int MAX_SGL_INDEX = 100; class _SglInfo + : public Tizen::Base::Object { public: _SglInfo(void) @@ -173,11 +179,12 @@ public: , height(0) #endif , isBackbuffer(true) - , swapDone(false) , isFirstSwap(true) , pSecondSglInfo(null) , pBitmapPointer(null) , pBitmapLocked(null) + , pBitmapCopyNeeded(null) + , isCopyNeeded(false) { } @@ -205,12 +212,10 @@ public: } } -#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) - _UnregisterRenderCallback(pObject); -#endif evas_object_del(pObject); delete pVisualElementSurface; delete pBitmap; + delete pBitmapCopyNeeded; bool needAllocateObject = true; if (__isDoublePixmapEnabled) @@ -246,9 +251,11 @@ public: height = 0; #endif isBackbuffer = true; - swapDone = false; isFirstSwap = true; pSecondSglInfo = null; + + pBitmapCopyNeeded = null; + isCopyNeeded = false; } public: @@ -270,12 +277,14 @@ public: int height; #endif bool isBackbuffer; - bool swapDone; bool isFirstSwap; _SglInfo* pSecondSglInfo; void* pBitmapPointer; Bitmap* pBitmapLocked; + Bitmap* pBitmapCopyNeeded; + bool isCopyNeeded; + private: _SglInfo(const _SglInfo& sglInfo); _SglInfo& operator =(const _SglInfo& rhs); @@ -339,6 +348,19 @@ _OnBoundsChanged(void* pData) && pSglInfo->pWindow != null , E_INVALID_STATE, "Invalid state."); + if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo)) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pObject = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pObject != pSglInfo) + { + __pSwapQueue->Enqueue(pObject); + } + } + } + if (pSglInfo == __pPreviousSglInfo || pSglInfo->pSecondSglInfo == __pPreviousSglInfo) { __pPreviousSglInfo = null; @@ -398,7 +420,6 @@ _OnBoundsChanged(void* pData) pSglInfo->nativePixmap = nativePixmap; pSglInfo->surface = eglSurface; pSglInfo->isBackbuffer = true; - pSglInfo->swapDone = false; pSglInfo->isFirstSwap = true; if (__isDoublePixmapEnabled) @@ -429,7 +450,6 @@ _OnBoundsChanged(void* pData) pSglInfoSecond->surface = eglSurface; pSglInfoSecond->pBitmap = bitmapSecond.release(); pSglInfoSecond->isBackbuffer = true; - pSglInfoSecond->swapDone = true; pSglInfo->isFirstSwap = true; @@ -456,6 +476,16 @@ _OnBoundsChanged(void* pData) __needRestoreContext = false; #endif + if (pSglInfo->isCopyNeeded) + { + delete pSglInfo->pBitmapCopyNeeded; + std::auto_ptr bitmap(new (std::nothrow) Bitmap); + SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + pSglInfo->pBitmapCopyNeeded = bitmap.release(); + } + return; } @@ -803,10 +833,20 @@ _EvasObjectImageChange(_SglInfo* pSglInfo) } else { - BufferInfo bufferInfo; - pSglInfo->pBitmap->Lock(bufferInfo); - evas_object_image_data_set(pSglInfo->pObject, bufferInfo.pPixels); - pSglInfo->pBitmap->Unlock(); + if (pSglInfo->isCopyNeeded) + { + BufferInfo bufferInfo; + pSglInfo->pBitmapCopyNeeded->Lock(bufferInfo); + evas_object_image_data_set(pSglInfo->pObject, bufferInfo.pPixels); + pSglInfo->pBitmapCopyNeeded->Unlock(); + } + else + { + BufferInfo bufferInfo; + pSglInfo->pBitmap->Lock(bufferInfo); + evas_object_image_data_set(pSglInfo->pObject, bufferInfo.pPixels); + pSglInfo->pBitmap->Unlock(); + } } } @@ -820,13 +860,48 @@ __RestoreContext(void) void _PostRenderCallback(Ecore_Evas* ee) { + if (__pSwapQueue != null) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pSglInfo = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pSglInfo != null) + { + _SglInfo* pBackSglInfo = null; + _SglInfo* pFrontSglInfo = null; + + if (pSglInfo->isBackbuffer) + { + pBackSglInfo = pSglInfo; + pFrontSglInfo = pSglInfo->pSecondSglInfo; + } + else + { + pBackSglInfo = pSglInfo->pSecondSglInfo; + pFrontSglInfo = pSglInfo; + } + + if (pSglInfo->pVisualElement != null) + { + pBackSglInfo->isBackbuffer = false; + pFrontSglInfo->isBackbuffer = true; + + pSglInfo->pVisualElement->SetSurface(pBackSglInfo->pVisualElementSurface); + evas_object_image_pixels_dirty_set(pBackSglInfo->pObject, EINA_TRUE); + evas_object_hide(pFrontSglInfo->pObject); + } + } + } + } + if (__pPreviousSglInfo != null) { EGLDisplay display = __pPreviousSglInfo->display; EGLSurface surface = __pPreviousSglInfo->surface; EGLContext context = __pPreviousSglInfo->context; - if (__isDoublePixmapEnabled) + if (__isDoublePixmapEnabled && __pPreviousSglInfo->pSecondSglInfo != null) { _SglInfo* pBackSglInfo = null; _SglInfo* pFrontSglInfo = null; @@ -843,18 +918,6 @@ _PostRenderCallback(Ecore_Evas* ee) } surface = pBackSglInfo->surface; - - if (!pFrontSglInfo->swapDone && __pPreviousSglInfo->pVisualElement != null) - { - pBackSglInfo->isBackbuffer = false; - pFrontSglInfo->isBackbuffer = true; - pFrontSglInfo->swapDone = true; - - __pPreviousSglInfo->pVisualElement->SetSurface(pBackSglInfo->pVisualElementSurface); - evas_object_image_pixels_dirty_set(pBackSglInfo->pObject, EINA_TRUE); - evas_object_hide(pFrontSglInfo->pObject); - surface = pFrontSglInfo->surface; - } } EGLBoolean ret = eglMakeCurrent(display, surface, surface, context); @@ -874,7 +937,10 @@ _PostRenderCallback(Ecore_Evas* ee) void _SaveCurrentContext(_SglInfo* pSglInfo) { - __pPreviousSglInfo = pSglInfo; + if (pSglInfo != null) + { + __pPreviousSglInfo = pSglInfo; + } } void @@ -897,6 +963,17 @@ _RegisterRenderCallback(Evas_Object* pObject) } ecore_evas_callback_post_render_set(pEcoreEvas, _PostRenderCallback); + + if (__pSwapQueue == null) + { + std::auto_ptr swapQueue(new (std::nothrow) Queue); + SysTryReturnVoidResult(NID_GRP, swapQueue.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + + result r = swapQueue.get()->Construct(MAX_SGL_INDEX / 2); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + + __pSwapQueue = swapQueue.release(); + } } __registerCallbackCount++; } @@ -924,6 +1001,9 @@ _UnregisterRenderCallback(Evas_Object* pObject) } ecore_evas_callback_post_render_set(pEcoreEvas, NULL); + + delete __pSwapQueue; + __pSwapQueue = null; } } } @@ -1151,6 +1231,8 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi pObject = evas_object_image_filled_add(pEvas); SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid object."); + __evasEngineType = _GetEvasEngineType(pObject); + int widthPhysical = static_cast (CoordinateSystem::ConvertToPhysicalX(rect.width)); int heightPhysical = static_cast (CoordinateSystem::ConvertToPhysicalY(rect.height)); @@ -1182,8 +1264,6 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi pSglInfo->pVisualElementSurface = pVisualElementSurface; pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); - __evasEngineType = _GetEvasEngineType(pObject); - #if defined (FGRAPHICS_INTERNAL_USE_DOUBLE_PIXMAP) if (__evasEngineType == ENGINE_TYPE_OPENGL_X11) { @@ -1231,7 +1311,6 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi pSglInfoSecond->pWindow = pWindow; pSglInfoSecond->pObject = pObject; pSglInfoSecond->pVisualElementSurface = pVisualElementSurface; - pSglInfoSecond->swapDone = true; pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); pSglInfo->pSecondSglInfo = pSglInfoSecond; @@ -1313,6 +1392,7 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) Bool ret = False; drm_magic_t magic = 0; + int pitch = 0; #endif _SglInfo* pSglInfo = null; _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); @@ -1396,6 +1476,7 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) } pPixmapInfo->pTbmBufferObject = tbm_bo_import(pPixmapInfo->pTbmBufMgr, pDri2Buffer->name); + pitch = pDri2Buffer->pitch; free(pDri2Buffer); if (pPixmapInfo->pTbmBufferObject == null) { @@ -1408,7 +1489,7 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) goto CATCH_06; } - r = Tizen::Graphics::_BitmapTool::ChangeBuffer(*pBitmap, tbmData.ptr, width * bitsPerPixel / 8, + r = Tizen::Graphics::_BitmapTool::ChangeBuffer(*pBitmap, tbmData.ptr, pitch, _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo); if (r != E_SUCCESS) { @@ -1421,6 +1502,24 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) goto CATCH_06; } + if (__evasEngineType == ENGINE_TYPE_ETC && pitch != width * bitsPerPixel / 8) + { + std::auto_ptr bitmap(new (std::nothrow) Bitmap); + if (bitmap.get() == null) + { + goto CATCH_06; + } + + result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); + if (r != E_SUCCESS) + { + goto CATCH_06; + } + + pSglInfo->isCopyNeeded = true; + pSglInfo->pBitmapCopyNeeded = bitmap.release(); + } + #else #if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) { @@ -1606,6 +1705,7 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI } pPixmapInfo->pTbmBufferObject = tbm_bo_import(pPixmapInfo->pTbmBufMgr, pDri2Buffer->name); + bufferInfo.pitch = pDri2Buffer->pitch; free(pDri2Buffer); if (pPixmapInfo->pTbmBufferObject == null) { @@ -1621,7 +1721,6 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI bufferInfo.bitsPerPixel = 32; bufferInfo.pixelFormat = PIXEL_FORMAT_ARGB8888; - bufferInfo.pitch = bufferInfo.width * bufferInfo.bitsPerPixel / 8; memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height); r = pBitmapImpl->Construct(bufferInfo); if (r != E_SUCCESS) @@ -1740,6 +1839,19 @@ _SglDestroySurface(EGLDisplay dpy, EGLSurface surface) return eglDestroySurface(dpy, EGL_NO_SURFACE); } + if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo)) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pObject = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pObject != pSglInfo) + { + __pSwapQueue->Enqueue(pObject); + } + } + } + #if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) if (pSglInfo == __pPreviousSglInfo || pSglInfo->pSecondSglInfo == __pPreviousSglInfo) { @@ -1756,6 +1868,13 @@ _SglDestroySurface(EGLDisplay dpy, EGLSurface surface) pSglInfoTableManipulatorInstance->DestroySglIndex(pSglInfo->pSecondSglInfo->sglIndex); } +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + if (pSglInfo->pVisualElementSurface != null) + { + _UnregisterRenderCallback(pSglInfo->pObject); + } +#endif + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); return ret; @@ -1991,15 +2110,12 @@ _SglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx #endif #if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) - if (draw != EGL_NO_SURFACE) - { - _SaveCurrentContext(pSglInfoDraw); - } + _SaveCurrentContext(pSglInfoDraw); #endif if (pSglInfoDraw->glVersion == 0 && ctx != EGL_NO_CONTEXT) { - eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &pSglInfoDraw->glVersion); + eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &pSglInfoDraw->glVersion); } pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); @@ -2100,8 +2216,9 @@ _SglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { if (__isDoublePixmapEnabled && pSglInfo->pSecondSglInfo != null) { - if (pSglInfo->swapDone || pSglInfo->pSecondSglInfo->swapDone) + if (!__pSwapQueue->Contains(*pSglInfo)) { + __pSwapQueue->Enqueue(pSglInfo); _SglInfo* pBackSglInfo = null; _SglInfo* pFrontSglInfo = null; @@ -2116,7 +2233,6 @@ _SglSwapBuffers(EGLDisplay dpy, EGLSurface surface) pFrontSglInfo = pSglInfo; } - pFrontSglInfo->swapDone = false; if (pSglInfo->pVisualElement != null) { @@ -2150,6 +2266,13 @@ _SglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { if (pSglInfo->pVisualElement != null) { + if (pSglInfo->isCopyNeeded) + { + BufferInfo bufferInfo; + pSglInfo->pBitmapCopyNeeded->Lock(bufferInfo); + pSglInfo->pBitmapCopyNeeded->Merge(Point(0, 0), *pSglInfo->pBitmap, Rectangle(0, 0, bufferInfo.width, bufferInfo.height)); + pSglInfo->pBitmapCopyNeeded->Unlock(); + } pSglInfo->pVisualElement->SetFlushNeeded(); } } diff --git a/src/graphics/opengl/FGrpGles1.cpp b/src/graphics/opengl/FGrpGles1.cpp index f0477ae..8b215ac 100644 --- a/src/graphics/opengl/FGrpGles1.cpp +++ b/src/graphics/opengl/FGrpGles1.cpp @@ -1428,6 +1428,10 @@ _GlesInterfaceInitialize_1(void) if (_pGlesLib1 == NULL) { _pGlesLib1 = dlopen("/usr/lib/libGLES_CM.so", RTLD_LAZY | RTLD_GLOBAL); + if (_pGlesLib1 == NULL) + { + _pGlesLib1 = dlopen("/usr/lib/egl/libGLES_CM.so", RTLD_LAZY | RTLD_GLOBAL); + } } } #endif diff --git a/src/graphics/text/FGrp_TextTextComposite.cpp b/src/graphics/text/FGrp_TextTextComposite.cpp index 61d2af3..86a9482 100644 --- a/src/graphics/text/FGrp_TextTextComposite.cpp +++ b/src/graphics/text/FGrp_TextTextComposite.cpp @@ -652,8 +652,8 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int st SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); SetAbbrevObjectFontInfo(pSimpleText); - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); @@ -892,8 +892,8 @@ TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& display SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); SetAbbrevObjectFontInfo(pSimpleText); - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); @@ -1236,8 +1236,8 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& display SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); SetAbbrevObjectFontInfo(pSimpleText); - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); @@ -1460,8 +1460,8 @@ TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectan SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); SetAbbrevObjectFontInfo(pSimpleText); - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); @@ -5786,12 +5786,12 @@ TextComposite::GetElementIndexOf(TextElement& textElement) const } TextElement* -TextComposite::GetElementAtElementIndex(int nodeIndex) const +TextComposite::GetElementAtElementIndex(int elementIndex) const { result r = E_SUCCESS; TextElement* pTextElement = null; - pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(nodeIndex)); + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex)); SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Fail to add element.", GetErrorMessage(r)); return pTextElement; @@ -6026,8 +6026,8 @@ TextComposite::GetDisplayableText(FloatRectangle displayRect, TextObjectActionTy SysTryReturn(NID_GRP, pSimpleText, String(L""), E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); SetAbbrevObjectFontInfo(pSimpleText); - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextSize.width, abbrevTextSize.height); } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextSize.width, abbrevTextSize.height); ForwardAnalyze(lineOffset, __length - lineOffset, lineBounds.width - abbrevTextSize.width , TEXT_OBJECT_WRAP_TYPE_CHARACTER, lineLength, textSize.width, textSize.height); diff --git a/src/graphics/text/FGrp_TextTextCutLinkParser.cpp b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp index 3c3792a..a4b8ebb 100644 --- a/src/graphics/text/FGrp_TextTextCutLinkParser.cpp +++ b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp @@ -121,6 +121,7 @@ IsUrlAddress(const String& text, int index, int& linkLength) int linkOffset = 0; int totalLength = text.GetLength(); int length = 0; + const wchar_t* pText = text.GetPointer(); String prefix(L""); String subString(L""); @@ -140,21 +141,20 @@ IsUrlAddress(const String& text, int index, int& linkLength) } r = text.SubString(index, length, subString); - SysTryReturn( - NID_GRP, r == E_SUCCESS, false, E_OUT_OF_RANGE, + SysTryReturn(NID_GRP, r == E_SUCCESS, false, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] SubString offset(%d) must greater than 0 and length(%d) must be less than total string length(%d).", index, prefix.GetLength(), totalLength); if (prefix.CompareTo(subString) == 0) { linkOffset = index; - while (index < totalLength && IsGenericCharacter(text[index])) + while (index < totalLength && IsGenericCharacter(pText[index])) { - if (dotFound == false && text[index] == '.') + if (dotFound == false && pText[index] == '.') { dotFound = true; } - if (validTextAfterDot == false && dotFound == true && text[index] != '.') + if (validTextAfterDot == false && dotFound == true && pText[index] != '.') { validTextAfterDot = true; } @@ -169,7 +169,7 @@ IsUrlAddress(const String& text, int index, int& linkLength) if (dotFound == true) { - while (text[index - 1] == L'.' || text[index - 1] == L',') + while (pText[index - 1] == L'.' || pText[index - 1] == L',') { index--; } @@ -194,26 +194,33 @@ GetUrlLink(const String& text, int index, int lastLinkEndIndex, int domainLength bool dotFound = false; bool validTextBeforeDot = false; int linkOffset = index; + const wchar_t* pText = text.GetPointer(); while (lastLinkEndIndex <= linkOffset) { - if (!IsGenericCharacter(text[linkOffset]) || text[linkOffset] == L'(' || text[linkOffset] == L'[') + if (!IsGenericCharacter(pText[linkOffset]) || pText[linkOffset] == L'(' || pText[linkOffset] == L'[') { linkOffset++; break; } - if (dotFound == false && text[linkOffset] == L'.') + if (dotFound == false && pText[linkOffset] == L'.') { dotFound = true; } - if (validTextBeforeDot == false && dotFound == true && text[linkOffset] != L'.') + if (validTextBeforeDot == false && dotFound == true && pText[linkOffset] != L'.') { validTextBeforeDot = true; } linkOffset--; + + if (lastLinkEndIndex > linkOffset) + { + linkOffset++; + break; + } } if (dotFound == true && validTextBeforeDot != true) @@ -223,18 +230,18 @@ GetUrlLink(const String& text, int index, int lastLinkEndIndex, int domainLength if (dotFound == true) { - while (text[linkOffset] == L'.' || text[linkOffset] == L',') + while (pText[linkOffset] == L'.' || pText[linkOffset] == L',') { linkOffset++; } } index += domainLength; - if (text[index] == L'/') + if (pText[index] == L'/') { while (index > 0) { - if (!IsGenericCharacter(text[index]) && text[index] != L')' && text[index] != L']') + if (!IsGenericCharacter(pText[index]) && pText[index] != L')' && pText[index] != L']') { break; } @@ -242,9 +249,9 @@ GetUrlLink(const String& text, int index, int lastLinkEndIndex, int domainLength index++; } } - else if (text[index] != null && text[index] != L' ' && text[index] != TEXT_JAPANESE_SPACE && - text[index] != L')' && text[index] != L']' && text[index] != 0xFFFC && - text[index] != 0x000A && text[index] != 0x000D) + else if (pText[index] != null && pText[index] != L' ' && pText[index] != TEXT_JAPANESE_SPACE && + pText[index] != L')' && pText[index] != L']' && pText[index] != 0xFFFC && + pText[index] != 0x000A && pText[index] != 0x000D) { return false; } @@ -315,8 +322,9 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta int atIndex = 0; int totalLength = text.GetLength(); int linkOffset = index; + const wchar_t* pText = text.GetPointer(); - if (text[index + 1] == L'@') + if (pText[index + 1] == L'@') { return false; } @@ -325,7 +333,7 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta if (index > lastLinkEndIndex) { - while (IsEmailCharacter(text[linkOffset]) && lastLinkEndIndex <= linkOffset) + while (IsEmailCharacter(pText[linkOffset]) && lastLinkEndIndex <= linkOffset) { linkOffset--; } @@ -339,16 +347,16 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta atIndex = index; index++; - while (IsEmailCharacter(text[index]) && index < totalLength) + while (IsEmailCharacter(pText[index]) && index < totalLength) { if (validTextAfterAt == false) { validTextAfterAt = true; } - if (text[index] == '.') + if (pText[index] == '.') { - if (text[index + 1] == '.') + if (pText[index + 1] == '.') { break; } @@ -367,7 +375,7 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta return false; } - while (text[index - 1] == L'.') + while (pText[index - 1] == L'.') { index--; } @@ -392,12 +400,13 @@ IsPhoneNumber(const String& text, int index, int& linkLength) int oneDot = false; int linkOffset = 0; int blankCount = 0; - + const wchar_t* pText = text.GetPointer(); int totalLength = text.GetLength(); - if (text[index] == L'+') + + if (pText[index] == L'+') { k = 0; - if (!Character::IsDigit(text[index + 1])) + if (!Character::IsDigit(pText[index + 1])) { return false; } @@ -405,21 +414,21 @@ IsPhoneNumber(const String& text, int index, int& linkLength) while (k < _MIN_PHONE_NUMBER_LENGTH) { - if (Character::IsDigit(text[index + j]) || text[index + j] == L'*' || text[index + j] == L'#') + if (Character::IsDigit(pText[index + j]) || pText[index + j] == L'*' || pText[index + j] == L'#') { k++; oneHyphen = false; oneDot = false; } - else if (oneHyphen == false && text[index + j] == L'-') + else if (oneHyphen == false && pText[index + j] == L'-') { oneHyphen = true; } - else if (oneDot == false && text[index + j] == L'.') + else if (oneDot == false && pText[index + j] == L'.') { oneDot = true; } - else if (text[index + j] == L' ' || text[index + j] == TEXT_JAPANESE_SPACE || text[index + j] == L'(' || text[index + j] == L')') + else if (pText[index + j] == L' ' || pText[index + j] == TEXT_JAPANESE_SPACE || pText[index + j] == L'(' || pText[index + j] == L')') { // empty statement } @@ -437,37 +446,37 @@ IsPhoneNumber(const String& text, int index, int& linkLength) linkOffset = index; while (index < totalLength && - (Character::IsDigit(text[index]) || (text[index] == L'*') || - (text[index] == L'#') || (text[index] == L'-') || - (text[index] == L' ') || (text[index] == TEXT_JAPANESE_SPACE) || (text[index] == L'+') || - (text[index] == L'.') || (text[index] == L'(') || - (text[index] == L')') || (index == linkOffset && (text[linkOffset] == L'+')))) + (Character::IsDigit(pText[index]) || (pText[index] == L'*') || + (pText[index] == L'#') || (pText[index] == L'-') || + (pText[index] == L' ') || (pText[index] == TEXT_JAPANESE_SPACE) || (pText[index] == L'+') || + (pText[index] == L'.') || (pText[index] == L'(') || + (pText[index] == L')') || (index == linkOffset && (pText[linkOffset] == L'+')))) { index++; - if (blankCount == 0 && (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE)) + if (blankCount == 0 && (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE)) { blankCount++; } - else if (blankCount == 1 && (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE)) + else if (blankCount == 1 && (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE)) { blankCount++; break; } - else if (Character::IsDigit(text[index]) || text[index] == L'*' || text[index] == L'#') + else if (Character::IsDigit(pText[index]) || pText[index] == L'*' || pText[index] == L'#') { blankCount = 0; } - else if (text[index] == L'-' && text[index + 1] == L'-') + else if (pText[index] == L'-' && pText[index + 1] == L'-') { break; } - else if (text[index] == L'(' || text[index] == L')') + else if (pText[index] == L'(' || pText[index] == L')') { break; } - else if ((text[index] == L'.' && - text[index + 1] == L'.') || (text[index] == L'.' && !Character::IsDigit(text[index + 1]))) + else if ((pText[index] == L'.' && + pText[index + 1] == L'.') || (pText[index] == L'.' && !Character::IsDigit(pText[index + 1]))) { break; } @@ -477,10 +486,10 @@ IsPhoneNumber(const String& text, int index, int& linkLength) } } - if (text[index - 1] == L' ' || text[index - 1] == TEXT_JAPANESE_SPACE) + if (pText[index - 1] == L' ' || pText[index - 1] == TEXT_JAPANESE_SPACE) { index -= 1; - while (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE) + while (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE) { index--; } @@ -505,13 +514,9 @@ TextCutLinkParser::TextCutLinkParser(void) if (!gpUrlPrefixes) { gpUrlPrefixes = new (std::nothrow) ArrayListT ; - SysTryCatch(NID_GRP - , gpUrlPrefixes != null - , r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_GRP, gpUrlPrefixes != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); r = gpUrlPrefixes->Construct(); - SysTryCatch(NID_GRP - , r == E_SUCCESS - , , r, "[%s] Propagated.", GetErrorMessage(r)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); gpUrlPrefixes->Add(L"www."); gpUrlPrefixes->Add(L"http://"); @@ -523,14 +528,10 @@ TextCutLinkParser::TextCutLinkParser(void) if (!gpDomainNames) { gpDomainNames = new (std::nothrow) ArrayListT ; - SysTryCatch(NID_GRP - , gpDomainNames != null - , r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_GRP, gpDomainNames != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); r = gpDomainNames->Construct(); - SysTryCatch(NID_GRP - , r == E_SUCCESS - , , r, "[%s] Propagated.", GetErrorMessage(r)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); gpDomainNames->Add(L".com"); gpDomainNames->Add(L".net"); @@ -669,9 +670,7 @@ TextCutLinkParser::Parse(const wchar_t* pText, int textLength, int startPosition } pTextLink = CreateTextLinkInfo(0, 0, LINK_TYPE_NONE); - SysTryCatch(NID_GRP - , pTextLink != null - , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_GRP, pTextLink != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); pTextLink->index = -1; @@ -729,9 +728,7 @@ TextCutLinkParser::Parse(const wchar_t* pText, int textLength, int startPosition else { TextLinkInfo* pNextLink = CreateTextLinkInfo(linkStartIndex, linkLength, linkType); - SysTryCatch(NID_GRP - , pNextLink != null, - r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient"); + SysTryCatch(NID_GRP, pNextLink != null,r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient"); AppendTextLinkInfo(pTextLink, pNextLink); } @@ -767,8 +764,7 @@ CATCH: result TextCutLinkParser::SetCutLinkMask(int mask) { - SysTryReturn(NID_GRP - , LINK_TYPE_NONE <= mask && mask < LINK_TYPE_MAX + SysTryReturn(NID_GRP, LINK_TYPE_NONE <= mask && mask < LINK_TYPE_MAX , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); __linkMask = mask; @@ -806,9 +802,7 @@ TextLinkInfo* TextCutLinkParser::CreateTextLinkInfo(int offset, int length, LinkType linkType) { TextLinkInfo* pTextLinkInfo = new (std::nothrow) TextLinkInfo; - SysTryReturn(NID_GRP - , pTextLinkInfo != null - , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient"); + SysTryReturn(NID_GRP, pTextLinkInfo != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient"); pTextLinkInfo->index = 0; pTextLinkInfo->srcOffset = offset; diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 69b8329..0bf345d 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/graphics/inc ${CMAKE_SOURCE_DIR}/src/graphics/text ${CMAKE_SOURCE_DIR}/src/graphics/effect + ${CMAKE_SOURCE_DIR}/src/app/inc . ./inc ./controls @@ -58,6 +59,7 @@ SET (${this_target}_SOURCE_FILES animations/FUiAnim_VisualElementSurfaceImpl.cpp animations/FUiAnim_EflNode.cpp animations/FUiAnim_EflLayer.cpp + animations/FUiAnim_EflLayerConfiguration.cpp animations/FUiAnim_EflVisualElementSurfaceImpl.cpp animations/FUiAnim_MatrixUtil.cpp animations/FUiAnimAnimationBase.cpp @@ -162,7 +164,6 @@ SET (${this_target}_SOURCE_FILES FUi_FocusManagerImpl.cpp FUiKeyboardMap.cpp FUi_PublicOrientationEvent.cpp - FUi_ActiveWindowEvent.cpp FUiTouch.cpp FUiTouchEventInfo.cpp FUi_TouchEventInfoImpl.cpp diff --git a/src/ui/FUi_AccessibilityContainer.cpp b/src/ui/FUi_AccessibilityContainer.cpp index 9240bdc..622d2af 100644 --- a/src/ui/FUi_AccessibilityContainer.cpp +++ b/src/ui/FUi_AccessibilityContainer.cpp @@ -593,7 +593,7 @@ _AccessibilityContainer::IsActivated(void) const FloatRectangle _AccessibilityContainer::GetAbsoluteBounds(void) const { - return __pOwner->GetAbsoluteBoundsF(); + return __pOwner->GetAbsoluteBoundsF(true); } void diff --git a/src/ui/FUi_AccessibilityElement.cpp b/src/ui/FUi_AccessibilityElement.cpp index eb0bcab..f070bd4 100644 --- a/src/ui/FUi_AccessibilityElement.cpp +++ b/src/ui/FUi_AccessibilityElement.cpp @@ -99,6 +99,7 @@ _AccessibilityElement::_AccessibilityElement(bool systemElement) , __setHintByUser(false) , __disabledHint(false) , __updateContents(false) + , __publicLabelUpdated(false) { } _AccessibilityElement::~_AccessibilityElement(void) @@ -395,7 +396,7 @@ _AccessibilityElement::SetBounds(const Tizen::Graphics::Rectangle& bounds) FloatRectangle _AccessibilityElement::GetAbsoluteBounds(void) const { - FloatRectangle controlAbsBounds = GetParent()->GetOwner().GetAbsoluteBoundsF(); + FloatRectangle controlAbsBounds = GetParent()->GetOwner().GetAbsoluteBoundsF(true); FloatRectangle rect(controlAbsBounds.x+__bounds.x, controlAbsBounds.y+__bounds.y, __bounds.width, __bounds.height); const_cast(__absBounds).SetBounds(controlAbsBounds.x+__bounds.x, controlAbsBounds.y+__bounds.y, __bounds.width, __bounds.height); return rect; @@ -519,4 +520,16 @@ _AccessibilityElement::SetValueWithStringId(const char* id) __pValueId[length] = '\0'; } +void +_AccessibilityElement::SetPublicLabelUpdate(bool isPublicLabelUpdated) +{ + __publicLabelUpdated = isPublicLabelUpdated; +} + +bool +_AccessibilityElement::IsPublicLabelUpdated(void) +{ + return __publicLabelUpdated; +} + }} diff --git a/src/ui/FUi_AccessibilityElementImpl.cpp b/src/ui/FUi_AccessibilityElementImpl.cpp index f642822..78efc8b 100644 --- a/src/ui/FUi_AccessibilityElementImpl.cpp +++ b/src/ui/FUi_AccessibilityElementImpl.cpp @@ -91,6 +91,7 @@ void _AccessibilityElementImpl::SetLabel(const Tizen::Base::String& label) { SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + __pCore->SetPublicLabelUpdate(true); return __pCore->SetLabel(label); } void diff --git a/src/ui/FUi_AccessibilityManager.cpp b/src/ui/FUi_AccessibilityManager.cpp index 03e824b..8e27a38 100644 --- a/src/ui/FUi_AccessibilityManager.cpp +++ b/src/ui/FUi_AccessibilityManager.cpp @@ -1305,7 +1305,7 @@ _AccessibilityManager::MakeList(void) { if (controlList.GetAt(i, pControl) == E_SUCCESS) { - FloatRectangle rect = pControl->GetAbsoluteBoundsF(); + FloatRectangle rect = pControl->GetAbsoluteBoundsF(true); if (rect.x + rect.width <= 0.0f || (rect.x) >= margin) { bool inside = false; @@ -1421,7 +1421,7 @@ _AccessibilityManager::MakeList(void) pControl = &(pPositionByControlListElement->GetParent()->GetOwner()); while (pControl) { - rect = pControl->GetAbsoluteBounds(); + rect = pControl->GetAbsoluteBounds(true); if (rect.y >0) { break; @@ -1952,34 +1952,35 @@ _AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const Floa _Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow(); if (!(pWindow->IsLayoutChangable())) { - Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds(); + Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds(true); pt.x = pt.x + topWindowAbsBounds.x; pt.y = pt.y + topWindowAbsBounds.y; } pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt); - if (pControl == null || !(pControl->GetAbsoluteBounds().Contains(pt))) + if (pControl == null || !(pControl->GetAbsoluteBounds(true).Contains(pt))) { return false; } _AccessibilityContainer* pAccContainer = pControl->GetAccessibilityContainer(); - while(!(pAccContainer->IsActivated())) + _AccessibilityElement* pElement = null; + while(pElement == null) { + pElement = pAccContainer->Hit(pt); + if(pElement) + { + break; + } _Control* _pControl = pAccContainer->GetOwner().GetParent(); if (_pControl == null) { return false; } pAccContainer = _pControl->GetAccessibilityContainer(); - if (pAccContainer == null) + if(pAccContainer == null) { return false; } } - _AccessibilityElement* pElement = pAccContainer->Hit(pt); - if (pElement == null) - { - return false; - } if (__pTargetElement == pElement) { diff --git a/src/ui/FUi_AccessibilityTtsPlayer.cpp b/src/ui/FUi_AccessibilityTtsPlayer.cpp index 10ed3d0..0e6ee16 100644 --- a/src/ui/FUi_AccessibilityTtsPlayer.cpp +++ b/src/ui/FUi_AccessibilityTtsPlayer.cpp @@ -483,33 +483,10 @@ result _AccessibilityTtsPlayer::Deactivate(void) { __initialized = false; - tts_state_e ttsState = TTS_STATE_READY; - - int ttsError = tts_get_state(__ttsHandle, &ttsState); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to get the current state.", GetEngineErrorMessage(ttsError)); - if (ttsState == TTS_STATE_PLAYING || ttsState == TTS_STATE_PAUSED) - { - ttsError = tts_stop(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to stop.", GetEngineErrorMessage(ttsError)); - } if (__activated) { - ttsError = tts_unprepare(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to unprepare.", GetEngineErrorMessage(ttsError)); - - ttsError = tts_unset_utterance_completed_cb(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to unset the utterance completed callback.", GetEngineErrorMessage(ttsError)); - - ttsError = tts_unset_utterance_started_cb(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to unset the utterance started callback.", GetEngineErrorMessage(ttsError)); - - ttsError = tts_unset_state_changed_cb(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to unset the state changed callback.", GetEngineErrorMessage(ttsError)); - - ttsError = tts_unset_error_cb(__ttsHandle); - SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to unset the error callback.", GetEngineErrorMessage(ttsError)); - + int ttsError = TTS_ERROR_NONE; ttsError = tts_destroy(__ttsHandle); SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to destroy.", GetEngineErrorMessage(ttsError)); diff --git a/src/ui/FUi_ActiveWindowEvent.cpp b/src/ui/FUi_ActiveWindowEvent.cpp deleted file mode 100644 index d191172..0000000 --- a/src/ui/FUi_ActiveWindowEvent.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/** - * @file FUi_ActiveWindowEvent.cpp - * @brief This is the implementation for the _ActiveWindowEvent class. - * @since 2.0 - */ -#include -#include -#include -#include "FUi_ActiveWindowEvent.h" - -using namespace Tizen::Base; -using namespace Tizen::Base::Runtime; -using namespace Tizen::App; - -namespace Tizen { namespace Ui -{ - -class _ActiveWindowEventArg - : public Tizen::Base::Runtime::IEventArg - , public Tizen::Base::Object -{ -public: - _ActiveWindowEventArg(unsigned int xid, int pid, char* pAppName); - - virtual ~_ActiveWindowEventArg(void); - - unsigned int GetWindowId(void) const; - int GetProcessId(void) const; - char* GetAppName(void) const; - -private: - _ActiveWindowEventArg(const _ActiveWindowEventArg& rhs); - _ActiveWindowEventArg& operator =(const _ActiveWindowEventArg& rhs); - -private: - unsigned int __xid; - int __pid; - char* __pAppName; -}; // _ActiveWindowEventArg - -_ActiveWindowEventArg::_ActiveWindowEventArg(unsigned int xid, int pid, char* pAppName) - : __xid(xid) - , __pid(pid) - , __pAppName(pAppName) -{ -} - -_ActiveWindowEventArg::~_ActiveWindowEventArg(void) -{ -} - -unsigned int -_ActiveWindowEventArg::GetWindowId(void) const -{ - return __xid; -} - -int -_ActiveWindowEventArg::GetProcessId(void) const -{ - return __pid; -} - -char* -_ActiveWindowEventArg::GetAppName(void) const -{ - return __pAppName; -} - -_ActiveWindowEvent* -_ActiveWindowEvent::CreateInstanceN(void) -{ - _ActiveWindowEvent* pActiveWindowEvent = new (std::nothrow) _ActiveWindowEvent(); - SysTryReturn(NID_UI, pActiveWindowEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); - - result r = GetLastResult(); - SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - SetLastResult(E_SUCCESS); - - return pActiveWindowEvent; - -CATCH: - delete pActiveWindowEvent; - return null; -} - -IEventArg* -_ActiveWindowEvent::CreateActiveWindowEventArgN(unsigned int xid, int pid, char* pAppName) -{ - _ActiveWindowEventArg* pEventArg = new (std::nothrow) _ActiveWindowEventArg(xid, pid, pAppName); - SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); - - SetLastResult(E_SUCCESS); - - return pEventArg; -} - -_ActiveWindowEvent::~_ActiveWindowEvent(void) -{ -} - -void -_ActiveWindowEvent::FireImpl(IEventListener& listener, const IEventArg& arg) -{ - _IActiveWindowEventListener* pEventListener = dynamic_cast <_IActiveWindowEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); - - const _ActiveWindowEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); - - pEventListener->OnActiveWindowChanged(pArg->GetWindowId(), pArg->GetProcessId(), pArg->GetAppName()); - - SetLastResult(E_SUCCESS); -} - -_ActiveWindowEvent::_ActiveWindowEvent(void) -{ - result r = _Event::Initialize(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - - SetLastResult(E_SUCCESS); -} - -}} // Tizen::Ui diff --git a/src/ui/FUi_ActiveWindowEvent.h b/src/ui/FUi_ActiveWindowEvent.h deleted file mode 100644 index b885a67..0000000 --- a/src/ui/FUi_ActiveWindowEvent.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/** - * @file FUi_ActiveWindowEvent.h - * @brief This is the header file for _ActiveWindowEvent class. - * @since 2.0 - * - */ -#ifndef _FUI_INTERNAL_ACTIVE_WINDOW_EVENT_H_ -#define _FUI_INTERNAL_ACTIVE_WINDOW_EVENT_H_ - -#include -#include -#include - -namespace Tizen { namespace Ui -{ -class _ActiveWindowEvent - : public Tizen::Base::Runtime::_Event -{ -public: - static _ActiveWindowEvent* CreateInstanceN(void); - static Tizen::Base::Runtime::IEventArg* CreateActiveWindowEventArgN(unsigned int xid, int pid, char* pAppName); - - virtual ~_ActiveWindowEvent(void); - -private: - virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); - - _ActiveWindowEvent(void); - - _ActiveWindowEvent(const _ActiveWindowEvent& rhs); - _ActiveWindowEvent& operator =(const _ActiveWindowEvent& rhs); -}; // _ActiveWindowEvent - -}} // Tizen::Ui - -#endif // _FUI_INTERNAL_ACTIVE_WINDOW_EVENT_H_ diff --git a/src/ui/FUi_Clipboard.cpp b/src/ui/FUi_Clipboard.cpp index 89a1d2f..1ee91c9 100644 --- a/src/ui/FUi_Clipboard.cpp +++ b/src/ui/FUi_Clipboard.cpp @@ -52,8 +52,8 @@ using namespace Tizen::Ui::Controls; namespace { -const int _CLIPBOARD_ITEM_MAX = 12; -const int _CBHM_ITEM_MAX = 12; +const int _CLIPBOARD_ITEM_MAX = 20; +const int _CBHM_ITEM_MAX = 20; const String _CLIPBOARD_DEFAULT_PATH = L"/tmp/clipboard/clipboard_"; const String _CLIPBOARD_DEFAULT_EXTENSION = L".png"; } // Anonymous @@ -364,10 +364,13 @@ CATCH: } result -_Clipboard::ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener) +_Clipboard::ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener, bool internal) { - SysTryReturn(NID_UI, IsPopupVisible() == false, E_INVALID_OPERATION, E_INVALID_OPERATION, - "[E_INVALID_OPERATION] The popup is already shown."); + if (internal == false) + { + SysTryReturn(NID_UI, IsPopupVisible() == false, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The popup is already shown."); + } result r = E_SUCCESS; @@ -378,6 +381,10 @@ _Clipboard::ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListene SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); } + if (internal == true) + { + __pPublicEvent->RemoveListener(listener); + } r = __pPublicEvent->AddListener(listener); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/FUi_Clipboard.h b/src/ui/FUi_Clipboard.h index f38f092..d9db3f2 100644 --- a/src/ui/FUi_Clipboard.h +++ b/src/ui/FUi_Clipboard.h @@ -62,7 +62,7 @@ public: Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); const _ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes); - result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener); + result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener, bool internal = false); result HidePopup(void); bool IsPopupVisible(void); diff --git a/src/ui/FUi_Control.cpp b/src/ui/FUi_Control.cpp index 24a9a53..1697386 100644 --- a/src/ui/FUi_Control.cpp +++ b/src/ui/FUi_Control.cpp @@ -693,8 +693,9 @@ _Control::OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo) bool _Control::OnFocusGained(const _Control& source) { - bool isfocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled(); - if (isfocusMode) + bool isFocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled(); + bool isFocusalbeControl = _FocusManagerImpl::GetInstance()->IsFocusable(this); + if (isFocusMode && isFocusalbeControl) { DrawFocus(); } @@ -706,7 +707,7 @@ _Control::OnFocusLost(const _Control& source) { if (__pFocusVisualElement) { - __pFocusVisualElement.reset(); + __pFocusVisualElement->SetShowState(false); } return false; } @@ -1076,6 +1077,25 @@ _Control::InvalidateHierarchyRootWindow(void) } void +_Control::InvalidateHierarchyAbsoluteBounds(void) +{ + struct _Visitor + : public Visitor + { + virtual VisitType Visit(_Control& control) + { + control.__needRecalcAbsBounds = true; + control.__needRecalcAbsBoundsF = true; + + return VISIT_DOWNWARD; + } + }; + + _Visitor visitor; + Accept(visitor); +} + +void _Control::Draw(bool recursive) { ClearLastResult(); @@ -1435,7 +1455,7 @@ _Control::SetLayer(_ControlLayer layer) ClearLastResult(); _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*GetVisualElement()); - result r = pImpl->SetZOrderGroup(::GetZOrderGroupOfVisualElement(layer)); + result r = pImpl->SetZOrderGroup(GetZOrderGroupOfVisualElement(layer)); __layer = layer; SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1802,6 +1822,7 @@ _Control::EndAttaching(_Control& child) { child.SetParent(this); child.InvalidateHierarchyRootWindow(); + child.InvalidateHierarchyAbsoluteBounds(); FloatRectangle floatBounds(child.GetBoundsF().x, child.GetBoundsF().y, child.GetBoundsF().width, child.GetBoundsF().height); @@ -1883,7 +1904,7 @@ _Control::RemoveFocusRing(void) { if (__pFocusVisualElement) { - __pFocusVisualElement.reset(); + __pFocusVisualElement->SetShowState(false); } } @@ -2033,9 +2054,11 @@ _Control::DetachChild(_Control& child) ClearLastResult(); result r = E_SUCCESS; - SysTryReturn(NID_UI, - child.GetParent() == this, E_INVALID_ARG, - E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + if (child.GetParent() != this) + { + SetLastResult(E_INVALID_ARG); + return E_INVALID_ARG; + } if (IsAttachedToMainTree()) { @@ -2154,7 +2177,10 @@ _Control::DetachAllChildren(bool detachSystemChild, bool recursive) } } - SysLog(NID_UI, "%d children are not detached from this container.", notDetachedChildCount); + if (notDetachedChildCount > 0) + { + SysLog(NID_UI, "%d children are not detached from this container.", notDetachedChildCount); + } } ClearLastResult(); @@ -2652,6 +2678,18 @@ _Control::IsFocused(void) const return false; } +void +_Control::SetFocusWindowActivationChecked(bool isChecked) +{ + __isFocusWindowActivationChecked = isChecked; +} + +bool +_Control::IsFocusWindowActivationChecked(void) +{ + return __isFocusWindowActivationChecked; +} + result _Control::SetFocused(bool on) { @@ -2940,7 +2978,11 @@ _Control::IsVisible(void) const { ClearLastResult(); - SysTryReturn(NID_UI, IsAttachedToMainTree(), false, E_SYSTEM, "[E_SYSTEM] This control should be attached to the main tree."); + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_SYSTEM); + return false; + } struct _Visitor : public Visitor @@ -3267,6 +3309,11 @@ _Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseR } } + if (moved || resized) + { + InvalidateHierarchyAbsoluteBounds(); + } + ClearLastResult(); return E_SUCCESS; } @@ -3658,8 +3705,13 @@ _Control::GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) const } Rectangle -_Control::GetAbsoluteBounds(void) const +_Control::GetAbsoluteBounds(bool recalcAlways) const { + if (!recalcAlways && !__needRecalcAbsBounds) + { + return __absoluteBounds; + } + Point accumPoint; Rectangle absoluteBounds; Rectangle clientBounds; @@ -3697,12 +3749,20 @@ _Control::GetAbsoluteBounds(void) const absoluteBounds.width = __bounds.width; absoluteBounds.height = __bounds.height; + const_cast<_Control*>(this)->__absoluteBounds = absoluteBounds; + const_cast<_Control*>(this)->__needRecalcAbsBounds = false; + return absoluteBounds; } FloatRectangle -_Control::GetAbsoluteBoundsF(void) const +_Control::GetAbsoluteBoundsF(bool recalcAlways) const { + if (!recalcAlways && !__needRecalcAbsBoundsF) + { + return __absoluteBoundsF; + } + FloatPoint accumPoint; FloatRectangle absoluteBounds; FloatRectangle clientBounds; @@ -3740,6 +3800,9 @@ _Control::GetAbsoluteBoundsF(void) const absoluteBounds.width = __bounds.width; absoluteBounds.height = __bounds.height; + const_cast<_Control*>(this)->__absoluteBoundsF = absoluteBounds; + const_cast<_Control*>(this)->__needRecalcAbsBoundsF = false; + return absoluteBounds; } @@ -3910,6 +3973,8 @@ _Control::DisposeControl(void) // E_SYSTEM _Control::_Control(void) : __needRecalcRootWindow(true) + , __needRecalcAbsBounds(true) + , __needRecalcAbsBoundsF(true) , __pRootWindow(null) , __name(L"") , __pParent(null) @@ -3918,7 +3983,8 @@ _Control::_Control(void) , __bounds(0.0f, 0.0f, 0.0f, 0.0f) , __contentAreaBounds(0.0f, 0.0f, 0.0f, 0.0f) , __clientBounds(0.0f, 0.0f, 0.0f, 0.0f) - , __absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __absoluteBounds(0, 0, 0, 0) + , __absoluteBoundsF(0.0f, 0.0f, 0.0f, 0.0f) , __invalidatedBounds(0.0f, 0.0f, 0.0f, 0.0f) , __minSize(FloatDimension(0.0f, 0.0f)) , __maxSize(FloatDimension(MAX_LENGTH, MAX_LENGTH)) @@ -3943,6 +4009,7 @@ _Control::_Control(void) , __isCalledGetCanvasN(false) , __isFocusMode(false) , __isNavigatable(true) + , __isFocusWindowActivationChecked(false) , __pVisualElementContentProvider(null) , __pVisualElement(null) , __pVisualElementEventListener(null) @@ -5183,55 +5250,63 @@ _Control::GetNextFocus(void) const void _Control::OnDrawFocus(void) { - unique_ptr pFocusVisualElement (new (std::nothrow) VisualElement, _VisualElementDeleter()); - SysTryReturn(NID_UI, pFocusVisualElement, , E_SYSTEM, "[E_SYSTEM] System error"); + if (__pFocusVisualElement.get() == null) + { + unique_ptr pFocusVisualElement (new (std::nothrow) VisualElement, _VisualElementDeleter()); + SysTryReturn(NID_UI, pFocusVisualElement, , E_SYSTEM, "[E_SYSTEM] System error"); - result r = pFocusVisualElement->Construct(); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + result r = pFocusVisualElement->Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); - __pFocusVisualElement.reset(pFocusVisualElement.release()); - __pFocusVisualElement->SetImplicitAnimationEnabled(false); - __pFocusVisualElement->SetShowState(true); + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pFocusVisualElement); + SysTryReturn(NID_UI, pImpl, , E_SYSTEM, "[E_SYSTEM] pImpl System error"); + pImpl->SetZOrderGroup(GetZOrderGroupOfVisualElement(_CONTROL_LAYER_SYSTEM)); - _VisualElement* pControVisualElement = this->GetVisualElement(); - pControVisualElement->AttachChild(*__pFocusVisualElement); + __pFocusVisualElement.reset(pFocusVisualElement.release()); + __pFocusVisualElement->SetImplicitAnimationEnabled(false); - if (__pFocusVisualElement) - { - Rectangle rectangle = GetBounds(); - __pFocusVisualElement->SetBounds(FloatRectangle(0, 0, rectangle.width, rectangle.height)); - unique_ptrpCanvas(__pFocusVisualElement->GetCanvasN()); - if (pCanvas) - { - pCanvas->SetBackgroundColor(0x55555555); - pCanvas->Clear(); - } - Color contentHighlightedColor; - GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); - Bitmap* pBitmap = null; - Bitmap* pTempBitmap = null; - result r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - pBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); - - if (pBitmap) + _VisualElement* pControVisualElement = this->GetVisualElement(); + pControVisualElement->AttachChild(*__pFocusVisualElement); + + + if (__pFocusVisualElement) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + Rectangle rectangle = GetBounds(); + __pFocusVisualElement->SetBounds(FloatRectangle(0, 0, rectangle.width, rectangle.height)); + unique_ptrpCanvas(__pFocusVisualElement->GetCanvasN()); + if (pCanvas) { - if (pCanvas) - { - r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); - } + pCanvas->SetBackgroundColor(0x55555555); + pCanvas->Clear(); } - else + Color contentHighlightedColor; + GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); + Bitmap* pBitmap = null; + Bitmap* pTempBitmap = null; + result r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + pBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); + + if (pBitmap) { - if (pCanvas) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) { - r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); + if (pCanvas) + { + r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); + } + } + else + { + if (pCanvas) + { + r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); + } } } + } - __pFocusVisualElement->SetShowState(true); } + __pFocusVisualElement->SetShowState(true); } void diff --git a/src/ui/FUi_ControlImpl.cpp b/src/ui/FUi_ControlImpl.cpp index 2a38813..dad33b6 100644 --- a/src/ui/FUi_ControlImpl.cpp +++ b/src/ui/FUi_ControlImpl.cpp @@ -1442,28 +1442,28 @@ public: const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); - TouchEventInfo publicTouchInfo; + TouchEventInfo publicTouchInfo; - _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); - publicTouchInfo.Construct(*pEventArg); + publicTouchInfo.Construct(*pEventArg); - if (pEventArg) - { - delete pEventArg; - pEventArg = null; - } + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchMoved(control, publicTouchInfo); - if (isFiltered) - { - return true; - } + if (isFiltered) + { + return true; + } _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); - } + } return __impl.CallOnTouchMoved(source, touchInfo); } @@ -1481,28 +1481,28 @@ public: const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); - TouchEventInfo publicTouchInfo; + TouchEventInfo publicTouchInfo; - _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); - publicTouchInfo.Construct(*pEventArg); + publicTouchInfo.Construct(*pEventArg); - if (pEventArg) - { - delete pEventArg; - pEventArg = null; - } + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchCanceled(control, publicTouchInfo); - if (isFiltered) - { - return true; - } + if (isFiltered) + { + return true; + } _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); - } + } return __impl.CallOnTouchCanceled(source, touchInfo); } @@ -1858,14 +1858,13 @@ public: Control& control = static_cast(pControlImpl->GetPublic()); - KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast(keyInfo.GetKeyCode()), - static_cast(keyInfo.GetKeyModifier())); + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); - isFiltered = __impl.__pPublicPropagatedKeyEventListener->TranslateKeyEventInfo(control, *pKeyEventInfo); + isFiltered = __impl.__pPublicPropagatedKeyEventListener->TranslateKeyEventInfo(control, keyEventInfo); if (isFiltered) { - keyInfo.SetKeyCode(static_cast<_KeyCode>(pKeyEventInfo->GetKeyCode())); - keyInfo.SetKeyModifier(static_cast<_KeyModifier>(pKeyEventInfo->GetKeyModifier())); + keyInfo.SetKeyCode(static_cast<_KeyCode>(keyEventInfo.GetKeyCode())); + keyInfo.SetKeyModifier(static_cast<_KeyModifier>(keyEventInfo.GetKeyModifier())); return true; } } @@ -1889,8 +1888,6 @@ public: bool isFiltered = false; - //SysLog(NID_UI, ">>> [impl.1] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); - if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); @@ -1912,19 +1909,14 @@ public: Control& control = static_cast(pControlImpl->GetPublic()); - KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast(keyInfo.GetKeyCode()), - static_cast(keyInfo.GetKeyModifier())); + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); - //SysLog(NID_UI, ">>> [impl.2] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); - - isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyPressed(control, *pKeyEventInfo); - if (isFiltered) - { - return true; - } + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyPressed(control, keyEventInfo); + if (isFiltered) + { + return true; } - - //SysLog(NID_UI, ">>> [impl.3] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); + } if (&source == &__core) { @@ -1970,8 +1962,6 @@ public: bool isFiltered = false; - //SysLog(NID_UI, ">>> [impl.1] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); - if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); @@ -1993,19 +1983,14 @@ public: Control& control = static_cast(pControlImpl->GetPublic()); - KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast(keyInfo.GetKeyCode()), - static_cast(keyInfo.GetKeyModifier())); - - //SysLog(NID_UI, ">>> [impl.2] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); - isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyReleased(control, *pKeyEventInfo); - if (isFiltered) - { - return true; - } + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyReleased(control, keyEventInfo); + if (isFiltered) + { + return true; } - - //SysLog(NID_UI, ">>> [impl.3] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); + } if (&source == &__core) { @@ -2064,10 +2049,9 @@ public: Control& control = static_cast(pControlImpl->GetPublic()); - KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast(keyInfo.GetKeyCode()), - static_cast(keyInfo.GetKeyModifier())); + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); - isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyPressed(control, *pKeyEventInfo); + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyPressed(control, keyEventInfo); if (isFiltered) { return true; @@ -2112,10 +2096,9 @@ public: Control& control = static_cast(pControlImpl->GetPublic()); - KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast(keyInfo.GetKeyCode()), - static_cast(keyInfo.GetKeyModifier())); + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); - isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyReleased(control, *pKeyEventInfo); + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyReleased(control, keyEventInfo); if (isFiltered) { return true; @@ -3355,9 +3338,11 @@ _ControlImpl::SendNotification(const _ControlImpl& source, Tizen::Base::Collecti result _ControlImpl::Draw(bool recursive) { - SysTryReturn(NID_UI, - IsAttachedToMainTree(), E_INVALID_OPERATION, - E_INVALID_OPERATION, "[E_INVALID_OPERATION] The control should be attached to the main tree."); + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return E_INVALID_OPERATION; + } GetCore().Draw(recursive); @@ -3379,9 +3364,11 @@ _ControlImpl::Show(void) void _ControlImpl::Invalidate(bool recursive) { - SysTryReturnVoidResult(NID_UI, - IsAttachedToMainTree(), - E_INVALID_OPERATION, "[E_INVALID_OPERATION] The control should be attached to the main tree."); + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } GetCore().Invalidate(recursive); } @@ -3389,9 +3376,11 @@ _ControlImpl::Invalidate(bool recursive) void _ControlImpl::Invalidate(const Rectangle& rect) { - SysTryReturnVoidResult(NID_UI, - IsAttachedToMainTree(), - E_INVALID_OPERATION, "[E_INVALID_OPERATION] The control should be attached to the main tree."); + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } GetCore().Invalidate(rect); } @@ -3399,9 +3388,11 @@ _ControlImpl::Invalidate(const Rectangle& rect) void _ControlImpl::Invalidate(const FloatRectangle& rect) { - SysTryReturnVoidResult(NID_UI, - IsAttachedToMainTree(), - E_INVALID_OPERATION, "[E_INVALID_OPERATION] The control should be attached to the main tree."); + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } GetCore().Invalidate(rect); } @@ -4316,7 +4307,14 @@ _ControlImpl::GetControlAnimator(void) const if ((IsMovable() == false) && (IsResizable() == false)) { - SysLog(NID_UI, "Control is not animatable.\n"); + SysLog(NID_UI, "Control is not animatable."); + return null; + } + + const _WindowImpl* pWindowImpl = dynamic_cast (this); + if (pWindowImpl != null) + { + SysLog(NID_UI, "Window is not animatable."); return null; } diff --git a/src/ui/FUi_ControlManager.cpp b/src/ui/FUi_ControlManager.cpp index 15ddaa1..010ec24 100644 --- a/src/ui/FUi_ControlManager.cpp +++ b/src/ui/FUi_ControlManager.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -67,7 +67,6 @@ using namespace std; using namespace Tizen::App; -using namespace Tizen::App::Package; using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Graphics; @@ -272,50 +271,6 @@ _ControlManager::GetUsedHandleCount(void) const return __objectManager.GetObjectCount(); } -result -_ControlManager::GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) -{ - _PackageInfoImpl infoImpl; - { - String subAppId(_AppInfo::GetPackageId()); - - result r = infoImpl.Construct(subAppId); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - } - - String baseScreenSize(null); - String coordinateSystem(null); - String logicalCoordinate(null); - - result r = infoImpl.GetUiScalabilityInfo(baseScreenSize, coordinateSystem, logicalCoordinate); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - - if (coordinateSystem.Equals(L"Physical", false)) - { - isCoordinateSystemLogical = false; - logicalCoordinateSystemInt = 0; - logicalBaseScreenSize = BASE_SCREEN_SIZE_DEFAULT; - - return E_SUCCESS; - } - - //Logical Resolution - r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - - // BaseScreenSize - if (baseScreenSize.Equals(L"Large", false)) - { - logicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; - } - else // temp - { - logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; - } - - return r; -} - bool _ControlManager::IsCoordinateSystemLogical(void) const { @@ -357,7 +312,7 @@ _ControlManager::_ControlManager(void) // [ToDo] exception check. , __pClipboardOwner(null) , __pControlManagerEventListenerList(new (std::nothrow) LinkedListT<_IControlManagerEventListener*>) { - result r = GetAppCoordinateSystem(__isCoordinateSystemLogical, __logicalCoordinateSystem, __logicalBaseScreenSize); + result r = _CoordinateInfo::GetAppCoordinateSystem(__isCoordinateSystemLogical, __logicalCoordinateSystem, __logicalBaseScreenSize); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred."); Dimension deviceResolution = CoordinateSystem::GetPhysicalResolution(); @@ -1322,8 +1277,11 @@ _ControlManager::SetFocusControl(const _Control& control, bool on) if (GetLastResult() == E_SUCCESS) { __pFocusControl = const_cast<_Control*>(&control); - _UiFocusEvent event(control.GetHandle(), FOCUS_GAINED); - _UiEventManager::GetInstance()->SendEvent(event); + if (__pFocusControl->IsFocusWindowActivationChecked() == false || IsFrameActivated() == true) + { + _UiFocusEvent event(control.GetHandle(), FOCUS_GAINED); + _UiEventManager::GetInstance()->SendEvent(event); + } } } else diff --git a/src/ui/FUi_DataBinding.cpp b/src/ui/FUi_DataBinding.cpp index f58be2e..dfb96c2 100644 --- a/src/ui/FUi_DataBinding.cpp +++ b/src/ui/FUi_DataBinding.cpp @@ -90,508 +90,855 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base case DATA_BINDING_DATA_TYPE_INTEGER: switch (sourceType) // INTEGER from BOOLEAN, DOUBLE, FLOAT, INTEGER, LONG, STRING { - case DATA_BINDING_DATA_TYPE_BOOLEAN: - { - Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_BOOLEAN: { - return false; + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool()?1:0; + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToBool()?1:0; - return true; - } - break; - case DATA_BINDING_DATA_TYPE_FLOAT: - { - Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_FLOAT: { - return false; + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToInt(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_INTEGER: - { - Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_INTEGER: { - return false; + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToInt(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_LONG: - { - Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_LONG: { - return false; + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToInt(); - return true; + break; + case DATA_BINDING_DATA_TYPE_COLOR: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).GetRGB32(); + return true; + } + break; + default: + { + return false; + } } break; - case DATA_BINDING_DATA_TYPE_COLOR: + case DATA_BINDING_DATA_TYPE_BOOLEAN: + switch (sourceType) { - Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0) == 0 ? false:true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)) == true ?true:false; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0.0f) == 0 ?false:true; + } + break; + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0.0f) == 0 ?false:true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0) == 0 ? false:true; + } + break; + default: { return false; } - pTarget->value = static_cast(const_cast(sourceData)).GetRGB32(); - return true; - } - break; - default: - return false; } break; case DATA_BINDING_DATA_TYPE_FLOAT: switch (sourceType) // FLOAT from DOUBLE, FLOAT, INTEGER, LONG, STRING { - case DATA_BINDING_DATA_TYPE_BOOLEAN: - { - Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_BOOLEAN: { - return false; + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; - return true; - } - break; - case DATA_BINDING_DATA_TYPE_FLOAT: - { - Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_FLOAT: { - return false; + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_INTEGER: - { - Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_INTEGER: { - return false; + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_LONG: - { - Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; + } + break; + default: { return false; } - pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); - return true; - } - break; - default: - return false; } break; case DATA_BINDING_DATA_TYPE_DOUBLE: switch (sourceType) // DOUBLE from DOUBLE, FLOAT, INTEGER, LONG, STRING { - case DATA_BINDING_DATA_TYPE_DOUBLE: - { - Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_DOUBLE: { - return false; + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_FLOAT: - { - Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_FLOAT: { - return false; + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_INTEGER: - { - Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_INTEGER: { - return false; + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_LONG: - { - Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_LONG: { - return false; + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_BOOLEAN: - { - Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; + return true; + } + break; + default: { return false; } - pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; - return true; - } - break; - default: - return false; } break; case DATA_BINDING_DATA_TYPE_LONG: switch (sourceType) // LONG from DOUBLE, FLOAT, INTEGER, LONG, STRING { - case DATA_BINDING_DATA_TYPE_FLOAT: - { - Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_FLOAT: { - return false; - } - pTarget->value = static_cast(const_cast(sourceData)).ToLong(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_INTEGER: - { - Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: { - return false; + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToLong(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_LONG: - { - Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_LONG: { - return false; + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; } - pTarget->value = static_cast(const_cast(sourceData)).ToLong(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_BOOLEAN: - { - Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1 : 0; + return true; + } + break; + default: { return false; } - pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1 : 0; - return true; - } - break; - default: - return false; } break; case DATA_BINDING_DATA_TYPE_STRING: switch (sourceType) // STRING from DOUBLE, FLOAT, INTEGER, LONG, STRING { - case DATA_BINDING_DATA_TYPE_DOUBLE: - { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_DOUBLE: { - return false; + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_STRING: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_COLOR: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + r= pTarget->Append(L"#"); + if(r != E_SUCCESS) + { + return false; + } + wchar_t tempString[] = L"XXXXXXXX"; + swprintf(tempString, (sizeof(tempString) / sizeof(wchar_t)), L"%X",static_cast(const_cast(sourceData)).GetRGB32()); + r= pTarget->Append(tempString); + if(r != E_SUCCESS) + { + return false; + } + return true; + } + break; + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Dimension* pDimension = &static_cast(const_cast(sourceData)); + r = pString->Append(L"width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_POINT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Point* pPoint = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Rectangle* pRectangle = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatDimension* pDimension = &static_cast(const_cast(sourceData)); + r = pString->Append(L"width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatPoint* pPoint = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatRectangle* pRectangle = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; } - *pTarget = static_cast(const_cast(sourceData)).ToString(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_FLOAT: - { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + default: { return false; } - *pTarget = static_cast(const_cast(sourceData)).ToString(); - return true; } break; - case DATA_BINDING_DATA_TYPE_INTEGER: + case DATA_BINDING_DATA_TYPE_COLOR: + if (sourceType == DATA_BINDING_DATA_TYPE_COLOR) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + Color* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; } - *pTarget = static_cast(const_cast(sourceData)).ToString(); + *pTarget = static_cast(const_cast(sourceData)); return true; } - break; - case DATA_BINDING_DATA_TYPE_LONG: + else if (sourceType == DATA_BINDING_DATA_TYPE_INTEGER) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + Color* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; } - *pTarget = static_cast(const_cast(sourceData)).ToString(); + *pTarget = static_cast(const_cast(sourceData)).ToInt(); return true; } - break; - case DATA_BINDING_DATA_TYPE_STRING: + else { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) - { - return false; - } - *pTarget = static_cast(const_cast(sourceData)); - return true; + return false; } break; - case DATA_BINDING_DATA_TYPE_BOOLEAN: + case DATA_BINDING_DATA_TYPE_POINT: + switch (sourceType) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + case DATA_BINDING_DATA_TYPE_POINT: { - return false; + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; } - *pTarget = static_cast(const_cast(sourceData)).ToString(); - return true; - } - break; - case DATA_BINDING_DATA_TYPE_COLOR: - { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: { - return false; + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; } - pTarget->Clear(); - r= pTarget->Append(L"#"); - if(r != E_SUCCESS) + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: { - return false; + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; } - wchar_t tempString[] = L"XXXXXXXX"; - swprintf(tempString, (sizeof(tempString) / sizeof(wchar_t)), L"%X",static_cast(const_cast(sourceData)).GetRGB32()); - r= pTarget->Append(tempString); - if(r != E_SUCCESS) + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: { - return false; + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; } - return true; + break; + default: + return false; } break; - case DATA_BINDING_DATA_TYPE_DIMENSION: + case DATA_BINDING_DATA_TYPE_RECTANGLE: + if (sourceType == DATA_BINDING_DATA_TYPE_RECTANGLE) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + Rectangle* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; } - pTarget->Clear(); - - String* pString = new (std::nothrow) String(L""); - SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); - - Dimension* pDimension = &static_cast(const_cast(sourceData)); - r = pString->Append(L"width:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pDimension->width); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(L", height:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pDimension->height); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - *pTarget = *pString; - delete pString; + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); return true; } - break; - case DATA_BINDING_DATA_TYPE_POINT: + else if (sourceType == DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + Rectangle* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; } - pTarget->Clear(); - - String* pString = new (std::nothrow) String(L""); - SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); - - Point* pPoint = &static_cast(const_cast(sourceData)); - r = pString->Append(L"x:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pPoint->x); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(L", y:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pPoint->y); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - *pTarget = *pString; - delete pString; + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); return true; } + else + { + return false; + } break; - case DATA_BINDING_DATA_TYPE_RECTANGLE: + case DATA_BINDING_DATA_TYPE_DIMENSION: + switch (sourceType) { - Tizen::Base::String* pTarget = dynamic_cast(&destinationData); - if(!pTarget) - { - return false; - } - pTarget->Clear(); - - String* pString = new (std::nothrow) String(L""); - SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); - - Rectangle* pRectangle = &static_cast(const_cast(sourceData)); - r = pString->Append(L"x:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pRectangle->x); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(L", y:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pRectangle->y); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - - r = pString->Append(L", width:"); - if(r != E_SUCCESS) - { - delete pString; - return false; - } - r = pString->Append(pRectangle->width); - if(r != E_SUCCESS) + case DATA_BINDING_DATA_TYPE_DIMENSION: { - delete pString; - return false; + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; } - - r = pString->Append(L", height:"); - if(r != E_SUCCESS) + break; + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: { - delete pString; - return false; + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; } - r = pString->Append(pRectangle->height); - if(r != E_SUCCESS) + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: { - delete pString; - return false; + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; } - *pTarget = *pString; - delete pString; - return true; - } - default: - return false; - } - break; - case DATA_BINDING_DATA_TYPE_COLOR: - if (sourceType == DATA_BINDING_DATA_TYPE_COLOR) - { - Color* pTarget = dynamic_cast(&destinationData); - if(!pTarget) + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: { - return false; + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; } - *pTarget = static_cast(const_cast(sourceData)); - return true; - } - else if (sourceType == DATA_BINDING_DATA_TYPE_INTEGER) - { - Color* pTarget = dynamic_cast(&destinationData); - if(!pTarget) - { + break; + default: return false; - } - *pTarget = static_cast(const_cast(sourceData)).ToInt(); - return true; - } - else - { - return false; } break; - case DATA_BINDING_DATA_TYPE_POINT: + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: switch (sourceType) { case DATA_BINDING_DATA_TYPE_POINT: { - Point* pTarget = dynamic_cast(&destinationData); + FloatPoint* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -602,7 +949,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_FLOAT_POINT: { - Point* pTarget = dynamic_cast(&destinationData); + FloatPoint* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -613,7 +960,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_RECTANGLE: { - Point* pTarget = dynamic_cast(&destinationData); + FloatPoint* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -624,7 +971,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: { - Point* pTarget = dynamic_cast(&destinationData); + FloatPoint* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -637,10 +984,10 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base return false; } break; - case DATA_BINDING_DATA_TYPE_RECTANGLE: + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: if (sourceType == DATA_BINDING_DATA_TYPE_RECTANGLE) { - Rectangle* pTarget = dynamic_cast(&destinationData); + FloatRectangle* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -663,12 +1010,12 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base return false; } break; - case DATA_BINDING_DATA_TYPE_DIMENSION: + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: switch (sourceType) { case DATA_BINDING_DATA_TYPE_DIMENSION: { - Dimension* pTarget = dynamic_cast(&destinationData); + FloatDimension* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -679,7 +1026,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: { - Dimension* pTarget = dynamic_cast(&destinationData); + FloatDimension* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -690,7 +1037,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_RECTANGLE: { - Dimension* pTarget = dynamic_cast(&destinationData); + FloatDimension* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -701,7 +1048,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base break; case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: { - Point* pTarget = dynamic_cast(&destinationData); + FloatPoint* pTarget = dynamic_cast(&destinationData); if(!pTarget) { return false; @@ -717,6 +1064,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base default: return false; } + return true; } bool _DefaultTransformer::IsTransformable(DataBindingDataType sourceType, DataBindingDataType destinationType) diff --git a/src/ui/FUi_DimmingLayer.cpp b/src/ui/FUi_DimmingLayer.cpp index c006008..bf82589 100644 --- a/src/ui/FUi_DimmingLayer.cpp +++ b/src/ui/FUi_DimmingLayer.cpp @@ -178,7 +178,7 @@ _DimmingLayer::SetDimmingEnabled(bool enabled) r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4); - DrawBackgroundBitmap(); + DrawBackground(); } else { @@ -228,41 +228,32 @@ _DimmingLayer::Rearrange(void) } result -_DimmingLayer::DrawBackgroundBitmap(void) +_DimmingLayer::DrawBackground(void) { result r = E_SUCCESS; const FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF(); - Bitmap* pPortraitBitmap = null; - Bitmap* pLandscapeBitmap = null; - r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap); - r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - - String imagePath = L""; - if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + if (__pDimmingElement) { - if (pPortraitBitmap) + Canvas* pCanvas = null; + if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) { - imagePath = _BitmapImpl::GetInstance(*pPortraitBitmap)->GetFileName(); + pCanvas = __pDimmingElement->GetCanvasN(FloatRectangle(0, 0, size.width, size.height)); } - } - else - { - if (pLandscapeBitmap) + else { - imagePath = _BitmapImpl::GetInstance(*pLandscapeBitmap)->GetFileName(); + pCanvas = __pDimmingElement->GetCanvasN(FloatRectangle(0, 0, size.height, size.width)); } - } - if (__pDimmingElement) - { - __pDimmingElement->SetImageSource(imagePath); - } + r = GetLastResult(); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + Color bgColor(0x7F000000); + pCanvas->SetBackgroundColor(bgColor); + pCanvas->Clear(); - delete pPortraitBitmap; - delete pLandscapeBitmap; + delete pCanvas; + } return r; } diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp index 2f69919..9917928 100644 --- a/src/ui/FUi_EcoreEvas.cpp +++ b/src/ui/FUi_EcoreEvas.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include "FUi_CoordinateSystemUtils.h" @@ -57,7 +56,6 @@ #include "FUi_Clipboard.h" #include "FUi_TouchManager.h" #include "FUi_ControlManager.h" -#include "FUi_ActiveWindowEvent.h" #include "FUi_ControlImplManager.h" #include "FUiCtrl_Popup.h" #include "FUiCtrl_ContextMenu.h" @@ -1349,6 +1347,15 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas rotatePartial = false; } } + else + { + if (orientation != 0) //(orientation == 90 || orientation == 270 ) + { + //WARNNING: It's for the issue that popup window does not mapped. + // when orientation + pLayer->SetOrientationChanged(); + } + } _Window* pWindow = const_cast<_Window*>(&window); if (pWindow->IsLayoutChangable() == true) @@ -1368,7 +1375,6 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas { ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation); - if ((orientation == 0) || (orientation == 180)) { pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH)); @@ -1483,18 +1489,6 @@ _EcoreEvas::GetFloatingMode(const _Window& window) const return (ret ? true : false); } -// [ToDo] Remove API -void -_EcoreEvas::AddActiveWindowEventListener(const _IActiveWindowEventListener& listener) -{ -} - -// [ToDo] Remove API -void -_EcoreEvas::RemoveActiveWindowEventListener(const _IActiveWindowEventListener& listener) -{ -} - unsigned int _EcoreEvas::GetActiveWindow(void) { @@ -3321,20 +3315,6 @@ extern "C" #endif // [ToDo] Remove API -_OSP_EXPORT_ void -_AddActiveWindowEventListener(const _IActiveWindowEventListener& listener) -{ - GetEcoreEvasMgr()->GetEcoreEvas()->AddActiveWindowEventListener(listener); -} - -// [ToDo] Remove API -_OSP_EXPORT_ void -_RemoveActiveWindowEventListener(const _IActiveWindowEventListener& listener) -{ - GetEcoreEvasMgr()->GetEcoreEvas()->RemoveActiveWindowEventListener(listener); -} - -// [ToDo] Remove API _OSP_EXPORT_ unsigned int _GetActiveWindow(void) { diff --git a/src/ui/FUi_EflUiEventManager.cpp b/src/ui/FUi_EflUiEventManager.cpp index 5814238..b6c0b38 100644 --- a/src/ui/FUi_EflUiEventManager.cpp +++ b/src/ui/FUi_EflUiEventManager.cpp @@ -422,8 +422,7 @@ private: while (pParent) { _Window* pWindow = dynamic_cast<_Window*>(pParent); - if (pWindow - && (pWindow->GetNativeWindowActivated() == true || (pWindow->GetNativeWindowActivated() == false && pWindow->GetWindowType() == _WINDOW_TYPE_VE))) + if (pWindow && (pWindow->GetNativeWindowActivated() == true)) { nativeWindowActivated = true; break; @@ -600,7 +599,11 @@ public: { r = GetPosition(status, x, y, current); SysTryReturnVoidResult(NID_UI, r != E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] A system error occurred."); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } } else { @@ -617,12 +620,17 @@ public: { pTouchManager->ResetTouchInfo(); SysSecureLog(NID_UI, "ResetTouchInfo x(%d), y(%d), deviceID(%d), pointID(%d)", current.x, current.y, deviceId, pointId); - SysTryReturnVoidResult(NID_UI, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + SetLastResult(E_SYSTEM); + return; } else { r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle()); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } } } else @@ -637,8 +645,12 @@ public: if (pControl->GetChangingEventTarget() == true && pControl->GetVisibleState() == true) { r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle()); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); SysSecureLog(NID_UI, "touch_moved, touch_released : pointId = %d, AddControl = 0x%x", pointId, pControl); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } } } } @@ -701,7 +713,11 @@ private: { _Window* pWindow = null; pWindow = pControlManager->GetTouchedWindow(); - SysTryReturn(NID_UI, pWindow, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (pWindow == null) + { + SetLastResult(E_SYSTEM); + return null; + } Rectangle winBounds = pWindow->GetBounds(); @@ -711,13 +727,25 @@ private: pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement()); } - SysTryReturn(NID_UI, pRootControlElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (pRootControlElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf); - SysTryReturn(NID_UI, pControlVisualElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (pControlVisualElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); - SysTryReturn(NID_UI, pControl, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + if (pControl == null) + { + SetLastResult(E_SYSTEM); + return null; + } if (pCapturedControl) { @@ -734,7 +762,7 @@ private: _Control* pOwner = pWindow->GetOwner(); if (pOwner) { - Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds(true)); if ((x >= ownerRc.x) && (x <= (ownerRc.x + ownerRc.width)) && (y >= ownerRc.y) && (y <= (ownerRc.y + ownerRc.height))) { pControl = pOwner; @@ -742,7 +770,7 @@ private: } } - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true)); if ((x >= rc.x) && (x <= (rc.x + rc.width)) && (y >= rc.y) && (y <= (rc.y + rc.height))) { pControl = pCapturedControl; @@ -756,7 +784,7 @@ private: } else { - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true)); if ((x < rc.x) || (x > (rc.x + rc.width)) || (y < rc.y) || (y > (rc.y + rc.height))) { @@ -1017,7 +1045,7 @@ private: _Control* pOwner = pWindow->GetOwner(); if (pOwner) { - Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds(true)); if ((x >= ownerRc.x) && (x <= (ownerRc.x + ownerRc.width)) && (y >= ownerRc.y) && (y <= (ownerRc.y + ownerRc.height))) { pControl = pOwner; @@ -1025,7 +1053,7 @@ private: } } - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true)); if ((x >= rc.x) && (x <= (rc.x + rc.width)) && (y >= rc.y) && (y <= (rc.y + rc.height))) { pControl = pCapturedControl; @@ -1039,7 +1067,7 @@ private: } else { - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true)); if ((x < rc.x) || (x > (rc.x + rc.width)) || (y < rc.y) || (y > (rc.y + rc.height))) { @@ -1314,36 +1342,36 @@ OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE) { - _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null); + _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null); - result r = GetLastResult(); - if (r != E_SUCCESS) - { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; - } + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; + } - event.Send(); + event.Send(); } else { //_MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null); _MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null); - result r = GetLastResult(); - if (r != E_SUCCESS) - { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; - } + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; + } - event.Send(); + event.Send(); _UiEventManager* pEventManager = _UiEventManager::GetInstance(); SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred."); - pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_OEM_2, _KEY_MODIFIER_NONE, false); - pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_OEM_2, _KEY_MODIFIER_NONE, false); + pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_BACK, _KEY_MODIFIER_NONE, false); + pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_BACK, _KEY_MODIFIER_NONE, false); } SetLastResult(E_SUCCESS); @@ -1382,7 +1410,6 @@ OnTouchReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) //_MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null); _MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null); - result r = GetLastResult(); if (r!= E_SUCCESS) { diff --git a/src/ui/FUi_FocusManagerImpl.cpp b/src/ui/FUi_FocusManagerImpl.cpp index ee16e36..ab548c5d 100644 --- a/src/ui/FUi_FocusManagerImpl.cpp +++ b/src/ui/FUi_FocusManagerImpl.cpp @@ -53,11 +53,15 @@ _FocusManagerImpl::_FocusManagerImpl(void) , __focusDirection(FOCUS_DIRECTION_DOWNWARD) { #ifdef _FOCUS_UI_ - result r = _UiEventManager::GetInstance()->AddPostKeyEventListener(*this); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + result r = pUiEventManager->AddPostKeyEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - r = _UiEventManager::GetInstance()->AddTouchEventListener(*this); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pUiEventManager->AddTouchEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } #endif } @@ -261,6 +265,7 @@ _FocusManagerImpl::IsFocusControlListControl(_Control* pControl) const void _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusDirection) { + _Control* pOriginalControl = pControl; _Window* pTop = pControl->GetRootWindow(); if (pTop == null) { @@ -287,7 +292,10 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD if (__isFocusMode == false) { __isFocusMode = true; - pControl->OnFocusModeStateChanged(); + if (pOriginalControl) + { + pOriginalControl->OnFocusModeStateChanged(); + } } if (focusMode == false && pControl->IsFocused()) @@ -473,11 +481,11 @@ _FocusManagerImpl::OnTouchPressed(const _Control& source, const _TouchInfo& touc _Window* pTop = source.GetRootWindow(); if (pTop) { - _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pSourceControl); - if (pFocusTraversalControl) + _Control* pControl = pTop->GetFocusControl(pSourceControl); + if (pControl) { - pFocusTraversalControl->OnFocusModeStateChanged(); - pFocusTraversalControl->RemoveFocusRing(); + pControl->OnFocusModeStateChanged(); + pControl->RemoveFocusRing(); } } diff --git a/src/ui/FUi_InputConnectionImpl.cpp b/src/ui/FUi_InputConnectionImpl.cpp index ec0bc39..ba5eacf 100644 --- a/src/ui/FUi_InputConnectionImpl.cpp +++ b/src/ui/FUi_InputConnectionImpl.cpp @@ -860,7 +860,7 @@ _InputConnectionImpl::SetCursorBounds(const Rectangle& rect) if (pControl) { Rectangle absoluteControlRectangle; - absoluteControlRectangle = pControl->GetAbsoluteBounds(); + absoluteControlRectangle = pControl->GetAbsoluteBounds(true); cursorRectangle.x += absoluteControlRectangle.x; cursorRectangle.y += absoluteControlRectangle.y; } @@ -890,7 +890,7 @@ _InputConnectionImpl::SetCursorBounds(const FloatRectangle& rect) if (pControl) { FloatRectangle absoluteControlRectangle; - absoluteControlRectangle = pControl->GetAbsoluteBoundsF(); + absoluteControlRectangle = pControl->GetAbsoluteBoundsF(true); cursorRectangle.x += absoluteControlRectangle.x; cursorRectangle.y += absoluteControlRectangle.y; } diff --git a/src/ui/FUi_KeyEventManagerImpl.cpp b/src/ui/FUi_KeyEventManagerImpl.cpp index 6e7c583..c291e00 100644 --- a/src/ui/FUi_KeyEventManagerImpl.cpp +++ b/src/ui/FUi_KeyEventManagerImpl.cpp @@ -80,7 +80,7 @@ public: } delete pEnum; - return true; + return false; CATCH: delete pEnum; @@ -113,7 +113,7 @@ CATCH: } delete pEnum; - return true; + return false; CATCH: delete pEnum; diff --git a/src/ui/FUi_OrientationAgent.cpp b/src/ui/FUi_OrientationAgent.cpp old mode 100755 new mode 100644 index 26680f9..33bff2a --- a/src/ui/FUi_OrientationAgent.cpp +++ b/src/ui/FUi_OrientationAgent.cpp @@ -447,7 +447,7 @@ _OrientationAgent::FireEvent(OrientationStatus status, bool callback) } else { - if (!((callback == true) && (pOwnee->IsRotationSynchronized() == true))) + if (!(/*(callback == true) && */(pOwnee->IsRotationSynchronized() == true))) { pOwnee->ChangeLayout(coreOrientation); } @@ -475,7 +475,7 @@ _OrientationAgent::FireEvent(OrientationStatus status, bool callback) } else { - if (!((callback == true) && (pOwnee->IsRotationSynchronized() == true))) + if (!(/*(callback == true) && */(pOwnee->IsRotationSynchronized() == true))) { pOwnee->ChangeLayout(coreOrientation); } diff --git a/src/ui/FUi_ResourceManager.cpp b/src/ui/FUi_ResourceManager.cpp index 55c4628..061eeaf 100755 --- a/src/ui/FUi_ResourceManager.cpp +++ b/src/ui/FUi_ResourceManager.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,7 +48,6 @@ #include "FUi_ResourceMapContainer.h" using namespace Tizen::App; -using namespace Tizen::App::Package; using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Io; @@ -419,7 +418,7 @@ _ResourceManager::_ResourceManager(void) Dimension dim = _CoordinateSystemUtils::InverseTransform(Dimension(_Screen::GetWidth(), _Screen::GetHeight())); __logicalWidth = dim.width; __logicalHeight = dim.height; - LoadThemeInformation(__systemTheme, __userTheme); + _ThemeInfo::LoadThemeInformation(__systemTheme, __userTheme); // theme 2.0 __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = new (std::nothrow) MapContainer(); @@ -643,7 +642,7 @@ _ResourceManager::ReloadTheme(Tizen::Base::String& themeName, bool userdefine) } result -_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, Bitmap*& pBitmap) +_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, int color, Bitmap*& pBitmap) { result r = E_SYSTEM; Bitmap* pTempBitmap = null; @@ -690,6 +689,16 @@ _ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat p } else { + if(replacementColor) + { + Bitmap* pReplacementBitmap = null; + pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + if(pReplacementBitmap) + { + delete pTempBitmap; + pTempBitmap = pReplacementBitmap; + } + } float scaleFactor = (float)((float)__targetWidth/(float)foundFolderWidth); r = pTempBitmap->Scale(Dimension(pTempBitmap->GetWidth()*scaleFactor, pTempBitmap->GetHeight()*scaleFactor)); if (r == E_SUCCESS) @@ -711,7 +720,7 @@ CATCH: } result -_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, Bitmap*& pBitmap) +_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Bitmap*& pBitmap) { result r = E_SYSTEM; ResourceItem* pItem = null; @@ -726,7 +735,7 @@ _ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _Contr } else { - r = GetBitmapInternalN(fileName, pixelFormat, orientation, IsCustomBitmap(bitmapId), pBitmap); + r = GetBitmapInternalN(fileName, pixelFormat, orientation, IsCustomBitmap(bitmapId), replacementColor, color, pBitmap); } } return r; @@ -872,7 +881,7 @@ _ResourceManager::GetAnimationN(int animationId, ArrayList*& pList) ResourceAnimationFrame frame; r = pAnimationList->GetAt(i, frame); SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM,"System error is occured."); - r = GetBitmapInternalN(frame.__fileName, BITMAP_PIXEL_FORMAT_ARGB8888, _CONTROL_ORIENTATION_PORTRAIT, isCustom, pBitmap); + r = GetBitmapInternalN(frame.__fileName, BITMAP_PIXEL_FORMAT_ARGB8888, _CONTROL_ORIENTATION_PORTRAIT, isCustom, false, 0, pBitmap); SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM,"System error is occured."); pFrame = new (std::nothrow) AnimationFrame(*pBitmap, frame.__duration); SysTryCatch(NID_UI, pFrame, , E_SYSTEM,"System error is occured."); @@ -1305,7 +1314,7 @@ _ResourceManager::LoadBlackPalette(void) ADD_PALETTE(BASIC::B0221L2, 0xFF697082); ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E); ADD_PALETTE(BASIC::B0221L4, 0xFF525252); - ADD_PALETTE(BASIC::B0222, 0x3FFFFFFF); + ADD_PALETTE(BASIC::B0222, 0xFF404040); ADD_PALETTE(BASIC::B0223, 0x00000000); ADD_PALETTE(BASIC::B0224, 0xFF27282B); ADD_PALETTE(BASIC::B0225, 0xFF2A5181); @@ -1945,33 +1954,6 @@ _ResourceManager::LoadPaletteInformation(const Tizen::Base::String& systemTheme) } } -result -_ResourceManager::LoadThemeInformation(String& systemTheme, String& userTheme) -{ - AppId appId = _AppInfo::GetApplicationId(); - SysLog(NID_UI, "%ls" , appId.GetPointer()); - _PackageAppInfoImpl packageManager; - packageManager.Construct(appId); - String key = packageManager.GetAppFeature(L"UserDefinedTheme"); - if (!(key.IsEmpty())) - { - SysLog(NID_UI, "custem theme %ls" , key.GetPointer()); - userTheme = key; - } - key = packageManager.GetAppFeature(L"SystemTheme"); - if (key.IsEmpty()) - { - systemTheme = L"black"; - } - else - { - SysLog(NID_UI, "System theme %ls" , key.GetPointer()); - systemTheme = key; - systemTheme.ToLowerCase(); - } - return E_SUCCESS; -} - void _ResourceManager::GetThemeName(String& systemTheme, String& userTheme) const { diff --git a/src/ui/FUi_TouchManager.cpp b/src/ui/FUi_TouchManager.cpp index 571b4e3..838cdf4 100644 --- a/src/ui/FUi_TouchManager.cpp +++ b/src/ui/FUi_TouchManager.cpp @@ -851,7 +851,11 @@ _TouchManager::SetTouchCanceled(_Control* pControl) SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); result r = pTouchManager->AddPoint(touchInfo.GetPointId(), currentPoint, _TOUCH_CANCELED); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred."); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } SysLog(NID_UI, "SendTouchCancelEvent"); pEventManager->SendEvent(event); diff --git a/src/ui/FUi_UiFocusEvent.cpp b/src/ui/FUi_UiFocusEvent.cpp index b87613e..479743d 100644 --- a/src/ui/FUi_UiFocusEvent.cpp +++ b/src/ui/FUi_UiFocusEvent.cpp @@ -104,6 +104,18 @@ _UiFocusEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isF return FireListener(pFocusListener, isFiltered); } +bool +_UiFocusEvent::IsEventEnabled(const _Control& control) const +{ + // call a listener method by the key state + if (FOCUS_GAINED == GetFocusState()) + { + return _UiEvent::IsEventEnabled(control); + } + + return true; +} + result _UiFocusEvent::FireListener(const _IFocusEventListener* pListener, bool& isFiltered) { diff --git a/src/ui/FUi_UiTouchEvent.cpp b/src/ui/FUi_UiTouchEvent.cpp index bfeb1a7..0afef27 100644 --- a/src/ui/FUi_UiTouchEvent.cpp +++ b/src/ui/FUi_UiTouchEvent.cpp @@ -667,7 +667,7 @@ FloatPoint _UiTouchEvent::GetRelativePoint(const _Control& control, const FloatPoint& point) const { FloatPoint relativePoint(point); - FloatRectangle absRect = control.GetAbsoluteBoundsF(); + FloatRectangle absRect = control.GetAbsoluteBoundsF(true); relativePoint.x -= absRect.x; relativePoint.y -= absRect.y; @@ -1077,7 +1077,7 @@ FloatPoint _UiMouseEvent::GetRelativePoint(const _Control& control, const FloatPoint& point) const { FloatPoint relativePoint(point); - FloatRectangle absRect = control.GetAbsoluteBoundsF(); + FloatRectangle absRect = control.GetAbsoluteBoundsF(true); relativePoint.x -= absRect.x; relativePoint.y -= absRect.y; diff --git a/src/ui/FUi_Window.cpp b/src/ui/FUi_Window.cpp index 1cd9442..636c02a 100644 --- a/src/ui/FUi_Window.cpp +++ b/src/ui/FUi_Window.cpp @@ -381,7 +381,7 @@ _Window::CreateLayer(void) if (pEcoreEvas) { String osp(L"OSP_"); - String appName = _AppInfo::GetAppName(); + String appName = _AppInfo::GetAppExecutableName(); osp.Append(appName); pEcoreEvas->SetWindowName(*this, osp); @@ -434,7 +434,14 @@ _Window::SetNativeWindowActivated(bool activated) bool _Window::GetNativeWindowActivated(void) { - return __nativeWindowActivated; + if ((GetWindowType() == _WINDOW_TYPE_VE) || IsSystemWindow()) + { + return true; + } + else + { + return __nativeWindowActivated; + } } _RootVisualElement* @@ -471,6 +478,7 @@ _Window::OnActivated(void) _Control* focusedControl = GetCurrentFocusControl(); + SetFocusWindowActivationChecked(true); if (focusedControl) { focusedControl->SetFocused(); @@ -480,11 +488,7 @@ _Window::OnActivated(void) { SetFocused(); } - - if (!isFrameActivated) - { - return; - } + SetFocusWindowActivationChecked(false); _TouchManager* pTouchMgr = _TouchManager::GetInstance(); if (pTouchMgr) diff --git a/src/ui/animations/FUiAnim_Debug.cpp b/src/ui/animations/FUiAnim_Debug.cpp index c67ce2d..27b68ee 100644 --- a/src/ui/animations/FUiAnim_Debug.cpp +++ b/src/ui/animations/FUiAnim_Debug.cpp @@ -270,12 +270,12 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) FloatRectangle realBounds = pElement->__bounds; _Window* pWindow = dynamic_cast< Tizen::Ui::_Window* >(static_cast< Tizen::Ui::_Window* >(pElement->GetUserData())); - if (pWindow) - { - Rectangle windowRect = pWindow->GetBounds(); - realBounds.x += windowRect.x; - realBounds.y += windowRect.y; - } +// if (pWindow) +// { +// Rectangle windowRect = pWindow->GetBounds(); +// realBounds.x += windowRect.x; +// realBounds.y += windowRect.y; +// } _VisualElementCoordinateSystem::ConvertDimensionToPhysical(realBounds.width, realBounds.height); _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.width, realBounds.height, relative.width, relative.height); _VisualElementCoordinateSystem::ConvertPointToPhysical(realBounds.x, realBounds.y); diff --git a/src/ui/animations/FUiAnim_EflLayer.cpp b/src/ui/animations/FUiAnim_EflLayer.cpp index 73369a6..82857be 100644 --- a/src/ui/animations/FUiAnim_EflLayer.cpp +++ b/src/ui/animations/FUiAnim_EflLayer.cpp @@ -36,15 +36,18 @@ #include "FUiAnim_RootVisualElement.h" #include "FUiAnim_AnimationManager.h" #include "FUiAnim_DisplayManager.h" +#include "FBaseColIList.h" #include "FUi_Math.h" - +#include "FUiAnim_EflLayerConfiguration.h" using namespace Tizen; +using namespace Tizen::Base::Collection; using namespace Tizen::Graphics; using namespace Tizen::Ui; using namespace Tizen::Ui::Animations; //#define PRINT(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) +//#define PRINT(...) SysLog(NID_UI_ANIM, __VA_ARGS__) #define PRINT(...) @@ -59,11 +62,11 @@ Ecore_Idle_Enterer* __pOnIdleLoopIterator = null; void OnRenderFlushPost(void* pData, Evas* pEvas, void* ev) { -// _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); + _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); } Eina_Bool @@ -104,6 +107,8 @@ OnXWindowConfigured(void* pData, int type, void* pEventInfo) return EINA_TRUE; } +#endif // USE_WORKAROUND + Eina_Bool OnXWindowHidden(void* pData, int type, void* pEventInfo) { @@ -117,7 +122,8 @@ OnXWindowHidden(void* pData, int type, void* pEventInfo) _EflLayer* pLayer = (_EflLayer*)pData; if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) { - PRINT("[%#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData); + pLayer->SetMapped(false); + PRINT("[%#x | %#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData , pEvent->win); } return EINA_TRUE; @@ -136,15 +142,21 @@ OnXWindowShown(void* pData, int type, void* pEventInfo) _EflLayer* pLayer = (_EflLayer*)pData; if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) { + pLayer->SetMapped(true); + FloatRectangle bounds = pLayer->GetBounds(); + evas_damage_rectangle_add(pLayer->GetEvas(),0,0,(int)bounds.width, (int)bounds.height); //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270); - PRINT("[%#x] ############ Shown -> EventDone() \n" , (unsigned int)pData); + PRINT("[%#x | %#x] ############ Shown -> EventDone() \n" , (unsigned int)pData, pEvent->win); + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->AddWakeUpEvent(); + } } return EINA_TRUE; } -#endif // USE_WORKAROUND - //static const double fpsLimitInterval = 1.0 / 55.0; @@ -154,7 +166,7 @@ OnIdleLoopIterate(void* pData) { _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); -// PRINT("OnIdleLoopIterate()\n"); + // PRINT("OnIdleLoopIterate()\n"); if (!pDisplayManager) @@ -170,14 +182,14 @@ OnIdleLoopIterate(void* pData) } //CHECK ME : how about the performance? -// double currentTime = ecore_time_get(); -// static double prevFlushTime = 0; + // double currentTime = ecore_time_get(); + // static double prevFlushTime = 0; -// if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99) + // if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99) { pAnimationManager->ProcessAnimationTick(); -// prevFlushTime = currentTime; + // prevFlushTime = currentTime; pDisplayManager->RenderAll(); @@ -257,14 +269,18 @@ _EflLayer::_EflLayer(void) , _needAsyncVisibilityChangeRequest(true) , _isMainType(true) , _needRender(true) + , _isMapped(false) + , _needForceManualRender(false) , _pOnWindowDamagedHandler(null) , _pOnWindowConfiguredHandler(null) , _pOnWindowHideHandler(null) , _pOnWindowShowHandler(null) , __isWinObject(true) , __bounds() + , _pConfiguration(null) { _countOfLayer++; + _pConfiguration = _EflLayerConfiguration::GetInstance(); } _EflLayer::_EflLayer(bool isMainType) @@ -278,19 +294,28 @@ _EflLayer::_EflLayer(bool isMainType) , _needAsyncVisibilityChangeRequest(true) , _isMainType(isMainType) , _needRender(true) + , _isMapped(false) + , _needForceManualRender(false) , _pOnWindowDamagedHandler(null) , _pOnWindowConfiguredHandler(null) , _pOnWindowHideHandler(null) , _pOnWindowShowHandler(null) , __isWinObject(true) , __bounds() + , _pConfiguration(null) { _countOfLayer++; + _pConfiguration = _EflLayerConfiguration::GetInstance(); } _EflLayer::~_EflLayer(void) { _countOfLayer--; + if (_pConfiguration) + { + _pConfiguration->ReleaseInstance(); + _pConfiguration = null; + } #ifdef VE_VSYNC_UPDATE if (_pEcoreEvas) { @@ -316,6 +341,14 @@ _EflLayer::~_EflLayer(void) ecore_event_handler_del(_pOnWindowConfiguredHandler); _pOnWindowConfiguredHandler = null; } + + if (_pEvas) + { + evas_event_callback_del(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost); + } + +#endif // USE_WORKAROUND + if (_pOnWindowHideHandler) { ecore_event_handler_del(_pOnWindowHideHandler); @@ -327,7 +360,7 @@ _EflLayer::~_EflLayer(void) ecore_event_handler_del(_pOnWindowShowHandler); _pOnWindowShowHandler = null; } -#endif // USE_WORKAROUND + #endif @@ -361,12 +394,10 @@ _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."); @@ -377,10 +408,16 @@ _EflLayer::OnConstructed(void) evas_object_del(_pWindow); return E_SYSTEM; } - Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(_pEcoreEvas); SysTryReturnResult(NID_UI, window != 0,E_SYSTEM, "A system error has been occurred."); + PRINT("[%#x | %#x] CREATE WINDOW [%s]\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), (_isMainType)?"ELM_WIN_BASIC":"ELM_WIN_UTILITY"); + + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } + #ifdef VE_VSYNC_UPDATE ecore_x_vsync_animator_tick_source_set(window); ecore_evas_manual_render_set(_pEcoreEvas, EINA_TRUE); @@ -412,7 +449,7 @@ _EflLayer::Initialize(Evas_Object* pWindow) __isWinObject = false; } -// CHECK ME: Is this needed for GL mode? + // CHECK ME: Is this needed for GL mode? #ifdef USE_WORKAROUND if(_pOnWindowDamagedHandler == null) @@ -425,6 +462,9 @@ _EflLayer::Initialize(Evas_Object* pWindow) _pOnWindowConfiguredHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, OnXWindowConfigured, this); } + evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this); +#endif // USE_WORKAROUND + if (_pOnWindowHideHandler == null) { _pOnWindowHideHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, OnXWindowHidden, this); @@ -434,8 +474,6 @@ _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 #ifdef VE_VSYNC_UPDATE @@ -462,6 +500,14 @@ CATCH: } result +_EflLayer::SetOrientationChanged(void) +{ + _needForceManualRender = true; + PRINT("[%#x | %#x] Called SetOrientationChanged(%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), _needForceManualRender); + return E_SUCCESS; +} + +result _EflLayer::Configure(_RootVisualElement& rootElement) { _EflNode* pNode = dynamic_cast<_EflNode*>(rootElement.GetNativeNode()); @@ -478,14 +524,15 @@ _EflLayer::Configure(_RootVisualElement& rootElement) result _EflLayer::SetBounds(const FloatRectangle& bounds) { - if (__bounds == bounds) - return E_SUCCESS; + // WARNING: this code makes a touch coordination error, when device orientation is swapped 0' to 180'. (For test application : UiFrameMode) + // 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); + PRINT("[%#x | %#x] Initialzing evas_object_move(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __bounds.x, __bounds.y); + PRINT("[%#x | %#x] Initialzing evas_object_resize(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __bounds.width, __bounds.height); return E_SUCCESS; } @@ -506,6 +553,7 @@ _EflLayer::SetShowState(bool show) { if (_isShow == show) { + PRINT("[%#x | %#x] Cancel SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); return E_SUCCESS; } @@ -513,7 +561,7 @@ _EflLayer::SetShowState(bool show) { // Show State is not applied yet. Need cancel the visibility change request. _needShowStateChangeRequest = false; - PRINT("[%#x] Cancel SetShowState request (%d)\n", (unsigned int)this, show); + PRINT("[%#x | %#x] Cancel SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); } else { @@ -524,7 +572,7 @@ _EflLayer::SetShowState(bool show) { pDisplayManager->AddWakeUpEvent(); } - PRINT("[%#x] SetShowState request (%d)\n", (unsigned int)this, show); + PRINT("[%#x | %#x] SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); } _isShow = show; @@ -558,6 +606,10 @@ _EflLayer::SetOpacity(float opacity) if (__isWinObject == true) { elm_win_alpha_set(_pWindow, EINA_FALSE); + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } } int r,g,b,a; @@ -570,6 +622,10 @@ _EflLayer::SetOpacity(float opacity) if (__isWinObject == true) { elm_win_alpha_set(_pWindow, EINA_TRUE); + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } } int r,g,b,a; @@ -577,7 +633,7 @@ _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); + PRINT("[%#x | %#x] ALPHA SET(opacity=%f)\n", (unsigned int)this,ecore_evas_window_get(_pEcoreEvas), opacity); } float @@ -599,6 +655,25 @@ _EflLayer::GetOpacity(void) } + +static int __GetChildrenCount(VisualElement* pVe) +{ + if(pVe == null) + return 0; + + int count = pVe->GetChildrenCount(); + if(count > 0) + { + IList* pList = pVe->GetChildrenN(); + for(int i = 0;iGetAt(i) ); + } + delete pList; + } + return count; +} + void _EflLayer::Flush(void) { @@ -609,12 +684,12 @@ _EflLayer::Flush(void) if (_isShow) { evas_object_show(_pWindow); - PRINT("[%#x] evas_object_show \n", (unsigned int)this); + PRINT("[%#x | %#x] evas_object_show \n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas)); } else { evas_object_hide(_pWindow); - PRINT("[%#x] evas_object_hide \n", (unsigned int)this); + PRINT("[%#x | %#x] evas_object_hide \n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas)); } _needShowStateChangeRequest = false; } @@ -622,17 +697,49 @@ _EflLayer::Flush(void) FloatRectangle rect = GetBounds(); if(!_needRender) { - PRINT("[%#x] _needRender = false bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height); + PRINT("[%#x | %#x] _needRender = false bounds(%f %f %f %f)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __bounds.x, __bounds.y, __bounds.width, __bounds.height); return; } - //PRINT("[%#x] ecore_evas_manual_render bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height); + if(__isWinObject) + { + if (_isMapped) + { + PRINT("[%#x | %#x] ecore_evas_manual_render -- mapped (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement)); + __needPreRender = false; + // evas_damage_rectangle_add(_pEvas,0,0,(int)__bounds.width, (int)__bounds.height); + ecore_evas_manual_render(_pEcoreEvas); - __needPreRender = false; - ecore_evas_manual_render(_pEcoreEvas); - __needPreRender = true; - } + __needPreRender = true; + _DisplayManager::RestoreContext(); + } + else + { + if(_isShow && _needForceManualRender) + { + PRINT("[%#x | %#x] ecore_evas_manual_render -- _needForceManualRender (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement)); + __needPreRender = false; + ecore_evas_manual_render(_pEcoreEvas); + __needPreRender = true; + _DisplayManager::RestoreContext(); + _needForceManualRender = false; + return; + } + + PRINT("[%#x | %#x] ecore_evas_manual_render -- unmapped - not called(child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement)); + } + } + else // not window type + { + PRINT("[%#x | %#x] ecore_evas_manual_render -- unknown type(child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement)); + __needPreRender = false; + // evas_damage_rectangle_add(_pEvas,0,0,(int)__bounds.width, (int)__bounds.height); + ecore_evas_manual_render(_pEcoreEvas); + __needPreRender = true; + _DisplayManager::RestoreContext(); + } + } } diff --git a/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp b/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp new file mode 100644 index 0000000..c946abe --- /dev/null +++ b/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayerConfiguration.cpp + * @brief This file contains implementation of _EflLayer class + * + * This file contains implementation _EflLayer class. + */ + +#include "FUiAnim_EflLayerConfiguration.h" + +#define null 0 + +namespace Tizen { namespace Ui { namespace Animations +{ +_EflLayerConfiguration* pEflLayerConfiguration = null; +_EflLayerConfiguration* +_EflLayerConfiguration::GetInstance(void) +{ + if (pEflLayerConfiguration == null) + { + pEflLayerConfiguration = new _EflLayerConfiguration(); + } + else + { + pEflLayerConfiguration->__refCount++; + } + return pEflLayerConfiguration; +} + +void +_EflLayerConfiguration::ReleaseInstance(void) +{ + if (pEflLayerConfiguration->__refCount > 1) + { + pEflLayerConfiguration->__refCount--; + } + else + { + delete pEflLayerConfiguration; + pEflLayerConfiguration = null; + } +} + +void +_EflLayerConfiguration::ApplyCustomizedConfig(void* pWin) +{ +} + +_EflLayerConfiguration::_EflLayerConfiguration(void) + : __refCount(1) +{ +} + +_EflLayerConfiguration::~_EflLayerConfiguration(void) +{ +} +}}}//namespace Tizen { namespace Ui { namespace Animations \ No newline at end of file diff --git a/src/ui/animations/FUiAnim_TransactionNode.cpp b/src/ui/animations/FUiAnim_TransactionNode.cpp index 9414d5b..2331406 100644 --- a/src/ui/animations/FUiAnim_TransactionNode.cpp +++ b/src/ui/animations/FUiAnim_TransactionNode.cpp @@ -882,9 +882,7 @@ _TransactionNode::RemoveAnimation(VisualElement& target, const String& keyName) _AnimationData* pAnimationData = null; - int animationCount = pAnimationList->GetCount(); - - for (int index = 0; index < animationCount; index++) + for (int index = 0; index < pAnimationList->GetCount(); index++) { pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); @@ -974,9 +972,7 @@ _TransactionNode::RemoveAnimationByProperty(VisualElement& target, const String& VisualElementPropertyAnimation* pPropertyAnimation = null; _AnimationData* pAnimationData = null; - int animationCount = pAnimationList->GetCount(); - - for (int index = 0; index < animationCount; index++) + for (int index = 0; index < pAnimationList->GetCount(); index++) { pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(&(pAnimationData->GetAnimation())); @@ -1061,9 +1057,7 @@ _TransactionNode::RemoveAllAnimations(VisualElement& target) result r = E_SUCCESS; _AnimationData* pAnimationData = null; - int animationCount = pAnimationList->GetCount(); - - for (int index = 0; index < animationCount; index++) + for (int index = 0; index < pAnimationList->GetCount(); index++) { pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); diff --git a/src/ui/animations/FUiAnim_VisualElementImpl.cpp b/src/ui/animations/FUiAnim_VisualElementImpl.cpp index dff5d88..8577d11 100644 --- a/src/ui/animations/FUiAnim_VisualElementImpl.cpp +++ b/src/ui/animations/FUiAnim_VisualElementImpl.cpp @@ -6125,7 +6125,7 @@ _VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDes bounds = tempRect; - if (!drawRect.IsEmpty()) + if (!tempRect.IsEmpty() && drawRect.x>=0.0f && drawRect.y>=0.0f) { if (pRenderTarget && HAVE_SURFACE(pRenderTarget)) // If element have surface , justly draw to the canvas { @@ -6304,10 +6304,12 @@ _VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDes for (int i = 0; i < count; i++) { pChild = __children.GetChildAt(i); - if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild))) + if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild)) || clipBounds.IsEmpty() || + (!__childrenTransform.IsIdentity() && !_MatrixUtilIsTranslation(__childrenTransform)) || + (!pChild->__transform.IsIdentity() && !_MatrixUtilIsTranslation(pChild->__transform)) ) { continue; - } + } pChild->CaptureI(outputCanvas, rectDest, reference, rectRef, clipBounds, true, depth + 1); } } diff --git a/src/ui/controls/FUiCtrlDatePicker.cpp b/src/ui/controls/FUiCtrlDatePicker.cpp index 6793c5e..7fdc6a7 100644 --- a/src/ui/controls/FUiCtrlDatePicker.cpp +++ b/src/ui/controls/FUiCtrlDatePicker.cpp @@ -87,7 +87,7 @@ DatePicker::GetDate(void) const const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); if (pImpl == null) { - r = SystemTime::GetCurrentTime(WALL_TIME, dateTime); + r = SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); return dateTime; } diff --git a/src/ui/controls/FUiCtrlSlider.cpp b/src/ui/controls/FUiCtrlSlider.cpp index 687c19b..26037e6 100644 --- a/src/ui/controls/FUiCtrlSlider.cpp +++ b/src/ui/controls/FUiCtrlSlider.cpp @@ -48,7 +48,7 @@ Slider::Construct(const Rectangle& rect, BackgroundStyle backgroundStyle, bool s SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); int sliderStyle = 0; - if (showTitle == true) + if (showTitle) { sliderStyle |= SLIDER_STYLE_TITLE; } @@ -81,7 +81,7 @@ Slider::Construct(const FloatRectangle& rect, BackgroundStyle backgroundStyle, b SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); int sliderStyle = 0; - if (showTitle == true) + if (showTitle) { sliderStyle |= SLIDER_STYLE_TITLE; } diff --git a/src/ui/controls/FUiCtrlTimePicker.cpp b/src/ui/controls/FUiCtrlTimePicker.cpp index 2c09ff3..3dd192d 100644 --- a/src/ui/controls/FUiCtrlTimePicker.cpp +++ b/src/ui/controls/FUiCtrlTimePicker.cpp @@ -115,7 +115,7 @@ TimePicker::GetTime(void) const const _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); if (pImpl == null) { - r = SystemTime::GetCurrentTime(WALL_TIME, dateTime); + r = SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); return dateTime; } diff --git a/src/ui/controls/FUiCtrl_Animation.cpp b/src/ui/controls/FUiCtrl_Animation.cpp index c1b1021..8358b17 100644 --- a/src/ui/controls/FUiCtrl_Animation.cpp +++ b/src/ui/controls/FUiCtrl_Animation.cpp @@ -53,7 +53,7 @@ _Animation::_Animation(void) } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); } @@ -61,11 +61,8 @@ _Animation::_Animation(void) _Animation::~_Animation(void) { - if (__pAnimationEvent != null) - { - delete __pAnimationEvent; - __pAnimationEvent = null; - } + delete __pAnimationEvent; + __pAnimationEvent = null; if (__pAnimationFrames != null) { @@ -77,7 +74,7 @@ _Animation::~_Animation(void) delete __pAnimationPresenter; __pAnimationPresenter = null; - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->Activate(false); __pAccessibilityElement = null; @@ -117,7 +114,7 @@ CATCH: void _Animation::OnTimerExpired(Timer& timer) { - if (__pAnimationPresenter->IsTimerExpired(timer) == true) + if (__pAnimationPresenter->IsTimerExpired(timer)) { IEventArg* pEventArg = _AnimationEvent::CreateAnimationEventArgN(); if (pEventArg != null) @@ -132,17 +129,17 @@ _Animation::OnTimerExpired(Timer& timer) result _Animation::OnAttachedToMainTree(void) { - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { return E_SUCCESS; } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetName(L"Animation"); @@ -163,7 +160,7 @@ _Animation::OnBoundsChanged(void) return; } - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); } diff --git a/src/ui/controls/FUiCtrl_AnimationImpl.cpp b/src/ui/controls/FUiCtrl_AnimationImpl.cpp index e911012..b6db77c 100644 --- a/src/ui/controls/FUiCtrl_AnimationImpl.cpp +++ b/src/ui/controls/FUiCtrl_AnimationImpl.cpp @@ -52,11 +52,8 @@ _AnimationImpl::_AnimationImpl(Animation* pPublic, _Animation* pCore) _AnimationImpl::~_AnimationImpl(void) { - if (__pPublicAnimationEvent != null) - { - delete __pPublicAnimationEvent; - __pPublicAnimationEvent = null; - } + delete __pPublicAnimationEvent; + __pPublicAnimationEvent = null; } _AnimationImpl* diff --git a/src/ui/controls/FUiCtrl_AnimationPresenter.cpp b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp index abbc446..7e04fd4 100644 --- a/src/ui/controls/FUiCtrl_AnimationPresenter.cpp +++ b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp @@ -189,7 +189,7 @@ _AnimationPresenter::Play(void) { result r = E_SUCCESS; - if (__isTimerRunning == true) + if (__isTimerRunning) { return E_SUCCESS; } @@ -222,7 +222,7 @@ _AnimationPresenter::Play(void) result _AnimationPresenter::Stop(void) { - if (__isTimerRunning == true) + if (__isTimerRunning) { if (__pTimer != null) { @@ -270,7 +270,7 @@ _AnimationPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) Canvas* pCanvas = null; AnimationFrame* pFrame = null; - if (__lazyDecode == true) + if (__lazyDecode) { Bitmap* pBitmap = null; pFrame = GetCurrentFrame(); @@ -355,7 +355,7 @@ _AnimationPresenter::Dispose(void) delete __pCurrentFrame; __pCurrentFrame = null; - if (__pTimer != null && __isTimerRunning == true) + if (__pTimer != null && __isTimerRunning) { __pTimer->Cancel(); } diff --git a/src/ui/controls/FUiCtrl_Button.cpp b/src/ui/controls/FUiCtrl_Button.cpp index 3b904a6..ce38af0 100644 --- a/src/ui/controls/FUiCtrl_Button.cpp +++ b/src/ui/controls/FUiCtrl_Button.cpp @@ -62,10 +62,6 @@ _Button::_Button() , __topMargin(0.0f) , __rightMargin(0.0f) , __bottomMargin(0.0f) - , __leftTouchMargin(0.0f) - , __topTouchMargin(0.0f) - , __rightTouchMargin(0.0f) - , __bottomTouchMargin(0.0f) , __userDefinedTextArea(0.0f, 0.0f, 0.0f, 0.0f) , __pTextElement(null) { @@ -865,7 +861,7 @@ _Button::GetBitmapPosition(_ButtonStatus status) const FloatPoint _Button::GetBitmapPositionF(_ButtonStatus status) const { - return FloatPoint(__bitmapPosition[status].x + __leftTouchMargin, __bitmapPosition[status].y + __topTouchMargin); + return FloatPoint(__bitmapPosition[status].x, __bitmapPosition[status].y); } result @@ -915,7 +911,7 @@ _Button::GetEffectBitmapPosition(_ButtonStatus status) const FloatPoint _Button::GetEffectBitmapPositionF(_ButtonStatus status) const { - return FloatPoint(__effectBitmapPosition[status].x + __leftTouchMargin, __effectBitmapPosition[status].y + __topTouchMargin); + return FloatPoint(__effectBitmapPosition[status].x, __effectBitmapPosition[status].y); } result @@ -1296,7 +1292,14 @@ _Button::SetButtonStatus(_ButtonStatus buttonStatus, bool fire) _ButtonStatus _Button::GetButtonStatus(void) const { - return __buttonStatus; + if (IsEnabled()) + { + return __buttonStatus; + } + else + { + return _BUTTON_STATUS_DISABLED; + } } result @@ -1522,6 +1525,7 @@ _Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const Font* pFont = __pButtonPresenter->GetFont(); FloatRectangle previousRect = pTextObject->GetBoundsF(); + TextObjectActionType previousActionType = pTextObject->GetAction(); dimension.width = GetBoundsF().width - __leftMargin * 2; dimension.height = GetBoundsF().height - __topMargin * 2; @@ -1565,9 +1569,10 @@ _Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const } pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); - dimension.width += __leftMargin * 4 - __leftTouchMargin - __rightTouchMargin; - dimension.height += __topMargin * 4 - __topTouchMargin - __bottomTouchMargin; + dimension.width += __leftMargin * 4; + dimension.height += __topMargin * 4; for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) { @@ -1615,76 +1620,6 @@ _Button::GetTextExtentSizeF(void) const } result -_Button::SetTouchMargin(int leftTouchMargin, int topTouchMargin, int rightTouchMargin, int bottomTouchMargin) -{ - float floatLeftTouchMargin = _CoordinateSystemUtils::ConvertToFloat(leftTouchMargin); - float floatTopTouchMargin = _CoordinateSystemUtils::ConvertToFloat(topTouchMargin); - float floatRightTouchMargin = _CoordinateSystemUtils::ConvertToFloat(rightTouchMargin); - float floatBottomTouchMargin = _CoordinateSystemUtils::ConvertToFloat(bottomTouchMargin); - - return SetTouchMargin(floatLeftTouchMargin, floatTopTouchMargin, floatRightTouchMargin, floatBottomTouchMargin); -} - -result -_Button::SetTouchMargin(float leftTouchMargin, float topTouchMargin, float rightTouchMargin, float bottomTouchMargin) -{ - __leftTouchMargin = leftTouchMargin; - __topTouchMargin = topTouchMargin; - __rightTouchMargin = rightTouchMargin; - __bottomTouchMargin = bottomTouchMargin; - - return E_SUCCESS; -} - -int -_Button::GetLeftTouchMargin(void) const -{ - return _CoordinateSystemUtils::ConvertToInteger(GetLeftTouchMarginF()); -} - -float -_Button::GetLeftTouchMarginF(void) const -{ - return __leftTouchMargin; -} - -int -_Button::GetTopTouchMargin(void) const -{ - return _CoordinateSystemUtils::ConvertToInteger(GetTopTouchMarginF()); -} - -float -_Button::GetTopTouchMarginF(void) const -{ - return __topTouchMargin; -} - -int -_Button::GetRightTouchMargin(void) const -{ - return _CoordinateSystemUtils::ConvertToInteger(GetRightTouchMarginF()); -} - -float -_Button::GetRightTouchMarginF(void) const -{ - return __rightTouchMargin; -} - -int -_Button::GetBottomTouchMargin(void) const -{ - return _CoordinateSystemUtils::ConvertToInteger(GetBottomTouchMarginF()); -} - -float -_Button::GetBottomTouchMarginF(void) const -{ - return __bottomTouchMargin; -} - -result _Button::SetMultilineTextSize(const Variant& textSize) { result r = E_SUCCESS; diff --git a/src/ui/controls/FUiCtrl_ButtonImpl.cpp b/src/ui/controls/FUiCtrl_ButtonImpl.cpp index 6c881ff..2c85ab9 100644 --- a/src/ui/controls/FUiCtrl_ButtonImpl.cpp +++ b/src/ui/controls/FUiCtrl_ButtonImpl.cpp @@ -517,7 +517,7 @@ _ButtonImpl::OnActionPerformed(const _Control& source, int actionId) result _ButtonImpl::OnAttachedToMainTree(void) { - SetFocusable(true); + //SetFocusable(true); // for TDIS-6998 _ControlImpl::OnAttachedToMainTree(); diff --git a/src/ui/controls/FUiCtrl_ButtonPresenter.cpp b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp index a375d82..2a54959 100644 --- a/src/ui/controls/FUiCtrl_ButtonPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp @@ -53,7 +53,7 @@ _ButtonPresenter::_ButtonPresenter(void) , __fontSize(0.0f) , __pTextSlideTimer(null) , __textRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) - , __pTabLargeSelectedBitmap(null) + , __pTextSlideClippedBitmap(null) { } @@ -78,10 +78,10 @@ _ButtonPresenter::~_ButtonPresenter(void) __pTextSlideTimer = null; } - if (__pTabLargeSelectedBitmap) + if (__pTextSlideClippedBitmap) { - delete __pTabLargeSelectedBitmap; - __pTabLargeSelectedBitmap = null; + delete __pTextSlideClippedBitmap; + __pTextSlideClippedBitmap = null; } } @@ -155,11 +155,6 @@ _ButtonPresenter::InitTextObject(void) float rightMargin = __pButton->GetRightMarginF(); float bottomMargin = __pButton->GetBottomMarginF(); - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - __pTextObject->RemoveAll(true); pSimpleText = new (std::nothrow) TextSimple(const_cast(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength()); @@ -171,9 +166,9 @@ _ButtonPresenter::InitTextObject(void) SetTextSize(__pButton->GetTextSizeF()); __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); - __pTextObject->SetBounds(FloatRectangle(leftMargin + leftTouchMargin, topMargin + topTouchMargin, - __pButton->GetBoundsF().width - (leftMargin + rightMargin) - (leftTouchMargin + rightTouchMargin), - __pButton->GetBoundsF().height - (topMargin + bottomMargin) - (topTouchMargin + bottomTouchMargin))); + __pTextObject->SetBounds(FloatRectangle(leftMargin, topMargin, + __pButton->GetBoundsF().width - (leftMargin + rightMargin), + __pButton->GetBoundsF().height - (topMargin + bottomMargin))); __pTextObject->Compose(); return E_SUCCESS; @@ -295,7 +290,11 @@ _ButtonPresenter::Draw(void) DrawBackground(); } - DrawSubTitleEffectBitmap(); + if (__pButton->GetSubTitleEffectBitmap() != null) + { + DrawSubTitleEffectBitmap(); + } + DrawBitmap(); if (!__pButton->GetText().IsEmpty()) @@ -324,13 +323,8 @@ _ButtonPresenter::DrawBackground(void) Color bgColor = __pButton->GetBackgroundColor(); String imagePath = L""; - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - - FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin) - , __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin)); + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, + __pButton->GetBoundsF().height); _ButtonStatus status = __pButton->GetButtonStatus(); @@ -659,18 +653,12 @@ _ButtonPresenter::DrawToolbarItemBackground(void) pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - _ButtonStatus status = __pButton->GetButtonStatus(); Bitmap* pToolbarItemBackgroundBitmap = __pButton->GetToolbarItemBackgroundBitmap(status); if (pToolbarItemBackgroundBitmap) { - FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin), - __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin)); + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pToolbarItemBackgroundBitmap)) { @@ -683,23 +671,6 @@ _ButtonPresenter::DrawToolbarItemBackground(void) } } - if (__pTabLargeSelectedBitmap) - { - delete __pTabLargeSelectedBitmap; - __pTabLargeSelectedBitmap = null; - } - - __pTabLargeSelectedBitmap = new (std::nothrow) Bitmap(); - - if (__pButton->UserDefinedText()) - { - __pTabLargeSelectedBitmap->Construct(*pCanvas, __pButton->GetUserDefinedTextAreaF()); - } - else - { - __pTabLargeSelectedBitmap->Construct(*pCanvas, __textRect); - } - delete pCanvas; return; @@ -718,13 +689,7 @@ _ButtonPresenter::DrawBitmap(void) Bitmap* pEffectBitmap = __pButton->GetEffectBitmap(status); Bitmap* pNormalEffectBitmap = __pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL); - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - - FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin), - __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin)); + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); if (pBitmap) { @@ -736,8 +701,8 @@ _ButtonPresenter::DrawBitmap(void) return; } - if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(status).x - rightTouchMargin < pBitmap->GetWidthF() - || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(status).y - bottomTouchMargin < pBitmap->GetHeightF()) + if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(status).x < pBitmap->GetWidthF() + || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(status).y < pBitmap->GetHeightF()) { pCanvas->DrawBitmap(bounds, *pBitmap, FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF(), pBitmap->GetHeightF())); @@ -767,8 +732,8 @@ _ButtonPresenter::DrawBitmap(void) return; } - if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).x - rightTouchMargin < pNormalBitmap->GetWidthF() - || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).y - bottomTouchMargin < pNormalBitmap->GetHeightF()) + if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).x < pNormalBitmap->GetWidthF() + || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).y < pNormalBitmap->GetHeightF()) { pCanvas->DrawBitmap(bounds, *pNormalBitmap, FloatRectangle(0.0f, 0.0f, pNormalBitmap->GetWidthF(), pNormalBitmap->GetHeightF())); @@ -796,7 +761,7 @@ _ButtonPresenter::DrawBitmap(void) void _ButtonPresenter::DrawText(void) { - TimerForTitleSlideInit(); + TimerForTextSlideInit(); //TextSimple* pSimpleText = null; TextObjectAlignment horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; TextObjectAlignment verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; @@ -806,11 +771,6 @@ _ButtonPresenter::DrawText(void) float rightMargin = __pButton->GetRightMarginF(); float bottomMargin = __pButton->GetBottomMarginF(); - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - Canvas* pCanvas = __pButton->GetCanvasN(); if (pCanvas == null) { @@ -846,9 +806,9 @@ _ButtonPresenter::DrawText(void) //pSimpleText = new (std::nothrow) TextSimple(const_cast(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength()); //__pTextObject->AppendElement(*pSimpleText); - __textRect = FloatRectangle(leftMargin + leftTouchMargin, topMargin + topTouchMargin, - __pButton->GetBoundsF().width - (leftMargin + rightMargin) - (leftTouchMargin + rightTouchMargin), - __pButton->GetBoundsF().height - (topMargin + bottomMargin) - (topTouchMargin + bottomTouchMargin)); + __textRect = FloatRectangle(leftMargin, topMargin, + __pButton->GetBoundsF().width - (leftMargin + rightMargin), + __pButton->GetBoundsF().height - (topMargin + bottomMargin)); if (__pButton->UserDefinedText()) { @@ -859,6 +819,23 @@ _ButtonPresenter::DrawText(void) __pTextObject->SetBounds(__textRect); } + if (__pTextSlideClippedBitmap) + { + delete __pTextSlideClippedBitmap; + __pTextSlideClippedBitmap = null; + } + + __pTextSlideClippedBitmap = new (std::nothrow) Bitmap(); + + if (__pButton->UserDefinedText()) + { + __pTextSlideClippedBitmap->Construct(*pCanvas, __pButton->GetUserDefinedTextAreaF()); + } + else + { + __pTextSlideClippedBitmap->Construct(*pCanvas, __textRect); + } + __pTextObject->SetAlignment(horizontalAlign | verticalAlign); if (__pButton->GetButtonStatus() == _BUTTON_STATUS_SELECTED && __pButton->IsTabTextSlide()) @@ -870,6 +847,7 @@ _ButtonPresenter::DrawText(void) __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); } + SetTextSize(__pButton->GetTextSizeF()); __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); __pTextObject->Compose(); @@ -892,7 +870,7 @@ _ButtonPresenter::DrawText(void) DrawTabTextDimBitmap(); - TimerForTitleSlideStart(); + TimerForTextSlideStart(); } else { @@ -912,10 +890,6 @@ _ButtonPresenter::DrawUnderlineBitmap(void) float selectedBitmapHeight = 0.0f; float segmentedHeight = 0.0f; - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_MARGIN, __pButton->GetOrientation(), selectedBitmapMargin); GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_HEIGHT, __pButton->GetOrientation(), selectedBitmapHeight); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, __pButton->GetOrientation(), segmentedHeight); @@ -932,9 +906,9 @@ _ButtonPresenter::DrawUnderlineBitmap(void) return; } - FloatRectangle bounds(selectedBitmapMargin + leftTouchMargin, - __pButton->GetBoundsF().height - bottomTouchMargin - selectedBitmapHeight, - __pButton->GetBoundsF().width - selectedBitmapMargin * 2 - (leftTouchMargin + rightTouchMargin), selectedBitmapHeight + 1); + FloatRectangle bounds(selectedBitmapMargin, + __pButton->GetBoundsF().height - selectedBitmapHeight, + __pButton->GetBoundsF().width - selectedBitmapMargin * 2, selectedBitmapHeight + 1); if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pUnderlineBitmap)) { @@ -955,11 +929,6 @@ _ButtonPresenter::DrawUnderlineBitmap(void) void _ButtonPresenter::DrawSubTitleEffectBitmap(void) { - float leftTouchMargin = __pButton->GetLeftTouchMarginF(); - float topTouchMargin = __pButton->GetTopTouchMarginF(); - float rightTouchMargin = __pButton->GetRightTouchMarginF(); - float bottomTouchMargin = __pButton->GetBottomTouchMarginF(); - Bitmap* pSubTitleEffectBitmap = __pButton->GetSubTitleEffectBitmap(); if (pSubTitleEffectBitmap) @@ -972,8 +941,7 @@ _ButtonPresenter::DrawSubTitleEffectBitmap(void) return; } - FloatRectangle bounds(leftTouchMargin, topTouchMargin, - __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin), __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin)); + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pSubTitleEffectBitmap)) { @@ -1173,7 +1141,7 @@ _ButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { _KeyCode keyCode = keyInfo.GetKeyCode(); - if (__pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + if (__pButton->IsFocused() && __pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) { if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { @@ -1198,12 +1166,10 @@ _ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control) if (__pButton->GetEnableState()) { __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); - __pButton->Invalidate(); } else { __pButton->SetButtonStatus(_BUTTON_STATUS_DISABLED); - __pButton->Invalidate(); } return; @@ -1348,14 +1314,14 @@ _ButtonPresenter::OnTimerExpired(Timer& timer) if (onTimer == __pTextSlideTimer) { - TimerForTitleSlideTimeout(); + TimerForTextSlideTimeout(); } return; } result -_ButtonPresenter::TimerForTitleSlideInit(void) +_ButtonPresenter::TimerForTextSlideInit(void) { result r = E_SUCCESS; @@ -1369,7 +1335,7 @@ _ButtonPresenter::TimerForTitleSlideInit(void) } result -_ButtonPresenter::TimerForTitleSlideStart(void) +_ButtonPresenter::TimerForTextSlideStart(void) { result r = E_SUCCESS; @@ -1403,7 +1369,7 @@ CATCH: } result -_ButtonPresenter::TimerForTitleSlideTimeout(void) +_ButtonPresenter::TimerForTextSlideTimeout(void) { Canvas* pCanvas = __pButton->GetCanvasN(); SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pCanvas is invalid!"); @@ -1414,18 +1380,18 @@ _ButtonPresenter::TimerForTitleSlideTimeout(void) { pCanvas->Clear(__pButton->GetUserDefinedTextAreaF()); - if (__pTabLargeSelectedBitmap) + if (__pTextSlideClippedBitmap) { - pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__pButton->GetUserDefinedTextAreaF()), *__pTabLargeSelectedBitmap); + pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__pButton->GetUserDefinedTextAreaF()), *__pTextSlideClippedBitmap); } } else { pCanvas->Clear(__textRect); - if (__pTabLargeSelectedBitmap) + if (__pTextSlideClippedBitmap) { - pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__textRect), *__pTabLargeSelectedBitmap); + pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__textRect), *__pTextSlideClippedBitmap); } } @@ -1445,7 +1411,7 @@ _ButtonPresenter::TimerForTitleSlideTimeout(void) if (__pTextObject->GetRepeatCount() < 3) { - TimerForTitleSlideStart(); + TimerForTextSlideStart(); } } else diff --git a/src/ui/controls/FUiCtrl_CheckButton.cpp b/src/ui/controls/FUiCtrl_CheckButton.cpp index 4cd913f..b3c05e8 100644 --- a/src/ui/controls/FUiCtrl_CheckButton.cpp +++ b/src/ui/controls/FUiCtrl_CheckButton.cpp @@ -68,22 +68,30 @@ public: { if(__pCheckButton->IsSelected()) { - _AccessibilityManager::GetInstance()->ReadContent(L"ticked"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_TICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"unticked"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_UNTICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } } else if (style == CHECK_BUTTON_STYLE_RADIO || style == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || style == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { if(__pCheckButton->IsSelected()) { - _AccessibilityManager::GetInstance()->ReadContent(L"selected"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"unselected"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } } else if (style == CHECK_BUTTON_STYLE_ONOFF || style == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER @@ -91,11 +99,15 @@ public: { if(__pCheckButton->IsSelected()) { - _AccessibilityManager::GetInstance()->ReadContent(L"on"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"off"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } } return true; @@ -122,6 +134,8 @@ _CheckButton::_CheckButton(void) , __titleText(L"") , __pCircleNormalEffectBitmap(null) , __pCirclePressedEffectBitmap(null) + , __pDetailedRightNormalEffectBitmap(null) + , __pDetailedRightPressedEffectBitmap(null) , __pBackgroundNormalEffectBitmap(null) , __pBackgroundPressedEffectBitmap(null) , __pBackgroundTopNormalEffectBitmap(null) @@ -340,6 +354,18 @@ _CheckButton::~_CheckButton(void) __pCirclePressedEffectBitmap = null; } + if (__pDetailedRightNormalEffectBitmap) + { + delete __pDetailedRightNormalEffectBitmap; + __pDetailedRightNormalEffectBitmap = null; + } + + if (__pDetailedRightPressedEffectBitmap) + { + delete __pDetailedRightPressedEffectBitmap; + __pDetailedRightPressedEffectBitmap = null; + } + if (__pBackgroundNormalEffectBitmap) { delete __pBackgroundNormalEffectBitmap; @@ -480,7 +506,6 @@ _CheckButton::UpdateAccessibilityElement(void) pContainer->AddElement(*__pDetailButtonElement); } __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); - __pDetailButtonElement->SetLabel(L"More"); __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pDetailButtonElement->SetName(L"MoreButtonText"); } @@ -508,7 +533,6 @@ _CheckButton::UpdateAccessibilityElement(void) pContainer->AddElement(*__pDetailButtonElement); } __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); - __pDetailButtonElement->SetLabel(L"More"); __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pDetailButtonElement->SetName(L"MoreButtonText"); } @@ -974,6 +998,9 @@ _CheckButton::LoadDefaultBackgroundBitmap(void) r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightPressedEffectBitmap); + return r; } @@ -1630,6 +1657,18 @@ _CheckButton::GetCirclePressedEffectBitmap(void) const } Bitmap* +_CheckButton::GetDetailedRightNormalEffectBitmap(void) const +{ + return __pDetailedRightNormalEffectBitmap; +} + +Bitmap* +_CheckButton::GetDetailedRightPressedEffectBitmap(void) const +{ + return __pDetailedRightPressedEffectBitmap; +} + +Bitmap* _CheckButton::GetDetailedRightBitmap(_CheckButtonStatus checkButtonStatus) const { return __pDetailedRightBitmap[checkButtonStatus]; @@ -1778,7 +1817,7 @@ _CheckButton::UpdateAccessibilityCheckStatus(void) } else { - __pButtonElement->SetValue(L"unselected"); + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); } } } diff --git a/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp index a558c93..ddad176 100644 --- a/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp +++ b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp @@ -660,6 +660,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -672,6 +674,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -684,6 +689,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -691,6 +699,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -700,15 +718,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -726,6 +746,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED); Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED); + Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); if (pCircleDisabledBitmap) { @@ -742,6 +764,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -751,15 +783,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -777,6 +811,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -789,6 +825,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -801,6 +840,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -808,6 +850,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -817,15 +869,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); if (themeBgBitmap == false) { - Bitmap* pCirclePressedEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); - - if (pCirclePressedEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCirclePressedEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -860,6 +914,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -872,6 +928,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -884,6 +943,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -891,6 +953,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -900,15 +972,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); if (themeBgBitmap == false) { - Bitmap* pCirclePressedEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); - - if (pCirclePressedEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCirclePressedEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } @@ -940,6 +1014,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED); Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -952,6 +1028,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -964,6 +1043,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -971,6 +1053,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -980,15 +1072,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -1004,6 +1098,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -1016,6 +1112,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -1028,6 +1127,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -1035,6 +1137,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -1044,15 +1156,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -1063,6 +1177,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED); Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED); + Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); if (pCircleDisabledBitmap) { @@ -1079,6 +1195,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -1088,15 +1214,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -1107,6 +1235,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -1119,6 +1249,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -1131,6 +1264,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -1138,6 +1274,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -1147,15 +1293,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); if (themeBgBitmap == false) { - Bitmap* pCirclePressedEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); - - if (pCirclePressedEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCirclePressedEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -1167,6 +1315,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -1179,6 +1329,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -1191,6 +1344,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -1198,6 +1354,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -1207,15 +1373,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); if (themeBgBitmap == false) { - Bitmap* pCirclePressedEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); - - if (pCirclePressedEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCirclePressedEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } @@ -1240,6 +1408,8 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED); Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED); + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { @@ -1252,6 +1422,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { @@ -1264,6 +1437,9 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor); } + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } if (pReColorCircleBitmap) @@ -1271,6 +1447,16 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); } + bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + if (pReColorRightBitmap) { float arrowWidth = pReColorRightBitmap->GetWidthF(); @@ -1280,15 +1466,17 @@ _CheckButtonPresenter::DrawCheckBitmap(void) , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); } - bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); if (themeBgBitmap == false) { - Bitmap* pCircleNormalEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); - - if (pCircleNormalEffectBitmap) + if (pDetailedRightEffectBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleNormalEffectBitmap); + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); } } } @@ -2340,8 +2528,11 @@ _CheckButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& key 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) { - StartCheckAnimationTimer(); - __ratio = 0; + if (__detailedPressed == false) + { + StartCheckAnimationTimer(); + __ratio = 0; + } } __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); diff --git a/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp index 054e8bb..4b89d7f 100644 --- a/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp +++ b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp @@ -109,7 +109,7 @@ _ColorChangeEvent::CreateInstanceN(const _Control& source) SysTryReturn(NID_UI_CTRL, (pColorChangeEvent != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - if (IsFailed(GetLastResult()) == true) + if (IsFailed(GetLastResult())) { delete pColorChangeEvent; return null; diff --git a/src/ui/controls/FUiCtrl_ColorPicker.cpp b/src/ui/controls/FUiCtrl_ColorPicker.cpp index 95a3cea..f4454c5 100644 --- a/src/ui/controls/FUiCtrl_ColorPicker.cpp +++ b/src/ui/controls/FUiCtrl_ColorPicker.cpp @@ -86,17 +86,17 @@ _ColorPicker::~_ColorPicker(void) __pLuminanceHandler = null; } - if (__pHueBarElement) + if (__pHueBarElement != null) { __pHueBarElement->Activate(false); __pHueBarElement = null; } - if (__pSaturationBarElement) + if (__pSaturationBarElement != null) { __pSaturationBarElement->Activate(false); __pSaturationBarElement = null; } - if (__pLuminanceBarElement) + if (__pLuminanceBarElement != null) { __pLuminanceBarElement->Activate(false); __pLuminanceBarElement = null; @@ -238,7 +238,7 @@ _ColorPicker::SetPropertyHue(const Variant& hue) { __pColorPickerPresenter->SetHue(hue.ToInt()); - if (__pHueBarElement) + if (__pHueBarElement != null) { String hueValue; hueValue.Append(__pColorPickerPresenter->GetHue()); @@ -259,7 +259,7 @@ _ColorPicker::SetPropertySaturation(const Variant& saturation) { __pColorPickerPresenter->SetSaturation(saturation.ToInt()); - if (__pSaturationBarElement) + if (__pSaturationBarElement != null) { String saturationValue; saturationValue.Append(__pColorPickerPresenter->GetSaturation()); @@ -280,7 +280,7 @@ _ColorPicker::SetPropertyLuminance(const Variant& luminance) { __pColorPickerPresenter->SetLuminance(luminance.ToInt()); - if (__pLuminanceBarElement) + if (__pLuminanceBarElement != null) { String luminanceValue; luminanceValue.Append(__pColorPickerPresenter->GetLuminance()); @@ -372,8 +372,8 @@ _ColorPicker::InitializeAccessibilityElement(void) __pHueBarElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - __pHueBarElement->SetName("ColorPickerColorSlider"); - __pHueBarElement->SetLabel("Hue Slider"); + __pHueBarElement->SetName(L"ColorPickerColorSlider"); + __pHueBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_COLOUR_CONTROL_SLIDER_T_TALKBACK"); __pHueBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); __pHueBarElement->SetSupportOperatingGesture(false); __pHueBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y, floatBounds.width, blockHeight)); @@ -386,9 +386,8 @@ _ColorPicker::InitializeAccessibilityElement(void) __pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - __pSaturationBarElement->SetName("ColorPickerSaturationSlider"); - __pSaturationBarElement->SetLabel("Saturation Slider"); - __pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); + __pSaturationBarElement->SetName(L"ColorPickerSaturationSlider"); + __pSaturationBarElement->SetTrait(L"Saturation Slider"); __pSaturationBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); __pSaturationBarElement->SetSupportOperatingGesture(false); __pSaturationBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + blockHeight, floatBounds.width, blockHeight)); @@ -401,9 +400,8 @@ _ColorPicker::InitializeAccessibilityElement(void) __pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - __pLuminanceBarElement->SetName("ColorPickerBrightnessSlider"); - __pLuminanceBarElement->SetLabel("Luminance Slider"); - __pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); + __pLuminanceBarElement->SetName(L"ColorPickerBrightnessSlider"); + __pLuminanceBarElement->SetTrait(L"Luminance Slider"); __pLuminanceBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); __pLuminanceBarElement->SetSupportOperatingGesture(false); __pLuminanceBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + 2 * blockHeight, floatBounds.width, blockHeight)); @@ -531,7 +529,7 @@ _ColorPicker::UpdateView(void) bool _ColorPicker::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) { - if (GetEnableState() == false) + if (!GetEnableState()) { return true; } @@ -564,7 +562,7 @@ _ColorPicker::OnAccessibilityValueIncreased(const _AccessibilityContainer& contr bool _ColorPicker::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) { - if (GetEnableState() == false) + if (!GetEnableState()) { return true; } diff --git a/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp index 7a1d866..46839cc 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp @@ -80,11 +80,8 @@ _ColorPickerImpl::_ColorPickerImpl(ColorPicker& pPublic, _ColorPicker& pCore) _ColorPickerImpl::~_ColorPickerImpl(void) { - if (__pPublicColorChangeEvent != null) - { - delete __pPublicColorChangeEvent; - __pPublicColorChangeEvent = null; - } + delete __pPublicColorChangeEvent; + __pPublicColorChangeEvent = null; } _ColorPickerImpl* diff --git a/src/ui/controls/FUiCtrl_ColorPickerModel.cpp b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp index db562b9..fc71abb 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerModel.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp @@ -58,7 +58,7 @@ _ColorPickerModel::CreateInstanceN(void) SysTryReturn(NID_UI_CTRL, (pColorPickerModel != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - if (IsFailed(GetLastResult()) == true) + if (IsFailed(GetLastResult())) { delete pColorPickerModel; return null; diff --git a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp index a1dea28..73881ca 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp @@ -1144,14 +1144,14 @@ _ColorPickerPresenter::DrawArrowButton(Canvas& canvas, const FloatRectangle& rcB rightLeftArrowIconBounds.height = rightLeftArrowIconSize.height; - if (__pColorPicker->IsEnabled() == false) + if (!__pColorPicker->IsEnabled()) { isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_DISABLED); r = DrawResourceBitmap(canvas, rcButton, __pColorDisabledReplacementBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomBitmap == false) + if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pDisabledEffectBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1175,7 +1175,7 @@ _ColorPickerPresenter::DrawArrowButton(Canvas& canvas, const FloatRectangle& rcB r = DrawResourceBitmap(canvas, rcButton, __pColorPressedReplacementBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomBitmap == false) + if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pPressedEffectBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1199,7 +1199,7 @@ _ColorPickerPresenter::DrawArrowButton(Canvas& canvas, const FloatRectangle& rcB r = DrawResourceBitmap(canvas, rcButton, __pColorNormalReplacementBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomBitmap == false) + if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pNormalEffectBgBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1444,16 +1444,16 @@ _ColorPickerPresenter::ChangeColorFromCurrentHandlerPosition(_ColorPickerCompone bool isHueChanged = __hueColor != __pColorPickerModel->GetHueColor(); bool isSaturationChanged = __saturationColor != __pColorPickerModel->GetSaturationColor(); - if (isHueChanged == true || isSaturationChanged == true) + if (isHueChanged || isSaturationChanged) { Canvas* pCanvas = __pColorPicker->GetCanvasN(); if (pCanvas != null) { - if (isHueChanged == true) + if (isHueChanged) { DrawSaturationSlider(*pCanvas); } - if (isSaturationChanged == true) + if (isSaturationChanged) { DrawLuminanceSlider(*pCanvas); } @@ -1494,22 +1494,22 @@ _ColorPickerPresenter::GetBarBoundsFromHandler(_ColorPickerComponentType handler _ColorPickerComponentType _ColorPickerPresenter::GetTouchActionType(const FloatPoint& position) const { - if (__componentBounds[HUE_BAR].Contains(position) == true) + if (__componentBounds[HUE_BAR].Contains(position)) { return HUE_HANDLER; } - else if (__componentBounds[SAT_BAR].Contains(position) == true) + else if (__componentBounds[SAT_BAR].Contains(position)) { return SAT_HANDLER; } - else if (__componentBounds[LUM_BAR].Contains(position) == true) + else if (__componentBounds[LUM_BAR].Contains(position)) { return LUM_HANDLER; } for (int type = HUE_ARROWLEFT; type < COMPONENT_TYPE_MAX; type++) { - if (__componentBounds[type].Contains(position) == true) + if (__componentBounds[type].Contains(position)) { return (_ColorPickerComponentType)type; } diff --git a/src/ui/controls/FUiCtrl_ContextMenu.cpp b/src/ui/controls/FUiCtrl_ContextMenu.cpp index ed08800..4b78b3b 100644 --- a/src/ui/controls/FUiCtrl_ContextMenu.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenu.cpp @@ -379,6 +379,8 @@ _ContextMenu::OnAttachedToMainTree(void) SetTouchCapture(true, false); } + GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); + SetAllAccessibilityElement(); _VisualElement* pVisualElement = GetVisualElement(); diff --git a/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp index 7e9f30d..0fd3fdb 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp @@ -1902,7 +1902,7 @@ _ContextMenuGridPresenter::SetAllAccessibilityElement(void) pElement->SetName(L"ContextMenuItem" + Integer::ToString(i)); if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) { - pElement->SetLabel(L"icon"); + pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON"); } else { diff --git a/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp index c93fac3..21a608f 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp @@ -470,6 +470,9 @@ _ContextMenuListPresenter::CalculateRect(void) float screenLeftMargin = __screenLeftMargin; float screenRightMargin = __screenRightMargin; + int scrollPanelMargin; + GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition(); FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); @@ -502,7 +505,7 @@ _ContextMenuListPresenter::CalculateRect(void) AdjustItemLayout(); bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; - bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin; + bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin + 2 * scrollPanelMargin; // calculate the position of the arrow and body rect. if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_UP) // down Arrow @@ -746,7 +749,7 @@ _ContextMenuListPresenter::CalculateRect(void) } itemRect.x = bodyRect.x + bodyLeftMargin; - itemRect.y = bodyRect.y + bodyTopMargin; + itemRect.y = bodyRect.y + bodyTopMargin + scrollPanelMargin; itemRect.width = __layoutSize.width; itemRect.height = __layoutSize.height; @@ -759,14 +762,12 @@ _ContextMenuListPresenter::CalculateRect(void) // _Scroll visual interaction if Bounds < ScrollAreaBounds if (__pContextMenu->IsVisible()) { - int itemTopMargin; - GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, itemTopMargin); - __pContextMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + itemTopMargin, - __layoutSize.width, __layoutSize.height - 2 * itemTopMargin)); + __pContextMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + scrollPanelMargin, + __layoutSize.width, __layoutSize.height)); int itemCount = __pModel->GetItemCount(); float itemHeight = __itemHeight + (__dividerHeight * 2.0f); float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); - __pContextMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight - 2 * itemTopMargin); + __pContextMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight); } __pContextMenu->SetMovable(true); @@ -902,9 +903,8 @@ _ContextMenuListPresenter::CalculateItemMaximumWidth(void) { maxItemWidth = itemSize.width; } + __itemWidth = maxItemWidth; } - - __itemWidth = maxItemWidth; } int diff --git a/src/ui/controls/FUiCtrl_DatePickerImpl.cpp b/src/ui/controls/FUiCtrl_DatePickerImpl.cpp index 81fe5f0..3f4195c 100644 --- a/src/ui/controls/FUiCtrl_DatePickerImpl.cpp +++ b/src/ui/controls/FUiCtrl_DatePickerImpl.cpp @@ -82,11 +82,8 @@ _DatePickerImpl::_DatePickerImpl(DatePicker* pPublic, _DateTimePicker* pCore) _DatePickerImpl::~_DatePickerImpl(void) { - if (__pPublicDateTimeChangeEvent != null) - { - delete __pPublicDateTimeChangeEvent; - __pPublicDateTimeChangeEvent = null; - } + delete __pPublicDateTimeChangeEvent; + __pPublicDateTimeChangeEvent = null; } _DatePickerImpl* @@ -247,7 +244,7 @@ _DatePickerImpl::SetCurrentDate(void) ClearLastResult(); DateTime dateTime; - SystemTime::GetCurrentTime(WALL_TIME, dateTime); + SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); SetDate(dateTime); } diff --git a/src/ui/controls/FUiCtrl_DateTimeBar.cpp b/src/ui/controls/FUiCtrl_DateTimeBar.cpp index b4daa2c..aed1bc2 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBar.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBar.cpp @@ -65,17 +65,11 @@ _DateTimeBar::~_DateTimeBar(void) GetVisualElement()->RemoveAllAnimations(); } - if (__pDateTimeChangeEvent != null) - { - delete __pDateTimeChangeEvent; - __pDateTimeChangeEvent = null; - } + delete __pDateTimeChangeEvent; + __pDateTimeChangeEvent = null; - if (__pActionEvent) - { - delete __pActionEvent; - __pActionEvent = null; - } + delete __pActionEvent; + __pActionEvent = null; delete __pDateTimeBarPresenter; __pDateTimeBarPresenter = null; @@ -244,7 +238,7 @@ _DateTimeBar::InitializeAccessibilityElement(void) _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); pContainer->AddListener(*this); @@ -287,7 +281,7 @@ _DateTimeBar::RemoveActionEventListener(const _IActionEventListener& listener) result r = E_OBJ_NOT_FOUND; - if (__pActionEvent) + if (__pActionEvent != null) { r = __pActionEvent->RemoveListener(listener); } @@ -332,7 +326,7 @@ _DateTimeBar::FireActionEvent(int actionId) { ClearLastResult(); - if (__pActionEvent) + if (__pActionEvent != null) { Tizen::Base::Runtime::IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); result r = GetLastResult(); @@ -683,6 +677,17 @@ _DateTimeBar::RefreshItems(void) return; } +void +_DateTimeBar::RemoveAllAnimations(void) +{ + VisualElement *pDateTimeBarElement = GetVisualElement(); + + if (pDateTimeBarElement != null) + { + pDateTimeBarElement->RemoveAllAnimations(); + } +} + bool _DateTimeBar::OnFocusGained(const _Control& control) { @@ -723,6 +728,22 @@ _DateTimeBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _DateTimeBar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ENTER && __isAnimating) + { + if (GetSelectedBoxId() >= DATETIME_ID_YEAR && GetSelectedBoxId() <= DATETIME_ID_DAY) + { + FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (GetSelectedBoxId() >= DATETIME_ID_HOUR && GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + Close(); + return true; + } + return __pDateTimeBarPresenter->OnKeyReleased(source,keyInfo); } @@ -915,6 +936,7 @@ _DateTimeBar::CreateAnimationN(VisualElement& source, bool open) } pBoundsAnimation->SetDuration(ANIMATION_DURATION); pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); + __isAnimating = true; pAnimationGroup->AddAnimation(*pBoundsAnimation); delete pBoundsAnimation; pBoundsAnimation = null; @@ -934,7 +956,6 @@ _DateTimeBar::CloseDateTimeBar() VisualElement* pVisualElement = null; VisualElementAnimation *pAnimation = null; - __isAnimating = true; pVisualElement = GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element."); pAnimation = CreateAnimationN(*pVisualElement, false); diff --git a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp index 8cfade2..4a59e68 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp @@ -379,7 +379,7 @@ _DateTimeBarPresenter::DrawItem(Canvas& canvas) if (itemStatus == DATETIMEBAR_ITEM_STATUS_SELECTED || itemStatus == DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED) { - (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); pTextObject->SetFont(__pFont, 0, pTextObject->GetTextLength()); pTextObject->SetForegroundColor(textPressedColor, 0, pTextObject->GetTextLength()); @@ -506,7 +506,7 @@ _DateTimeBarPresenter::GetItemIndexFromPosition(const FloatPoint& point) const itemBounds.x = itemBounds.x - (itemMargin / 2.0f); itemBounds.width = itemBounds.width + itemMargin; - if (itemBounds.Contains(point) == true) + if (itemBounds.Contains(point)) { return itemIndex; } @@ -1104,7 +1104,6 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI break; } - case KEY_LEFT: { if ((__focusBounds.x - __focusBounds.width) < 0) @@ -1119,9 +1118,43 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI __pDateTimeBar->Invalidate(); break; } + default: + { + return false; + } + } + return true; +} +bool +_DateTimeBarPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (!__isFocused && keyCode == _KEY_ENTER) + { + return true; + } + + switch (keyCode) + { case KEY_ENTER: { + if (__isInitialAnimation) + { + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + __pDateTimeBar->CloseDateTimeBar(); + __isFocused = false; + return true; + } + _DateTimeBarItem* pItem = null; SetItemSelected(__focusedIndex); @@ -1134,7 +1167,6 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI if (pItem != null) { - __pDateTimeBar->SetVisibleState(false); __pDateTimeBar->CloseDateTimeBar(); __pDateTimeBar->FireActionEvent(pItem->GetActionId()); @@ -1151,42 +1183,32 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI __isFocused = false; break; } + case KEY_ESC: + //fall through + case KEY_BACK: + { + __pDateTimeBar->CloseDateTimeBar(); + ResetFlickAnimationTimer(); + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + break; + } default: { return false; } } - return true; } bool -_DateTimeBarPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) -{ - _KeyCode keyCode = keyInfo.GetKeyCode(); - - if (keyCode == _KEY_ESC || keyCode == _KEY_BACK) - { - __pDateTimeBar->CloseDateTimeBar(); - ResetFlickAnimationTimer(); - - if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) - { - __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); - } - else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) - { - __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); - } - - return true; - } - - return false; -} - -bool _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { if (__isFocused) diff --git a/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp b/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp index 97c2dc7..7df0969 100644 --- a/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp @@ -41,7 +41,7 @@ _DateTimeChangeEventArg::_DateTimeChangeEventArg(_DateTimeChangeStatus status) , __hour(0) , __minute(0) { - SystemTime::GetCurrentTime(WALL_TIME, __dateTime); + SystemTime::GetCurrentTime(TIME_MODE_WALL, __dateTime); } _DateTimeChangeEventArg::~_DateTimeChangeEventArg(void) diff --git a/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp index 98c30a6..ecf5030 100644 --- a/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp @@ -146,7 +146,7 @@ _DateTimeDisplayBox::GetText(void) const void _DateTimeDisplayBox::DrawDisplayBox(Canvas& canvas, DateTimePickerStatus status) { - if ((__focusable == false) && (status == DATETIME_STATUS_HIGHLIGHTED)) + if ((!__focusable) && (status == DATETIME_STATUS_HIGHLIGHTED)) { status = DATETIME_STATUS_NORMAL; } @@ -202,7 +202,7 @@ _DateTimeDisplayBox::DrawBackground(Canvas& canvas, DateTimePickerStatus status) isCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_DISABLED); } - if (isCustomBitmap[status] == false && __pBackgroundEffectBitmap[status] != null) + if (!isCustomBitmap[status] && __pBackgroundEffectBitmap[status] != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundEffectBitmap[status])) { diff --git a/src/ui/controls/FUiCtrl_DateTimeModel.cpp b/src/ui/controls/FUiCtrl_DateTimeModel.cpp index cb81951..08fa8f5 100644 --- a/src/ui/controls/FUiCtrl_DateTimeModel.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeModel.cpp @@ -53,7 +53,7 @@ void _DateTimeModel::SetCurrentDateTime(void) { DateTime dateTime; - SystemTime::GetCurrentTime(WALL_TIME, dateTime); + SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); SetYear(dateTime.GetYear()); SetMonth(dateTime.GetMonth()); diff --git a/src/ui/controls/FUiCtrl_DateTimePicker.cpp b/src/ui/controls/FUiCtrl_DateTimePicker.cpp index 4405059..d2abbf5 100644 --- a/src/ui/controls/FUiCtrl_DateTimePicker.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePicker.cpp @@ -64,6 +64,7 @@ _DateTimePicker::_DateTimePicker(_DateTimePresenter* pPresenter, const String& t , __pDateTimeChangeEvent(null) , __pFont(null) , __pDisplayVisualElement(null) + , __isInFocusMode(false) { } @@ -71,11 +72,8 @@ _DateTimePicker::~_DateTimePicker(void) { SettingInfo::RemoveSettingEventListener(*this); - if (__pDateTimeChangeEvent != null) - { - delete __pDateTimeChangeEvent; - __pDateTimeChangeEvent = null; - } + delete __pDateTimeChangeEvent; + __pDateTimeChangeEvent = null; if (__pFooter != null) { @@ -231,12 +229,12 @@ _DateTimePicker::CreateFooter(void) r = pCancelButton->SetText(text); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - r = pFooter->AddItem(pSaveButton); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - r = pFooter->AddItem(pCancelButton); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating."); + r = pFooter->AddItem(pSaveButton); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pFooter != null) { DetachSystemChild(*__pFooter); @@ -890,7 +888,7 @@ _DateTimePicker::OnChangeLayout(_ControlOrientation orientation) { FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds(); - if (__pDisplayVisualElement) + if (__pDisplayVisualElement != null) { displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y; } @@ -989,7 +987,7 @@ _DateTimePicker::OnFontInfoRequested(unsigned long& style, float& size) bool _DateTimePicker::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { - if (&source != this) + if (&source != this && &source != __pFooter) { return false; } @@ -1000,7 +998,7 @@ _DateTimePicker::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _DateTimePicker::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { - if (&source != this) + if (&source != this && &source != __pFooter) { return false; } @@ -1012,6 +1010,7 @@ void _DateTimePicker::OnDrawFocus(void) { __pPresenter->DrawFocus(); + __isInFocusMode = true; return; } @@ -1028,13 +1027,19 @@ _DateTimePicker::OnFocusLost(const _Control& source) SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); _Control::OnFocusLost(source); + __isInFocusMode = false; return true; } void _DateTimePicker::OnFocusModeStateChanged(void) { - __pPresenter->ReleaseFocus(); + if (__isInFocusMode) + { + __pPresenter->ReleaseFocus(); + __isInFocusMode = false; + } + return; } @@ -1134,7 +1139,7 @@ _DateTimePicker::CreateAllAccessibilityElements(void) displayBoxBounds.y -= topMargin; displayBoxBounds.height += 2 * topMargin; - if (__pDisplayVisualElement) + if (__pDisplayVisualElement != null) { displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y; } @@ -1155,7 +1160,7 @@ _DateTimePicker::CreateAllAccessibilityElements(void) amPmBoxBounds.x += leftMargin; - if (__pDisplayVisualElement) + if (__pDisplayVisualElement != null) { amPmBoxBounds.y += __pDisplayVisualElement->GetBounds().y; } diff --git a/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp b/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp index 0efdb69..207eb60 100644 --- a/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp @@ -81,11 +81,8 @@ _DateTimePickerImpl::_DateTimePickerImpl(DateTimePicker* pPublic, _DateTimePicke _DateTimePickerImpl::~_DateTimePickerImpl(void) { - if (__pPublicDateTimeChangeEvent != null) - { - delete __pPublicDateTimeChangeEvent; - __pPublicDateTimeChangeEvent = null; - } + delete __pPublicDateTimeChangeEvent; + __pPublicDateTimeChangeEvent = null; } _DateTimePickerImpl* diff --git a/src/ui/controls/FUiCtrl_DateTimePresenter.cpp b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp index 513a5b1..8f1fbbe 100644 --- a/src/ui/controls/FUiCtrl_DateTimePresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp @@ -139,7 +139,7 @@ _DateTimePresenter::Dispose(void) delete __pPmBox; __pPmBox = null; - if ((__inputPadEnabled == true) && (__pInputPad != null)) + if ((__inputPadEnabled) && (__pInputPad != null)) { __pView->DetachChild(*__pInputPad); delete __pInputPad; @@ -186,7 +186,7 @@ _DateTimePresenter::Construct(_DateTimePicker& view) UpdateTimeFormat(); LoadPickerData(); - if (__inputPadEnabled == true) + if (__inputPadEnabled) { __pInputPad = new (std::nothrow) _InputPad; SysTryCatch(NID_UI_CTRL, (__pInputPad != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -209,7 +209,7 @@ _DateTimePresenter::Construct(_DateTimePicker& view) __pInputPad->SetFont(__pFont); - if (__pInputPad->IsFocusable() == true) + if (__pInputPad->IsFocusable()) { __pInputPad->SetFocusable(false); } @@ -621,7 +621,7 @@ _DateTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to int touchedAreaId = CalculateTouchArea(touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); - if (__isPmButtonPressed == true) + if (__isPmButtonPressed) { if (touchedAreaId == DATETIME_AREA_OUTPUT_AMPM) { @@ -841,7 +841,7 @@ _DateTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInf return false; } - if (__isPmButtonPressed == true && keyCode == _KEY_ENTER) + if (__isPmButtonPressed && keyCode == _KEY_ENTER) { __isPm = (!__isPm); __isPmButtonPressed = false; @@ -885,12 +885,12 @@ _DateTimePresenter::ReleaseFocus(void) void _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) { - if ((__inputPadEnabled == false) || (inputPadReturnValue == -1)) + if ((!__inputPadEnabled) || (inputPadReturnValue == -1)) { return; } - if ((__keypadEnabled == true) && (__pickerStyle != DATETIME_OUTPUT_STYLE_DATE) && (__focusedBoxIndex == __outputBoxMaxCount)) + if ((__keypadEnabled) && (__pickerStyle != DATETIME_OUTPUT_STYLE_DATE) && (__focusedBoxIndex == __outputBoxMaxCount)) { //in case of Am/Pm if keypad enabled, inputpad values need not be handled though in focus return; @@ -905,7 +905,7 @@ _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView); __changeFocusCounter++; - if (__isFocusBoxChanged == true) + if (__isFocusBoxChanged) { newNumber = inputPadReturnValue; __isFocusBoxChanged = false; @@ -970,7 +970,7 @@ _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView); __changeFocusCounter++; - if (__isFocusBoxChanged == true) + if (__isFocusBoxChanged) { newNumber = inputPadReturnValue; __isFocusBoxChanged = false; @@ -1330,7 +1330,7 @@ _DateTimePresenter::UpdateDateTimeOutputConfig(void) boxCount++; // AmPm Button - if (__is24HourNotation == false) + if (!__is24HourNotation) { pPmBox = new (std::nothrow) _DateTimeDisplayBox(amPmBounds, DATETIME_ID_AMPM); SysTryCatch(NID_UI_CTRL, (pPmBox != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1656,7 +1656,7 @@ _DateTimePresenter::DrawDateTimeDisplayBox(Canvas& canvas, int index) r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pView->IsEnabled() == false) + if (!__pView->IsEnabled()) { status = DATETIME_STATUS_DISABLED; } @@ -1737,14 +1737,14 @@ _DateTimePresenter::DrawPm(Canvas& canvas) { String text; - if ((__is24HourNotation == true) || (__pPmBox == null)) + if ((__is24HourNotation) || (__pPmBox == null)) { return; } _DateTimeUtils dateTimeUtils; - if (__isPm == false) + if (!__isPm) { dateTimeUtils.GetAmPm(text, AM_TYPE); } @@ -1755,11 +1755,11 @@ _DateTimePresenter::DrawPm(Canvas& canvas) __pPmBox->SetText(text); - if (__pView->IsEnabled() == false) + if (!__pView->IsEnabled()) { __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_DISABLED); } - else if (__isPmButtonPressed == true) + else if (__isPmButtonPressed) { __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_SELECTED); } @@ -1787,7 +1787,7 @@ _DateTimePresenter::DrawBackground(Canvas& canvas) canvas.SetBackgroundColor(backgroundColor); canvas.Clear(); - if (__pBgNormalBitmap) + if (__pBgNormalBitmap != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBgNormalBitmap)) { @@ -1801,7 +1801,7 @@ _DateTimePresenter::DrawBackground(Canvas& canvas) } } - if (__pBgEffectBitmap) + if (__pBgEffectBitmap != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBgEffectBitmap)) { @@ -1978,7 +1978,7 @@ _DateTimePresenter::GetOutputArea(void) void _DateTimePresenter::ChangeInputPadStyle(int boxId) { - if (__inputPadEnabled == false) + if (!__inputPadEnabled) { return; } @@ -2301,7 +2301,7 @@ _DateTimePresenter::LoadPickerData(void) __day = GetDay(); __hour = GetHour(); - if (__is24HourNotation == false) + if (!__is24HourNotation) { int max = DATETIME_HOUR_MAX_FOR_24NOTATION; @@ -2340,11 +2340,11 @@ _DateTimePresenter::SavePickerData(void) SetMonth(__month); SetDay(__day); - if (__is24HourNotation == false) + if (!__is24HourNotation) { int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; - if (__isPm == true) + if (__isPm) { if (__hour < maxHour) { @@ -2395,7 +2395,7 @@ _DateTimePresenter::UpdateDisplayData(int boxId) case DATETIME_ID_HOUR: __hour = GetHour(); - if (__is24HourNotation == false) + if (!__is24HourNotation) { int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; @@ -2479,7 +2479,7 @@ _DateTimePresenter::AdjustDisplayValue(int index) case DATETIME_ID_HOUR: minValue = DATETIME_HOUR_MIN; maxValue = DATETIME_HOUR_MAX; - if (__is24HourNotation == false) + if (!__is24HourNotation) { maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; diff --git a/src/ui/controls/FUiCtrl_Edit.cpp b/src/ui/controls/FUiCtrl_Edit.cpp index 689af2d..839a22e 100755 --- a/src/ui/controls/FUiCtrl_Edit.cpp +++ b/src/ui/controls/FUiCtrl_Edit.cpp @@ -125,7 +125,6 @@ _EditInternalTouchEventListener::OnTouchPressed(const _Control& source, const _T } else if (pEditPresenter->IsCopyPasteHandle(source)) { - pEditPresenter->ReleaseCopyPastePopup(); return false; } else if (pEditPresenter->IsCopyPastePopupExist()) @@ -522,7 +521,7 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt { __pClearButtonTextAccessibilityElement = new _AccessibilityElement(true); __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); - __pClearButtonTextAccessibilityElement->SetLabel(L"all clear"); +// __pClearButtonTextAccessibilityElement->SetLabel(L"all clear"); __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); @@ -1084,7 +1083,7 @@ _Edit::UpdateAccessibilityElement(EditAccessibilityElementType type) { __pClearButtonTextAccessibilityElement = new _AccessibilityElement(true); __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); - __pClearButtonTextAccessibilityElement->SetLabel(L"all clear"); +// __pClearButtonTextAccessibilityElement->SetLabel(L"all clear"); __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); @@ -2722,6 +2721,8 @@ _Edit::SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus even IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, eventstatus); SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + _pEditPresenter->SetSentKeypadEvent(eventstatus); + __pKeypadEvent->Fire(*pEventArg); } diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index f696157..867aa61 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -19,7 +19,8 @@ * @file FUiCtrl_EditCopyPasteManager.cpp * @brief This is the implementation file for the _EditCopyPasteManager class. */ - +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" #include #include #include @@ -61,19 +62,16 @@ const int COPY_PASTE_CLIPBOARD_ID = 236; const int COPY_PASTE_SEARCH_ID = 237; class _EditCopyPasteMagnifier - : public _Window + : public _Control { public: - _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos); + _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos); virtual ~_EditCopyPasteMagnifier(void); - static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager); + static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow); virtual void OnDraw(void); void CaptureTextArea(Canvas& canvas); void MoveMagnifier(const FloatPoint& point, int handlerCursorPos); Bitmap* GetMagnifierBitmap(void) const; - virtual result OnAttachedToMainTree(void); - result OnBoundsChanging(const FloatRectangle& bounds); - result OnBoundsChanging(const Rectangle& bounds); void SetRowColumnIndex(int rowIndex, int columnIndex); private: @@ -89,9 +87,10 @@ private: FloatRectangle __windowBounds; int __rowIndex; int __columnIndex; + _Window* __pParentWindow; }; -_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos) +_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos) : __pCopyPasteManager(pCopyPasteManager) , __pMagnifierBitmap(null) , __pMagnifierMaskBitmap(null) @@ -100,17 +99,28 @@ _EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPas , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f) , __rowIndex(-1) , __columnIndex(-1) + , __pParentWindow(pParentWindow) { AcquireHandle(); - __pRoot = GetVisualElement(); - __pRoot->SetSurfaceOpaque(false); GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_MAGNIFIER, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagnifierBitmap); GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_MAGNIFIER_MASK, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagnifierMaskBitmap); + + if (__pParentWindow) + { + __pParentWindow->AttachChild(*this); + } + + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*GetVisualElement()); + pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 5); } _EditCopyPasteMagnifier::~_EditCopyPasteMagnifier(void) { + if (__pParentWindow) + { + __pParentWindow->DetachChild(*this); + } if (__pMagnifierBitmap) { delete __pMagnifierBitmap; @@ -130,9 +140,9 @@ _EditCopyPasteMagnifier::GetMagnifierBitmap(void) const } _EditCopyPasteMagnifier* -_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager) +_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow) { - _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, handlerCursorPos); + _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, pParentWindow, handlerCursorPos); SysTryReturn(NID_UI_CTRL, pCopyPasteMagnifier != null, null, E_OUT_OF_MEMORY, "pCopyPasteMagnifier is null"); FloatPoint cursorPoint(point); @@ -145,11 +155,6 @@ _EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCur Bitmap* pMagnifierBitmap = pCopyPasteMagnifier->GetMagnifierBitmap(); SysTryReturn(NID_UI_CTRL, pMagnifierBitmap != null, null, E_OUT_OF_MEMORY, "pMagnifierBitmap is null"); - result r = pCopyPasteMagnifier->CreateRootVisualElement(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - pCopyPasteMagnifier->SetActivationEnabled(false); - GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_WIDTH, orientation, width); GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_HEIGHT, orientation, height); @@ -158,66 +163,16 @@ _EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCur { bounds.y = 0.0f; } + bounds.x -= (pParentWindow->GetAbsoluteBoundsF(true).x + pParentWindow->GetClientBoundsF().x); + bounds.y -= (pParentWindow->GetAbsoluteBoundsF(true).y + pParentWindow->GetClientBoundsF().y); pCopyPasteMagnifier->SetBounds(bounds); - pCopyPasteMagnifier->Open(); return pCopyPasteMagnifier; - -CATCH: - pCopyPasteMagnifier->Close(); - delete pCopyPasteMagnifier; - - return null; -} - -result -_EditCopyPasteMagnifier::OnAttachedToMainTree(void) -{ - result r = E_SUCCESS; - - if (GetOwner() == null) - { - _Edit* pEdit = __pCopyPasteManager->GetEdit(); - SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEdit."); - - _EditPresenter* pEditPresenter = pEdit->GetPresenter(); - SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEditPresenter."); - - _Form* pParentForm = pEditPresenter->GetParentForm(); - if (pParentForm) - { - SetOwner(pParentForm); - } - else - { - _Form* pForm = null; - _Frame* pCurrentFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); - if (pCurrentFrame) - { - pForm = pCurrentFrame->GetCurrentForm(); - if (pForm) - { - SetOwner(pForm); - } - else - { - SetOwner(pCurrentFrame); - } - } - } - } - - return r; } void _EditCopyPasteMagnifier::OnDraw(void) { - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_INVALID_STATE, "pEcoreEvas is null."); - - pEcoreEvas->SetWindowBounds(*GetRootWindow(), __windowBounds); - Canvas* pCanvas = GetCanvasN(); if (pCanvas == null) { @@ -239,7 +194,19 @@ _EditCopyPasteMagnifier::OnDraw(void) Color editColor = __pCopyPasteManager->GetEdit()->GetColor(EDIT_STATUS_HIGHLIGHTED); if (editColor.GetAlpha() == 0x00) { - editColor = Color::GetColor(COLOR_ID_WHITE); + byte r,g,b,a; + editColor = __pCopyPasteManager->GetEdit()->GetTextColor(EDIT_STATUS_HIGHLIGHTED); + editColor.GetColorComponents(r,g,b,a); + byte max = (r >= g) ? r:g; + max = (max >= b) ? max:b; + if (max >= 255/2) + { + editColor = Color::GetColor(COLOR_ID_BLACK); + } + else + { + editColor = Color::GetColor(COLOR_ID_WHITE); + } } Bitmap* pReplacedMaskBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagnifierMaskBitmap, Color::GetColor(COLOR_ID_MAGENTA), editColor); @@ -278,14 +245,18 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) float adjustPosY = 0.0f; FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle captureBounds(0.0f, 0.0f, 0.0f, 0.0f); + _VisualElementImpl* pEditVisualElementImpl = null; _Edit* pEdit = __pCopyPasteManager->GetEdit(); SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "pEdit is null."); + _VisualElement* pEditVisualElement = pEdit->GetVisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement, E_INVALID_STATE, "pEditVisualElement is null."); + _EditPresenter* pEditPresenter = pEdit->GetPresenter(); SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null."); - pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds, __handlerCursorPos); + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds,__handlerCursorPos); GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_WIDTH, pEdit->GetOrientation(), captureWidth); GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, pEdit->GetOrientation(), captureHeight); @@ -293,14 +264,7 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, pEdit->GetOrientation(), capturePosY); FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF(); - - // textobject minimum width/height - if (pEdit->GetBoundsF().width < textObjectBounds.width) - { - textObjectBounds.width = pEdit->GetBoundsF().width - pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN) - pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); - } - - captureBounds.x = cursorBounds.x + cursorBounds.width/2.0f - captureWidth/2.0f; + captureBounds.x = cursorBounds.x - captureWidth/2.0f; captureBounds.y = cursorBounds.y + cursorBounds.height/2.0f - captureHeight/2.0f; captureBounds.width = captureWidth; captureBounds.height = captureHeight; @@ -316,29 +280,37 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) adjustPosY = captureHeight - captureBounds.height; } - Bitmap* pOriginalBitmp = pEdit->GetCapturedBitmapN(true); - SysTryReturnVoidResult(NID_UI_CTRL, pOriginalBitmp, E_INVALID_STATE, "pOriginalBitmp is null."); + Bitmap* pOriginalBitmp = null; + Canvas* pCanvas = new (std::nothrow) Canvas; + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "pCanvas is null."); - Bitmap bitmap; - r = bitmap.Construct(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = pCanvas->Construct(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); - r = bitmap.Merge(FloatPoint(0.0f, 0.0f), *pOriginalBitmp, CoordinateSystem::AlignToDevice(FloatRectangle(captureBounds.x, captureBounds.y, captureBounds.width, captureBounds.height))); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + pEditVisualElementImpl = _VisualElementImpl::GetInstance(*pEditVisualElement); + + pEditVisualElementImpl->Capture(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)), CoordinateSystem::AlignToDevice(captureBounds), true); + + pOriginalBitmp = new (std::nothrow) Bitmap; + SysTryCatch(NID_UI, pOriginalBitmp != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + r = pOriginalBitmp->Construct(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height))); - r = bitmap.SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + r = pOriginalBitmp->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = bitmap.Scale(CoordinateSystem::AlignToDevice(FloatDimension(bitmap.GetActualWidth()*1.5f, bitmap.GetActualHeight()*1.5f))); + r = pOriginalBitmp->Scale(CoordinateSystem::AlignToDevice(FloatDimension(pOriginalBitmp->GetActualWidth()*1.5f, pOriginalBitmp->GetActualHeight()*1.5f))); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - canvas.DrawBitmap(CoordinateSystem::AlignToDevice(FloatPoint(capturePosX + adjustPosX*1.5f, capturePosY + adjustPosY*1.5f)), bitmap); + canvas.DrawBitmap(CoordinateSystem::AlignToDevice(FloatPoint(capturePosX + adjustPosX*1.5f, capturePosY + adjustPosY*1.5f)), *pOriginalBitmp); + delete pCanvas; delete pOriginalBitmp; return; CATCH: + delete pCanvas; delete pOriginalBitmp; return; @@ -353,28 +325,12 @@ _EditCopyPasteMagnifier::MoveMagnifier(const FloatPoint& point, int handlerCurso { bounds.y = 0.0f; } + bounds.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x); + bounds.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y); SetBounds(bounds); Invalidate(); } -result -_EditCopyPasteMagnifier::OnBoundsChanging(const FloatRectangle& bounds) -{ - result r = E_SUCCESS; - - __windowBounds = bounds; - - return r; -} - -result -_EditCopyPasteMagnifier::OnBoundsChanging(const Rectangle& bounds) -{ - result r = E_SUCCESS; - - return r; -} - void _EditCopyPasteMagnifier::SetRowColumnIndex(int rowIndex, int columnIndex) { @@ -388,7 +344,7 @@ _EditCopyPasteMagnifier::SetRowColumnIndex(int rowIndex, int columnIndex) * */ class _EditCopyPasteHandler - : public _Window + : public _Control , virtual public IEventListener , virtual public _IUiEventListener , virtual public _IUiEventPreviewer @@ -400,8 +356,8 @@ public: * This is the default class constructor. * */ - _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); - _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); + _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler); + _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler); /** * This is the default class destructor. @@ -419,8 +375,8 @@ public: HANDLER_DIRECTION_REVERSE_3,//horizontal vertical reverse }; - static _EditCopyPasteHandler* CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true); - static _EditCopyPasteHandler* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true); + static _EditCopyPasteHandler* CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler = true); + static _EditCopyPasteHandler* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler = true); int GetHandlerCursorPosition(void) const; void GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const; void SetHandlerCursorPosition(int handlerCursorPos); @@ -440,12 +396,6 @@ public: virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); virtual bool IsActivatedOnOpen(void) const; virtual void OnChangeLayout(_ControlOrientation orientation); - virtual result OnAttachedToMainTree(void); - - result OnBoundsChanging(const Rectangle& bounds); - result OnBoundsChanging(const FloatRectangle& bounds); - result SetWindowBounds(const Rectangle& bounds); - result SetWindowBounds(const FloatRectangle& bounds); private: _EditCopyPasteHandler(const _EditCopyPasteHandler& value); @@ -469,6 +419,7 @@ private: bool __isTouchMoving; int __rowIndex; int __columnIndex; + _Window* __pParentWindow; }; // _EditCopyPasteHandler Bitmap* @@ -497,7 +448,7 @@ _EditCopyPasteHandler::CreateCopyPasteMagnifier(void) { pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); } - __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager); + __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager, __pParentWindow); SysTryReturn(NID_UI_CTRL, __pCopyPasteMagnifier, false, E_INVALID_STATE, "[E_INVALID_STATE] __pCopyPasteMagnifier is null.\n"); __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex); @@ -510,7 +461,6 @@ _EditCopyPasteHandler::DestroyCopyPasteMagnifier(void) { if (__pCopyPasteMagnifier) { - __pCopyPasteMagnifier->Close(); delete __pCopyPasteMagnifier; __pCopyPasteMagnifier = null; } @@ -612,7 +562,7 @@ _EditCopyPasteHandler::ChangeHandlerBitmap(void) } } -_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) : __pRoot(null) , __pHandlerBitmap(null) , __touchPressedPoint(0.0f, 0.0f) @@ -629,12 +579,8 @@ _EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCurs , __isTouchMoving(false) , __rowIndex(-1) , __columnIndex(-1) + , __pParentWindow(pParentWindow) { - AcquireHandle(); - - __pRoot = GetVisualElement(); - __pRoot->SetSurfaceOpaque(false); - Point handlerPoint(point); if (singleHandler) @@ -659,7 +605,7 @@ _EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCurs FloatRectangle bounds(handlerPoint.x, handlerPoint.y, __pHandlerBitmap->GetWidth(), __pHandlerBitmap->GetHeight()); } -_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) : __pRoot(null) , __pHandlerBitmap(null) , __touchPressedPoint(0.0f, 0.0f) @@ -676,11 +622,8 @@ _EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handle , __isTouchMoving(false) , __rowIndex(-1) , __columnIndex(-1) + , __pParentWindow(pParentWindow) { - AcquireHandle(); - - __pRoot = GetVisualElement(); - __pRoot->SetSurfaceOpaque(false); //To do ..... //Point handlerPoint(_CoordinateSystemUtils::ConvertToInteger(point)); @@ -719,20 +662,15 @@ _EditCopyPasteHandler::~_EditCopyPasteHandler(void) } _EditCopyPasteHandler* -_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) { - _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler); + _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, pParentWindow, singleHandler, leftHandler); SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "pContextMenu is null"); Point handlerPoint(point); Rectangle bounds(0, 0, 0, 0); Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap(); - result r = pCopyPasteHandler->CreateRootVisualElement(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - pCopyPasteHandler->SetActivationEnabled(false); - if (singleHandler) { handlerPoint.x = handlerPoint.x - (pHandlerBitmap->GetWidth() / 2); @@ -750,34 +688,26 @@ _EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, bounds.width = pHandlerBitmap->GetWidth(); bounds.height = pHandlerBitmap->GetHeight(); + bounds.x -= pParentWindow->GetAbsoluteBounds(true).x; + bounds.y -= pParentWindow->GetAbsoluteBounds(true).y; + pCopyPasteHandler->SetBounds(bounds); pCopyPasteHandler->CheckReverseStatus(); - pCopyPasteHandler->Open(false); + pCopyPasteHandler->AcquireHandle(); return pCopyPasteHandler; - -CATCH: - pCopyPasteHandler->Close(); - delete pCopyPasteHandler; - - return null; } _EditCopyPasteHandler* -_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) { - _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler); + _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, pParentWindow, singleHandler, leftHandler); SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "pContextMenu is null"); FloatPoint handlerPoint(point); FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap(); - result r = pCopyPasteHandler->CreateRootVisualElement(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - pCopyPasteHandler->SetActivationEnabled(false); - if (singleHandler) { handlerPoint.x = handlerPoint.x - (pHandlerBitmap->GetWidthF() / 2.0f); @@ -795,17 +725,13 @@ _EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCurso bounds.width = pHandlerBitmap->GetWidthF(); bounds.height = pHandlerBitmap->GetHeightF(); + bounds.x -= (pParentWindow->GetAbsoluteBoundsF(true).x + pParentWindow->GetClientBoundsF().x); + bounds.y -= (pParentWindow->GetAbsoluteBoundsF(true).y + pParentWindow->GetClientBoundsF().y); pCopyPasteHandler->SetBounds(bounds); pCopyPasteHandler->CheckReverseStatus(); - pCopyPasteHandler->Open(false); + pCopyPasteHandler->AcquireHandle(); return pCopyPasteHandler; - -CATCH: - pCopyPasteHandler->Close(); - delete pCopyPasteHandler; - - return null; } int @@ -831,7 +757,7 @@ void _EditCopyPasteHandler::AdjustBounds(void) { FloatRectangle cursorRect; - FloatRectangle rect = GetBoundsF(); + FloatRectangle rect = GetAbsoluteBoundsF(true); FloatPoint checkPoint(0.0f, 0.0f); _Edit* pEdit = __pCopyPasteManager->GetEdit(); _EditPresenter* pEditPresenter = pEdit->GetPresenter(); @@ -910,16 +836,16 @@ _EditCopyPasteHandler::AdjustBounds(void) if (visibleState && !GetVisibleState()) { SetVisibleState(true); - Open(); } else if (!visibleState && GetVisibleState()) { SetVisibleState(false); - Close(); } } - + rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x); + rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y); SetBounds(rect); + Invalidate(); return; } @@ -943,24 +869,28 @@ _EditCopyPasteHandler::OnDraw(void) } delete pCanvas; - - if (__reverseCheck) - { - SetWindowBounds(__windowBounds); - __reverseCheck = false; - } - else - { - SetWindowBounds(__windowBounds); - } } bool _EditCopyPasteHandler::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { - __pCopyPasteManager->ReleaseCopyPastePopup(); + _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); + if (pCopyPastePopup) + { + pCopyPastePopup->SetVisibleState(false); + pCopyPastePopup->Close(); + } + #if EDIT_COPY_PASTE_MAGNIFIER - CreateCopyPasteMagnifier(); + if (!__pCopyPasteMagnifier) + { + CreateCopyPasteMagnifier(); + } + else + { + __pCopyPasteMagnifier->SetVisibleState(true); + __pCopyPasteMagnifier->Invalidate(); + } #endif __touchPressedPoint = touchinfo.GetCurrentPosition(); __absoluteTouchPressedPoint = FloatPoint(GetBoundsF().x + __touchPressedPoint.x, GetBoundsF().y + __touchPressedPoint.y); @@ -976,7 +906,7 @@ _EditCopyPasteHandler::CheckReverseStatus(void) _ControlManager* pControlManager = _ControlManager::GetInstance(); _Edit* pEdit = __pCopyPasteManager->GetEdit(); _ControlOrientation orientation = pEdit->GetOrientation(); - FloatRectangle rect = GetBoundsF(); + FloatRectangle rect = GetAbsoluteBoundsF(true); FloatRectangle cursorAbsBounds = __pCopyPasteManager->GetCursorBoundsF(true); float clipboardHeight = 0.0f; FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -1017,15 +947,21 @@ _EditCopyPasteHandler::CheckReverseStatus(void) __handlerDirection = HANDLER_DIRECTION_REVERSE_2; rect.y -= (cursorAbsBounds.height + rect.height); __reverseCheck = true; + ChangeHandlerBitmap(); + rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x); + rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y); + SetBounds(rect); } else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((cursorAbsBounds.y + cursorAbsBounds.height + rect.height) <= screenSize.height)) { __handlerDirection = HANDLER_DIRECTION_NONE; rect.y += (cursorAbsBounds.height + rect.height); __reverseCheck = true; + ChangeHandlerBitmap(); + rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x); + rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y); + SetBounds(rect); } - ChangeHandlerBitmap(); - SetBounds(rect); return; } @@ -1227,6 +1163,8 @@ _EditCopyPasteHandler::CheckReverseStatus(void) __reverseCheck = true; } } + rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x); + rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y); SetBounds(rect); } @@ -1237,8 +1175,20 @@ _EditCopyPasteHandler::OnTouchReleased(const _Control& source, const _TouchInfo& CheckReverseStatus(); __isTouchPressed = false; __absoluteTouchPressedPoint = FloatPoint(0.0f, 0.0f); - DestroyCopyPasteMagnifier(); - __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteMagnifier) + { + __pCopyPasteMagnifier->SetVisibleState(false); + } + _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); + if (pCopyPastePopup && !__isTouchMoving) + { + pCopyPastePopup->SetVisibleState(true); + pCopyPastePopup->Open(); + } + else + { + __pCopyPasteManager->CreateCopyPastePopup(); + } __pCopyPasteManager->Show(); __pCopyPasteManager->SendTextBlockEvent(); Invalidate(); @@ -1274,7 +1224,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to float firstDisplayY = pTextObject->GetFirstDisplayPositionYF(); FloatRectangle absTextObjectBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF(); - FloatRectangle absEditBounds = pEdit->GetAbsoluteBoundsF(); + FloatRectangle absEditBounds = pEdit->GetAbsoluteBoundsF(true); absTextObjectBounds.x = absEditBounds.x + textObjectBounds.x; absTextObjectBounds.y = absEditBounds.y + textObjectBounds.y; absTextObjectBounds.width = textObjectBounds.width; @@ -1524,6 +1474,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to if (!__singleHandler) { __pCopyPasteManager->RefreshBlock(__leftHandler); + CheckReverseStatus(); } else { @@ -1537,6 +1488,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to } pEditPresenter->DrawText(); AdjustBounds(); + CheckReverseStatus(); } MoveCopyPasteMagnifier(); @@ -1556,104 +1508,6 @@ _EditCopyPasteHandler::OnChangeLayout(_ControlOrientation orientation) return; } -result -_EditCopyPasteHandler::OnAttachedToMainTree(void) -{ - result r = E_SUCCESS; - - if (GetOwner() == null) - { - _Edit* pEdit = __pCopyPasteManager->GetEdit(); - SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEdit."); - - _EditPresenter* pEditPresenter = pEdit->GetPresenter(); - SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEditPresenter."); - - _Form* pParentForm = pEditPresenter->GetParentForm(); - if (pParentForm) - { - SetOwner(pParentForm); - } - else - { - _Form* pForm = null; - _Frame* pCurrentFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); - if (pCurrentFrame) - { - pForm = pCurrentFrame->GetCurrentForm(); - if (pForm) - { - SetOwner(pForm); - } - else - { - SetOwner(pCurrentFrame); - } - } - } - } - - return r; -} - -result -_EditCopyPasteHandler::OnBoundsChanging(const FloatRectangle& bounds) -{ - result r = E_SUCCESS; - - __windowBounds = bounds; - - if (!GetVisibleState()) - { - return r; - } - - if (!__reverseCheck) - { - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - pEcoreEvas->SetWindowBounds(*GetRootWindow(), bounds); - result r = GetLastResult(); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - } - - return r; -} - -result -_EditCopyPasteHandler::OnBoundsChanging(const Rectangle& bounds) -{ - result r = E_SUCCESS; - //To do - return r; -} -result -_EditCopyPasteHandler::SetWindowBounds(const Rectangle& bounds) -{ - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - pEcoreEvas->SetWindowBounds(*GetRootWindow(), bounds); - result r = GetLastResult(); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - - return r; -} - -result -_EditCopyPasteHandler::SetWindowBounds(const FloatRectangle& bounds) -{ - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - pEcoreEvas->SetWindowBounds(*GetRootWindow(), bounds); - result r = GetLastResult(); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - - return r; -} - _EditCopyPasteManager::_EditCopyPasteManager(_Edit& parenEdit) : __pCopyPastePopup(null) , __contextMenuAlign(CONTEXT_MENU_CORE_ALIGN_UP) @@ -1664,17 +1518,56 @@ _EditCopyPasteManager::_EditCopyPasteManager(_Edit& parenEdit) , __needToReleaseBlock(true) , __isHandlerMoving(false) , __editVisibleArea(0.0f, 0.0f, 0.0f, 0.0f) + , __pParentWindow(null) + , __parentWindowClipFlagChanged(false) { __pEditPresenter = __pEdit->GetPresenter(); __pHandle[HANDLER_TYPE_CENTER] = null; __pHandle[HANDLER_TYPE_LEFT] = null; __pHandle[HANDLER_TYPE_RIGHT] = null; - CreateHandle(); + _Control* pControlCore = null; + + for (pControlCore = __pEdit->GetParent(); __pParentWindow == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + break; + } + + __pParentWindow = dynamic_cast<_Window*>(pControlCore); + if (__pParentWindow) + { + break; + } + } + if (!__pParentWindow) + { + __pParentWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + } + if (__pParentWindow) + { + _VisualElement* pVisualElement = __pParentWindow->GetVisualElement(); + if (pVisualElement && pVisualElement->IsClipChildrenEnabled()) + { + __parentWindowClipFlagChanged = true; + pVisualElement->SetClipChildrenEnabled(false); + } + } + CreateHandle(); } _EditCopyPasteManager::~_EditCopyPasteManager(void) { + if (__parentWindowClipFlagChanged && __pParentWindow) + { + _VisualElement* pVisualElement = __pParentWindow->GetVisualElement(); + if (pVisualElement) + { + pVisualElement->SetClipChildrenEnabled(true); + } + } + Release(); if (__pCoreCopyPasteEvent) @@ -1696,21 +1589,30 @@ _EditCopyPasteManager::Release(void) if (__pHandle[HANDLER_TYPE_CENTER]) { - __pHandle[HANDLER_TYPE_CENTER]->Close(); + if (__pParentWindow) + { + __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_CENTER]); + } delete __pHandle[HANDLER_TYPE_CENTER]; __pHandle[HANDLER_TYPE_CENTER] = null; } if (__pHandle[HANDLER_TYPE_LEFT]) { - __pHandle[HANDLER_TYPE_LEFT]->Close(); + if (__pParentWindow) + { + __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_LEFT]); + } delete __pHandle[HANDLER_TYPE_LEFT]; __pHandle[HANDLER_TYPE_LEFT] = null; } if (__pHandle[HANDLER_TYPE_RIGHT]) { - __pHandle[HANDLER_TYPE_RIGHT]->Close(); + if (__pParentWindow) + { + __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_RIGHT]); + } delete __pHandle[HANDLER_TYPE_RIGHT]; __pHandle[HANDLER_TYPE_RIGHT] = null; } @@ -1862,12 +1764,12 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) __contextMenuHeight = __contextMenuHeight + contextMenuHeight; } - editAbsRect = __pEdit->GetAbsoluteBoundsF(); + editAbsRect = __pEdit->GetAbsoluteBoundsF(true); _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton(); if (pCommandButton) { - commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(); + commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(true); commandButtonExist = true; } _Form* pForm = __pEditPresenter->GetParentForm(); @@ -1878,7 +1780,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel(); if (pPanel) { - panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(); + panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true); } __pEdit->GetKeypadBounds(keypadBounds); @@ -1923,7 +1825,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) editShowAreaAbsRect.y = panelAbsoulteBounds.y; editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y); } - __editVisibleArea = editShowAreaAbsRect; + __editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect); } FloatPoint copyPastePoint(0.0f, 0.0f); __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_UP; @@ -2202,9 +2104,16 @@ _EditCopyPasteManager::CreateHandle(void) FloatPoint leftHandler(startRect.x, startRect.y + startRect.height); FloatPoint rightHandler(endRect.x, endRect.y + endRect.height); - - __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, false, true); - __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, false, false); + if (__pParentWindow) + { + __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, __pParentWindow, false, true); + __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_LEFT]); + } + if (__pParentWindow) + { + __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, __pParentWindow, false, false); + __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_RIGHT]); + } } else { @@ -2212,7 +2121,11 @@ _EditCopyPasteManager::CreateHandle(void) __pEdit->CalculateAbsoluteCursorBounds(__pEdit->GetCursorPosition(), centerRect); FloatPoint centerHandler(centerRect.x, centerRect.y + centerRect.height); - __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, true, true); + if (__pParentWindow) + { + __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, __pParentWindow, true, true); + __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_CENTER]); + } #if EDIT_COPY_PASTE_MAGNIFIER // __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier(); #endif @@ -2231,7 +2144,6 @@ _EditCopyPasteManager::Show(void) __pHandle[HANDLER_TYPE_CENTER]->AdjustBounds(); __pHandle[HANDLER_TYPE_CENTER]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_CENTER]->Invalidate(); - __pEditPresenter->DrawText(); } if (__pHandle[HANDLER_TYPE_LEFT] && __pHandle[HANDLER_TYPE_RIGHT]) @@ -2247,6 +2159,25 @@ _EditCopyPasteManager::Show(void) if (__pCopyPastePopup) { __pCopyPastePopup->Open(); + { + _Window* pWindow = null; + _Control* pControlCore = null; + + for (pControlCore = __pEdit->GetParent(); pWindow == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + break; + } + + pWindow = dynamic_cast<_Window*>(pControlCore); + if (pWindow) + { + __pCopyPastePopup->SetOwner(pWindow); + break; + } + } + } __pCopyPastePopup->ReleaseTouchCapture(); _Control* pControl = __pCopyPastePopup->GetOwner(); @@ -2267,7 +2198,7 @@ _EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point) FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f); - FloatRectangle editAbsBounds = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle editAbsBounds = __pEdit->GetAbsoluteBoundsF(true); FloatRectangle textObjectBounds = __pEditPresenter->GetTextBoundsF(); if (!(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) @@ -2285,7 +2216,7 @@ _EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point) _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton(); if (pCommandButton) { - commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(); + commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(true); hasCommandButton = true; } _Form* pForm = __pEditPresenter->GetParentForm(); @@ -2298,7 +2229,7 @@ _EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point) _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel(); if (pPanel) { - panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(); + panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true); hasParentPanel = true; } @@ -2483,7 +2414,7 @@ _EditCopyPasteManager::OnActionPerformed(const _Control& source, int actionId) break; case COPY_PASTE_CLIPBOARD_ID: - pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit); + pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); ReleaseCopyPastePopup(); SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD); break; diff --git a/src/ui/controls/FUiCtrl_EditDate.cpp b/src/ui/controls/FUiCtrl_EditDate.cpp index 5089141..125a140 100644 --- a/src/ui/controls/FUiCtrl_EditDate.cpp +++ b/src/ui/controls/FUiCtrl_EditDate.cpp @@ -69,28 +69,25 @@ _EditDate::~_EditDate(void) delete __pEditDatePresenter; __pEditDatePresenter = null; - if (__pDateChangeEvent != null) - { - delete __pDateChangeEvent; - __pDateChangeEvent = null; - } + delete __pDateChangeEvent; + __pDateChangeEvent = null; - if (__pAccessibilityEditDateElement) + if (__pAccessibilityEditDateElement != null) { __pAccessibilityEditDateElement->Activate(false); __pAccessibilityEditDateElement = null; } - if (__pAccessibilityYearElement) + if (__pAccessibilityYearElement != null) { __pAccessibilityYearElement->Activate(false); __pAccessibilityYearElement = null; } - if (__pAccessibilityMonthElement) + if (__pAccessibilityMonthElement != null) { __pAccessibilityMonthElement->Activate(false); __pAccessibilityMonthElement = null; } - if (__pAccessibilityDayElement) + if (__pAccessibilityDayElement != null) { __pAccessibilityDayElement->Activate(false); __pAccessibilityDayElement = null; @@ -120,14 +117,14 @@ _EditDate::CreateEditDateN(const String& title) pEditDate->__pEditDatePresenter->SetCurrentDate(); - if (title.IsEmpty() != true) + if (!title.IsEmpty()) { pEditDate->__title = title; } pContainer = pEditDate->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); pEditDate->CreateAccessibilityElement(); @@ -192,7 +189,7 @@ _EditDate::RemoveDateChangeEventListener(const _IDateTimeChangeEventListener& li { result r = E_OBJ_NOT_FOUND; - if (__pDateChangeEvent) + if (__pDateChangeEvent != null) { r = __pDateChangeEvent->RemoveListener(listener); } @@ -759,19 +756,19 @@ _EditDate::OnBoundsChanged(void) __pEditDatePresenter->Initialize(); - if (__pAccessibilityEditDateElement) + if (__pAccessibilityEditDateElement != null) { __pAccessibilityEditDateElement->SetBounds(GetClientBoundsF()); } - if (__pAccessibilityYearElement) + if (__pAccessibilityYearElement != null) { __pAccessibilityYearElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR)); } - if (__pAccessibilityMonthElement) + if (__pAccessibilityMonthElement != null) { __pAccessibilityMonthElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH)); } - if (__pAccessibilityDayElement) + if (__pAccessibilityDayElement != null) { __pAccessibilityDayElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY)); } @@ -963,13 +960,18 @@ _EditDate::OnSettingChanged(String& key) bool _EditDate::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) { + return __pEditDatePresenter->OnKeyPressed(source, keyInfo); +} + +bool +_EditDate::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) +{ _KeyCode keyCode = keyInfo.GetKeyCode(); switch (keyCode) { case _KEY_ENTER: { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) @@ -979,17 +981,19 @@ _EditDate::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) break; } default: + { break; - + } } - return __pEditDatePresenter->OnKeyPressed(source, keyInfo); + return __pEditDatePresenter->OnKeyReleased(source, keyInfo); } bool _EditDate::OnFocusGained(const _Control &source) { __pEditDatePresenter->SetFocusedElement(); + Invalidate(); return true; } @@ -1071,7 +1075,7 @@ _EditDate::UpdateAccessibilityElement(void) return; } - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { string.Append(__title); string.Append(L", "); diff --git a/src/ui/controls/FUiCtrl_EditDateImpl.cpp b/src/ui/controls/FUiCtrl_EditDateImpl.cpp index 75541b7..eb10b5b 100644 --- a/src/ui/controls/FUiCtrl_EditDateImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditDateImpl.cpp @@ -48,11 +48,8 @@ _EditDateImpl::_EditDateImpl(EditDate* pPublic, _EditDate* pCore) _EditDateImpl::~_EditDateImpl(void) { - if (__pPublicDateChangeEvent) - { - delete __pPublicDateChangeEvent; - __pPublicDateChangeEvent = null; - } + delete __pPublicDateChangeEvent; + __pPublicDateChangeEvent = null; ClearLastResult(); } @@ -168,7 +165,7 @@ _EditDateImpl::RemoveDateChangeEventListener(IDateChangeEventListener& listener) result r = E_OBJ_NOT_FOUND; - if (__pPublicDateChangeEvent) + if (__pPublicDateChangeEvent != null) { r = __pPublicDateChangeEvent->RemoveListener(listener); } @@ -544,10 +541,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementStringOne)) { AccessibilityContainer* pContainer = pEditDate->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement("EditDateText"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementStringOne); } diff --git a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp index a78027b..57df0b5 100644 --- a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp @@ -112,7 +112,7 @@ _EditDatePresenter::~_EditDatePresenter(void) delete __pContentBgEffectDisabledBitmap; __pContentBgEffectDisabledBitmap = null; - if (__pContentProvider) + if (__pContentProvider != null) { __pContentProvider->Destroy(); __pContentProvider = null; @@ -184,7 +184,7 @@ _EditDatePresenter::Initialize(void) r = GetLastResult(); SysTryReturn(NID_UI_CTRL, __pFont != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { __titleBounds.x = titleLeftMargin; __titleBounds.y = (editDateHeight - (__titleBounds.height + titledateMargin + dateHeight)) / 2.0f; @@ -561,7 +561,7 @@ _EditDatePresenter::Draw(void) pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { DrawTitle(*pCanvas); } @@ -849,15 +849,15 @@ _EditDatePresenter::GetBoxIdFromPosition(const FloatPoint& point) const return displayBoxId; } - if (__dayBounds.Contains(point) == true) + if (__dayBounds.Contains(point)) { displayBoxId = DATETIME_ID_DAY; } - else if (__monthBounds.Contains(point) == true) + else if (__monthBounds.Contains(point)) { displayBoxId = DATETIME_ID_MONTH; } - else if (__yearBounds.Contains(point) == true) + else if (__yearBounds.Contains(point)) { displayBoxId = DATETIME_ID_YEAR; } @@ -993,13 +993,8 @@ _EditDatePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo { return false; } - _KeyCode keyCode = keyInfo.GetKeyCode(); - - int minValue = -1; - int maxValue = -1; - int displayValue = -1; - _DateTimeId boxId = DATETIME_ID_NONE; + _KeyCode keyCode = keyInfo.GetKeyCode(); _DateTimeUtils dateTimeUtils; int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); @@ -1055,7 +1050,6 @@ _EditDatePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo __pEditDate->Invalidate(); break; } - case _KEY_LEFT: { if (__focusId == DATETIME_ID_DAY) @@ -1106,7 +1100,39 @@ _EditDatePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo __pEditDate->Invalidate(); break; } + default: + { + return false; + } + } + return true; +} + +bool +_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__isFocused) + { + return false; + } + + if (__isAnimating) + { + VisualElement *pEditDateElement = __pEditDate->GetVisualElement(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pEditDateElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + pEditDateElement->RemoveAllAnimations(); + } + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + _DateTimeId boxId = DATETIME_ID_NONE; + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { case _KEY_ENTER: { __isEnterKeyPressed = true; @@ -1286,7 +1312,9 @@ _EditDatePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to if (__pEditDate->GetDateTimeBar()->IsActivated()) { + __pEditDate->GetDateTimeBar()->RemoveAllAnimations(); __pEditDate->GetDateTimeBar()->Close(); + __pEditDate->GetDateTimeBar()->SetVisibleState(true); __pEditDate->GetDateTimeBar()->Open(); } else @@ -1620,7 +1648,7 @@ _EditDatePresenter::OnVisualElementAnimationFinished (const VisualElementAnimati SysTryReturnVoidResult(NID_UI_CTRL, (pEditDateElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); //__pContentProvider will be destroyed in destructor when OnFormBackRequested() callback is received - if (__pContentProvider) + if (__pContentProvider != null) { pEditDateElement->DetachChild(*__pContentProvider); __pContentProvider->Destroy(); diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index dd2d8d5..f6afed7 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -163,6 +163,7 @@ _EditPresenter::_EditPresenter(void) , __pCommandButton(null) , __pInputConnection(null) , __isInputConnectionBound(false) + , __sentKeypadEvent(CORE_KEYPAD_EVENT_STATUS_CLOSE) , __pClipboard(null) , __guideText() , __titleText() @@ -292,11 +293,14 @@ _EditPresenter::OnInputConnectionPanelShowStateChanged(InputConnection& source, } else { - if (!__isClipboardExist) + if (GetLastSentKeypadEvent() != CORE_KEYPAD_EVENT_STATUS_OPEN) { - __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + if (!__isClipboardExist) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + } + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); } - __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); } } else if (showState == INPUT_PANEL_SHOW_STATE_HIDE)// 1.unbound 2.bounded&usb off -> usb on 3.Flick keypad hide @@ -352,7 +356,7 @@ _EditPresenter::OnInputConnectionPanelShowStateChanged(InputConnection& source, } else { - if (__isInputConnectionBound)// keypad drag down + if (__isInputConnectionBound)// keypad hided by back key or prediction hided by usb mode changed(on -> off) { if (!__isKeypadCommandButtonVisible && !__isClipboardExist) { @@ -398,7 +402,7 @@ _EditPresenter::OnInputConnectionPanelShowStateChanged(InputConnection& source, if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); } @@ -1085,7 +1089,7 @@ _EditPresenter::OnClipboardPopupClosed(void) AdjustParentPanelHeight(true); if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); __pParentForm->Draw(); } @@ -1147,7 +1151,7 @@ _EditPresenter::Dispose(void) if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); } @@ -1383,6 +1387,19 @@ CATCH: return false; } +void +_EditPresenter::SetSentKeypadEvent(CoreKeypadEventStatus sentKeypadEvent) +{ + __sentKeypadEvent = sentKeypadEvent; +} + +CoreKeypadEventStatus +_EditPresenter::GetLastSentKeypadEvent(void) +{ + return __sentKeypadEvent; +} + + _EditPresenter* _EditPresenter::CreateInstanceN(void) { @@ -2767,7 +2784,7 @@ _EditPresenter::IsHorizontalDirection(const _TouchInfo& touchInfo) return true; } - FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true); FloatPoint touchStartPoint = __pressedAbsolutePoint; //After internal touch core complete the float conversion, we need to change the code here FloatPoint touchPoint = touchInfo.GetCurrentPosition(); @@ -3143,14 +3160,14 @@ _EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchIn __pScrollEffect->previousX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x); __pScrollEffect->currentX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x); - __pScrollEffect->previousAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().x + touchInfo.GetCurrentPosition().x); - __pScrollEffect->currentAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().x + touchInfo.GetCurrentPosition().x); - __pScrollEffect->previousAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y); - __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y); + __pScrollEffect->previousAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x); + __pScrollEffect->currentAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x); + __pScrollEffect->previousAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); + __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); __pScrollEffect->cursorPosition = GetCursorPosition(); - FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true); __pressedPoint = touchInfo.GetCurrentPosition(); __pressedAbsolutePoint.x = __pressedPoint.x + absoluteEditRect.x; @@ -3368,6 +3385,14 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI } } } + else + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false) + { + SetCursorPosition(GetTextLength()); + } + } + FadeOutScrollBar(); if (!__isCopyPasteManagerExist && !__pFlickAnimationTimer) { @@ -3403,6 +3428,11 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI if (IsCurrentFocused() && !tokenEditting && needToCreatePopup) { + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance."); __pCopyPasteManager->AddCopyPasteEventListener(*this); @@ -3484,6 +3514,11 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI __isTouchMoving = false; __pEdit->Invalidate(); + if (GetSearchBarFlag()) + { + return false; + } + return true; } @@ -3651,7 +3686,7 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo __pScrollEffect->currentY = touchInfo.GetCurrentPosition().y; __pScrollEffect->previousAbsY = __pScrollEffect->currentAbsY; - __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y); + __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); // float moveGap = __pScrollEffect->previousY - __pScrollEffect->currentY; float moveGap = __pScrollEffect->previousAbsY - __pScrollEffect->currentAbsY; @@ -3661,7 +3696,7 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo __isMovingCursorByTouchMove = false; } - if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL)) + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL) && !(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) { if (__pScrollBar) { @@ -4095,7 +4130,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (__pParentPanel) { - panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(); + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); GetCursorBounds(true, absCursorBounds); if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) @@ -4167,7 +4202,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (__pParentPanel) { - panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(); + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); GetCursorBounds(true, absCursorBounds); if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y))) { @@ -4237,7 +4272,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (__pParentPanel) { - panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(); + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); GetCursorBounds(true, absCursorBounds); if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) @@ -4286,7 +4321,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (__pParentPanel) { - panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(); + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); GetCursorBounds(true, absCursorBounds); if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) @@ -4362,7 +4397,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } else if (_KEY_OEM_1 == keyCode) { - __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit); + __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); __clipboardConnected = true; return true; } @@ -4370,6 +4405,22 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { return true; } + else if (_KEY_TAB == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + else + { + __pEdit->Invalidate(); + } + } + return false; + } return false; } @@ -4512,6 +4563,8 @@ _EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } + ScrollPanelToCursorPosition(); + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); __pEdit->Invalidate(); @@ -4578,6 +4631,12 @@ _EditPresenter::OnLongPressGestureDetected(void) FinishTextComposition(); + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } + int cursorPos = GetCursorPositionAt(__pressedPoint); if (cursorPos != -1) { @@ -4970,6 +5029,10 @@ _EditPresenter::PasteText(void) delete pClipboardItem; ReplaceTextIntoPasswordHyphenString(); + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + } ScrollPanelToCursorPosition(); @@ -6457,7 +6520,7 @@ _EditPresenter::ChangeToUnbindState(bool removeFocus) __isInputConnectionBound = false; AdjustParentPanelHeight(true); - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0); if (!__pEdit->IsFullScreenKeypadEdit()) @@ -6652,7 +6715,7 @@ _EditPresenter::ScrollText(float distance) bool _EditPresenter::IsContained(FloatRectangle& paramRect) const { - FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); if ((paramRect.x < absBounds.x) || (paramRect.y < absBounds.y) || @@ -6675,7 +6738,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs float cursorRelativeX = 0.0f; float cursorRelativeY = 0.0f; - FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); __pTextObject->SetBounds(GetTextBoundsF()); if (index != __cursorPos) @@ -6739,7 +6802,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, Flo float cursorRelativeX = 0.0f; float cursorRelativeY = 0.0f; - FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); __pTextObject->SetBounds(GetTextBoundsF()); @@ -6796,7 +6859,7 @@ _EditPresenter::GetCursorBounds(bool isAbsRect, FloatRectangle& cursorBounds) if (isAbsRect) { - FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(); + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); cursorBounds.x += absBounds.x; cursorBounds.y += absBounds.y; } @@ -6880,7 +6943,7 @@ _EditPresenter::SetKeypadCommandButton(const FloatRectangle& bounds) { __pCommandButton->SetResizable(true); __pCommandButton->SetMovable(true); - SysLog(NID_UI_CTRL, "Command position changed!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); + SysLog(NID_UI_CTRL, "Command position changed!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); r = __pCommandButton->SetBounds(bounds); __pCommandButton->SetResizable(false); @@ -6924,7 +6987,7 @@ _EditPresenter::SetKeypadCommandButton(const FloatRectangle& bounds) __pCommandButton->SetResizable(true); __pCommandButton->SetMovable(true); - SysLog(NID_UI_CTRL, "Command created!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); + SysLog(NID_UI_CTRL, "Command created!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); r = __pCommandButton->SetBounds(bounds); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -7017,11 +7080,11 @@ _EditPresenter::SetFooterVisible(bool isVisible) { if (isVisible) { - SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!!!"); + SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!"); } else { - SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!!!"); + SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!"); } __footerVisibleChanged = true; @@ -7068,7 +7131,7 @@ _EditPresenter::ShowFullscreenKeypad(void) if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0); __pParentForm->Draw(); } @@ -7219,18 +7282,18 @@ _EditPresenter::CheckKeypadExist(_ControlOrientation orientation) { if ((absKeypadBounds.y != screenSize.height)) { - SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); return true; } else { - SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); return false; } } else { - SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); return false; } } @@ -7308,7 +7371,7 @@ _EditPresenter::ShowKeypad(bool focus) //layout rearrange if (__isUSBKeyboardConnected) { - SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!!"); + SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!"); __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists @@ -7326,9 +7389,15 @@ _EditPresenter::ShowKeypad(bool focus) SetFooterVisible(false); ChangeLayoutInternal(__pEdit->GetOrientation()); AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + + if (__pParentForm) + { + __pParentForm->Draw(); + } } else { @@ -7339,16 +7408,38 @@ _EditPresenter::ShowKeypad(bool focus) if (__isKeypadExist) { + if (__pParentForm) + { + sendKeypadEventForcely = !__pParentForm->IsDeflated(); + } + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + __pEdit->AttachScrollPanelEvent(); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + } + ChangeLayoutInternal(__pEdit->GetOrientation()); AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + } } } - - ScrollPanelToCursorPosition(); } else { - SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!!"); + SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!"); __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //call once only from here. @@ -7432,7 +7523,10 @@ _EditPresenter::ShowKeypad(bool focus) { if(!__isClipboardExist && __pParentPanel) { - __initialParentHeight = 0.0f; + if (__initialParentHeight) + { + AdjustParentPanelHeight(true); + } } ScrollPanelToCursorPosition(); } @@ -7486,7 +7580,7 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation) if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); } @@ -7683,6 +7777,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore) { if (__pParentPanel == null) { + SysLog(NID_UI_CTRL, "__pParentPanel is NULL!!!, so skip resizing scrollpanel"); return; } @@ -7734,6 +7829,10 @@ _EditPresenter::AdjustParentPanelHeight(bool restore) __pParentPanel->SetBounds(scrollPanelBounds); __pParentPanel->Invalidate(); } + else + { + SysLog(NID_UI_CTRL, "initialParentHeight is ZERO!!!, so skip scrollPanel height recovery!!!"); + } } else { @@ -7774,7 +7873,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore) GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight); } - absScrollPanelBounds = __pParentPanel->GetAbsoluteBoundsF(); + absScrollPanelBounds = __pParentPanel->GetAbsoluteBoundsF(true); displayedPanelHeight = screenSize.height - commandButtonHeight - absScrollPanelBounds.y; gapY = (absKeypadBounds.y - commandButtonHeight)- absScrollPanelBounds.y; @@ -7873,7 +7972,7 @@ _EditPresenter::HideKeypad(bool focus) if (__isUSBKeyboardConnected) { - SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!!"); + SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!"); if (__pCommandButton && __isKeypadCommandButtonVisible) { SetFooterVisible(true); @@ -7882,7 +7981,7 @@ _EditPresenter::HideKeypad(bool focus) if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); } @@ -7893,7 +7992,7 @@ _EditPresenter::HideKeypad(bool focus) } else { - SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!!"); + SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!"); if (__pCommandButton && __isKeypadCommandButtonVisible) { if (!__isKeypadExist) @@ -7902,7 +8001,7 @@ _EditPresenter::HideKeypad(bool focus) if (__pParentForm) { - SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!"); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); } __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); @@ -9609,6 +9708,9 @@ _EditPresenter::ChangePasswordToEchoCharacter(wchar_t* dspStrBuffer, wchar_t ech dspStrBuffer[bufferLength] = null; __isCursorChanged = true; + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + UpdateComponentInformation(); + return r; } @@ -10394,8 +10496,8 @@ _EditPresenter::ScrollPanelToTop(bool show) if (!__pParentPanel) return; - FloatRectangle editAbsoluteBounds = __pEdit->GetAbsoluteBoundsF(); - FloatRectangle panelAbsoluteBounds = __pParentPanel->GetAbsoluteBoundsF(); + FloatRectangle editAbsoluteBounds = __pEdit->GetAbsoluteBoundsF(true); + FloatRectangle panelAbsoluteBounds = __pParentPanel->GetAbsoluteBoundsF(true); float scrollPosition = __pParentPanel->GetScrollPosition() + (editAbsoluteBounds.y - panelAbsoluteBounds.y); __pParentPanel->SetScrollPosition(scrollPosition); @@ -10416,6 +10518,8 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show) result r = E_SUCCESS; + UpdateComponentInformation(); + FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f); r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds); @@ -10424,7 +10528,7 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show) return; } - FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(); + FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true); float panelHeight = __pParentPanel->GetBoundsF().height; float scrollPosition = __pParentPanel->GetScrollPosition(); @@ -10444,8 +10548,19 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show) if (upSideGap > 0.0f || downSideGap > 0.0f) { float gap = 0.0f; - float topTextMargin = __textObjectBounds.y; - float bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height; + float topTextMargin = 0.0f; + float bottomTextMargin = 0.0f; + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + topTextMargin = __pEdit->GetBoundsF().y; + bottomTextMargin = __pEdit->GetBoundsF().height; + } + else + { + topTextMargin = __textObjectBounds.y; + bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height; + } if (upSideGap > 0.0f) { diff --git a/src/ui/controls/FUiCtrl_EditTime.cpp b/src/ui/controls/FUiCtrl_EditTime.cpp index 3b65d5d..5dc4f68 100644 --- a/src/ui/controls/FUiCtrl_EditTime.cpp +++ b/src/ui/controls/FUiCtrl_EditTime.cpp @@ -69,28 +69,25 @@ _EditTime::~_EditTime(void) delete __pEditTimePresenter; __pEditTimePresenter = null; - if (__pTimeChangeEvent != null) - { - delete __pTimeChangeEvent; - __pTimeChangeEvent = null; - } + delete __pTimeChangeEvent; + __pTimeChangeEvent = null; - if (__pAccessibilityEditTimeElement) + if (__pAccessibilityEditTimeElement != null) { __pAccessibilityEditTimeElement->Activate(false); __pAccessibilityEditTimeElement = null; } - if (__pAccessibilityHourElement) + if (__pAccessibilityHourElement != null) { __pAccessibilityHourElement->Activate(false); __pAccessibilityHourElement = null; } - if (__pAccessibilityMinuteElement) + if (__pAccessibilityMinuteElement != null) { __pAccessibilityMinuteElement->Activate(false); __pAccessibilityMinuteElement = null; } - if (__pAccessibilityAmPmElement) + if (__pAccessibilityAmPmElement != null) { __pAccessibilityAmPmElement->Activate(false); __pAccessibilityAmPmElement = null; @@ -122,13 +119,13 @@ _EditTime::CreateEditTimeN(const String& title) pEditTime->__pEditTimePresenter->SetCurrentTime(); - if (title.IsEmpty() != true) + if (!title.IsEmpty()) { pEditTime->__title = title; } pContainer = pEditTime->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); pEditTime->CreateAccessibilityElement(); @@ -193,7 +190,7 @@ _EditTime::RemoveTimeChangeEventListener(const _IDateTimeChangeEventListener& li { result r = E_OBJ_NOT_FOUND; - if (__pTimeChangeEvent) + if (__pTimeChangeEvent != null) { r = __pTimeChangeEvent->RemoveListener(listener); } @@ -532,7 +529,7 @@ _EditTime::CreateAccessibilityElement(void) __pAccessibilityMinuteElement->SetHint(hintText); pContainer->AddElement(*__pAccessibilityMinuteElement); - if (Is24HourNotationEnabled() == false) + if (!Is24HourNotationEnabled()) { __pAccessibilityAmPmElement = new _AccessibilityElement(true); __pAccessibilityAmPmElement->SetBounds(ampmBounds); @@ -570,7 +567,7 @@ _EditTime::OnBoundsChanged(void) __pAccessibilityHourElement->SetBounds(hourBounds); __pAccessibilityMinuteElement->SetBounds(minuteBounds); - if (__pAccessibilityAmPmElement) + if (__pAccessibilityAmPmElement != null) { __pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height)); __pAccessibilityMinuteElement->SetBounds(FloatRectangle(minuteBounds.x, ampmBounds.y, minuteBounds.width, ampmBounds.height)); @@ -690,14 +687,14 @@ _EditTime::OnActionPerformed(const Ui::_Control& source, int actionId) int hour = 0; hour = actionId; - if (amEnable == false && Is24HourNotationEnabled() == false) + if (!amEnable && !Is24HourNotationEnabled()) { if (hour < DATETIME_HOUR_MAX_FOR_24NOTATION) { hour += DATETIME_HOUR_MAX_FOR_24NOTATION; } } - else if (amEnable == true && Is24HourNotationEnabled() == false) + else if (amEnable && !Is24HourNotationEnabled()) { if (hour == DATETIME_HOUR_MAX_FOR_24NOTATION) { @@ -769,6 +766,12 @@ _EditTime::OnDrawFocus(void) bool _EditTime::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) { + return __pEditTimePresenter->OnKeyPressed(source, keyInfo); +} + +bool +_EditTime::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) +{ _KeyCode keyCode = keyInfo.GetKeyCode(); switch (keyCode) @@ -784,17 +787,19 @@ _EditTime::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) break; } default: - break; - + { + break; + } } - return __pEditTimePresenter->OnKeyPressed(source, keyInfo); + return __pEditTimePresenter->OnKeyReleased(source, keyInfo); } bool _EditTime::OnFocusGained(const _Control &source) { __pEditTimePresenter->SetFocusedElement(); + Invalidate(); return true; } @@ -907,7 +912,7 @@ _EditTime::UpdateAccessibilityElement(void) SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityHourElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Hour accessibility element must not be null."); SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityMinuteElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Minute accessibility element must not be null."); - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { string.Append(__title); string.Append(L", "); @@ -917,7 +922,7 @@ _EditTime::UpdateAccessibilityElement(void) int hour = GetHour(); int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; - if (Is24HourNotationEnabled() == false && (hour > maxHour)) + if (!Is24HourNotationEnabled() && (hour > maxHour)) { hourString.Format(10, L"%02d", hour - DATETIME_HOUR_MAX_FOR_24NOTATION); } @@ -935,7 +940,7 @@ _EditTime::UpdateAccessibilityElement(void) FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); - if (Is24HourNotationEnabled() == false) + if (!Is24HourNotationEnabled()) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -965,7 +970,7 @@ _EditTime::UpdateAccessibilityElement(void) dateTimeUtils.GetAmPm(amString, AM_TYPE); dateTimeUtils.GetAmPm(pmString, PM_TYPE); - if (__pEditTimePresenter->GetAmEnabled() == true) + if (__pEditTimePresenter->GetAmEnabled()) { __pAccessibilityAmPmElement->SetLabel(amString); string.Append(amString.GetPointer()); diff --git a/src/ui/controls/FUiCtrl_EditTimeImpl.cpp b/src/ui/controls/FUiCtrl_EditTimeImpl.cpp index 5ac5fd0..de2a836 100644 --- a/src/ui/controls/FUiCtrl_EditTimeImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditTimeImpl.cpp @@ -49,11 +49,8 @@ _EditTimeImpl::_EditTimeImpl(EditTime* pPublic, _EditTime* pCore) _EditTimeImpl::~_EditTimeImpl(void) { - if (__pPublicTimeChangeEvent) - { - delete __pPublicTimeChangeEvent; - __pPublicTimeChangeEvent = null; - } + delete __pPublicTimeChangeEvent; + __pPublicTimeChangeEvent = null; ClearLastResult(); } @@ -169,7 +166,7 @@ _EditTimeImpl::RemoveTimeChangeEventListener(ITimeChangeEventListener& listener) result r = E_OBJ_NOT_FOUND; - if (__pPublicTimeChangeEvent) + if (__pPublicTimeChangeEvent != null) { r = __pPublicTimeChangeEvent->RemoveListener(listener); } @@ -429,10 +426,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementString)) { AccessibilityContainer* pContainer = pEditTime->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement(L"EditTimeText"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementString); } diff --git a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp index 9cbba23..2c12be0 100644 --- a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp @@ -245,7 +245,7 @@ _EditTimePresenter::SetTimeConversion(void) int hour = GetHour(); int minute = GetMinute(); - if (__24hours == false) + if (!__24hours) { int max = DATETIME_HOUR_MAX_FOR_24NOTATION; @@ -286,7 +286,7 @@ _EditTimePresenter::SetAmEnabled(bool amEnable) __amEnable = amEnable; int hour = GetHour(); - if (__amEnable == true) + if (__amEnable) { __ampmString = textAm; if (hour >= DATETIME_HOUR_MAX_FOR_24NOTATION) @@ -789,7 +789,7 @@ _EditTimePresenter::Draw(void) hourBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); minuteBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); - if (__24hours == false) + if (!__24hours) { ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); @@ -831,7 +831,7 @@ _EditTimePresenter::Draw(void) colonBounds.x = hourBounds.x + hourBounds.width + colonMargin; colonBounds.y = hourBounds.y + (hourBounds.height - colonBounds.height) / 2.0f; - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { r = DrawTitle(*pCanvas); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -846,7 +846,7 @@ _EditTimePresenter::Draw(void) r = DrawColon(*pCanvas, colonBounds); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (__24hours == false) + if (!__24hours) { r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1095,7 +1095,7 @@ _EditTimePresenter::GetBoxIdFromPosition(const FloatPoint& point) const FloatRectangle hoursBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle minutesBounds(0.0f, 0.0f, 0.0f, 0.0f); - if (__24hours == false) + if (!__24hours) { ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); } @@ -1108,15 +1108,15 @@ _EditTimePresenter::GetBoxIdFromPosition(const FloatPoint& point) const return displayBoxId; } - if (hoursBounds.Contains(point) == true) + if (hoursBounds.Contains(point)) { displayBoxId = DATETIME_ID_HOUR; } - else if (minutesBounds.Contains(point) == true) + else if (minutesBounds.Contains(point)) { displayBoxId = DATETIME_ID_MINUTE; } - else if (ampmBounds.Contains(point) == true) + else if (ampmBounds.Contains(point)) { displayBoxId = DATETIME_ID_AMPM; } @@ -1190,12 +1190,6 @@ _EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo } _KeyCode keyCode = keyInfo.GetKeyCode(); - int minValue = -1; - int maxValue = -1; - int displayValue = -1; - - _DateTimeId boxId = DATETIME_ID_HOUR; - switch (keyCode) { case _KEY_RIGHT: @@ -1220,7 +1214,6 @@ _EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo __pEditTime->Invalidate(); break; } - case _KEY_LEFT: { __isEnterKeyPressed = false; @@ -1240,6 +1233,39 @@ _EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo break; } + default: + { + return false; + } + } + return true; +} + +bool +_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__isFocused) + { + return false; + } + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (__isAnimating) + { + VisualElement *pEditTimeElement = __pEditTime->GetVisualElement(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pEditTimeElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + pEditTimeElement->RemoveAllAnimations(); + } + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + + _DateTimeId boxId = DATETIME_ID_HOUR; + + switch (keyCode) + { case _KEY_ENTER: { __isEnterKeyPressed = true; @@ -1350,7 +1376,7 @@ _EditTimePresenter::OnTouchPressed(const _Control& source, const _TouchInfo& tou hourBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); minuteBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); - if (__24hours == false) + if (!__24hours) { ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); } @@ -1367,7 +1393,7 @@ _EditTimePresenter::OnTouchPressed(const _Control& source, const _TouchInfo& tou { if (__pEditTime->GetDateTimeBar() != null) { - if (__24hours == false) + if (!__24hours) { if (GetHour() == 0) { @@ -1499,7 +1525,9 @@ _EditTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to if (__pEditTime->GetDateTimeBar()->IsActivated()) { + __pEditTime->GetDateTimeBar()->RemoveAllAnimations(); __pEditTime->GetDateTimeBar()->Close(); + __pEditTime->GetDateTimeBar()->SetVisibleState(true); __pEditTime->GetDateTimeBar()->Open(); } else @@ -1651,7 +1679,7 @@ _EditTimePresenter::Initialize(void) editTimeHeight = __pEditTime->GetBoundsF().height; } - if (__title.IsEmpty() == false) + if (!__title.IsEmpty()) { SetTitleBounds(); if (!__isEditTimeInitialized) diff --git a/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp index 0ae6713..b7fb99c 100644 --- a/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp +++ b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp @@ -69,7 +69,7 @@ _ExpandableEditAreaImpl::_ExpandableEditAreaImpl(ExpandableEditArea* pPublic, _E _ExpandableEditAreaImpl::~_ExpandableEditAreaImpl(void) { - if (__pExpandableEditArea) + if (__pExpandableEditArea != null) { __pExpandableEditArea->RemoveTextEventListener(*this); __pExpandableEditArea->RemoveExpandableEditAreaEventListener(*this); @@ -227,7 +227,7 @@ _ExpandableEditAreaImpl::Dispose(void) result r = E_SUCCESS; - if (__pExpandableEditArea) + if (__pExpandableEditArea != null) { delete __pExpandableEditArea; __pExpandableEditArea = null; @@ -1427,7 +1427,7 @@ _ExpandableEditAreaImpl::OnTextValueChangeCanceled(const _Control& source) void _ExpandableEditAreaImpl::OnExpandableEditAreaLineAdded(const _Control& source, int newLineCount) { - if (__pPublicExpandableEditAreaEvent) + if (__pPublicExpandableEditAreaEvent != null) { IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN( EXPANDABLE_EDITAREA_EVENT_ADDED, newLineCount); @@ -1441,7 +1441,7 @@ _ExpandableEditAreaImpl::OnExpandableEditAreaLineAdded(const _Control& source, i void _ExpandableEditAreaImpl::OnExpandableEditAreaLineRemoved(const _Control& source, int newLineCount) { - if (__pPublicExpandableEditAreaEvent) + if (__pPublicExpandableEditAreaEvent != null) { IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN( EXPANDABLE_EDITAREA_EVENT_REMOVED, newLineCount); @@ -1468,7 +1468,7 @@ _ExpandableEditAreaImpl::OnTextBlockSelected(_Control& source, int start, int en void _ExpandableEditAreaImpl::OnKeypadWillOpen(void) { - if (__pPublicKeypadEvent) + if (__pPublicKeypadEvent != null) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED); @@ -1482,7 +1482,7 @@ _ExpandableEditAreaImpl::OnKeypadWillOpen(void) void _ExpandableEditAreaImpl::OnKeypadOpened(void) { - if (__pPublicKeypadEvent) + if (__pPublicKeypadEvent != null) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN); @@ -1496,7 +1496,7 @@ _ExpandableEditAreaImpl::OnKeypadOpened(void) void _ExpandableEditAreaImpl::OnKeypadClosed(void) { - if (__pPublicKeypadEvent) + if (__pPublicKeypadEvent != null) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE); @@ -1510,7 +1510,7 @@ _ExpandableEditAreaImpl::OnKeypadClosed(void) void _ExpandableEditAreaImpl::OnKeypadBoundsChanged(void) { - if (__pPublicKeypadEvent) + if (__pPublicKeypadEvent != null) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); @@ -1524,7 +1524,7 @@ _ExpandableEditAreaImpl::OnKeypadBoundsChanged(void) void _ExpandableEditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) { - if (__pPublicLanguageEvent) + if (__pPublicLanguageEvent != null) { IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); result r = GetLastResult(); @@ -1541,7 +1541,7 @@ _ExpandableEditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCod void _ExpandableEditAreaImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) { - if (__pPublicKeypadEvent) + if (__pPublicKeypadEvent != null) { KeypadAction onKeypadAction = KEYPAD_ACTION_ENTER; switch (keypadAction) @@ -1599,7 +1599,7 @@ bool _ExpandableEditAreaImpl::ReplaceToken(const String& token, String& replacement) { bool enable = false; - if (__pTokenFilter) + if (__pTokenFilter != null) { enable = __pTokenFilter->ReplaceToken(token, replacement); } @@ -1805,7 +1805,7 @@ protected: { textSize = _LocalizedNumParser::ToDouble(elementString, "C"); _ICoordinateSystemTransformer* pTransform = GetTransformer(); - if (pTransform) + if (pTransform != null) { textSize = pTransform->Transform(textSize); } @@ -2034,10 +2034,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementString)) { AccessibilityContainer* pContainer = pExpandableEditArea->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementString); } diff --git a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp index 5e930ca..71860d8 100644 --- a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp @@ -2281,7 +2281,7 @@ _FastScrollPresenter::AddAccessibilityElement(const _AccessibilityContainer& con pAccessibilityElement->SetBounds(pIndexView->GetIndexBounds()); pAccessibilityElement->SetTrait(L"Fast scroll bar"); pAccessibilityElement->SetName(L"FastScroll"); - pAccessibilityElement->SetHint(L"double tap to enter fast scroll mode"); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_ENABLE_FAST_SCROLLING_T_TTS"); r = pAccessibilityContainer->AddElement(*pAccessibilityElement); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Add accessibility element.", GetErrorMessage(r)); } diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp index f368a09..9b1a18a 100644 --- a/src/ui/controls/FUiCtrl_Form.cpp +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -1972,24 +1972,31 @@ _Form::IsIndicatorTranslucent(void) const if (pFrame && IsAttachedToMainTree()) { FrameShowMode mode = pFrame->GetShowMode(); - if (mode == FRAME_SHOW_MODE_FULL_SCREEN) + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) { - opacity = __pIndicator->GetIndicatorOpacity(); - SysTryReturn(NID_UI_CTRL, GetLastResult() == E_SUCCESS, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) - { - transparent = true; - } - else if (opacity == _INDICATOR_OPACITY_OPAQUE) - { - transparent = false; - } - else + if (mode == FRAME_SHOW_MODE_MINIMIZED) { - transparent = true; + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + return transparent; + } } } + opacity = __pIndicator->GetIndicatorOpacity(); + SysTryReturn(NID_UI_CTRL, GetLastResult() == E_SUCCESS, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) + { + transparent = true; + } + else if (opacity == _INDICATOR_OPACITY_OPAQUE) + { + transparent = false; + } + else + { + transparent = true; + } } else { @@ -2970,7 +2977,19 @@ _Form::SetIndicatorAutoHide(bool portrait, bool landscape) if (pFrame && IsAttachedToMainTree()) { FrameShowMode mode = pFrame->GetShowMode(); - if (mode == FRAME_SHOW_MODE_FULL_SCREEN) + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + __pIndicator->SetIndicatorAutoHide(portrait, landscape); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + else if (mode == FRAME_SHOW_MODE_FULL_SCREEN) { __pIndicator->SetIndicatorAutoHide(portrait, landscape); r = GetLastResult(); diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp index 28f28e1..4e6c69c 100755 --- a/src/ui/controls/FUiCtrl_FormImpl.cpp +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -402,7 +402,7 @@ _FormImpl::SetFormStyle(unsigned long formStyle) } else { - if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) { indicatorBounds.height = 0.0f; } @@ -1616,6 +1616,12 @@ _FormImpl::OnAttachedToMainTree(void) if (__pOriAgent) { + OrientationStatus status = __pOriAgent->GetStatus(); + _ControlOrientation coreOrientation = + (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ? + _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + + OnChangeLayout(coreOrientation); __pOriAgent->RequestOrientationEvent(); } diff --git a/src/ui/controls/FUiCtrl_Frame.cpp b/src/ui/controls/FUiCtrl_Frame.cpp index 823ae37..e385bd4 100755 --- a/src/ui/controls/FUiCtrl_Frame.cpp +++ b/src/ui/controls/FUiCtrl_Frame.cpp @@ -176,11 +176,6 @@ _Frame::OnActivated(void) { SysLog(NID_UI, "activated(%d)", __activated); - if (!__activated) - { - return; - } - _Window::OnActivated(); _Form* pCurrentForm = GetCurrentForm(); @@ -191,6 +186,7 @@ _Frame::OnActivated(void) pCurrentForm->AddIndicatorObject(); + SetFocusWindowActivationChecked(true); _Control* pFocusControl = pCurrentForm->GetFocusControl(); if (pFocusControl) { @@ -200,6 +196,7 @@ _Frame::OnActivated(void) { pCurrentForm->SetFocused(); } + SetFocusWindowActivationChecked(false); _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); } diff --git a/src/ui/controls/FUiCtrl_FrameImpl.cpp b/src/ui/controls/FUiCtrl_FrameImpl.cpp index 5c0b378..6a49dca 100755 --- a/src/ui/controls/FUiCtrl_FrameImpl.cpp +++ b/src/ui/controls/FUiCtrl_FrameImpl.cpp @@ -248,7 +248,10 @@ _FormImpl* _FrameImpl::GetCurrentForm(void) const { _Control* pFormCore = GetCore().GetCurrentForm(); - SysTryReturn(NID_UI_CTRL, pFormCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + if (!pFormCore) + { + return null; + } _FormImpl* pFormImpl = static_cast<_FormImpl*>(pFormCore->GetUserData()); diff --git a/src/ui/controls/FUiCtrl_GroupContainer.cpp b/src/ui/controls/FUiCtrl_GroupContainer.cpp index ba7635a..aa689d8 100644 --- a/src/ui/controls/FUiCtrl_GroupContainer.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainer.cpp @@ -439,11 +439,11 @@ _GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser) if (__pCellsArray[i][columnIndex].isMerged) { - if (__pCellsArray[i][columnIndex].isParent == false) + if (!__pCellsArray[i][columnIndex].isParent) { __pCellsArray[i][columnIndex].cellBounds.width = width; } - if (__pCellsArray[row][column].isBoundsModified == false) + if (!__pCellsArray[row][column].isBoundsModified) { __pCellsArray[row][column].cellBounds.width -= (__pCellsArray[i][columnIndex].actualSize.width - width); __pCellsArray[row][column].isBoundsModified = true; @@ -461,10 +461,10 @@ _GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser) FloatRectangle previousCellBounds = __pCellsArray[i][j + 1].cellBounds; __pCellsArray[i][j + 1].cellBounds.x = __pCellsArray[i][j].cellBounds.x + __pCellsArray[i][j].actualSize.width + __lineWidth; - if (HasChild(i, j + 1) == true) + if (HasChild(i, j + 1)) { _Control* pControl = GetControlCoreAt(i, j + 1); - if (pControl) + if (pControl != null) { FloatPoint controlPosition = pControl->GetPositionF(); float updatedPosition = controlPosition.x - previousCellBounds.x; @@ -521,11 +521,11 @@ _GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser) if (__pCellsArray[rowIndex][j].isMerged) { - if (__pCellsArray[rowIndex][j].isParent == false) + if (!__pCellsArray[rowIndex][j].isParent) { __pCellsArray[rowIndex][j].cellBounds.height = height; } - if (__pCellsArray[row][column].isBoundsModified == false) + if (!__pCellsArray[row][column].isBoundsModified) { __pCellsArray[row][column].cellBounds.height -= (__pCellsArray[rowIndex][j].actualSize.height - height); __pCellsArray[row][column].isBoundsModified = true; @@ -543,10 +543,10 @@ _GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser) FloatRectangle previousCellBounds = __pCellsArray[i + 1][j].cellBounds; __pCellsArray[i + 1][j].cellBounds.y = __pCellsArray[i][j].cellBounds.y + __pCellsArray[i][j].actualSize.height + __lineWidth; - if (HasChild(i + 1, j) == true) + if (HasChild(i + 1, j)) { _Control* pControl = GetControlCoreAt(i + 1, j); - if (pControl) + if (pControl != null) { FloatPoint controlPosition = pControl->GetPositionF(); float updatedPosition = controlPosition.y - previousCellBounds.y; @@ -620,7 +620,7 @@ _GroupContainer::Merge(int rowStartIndex, int columnStartIndex, int rowCount, in //Allow merge if Control is added in parent cell if (i != rowStartIndex || j != columnStartIndex) { - if (HasChild(i, j) == true) + if (HasChild(i, j)) { return E_INVALID_ARG; } @@ -727,14 +727,14 @@ _GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, floa __pCellsArray[rowIndex][columnIndex].cellMargin.top = topMargin; __pCellsArray[rowIndex][columnIndex].cellMargin.bottom = bottomMargin; - if (HasChild(rowIndex, columnIndex) == true) + if (HasChild(rowIndex, columnIndex)) { FloatRectangle controlRect(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle rect = GetBoundsAt(rowIndex, columnIndex); _Control* pControl = GetControlCoreAt(rowIndex, columnIndex); - if (pControl) + if (pControl != null) { controlRect = pControl->GetBoundsF(); @@ -744,7 +744,7 @@ _GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, floa rect.x = rect.x + leftMargin + localCellControlRect.x; rect.y = rect.y + topMargin + localCellControlRect.y; - if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled == true) + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) { controlRect.width = rect.width - (leftMargin + localCellControlRect.x + rightMargin); controlRect.height = rect.height - (topMargin + localCellControlRect.y + bottomMargin); @@ -907,17 +907,17 @@ _GroupContainer::ResizeControl(int rowIndex, int columnIndex) SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); - if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled == true) + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) { - if (HasChild(rowIndex, columnIndex) == true) + if (HasChild(rowIndex, columnIndex)) { FloatRectangle rect = GetBoundsAt(rowIndex, columnIndex); _Control* pControl = GetControlCoreAt(rowIndex, columnIndex); - if (pControl) + if (pControl != null) { FloatRectangle controlRect = pControl->GetBoundsF(); - if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled == true) + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) { rect.width = rect.width - (controlRect.x - rect.x + __pCellsArray[rowIndex][columnIndex].cellMargin.right); rect.height = rect.height - (controlRect.y - rect.y + __pCellsArray[rowIndex][columnIndex].cellMargin.bottom); @@ -985,12 +985,12 @@ _GroupContainer::GetControlCoreAt(int rowIndex, int columnIndex) _Control* pControl = null; _ControlManager *pControlManager = null; pControlManager = _ControlManager::GetInstance(); - if (pControlManager) + if (pControlManager != null) { pControl = pControlManager->GetObject(__pCellsArray[rowIndex][columnIndex].controlHandle); } - if (!pControl) + if (pControl == null) { SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Failed to get control at specified index."); } @@ -1159,7 +1159,7 @@ _GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRecta { for (int columnIndex = 0; columnIndex < __columnCount; columnIndex++) { - if (__pStretchableColumnIndex[columnIndex] == true && columnWidthIndex != columnIndex) + if (__pStretchableColumnIndex[columnIndex] && columnWidthIndex != columnIndex) { if (width > 0) { @@ -1183,7 +1183,7 @@ _GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRecta for (int columnIndex = 0; columnIndex < __columnCount; columnIndex++) { - if (__pStretchableColumnIndex[columnIndex] == true && columnWidthIndex != columnIndex) + if (__pStretchableColumnIndex[columnIndex] && columnWidthIndex != columnIndex) { columnWidth[columnIndex] = columnWidth[columnIndex] + __pCellsArray[0][columnIndex].actualSize.width + stretchableWidth; @@ -1225,7 +1225,7 @@ _GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRecta { for (int rowIndex = 0; rowIndex < __rowCount; rowIndex++) { - if (__pStretchableRowIndex[rowIndex] == true && rowIndex != rowHeightIndex) + if (__pStretchableRowIndex[rowIndex] && rowIndex != rowHeightIndex) { if (height > 0) { @@ -1249,7 +1249,7 @@ _GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRecta for (int rowIndex = 0; rowIndex < __rowCount; rowIndex++) { - if (__pStretchableRowIndex[rowIndex] == true && rowIndex != rowHeightIndex) + if (__pStretchableRowIndex[rowIndex] && rowIndex != rowHeightIndex) { rowHeight[rowIndex] = rowHeight[rowIndex] + __pCellsArray[rowIndex][0].actualSize.height + stretchableHeight; diff --git a/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp index 186928f..06264c5 100644 --- a/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp @@ -414,7 +414,7 @@ protected: _GroupContainerRegister::_GroupContainerRegister(void) { _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); - if (pUiBuilderControlTableManager) + if (pUiBuilderControlTableManager != null) { pUiBuilderControlTableManager->RegisterControl(L"GroupContainer", _GroupContainerMaker::GetInstance); } @@ -423,7 +423,7 @@ _GroupContainerRegister::_GroupContainerRegister(void) _GroupContainerRegister::~_GroupContainerRegister(void) { _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); - if (pUiBuilderControlTableManager) + if (pUiBuilderControlTableManager != null) { pUiBuilderControlTableManager->UnregisterControl(L"GroupContainer"); } diff --git a/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp index e70d703..c7dfe51 100644 --- a/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp @@ -78,7 +78,7 @@ _GroupContainerPresenter::LoadResourceBitmaps(void) r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::SYSTEM_CONTROL_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pSystemChildBgBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pSystemChildColorReplacedBgBitmap) + if (__pSystemChildColorReplacedBgBitmap != null) { delete __pSystemChildColorReplacedBgBitmap; __pSystemChildColorReplacedBgBitmap = null; @@ -97,7 +97,7 @@ _GroupContainerPresenter::LoadResourceBitmaps(void) r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pGroupContainerBgBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pGroupContainerColorReplacedBgBitmap) + if (__pGroupContainerColorReplacedBgBitmap != null) { delete __pGroupContainerColorReplacedBgBitmap; __pGroupContainerColorReplacedBgBitmap = null; @@ -142,6 +142,7 @@ _GroupContainerPresenter::Draw(void) int rows = __pGroupContainer->GetRowCount(); int columns = __pGroupContainer->GetColumnCount(); float lineWidth = __pGroupContainer->GetLineWidth(); + float verticalDividerHeight = 0.0f; if (__parentBgColor != GetParentColor() || __bgColor != __pGroupContainer->GetBackgroundColor()) { @@ -199,7 +200,7 @@ _GroupContainerPresenter::Draw(void) rect = __pGroupContainer->GetBoundsAt(rowIndex , columnIndex); //Draw Cell Left and Top Lines for all cells - if ((__pGroupContainer->IsMerged(rowIndex, columnIndex) == false) || (__pGroupContainer->IsParent(rowIndex, columnIndex) == true)) + if ((!__pGroupContainer->IsMerged(rowIndex, columnIndex)) || (__pGroupContainer->IsParent(rowIndex, columnIndex))) { //Cells's Top Line if (rowIndex != 0) @@ -209,7 +210,8 @@ _GroupContainerPresenter::Draw(void) //Cell's Left Line if (columnIndex != 0) { - pCanvas->DrawLine(FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y), FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y + rect.height)); + verticalDividerHeight = rect.height / 2; + pCanvas->DrawLine(FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y + (verticalDividerHeight / 2)), FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y + (verticalDividerHeight / 2) + verticalDividerHeight)); } } } @@ -309,7 +311,7 @@ Color _GroupContainerPresenter::GetParentColor(void) const { _Control* pParentControl = __pGroupContainer->GetParent(); - if (!pParentControl) + if (pParentControl == null) { return Color(0, 0, 0, 0); } @@ -320,7 +322,7 @@ _GroupContainerPresenter::GetParentColor(void) const while (pForm == null && parentBgColor.GetAlpha() == 0x00) { pParentControl = pParentControl->GetParent(); - if (!pParentControl) + if (pParentControl == null) { break; } diff --git a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp index d5a5230..78bfde5 100644 --- a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp @@ -1935,6 +1935,10 @@ _GroupedListViewImpl::OnBoundsChanged(void) if (__isOrientationChanged) { + if (GetCore().IsTableViewFocused()) + { + GetCore().RestoreFocus(true); + } __isOrientationChanged = false; UpdateList(); } diff --git a/src/ui/controls/FUiCtrl_HeaderImpl.cpp b/src/ui/controls/FUiCtrl_HeaderImpl.cpp index dfa1a10..f8159b9 100644 --- a/src/ui/controls/FUiCtrl_HeaderImpl.cpp +++ b/src/ui/controls/FUiCtrl_HeaderImpl.cpp @@ -515,7 +515,7 @@ _HeaderImpl::SetBackgroundBitmap(const Bitmap* pBitmap) result _HeaderImpl::SetButton(ButtonPosition position, const ButtonItem& button) { - SysTryReturnResult(NID_UI_CTRL, (!(__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE)), E_INVALID_OPERATION, + SysTryReturnResult(NID_UI_CTRL, (!(__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE)), E_INVALID_OPERATION, "[E_INVALID_OPERATION] This operation is not supported."); SysTryReturnResult(NID_UI_CTRL, (button.GetActionId() >= HEADER_ACTION_ID_MIN && button.GetActionId() <= HEADER_ACTION_ID_MAX), @@ -523,8 +523,11 @@ _HeaderImpl::SetButton(ButtonPosition position, const ButtonItem& button) int count = GetItemCount(); - SysTryReturnResult(NID_UI_CTRL, (count <= HEADER_MAX_ITEM_COUNT_WITH_BUTTON), E_SYSTEM, - "[E_SYSTEM] If the item count is larger then 4, no button can be set."); + if (HEADER_STYLE_TAB_WITH_TITLE != __style) + { + SysTryReturnResult(NID_UI_CTRL, (count <= HEADER_MAX_ITEM_COUNT_WITH_BUTTON), E_SYSTEM, + "[E_SYSTEM] If the item count is larger then 4, no button can be set."); + } SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_INVALID_ARG, "[E_INVALID_ARG] The position is invalid."); @@ -1013,7 +1016,7 @@ _HeaderImpl::CheckItemValidate(const HeaderItem& item) goto CATCH; } - if ((count >= HEADER_MAX_ITEM_COUNT_WITH_BUTTON) && + if ((HEADER_STYLE_TAB_WITH_TITLE != __style) && (count >= HEADER_MAX_ITEM_COUNT_WITH_BUTTON) && (true == IsButtonSet(BUTTON_POSITION_LEFT) || true == IsButtonSet(BUTTON_POSITION_RIGHT))) { SysLogException(NID_UI_CTRL, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The number of items with button have exceeded the maximum limit."); diff --git a/src/ui/controls/FUiCtrl_IconListPresenter.cpp b/src/ui/controls/FUiCtrl_IconListPresenter.cpp index 91bea1a..1437e3c 100644 --- a/src/ui/controls/FUiCtrl_IconListPresenter.cpp +++ b/src/ui/controls/FUiCtrl_IconListPresenter.cpp @@ -5326,7 +5326,7 @@ _IconListPresenter::SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo) for (int bottomIndex = __firstDrawnIndex + GetItemCountPerAxis() - 1; bottomIndex <= lastItemIndex; bottomIndex += GetItemCountPerAxis()) { - if (bottomIndex == __highlightedIndex) + if (bottomIndex == __highlightedIndex || __highlightedIndex == lastItemIndex) { isFocusUiBottom = true; break; @@ -5335,6 +5335,8 @@ _IconListPresenter::SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo) if ((keyInfo.GetKeyCode() == _KEY_UP && isFocusUiTop) || (keyInfo.GetKeyCode() == _KEY_DOWN && isFocusUiBottom)) { + RedrawItem(__highlightedIndex); + __highlightedIndex = INVALID_INDEX; return false; } else if ((keyInfo.GetKeyCode() == _KEY_LEFT && (__highlightedIndex >= 0 && __highlightedIndex <= GetItemCountPerAxis() - 1)) || (keyInfo.GetKeyCode() == _KEY_RIGHT && (__highlightedIndex >= lastLineTopIndex && __highlightedIndex <= lastItemIndex))) diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp index 6a9283f..a1ad07f 100644 --- a/src/ui/controls/FUiCtrl_Indicator.cpp +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -354,22 +354,6 @@ _Indicator::AddIndicatorObject(_Control* pControl, _Window* pWindow) ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle); ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle); - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - int rotation = 0; - if (pEcoreEvas && __pWindow) - { - rotation = pEcoreEvas->GetWindowRotation(*__pWindow); - } - - if(rotation == 0 || rotation == 180) - { - ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); - } - else - { - ecore_evas_msg_parent_send(pLandscapeEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); - } - return r; } @@ -469,27 +453,6 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE); } } - - _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - int rotation = 0; - Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); - SysTryReturnVoidResult(NID_UI_CTRL, pPortraitEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); - Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); - SysTryReturnVoidResult(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); - - if (pEcoreEvas && __pWindow) - { - rotation = pEcoreEvas->GetWindowRotation(*__pWindow); - } - - if(rotation == 0 || rotation == 180) - { - ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); - } - else - { - ecore_evas_msg_parent_send(pLandscapeEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); - } } result @@ -647,25 +610,6 @@ _Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *dat } } } - - if (msgId == MSG_ID_INDICATOR_TYPE) - { - _IndicatorTypeMode *pIndicatorTypeMode = (_IndicatorTypeMode*)(data); - - _Window* pWindow = _ControlManager::GetInstance()->_ControlManager::GetTopVisibleWindow(); - SysTryReturnVoidResult(NID_UI_CTRL, pWindow, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree."); - - Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle(); - - if (*pIndicatorTypeMode == _INDICATOR_TYPE_1) - { - ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); - } - else if (*pIndicatorTypeMode == _INDICATOR_TYPE_2) - { - ecore_x_e_illume_indicator_type_set (win, ECORE_X_ILLUME_INDICATOR_TYPE_2); - } - } } } diff --git a/src/ui/controls/FUiCtrl_IndicatorManager.cpp b/src/ui/controls/FUiCtrl_IndicatorManager.cpp index ff7ae83..82b9385 100644 --- a/src/ui/controls/FUiCtrl_IndicatorManager.cpp +++ b/src/ui/controls/FUiCtrl_IndicatorManager.cpp @@ -287,6 +287,26 @@ _IndicatorManager::DeleteWindow(_Window* pWindow) r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS && pIndicatorComponentArray, r, r, "[%s] Propagating.", GetErrorMessage(r)); + if (pIndicatorComponentArray[0].pPortraitEvasObject) + { + evas_object_del(pIndicatorComponentArray[0].pPortraitEvasObject); + } + + if (pIndicatorComponentArray[0].pLandscapeEvasObject) + { + evas_object_del(pIndicatorComponentArray[0].pLandscapeEvasObject); + } + + if (pIndicatorComponentArray[1].pPortraitEvasObject) + { + evas_object_del(pIndicatorComponentArray[1].pPortraitEvasObject); + } + + if (pIndicatorComponentArray[1].pLandscapeEvasObject) + { + evas_object_del(pIndicatorComponentArray[1].pLandscapeEvasObject); + } + delete pIndicatorComponentArray[0].pPortraitSurface; delete pIndicatorComponentArray[0].pLandscapeSurface; delete pIndicatorComponentArray[1].pPortraitSurface; diff --git a/src/ui/controls/FUiCtrl_Keypad.cpp b/src/ui/controls/FUiCtrl_Keypad.cpp index 4eccb6d..cba15f6 100755 --- a/src/ui/controls/FUiCtrl_Keypad.cpp +++ b/src/ui/controls/FUiCtrl_Keypad.cpp @@ -425,6 +425,9 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) bool isKeypadExist = false; bool isClipboardExist = false; + FloatDimension indicatorDimension(0.0f, 0.0f); + FloatDimension keypadDimsnsion(0.0f, 0.0f); + if (__isInitialized || __pChildEdit->IsUsbKeyboardConnected()) { isKeypadExist = __pChildEdit->CheckKeypadExist(orientation); @@ -447,22 +450,27 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorHeight); } + indicatorDimension.height = indicatorHeight; + SetResizable(true); SetMovable(true); - r = SetBounds(bounds); + r = SetBounds(CoordinateSystem::AlignToDevice(bounds)); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); SetResizable(false); SetMovable(false); - FloatRectangle editRect = bounds; + FloatRectangle editRect = CoordinateSystem::AlignToDevice(bounds); - editRect.y = indicatorHeight; + editRect.y = CoordinateSystem::AlignToDevice(indicatorDimension).height; float footerHeight = 0.0f; + FloatDimension footerDimension(0.0f, 0.0f); + GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, footerHeight); + footerDimension.height = footerHeight; - editRect.height -= indicatorHeight; - editRect.height -= footerHeight; + editRect.height -= CoordinateSystem::AlignToDevice(indicatorDimension).height; + editRect.height -= CoordinateSystem::AlignToDevice(footerDimension).height; if ((isClipboardExist && layoutChangeState == LAYOUT_CHANGE_ROTATE)) { @@ -485,12 +493,14 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) if (clipboardHeight > keypadRect.height) { - editRect.height -= clipboardHeight; + keypadDimsnsion.height = clipboardHeight; } else { - editRect.height -= keypadRect.height; + keypadDimsnsion.height = keypadRect.height; } + + editRect.height -= CoordinateSystem::AlignToDevice(keypadDimsnsion).height; } } @@ -499,9 +509,9 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) FloatRectangle footerBounds(0.0f, 0.0f, 0.0f, 0.0f); - footerBounds.y = editRect.height + indicatorHeight; + footerBounds.y = editRect.height + CoordinateSystem::AlignToDevice(indicatorDimension).height; footerBounds.width = editRect.width; - footerBounds.height = footerHeight; + footerBounds.height = CoordinateSystem::AlignToDevice(footerDimension).height; __pFooter->SetResizable(true); __pFooter->SetMovable(true); diff --git a/src/ui/controls/FUiCtrl_Label.cpp b/src/ui/controls/FUiCtrl_Label.cpp index ec2b46d..e8ba7f9 100644 --- a/src/ui/controls/FUiCtrl_Label.cpp +++ b/src/ui/controls/FUiCtrl_Label.cpp @@ -586,6 +586,7 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const TextObject* pTextObject = __pLabelPresenter->GetTextObject(); FloatRectangle previousRect = pTextObject->GetBoundsF(); + TextObjectActionType previousActionType = pTextObject->GetAction(); dimension.width = GetBoundsF().width - __leftMargin * 2; dimension.height = GetBoundsF().height - __topMargin * 2; @@ -627,6 +628,7 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const } pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); dimension.width += __leftMargin * 2; dimension.height += __topMargin * 2; diff --git a/src/ui/controls/FUiCtrl_ListViewImpl.cpp b/src/ui/controls/FUiCtrl_ListViewImpl.cpp index 93f411e..b9dc6cb 100644 --- a/src/ui/controls/FUiCtrl_ListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListViewImpl.cpp @@ -1795,6 +1795,10 @@ _ListViewImpl::OnBoundsChanged(void) if (__isOrientationChanged) { __isOrientationChanged = false; + if (GetCore().IsTableViewFocused()) + { + GetCore().RestoreFocus(true); + } UpdateList(); } } diff --git a/src/ui/controls/FUiCtrl_ListViewItem.cpp b/src/ui/controls/FUiCtrl_ListViewItem.cpp index 3ae7fca..1c49e9b 100644 --- a/src/ui/controls/FUiCtrl_ListViewItem.cpp +++ b/src/ui/controls/FUiCtrl_ListViewItem.cpp @@ -1027,7 +1027,6 @@ _ListViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinf return false; } - ClearLastStateChangedInfo(); StopTextSlideTimer(); FloatPoint pos = touchinfo.GetCurrentPosition(); @@ -1064,10 +1063,10 @@ _ListViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinf __touchPressed = true; __touchEnabled = true; - SetLastStateChangedInfo(); - _TableViewItem::OnTouchPressed(source, touchinfo); + SetLastStateChangedInfo(); + // for do not occur annex selection. if (__selectionEabled) { @@ -2068,7 +2067,7 @@ _ListViewItem::SetAccessibilityElementValue(void) } else { - __pAccessibilityElement->SetValue(L"Unselected"); + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); } break; diff --git a/src/ui/controls/FUiCtrl_MessageBox.cpp b/src/ui/controls/FUiCtrl_MessageBox.cpp index ab46837..1b93ae9 100644 --- a/src/ui/controls/FUiCtrl_MessageBox.cpp +++ b/src/ui/controls/FUiCtrl_MessageBox.cpp @@ -119,6 +119,7 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle Color titleBgColor(0x00000000); Color buttonBgColor(0x00000000); _AccessibilityContainer* pContainer = null; + SetFocusNavigateEnabled(false); _titleText = title; _titleState = !(title.Equals(L"", false)); @@ -515,13 +516,6 @@ _MessageBox::OnSettingChanged(String& key) } } -void -_MessageBox::OnDrawFocus(void) -{ - __pMsgboxPresenter->OnDrawFocus(); - return; -} - bool _MessageBox::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) { diff --git a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp index f79c10e..625e76f 100644 --- a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp +++ b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp @@ -164,7 +164,6 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation) __textBounds.width = defaultWidth - GetLeftRightLabelMargin(); __titleBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin); - __buttonBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin); // TitleText if (__pMessageBox->HasTitle() == true) @@ -199,6 +198,8 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation) __pLabel->SetBounds(FloatRectangle(0.0f, 0.0f, __textBounds.width, labelHeight)); } + __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, defaultWidth- (transLeftMargin + transRightMargin), bottomHeight); + for (int i = 0; i < __buttonNum; i++) { r = __pButtons[i]->SetBounds(CalculateButtonPositionAndSize(i)); @@ -654,7 +655,7 @@ _MessageBoxPresenter::GetButtonString(void) case MSGBOX_STYLE_OK: __buttonNum = 1; - GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]); + GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[0]); break; case MSGBOX_STYLE_CANCEL: @@ -664,7 +665,7 @@ _MessageBoxPresenter::GetButtonString(void) case MSGBOX_STYLE_OKCANCEL: __buttonNum = 2; - GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[1]); + GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[1]); GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); break; @@ -1245,7 +1246,7 @@ _MessageBoxPresenter::InitializeAccessibilityElement(void) if (pLabelElement != null) { pLabelElement->SetName(L"MessageBoxText"); - pLabelElement->SetTrait(L"Popup body text"); + pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK"); } // Add Container @@ -1365,22 +1366,6 @@ _MessageBoxPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& return true; } -void -_MessageBoxPresenter::OnDrawFocus(void) -{ - _ControlImpl* pImpl = null; - _Button* pButtonCore = null; - - if (__pButtons[0] != 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) @@ -1473,41 +1458,22 @@ _MessageBoxPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyI if ((__pButtonListener->GetBeginModal() == true) || (__beginModal == true)) { - if (__pMessageBox->GetTimeout() != 0) - { - switch (style) - { - case MSGBOX_STYLE_NONE: - // fall through - case MSGBOX_STYLE_OK: - // fall through - case MSGBOX_STYLE_YESNO: - // fall through - case MSGBOX_STYLE_ABORTRETRYIGNORE: - _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CLOSE, false); - __beginModal = false; - - break; - case MSGBOX_STYLE_CANCEL: - // fall through - case MSGBOX_STYLE_OKCANCEL: - // fall through - case MSGBOX_STYLE_YESNOCANCEL: - // fall through - case MSGBOX_STYLE_CANCELTRYCONTINUE: - // fall through - case MSGBOX_STYLE_RETRYCANCEL: - _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false); - __beginModal = false; - break; - } - - } - else if (style == MSGBOX_STYLE_CANCEL || style == MSGBOX_STYLE_OKCANCEL || style == MSGBOX_STYLE_YESNOCANCEL - || style == MSGBOX_STYLE_CANCELTRYCONTINUE || style == MSGBOX_STYLE_RETRYCANCEL) + switch (style) { + case MSGBOX_STYLE_CANCEL: + // fall through + case MSGBOX_STYLE_OKCANCEL: + // fall through + case MSGBOX_STYLE_YESNOCANCEL: + // fall through + case MSGBOX_STYLE_CANCELTRYCONTINUE: + // fall through + case MSGBOX_STYLE_RETRYCANCEL: _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false); __beginModal = false; + break; + default: + break; } } return true; diff --git a/src/ui/controls/FUiCtrl_OptionMenu.cpp b/src/ui/controls/FUiCtrl_OptionMenu.cpp index 342e7ac..3bc9302 100644 --- a/src/ui/controls/FUiCtrl_OptionMenu.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenu.cpp @@ -96,7 +96,7 @@ _OptionMenu::~_OptionMenu(void) __pCurrentFrame = null; - if (__pScrollPanel) + if (__pScrollPanel != null) { __pScrollPanel->DetachAllChildren(); DetachChild(*__pScrollPanel); @@ -114,23 +114,14 @@ _OptionMenu::~_OptionMenu(void) delete __pOptionMenuPresenter; __pOptionMenuPresenter = null; - if (__pBackgroundNormalBitmap != null) - { - delete __pBackgroundNormalBitmap; - __pBackgroundNormalBitmap = null; - } + delete __pBackgroundNormalBitmap; + __pBackgroundNormalBitmap = null; - if (__pBackgroundEffectBitmap != null) - { - delete __pBackgroundEffectBitmap; - __pBackgroundEffectBitmap = null; - } + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; - if (__pActionEvent) - { - delete __pActionEvent; - __pActionEvent = null; - } + delete __pActionEvent; + __pActionEvent = null; __actionId.RemoveAll(); @@ -495,6 +486,8 @@ _OptionMenu::OnAttachedToMainTree(void) r = __pOptionMenuPresenter->CalculateWindowRect(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); + SetAllAccessibilityElement(); _VisualElement* pVisualElement = GetVisualElement(); @@ -524,7 +517,7 @@ _OptionMenu::OnDetachingFromMainTree(void) { ReleaseTouchCapture(); - if (__pCurrentFrame) + if (__pCurrentFrame != null) { __pCurrentFrame->RemoveFrameEventListener(*this); } @@ -572,7 +565,7 @@ _OptionMenu::OnActivated(void) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (pTouchManager) + if (pTouchManager != null) { pTouchManager->SetTouchCanceled(null); } @@ -1424,7 +1417,7 @@ _OptionMenu::OnChangeLayout(_ControlRotation rotation) GET_SHAPE_CONFIG(OPTIONMENU::MAX_VISIBLE_ITEM_COUNT, __layout, __showItemCount); } - if (__isAttachedToMainTree == true) + if (__isAttachedToMainTree) { if(__rotation != rotation) { @@ -1547,7 +1540,7 @@ void _OptionMenu::RemoveAllAccessibilityElement(void) { _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); - if (pAccessibilityContainer && pAccessibilityContainer->IsActivated()) + if (pAccessibilityContainer != null && pAccessibilityContainer->IsActivated()) { pAccessibilityContainer->RemoveAllElement(); } diff --git a/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp index 042ef47..dcf61f5 100755 --- a/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp @@ -87,11 +87,8 @@ CATCH: _OptionMenuImpl::~_OptionMenuImpl(void) { - if (__pPublicActionEvent != null) - { - delete __pPublicActionEvent; - __pPublicActionEvent = null; - } + delete __pPublicActionEvent; + __pPublicActionEvent = null; } result diff --git a/src/ui/controls/FUiCtrl_OptionMenuItem.cpp b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp index 37f0d21..08f69e3 100755 --- a/src/ui/controls/FUiCtrl_OptionMenuItem.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp @@ -111,23 +111,14 @@ _OptionMenuItem::_OptionMenuItem(void) _OptionMenuItem::~_OptionMenuItem(void) { - if (__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL] != null) - { - delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL]; - __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; - } + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; - if (__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED] != null) - { - delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED]; - __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; - } + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; - if (__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] != null) - { - delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED]; - __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; - } + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; if (__pUpperDividerLineLabel != null) { @@ -188,7 +179,7 @@ _OptionMenuItem::~_OptionMenuItem(void) } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->RemoveAllElement(); } @@ -294,7 +285,7 @@ void _OptionMenuItem::InitializeAccessibilityElement(void) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); @@ -494,10 +485,10 @@ void _OptionMenuItem::OnBoundsChanged(void) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { _AccessibilityElement* pElement = pContainer->GetChildElement(0); - if (pElement) + if (pElement != null) { pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); } @@ -526,7 +517,7 @@ _OptionMenuItem::DrawItem(void) DrawItemBackground(); DrawItemBitmap(); - if (HasSubItem() == true) + if (HasSubItem()) { DrawArrow(); } @@ -622,7 +613,7 @@ _OptionMenuItem::DrawArrow(void) AttachChild(*__pArrowLabel); _AccessibilityContainer* pContainer = __pArrowLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } @@ -632,7 +623,7 @@ _OptionMenuItem::DrawArrow(void) (__itemHeight - __pArrowBitmap->GetHeight())/2.0f, __pArrowBitmap->GetWidth(), __pArrowBitmap->GetHeight()); __pArrowLabel->SetBounds(FloatRectangle(arrowbounds)); - if (__selected == true) + if (__selected) { __pArrowLabel->SetBackgroundBitmap(*__pArrowPressedBitmap); } @@ -672,7 +663,7 @@ _OptionMenuItem::DrawItemUpperDivider(void) AttachChild(*__pUpperDividerLineLabel); _AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } @@ -730,7 +721,7 @@ _OptionMenuItem::DrawItemBackground(void) MoveChildToBottom(*__pBackgroundLabel); _AccessibilityContainer* pContainer = __pBackgroundLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } @@ -739,7 +730,7 @@ _OptionMenuItem::DrawItemBackground(void) FloatRectangle bounds = GetBoundsF(); Color color= Color(0, 0, 0, 0); - if (__selected == true) + if (__selected) { color = __selectedBgColor; } @@ -794,7 +785,7 @@ _OptionMenuItem::DrawItemLowerDivider(void) AttachChild(*__pLowerDividerLineLabel); _AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } diff --git a/src/ui/controls/FUiCtrl_OptionMenuModel.cpp b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp index 10e02dc..4a83234 100755 --- a/src/ui/controls/FUiCtrl_OptionMenuModel.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp @@ -155,7 +155,7 @@ _OptionMenuModel::SetItemAt(int mainIndex, const String& text, int actionId, con _Label* pLabel = null; - if (pNormalBitmap) + if (pNormalBitmap != null) { itemType = OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP; } @@ -164,7 +164,7 @@ _OptionMenuModel::SetItemAt(int mainIndex, const String& text, int actionId, con pLabel = pItem->GetBitmapLabel(); - if (pLabel) + if (pLabel != null) { pLabel->SetBackgroundBitmap(*pNormalBitmap); } @@ -175,7 +175,7 @@ _OptionMenuModel::SetItemAt(int mainIndex, const String& text, int actionId, con pLabel = pItem->GetTextLabel(); - if (pLabel) + if (pLabel != null) { pLabel->SetText(text); pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); diff --git a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp index e873bef..96fbecf 100755 --- a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp @@ -167,7 +167,7 @@ _OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap* pItem->SetBitmapLabel(pLabel); _AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } @@ -258,7 +258,7 @@ _OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap* pContainer = pLabel->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(false); } @@ -458,9 +458,10 @@ _OptionMenuPresenter::CalculateItemMaximumWidth(void) { maxItemWidth = itemSize.width; } + + __itemWidth = maxItemWidth; } - __itemWidth = maxItemWidth; } result @@ -542,6 +543,9 @@ _OptionMenuPresenter::CalculateRect(void) float bodyLeftMargin = __leftMargin; float bodyRightMargin = __rightMargin; + int scrollPanelMargin; + GET_SHAPE_CONFIG(OPTIONMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); _ControlRotation rotation = __pOptionMenu->GetRotation(); @@ -553,7 +557,7 @@ _OptionMenuPresenter::CalculateRect(void) AdjustItemLayout(); bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; - bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin; + bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin + 2 * scrollPanelMargin; if (rotation == _CONTROL_ROTATION_270 && __pOptionMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) { @@ -571,7 +575,7 @@ _OptionMenuPresenter::CalculateRect(void) bodyRect.y = 0.0f; itemRect.x = bodyRect.x + bodyLeftMargin; - itemRect.y = bodyRect.y + bodyTopMargin; + itemRect.y = bodyRect.y + bodyTopMargin + scrollPanelMargin; itemRect.width = __layoutSize.width; itemRect.height = __layoutSize.height; @@ -583,15 +587,12 @@ _OptionMenuPresenter::CalculateRect(void) // _Scroll visual interaction if Bounds < ScrollAreaBounds if (__pOptionMenu->IsVisible()) { - int itemTopMargin; - GET_SHAPE_CONFIG(OPTIONMENU::ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, itemTopMargin); - - __pOptionMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + itemTopMargin, - __layoutSize.width, __layoutSize.height - 2 * itemTopMargin)); + __pOptionMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + scrollPanelMargin, + __layoutSize.width, __layoutSize.height)); int itemCount = __pModel->GetItemCount(); float itemHeight = __itemHeight + (__dividerHeight * 2.0f); float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); - __pOptionMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight - 2 * itemTopMargin); + __pOptionMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight); } __pOptionMenu->SetMovable(true); @@ -696,7 +697,7 @@ _OptionMenuPresenter::AdjustItemPosition(void) pItem->SetParentScrollEnable(__scrollEnable); pItem->SetBounds(FloatRectangle(0.0f, drawItemY, drawRect.width, drawRect.height)); - if (pItem->HasParent() == false) + if (!pItem->HasParent()) { __pOptionMenu->GetScrollPanel()->AttachChild(*pItem); } @@ -732,7 +733,7 @@ _OptionMenuPresenter::GetItemIndexFromPosition(const FloatPoint& point) const FloatRectangle drawRect = pItem->GetDrawRect(); - if (drawRect.Contains(position) == true) + if (drawRect.Contains(position)) { index = i; break; @@ -810,7 +811,7 @@ _OptionMenuPresenter::OnEnterKeyReleased(int selectedIndex) if (pItem != null) { - if (pItem->HasSubItem() == true) + if (pItem->HasSubItem()) { // Show SubItem __pOptionMenu->ShowSubMenu(selectedIndex, *pItem); @@ -870,7 +871,7 @@ _OptionMenuPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& t FloatPoint touchPosition = touchinfo.GetCurrentPosition(); FloatRectangle itemRect = __pOptionMenu->GetItemRect(); - if (__pOptionMenu->IsSubMenuShown() == true) + if (__pOptionMenu->IsSubMenuShown()) { __pOptionMenu->DestroySubMenu(); __pOptionMenu->SetTouchCapture(false, false); @@ -923,7 +924,7 @@ _OptionMenuPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& if (pItem != null) { - if (pItem->HasSubItem() == true) + if (pItem->HasSubItem()) { // Show SubItem __pOptionMenu->ShowSubMenu(__selectedIndex, *pItem); @@ -1027,7 +1028,7 @@ _OptionMenuPresenter::SetAllAccessibilityElement(void) for (int i = 0; i < itemCount; i++) { _OptionMenuItem* pItem = __pModel->GetItem(i); - if (pItem) + if (pItem != null) { _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer(); if (pContainer != null) diff --git a/src/ui/controls/FUiCtrl_OverlayAgent.cpp b/src/ui/controls/FUiCtrl_OverlayAgent.cpp index 7475793..789d7c9 100644 --- a/src/ui/controls/FUiCtrl_OverlayAgent.cpp +++ b/src/ui/controls/FUiCtrl_OverlayAgent.cpp @@ -49,6 +49,7 @@ using namespace std; using namespace Tizen::Base; using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; using namespace Tizen::Graphics; using namespace Tizen::Io; using namespace Tizen::Media; @@ -215,10 +216,124 @@ struct visualElementDeleter } }; +_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(void) + : __pTimer(null) + , __pImageObject(null) + , __showStateChanged(false) +{ +} + +_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(const _OverlayVisualElement& rhs) + : _VisualElement(rhs) + , __pTimer(null) + , __pImageObject(rhs.__pImageObject) + , __showStateChanged(rhs.__showStateChanged) +{ +} + +_OverlayAgent::_OverlayVisualElement::~_OverlayVisualElement(void) +{ + if (__pTimer) + { + __pTimer->Cancel(); + delete __pTimer; + __pTimer = null; + } + + if (__pImageObject) + { + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown); + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden); + } +} + +result +_OverlayAgent::_OverlayVisualElement::Construct(void) +{ + if (!__pTimer) + { + __pTimer = new (nothrow) Timer(); + __pTimer->Construct(*this); + } + + return _VisualElement::Construct(); +} + +Evas_Object* +_OverlayAgent::_OverlayVisualElement::GetImageObject(void) const +{ + return __pImageObject; +} + +void +_OverlayAgent::_OverlayVisualElement::SetImageObject(Evas_Object* pImageObject) +{ + if (__pImageObject) + { + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown); + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden); + } + + __pImageObject = pImageObject; + + if (__pImageObject) + { + evas_object_event_callback_add(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown, this); + evas_object_event_callback_add(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden, this); + } +} + +void +_OverlayAgent::_OverlayVisualElement::SetImageObjectShowStateChanged(void) +{ + __showStateChanged = true; + + __pTimer->Start(0); +} + +void +_OverlayAgent::_OverlayVisualElement::OnImageObjectShown(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info) +{ + _OverlayVisualElement* pOverlayVE = reinterpret_cast<_OverlayVisualElement*>(pData); + if (pOverlayVE) + { + pOverlayVE->SetImageObjectShowStateChanged(); + SysSecureLog(NID_UI_CTRL, "The show state of Renderer VisualElement is set to SHOW"); + } +} + +void +_OverlayAgent::_OverlayVisualElement::OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info) +{ + _OverlayVisualElement* pOverlayVE = reinterpret_cast<_OverlayVisualElement*>(pData); + if (pOverlayVE) + { + pOverlayVE->SetImageObjectShowStateChanged(); + SysSecureLog(NID_UI_CTRL, "The show state of Renderer VisualElement is set to HIDE"); + } +} + +VisualElement* +_OverlayAgent::_OverlayVisualElement::CloneN(void) const +{ + return new (nothrow) _OverlayVisualElement(*this); +} + +void +_OverlayAgent::_OverlayVisualElement::OnTimerExpired(Timer& timer) +{ + if (__showStateChanged && __pImageObject) + { + SetShowState(evas_object_visible_get(__pImageObject)); + __showStateChanged = false; + SysSecureLog(NID_UI_CTRL, "Updates show state of Renderer VisualElement"); + } +} + _OverlayAgent* _OverlayAgent::CreateInstanceN(_OverlayAgentStyle style, const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds) { - unique_ptr<_OverlayAgent> pOverlayAgent(new (std::nothrow) _OverlayAgent(style, parentControl, logicalBounds, physicalBounds)); + unique_ptr<_OverlayAgent> pOverlayAgent(new (nothrow) _OverlayAgent(style, parentControl, logicalBounds, physicalBounds)); SysTryReturn(NID_UI_CTRL, pOverlayAgent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); result r = GetLastResult(); @@ -228,8 +343,8 @@ _OverlayAgent::CreateInstanceN(_OverlayAgentStyle style, const _Control& parentC } _OverlayAgent::_OverlayAgent(_OverlayAgentStyle style, const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds) - : __pParentVE(null) - , __pRendererVE(null) + : __pRendererVE(null) + , __pParentVE(null) , __pImageObject(null) , __style(style) , __currentRotation(_OVERLAY_AGENT_ROTATION_NONE) @@ -263,7 +378,10 @@ _OverlayAgent::~_OverlayAgent(void) SysLog(NID_UI_CTRL, "The %dth OverlayAgent is deleted.", __overlayAgentCount); __overlayAgentCount--; - UngrabXvPort(); + if (__xvPort > 0) + { + UngrabXvPort(); + } if (__pPixmapEventHandler) { @@ -452,7 +570,7 @@ _OverlayAgent::GrabXvPort(void) SysTryReturnResult(NID_UI_CTRL, false, E_SYSTEM, "Failed to check XvExtension"); } - SysTryReturnResult(NID_UI_CTRL, baseXvPort != -1, E_SYSTEM, "The current value of base XvPort is invalid."); + SysTryReturnResult(NID_UI_CTRL, baseXvPort > 0, E_SYSTEM, "The current value of base XvPort is invalid."); SysTryReturnResult(NID_UI_CTRL, portCount >= 1 && portCount <= _OVERLAYAGENT_XV_PORT, E_SYSTEM, "The current count of available XvPort[%d] is invalid.", portCount); _OverlayAgent::__baseXvPort = baseXvPort; @@ -475,7 +593,7 @@ _OverlayAgent::GrabXvPort(void) } } - SysTryReturnResult(NID_UI_CTRL, __xvPort != -1, E_SYSTEM, "Failed to grab pixmap[%d]", __pixmap); + SysTryReturnResult(NID_UI_CTRL, __xvPort > 0, E_SYSTEM, "Failed to grab pixmap[%d]", __pixmap); SysSecureLog(NID_UI_CTRL, "The current value of grabbed XvPort is [%d] and pixmap is [%d]", __xvPort, __pixmap); return E_SUCCESS; @@ -486,7 +604,7 @@ _OverlayAgent::UngrabXvPort(void) { ClearLastResult(); - if (__isPortGrabbed[__xvPort - __baseXvPort]) + if (__xvPort > 0 && (__xvPort - __baseXvPort) >= 0 && __isPortGrabbed[__xvPort - __baseXvPort]) { Display* pDisplay = (Display*) ecore_x_display_get(); Atom atom = XInternAtom(pDisplay, "_USER_WM_PORT_ATTRIBUTE_STREAM_OFF", False); @@ -882,8 +1000,9 @@ _OverlayAgent::GetBounds(void) const result _OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds) { + //Create new VisualElement and insert it to Parent's VisualElement - unique_ptr<_VisualElement, visualElementDeleter> pRendererVE(new (std::nothrow) _VisualElement()); + unique_ptr<_OverlayVisualElement, visualElementDeleter> pRendererVE(new (std::nothrow) _OverlayVisualElement()); SysTryReturnResult(NID_UI_CTRL, pRendererVE != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient"); result r = pRendererVE->Construct(); @@ -938,6 +1057,8 @@ _OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const evas_object_resize(__pImageObject, physicalBounds.width, physicalBounds.height); evas_object_move(__pImageObject, physicalBounds.x, physicalBounds.y); evas_object_show(__pImageObject); + pRendererVE->SetImageObject(__pImageObject); + DisplayContext* pDisplayContext = parentControl.GetRootWindow()->GetDisplayContext(); SysTryReturnResult(NID_UI_CTRL, pDisplayContext != null, E_SYSTEM, "[E_SYSTEM] The current value of RootWindow's DisplayContext is null."); diff --git a/src/ui/controls/FUiCtrl_OverlayPanel.cpp b/src/ui/controls/FUiCtrl_OverlayPanel.cpp index 3b7a42b..ffc5974 100644 --- a/src/ui/controls/FUiCtrl_OverlayPanel.cpp +++ b/src/ui/controls/FUiCtrl_OverlayPanel.cpp @@ -92,6 +92,12 @@ _OverlayPanel::SetInputBuffer(const FloatDimension& destDim, const ByteBuffer& s case OverlayPanel::BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR: format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR; break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_UYVY: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; + break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_NV12: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12; + break; default: SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "The specified pixel format is unsupported."); return E_UNSUPPORTED_FORMAT; diff --git a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp index e687b2c..1b1c203 100644 --- a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp @@ -31,6 +31,7 @@ #include "FUi_ControlManager.h" #include "FUi_ResourceSizeInfo.h" #include "FUi_UiBuilder.h" +#include "FUiCtrl_FormImpl.h" #include "FUiCtrl_OverlayAgent.h" #include "FUiCtrl_OverlayPanelImpl.h" @@ -118,6 +119,79 @@ _OverlayPanelImpl::~_OverlayPanelImpl(void) } void +_OverlayPanelImpl::SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation) +{ + FloatRectangle builderBounds; + _ContainerImpl* pTempContainerImpl; + + for(int i = 0; i < pContainerImpl->GetChildCount(); i++) + { + _ControlImpl* pControlImpl = pContainerImpl->GetChild(i); + bool exist = pControlImpl->GetBuilderBoundsF(controlOrientation, builderBounds); + if (!exist) + { + continue; + } + + pControlImpl->SetBounds(builderBounds); + pTempContainerImpl = dynamic_cast<_ContainerImpl*>(pControlImpl); + if (pTempContainerImpl != null) + { + SetChildBuilderBounds(pTempContainerImpl, controlOrientation); + } + } +} + +result +_OverlayPanelImpl::OnAttachedToMainTree(void) +{ + //result r = SetFocusable(false); + result r = E_SUCCESS; + + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + FloatRectangle builderBounds; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + + if (exist) + { + _ContainerImpl* pContainerImpl = this; + _FormImpl* pParentImpl = null; + + while (pContainerImpl) + { + pParentImpl = dynamic_cast<_FormImpl*>(pContainerImpl->GetParent()); + if (pParentImpl != null) + { + break; + } + else + { + pContainerImpl = pContainerImpl->GetParent(); + } + } + + if (pParentImpl) + { + OrientationStatus orientation = pParentImpl->GetOrientationStatus(); + if (orientation == ORIENTATION_STATUS_LANDSCAPE || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + GetBuilderBoundsF(controlOrientation, builderBounds); + } + + r = SetBounds(builderBounds); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Failed to SetBounds", GetErrorMessage(r)); + SetChildBuilderBounds(this, controlOrientation); + } + } + + r = _ContainerImpl::OnAttachedToMainTree(); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Failed to OnAttachedToMainTree", GetErrorMessage(r)); + + return r; +} + +void _OverlayPanelImpl::SetRendererRotation(OverlayPanel::Rotation rotation) { GetCore().SetRendererRotation(rotation); diff --git a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp index 40dad82..aa0e111 100755 --- a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp @@ -406,7 +406,6 @@ _OverlayRegionImpl::Construct(_Form* pParentForm, OverlayRegionType overlayRegio SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] The current type of OverlayAgen[%d] is invalid.", overlayRegionType); return E_SYSTEM; } - return r; } diff --git a/src/ui/controls/FUiCtrl_Popup.cpp b/src/ui/controls/FUiCtrl_Popup.cpp index c6d3c6b..88c5798 100644 --- a/src/ui/controls/FUiCtrl_Popup.cpp +++ b/src/ui/controls/FUiCtrl_Popup.cpp @@ -135,6 +135,7 @@ _Popup::Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds) _titleState = hasTitle; __bounds = bounds; SetClientBounds(GetPopupClientArea()); + SetFocusNavigateEnabled(false); _PopupPresenter* pPresenter = new (std::nothrow) _PopupPresenter(); SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -666,7 +667,7 @@ _Popup::InitializeAccessibilityElement(void) SysTryReturnVoidResult(NID_UI_CTRL, pPresenter != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); _pTitleTextAccessibilityElement->Construct(L"PopupTitleText", pPresenter->GetTitleTextBounds()); _pTitleTextAccessibilityElement->SetLabel(GetTitleText()); - _pTitleTextAccessibilityElement->SetTrait(L"Popup Title"); + _pTitleTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_POP_UP_HEADER_T_TALKBACK"); pContainer->AddElement(*_pTitleTextAccessibilityElement); } @@ -707,12 +708,6 @@ _Popup::OnBoundsChanged(void) } } -void -_Popup::OnDrawFocus(void) -{ - return; -} - bool _Popup::IsLayoutChangable(void) const { diff --git a/src/ui/controls/FUiCtrl_PopupImpl.cpp b/src/ui/controls/FUiCtrl_PopupImpl.cpp index 9863e43..274fa79 100644 --- a/src/ui/controls/FUiCtrl_PopupImpl.cpp +++ b/src/ui/controls/FUiCtrl_PopupImpl.cpp @@ -81,6 +81,8 @@ _PopupImpl::_PopupImpl(Popup* pPublic, _Popup* pCore, Layout* pPublicPortraitLay , __init(false) , __callBoundsChange(false) , __prevPos(0.0f, 0.0f) + , __boundsChangedInternally(false) + , __boundsChangedExternally(false) { //empty statement } @@ -129,10 +131,10 @@ _PopupImpl::Initialize(bool hasTitle, const Tizen::Graphics::FloatDimension& dim FloatRectangle bounds = GetCenterAlignedRect(dim.width, dim.height); __init = true; _centerAlign = true; - + __boundsChangedInternally = true; r = SetBounds(bounds); + __boundsChangedInternally = false; SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - return GetCore().Initialize(hasTitle, bounds); } @@ -312,23 +314,43 @@ _PopupImpl::OnChangeLayout(_ControlOrientation orientation) { _centerAlign = true; - if(GetXmlBounds(bounds)) + if (__boundsChangedExternally) { - bounds = GetCenterAlignedRect(bounds.width, bounds.height); + bounds = GetCenterAlignedRect(GetBounds().width, GetBounds().height); + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; } else { - bounds = GetCenterAlignedRect(GetBounds().width, GetBounds().height); + + if(GetXmlBounds(bounds)) + { + bounds = GetCenterAlignedRect(bounds.width, bounds.height); + } + else + { + bounds = GetCenterAlignedRect(GetBounds().width, GetBounds().height); + } + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; } - r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } else { - if(GetXmlBounds(bounds)) + if (!__boundsChangedExternally) { - r = SetBounds(bounds); + if(GetXmlBounds(bounds)) + { + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; + } } + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -362,6 +384,11 @@ _PopupImpl::OnBoundsChanging(const FloatRectangle& bounds) void _PopupImpl::OnBoundsChanged(void) { + if (!__boundsChangedInternally && __init) + { + __boundsChangedExternally = true; + } + FloatRectangle rect = GetBoundsF(); if (__init) { @@ -376,8 +403,9 @@ _PopupImpl::OnBoundsChanged(void) } _centerAlign = true; - + __boundsChangedInternally = true; result r = SetBounds(rect, true); + __boundsChangedInternally = false; if (IsFailed(r)) { // Error propagation fall through diff --git a/src/ui/controls/FUiCtrl_PopupPresenter.cpp b/src/ui/controls/FUiCtrl_PopupPresenter.cpp old mode 100644 new mode 100755 index 4f79405..53e56f9 --- a/src/ui/controls/FUiCtrl_PopupPresenter.cpp +++ b/src/ui/controls/FUiCtrl_PopupPresenter.cpp @@ -456,6 +456,28 @@ _PopupPresenter::Draw(void) } } + // Draw Outline + if (!isCustomBitmap && __pPopup->GetOutlineBitmap() != null && + _FloatCompareGE(pBounds.width, minSize.width) && + _FloatCompareGE(pBounds.height, minSize.height) && __pPopup->GetColor().GetAlpha() != 0x00) + { + FloatRectangle bounds(0.0f, + 0.0f, + pBounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin, + pBounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin); + + const Bitmap* pOutlineBitmap = __pPopup->GetOutlineBitmap(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pOutlineBitmap)) + { + pBackgroundCanvas->DrawNinePatchedBitmap(bounds, *pOutlineBitmap); + } + else + { + pBackgroundCanvas->DrawBitmap(bounds, *pOutlineBitmap); + } + } + // Draw Title if (__pPopup->HasTitle()) { @@ -504,28 +526,6 @@ _PopupPresenter::Draw(void) } } - // Draw Outline - if (!isCustomBitmap && __pPopup->GetOutlineBitmap() != null && - _FloatCompareGE(pBounds.width, minSize.width) && - _FloatCompareGE(pBounds.height, minSize.height) && __pPopup->GetColor().GetAlpha() != 0x00) - { - FloatRectangle bounds(0.0f, - 0.0f, - pBounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin, - pBounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin); - - const Bitmap* pOutlineBitmap = __pPopup->GetOutlineBitmap(); - - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pOutlineBitmap)) - { - pBackgroundCanvas->DrawNinePatchedBitmap(bounds, *pOutlineBitmap); - } - else - { - pBackgroundCanvas->DrawBitmap(bounds, *pOutlineBitmap); - } - } - //fall thtrough CATCH: delete pCanvas; diff --git a/src/ui/controls/FUiCtrl_Progress.cpp b/src/ui/controls/FUiCtrl_Progress.cpp index 39d76f8..a40ed43 100644 --- a/src/ui/controls/FUiCtrl_Progress.cpp +++ b/src/ui/controls/FUiCtrl_Progress.cpp @@ -54,7 +54,7 @@ _Progress::~_Progress(void) { delete __pProgressPresenter; __pProgressPresenter = null; - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->Activate(false); __pAccessibilityElement = null; @@ -85,7 +85,7 @@ _Progress::CreateProgressN() pProgress->AcquireHandle(); pProgress->SetFocusable(false); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); pProgress->InitializeAccessibilityElement(); @@ -106,13 +106,13 @@ _Progress::InitializeAccessibilityElement(void) { result r = E_SUCCESS; - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { return r; } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { __pAccessibilityElement = new _AccessibilityElement(true); SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -135,7 +135,7 @@ _Progress::InitializeAccessibilityElement(void) result _Progress::OnAttachedToMainTree(void) { - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } @@ -145,7 +145,7 @@ _Progress::OnAttachedToMainTree(void) void _Progress::OnBoundsChanged(void) { - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } @@ -173,7 +173,7 @@ _Progress::SetPropertyValue(const Variant& value) r = InitializeAccessibilityElement(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); @@ -235,7 +235,7 @@ _Progress::SetRange(int minValue, int maxValue) } } - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); diff --git a/src/ui/controls/FUiCtrl_ProgressImpl.cpp b/src/ui/controls/FUiCtrl_ProgressImpl.cpp index 3853a3c..5d2d28e 100644 --- a/src/ui/controls/FUiCtrl_ProgressImpl.cpp +++ b/src/ui/controls/FUiCtrl_ProgressImpl.cpp @@ -322,10 +322,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementString)) { AccessibilityContainer* pContainer = pProgress->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement(L"ProgressingImage"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementString); } diff --git a/src/ui/controls/FUiCtrl_ProgressPopup.cpp b/src/ui/controls/FUiCtrl_ProgressPopup.cpp index a5fcc64..5ae7f19 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopup.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopup.cpp @@ -163,6 +163,8 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta __buttonState = cancelButton; __isTransparent = transparent; + SetFocusNavigateEnabled(false); + _ProgressPopupPresenter* pPresenter = new (std::nothrow) _ProgressPopupPresenter(); SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1076,23 +1078,6 @@ _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; diff --git a/src/ui/controls/FUiCtrl_ProgressPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp index a2540fb..4d07c14 100644 --- a/src/ui/controls/FUiCtrl_ProgressPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp @@ -322,7 +322,7 @@ _ProgressPresenter::Draw(void) width = (width) * ((__pProgressModel->GetValue() - minValue) * 100.0f / (maxValue - minValue)) / 100.0f; } - if (__pProgress->IsEnabled() == false) // disabled + if (!__pProgress->IsEnabled()) // disabled { __pBarBgColorReplacementBitmap->SetAlphaConstant(0xFF); @@ -350,7 +350,7 @@ _ProgressPresenter::Draw(void) r = DrawBitmap(*pCanvas, FloatRectangle(leftMargin, (bounds.height - height) / 2.0f, (bounds.width - (2.0f * leftMargin)), height), __pBarBgColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomBarBitmap == false) + if (!isCustomBarBitmap) { r = DrawBitmap(*pCanvas, FloatRectangle(leftMargin, (bounds.height - height) / 2.0f, (bounds.width - (2.0f * leftMargin)), height), __pBarBgResourceEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -369,7 +369,7 @@ _ProgressPresenter::Draw(void) __pBarColorReplacementBitmap = pReplacementBitmap; __currentBarColor = __pProgress->GetBarColor(); } - if (__pProgress->IsEnabled() == false) // disabled + if (!__pProgress->IsEnabled()) // disabled { __pBarColorReplacementBitmap->SetAlphaConstant(0x4C); } @@ -384,7 +384,7 @@ _ProgressPresenter::Draw(void) r = DrawBitmap(*pCanvas, FloatRectangle((leftMargin + offset), (bounds.height - height) / 2.0f, width, height), __pBarColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomBarBitmap == false) + if (!isCustomBarBitmap) { r = DrawBitmap(*pCanvas, FloatRectangle((leftMargin + offset), (bounds.height - height) / 2.0f, width, height), __pBarResourceEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp b/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp index a9a1545..3a2278a 100644 --- a/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp @@ -43,7 +43,7 @@ _PublicDateTimeChangeEventArg::_PublicDateTimeChangeEventArg(DateTimePublicChang , __hour(0) , __minute(0) { - SystemTime::GetCurrentTime(WALL_TIME, __dateTime1); + SystemTime::GetCurrentTime(TIME_MODE_WALL, __dateTime1); } _PublicDateTimeChangeEventArg::~_PublicDateTimeChangeEventArg(void) diff --git a/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp b/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp index be46fc1..6acccb2 100644 --- a/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp @@ -158,24 +158,24 @@ _PublicSplitPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, SplitPanelEventStatus status = pArg->GetStatus(); if (status == SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE) { - if (pSplitPanelEventListener) + if (pSplitPanelEventListener != null) { pSplitPanelEventListener->OnDividerPositionChanged(*pSource, pSource->GetDividerPosition()); } - if (pSplitPanelEventListenerF) + if (pSplitPanelEventListenerF != null) { pSplitPanelEventListenerF->OnDividerPositionChanged(*pSource, pSource->GetDividerPositionF()); } } else { - if (pSplitPanelEventListener) + if (pSplitPanelEventListener != null) { pSplitPanelEventListener->OnDividerDoublePressed(*pSource); } - if (pSplitPanelEventListenerF) + if (pSplitPanelEventListenerF != null) { pSplitPanelEventListenerF->OnDividerDoublePressed(*pSource); } diff --git a/src/ui/controls/FUiCtrl_ScrollPanel.cpp b/src/ui/controls/FUiCtrl_ScrollPanel.cpp index ee35aef..95bcaeb 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanel.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanel.cpp @@ -92,6 +92,11 @@ _ScrollPanel::~_ScrollPanel(void) delete __pScrollEvent; __pScrollEvent = null; + if (__pScrollPanelPresenter != null) + { + __pScrollPanelPresenter->StopScrollBarLoadEffectTimer(); + } + if (__pVerticalScrollBar != null && IsAncestorOf(*__pVerticalScrollBar)) { DetachSystemChild(*__pVerticalScrollBar); diff --git a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp index 391e184..2fdf164 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp @@ -497,7 +497,7 @@ _ScrollPanelPresenter::RunTouchReleased(const _Control& source, const _TouchInfo float currentPosition = GetScrollPosition(); float targetPosition = CalculatePagingScrollPosition(currentPosition); - if (!_FloatCompare(targetPosition, currentPosition)) + if (targetPosition > currentPosition || targetPosition < currentPosition) { SetScrollPosition(targetPosition, true); result r = GetLastResult(); @@ -1235,7 +1235,8 @@ _ScrollPanelPresenter::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) { __scrollBarLoadEffectStatus = _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADED; - StopScrollBarLoadEffectTimer(); + delete __pScrollBarLoadEffectTimer; + __pScrollBarLoadEffectTimer = null; FadeOutScrollBar(); result r = GetLastResult(); @@ -1798,8 +1799,10 @@ CATCH: void _ScrollPanelPresenter::StopScrollBarLoadEffectTimer(void) { - delete __pScrollBarLoadEffectTimer; - __pScrollBarLoadEffectTimer = null; + if (__pScrollBarLoadEffectTimer) + { + __pScrollBarLoadEffectTimer->Cancel(); + } } void diff --git a/src/ui/controls/FUiCtrl_SearchBar.cpp b/src/ui/controls/FUiCtrl_SearchBar.cpp index f6b48fb..ba31f97 100644 --- a/src/ui/controls/FUiCtrl_SearchBar.cpp +++ b/src/ui/controls/FUiCtrl_SearchBar.cpp @@ -43,6 +43,7 @@ #include "FUiCtrl_SearchBarImpl.h" #include "FUiCtrl_EditFieldImpl.h" #include "FUiCtrl_ButtonImpl.h" +#include "FUi_FocusManagerImpl.h" #include @@ -78,7 +79,6 @@ _SearchBar::_SearchBar(void) , __isFocusCallbackToBeFired(true) , __isButtonTextChangedByApp(false) , __contentVisibilitySetByApp(true) - , __isInFocusMode(false) , __isFocusUiInitialized(false) , __keypadAction(CORE_KEYPAD_ACTION_SEARCH) , __pBackgroundBitmap(null) @@ -106,7 +106,7 @@ _SearchBar::_SearchBar(void) } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); } @@ -119,7 +119,7 @@ _SearchBar::~_SearchBar(void) delete __pSearchBarPresenter; __pSearchBarPresenter = null; - if (__pClippedGroupControl) + if (__pClippedGroupControl != null) { DetachChild(*__pClippedGroupControl); @@ -127,7 +127,7 @@ _SearchBar::~_SearchBar(void) __pClippedGroupControl = null; } - if (__pContainer) + if (__pContainer != null) { DetachChild(*__pContainer); @@ -135,43 +135,25 @@ _SearchBar::~_SearchBar(void) __pContainer = null; } - if (__pActionEvent) - { - delete __pActionEvent; - __pActionEvent = null; - } + delete __pActionEvent; + __pActionEvent = null; - if (__pKeypadEvent) - { - delete __pKeypadEvent; - __pKeypadEvent = null; - } + delete __pKeypadEvent; + __pKeypadEvent = null; - if (__pTextBlockEvent) - { - delete __pTextBlockEvent; - __pTextBlockEvent = null; - } + delete __pTextBlockEvent; + __pTextBlockEvent = null; - if (__pTextEvent) - { - delete __pTextEvent; - __pTextEvent = null; - } + delete __pTextEvent; + __pTextEvent = null; - if (__pSearchBarEvent) - { - delete __pSearchBarEvent; - __pSearchBarEvent = null; - } + delete __pSearchBarEvent; + __pSearchBarEvent = null; - if (__pLanguageEvent) - { - delete __pLanguageEvent; - __pLanguageEvent = null; - } + delete __pLanguageEvent; + __pLanguageEvent = null; - if (__pAccessibilitySearchBarElement) + if (__pAccessibilitySearchBarElement != null) { __pAccessibilitySearchBarElement->Activate(false); __pAccessibilitySearchBarElement = null; @@ -497,7 +479,7 @@ _SearchBar::SetContentsArea(void) __contentAreaBounds.width = width - controlBounds.x; __contentAreaBounds.height = height - (controlBounds.y + controlBounds.height); - if (__pContainer) + if (__pContainer != null) { result r = E_SUCCESS; r = __pContainer->SetBounds(__contentAreaBounds); @@ -518,7 +500,7 @@ _SearchBar::SetContent(const _Control* pContent) __pContentControl = const_cast <_Control*>(pContent); result r = E_SUCCESS; - if (__pContainer) + if (__pContainer != null) { r = __pContainer->AttachChild(*__pContentControl); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating"); @@ -586,33 +568,33 @@ _SearchBar::IsModeLocked(void) const } result -_SearchBar::SetMode(SearchBarMode mode) +_SearchBar::SetMode(SearchBarMode mode, bool isCalledByApp) { _AccessibilityElement* pEditElement = __pEdit->GetTextAccessibilityElement(); - if (mode == SEARCH_BAR_MODE_NORMAL) - { - pEditElement->SetHint("Double Tap To Type Search Text"); - } - else - { - pEditElement->SetHint("Enter Search Text"); - } - - pEditElement->SetTrait("SearchBar"); +// if (mode == SEARCH_BAR_MODE_NORMAL) +// { +// pEditElement->SetHint("Double Tap To Type Search Text"); +// } +// else +// { +// pEditElement->SetHint("Enter Search Text"); +// } + +// pEditElement->SetTrait("SearchBar"); pEditElement->SetName("SearchField"); - return __pSearchBarPresenter->SetMode(mode); + return __pSearchBarPresenter->SetMode(mode, isCalledByApp); } result _SearchBar::SetModeLocked(bool modeLocked) { - if (modeLocked == true && GetMode() == SEARCH_BAR_MODE_NORMAL) + if (modeLocked && GetMode() == SEARCH_BAR_MODE_NORMAL) { __pEdit->SetViewModeEnabled(true); } - if (modeLocked == false && __pEdit->IsViewModeEnabled()) + if (!modeLocked && __pEdit->IsViewModeEnabled()) { __pEdit->SetViewModeEnabled(false); } @@ -688,7 +670,7 @@ _SearchBar::GetButtonStatus(void) const SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL; - if (__isButtonEnabled == false) + if (!__isButtonEnabled) { buttonStatus = SEARCH_BAR_BUTTON_STATUS_DISABLED; } @@ -1572,7 +1554,7 @@ _SearchBar::OnBoundsChanged(void) __pSearchBarPresenter->OnBoundsChanged(); } - if (__pAccessibilitySearchBarElement) + if (__pAccessibilitySearchBarElement != null) { __pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); } @@ -1625,6 +1607,13 @@ _SearchBar::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& tou return _UI_TOUCH_EVENT_DELIVERY_YES; } +bool +_SearchBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + __pSearchBarPresenter->OnTouchReleased(source); + return true; +} + void _SearchBar::FireButtonActionEvent(const _Control &source, int actionId) { @@ -1636,7 +1625,7 @@ _SearchBar::FireButtonActionEvent(const _Control &source, int actionId) SetFocused(); - if (__pActionEvent) + if (__pActionEvent != null) { IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId); result r = GetLastResult(); @@ -1661,7 +1650,7 @@ _SearchBar::OnKeypadWillOpen(void) { if (!__isKeypadOpening) { - if (__pKeypadEvent) + if (__pKeypadEvent != null) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED); result r = GetLastResult(); @@ -1678,7 +1667,7 @@ _SearchBar::OnKeypadWillOpen(void) void _SearchBar::OnKeypadOpened(void) { - if (__pKeypadEvent) + if (__pKeypadEvent != null) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN); result r = GetLastResult(); @@ -1695,7 +1684,7 @@ _SearchBar::OnKeypadOpened(void) void _SearchBar::OnKeypadClosed(void) { - if (__pKeypadEvent) + if (__pKeypadEvent != null) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE); result r = GetLastResult(); @@ -1713,7 +1702,7 @@ _SearchBar::OnKeypadClosed(void) void _SearchBar::OnKeypadBoundsChanged(void) { - if (__pKeypadEvent) + if (__pKeypadEvent != null) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); result r = GetLastResult(); @@ -1729,7 +1718,7 @@ _SearchBar::OnKeypadBoundsChanged(void) void _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction) { - if (__pKeypadEvent) + if (__pKeypadEvent != null) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); result r = GetLastResult(); @@ -1744,7 +1733,7 @@ _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction) void _SearchBar::OnTextBlockSelected(_Control& source, int start, int end) { - if (__pTextBlockEvent) + if (__pTextBlockEvent != null) { IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end); result r = GetLastResult(); @@ -1833,32 +1822,12 @@ void _SearchBar::OnDrawFocus(void) { __isFocusUiInitialized = true; - __isInFocusMode = true; __pEdit->SetSearchFieldFocus(true); _Control::OnDrawFocus(); return; } -void -_SearchBar::OnFocusModeStateChanged(void) -{ - __isInFocusMode = false; - - if (__pEdit->IsFocused()) - { - __pEdit->SetSearchFieldFocus(false); - __pEdit->Invalidate(); - } - - if (__pCancelButton->IsFocused()) - { - __pCancelButton->OnFocusModeStateChanged(); - } - - return; -} - bool _SearchBar::IsChildControlFocusManage(void) const { @@ -1877,7 +1846,6 @@ _SearchBar::OnPreviewKeyPressed(const _Control &source, const _KeyInfo &keyInfo) if (keyCode == _KEY_TAB && GetMode() == SEARCH_BAR_MODE_INPUT && __isFocusUiInitialized == false) { - __isInFocusMode = true; __pEdit->SetSearchFieldFocus(true); __isFocusUiInitialized = true; return false; @@ -1909,7 +1877,13 @@ _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) return false; } - if (!__isInFocusMode) + if (!IsVisible()) + { + return false; + } + + _FocusManagerImpl* pFocusMgrImpl = _FocusManagerImpl::GetInstance(); + if (!pFocusMgrImpl->IsFocusModeStateEnabled()) { return false; } @@ -2136,13 +2110,13 @@ result _SearchBar::SendSearchBarEvent(_SearchBarEventStatus status) { result r = E_SUCCESS; - if (__pSearchBarEvent) + if (__pSearchBarEvent != null) { IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status); r = GetLastResult(); SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (IsContentAreaVisible() == false) + if (!IsContentAreaVisible()) { SetContentAreaVisible(false); } @@ -2592,7 +2566,7 @@ _SearchBar::SetPropertyContentAreaSize(const Variant& size) __isUserContainerBounds = true; // set bounds - if (__pContainer) + if (__pContainer != null) { r = __pContainer->SetBounds(__contentAreaBounds); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); @@ -2658,8 +2632,8 @@ _SearchBar::InitializeAccessibility(void) _AccessibilityElement* pEditElement = __pEdit->GetTextAccessibilityElement(); - pEditElement->SetHint("Double Tap To Type Search Text"); - pEditElement->SetTrait("SearchBar"); +// pEditElement->SetHintWithStringId("Double Tap To Type Search Text"); +// pEditElement->SetTrait("SearchBar"); pEditElement->SetName("SearchField"); pSBContainer->Activate(false); @@ -2797,7 +2771,7 @@ _SearchBar::RecalculateButtonBounds(void) cancelButtonBounds.height = buttonHeight; float searchFieldMinHeight = searchBarMinHeight - (verticalMargin * 2.0f); - cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightTouchMarginF() + __pCancelButton->GetLeftTouchMarginF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); editBounds.x = horizontalMargin; if (searchBarBounds.height < searchBarMinHeight) diff --git a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp index 9abfaf8..a416e40 100644 --- a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp @@ -66,7 +66,7 @@ _SearchBarImpl::_SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore) _SearchBarImpl::~_SearchBarImpl(void) { - if (__pSearchBar) + if (__pSearchBar != null) { SetContent(null); if (__pSearchBar->GetClippedGroupControl()) @@ -76,59 +76,32 @@ _SearchBarImpl::~_SearchBarImpl(void) } } - if (__pEditField) - { - delete __pEditField; - __pEditField = null; - } + delete __pEditField; + __pEditField = null; - if (__pButton) - { - delete __pButton; - __pButton = null; - } + delete __pButton; + __pButton = null; - if (__pPublicActionEvent) - { - delete __pPublicActionEvent; - __pPublicActionEvent = null; - } + delete __pPublicActionEvent; + __pPublicActionEvent = null; - if (__pPublicKeypadEvent) - { - delete __pPublicKeypadEvent; - __pPublicKeypadEvent = null; - } + delete __pPublicKeypadEvent; + __pPublicKeypadEvent = null; - if (__pPublicTextBlockEvent) - { - delete __pPublicTextBlockEvent; - __pPublicTextBlockEvent = null; - } + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; - if (__pPublicTextEvent) - { - delete __pPublicTextEvent; - __pPublicTextEvent = null; - } + delete __pPublicTextEvent; + __pPublicTextEvent = null; - if (__pPublicSearchBarEvent) - { - delete __pPublicSearchBarEvent; - __pPublicSearchBarEvent = null; - } + delete __pPublicSearchBarEvent; + __pPublicSearchBarEvent = null; - if (__pPublicLanguageEvent) - { - delete __pPublicLanguageEvent; - __pPublicLanguageEvent = null; - } + delete __pPublicLanguageEvent; + __pPublicLanguageEvent = null; - if (__pPublicFocusEventListeners) - { - delete __pPublicFocusEventListeners; - __pPublicFocusEventListeners = null; - } + delete __pPublicFocusEventListeners; + __pPublicFocusEventListeners = null; } _SearchBarImpl* @@ -488,7 +461,7 @@ _SearchBarImpl::SetMode(SearchBarMode mode) { ClearLastResult(); - return __pSearchBar->SetMode(mode); + return __pSearchBar->SetMode(mode, true); } result @@ -879,7 +852,7 @@ _SearchBarImpl::GetSearchFieldTextColor(SearchFieldStatus status) const Color color; _Edit* pEdit = __pSearchBar->GetSearchField(); - if (pEdit) + if (pEdit != null) { switch (status) { @@ -950,7 +923,7 @@ _SearchBarImpl::SetSearchFieldTextColor(SearchFieldStatus status, const Color& c result r = E_SUCCESS; _Edit* pEdit = __pSearchBar->GetSearchField(); - if (pEdit) + if (pEdit != null) { switch (status) { @@ -1455,7 +1428,7 @@ _SearchBarImpl::OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode) void _SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) { - if (__pPublicLanguageEvent) + if (__pPublicLanguageEvent != null) { IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); result r = GetLastResult(); @@ -1498,7 +1471,7 @@ _SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source) IEnumeratorT* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN(); - if (pEnumerator) + if (pEnumerator != null) { while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1528,7 +1501,7 @@ _SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source) } IEnumeratorT* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN(); - if (pEnumerator) + if (pEnumerator != null) { while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1553,7 +1526,7 @@ void _SearchBarImpl::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) { IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); - if (pEnumerator) + if (pEnumerator != null) { while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1578,7 +1551,7 @@ void _SearchBarImpl::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) { IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); - if (pEnumerator) + if (pEnumerator != null) { while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1603,7 +1576,7 @@ void _SearchBarImpl::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) { IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); - if (pEnumerator) + if (pEnumerator != null) { while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1817,7 +1790,7 @@ protected: { searchFieldTextSize = _LocalizedNumParser::ToDouble(elementString, "C"); _ICoordinateSystemTransformer* pTransform = GetTransformer(); - if (pTransform) + if (pTransform != null) { searchFieldTextSize = pTransform->Transform(searchFieldTextSize); } @@ -1977,10 +1950,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementString)) { AccessibilityContainer* pContainer = pSearchBar->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementString); } diff --git a/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp index a6b9500..01a0588 100644 --- a/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp @@ -64,41 +64,23 @@ _SearchBarPresenter::~_SearchBarPresenter(void) delete __pSearchBarModel; __pSearchBarModel = null; - if (__pReplacedSearchFieldNormalBitmap) - { - delete __pReplacedSearchFieldNormalBitmap; - __pReplacedSearchFieldNormalBitmap = null; - } + delete __pReplacedSearchFieldNormalBitmap; + __pReplacedSearchFieldNormalBitmap = null; - if (__pReplacedSearchFieldDisabledBitmap) - { - delete __pReplacedSearchFieldDisabledBitmap; - __pReplacedSearchFieldDisabledBitmap = null; - } + delete __pReplacedSearchFieldDisabledBitmap; + __pReplacedSearchFieldDisabledBitmap = null; - if (__pReplacedSearchBarBitmap) - { - delete __pReplacedSearchBarBitmap; - __pReplacedSearchBarBitmap = null; - } + delete __pReplacedSearchBarBitmap; + __pReplacedSearchBarBitmap = null; - if (__pSearchBarBitmap) - { - delete __pSearchBarBitmap; - __pSearchBarBitmap = null; - } + delete __pSearchBarBitmap; + __pSearchBarBitmap = null; - if (__pSearchFieldEffectBitmap) - { - delete __pSearchFieldEffectBitmap; - __pSearchFieldEffectBitmap = null; - } + delete __pSearchFieldEffectBitmap; + __pSearchFieldEffectBitmap = null; - if (__pSearchBarEffectBitmap) - { - delete __pSearchBarEffectBitmap; - __pSearchBarEffectBitmap = null; - } + delete __pSearchBarEffectBitmap; + __pSearchBarEffectBitmap = null; } result @@ -154,7 +136,7 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar) return r; CATCH: - if (__pIconElement) + if (__pIconElement != null) { __pIconElement->Destroy(); __pIconElement = null; @@ -291,7 +273,7 @@ _SearchBarPresenter::IsModeLocked(void) const } result -_SearchBarPresenter::SetMode(SearchBarMode mode) +_SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp) { SysTryReturn(NID_UI_CTRL, IsModeLocked() == false, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The searchbar mode is locked."); @@ -303,7 +285,7 @@ _SearchBarPresenter::SetMode(SearchBarMode mode) __pSearchBarModel->SetMode(mode); - result r = ChangeMode(mode); + result r = ChangeMode(mode, isCalledByApp); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to change the mode of searchbar."); @@ -327,7 +309,7 @@ _SearchBarPresenter::Draw(void) Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap(); - if (!pBackgroundBitmap) + if (pBackgroundBitmap == null) { r = DrawSearchBarDefaultBitmap(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -435,7 +417,7 @@ _SearchBarPresenter::DrawSearchBarDefaultBitmap(void) void _SearchBarPresenter::SetCancelButtonVisible(bool visible) { - if ((__pSearchBar->IsUsableCancelButton() == false) && visible) + if ((!__pSearchBar->IsUsableCancelButton()) && visible) { return; } @@ -551,7 +533,7 @@ _SearchBarPresenter::DrawIcon(void) result -_SearchBarPresenter::ChangeMode(SearchBarMode mode) +_SearchBarPresenter::ChangeMode(SearchBarMode mode, bool isCalledByApp) { result r = E_SUCCESS; @@ -562,7 +544,7 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode) SetCancelButtonVisible(false); SetContainerVisible(false); - if (__pEdit) + if (__pEdit != null) { __pEdit->ClearText(); __pEdit->SetBounds(__searchFieldBounds); @@ -586,20 +568,23 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode) SetCancelButtonVisible(true); __pSearchBar->SetContentDimming(); - if (__pEdit) + if (__pEdit != null) { float buttonWidth = 0.0f; _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); float cancelButtonWidth = 0.0f; - cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightTouchMarginF() + __pCancelButton->GetLeftTouchMarginF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); if (cancelButtonWidth <= buttonWidth) { __pEdit->SetBounds(__searchFieldBounds); } - __pEdit->ShowKeypad(); + if (isCalledByApp) + { + __pEdit->ShowKeypad(); + } } __pSearchBar->SetContentsArea(); @@ -619,7 +604,7 @@ _SearchBarPresenter::InitializeInputModeLayout(void) { InitializeViewModeLayout(); - if (__pSearchBar->IsUsableCancelButton() == false) + if (!__pSearchBar->IsUsableCancelButton()) { return; } @@ -655,7 +640,7 @@ _SearchBarPresenter::InitializeInputModeLayout(void) __searchFieldBounds.width = (__pSearchBar->GetBoundsF().width > searchFieldMinWidth) ? __searchFieldBounds.width : searchFieldMinWidth; float cancelButtonWidth = 0.0f; - cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightTouchMarginF() + __pCancelButton->GetLeftTouchMarginF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); if (cancelButtonWidth > buttonWidth) { @@ -727,7 +712,7 @@ _SearchBarPresenter::OnBoundsChanged(void) r = __pSearchBar->ResizeCancelButton(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.",GetErrorMessage(r)); - cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightTouchMarginF() + __pCancelButton->GetLeftTouchMarginF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); } r = __pEdit->SetBounds(__searchFieldBounds); @@ -751,12 +736,21 @@ _SearchBarPresenter::OnBoundsChanged(void) return; } +void +_SearchBarPresenter::OnTouchReleased(const _Control& source) +{ + if (&source == __pEdit) + { + __pEdit->ShowKeypad(); + } +} + Canvas* _SearchBarPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) { Canvas* pCanvas = null; - if (__lazyDecode == true) + if (__lazyDecode) { Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap(); SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the background bitmap."); diff --git a/src/ui/controls/FUiCtrl_Slider.cpp b/src/ui/controls/FUiCtrl_Slider.cpp index 8518e71..44eb70a 100644 --- a/src/ui/controls/FUiCtrl_Slider.cpp +++ b/src/ui/controls/FUiCtrl_Slider.cpp @@ -25,7 +25,6 @@ #include #include #include "FUi_ResourceManager.h" -#include "FUi_TouchManager.h" #include "FUi_AccessibilityContainer.h" #include "FUi_AccessibilityElement.h" #include "FUiAnim_VisualElement.h" @@ -71,7 +70,7 @@ _Slider::_Slider(void) } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); } @@ -79,17 +78,11 @@ _Slider::_Slider(void) _Slider::~_Slider(void) { - if (__pAdjustmentEvent != null) - { - delete __pAdjustmentEvent; - __pAdjustmentEvent = null; - } + delete __pAdjustmentEvent; + __pAdjustmentEvent = null; - if (__pSliderEvent != null) - { - delete __pSliderEvent; - __pSliderEvent = null; - } + delete __pSliderEvent; + __pSliderEvent = null; delete __pLeftBitmap; __pLeftBitmap = null; @@ -100,7 +93,7 @@ _Slider::~_Slider(void) delete __pSliderPresenter; __pSliderPresenter = null; - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->Activate(false); __pAccessibilityElement = null; @@ -208,13 +201,13 @@ _Slider::InitializeAccessibilityElement(void) { result r = E_SUCCESS; - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { return r; } _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, @@ -333,13 +326,18 @@ _Slider::OnFocusLost(const _Control& source) { __pSliderPresenter->SetFocusMode(false); - if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed == true)) + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed)) { _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); pSliderOverlay->SetVisibleState(false); pSliderOverlay->Close(); } + if (__isKeyPressed) + { + FireAdjustmentValueEvent(GetValue()); + } + __isKeyPressed = false; Invalidate(); @@ -350,6 +348,21 @@ void _Slider::OnFocusModeStateChanged() { __pSliderPresenter->SetFocusMode(false); + + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed ) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(false); + pSliderOverlay->Close(); + } + + if (__isKeyPressed) + { + FireAdjustmentValueEvent(GetValue()); + } + + __isKeyPressed = false; + Invalidate(); } @@ -440,7 +453,7 @@ _Slider::OnBoundsChanged(void) { __pSliderPresenter->OnBoundsChanged(); - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } @@ -581,17 +594,17 @@ _Slider::SetPropertyValue(const Variant& value) void _Slider::SetAccessibilityElementValue() { - if (__pAccessibilityElement) + if (__pAccessibilityElement != null) { - String string; - GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); - char buffer[10] = {0,}; - sprintf(buffer, "%d", GetValue()); - string.Replace(L"%1$d", buffer); - memset(buffer, 0, 10); - sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue()); - string.Replace(L"%2$d", buffer); - __pAccessibilityElement->SetValue(string); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); + char buffer[10] = {0,}; + sprintf(buffer, "%d", GetValue()); + string.Replace(L"%1$d", buffer); + memset(buffer, 0, 10); + sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue()); + string.Replace(L"%2$d", buffer); + __pAccessibilityElement->SetValue(string); } return; @@ -972,11 +985,7 @@ _Slider::OnFontInfoRequested(unsigned long& style, float& size) void _Slider::OnAncestorVisibleStateChanged(const _Control& control) { - _TouchManager* pTouchMgr = _TouchManager::GetInstance(); - if (pTouchMgr && (IsVisible() == false)) - { - pTouchMgr->SetTouchCanceled(null); - } + __pSliderPresenter->OnAncestorVisibleStateChanged(control); return; } @@ -992,7 +1001,7 @@ _Slider::OnAncestorEnableStateChanged(const _Control& control) bool _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) { - if (GetEnableState() == false) + if (!GetEnableState()) { return true; } @@ -1017,7 +1026,7 @@ _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, c bool _Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) { - if (GetEnableState() == false) + if (!GetEnableState()) { return true; } diff --git a/src/ui/controls/FUiCtrl_SliderImpl.cpp b/src/ui/controls/FUiCtrl_SliderImpl.cpp index bae248c..ab87c43 100644 --- a/src/ui/controls/FUiCtrl_SliderImpl.cpp +++ b/src/ui/controls/FUiCtrl_SliderImpl.cpp @@ -59,17 +59,11 @@ _SliderImpl::_SliderImpl(Slider* pPublic, _Slider* pCore) _SliderImpl::~_SliderImpl(void) { - if (__pPublicAdjustmentEvent != null) - { - delete __pPublicAdjustmentEvent; - __pPublicAdjustmentEvent = null; - } + delete __pPublicAdjustmentEvent; + __pPublicAdjustmentEvent = null; - if (__pPublicSliderEvent != null) - { - delete __pPublicSliderEvent; - __pPublicSliderEvent = null; - } + delete __pPublicSliderEvent; + __pPublicSliderEvent = null; } _SliderImpl* @@ -533,7 +527,7 @@ protected: groupStyleEmum = GROUP_STYLE_BOTTOM; } } - if (isGroupStyle == true) + if (isGroupStyle) { if (pControl->GetElement(L"min", elementString) && pControl->GetElement(L"max", elementString1)) { @@ -750,10 +744,10 @@ protected: if (pControl->GetElement(L"accessibilityHint", elementString)) { AccessibilityContainer* pContainer = pSlider->GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { AccessibilityElement* pElement = pContainer->GetElement(L"SliderControl"); - if (pElement) + if (pElement != null) { pElement->SetHint(elementString); } diff --git a/src/ui/controls/FUiCtrl_SliderPresenter.cpp b/src/ui/controls/FUiCtrl_SliderPresenter.cpp index 3d5f0c1..64aeb0d 100644 --- a/src/ui/controls/FUiCtrl_SliderPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SliderPresenter.cpp @@ -257,7 +257,7 @@ _SliderPresenter::Resize(void) _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - if (__isResourceLoaded == false) + if (!__isResourceLoaded) { r = LoadBitmap(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -295,15 +295,15 @@ _SliderPresenter::Resize(void) if (!__isCustomHandle) { - r = GET_SHAPE_CONFIG(SLIDER::HANDLE_OFFSET, orientation, __handleOffset); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, __handleRect.width); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, __handleRect.height); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __handleOffset = __handleRect.width / 2; } + __rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height); r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin); @@ -314,7 +314,7 @@ _SliderPresenter::Resize(void) r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITH_ICON, orientation, minimumWidth); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_SHAPE_CONFIG(SLIDER::BAR_LEFT_MARGIN_WITH_ICON, orientation, barLeftMargin); + r = GET_SHAPE_CONFIG(SLIDER::ICON_LEFT_MARGIN, orientation, barLeftMargin); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); } else @@ -353,13 +353,13 @@ _SliderPresenter::Resize(void) { titleTextBounds = GetTitleTextBounds(); sliderY = titleTextBounds.y + titleTextBounds.height; - __touchRect = FloatRectangle(barLeftMargin - __handleOffset , sliderY + (__rect.height - (sliderY + __handleRect.height)) / 2.0f, - __rect.width - (barLeftMargin + barRightMargin) + (2.0f * __handleOffset) , __handleRect.height); + __touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, sliderY + (__rect.height - (sliderY + __handleRect.height)) / 2.0f, + __rect.width - (barLeftMargin + barRightMargin) + (2.0f * __handleOffset) - ( 2.0 * __barOffset), __handleRect.height); } else { - __touchRect = FloatRectangle(barLeftMargin - __handleOffset, (__rect.height - __handleRect.height) / 2.0f, - (__rect.width - (barLeftMargin + barRightMargin)) + (2.0f * __handleOffset) , __handleRect.height); + __touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, (__rect.height - __handleRect.height) / 2.0f, + (__rect.width - (barLeftMargin + barRightMargin ) - ( 2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height); } if (__pSlider->GetIcon(ICON_POSITION_LEFT) != null) @@ -373,8 +373,8 @@ _SliderPresenter::Resize(void) __touchRect.width = __touchRect.width - (iconWidth + iconSideMargin + iconRightMargin); } - __barBgRect = FloatRectangle(__touchRect.x + __handleOffset, __touchRect.y + - ((__handleRect.height - barHeight) / 2.0f), __touchRect.width - (2.0f * __handleOffset), barHeight); + __barBgRect = FloatRectangle(__touchRect.x + __handleOffset - __barOffset, __touchRect.y + + ((__handleRect.height - barHeight) / 2.0f), __touchRect.width - (2.0f * __handleOffset) + (2.0 * __barOffset), barHeight); FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(); __pSliderOverlay->SetSliderRect(absBounds, __touchRect); @@ -727,7 +727,7 @@ _SliderPresenter::CalculateSliderValue(float positionX, float offsetX) result _SliderPresenter::Draw(void) { - if (__isNeedToBeUpdated == true) + if (__isNeedToBeUpdated) { Resize(); __isNeedToBeUpdated = false; @@ -762,7 +762,7 @@ _SliderPresenter::DrawSlider(void) r = DrawSliderBar(*pCanvas); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (__isSliderPressed == true || __pSlider->IsKeyPressed()) + if (__isSliderPressed || __pSlider->IsKeyPressed()) { if (style & _SLIDER_STYLE_OVERLAY) { @@ -831,7 +831,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) { pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgTopBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); r = GetLastResult(); - if (!pBgGroupBitmap) + if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -861,7 +861,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) { pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgMiddleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); r = GetLastResult(); - if (!pBgGroupBitmap) + if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -891,7 +891,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) { pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgBottomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); r = GetLastResult(); - if (!pBgGroupBitmap) + if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -921,7 +921,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) { pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); r = GetLastResult(); - if (!pBgGroupBitmap) + if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -952,7 +952,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) { pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); r = GetLastResult(); - if (!pBgGroupBitmap) + if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -975,7 +975,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) DrawBitmap(canvas, __rect, pBgBitmap); if ( __groupStyle != GROUP_STYLE_NONE) { - if (isCustomBitmap == false) + if (!isCustomBitmap) { DrawBitmap(canvas, __rect, pBgEffectBitmap); } @@ -990,7 +990,7 @@ _SliderPresenter::OnChangeLayout(_ControlOrientation orientation) int minValue = __pSliderModel->GetMinValue(); int maxValue = __pSliderModel->GetMaxValue(); - if ( __isSliderPressed == true) + if (__isSliderPressed) { __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); __pSlider->Invalidate(); @@ -999,7 +999,7 @@ _SliderPresenter::OnChangeLayout(_ControlOrientation orientation) __isSetValue = true; _TouchManager* pTouchMgr = _TouchManager::GetInstance(); - if (pTouchMgr) + if (pTouchMgr != null) { __isTouchCanceled = true; pTouchMgr->SetTouchCanceled(null); @@ -1024,7 +1024,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) bool isCustomHandleBitmap = false; bool isCustomBarBitmap = false; - if (__pSlider->IsEnabled() == false) // disabled + if (!__pSlider->IsEnabled()) // disabled { pHandleBitmap = __pHandleDisabledBitmap; pHandleEffectBitmap = __pHandleDisabledEffectBitmap; @@ -1039,7 +1039,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) } } } - else if (__isSliderPressed == true) // pressed + else if (__isSliderPressed) // pressed { pHandleBitmap = __pHandlePressedBitmap; pHandleEffectBitmap = __pHandlePressedEffectBitmap; @@ -1057,7 +1057,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) __barRect = FloatRectangle(__barBgRect.x + __barOffset, __barBgRect.y, __handleRect.x , __barBgRect.height); - if (__isSetValue == true && __isSliderPressed == false && (maxValue - minValue) != 0) + if (__isSetValue && !__isSliderPressed && (maxValue - minValue) != 0) { __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); } @@ -1106,7 +1106,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) // Redrawing twice is required because, when slider is disabled we are applying alpha channel to the bar // which will show the previously drawn portion. - if (__pSlider->IsEnabled() == false) // disabled + if (!__pSlider->IsEnabled()) // disabled { __pBarBgColorReplacementBitmap->SetAlphaConstant(0xFF); DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap); @@ -1121,14 +1121,14 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_BG_NORMAL); DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap); - if (isCustomBarBitmap == false) + if (!isCustomBarBitmap) { DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap); } isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_NORMAL); DrawBitmap(canvas, __barRect, __pBarColorReplacementBitmap); - if (isCustomBarBitmap == false) + if (!isCustomBarBitmap) { DrawBitmap(canvas, __barRect, __pBarResourceEffectBitmap); } @@ -1144,7 +1144,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) { r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (isCustomHandleBitmap == false) + if (!isCustomHandleBitmap) { r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1179,9 +1179,9 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged == true)) + if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged)) { - if (__pHandleHighlightedBitmap) + if (__pHandleHighlightedBitmap != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pHandleHighlightedBitmap)) { @@ -1224,15 +1224,15 @@ _SliderPresenter::DrawSliderBarNumber(int value) int valueLength = 0; _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - if (__pSlider->IsEnabled() == false) // disabled + if (!__pSlider->IsEnabled()) // disabled { textColor = __handleTextDisabledColor; } - else if ((__pSlider->IsFocused() == true) && (__isFocusModeStateChanged == true)) + else if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged)) { textColor = __handleTextHighlightedColor; } - else if ((__isSliderPressed == true) && !(__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY)) + else if ((__isSliderPressed) && !(__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY)) { textColor = __handleTextPressedColor; } @@ -1489,7 +1489,7 @@ _SliderPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touch FloatPoint point = touchinfo.GetCurrentPosition(); - if (__handleRect.Contains(point) == true) + if (__handleRect.Contains(point)) { __isSliderPressed = true; __isSetValue = false; @@ -1539,7 +1539,7 @@ _SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touc delete pCanvas; pCanvas = null; - if (__isSliderPressed == true) + if (__isSliderPressed) { PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSlider); __isSliderPressed = false; @@ -1606,7 +1606,7 @@ _SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin return false; } - if (__isSliderPressed == false) + if (!__isSliderPressed) { return false; } @@ -1624,7 +1624,7 @@ _SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin __currentPosition.x = point.x; __currentPosition.y = point.y; - if ( __isTimerRunning == false ) + if (!__isTimerRunning) { __isTimerRunning = true; __pSlideTimer->Start(__timerValue); @@ -1714,6 +1714,29 @@ _SliderPresenter::OnAncestorEnableStateChanged(const _Control& control) } void +_SliderPresenter::OnAncestorVisibleStateChanged(const _Control& control) +{ + + if (__pSlideTimer != null) + { + __isTimerRunning = false; + __pSlideTimer->Cancel(); + } + + __isSliderPressed = false; + __isSetValue = true; + __isTouchCanceled = false; + + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(false); + __pSliderOverlay->Close(); + } + + return; +} + +void _SliderPresenter::SetMinValue(int minValue) { __pSliderModel->SetMinValue(minValue); diff --git a/src/ui/controls/FUiCtrl_SplitPanel.cpp b/src/ui/controls/FUiCtrl_SplitPanel.cpp index 847b837..838f14f 100644 --- a/src/ui/controls/FUiCtrl_SplitPanel.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanel.cpp @@ -175,19 +175,16 @@ _SplitPanel::Construct(SplitPanelDividerStyle splitPanelDividerStyle, SplitPanel CATCH: - if (__pDividerVisualElement) + if (__pDividerVisualElement != null) { __pDividerVisualElement->Destroy(); __pDividerVisualElement = null; } - if (__pSplitPanelPresenter) - { - delete __pSplitPanelPresenter; - __pSplitPanelPresenter = null; - } + delete __pSplitPanelPresenter; + __pSplitPanelPresenter = null; - if (__pFirstPaneParent) + if (__pFirstPaneParent != null) { DetachChild(*__pFirstPaneParent); @@ -195,7 +192,7 @@ CATCH: __pFirstPaneParent = null; } - if (__pSecondPaneParent) + if (__pSecondPaneParent != null) { DetachChild(*__pSecondPaneParent); @@ -208,19 +205,13 @@ CATCH: _SplitPanel::~_SplitPanel(void) { - if (__pSplitPanelPresenter) - { - delete __pSplitPanelPresenter; - __pSplitPanelPresenter = null; - } + delete __pSplitPanelPresenter; + __pSplitPanelPresenter = null; - if (__pSplitPanelEvent) - { - delete __pSplitPanelEvent; - __pSplitPanelEvent = null; - } + delete __pSplitPanelEvent; + __pSplitPanelEvent = null; - if (__pTapGesture) + if (__pTapGesture != null) { __pTapGesture->RemoveGestureListener(*this); RemoveGestureDetector(*__pTapGesture); @@ -229,7 +220,7 @@ _SplitPanel::~_SplitPanel(void) __pTapGesture = null; } - if (__pDividerVisualElement) + if (__pDividerVisualElement != null) { GetVisualElement()->DetachChild(*__pDividerVisualElement); @@ -237,7 +228,7 @@ _SplitPanel::~_SplitPanel(void) __pDividerVisualElement = null; } - if (__pFirstPaneParent) + if (__pFirstPaneParent != null) { DetachChild(*__pFirstPaneParent); @@ -245,7 +236,7 @@ _SplitPanel::~_SplitPanel(void) __pFirstPaneParent = null; } - if (__pSecondPaneParent) + if (__pSecondPaneParent != null) { DetachChild(*__pSecondPaneParent); @@ -341,7 +332,7 @@ _SplitPanel::OnBoundsChanged(void) _UiTouchEventDelivery _SplitPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { - if (__pSplitPanelPresenter->OnTouchPressed(source, touchinfo) == true) + if (__pSplitPanelPresenter->OnTouchPressed(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -352,7 +343,7 @@ _SplitPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& tou _UiTouchEventDelivery _SplitPanel::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { - if (__pSplitPanelPresenter->OnTouchReleased(source, touchinfo) == true) + if (__pSplitPanelPresenter->OnTouchReleased(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -363,7 +354,7 @@ _SplitPanel::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& to _UiTouchEventDelivery _SplitPanel::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) { - if (__pSplitPanelPresenter->OnTouchMoved(source, touchinfo) == true) + if (__pSplitPanelPresenter->OnTouchMoved(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -374,7 +365,7 @@ _SplitPanel::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touch _UiTouchEventDelivery _SplitPanel::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) { - if (__pSplitPanelPresenter->OnTouchCanceled(source, touchinfo) == true) + if (__pSplitPanelPresenter->OnTouchCanceled(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -834,7 +825,7 @@ _SplitPanel::SendSplitPanelEvent(_SplitPanelEventStatus status) result r = E_SUCCESS; IEventArg* pEventArg = null; - if (__pSplitPanelEvent) + if (__pSplitPanelEvent != null) { pEventArg = _SplitPanelEvent::CreateSplitPanelEventArgN(status); r = GetLastResult(); @@ -869,7 +860,7 @@ _SplitPanel::GetDividerVisualElement(void) void _SplitPanel::SetDividerVisualElementBounds(Tizen::Graphics::FloatRectangle& bounds) { - if (__pDividerVisualElement) + if (__pDividerVisualElement != null) { __pDividerVisualElement->SetBounds(bounds); } diff --git a/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp b/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp index 4d634f8..92a0bb3 100644 --- a/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp @@ -63,14 +63,14 @@ _SplitPanelImpl::_SplitPanelImpl(SplitPanel* pPublic, _SplitPanel* pCore) _SplitPanelImpl::~_SplitPanelImpl(void) { - __pSplitPanel->RemoveSplitPanelEventListener(*this); - - if(__pPublicSplitPanelEvent) + if (__pSplitPanel != null) { - delete __pPublicSplitPanelEvent; - __pPublicSplitPanelEvent = null; + __pSplitPanel->RemoveSplitPanelEventListener(*this); } + delete __pPublicSplitPanelEvent; + __pPublicSplitPanelEvent = null; + ClearLastResult(); } diff --git a/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp index 8aa3d48..3e63b9d 100644 --- a/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp @@ -161,7 +161,7 @@ _SplitPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& t point = touchinfo.GetCurrentPosition(); - if (CheckDividerTouchRegion(point.x, point.y) == true) + if (CheckDividerTouchRegion(point.x, point.y)) { __splitPanelDividerPressed = true; __pSplitPanel->Invalidate(); @@ -174,7 +174,7 @@ _SplitPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& t bool _SplitPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { - if (__splitPanelDividerPressed == true) + if (__splitPanelDividerPressed) { PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSplitPanel); __splitPanelDividerPressed = false; @@ -183,7 +183,7 @@ _SplitPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& } else { - if (__isChangeBounds == true) + if (__isChangeBounds) { __isChangeBounds = false; } @@ -197,7 +197,7 @@ _SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& tou FloatPoint point(0.0f, 0.0f); Bitmap* pThumbBitmap = null; - if (__splitPanelDividerPressed == false ) + if (!__splitPanelDividerPressed) { return false; } @@ -207,7 +207,7 @@ _SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& tou return false; } - if (CheckDividerTouchRegion(point.x, point.y) == true) + if (CheckDividerTouchRegion(point.x, point.y)) { __isChangeBounds = true; } @@ -254,7 +254,7 @@ _SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& tou bool _SplitPanelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) { - if (__splitPanelDividerPressed == true) + if (__splitPanelDividerPressed) { __splitPanelDividerPressed = false; @@ -263,7 +263,7 @@ _SplitPanelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& return true; } - if (__isChangeBounds == true) + if (__isChangeBounds) { __isChangeBounds = false; } @@ -396,7 +396,7 @@ CATCH: bool _SplitPanelPresenter::IsPaneMaximized(SplitPanelPaneOrder paneOrder) const { - if ((__pSplitPanelModel->GetPaneMaximumState() == true) + if ((__pSplitPanelModel->GetPaneMaximumState()) && (__pSplitPanelModel->GetMaximizedPaneOrder() == paneOrder)) { return true; @@ -410,7 +410,7 @@ _SplitPanelPresenter::RestorePane(void) { result r = E_SUCCESS; - if (__pSplitPanelModel->GetPaneMaximumState() == false) + if (!__pSplitPanelModel->GetPaneMaximumState()) { return E_SUCCESS; } @@ -463,7 +463,7 @@ result _SplitPanelPresenter::Draw(void) { if (GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_STOPPED && - __pSplitPanelModel->GetPaneMaximumState() == false) + !__pSplitPanelModel->GetPaneMaximumState()) { FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle dividerThumbBounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -475,7 +475,7 @@ _SplitPanelPresenter::Draw(void) pCanvas = __pSplitPanel->GetDividerVisualElement()->GetCanvasN(); SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); - if (pCanvas) + if (pCanvas != null) { pCanvas->Clear(); @@ -491,7 +491,7 @@ _SplitPanelPresenter::Draw(void) dividerBounds.x = 0.0f; dividerBounds.y = 0.0f; - if (__splitPanelDividerPressed == true) + if (__splitPanelDividerPressed) { pCanvas->DrawNinePatchedBitmap(dividerBounds, *__pDividerPressedBackgroundBitmap); } @@ -733,7 +733,7 @@ _SplitPanelPresenter::SetPaneBounds(void) if ((pFirstPane != null) && (pSecondPane != null)) { - if (__setFirstDividerPositionChangeEvent == true) + if (__setFirstDividerPositionChangeEvent) { __setFirstDividerPositionChangeEvent = false; __pSplitPanel->SendSplitPanelEvent(_SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE); @@ -954,17 +954,17 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorFirstPane && pFirstPaneControl->IsResizable()) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, maximizeFirstPane); } - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == false) + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == true) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); } @@ -977,17 +977,17 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorSecondPane && pSecondPaneControl->IsResizable()) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationMaximizeSecondPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == false) + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == true) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); } @@ -1000,17 +1000,17 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorSecondPane && pSecondPaneControl->IsResizable()) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationMaximizeSecondPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == false) + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == true) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); } @@ -1023,17 +1023,17 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorFirstPane && pFirstPaneControl->IsResizable()) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, maximizeFirstPane); } - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == false) + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == true) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); } @@ -1049,26 +1049,26 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorFirstPane && pFirstPaneControl->IsResizable()) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreFirstPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->IsResizable()) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreSecondPane); } if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) { - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == false) + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } } else { - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == false) + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } @@ -1085,26 +1085,26 @@ _SplitPanelPresenter::AnimatePane(int destination) RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - if (pControlAnimatorFirstPane && pFirstPaneControl->IsResizable()) + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreFirstPane); } - if (pControlAnimatorSecondPane && pSecondPaneControl->IsResizable()) + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreSecondPane); } if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) { - if (pControlAnimatorSecondPane && pSecondPaneControl->GetShowState() == false) + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) { pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } } else { - if (pControlAnimatorFirstPane && pFirstPaneControl->GetShowState() == false) + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) { pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); } diff --git a/src/ui/controls/FUiCtrl_Tab.cpp b/src/ui/controls/FUiCtrl_Tab.cpp index 52a6679..c8d4859 100644 --- a/src/ui/controls/FUiCtrl_Tab.cpp +++ b/src/ui/controls/FUiCtrl_Tab.cpp @@ -92,11 +92,8 @@ _Tab::~_Tab(void) delete __pTabPresenter; __pTabPresenter = null; - if (__pActionEvent) - { - delete __pActionEvent; - __pActionEvent = null; - } + delete __pActionEvent; + __pActionEvent = null; __tabItems.RemoveAll(true); @@ -118,41 +115,23 @@ _Tab::~_Tab(void) __pGestureLongPress = null; } - if (__pBackgroundBitmap) - { - delete __pBackgroundBitmap; - __pBackgroundBitmap = null; - } + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; - if (__pDisabledBackgroundBitmap) - { - delete __pDisabledBackgroundBitmap; - __pDisabledBackgroundBitmap = null; - } + delete __pDisabledBackgroundBitmap; + __pDisabledBackgroundBitmap = null; - if (__pPressedItemBackgroundBitmap) - { - delete __pPressedItemBackgroundBitmap; - __pPressedItemBackgroundBitmap = null; - } + delete __pPressedItemBackgroundBitmap; + __pPressedItemBackgroundBitmap = null; - if (__pPressedItemBackgroundEffectBitmap) - { - delete __pPressedItemBackgroundEffectBitmap; - __pPressedItemBackgroundEffectBitmap = null; - } + delete __pPressedItemBackgroundEffectBitmap; + __pPressedItemBackgroundEffectBitmap = null; - if (__pSelectedItemBackgroundBitmap) - { - delete __pSelectedItemBackgroundBitmap; - __pSelectedItemBackgroundBitmap = null; - } + delete __pSelectedItemBackgroundBitmap; + __pSelectedItemBackgroundBitmap = null; - if (__pHighlightedItemBackgroundBitmap) - { - delete __pHighlightedItemBackgroundBitmap; - __pHighlightedItemBackgroundBitmap = null; - } + delete __pHighlightedItemBackgroundBitmap; + __pHighlightedItemBackgroundBitmap = null; RemoveAllAccessibilityElement(); } @@ -832,7 +811,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate disabled item background bitmap."); - if (pDisabledBackgroundBitmap) + if (pDisabledBackgroundBitmap != null) { __pDisabledBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetDisabledItemBackgroundColor()); SysTryLog(NID_UI_CTRL, (__pDisabledBackgroundBitmap != null), "Failed to locate disabled item background bitmap."); @@ -843,7 +822,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate item background bitmap."); - if (pItemBackgroundBitmap) + if (pItemBackgroundBitmap != null) { __pBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetItemBackgroundColor()); SysTryLog(NID_UI_CTRL, (__pBackgroundBitmap != null), "Failed to locate item background bitmap."); @@ -854,7 +833,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate pressed item background bitmap."); - if (pPressedItemBackgroundBitmap) + if (pPressedItemBackgroundBitmap != null) { __pPressedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetPressedItemBackgroundColor()); SysTryLog(NID_UI_CTRL, (__pPressedItemBackgroundBitmap != null), "Failed to locate pressed item background bitmap."); @@ -865,7 +844,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap."); - if (pSelectedItemBackgroundBitmap) + if (pSelectedItemBackgroundBitmap != null) { __pSelectedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetSelectedItemBackgroundColor()); SysTryLog(NID_UI_CTRL, (__pSelectedItemBackgroundBitmap != null), "Failed to locate selected item background bitmap."); @@ -876,7 +855,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundEffectBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap."); - if (pPressedItemBackgroundEffectBitmap) + if (pPressedItemBackgroundEffectBitmap != null) { __pPressedItemBackgroundEffectBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedItemBackgroundEffectBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedEffectColor); SysTryLog(NID_UI_CTRL, (__pPressedItemBackgroundEffectBitmap != null), "Failed to locate selected item background bitmap."); @@ -887,7 +866,7 @@ _Tab::LoadBitmap(void) r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate highlighted item background bitmap."); - if (pHighlightedItemBackgroundBitmap) + if (pHighlightedItemBackgroundBitmap != null) { __pHighlightedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetHighlightedItemBackgroundColor()); SysTryLog(NID_UI_CTRL, (__pHighlightedItemBackgroundBitmap != null), "Failed to locate highlighted item background bitmap."); @@ -1046,7 +1025,7 @@ _Tab::SetBackgroundBitmap(const Bitmap& bitmap) SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - if (__pBackgroundBitmap) + if (__pBackgroundBitmap != null) { delete __pBackgroundBitmap; __pBackgroundBitmap = null; @@ -1054,7 +1033,7 @@ _Tab::SetBackgroundBitmap(const Bitmap& bitmap) __pBackgroundBitmap = pBitmap; - if (__pDisabledBackgroundBitmap) + if (__pDisabledBackgroundBitmap != null) { delete __pDisabledBackgroundBitmap; __pDisabledBackgroundBitmap = null; @@ -1096,7 +1075,7 @@ _Tab::SetSelectedItemBackgroundBitmap(const Bitmap& bitmap) SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - if (__pSelectedItemBackgroundBitmap) + if (__pSelectedItemBackgroundBitmap != null) { delete __pSelectedItemBackgroundBitmap; __pSelectedItemBackgroundBitmap = null; @@ -1123,7 +1102,7 @@ _Tab::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - if (__pHighlightedItemBackgroundBitmap) + if (__pHighlightedItemBackgroundBitmap != null) { delete __pHighlightedItemBackgroundBitmap; __pHighlightedItemBackgroundBitmap = null; @@ -1326,7 +1305,7 @@ _Tab::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) return true; } - if (__pActionEvent) + if (__pActionEvent != null) { IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); SysTryReturn(NID_UI_CTRL, pEventArg, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -1395,7 +1374,7 @@ _Tab::OnAttachedToMainTree(void) pContainer = GetAccessibilityContainer(); - if (pContainer) + if (pContainer != null) { pContainer->Activate(true); pContainer->AddListener(*this); @@ -1427,7 +1406,7 @@ _Tab::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } _KeyCode keyCode = keyInfo.GetKeyCode(); int itemCount = __pTabPresenter->GetItemCount(); - if (itemCount == 0 || __isInFocusMode == false) + if (itemCount == 0 || !__isInFocusMode) { return false; } @@ -1652,7 +1631,7 @@ _Tab::UpdateAccessibilityElement(void) itemStatus = pItem->GetStatus(); } - if (pAccessibilityElement) + if (pAccessibilityElement != null) { pAccessibilityElement->SetBounds(bounds); @@ -1682,7 +1661,7 @@ _Tab::UpdateAccessibilityLabel(int index, const String& text) if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) { - if (pAccessibilityElement) + if (pAccessibilityElement != null) { pAccessibilityElement->SetLabel(text); } diff --git a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp index 2b45340..db2466b 100644 --- a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp @@ -648,11 +648,6 @@ _TabBarPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove directio SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); } - if(itemIndex == 0) //when touchedCOM - { - SetItemSelected(0); - } - __tabBar.Invalidate(); return r; diff --git a/src/ui/controls/FUiCtrl_TabItem.cpp b/src/ui/controls/FUiCtrl_TabItem.cpp index 6e20b59..6e7c49f 100644 --- a/src/ui/controls/FUiCtrl_TabItem.cpp +++ b/src/ui/controls/FUiCtrl_TabItem.cpp @@ -49,17 +49,12 @@ _TabItem::_TabItem(void) _TabItem::~_TabItem(void) { - if (__pbmIcon) - { - delete __pbmIcon; - __pbmIcon = null; - } - - if (__pbmBadge) - { - delete __pbmBadge; - __pbmBadge = null; - } + delete __pbmIcon; + __pbmIcon = null; + + delete __pbmBadge; + __pbmBadge = null; + } diff --git a/src/ui/controls/FUiCtrl_TableView.cpp b/src/ui/controls/FUiCtrl_TableView.cpp index bfc6b9f..1019042 100644 --- a/src/ui/controls/FUiCtrl_TableView.cpp +++ b/src/ui/controls/FUiCtrl_TableView.cpp @@ -76,7 +76,10 @@ _TableView::_TableView(void) _TableView::~_TableView(void) { - __pTableViewPresenter->BlockAnimationCallback(true); + if (__pTableViewPresenter) + { + __pTableViewPresenter->BlockAnimationCallback(true); + } if (GetVisualElement() != null) { @@ -312,6 +315,30 @@ _TableView::SetReorderModeEnabled(bool enable) return E_SUCCESS; } +void +_TableView::RestoreFocus(bool isRestoreFocus) +{ + return __pTableViewPresenter->RestoreFocus(isRestoreFocus); +} + +void +_TableView::SetAnnexFocused(bool isAnnexFocused) +{ + return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused); +} + +void +_TableView::SetTableViewFocused(bool focusStatus) +{ + return __pTableViewPresenter->SetTableViewFocused(focusStatus); +} + +bool +_TableView::IsTableViewFocused(void) +{ + return __pTableViewPresenter->IsTableViewFocused(); +} + result _TableView::SetItemChecked(int groupIndex, int itemIndex, bool check) { @@ -1216,7 +1243,7 @@ _TableView::OnBoundsChanged(void) bounds.height, bounds.height, 0); - SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); pScroll->EnableScrollingEffect(false); pScroll->SetVisibleState(false); @@ -1267,7 +1294,7 @@ _TableView::OnBoundsChanged(void) bounds.height, bounds.height, 0); - SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); pScroll->EnableScrollingEffect(true); _ScrollPanel::SetScrollBar(pScroll); @@ -1329,6 +1356,14 @@ _TableView::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) } bool +_TableView::OnFocusGained(const _Control& source) +{ + __pTableViewPresenter->SetTableViewFocused(true); + + return true; +} + +bool _TableView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) { return __pTableViewPresenter->OnFlickGestureDetected(gesture); @@ -1417,4 +1452,29 @@ _TableView::OnFocusModeStateChanged(void) { return __pTableViewPresenter->OnFocusModeStateChanged(); } + +void +_TableView::OnVisibleStateChanged(void) +{ + return __pTableViewPresenter->OnVisibleStateChanged(); +} + +void +_TableView::OnAncestorEnableStateChanged(const _Control& control) +{ + return __pTableViewPresenter->OnAncestorEnableStateChanged(control); +} + +void +_TableView::OnAncestorVisibleStateChanged(const _Control& control) +{ + return __pTableViewPresenter->OnAncestorVisibleStateChanged(control); +} + +void +_TableView::OnFocusableStateChanged(bool focusalbeState) +{ + return __pTableViewPresenter->OnFocusableStateChanged(focusalbeState); +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItem.cpp b/src/ui/controls/FUiCtrl_TableViewItem.cpp index 9dfa368..2539ffc 100644 --- a/src/ui/controls/FUiCtrl_TableViewItem.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItem.cpp @@ -51,7 +51,7 @@ _TableViewItemControl::_TableViewItemControl(void) _TableViewItemControl::~_TableViewItemControl(void) { - if(__pBackgroundBitmap) + if (__pBackgroundBitmap) { delete __pBackgroundBitmap; __pBackgroundBitmap = null; @@ -218,6 +218,7 @@ _TableViewItem::_TableViewItem(float itemHeight) , __customHeight(0.0f) , __animationCount(0) , __pAccessibilityElement(null) + , __pAccessibilityOnOffElement(null) , __pPressedTimer(null) , __pReleasedTimer(null) , __isPressedTimerEnabled(false) @@ -239,6 +240,7 @@ _TableViewItem::_TableViewItem(float itemHeight) , __isSelectedDetailButton(false) , __isSimpleLastItem(false) , __isTouchPressOnScroll(false) + , __isTouchCancelOnPressRelease(false) , __pHighlightVisualElement(null) , __pBitmapVisualElement(null) , __pMoveItemAnimation(null) @@ -285,19 +287,19 @@ _TableViewItem::~_TableViewItem() _VisualElement* pVisualElement = GetVisualElement(); if (pVisualElement != null) { - if(__pMoveItemAnimation != null) + if (__pMoveItemAnimation != null) { __pMoveItemAnimation->SetVisualElementAnimationTickEventListener(null); __pMoveItemAnimation->SetVisualElementAnimationStatusEventListener(null); } - if(__pZoomInOutItemAnimation != null) + if (__pZoomInOutItemAnimation != null) { __pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(null); __pZoomInOutItemAnimation->SetVisualElementAnimationStatusEventListener(null); } - if(__pFadeInOutItemtAnimation != null) + if (__pFadeInOutItemtAnimation != null) { __pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(null); __pFadeInOutItemtAnimation->SetVisualElementAnimationStatusEventListener(null); @@ -378,11 +380,16 @@ _TableViewItem::~_TableViewItem() if (__pAccessibilityElement) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if(pContainer) + if (pContainer) { pContainer->RemoveAllElement(); } __pAccessibilityElement = null; + + if (__pAccessibilityOnOffElement) + { + __pAccessibilityOnOffElement = null; + } } } @@ -718,7 +725,7 @@ _TableViewItem::CreateDetailButton(void) _Label* _TableViewItem::GetLabelCore(Label* label) { - if(label == null) + if (label == null) { return null; } @@ -805,11 +812,11 @@ _TableViewItem::SetItemBackgroundBitmap(ListItemState itemState, const Bitmap* p __pItemBgBitmap[itemState] = pCopyBitmap; - if(__pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] == null && + if (__pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] == null && __pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED] == null && __pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED] == null) { - if(__pBitmapVisualElement != null) + if (__pBitmapVisualElement != null) { __pBitmapVisualElement->Destroy(); __pBitmapVisualElement = null; @@ -817,7 +824,7 @@ _TableViewItem::SetItemBackgroundBitmap(ListItemState itemState, const Bitmap* p } else { - if(__pBitmapVisualElement == null) + if (__pBitmapVisualElement == null) { FloatRectangle bounds = GetBoundsF(); result r = E_SUCCESS; @@ -861,7 +868,7 @@ _TableViewItem::GetItemBackgroundBitmap(ListItemState itemState) const void _TableViewItem::SetItemBackgroundColor(ListItemState itemState, const Color bgColor) { - if(__colorItemBg[itemState] == bgColor) + if (__colorItemBg[itemState] == bgColor) { return; } @@ -917,7 +924,7 @@ _TableViewItem::SetItemHeight(int itemHeight) void _TableViewItem::SetItemHeight(float itemHeight) { - if(_FloatCompare(GetSizeF().height, itemHeight)) + if (_FloatCompare(GetSizeF().height, itemHeight)) { return; } @@ -947,7 +954,7 @@ _TableViewItem::IsChecked(void) const void _TableViewItem::SetCheckedAnimationEnabled(bool enabled) { - if(__isCheckedAnimationEnabled == enabled) + if (__isCheckedAnimationEnabled == enabled) { return; } @@ -988,7 +995,7 @@ _TableViewItem::IsItemEnabled(void) const void _TableViewItem::SetItemType(const TableViewItemType itemType) { - if(__itemType == itemType) + if (__itemType == itemType) { return; } @@ -1000,11 +1007,11 @@ _TableViewItem::SetItemType(const TableViewItemType itemType) __pContextItem->SetItemType(__itemType); } - if(itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + if (itemType == TABLE_VIEW_ITEM_TYPE_TITLE) { Color titleColor; GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, titleColor); - if(titleColor == __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) + if (titleColor == __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) { GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BG_PRESSED, __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]); } @@ -1101,15 +1108,25 @@ _TableViewItem::GetItemTapSoundEnabled(void) return __isItemTapSoundEnabled; } +void +_TableViewItem::DrawAnnexFocus(void) +{ + if (__pItemAnnex) + { + __pItemAnnex->SetFocus(); + } + return; +} + Tizen::Graphics::Canvas* _TableViewItem::OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds) { Canvas* pCanvas = null; - if(__pBitmapVisualElement != null && __pBitmapVisualElement->GetImageSource().IsEmpty()) + if (__pBitmapVisualElement != null && __pBitmapVisualElement->GetImageSource().IsEmpty()) { Bitmap* pDrawBitmap = __pItemBgBitmap[__drawingStatus]; - if(pDrawBitmap != null) + if (pDrawBitmap != null) { pCanvas = __pBitmapVisualElement->GetCanvasN(); SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); @@ -1165,7 +1182,7 @@ _TableViewItem::FireItemEvent(bool selectedItem) eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE; } } - else if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) { if (selectedItem) { @@ -1225,6 +1242,8 @@ _TableViewItem::FireItemSweepEvent(TableViewSweepDirection direction) bool _TableViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { + __isTouchCancelOnPressRelease = false; + if (IsContextItem() || __isContextItemActivated || IsAnimationPlaying() || @@ -1264,7 +1283,7 @@ _TableViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchin __pressedControl = TABLE_VIEW_ITEM_PRESSED_NONE; } - if(__isReleasedTimerEnabled) + if (__isReleasedTimerEnabled) { StopTouchReleasedTimer(); @@ -1282,7 +1301,7 @@ _TableViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchin if (!IsIndividualSelectionEnabled(source)) { __itemSelected = true; - if(unlikely((_AccessibilityManager::IsActivated()))) + if (unlikely((_AccessibilityManager::IsActivated()))) { FireItemTouchPressed(); } @@ -1329,11 +1348,11 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi __isTabSoundPlayed = IS_PLAYED_FEEDBACK(); - if(!__itemTouchMoved && __isPressedTimerEnabled) + if (!__itemTouchMoved && __isPressedTimerEnabled) { StopTouchPressedTimer(); - if(!IsContextItem()) + if (!IsContextItem()) { FireItemTouchPressed(); } @@ -1349,13 +1368,18 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi void _TableViewItem::FireItemTouchPressed() { - if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) + if (__isTouchCancelOnPressRelease == true) + { + return; + } + + if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; SetItemChanged(true); Invalidate(); } - else if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) { if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) { @@ -1377,7 +1401,7 @@ _TableViewItem::FireItemTouchPressed() } else { - if(__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + if (__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; SetItemChanged(true); @@ -1389,6 +1413,11 @@ _TableViewItem::FireItemTouchPressed() void _TableViewItem::FireItemTouchReleased() { + if (__isTouchCancelOnPressRelease == true) + { + return; + } + bool fireItemEvent = false; bool selectedItem = true; @@ -1406,13 +1435,13 @@ _TableViewItem::FireItemTouchReleased() { SetChecked(!checked); } - else if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) { SetChecked(!checked); SetCheckedAnimationEnabled(!checked); } } - else if(__releasedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + else if (__releasedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) { if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) { @@ -1439,7 +1468,7 @@ _TableViewItem::FireItemTouchReleased() } else { - if(__releasedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + if (__releasedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) { if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) @@ -1457,7 +1486,6 @@ _TableViewItem::FireItemTouchReleased() SetItemChanged(true); Invalidate(); - } else { @@ -1490,7 +1518,7 @@ _TableViewItem::FireItemTouchReleased() bool _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) { - if(IsReorderMode()) + if (IsReorderMode()) { return false; } @@ -1523,7 +1551,7 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo __itemSelected = false; DrawAnnexStyle(); } - else if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) { __annexOnOffHandlerMoved = true; @@ -1541,7 +1569,7 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo } else { - if(!IsIndividualSelectionEnabled(source)) + if (!IsIndividualSelectionEnabled(source)) { __itemSelected = false; __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; @@ -1559,6 +1587,8 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo bool _TableViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) { + __isTouchCancelOnPressRelease = true; + if (__isPressedTimerEnabled) { StopTouchPressedTimer(); @@ -1644,7 +1674,7 @@ _TableViewItem::OnChildAttached(const _Control& child) { pContainer->Activate(false); - if(!(pControl == static_cast<_Control*>(__pItemAnnexLeftDivider) + if (!(pControl == static_cast<_Control*>(__pItemAnnexLeftDivider) || pControl == static_cast<_Control*>(__pItemAnnexRightDivider) || pControl == static_cast<_Control*>(__pItemCover) || pControl == static_cast<_Control*>(__pItemDivider) @@ -1741,7 +1771,7 @@ _TableViewItem::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) __isPressedTimerEnabled = false; FireItemTouchPressed(); } - else if(&timer == __pReleasedTimer) + else if (&timer == __pReleasedTimer) { __isReleasedTimerEnabled = false; FireItemTouchReleased(); @@ -1789,7 +1819,10 @@ _TableViewItem::StopTouchPressedTimer(void) { result r = E_SUCCESS; - SysTryReturnVoidResult(NID_UI_CTRL, __pPressedTimer != null, E_SYSTEM, "[E_SYSTEM] Timer is invalid."); + if (__pPressedTimer == null) + { + return; + } if (__isPressedTimerEnabled) { @@ -1807,7 +1840,7 @@ _TableViewItem::StartTouchReleasedTimer() { result r = E_SUCCESS; - if(__pReleasedTimer == null) + if (__pReleasedTimer == null) { __pReleasedTimer = new (std::nothrow) Timer(); SysTryCatch(NID_UI_CTRL, __pReleasedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1816,7 +1849,7 @@ _TableViewItem::StartTouchReleasedTimer() SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage); } - if(!__isReleasedTimerEnabled) + if (!__isReleasedTimerEnabled) { r = __pReleasedTimer->Start(TOUCH_RELEASED_DURATION); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage); @@ -1842,7 +1875,10 @@ _TableViewItem::StopTouchReleasedTimer(void) { result r = E_SUCCESS; - SysTryReturnVoidResult(NID_UI_CTRL, __pReleasedTimer != null, E_SYSTEM, "[E_SYSTEM] Timer is invalid."); + if (__pReleasedTimer == null) + { + return; + } if (__isReleasedTimerEnabled) { @@ -1997,7 +2033,7 @@ _TableViewItem::PlayCheckBoxAnimation(void) pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); - if(__pItemAnnex) + if (__pItemAnnex) { __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); __pItemAnnex->Invalidate(false); @@ -2059,13 +2095,13 @@ _TableViewItem::OnBoundsChanged(void) __pHeaderFooterItemText->SetBounds(textBounds); } - if(__pBitmapVisualElement != null) + if (__pBitmapVisualElement != null) { FloatRectangle bounds = GetBoundsF(); __pBitmapVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); } - if(__pAccessibilityElement != null) + if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height)); } @@ -2085,7 +2121,7 @@ _TableViewItem::SetDrawingProperty(_ItemDrawingProperty* pDrawingProperty) CreateItemCover(); } - if(__pDrawingProperty->itemDividerEnabled) + if (__pDrawingProperty->itemDividerEnabled) { CreateItemDivider(); } @@ -2110,20 +2146,20 @@ _TableViewItem::DrawItemBackground(void) SetItemHighlightBounds(*__pHighlightVisualElement, CalculateItemHighlightBounds()); __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); - if(pDrawBitmap != null && __enabledState) + if (pDrawBitmap != null && __enabledState) { - if(__pBitmapVisualElement == null) + if (__pBitmapVisualElement == null) { return; } String imagePath = null; - if(_BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap) == false) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap) == false) { imagePath = _BitmapImpl::GetInstance(*pDrawBitmap)->GetFileName(); } - if(imagePath.IsEmpty() == false) + if (imagePath.IsEmpty() == false) { __pBitmapVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() /255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); __pBitmapVisualElement->SetImageSource(imagePath); @@ -2139,7 +2175,7 @@ _TableViewItem::DrawItemBackground(void) } } - if(IsContextItem()) + if (IsContextItem()) { DrawContextItemBackground(); } @@ -2149,14 +2185,14 @@ _TableViewItem::DrawItemBackground(void) } else { - if(__enabledState) + if (__enabledState) { if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) { SetBackgroundColor(Color(0, 0, 0, 0)); __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); } - else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + else if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) { __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); } @@ -2282,11 +2318,11 @@ _TableViewItem::DrawSectionStyleBackground(void) if (__enabledState) { - if(__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED) + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED) { if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2294,7 +2330,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2302,7 +2338,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2310,7 +2346,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2319,7 +2355,7 @@ _TableViewItem::DrawSectionStyleBackground(void) GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight); - if(pSectionPressBg) + if (pSectionPressBg) { pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionPressBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); } @@ -2332,7 +2368,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else { - if(bgColor != null) + if (bgColor != null) { pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); } @@ -2348,7 +2384,7 @@ _TableViewItem::DrawSectionStyleBackground(void) { if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2356,7 +2392,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2364,7 +2400,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2372,7 +2408,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { - if(IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED)) + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); @@ -2380,7 +2416,7 @@ _TableViewItem::DrawSectionStyleBackground(void) } GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); - if(pSectionDisabledBg) + if (pSectionDisabledBg) { pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionDisabledBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); } @@ -2546,9 +2582,9 @@ _TableViewItem::DrawContextItemBackground(void) pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); - if(__enabledState) + if (__enabledState) { - if(bgColor == null) + if (bgColor == null) { GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor); } @@ -2636,7 +2672,7 @@ _TableViewItem::DrawCheckBox(void) float annexWidth = 0.0f; float annexHeight = 0.0f; - if(__enabledState) + if (__enabledState) { if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) { @@ -2722,7 +2758,7 @@ _TableViewItem::DrawRadioBox(void) float annexWidth = 0.0f; float annexHeight = 0.0f; - if(__enabledState) + if (__enabledState) { if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) { @@ -2804,7 +2840,7 @@ _TableViewItem::DrawOnOffButton(void) if (IsChecked() == true) { - if(__enabledState) + if (__enabledState) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); } @@ -2815,7 +2851,7 @@ _TableViewItem::DrawOnOffButton(void) } else { - if(__enabledState) + if (__enabledState) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); } @@ -2826,7 +2862,7 @@ _TableViewItem::DrawOnOffButton(void) } SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[E_SYSTEM] OnOffButtonHandler image load failed"); - if(__enabledState) + if (__enabledState) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton); } @@ -2915,12 +2951,12 @@ _TableViewItem::AdjustAnnexOnOffHandlerPosition() handlerBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButtonHandler); - if(__annexOnOffHandlerMoved) + if (__annexOnOffHandlerMoved) { - if(annexStartPositionX <= __annexOnOffHandlerPositionX + if (annexStartPositionX <= __annexOnOffHandlerPositionX && annexEndPositionX >= __annexOnOffHandlerPositionX) { - if(((annexEndPositionX - annexStartPositionX) / 2) < (__annexOnOffHandlerPositionX + (handlerBounds.width / 2)) - annexStartPositionX ) + if (((annexEndPositionX - annexStartPositionX) / 2) < (__annexOnOffHandlerPositionX + (handlerBounds.width / 2)) - annexStartPositionX ) { handlerPositionX = annexEndPositionX; SetChecked(true); @@ -2935,7 +2971,7 @@ _TableViewItem::AdjustAnnexOnOffHandlerPosition() else { SetChecked(!IsChecked()); - if(IsChecked()) + if (IsChecked()) { handlerPositionX = annexEndPositionX; } @@ -3004,7 +3040,7 @@ _TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) handlerBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButtonHandler); handlerBounds.y = backgroundBounds.y; - if(IsChecked()) + if (IsChecked()) { handlerBounds.x = backgroundBounds.width - handlerBounds.width - annexMargin; } @@ -3016,16 +3052,16 @@ _TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) nextHandlerX = handlerBounds.x + (touchEndPosition - __annexTouchStartPosition); annexX = __pItemAnnex->GetBoundsF().x; - if((annexX + nextHandlerX + handlerBounds.width) < (annexX + annexWidth + annexMargin) + if ((annexX + nextHandlerX + handlerBounds.width) < (annexX + annexWidth + annexMargin) && (annexX + nextHandlerX) > annexX) { handlerBounds.x = nextHandlerX; } - else if(_FloatCompareGE((annexX + nextHandlerX + handlerBounds.width), (annexX + annexWidth + annexMargin))) + else if (_FloatCompareGE((annexX + nextHandlerX + handlerBounds.width), (annexX + annexWidth + annexMargin))) { handlerBounds.x = backgroundBounds.width - handlerBounds.width - annexMargin; } - else if(_FloatCompareLE((annexX + nextHandlerX), annexX)) + else if (_FloatCompareLE((annexX + nextHandlerX), annexX)) { handlerBounds.x = backgroundBounds.x + annexMargin; } @@ -3073,7 +3109,7 @@ _TableViewItem::DrawDetailButton(void) themeBackgroundBitmap = IS_CUSTOM_BITMAP(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL); - if(__enabledState) + if (__enabledState) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBg); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBg != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); @@ -3157,7 +3193,7 @@ _TableViewItem::DrawDetailButton(void) DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pDetailBgEffect), *pDetailBgEffect); } DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pReplacementDetail), *pReplacementDetail); - if(pDetailEffect) + if (pDetailEffect) { DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pDetailEffect), *pDetailEffect); } @@ -3187,7 +3223,7 @@ CATCH: void _TableViewItem::DrawItemDivider(void) { - if(__pItemDivider == null || __pItemTopDivider == null) + if (__pItemDivider == null || __pItemTopDivider == null) { return; } @@ -3214,12 +3250,12 @@ _TableViewItem::DrawItemDivider(void) __pItemDivider->SetVisibleState(true); __pItemTopDivider->SetVisibleState(true); - if( __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || + if ( __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED) { - if(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] != __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) + if (__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] != __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) { - if(__itemType != TABLE_VIEW_ITEM_TYPE_TITLE) + if (__itemType != TABLE_VIEW_ITEM_TYPE_TITLE) { __pItemDivider->SetVisibleState(false); } @@ -3230,7 +3266,7 @@ _TableViewItem::DrawItemDivider(void) if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) { - if(__pItemBgBitmap[__drawingStatus] != null) + if (__pItemBgBitmap[__drawingStatus] != null) { __pItemDivider->SetVisibleState(false); } @@ -3275,11 +3311,11 @@ _TableViewItem::DrawItemDivider(void) __pItemTopDivider->SetVisibleState(false); } - if(!IsContextItem()) + if (!IsContextItem()) { if (!__isSimpleLastItem) { - if(__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE) + if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE) { __pItemDivider->SetVisibleState(false); } @@ -3300,10 +3336,10 @@ _TableViewItem::DrawItemDivider(void) dividerBottomBounds.SetBounds(lineLeftMargin, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); } - if(__pItemDivider->GetVisibleState()) + if (__pItemDivider->GetVisibleState()) { __pItemDivider->SetBounds(dividerBottomBounds); - if(customDividerColor == bottomLineColor || __itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + if (customDividerColor == bottomLineColor || __itemType == TABLE_VIEW_ITEM_TYPE_TITLE) { __pItemDivider->SetBackgroundColor(bottomLineColor); } @@ -3315,10 +3351,10 @@ _TableViewItem::DrawItemDivider(void) __pItemDivider->Invalidate(); } - if(__pItemTopDivider->GetVisibleState()) + if (__pItemTopDivider->GetVisibleState()) { __pItemTopDivider->SetBounds(dividerTopBounds); - if(customDividerColor == bottomLineColor) + if (customDividerColor == bottomLineColor) { __pItemTopDivider->SetBackgroundColor(topLineColor); } @@ -3466,7 +3502,7 @@ _TableViewItem::CalculateAnnexBitmapBounds(float annexWidth, float annexHeight, width = annexWidth; } - if(annexHeight > bitmap.GetHeightF()) + if (annexHeight > bitmap.GetHeightF()) { topMargin = (annexHeight - bitmap.GetHeightF()) / 2; height = bitmap.GetHeightF(); @@ -3588,7 +3624,7 @@ _TableViewItem::SetSimpleItemContents(const Tizen::Base::String& text, const Tiz bitmapRect.height = elementHeight; } - if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_NORMAL) + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_NORMAL) { textRect.x = bitmapRect.x + elementWidth + leftMargin; elementWidth = itemWidth - textRect.x - leftMargin; @@ -3744,7 +3780,7 @@ _TableViewItem::GetSimpleGroupItemTextColor(TableViewItemDrawingStatus status) c result _TableViewItem::SetSimpleItemTextSize(int size) { - if(__simpleItemTextSize == size) + if (__simpleItemTextSize == size) { return E_SUCCESS; } @@ -3870,11 +3906,11 @@ _TableViewItem::SetPressedControl(TableViewItemPressedControl pressedControl) { __pressedControl = pressedControl; - if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) + if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; } - else if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) { if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) { @@ -3893,7 +3929,7 @@ _TableViewItem::SetPressedControl(TableViewItemPressedControl pressedControl) } else { - if(__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + if (__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; } @@ -3994,6 +4030,11 @@ _TableViewItem::AdjustAnnexBounds(void) if (!_FloatCompare(annexPositionX, annexBounds.x)) { __pItemAnnex->SetPosition(FloatPoint(annexPositionX, annexBounds.y)); + + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetBounds(__pItemAnnex->GetBoundsF()); + } } } } @@ -4009,6 +4050,10 @@ _TableViewItem::AdjustAnnexBounds(void) annexBounds.y = (itemBounds.height - annexBounds.height) / 2; __pItemAnnex->SetPosition(FloatPoint(annexBounds.x, annexBounds.y)); + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetBounds(__pItemAnnex->GetBoundsF()); + } } void @@ -4302,10 +4347,10 @@ _TableViewItem::SetIndividualSelectionEnabled(const _Control& control, bool enab _AccessibilityContainer* pContainer = const_cast<_Control*>(&control)->GetAccessibilityContainer(); pContainer->Activate(true); int controlCount = 0; - for(int i=0; i(__pItemAnnexLeftDivider) + if (pChildControl == static_cast<_Control*>(__pItemAnnexLeftDivider) || pChildControl == static_cast<_Control*>(__pItemAnnexRightDivider) || pChildControl == static_cast<_Control*>(__pItemCover) || pChildControl == static_cast<_Control*>(__pItemDivider) @@ -4317,7 +4362,7 @@ _TableViewItem::SetIndividualSelectionEnabled(const _Control& control, bool enab controlCount++; } - if(controlCount == 0 || __individualSelectionControls.GetCount() == controlCount) + if (controlCount == 0 || __individualSelectionControls.GetCount() == controlCount) { GetAccessibilityContainer()->Activate(false); } @@ -4510,12 +4555,12 @@ _TableViewItem::SetAccessibilityElement(void) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if(pContainer != null) + if (pContainer != null) { - if(__pAccessibilityElement == null) + if (__pAccessibilityElement == null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pAccessibilityElement->SetName(L"TableViewItem"); @@ -4523,6 +4568,20 @@ _TableViewItem::SetAccessibilityElement(void) pContainer->AddElement(*__pAccessibilityElement); } __pAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height)); + + if (__pAccessibilityOnOffElement == null && __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + String hintText(L"Double tap to select"); + __pAccessibilityOnOffElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityOnOffElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAccessibilityOnOffElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); + __pAccessibilityOnOffElement->SetName(L"OnOffButton"); + __pAccessibilityOnOffElement->SetHint(hintText); + + pContainer->AddElement(*__pAccessibilityOnOffElement); + __pAccessibilityOnOffElement->SetBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)); + } } } @@ -4534,7 +4593,7 @@ _TableViewItem::GetAccessibilityElement(void) void _TableViewItem::SetAccessibilityElementTrait(void) { - if(__pAccessibilityElement == null) + if (__pAccessibilityElement == null) { return; } @@ -4545,7 +4604,7 @@ _TableViewItem::SetAccessibilityElementTrait(void) { case TABLE_VIEW_ANNEX_STYLE_NORMAL: GetItemIndex(groupIndex, itemIndex); - if(groupIndex != -1 && itemIndex == -1) + if (groupIndex != -1 && itemIndex == -1) { __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_GROUP_INDEX"); } @@ -4556,10 +4615,12 @@ _TableViewItem::SetAccessibilityElementTrait(void) break; case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: - case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + break; + case TABLE_VIEW_ANNEX_STYLE_DETAILED: __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); break; @@ -4575,7 +4636,7 @@ _TableViewItem::SetAccessibilityElementTrait(void) void _TableViewItem::SetAccessibilityElementValue(void) { - if(__pAccessibilityElement == null) + if (__pAccessibilityElement == null) { return; } @@ -4594,7 +4655,6 @@ _TableViewItem::SetAccessibilityElementValue(void) break; case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: - case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: if (IsChecked()) { __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); @@ -4605,6 +4665,23 @@ _TableViewItem::SetAccessibilityElementValue(void) } break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + if (IsChecked()) + { + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); + } + } + else + { + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF"); + } + } + break; + case TABLE_VIEW_ANNEX_STYLE_RADIO: if (IsChecked()) { @@ -4612,7 +4689,7 @@ _TableViewItem::SetAccessibilityElementValue(void) } else { - __pAccessibilityElement->SetValue(L"Unselected"); + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); } break; @@ -4623,14 +4700,16 @@ _TableViewItem::SetAccessibilityElementValue(void) void _TableViewItem::SetAccessibilityElementLabel(void) { - if(__pAccessibilityElement == null) + if (__pAccessibilityElement == null) { return; } - if(__pAccessibilityElement->GetLabel().GetLength() > 0) + + if (__pAccessibilityElement->IsPublicLabelUpdated()) { return; } + String accessibilityLabel; String space = L" "; int childControlCount = GetChildCount(); @@ -4724,23 +4803,49 @@ _TableViewItem::OnAccessibilityActionPerformed(const _AccessibilityContainer& co case TABLE_VIEW_ANNEX_STYLE_MARK: if (IsChecked()) { - _AccessibilityManager::GetInstance()->ReadContent(L"ticked"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_TICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"unticked"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_UNTICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } break; - case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: - case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: if (IsChecked()) { - _AccessibilityManager::GetInstance()->ReadContent(L"On"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"Off"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + if (&element == __pAccessibilityOnOffElement && IsEnabled()) + { + if (IsChecked()) + { + SetChecked(false); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + SetChecked(true); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } } break; @@ -4750,14 +4855,17 @@ _TableViewItem::OnAccessibilityActionPerformed(const _AccessibilityContainer& co case TABLE_VIEW_ANNEX_STYLE_RADIO: if (IsChecked()) { - _AccessibilityManager::GetInstance()->ReadContent(L"selected"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } else { - _AccessibilityManager::GetInstance()->ReadContent(L"unselected"); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); } break; - default: break; } @@ -4784,7 +4892,7 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { return false; } - + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); _KeyCode keyCode = keyInfo.GetKeyCode(); IListT<_Control*>* pFocusList = GetFocusListN(); SysTryReturn(NID_UI_CTRL, pFocusList != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult())); @@ -4808,32 +4916,9 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) switch (keyCode) { case _KEY_LEFT: - if (IsFocused()) - { - if (pChildControl == null) - { - for (int i=count-1; i>=0; i--) - { - pFocusList->GetAt(i, pChildControl); - if (pChildControl == null) - { - continue; - } - - if (pChildControl->IsFocusable()) - { - break; - } - else - { - pChildControl = null; - } - } - } - } - else + if (!IsFocused()) { - for(int i=count-1; i>=0; i--) + for (int i=count-1; i>=0; i--) { pFocusList->GetAt(i, pChildControl); if (pChildControl == null) @@ -4849,7 +4934,7 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) break; } - for(int j=i-1; j>=0; j--) + for (int j=i-1; j>=0; j--) { pFocusList->GetAt(j, pChildControl); if (pChildControl == null) @@ -4857,7 +4942,8 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) continue; } - if (pChildControl->IsFocusable()) + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) { break; } @@ -4869,22 +4955,32 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) break; } } - } - if (pChildControl) - { - pChildControl->SetFocused(true); - pChildControl->DrawFocus(); - } - else - { - _Control* pParentControl = pFocusedControl->GetParent(); - _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); - - if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused()) + if (pChildControl && pChildControl->GetEnableState() + && pChildControl->GetVisibleState() && pChildControl->IsFocusable()) { - pItem->SetFocused(true); - pItem->DrawFocus(); + if (pParent != null) + { + pParent->SetAnnexFocused(true); + } + pChildControl->SetFocused(true); + pChildControl->DrawFocus(); + } + else + { + _Control* pParentControl = pFocusedControl->GetParent(); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); + + if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused() + && pItem->GetVisibleState() && pItem->IsFocusable()) + { + if (pParent != null) + { + pParent->SetAnnexFocused(false); + } + pItem->SetFocused(true); + pItem->DrawFocus(); + } } } break; @@ -4902,7 +4998,8 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) continue; } - if (pChildControl->IsFocusable()) + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) { break; } @@ -4915,7 +5012,7 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } else { - for(int i=0; iGetAt(i, pChildControl); if (pChildControl == null) @@ -4939,7 +5036,8 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) continue; } - if (pChildControl->IsFocusable()) + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) { break; } @@ -4953,21 +5051,15 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } } - if (pChildControl) + if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState() + && pChildControl->IsFocusable()) { - pChildControl->SetFocused(true); - pChildControl->DrawFocus(); - } - else - { - _Control* pParentControl = pFocusedControl->GetParent(); - _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); - - if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused()) + if (pParent != null) { - pItem->SetFocused(true); - pItem->DrawFocus(); + pParent->SetAnnexFocused(true); } + pChildControl->SetFocused(true); + pChildControl->DrawFocus(); } break; @@ -5025,7 +5117,7 @@ _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) _KeyCode keyCode = keyInfo.GetKeyCode(); - if(keyCode == _KEY_ENTER) + if (keyCode == _KEY_ENTER) { _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); SysTryReturn(NID_UI_CTRL, pParent != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult())); @@ -5086,7 +5178,7 @@ _TableViewItem::GetPreviousFocusChildControl(const _Control& source) float position = 0.0f; _Control* destination = null; - for(int i=0; iGetChild(i); if (pChildControl != null && pChildControl->IsFocusable()) @@ -5138,7 +5230,7 @@ _TableViewItem::GetNextFocusChildControl(const _Control& source) float position = 0.0f; _Control* destination = null; - for(int i=0; iGetChild(i); if (pChildControl != null && pChildControl->IsFocusable()) @@ -5186,5 +5278,50 @@ _TableViewItem::IsTouchPressOnScroll(void) const return __isTouchPressOnScroll; } +void +_TableViewItem::OnVisibleStateChanged(void) +{ + if (IsFocused()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnAncestorEnableStateChanged(const _Control& control) +{ + if (IsFocused()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnAncestorVisibleStateChanged(const _Control& control) +{ + if (IsFocused()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnFocusableStateChanged(bool focusableState) +{ + if (IsFocused() && !focusableState) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::SetPublicLabelUpdate(bool resetPublicLabelUpdate) +{ + if (__pAccessibilityElement) + { + __pAccessibilityElement->SetPublicLabelUpdate(resetPublicLabelUpdate); + } +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp index 6223711..1cca16a 100644 --- a/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp @@ -126,8 +126,6 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) TableViewGroupItem* pGroupItem = null; TableViewItemTag index = {groupIndex, itemIndex}; -// Label* pLabel = null; - if (itemIndex == -1) { if (__style == TABLE_VIEW_STYLE_SIMPLE) @@ -153,9 +151,11 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pHeaderItem == null) { GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); return __pDefaultItem; } + pHeaderItem->SetFocusable(false); return pHeaderItem; } @@ -163,6 +163,7 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pGroupItem == null) { GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); return __pDefaultItem; } @@ -180,6 +181,7 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) Tizen::Base::String contents = __pTableViewProvider->GetSectionHeader(groupIndex); HorizontalAlignment contentsAlignment = __pTableViewPresenter->GetSectionHeaderTextHorizontalAlignment(groupIndex); pItemCore->SetSectionHeaderFooterContents(contents, contentsAlignment, true); + pItemCore->SetFocusable(false); } } } @@ -190,6 +192,7 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pItem == null) { GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); return __pDefaultItem; } @@ -207,6 +210,7 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) Tizen::Base::String contents = __pTableViewProvider->GetSectionFooter(groupIndex); HorizontalAlignment contentsAlignment = __pTableViewPresenter->GetSectionFooterTextHorizontalAlignment(groupIndex); pItemCore->SetSectionHeaderFooterContents(contents, contentsAlignment, false); + pItemCore->SetFocusable(false); } } } diff --git a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp index cab5d28..69bdc9a 100644 --- a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp @@ -35,6 +35,7 @@ #include "FUiCtrl_TableViewPresenter.h" #include "FUiCtrl_TableViewItemProviderAdaptor.h" #include "FUi_CoordinateSystemUtils.h" +#include "FUi_FocusManagerImpl.h" #include "FUi_Math.h" #include "FUi_Window.h" @@ -76,6 +77,9 @@ _TableViewPresenter::_TableViewPresenter() , __scrollPositionOnFlickStarted(0) , __isAnimationCallbackBlocked(false) , __lockLoadItemWithScroll(false) + , __isRestoreFocus(false) + , __isAnnexFocused(false) + , __isTableViewFocused(false) , __itemTouchReleasedEventState(TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL) , __scrollToItemTag() { @@ -87,6 +91,9 @@ _TableViewPresenter::_TableViewPresenter() __expandableItemTag.groupIndex = -1; __expandableItemTag.itemIndex = -1; + + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; } _TableViewPresenter::~_TableViewPresenter() @@ -479,14 +486,20 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe return E_SYSTEM; } + if (groupIndex == topDrawnItemPos.groupIndex) + { + topDrawnItemPos.itemIndex = -1; + } + if (groupIndex < topDrawnItemPos.groupIndex) { topDrawnItemPos.groupIndex--; } - if ((groupIndex == topDrawnItemPos.groupIndex) && (GetItemCountAt(groupIndex) < topDrawnItemPos.itemIndex)) + if ((groupIndex == GetGroupCount()) && (GetGroupCount() > 0)) { - topDrawnItemPos.itemIndex = -1; + topDrawnItemPos.groupIndex--; + topDrawnItemPos.itemIndex = GetItemCountAt(GetGroupCount() - 1) - 1; } } else @@ -547,6 +560,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe ResetSweptItem(); } + pTableViewItem->SetPublicLabelUpdate(false); pTableViewItem->SetItemChanged(true); pTableViewItem->Invalidate(); pTableViewItem->AdjustContextItemBounds(); @@ -671,6 +685,13 @@ _TableViewPresenter::UpdateTableView(void) PreloadItem(topDrawnTag.groupIndex, topDrawnTag.itemIndex, shiftingDistance); + if (__isRestoreFocus) + { + __pTableView->SetFocused(true); + __pTableView->DrawFocus(); + __isRestoreFocus = false; + } + __statusChangedFlag = true; if (__itemTouchReleasedEventState == TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE) @@ -1240,9 +1261,22 @@ _TableViewPresenter::SetItemChecked(int groupIndex, int itemIndex, bool checked) TableViewItemTag itemTag = {groupIndex, itemIndex}; _TableViewItem *pItem = FindItem(itemTag); + + TableViewItemTag topDrawnItemTag = {-1, -1}; + GetTopDrawnItem(topDrawnItemTag); + + TableViewItemTag bottomDrawnItemTag = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemTag); + if (pItem != null) { - pItem->SetCheckedAnimationEnabled(checked); + if (((itemTag.groupIndex == topDrawnItemTag.groupIndex && itemTag.itemIndex >= topDrawnItemTag.itemIndex) + || itemTag.groupIndex > topDrawnItemTag.groupIndex) && + ((itemTag.groupIndex == bottomDrawnItemTag.groupIndex && itemTag.itemIndex <= bottomDrawnItemTag.itemIndex) + || itemTag.groupIndex < bottomDrawnItemTag.groupIndex)) + { + pItem->SetCheckedAnimationEnabled(checked); + } } result r = __pListModel->SetItemChecked(groupIndex, itemIndex, checked); @@ -1346,6 +1380,37 @@ _TableViewPresenter::SetLeftMargin(float leftMargin) } void +_TableViewPresenter::RestoreFocus(bool isRestoreFocus) +{ + __isRestoreFocus = isRestoreFocus; +} + +void +_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused) +{ + __isAnnexFocused = isAnnexFocused; +} + +void +_TableViewPresenter::SetTableViewFocused(bool focusStatus) +{ + if (focusStatus == false) + { + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + __isRestoreFocus = false; + __isAnnexFocused = false; + } + __isTableViewFocused = focusStatus; +} + +bool +_TableViewPresenter::IsTableViewFocused(void) +{ + return __isTableViewFocused; +} + +void _TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPosition) { TableViewStyle style = __pTableView->GetTableViewStyle(); @@ -3154,7 +3219,7 @@ _TableViewPresenter::LoadItemWithScrollPosition(float previousScrollPosition, fl return; } - while (pLastItem->GetBoundsF().y <= currentScrollPos + __pTableView->GetBoundsF().height) + while (pLastItem && (pLastItem->GetBoundsF().y <= currentScrollPos + __pTableView->GetBoundsF().height)) { TableViewItemTag nextItemPos = {-1, -1}; if (GetNextItemPosition(lastLoadedItemPos, nextItemPos)) @@ -3171,10 +3236,14 @@ _TableViewPresenter::LoadItemWithScrollPosition(float previousScrollPosition, fl if (nextItemPos.groupIndex != -1) { - _TableViewItem* item = LoadItem(nextItemPos.groupIndex, nextItemPos.itemIndex); + _TableViewItem* pItem = LoadItem(nextItemPos.groupIndex, nextItemPos.itemIndex); + if (pItem == null) + { + return; + } FloatRectangle scrollAreaBounds = GetScrollAreaBounds(); - if (item->GetBoundsF().y + item->GetBoundsF().height >= scrollAreaBounds.height) + if (pItem->GetBoundsF().y + pItem->GetBoundsF().height >= scrollAreaBounds.height) { AdjustClientAreaBounds(true); } @@ -5347,6 +5416,7 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf GetFirstItem(firstItemPos); if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) { + SetTableViewFocused(false); return false; } @@ -5358,6 +5428,7 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf GetFirstItem(firstItemPos); if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) { + SetTableViewFocused(false); return false; } } @@ -5367,14 +5438,21 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf itemPos.itemIndex = -1; } - pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + if (pItem == null) + { + SetTableViewFocused(false); + return false; + } - if (!pItem->GetVisibleState()) + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) { TableViewItemTag firstItemPos = {-1, -1}; GetFirstItem(firstItemPos); if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) { + SetTableViewFocused(false); return false; } @@ -5386,9 +5464,13 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); } - if (pItem->GetEnableState()) + if (pItem->GetEnableState() && pItem->GetVisibleState() + && pItem->IsFocusable()) { pItem->SetFocused(true); + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; pItem->DrawFocus(); break; } @@ -5396,6 +5478,7 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf } else { + SetTableViewFocused(false); return false; } } @@ -5418,6 +5501,7 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf GetLastItem(lastItemPos); if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) { + SetTableViewFocused(false); return false; } @@ -5428,15 +5512,22 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf itemPos.itemIndex = 0; } - pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + if (pItem == null) + { + SetTableViewFocused(false); + return false; + } - if (!pItem->GetVisibleState()) + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) { TableViewItemTag lastItemPos = {-1, -1}; GetLastItem(lastItemPos); if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) { + SetTableViewFocused(false); return false; } @@ -5447,21 +5538,30 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); } - if (pItem->GetEnableState()) + if (pItem->GetEnableState() && pItem->GetVisibleState() + && pItem->IsFocusable()) { pItem->SetFocused(true); pItem->DrawFocus(); + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; break; } } } else { + SetTableViewFocused(false); return false; } } break; + case _KEY_TAB: + SetTableViewFocused(false); + return false; + default: return false; } @@ -5495,7 +5595,7 @@ _TableViewPresenter::OnDrawFocus(void) return; } - _Control* pFocusedControl = null; + _Control* pFocusedControl = null; _Window* pTop = __pTableView->GetRootWindow(); if (pTop) { @@ -5506,71 +5606,192 @@ _TableViewPresenter::OnDrawFocus(void) _TableViewItem* pItem = null; TableViewItemTag itemPos = {-1, -1}; - if (pFocusedControl != null) - { - pTableView = dynamic_cast<_TableView*>(pFocusedControl); - if (pTableView != null) - { - GetFirstItem(itemPos); - if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) - { - itemPos.itemIndex = 0; - } - - ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); - pItem = FindItem(itemPos); - if (pItem != null) - { - if (pItem->GetEnableState()) - { - pItem->SetFocused(true); - pItem->DrawFocus(); - } - else - { - while (GetNextItemPosition(itemPos, itemPos)) - { - TableViewItemTag topDrawnItemIndex = {-1, -1}; - GetTopDrawnItem(topDrawnItemIndex); - if (topDrawnItemIndex.groupIndex <= itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex) - { - TableViewItemTag bottomDrawnItemIndex = {-1, -1}; - GetBottomDrawnItem(bottomDrawnItemIndex); - if (bottomDrawnItemIndex.groupIndex >= itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex) - { - pItem = FindItem(itemPos); - } - else - { - ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); - pItem = FindItem(itemPos); - } - } - else - { - ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); - pItem = FindItem(itemPos); - } - - if (pItem != null) - { - if (pItem->GetEnableState()) - { - pItem->SetFocused(true); - pItem->DrawFocus(); - break; - } - } - } - } - } - } - } + pItem = FindItem(__focusItemTag); + + if (__isRestoreFocus && pItem != null) + { + if (pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) + { + if (__isAnnexFocused) + { + pItem->DrawAnnexFocus(); + } + else + { + pItem->SetFocused(true); + pItem->DrawFocus(); + } + } + + __isRestoreFocus = false; + return; + } + + if (pFocusedControl != null) + { + pTableView = dynamic_cast<_TableView*>(pFocusedControl); + if (pTableView != null) + { + if (_FocusManagerImpl::GetInstance()->IsForwardDirection() == true) + { + GetFirstItem(itemPos); + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + { + itemPos.itemIndex = 0; + } + + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + pItem = FindItem(itemPos); + if (pItem != null) + { + if (pItem->GetEnableState() && pItem->GetVisibleState() + && pItem->IsFocusable()) + { + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; + pItem->SetFocused(true); + pItem->DrawFocus(); + } + else + { + while (GetNextItemPosition(itemPos, itemPos)) + { + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetTopDrawnItem(topDrawnItemIndex); + if (topDrawnItemIndex.groupIndex <= itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + if (bottomDrawnItemIndex.groupIndex >= itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex) + { + pItem = FindItem(itemPos); + } + else + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + pItem = FindItem(itemPos); + } + } + else + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + pItem = FindItem(itemPos); + } + + if (pItem != null) + { + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) + { + TableViewItemTag lastItemPos = {-1, -1}; + GetLastItem(lastItemPos); + + if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) + { + return; + } + + continue; + } + else + { + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; + pItem->SetFocused(true); + pItem->DrawFocus(); + break; + } + } + } + } + } + } + else + { + GetLastItem(itemPos); + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + pItem = FindItem(itemPos); + + if (pItem != null) + { + if (pItem->GetEnableState() && pItem->GetVisibleState() + && pItem->IsFocusable()) + { + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; + pItem->SetFocused(true); + pItem->DrawFocus(); + } + else + { + while (GetPreviousItemPosition(itemPos, itemPos)) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + + if (bottomDrawnItemIndex.groupIndex >= itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex) + { + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetTopDrawnItem(topDrawnItemIndex); + if (topDrawnItemIndex.groupIndex <= itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex) + { + pItem = FindItem(itemPos); + } + else + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + pItem = FindItem(itemPos); + } + } + else + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + pItem = FindItem(itemPos); + } + + if (pItem != null) + { + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) + { + TableViewItemTag firstItemPos = {-1, -1}; + GetFirstItem(firstItemPos); + if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) + { + return; + } + + continue; + } + else + { + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; + pItem->SetFocused(true); + pItem->DrawFocus(); + break; + } + } + } + } + } + } + } + } } void _TableViewPresenter::OnFocusModeStateChanged(void) { + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + __isRestoreFocus = false; + __isAnnexFocused = false; + _Window* pTop = __pTableView->GetRootWindow(); if (pTop != null) @@ -5584,6 +5805,49 @@ _TableViewPresenter::OnFocusModeStateChanged(void) } } +void +_TableViewPresenter::OnVisibleStateChanged(void) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnAncestorEnableStateChanged(const _Control& control) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnAncestorVisibleStateChanged(const _Control& control) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnFocusableStateChanged(bool focusableState) +{ + if (!focusableState) + { + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } + } +} + bool _TableViewPresenter::GetAccessibilityElementFocusedState(void) { diff --git a/src/ui/controls/FUiCtrl_TokenEdit.cpp b/src/ui/controls/FUiCtrl_TokenEdit.cpp index f1dc95b..daeea4f 100644 --- a/src/ui/controls/FUiCtrl_TokenEdit.cpp +++ b/src/ui/controls/FUiCtrl_TokenEdit.cpp @@ -600,7 +600,7 @@ _TokenEdit::UpdateAccessibilityElement(EditAccessibilityElementType type) { pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + GetGuideText() + GetText()); } - pTextAccessibilityElement->SetHint(L"double tap to edit"); + pTextAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); } break; @@ -739,8 +739,6 @@ _TokenEdit::OnDrawFocus(void) __pTokenEditPresenter->SetDrawFocusState(true); - RefreshFocusUi(); - return; } @@ -753,20 +751,4 @@ _TokenEdit::OnFocusModeStateChanged(void) return; } -void -_TokenEdit::RefreshFocusUi(void) -{ - int focusedTokenIndex = __pTokenEditPresenter->GetFocusedTokenIndex(); - - if (focusedTokenIndex == -1) - { - _Control::OnDrawFocus(); - } - else - { - _Control::OnFocusLost(*this); - } - - return; -} }}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp index 43e6623..abe7668 100644 --- a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -158,7 +158,7 @@ CATCH: delete pTextObject; pTextObject = null; - if (__pVisualElement) + if (__pVisualElement != null) { __pVisualElement->Destroy(); __pVisualElement = null; @@ -176,7 +176,7 @@ _Token::ResetToken(const String& text) result r = E_SUCCESS; FloatDimension textSize; - if (__pTextBuffer) + if (__pTextBuffer != null) { delete[] __pTextBuffer; __pTextBuffer = null; @@ -228,7 +228,7 @@ _Token::SetBounds(FloatRectangle bounds) { result r = E_SUCCESS; displayRect = bounds; - if (__pVisualElement) + if (__pVisualElement != null) { __pVisualElement->SetBounds(bounds); } @@ -252,7 +252,7 @@ _Token::~_Token(void) delete[] __pTextBuffer; __pTextBuffer = null; - if (__pVisualElement) + if (__pVisualElement != null) { __pVisualElement->Destroy(); __pVisualElement = null; @@ -378,12 +378,12 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - if (pEditVisualElement && pCursorVisualElement) + if (pEditVisualElement != null && pCursorVisualElement != null) { VisualElement* pCursorParent = pCursorVisualElement->GetParent(); if (pCursorParent != pEditVisualElement) { - if (pCursorParent) + if (pCursorParent != null) { pCursorParent->DetachChild(*pCursorVisualElement); pEditVisualElement->AttachChild(*pCursorVisualElement); @@ -391,7 +391,7 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) } } - if (__pTokenList) + if (__pTokenList != null) { __pTokenList->RemoveAll(true); delete __pTokenList; @@ -413,7 +413,7 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) delete __pTokenBgFocusEffectBitmap; __pTokenBgFocusEffectBitmap = null; - if (__pDescriptionTextVisualElement) + if (__pDescriptionTextVisualElement != null) { __pDescriptionTextVisualElement->Destroy(); __pDescriptionTextVisualElement = null; @@ -422,11 +422,8 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) delete __pDescriptionTextTextObject; __pDescriptionTextTextObject = null; - if (__pTimingFunction) - { - delete __pTimingFunction; - __pTimingFunction = null; - } + delete __pTimingFunction; + __pTimingFunction = null; RemoveChildAccessibilityElements(); @@ -454,7 +451,7 @@ _TokenEditPresenter::Initialize(const _Control& control) SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); TextObject* pTextObject = GetTextObject(); - if (pTextObject) + if (pTextObject != null) { pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); @@ -620,7 +617,7 @@ _TokenEditPresenter::DrawText(void) if ((__isEditingToken) && (__editingTokenIndex >= 0)) { _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of token."); @@ -634,7 +631,7 @@ _TokenEditPresenter::DrawText(void) Color selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED); Bitmap* pReplacementColorBackgroundBitmap = null; - if (__pTokenBgBitmap) + if (__pTokenBgBitmap != null) { pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor); @@ -652,7 +649,7 @@ _TokenEditPresenter::DrawText(void) pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); } - if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap)) + if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap)) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap)) { @@ -676,7 +673,7 @@ _TokenEditPresenter::DrawText(void) { _VisualElement* pTextVisualElement = null; pTextVisualElement = GetTextVisualElement(); - if (pTextVisualElement) + if (pTextVisualElement != null) { _EditPresenter::DrawText(); } @@ -700,7 +697,7 @@ _TokenEditPresenter::Draw(Canvas& canvas) { InitializeAtFirstDrawing(); - if (IsFocused() == true) + if (IsFocused()) { ShowKeypad(false); } @@ -731,7 +728,7 @@ _TokenEditPresenter::Draw(Canvas& canvas) _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get visual element of token."); @@ -794,12 +791,6 @@ _TokenEditPresenter::DrawToken(int count) isCustomBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_NORMAL); isCustomFocusBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_FOCUS); - - if (__drawFocusState) - { - __pTokenEdit->RefreshFocusUi(); - } - if (count == -1) { tokenCount = __pTokenList->GetCount(); @@ -848,7 +839,7 @@ _TokenEditPresenter::DrawToken(int count) if (__pressedTokenIndex == i && IsFocused()) { - if (__pTokenBgBitmap) + if (__pTokenBgBitmap != null) { pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor); @@ -866,8 +857,7 @@ _TokenEditPresenter::DrawToken(int count) pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); } - - if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap)) + if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap)) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap)) { @@ -889,7 +879,7 @@ _TokenEditPresenter::DrawToken(int count) tokenBgColor = disabledTokenColor; } - if (__pTokenBgBitmap) + if (__pTokenBgBitmap != null) { pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), tokenBgColor); @@ -908,7 +898,7 @@ _TokenEditPresenter::DrawToken(int count) } - if (__pTokenBgNormalEffectBitmap && (!isCustomBitmap)) + if (__pTokenBgNormalEffectBitmap != null && (!isCustomBitmap)) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgNormalEffectBitmap)) { @@ -923,7 +913,7 @@ _TokenEditPresenter::DrawToken(int count) if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken)) { - if (__pTokenBgReplacementFocusBitmap) + if (__pTokenBgReplacementFocusBitmap != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap)) { @@ -935,7 +925,7 @@ _TokenEditPresenter::DrawToken(int count) } } - if (__pTokenBgFocusEffectBitmap && (!isCustomFocusBitmap)) + if (__pTokenBgFocusEffectBitmap != null && (!isCustomFocusBitmap)) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap)) { @@ -1214,7 +1204,7 @@ _TokenEditPresenter::GetTokenAt(int index) const _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); - if (pToken) + if (pToken != null) { tempString = pToken->GetText(); } @@ -1389,7 +1379,9 @@ _TokenEditPresenter::SetTokenSelected(int index, bool selected) SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), E_OUT_OF_RANGE, "index (%d) is out of range."); - if (selected == false) + SetDrawFocusState(false); // Manual simulation of pressed token. + + if (!selected) { __pressedTokenIndex = -1; } @@ -1604,7 +1596,7 @@ _TokenEditPresenter::SetInitialBounds(void) float textObjectMaxHeight = GetMaxTextHeight(); textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f; - if (__pTokenList) + if (__pTokenList != null) { int tokenCount = __pTokenList->GetCount(); @@ -1687,7 +1679,7 @@ _TokenEditPresenter::GetDescriptionTextRect() const Rectangle _TokenEditPresenter::GetTextBounds(void) const { - if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0) + if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0) { _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex)); SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token."); @@ -1712,7 +1704,7 @@ _TokenEditPresenter::GetTextBounds(void) const FloatRectangle _TokenEditPresenter::GetTextBoundsF(void) const { - if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0) + if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0) { _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex)); SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token."); @@ -1923,7 +1915,7 @@ _TokenEditPresenter::DrawDescriptionText(void) GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize); pDescriptionFont = GetFont(); - if (pDescriptionFont) + if (pDescriptionFont != null) { float editFontSize = GetTextSize(); (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(descriptionTextSize); @@ -1938,7 +1930,7 @@ _TokenEditPresenter::DrawDescriptionText(void) pRootElement = __pTokenEdit->GetVisualElement(); SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); - if (!__pDescriptionTextVisualElement) + if (__pDescriptionTextVisualElement == null) { __pDescriptionTextVisualElement = new (std::nothrow) _VisualElement(); SysTryCatch(NID_UI_CTRL, __pDescriptionTextVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1972,7 +1964,7 @@ _TokenEditPresenter::DrawDescriptionText(void) pDescriptionTextCanvas->Clear(); __pDescriptionTextTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pDescriptionTextTextObject->GetTextLength()); - if (IsFocused() == true) + if (IsFocused()) { if (__pDescriptionTextTextObject->GetTextLengthAt(0) < __pDescriptionTextTextObject->GetTextLength()) { @@ -1994,7 +1986,7 @@ _TokenEditPresenter::DrawDescriptionText(void) if (!__isTitleSliding) { _EditPresenter::StopTitleSlidingTimer(); - if (__pDescriptionTextTextObject->IsActionOn() == true) + if (__pDescriptionTextTextObject->IsActionOn()) { _EditPresenter::StartTitleSlidingTimer(); __isTitleSliding = true; @@ -2083,7 +2075,7 @@ _TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const for (int i = 0; i < tokenCount; i++) { _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { FloatRectangle tokenRect = pToken->displayRect; if (tokenRect.Contains(point)) @@ -2152,7 +2144,7 @@ _TokenEditPresenter::RecalculateTokenBounds(float position) _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -2213,7 +2205,7 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo) _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -2291,7 +2283,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _ pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex)); bool isParentChanged = false; - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); @@ -2329,7 +2321,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex)); - if (pToken) + if (pToken != null) { pToken->currTokenLength = inputTokenString.GetLength(); } @@ -2354,13 +2346,13 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } - if ((__isEditingToken == true) && (__pressedTokenIndex != -1)) + if ((__isEditingToken) && (__pressedTokenIndex != -1)) { r = AttachCursorToToken(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } - if (__isEditingToken == false) + if (!__isEditingToken) { SetCursorDisabled(true); } @@ -2385,7 +2377,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _ pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); bool isParentChanged = false; - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); @@ -2613,9 +2605,9 @@ _TokenEditPresenter::DrawScrollBar(void) return E_SYSTEM; } - if (IsFocused() == false) + if (!IsFocused()) { - if (__isTouchMoveInProgress == false) + if (!__isTouchMoveInProgress) { pScroll->SetScrollVisibility(false); return E_SUCCESS; @@ -2738,10 +2730,10 @@ _TokenEditPresenter::OnFocusGained(void) { pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); - if (pTokenVisualElement) + if (pTokenVisualElement != null) { pTokenVisualElement->SetShowState(true); } @@ -2771,7 +2763,7 @@ _TokenEditPresenter::OnFocusGained(void) } TextObject* pTextObject = GetTextObject(); - if (pTextObject) + if (pTextObject != null) { pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); pTextObject->Compose(); @@ -2800,19 +2792,7 @@ _TokenEditPresenter::OnFocusLost(void) if (__editingTokenIndex >= 0) { - _Token* pToken = null; - pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) - { - if (GetText().GetLength() > 0) - { - OnTextCommitted(L"\n"); - } - else - { - RemoveTokenAt(__editingTokenIndex, true); - } - } + OnTextCommitted(L"\n"); } else { @@ -2828,7 +2808,7 @@ _TokenEditPresenter::OnFocusLost(void) if (__autoShrink) { _Scroll* pScroll = GetScrollBar(); - if (pScroll) + if (pScroll != null) { pScroll->SetScrollVisibility(false); } @@ -2839,7 +2819,7 @@ _TokenEditPresenter::OnFocusLost(void) for (int i = 0; i < tokenCount; i++) { pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -2859,10 +2839,10 @@ _TokenEditPresenter::OnFocusLost(void) for (int i = visibleTokenCount; i < tokenCount; i++) { pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); - if (pTokenVisualElement) + if (pTokenVisualElement != null) { pTokenVisualElement->SetShowState(false); } @@ -2892,7 +2872,7 @@ _TokenEditPresenter::OnFocusLost(void) } TextObject* pTextObject = GetTextObject(); - if (pTextObject) + if (pTextObject != null) { pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); pTextObject->Compose(); @@ -2969,7 +2949,7 @@ _TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& to _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { float tokenX = pToken->displayRect.x; float tokenY = pToken->displayRect.y; @@ -2998,7 +2978,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t } _Scroll* pScroll = GetScrollBar(); - if (pScroll) + if (pScroll != null) { pScroll->SetScrollVisibility(false); } @@ -3014,7 +2994,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t if (__editingTokenIndex >= 0) { pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { int tokenX = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.x); int tokenY = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.y); @@ -3137,7 +3117,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) } else { - if (__isEditingToken == false) + if (!__isEditingToken) { __pressedTokenIndex = -1; __focusedTokenIndex = -1; @@ -3180,7 +3160,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) { if (GetTextLength() == 0 && GetTokenCount()) // There is no candidate token. { - if (__isEditingToken == true) + if (__isEditingToken) { _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); @@ -3193,7 +3173,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3216,7 +3196,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) { _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -3244,7 +3224,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3268,7 +3248,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -3293,7 +3273,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) if (__animatingIndex == (GetTokenCount() - 1)) { pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3302,7 +3282,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) } pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3349,7 +3329,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) } //Backspace on Blocked text, delete full block - if (IsBlocked() == true) + if (IsBlocked()) { GetBlockRange(start, end); } @@ -3375,11 +3355,11 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) { InitializeCopyPasteManager(); } - if (IsBlocked() == true) + if (IsBlocked()) { ReleaseTextBlock(); } - if (__isEditingToken != true) + if (!__isEditingToken) { DrawText(); } @@ -3402,7 +3382,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) Rectangle currBounds = __pTokenEdit->GetBounds(); DeleteText(start, end); __previousCursorPosition = start; - if (__isEditingToken != true) + if (!__isEditingToken) { DrawText(); } @@ -3414,7 +3394,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) { pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { float tokenHeight = 0.0f; float tokenVerticalSpacing = 0.0f; @@ -3562,7 +3542,7 @@ _TokenEditPresenter::OnCursorTimerExpired(void) bool _TokenEditPresenter::IsTextBlockedInTokenEdit(void) const { - if ((IsBlocked() == true) && (__isEditingToken) && (__editingTokenIndex >= 0)) + if ((IsBlocked()) && (__isEditingToken) && (__editingTokenIndex >= 0)) { return true; } @@ -3577,7 +3557,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc if (GetTokenCount()) { //Scrolling is blocked when a popup is visible or when a text is blocked - if (IsBlocked() == true || __isLongPressed == true) + if (IsBlocked() || __isLongPressed) { return false; } @@ -3590,7 +3570,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc if (__touchPressInfo.y > 0.0f) { pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { float tokenX = pToken->displayRect.x; float tokenY = pToken->displayRect.y; @@ -3614,7 +3594,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc if (!(__pTokenEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL)) { _Scroll* pScroll = GetScrollBar(); - if (pScroll) + if (pScroll != null) { float tokenBottomMargin = 0.0f; GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); @@ -3654,7 +3634,7 @@ _TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -3685,7 +3665,7 @@ _TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation)); VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance()); - if (pPresentation && pAnimation) + if (pPresentation != null && pAnimation != null) { float diffX = 0.0f; float diffY = 0.0f; @@ -3778,10 +3758,10 @@ _TokenEditPresenter::ChangeInternalLayout(_ControlOrientation orientation) inputTokenString = replacementString; } + int index = __editingTokenIndex; + RemoveTokenAt(__editingTokenIndex, true); if (inputTokenString.GetLength() > 0) { - int index = __editingTokenIndex; - RemoveTokenAt(__editingTokenIndex, true); InsertTokenAt(index, inputTokenString); } } @@ -3868,7 +3848,7 @@ _TokenEditPresenter::AttachCursorToToken(void) _VisualElement* pTokenVisualElement = null; pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); @@ -3905,7 +3885,7 @@ _TokenEditPresenter::DetachCursorFromToken(void) pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3939,7 +3919,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void) pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex)); - if (pToken) + if (pToken != null) { pTokenVisualElement = pToken->GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element."); @@ -3987,7 +3967,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void) _Token* pToken = null; pToken = static_cast <_Token*>(__pTokenList->GetAt(i)); - if (pToken) + if (pToken != null) { pToken->SetBounds(pToken->displayRect); } @@ -4104,6 +4084,7 @@ _TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf { SetCursorDisabled(false); CheckTokenScrolling(); + __pTokenEdit->Invalidate(); } StartCursorTimer(); @@ -4174,7 +4155,7 @@ _TokenEditPresenter::AddChildAccessibilityElements(void) _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); - if (pContainer) + if (pContainer != null) { _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -4225,7 +4206,7 @@ _TokenEditPresenter::AppendTokenAccessibilityElement(void) _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); - if (pContainer) + if (pContainer != null) { _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -4233,7 +4214,7 @@ _TokenEditPresenter::AppendTokenAccessibilityElement(void) String labelText = pToken->GetText(); pAccessibilityElement->SetBounds(pToken->displayRect); pAccessibilityElement->SetLabel(labelText); - pAccessibilityElement->SetHint(L"double tap to edit"); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); pContainer->AddElement(*pAccessibilityElement); __accessibilityElements.Add(pAccessibilityElement); } @@ -4250,7 +4231,7 @@ _TokenEditPresenter::InsertTokenAccessibilityElementAt(int index) _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); - if (pContainer) + if (pContainer != null) { _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -4271,7 +4252,7 @@ _TokenEditPresenter::RemoveTokenAccessibilityElementAt(int index) _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); _AccessibilityElement* pAccessibilityElement = null; - if (pContainer) + if (pContainer != null) { if (__accessibilityElements.GetCount() > 0) { @@ -4299,7 +4280,7 @@ _TokenEditPresenter::UpdateTokenAccessibilityBounds(void) if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) { - if (pAccessibilityElement) + if (pAccessibilityElement != null) { pAccessibilityElement->SetBounds(pToken->displayRect); } @@ -4313,7 +4294,7 @@ _TokenEditPresenter::UpdateTitleAccessibilityBounds(const FloatRectangle& titleB { _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement(); - if (!pTitleAccessibilityElement) + if (pTitleAccessibilityElement == null) { return E_SUCCESS; } @@ -4395,7 +4376,7 @@ result _TokenEditPresenter::ScrollToTitleAccessibilityElement(void) { _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement(); - if (pTitleAccessibilityElement) + if (pTitleAccessibilityElement != null) { FloatRectangle titleTextBounds = pTitleAccessibilityElement->GetBounds(); if (titleTextBounds.y < 0) @@ -4441,10 +4422,10 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr r = __accessibilityElements.GetAt(__focusOutIndex, pPreviousAccessibilityElement); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); - if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y) //Left flick + if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y) //Left flick { pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex - 1)); - if (pToken) + if (pToken != null) { if (pToken->displayRect.y < 0.0f && __focusOutIndex > 0) { @@ -4456,10 +4437,10 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr } } - if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y) //Right flick + if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y) //Right flick { pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex + 1)); - if (pToken) + if (pToken != null) { if (pToken->displayRect.y + pToken->displayRect.height > __pTokenEdit->GetBoundsF().height) { @@ -4474,7 +4455,7 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr if (pToken == null) //Draw Cursor Accessibility Element { _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); - if (pCursorAccessibilityElement && pPreviousAccessibilityElement && pCursorAccessibilityElement != pPreviousAccessibilityElement) + if (pCursorAccessibilityElement != null && pPreviousAccessibilityElement != null && pCursorAccessibilityElement != pPreviousAccessibilityElement) { if (GetTextBoundsF().y - pPreviousAccessibilityElement->GetBounds().y > pPreviousAccessibilityElement->GetBounds().height) //check for different lines { @@ -4520,7 +4501,7 @@ _TokenEditPresenter::OnAccessibilityActionPerformed(const _AccessibilityContaine if (__pTokenEdit->IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode. { _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); - if (pCursorAccessibilityElement) + if (pCursorAccessibilityElement != null) { _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pCursorAccessibilityElement); _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); @@ -4636,14 +4617,14 @@ _TokenEditPresenter::PrepareFocusUiMode(void) void _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) { + FloatRectangle startValue(0.0f, 0.0f, 0.0f, 0.0f); + 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."); @@ -4654,14 +4635,11 @@ _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) 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."); + SysTryCatch(NID_UI_CTRL, pBoundsAnimation, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pBoundsAnimation->SetTimingFunction(__pTimingFunction); - FloatRectangle startValue = source.GetBounds(); + 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; @@ -4672,11 +4650,17 @@ _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); pBoundsAnimation->SetVisualElementAnimationTickEventListener(this); pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS); - source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation); - delete pBoundsAnimation; + AnimationTransaction::Begin(); + source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation); + source.AddAnimation("OpacityAnimation", *pOpacityAnimation); AnimationTransaction::Commit(); + delete pBoundsAnimation; + // fall through +CATCH: + delete pOpacityAnimation; + return; } diff --git a/src/ui/controls/FUiCtrl_Toolbar.cpp b/src/ui/controls/FUiCtrl_Toolbar.cpp index a22d7fd..b01da91 100644 --- a/src/ui/controls/FUiCtrl_Toolbar.cpp +++ b/src/ui/controls/FUiCtrl_Toolbar.cpp @@ -1395,11 +1395,17 @@ _Toolbar::RemoveAllButtons(void) { if (i == LEFT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + } } else if (i == RIGHT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + } } if (pButtonItem->GetChildCount() != 0) @@ -1478,11 +1484,17 @@ _Toolbar::RemoveButtonAt(ToolbarButton position) { if (position == LEFT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + } } else if (position == RIGHT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + } } if (__pButtonItems[position]->GetChildCount() != 0) @@ -1663,11 +1675,17 @@ _Toolbar::SetButton(ToolbarButton position, _Button* pButton) { if (position == LEFT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + } } else if (position == RIGHT_BUTTON) { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + } } if (__pButtonItems[position]->GetChildCount() != 0) @@ -1819,12 +1837,6 @@ _Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon) FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); - float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF(); - float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF(); - - bounds.y = bounds.y + topTouchMargin; - bounds.width = bounds.width - rightTouchMargin; - float height = 0.0f; GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height); @@ -1833,7 +1845,7 @@ _Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon) if (pBadgeIconLabel) { - pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, bounds.y, height, height)); + pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, 0, height, height)); pBadgeIconLabel->SetBackgroundBitmap(*pBadgeIcon); __pButtonItems[position]->AttachChild(*pBadgeIconLabel); @@ -1960,12 +1972,6 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); - float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF(); - float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF(); - - bounds.y = bounds.y + topTouchMargin; - bounds.width = bounds.width - rightTouchMargin; - if (existingBadgeIcon) { float fontSize = 0.0f; @@ -2000,7 +2006,7 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); } - existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, bounds.y, width, height)); + existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0, width, height)); existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); Integer tempNumber(number); @@ -3256,8 +3262,7 @@ _Toolbar::AddAccessibilityElement(ToolbarButton position, _Button* pButton) pButtonElement->SetName(name); pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); - FloatRectangle floatRect = GetButtonBoundsF(position); - pButtonElement->SetBounds(FloatRectangle(0,floatRect.y, pButton->GetBoundsF().width, floatRect.height)); + pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, pButton->GetBoundsF().width, pButton->GetBoundsF().height)); } } @@ -6416,7 +6421,7 @@ _Toolbar::ApplyUserGUI(ButtonType buttonType, _Button* pButton) } if (pPressedBackgroundEffectBitmap) { - //pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap); + pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap); delete pPressedBackgroundEffectBitmap; } if (pHighlightedBackgroundEffectBitmap) @@ -6426,7 +6431,7 @@ _Toolbar::ApplyUserGUI(ButtonType buttonType, _Button* pButton) } } - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) { Bitmap* pSubTitleEffectBitmap = null; Bitmap* pReColorSubTitleEffectBitmap = null; @@ -6446,7 +6451,7 @@ _Toolbar::ApplyUserGUI(ButtonType buttonType, _Button* pButton) delete pSubTitleEffectBitmap; delete pReColorSubTitleEffectBitmap; } - } + } //if (TOOLBAR_BUTTON == buttonType) else if (TOOLBAR_ITEM == buttonType) { Bitmap* pNormalBackgroundBitmap = null; @@ -7341,11 +7346,6 @@ _Toolbar::RealignItem(_Button* pButton, float textExtentSize) float largeTabTopMargin = 0.0f; float largeTabTextHeight = 0.0f; - float leftTouchMargin = pButton->GetLeftTouchMarginF(); - float topTouchMargin = pButton->GetTopTouchMarginF(); - float rightTouchMargin = pButton->GetRightTouchMarginF(); - float bottomTouchMargin = pButton->GetBottomTouchMarginF(); - GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_LEFT_MARGIN, GetOrientation(), sideMargin); GET_SHAPE_CONFIG(HEADER::ICON_TEXT_GAP, GetOrientation(), iconTextGap); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedTextAreaHeight); @@ -7529,36 +7529,36 @@ _Toolbar::RealignItem(_Button* pButton, float textExtentSize) if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null) { pButton->SetBitmap(_BUTTON_STATUS_NORMAL, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); } if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null) { pButton->SetBitmap(_BUTTON_STATUS_PRESSED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); } if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) { pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); } if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null) { pButton->SetBitmap(_BUTTON_STATUS_DISABLED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); } if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null) { pButton->SetBitmap(_BUTTON_STATUS_SELECTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); } @@ -7576,81 +7576,76 @@ _Toolbar::RealignButtonItem(_Button* pButton) float buttonItemWidth = pButton->GetSizeF().width; float buttonItemHeight = pButton->GetSizeF().height; - float leftTouchMargin = pButton->GetLeftTouchMarginF(); - float topTouchMargin = pButton->GetTopTouchMarginF(); - float rightTouchMargin = pButton->GetRightTouchMarginF(); - float bottomTouchMargin = pButton->GetBottomTouchMarginF(); - if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null) { pButton->SetBitmap(_BUTTON_STATUS_NORMAL, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); } if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null) { pButton->SetBitmap(_BUTTON_STATUS_PRESSED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); } if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) { pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); } if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null) { pButton->SetBitmap(_BUTTON_STATUS_DISABLED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); } if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null) { pButton->SetBitmap(_BUTTON_STATUS_SELECTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); } if (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL) != null) { pButton->SetEffectBitmap(_BUTTON_STATUS_NORMAL, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), *(pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))); } if (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED) != null) { pButton->SetEffectBitmap(_BUTTON_STATUS_PRESSED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), *(pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))); } if (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) { pButton->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), *(pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))); } if (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED) != null) { pButton->SetEffectBitmap(_BUTTON_STATUS_DISABLED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), *(pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))); } if (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED) != null) { pButton->SetEffectBitmap(_BUTTON_STATUS_SELECTED, - FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, - (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), *(pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))); } @@ -7697,39 +7692,32 @@ _Toolbar::RearrangeItems(void) float headerButtonItemHeight = 0.0f; float headerLeftMargin = 0.0f; float headerRightMargin = 0.0f; - float tabLeftMargin = 0.0f; - - float leftTouchMargin = 0.0f; - float topTouchMargin = 0.0f; - float rightTouchMargin = 0.0f; - float bottomTouchMargin = 0.0f; GET_SHAPE_CONFIG(HEADER::TOP_MARGIN, GetOrientation(), headerTopMargin); GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_GAP, GetOrientation(), buttonItemGap); GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin); GET_SHAPE_CONFIG(HEADER::RIGHT_MARGIN, GetOrientation(), headerRightMargin); - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin); - - GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin); - GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin); - GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin); - GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin); if (__pButtonItems[LEFT_BUTTON]) { - headerLeftButtonWidth = __pButtonItems[LEFT_BUTTON]->GetSizeF().width; + headerLeftButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[LEFT_BUTTON]->GetSizeF()).width; } if (__pButtonItems[RIGHT_BUTTON]) { - headerRightButtonWidth = __pButtonItems[RIGHT_BUTTON]->GetSizeF().width; + headerRightButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[RIGHT_BUTTON]->GetSizeF()).width; } - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) { GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight); } + else if (__style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin); + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), headerButtonItemHeight); + } else { GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin); @@ -7743,142 +7731,40 @@ _Toolbar::RearrangeItems(void) { if (__pButtonItems[LEFT_BUTTON]) { - if (__pButtonItems[LEFT_BUTTON]->GetText() == L"") - { - if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"") - { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, - headerRightButtonWidth, headerButtonItemHeight)); - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth, vmargin, - headerLeftButtonWidth, headerButtonItemHeight)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); - - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - else - { - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - - __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - } - else - { - __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)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0); - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); - - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - else - { - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, + headerRightButtonWidth, headerButtonItemHeight)); + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin, + headerLeftButtonWidth, headerButtonItemHeight)); - __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - } + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); } else { - if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"") - { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, - headerRightButtonWidth, headerButtonItemHeight)); - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth, vmargin, - headerLeftButtonWidth, headerButtonItemHeight)); + __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0); - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); - - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - else - { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - - __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - } - else + if (__style != TOOLBAR_TAB_WITH_TITLE) { - __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)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0); - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0); - - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } - else - { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - - __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); - } + __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); } } } else { - if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"") - { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, - headerRightButtonWidth, headerButtonItemHeight)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, + headerRightButtonWidth, headerButtonItemHeight)); - __itemArea.width -= (headerRightButtonWidth); - } - else - { - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - - __titleTextArea.width -= (headerRightButtonWidth); - __itemArea.width -= (headerRightButtonWidth); - } + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerRightButtonWidth); } else { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin, - headerRightButtonWidth, headerButtonItemHeight)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0); + __titleTextArea.width -= (headerRightButtonWidth); - __itemArea.width -= (headerRightButtonWidth); - } - else + if (__style != TOOLBAR_TAB_WITH_TITLE) { - //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - - __titleTextArea.width -= (headerRightButtonWidth); __itemArea.width -= (headerRightButtonWidth); } } @@ -7886,41 +7772,19 @@ _Toolbar::RearrangeItems(void) } else if (__pButtonItems[LEFT_BUTTON]) { - if (__pButtonItems[LEFT_BUTTON]->GetText() == L"") - { - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin, - headerLeftButtonWidth, headerButtonItemHeight)); - - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f); + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin, + headerLeftButtonWidth, headerButtonItemHeight)); - __itemArea.width -= (headerLeftButtonWidth); - } - else - { - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - - __titleTextArea.width -= (headerLeftButtonWidth); - __itemArea.width -= (headerLeftButtonWidth); - } + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth); } else { - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth + 1, vmargin, - headerLeftButtonWidth, headerButtonItemHeight)); + __titleTextArea.width -= (headerLeftButtonWidth); - if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + if (__style != TOOLBAR_TAB_WITH_TITLE) { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0); - - __itemArea.width -= (headerLeftButtonWidth); - } - else - { - //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin); - - __titleTextArea.width -= (headerLeftButtonWidth); __itemArea.width -= (headerLeftButtonWidth); } } @@ -7952,14 +7816,14 @@ _Toolbar::RearrangeItems(void) { SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT, (__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, - topTouchMargin + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2); + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); } if (__pButtonItems[RIGHT_BUTTON] && GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT) != ANIMATION_STOPPED) { SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT, (__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, - topTouchMargin + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2); + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); } } else // footer or edit or HEADER_STYLE_BUTTON // side align @@ -7970,26 +7834,6 @@ _Toolbar::RearrangeItems(void) float footerLeftMargin = 0.0f; FloatDimension softkeyDimension(0.0f, 0.0f); - float leftTouchMargin = 0.0f; - float topTouchMargin = 0.0f; - float rightTouchMargin = 0.0f; - float bottomTouchMargin = 0.0f; - - if (__header == true && __style == TOOLBAR_TEXT) // sip - { - GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin); - GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin); - GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin); - GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin); - } - else - { - GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin); - GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin); - GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin); - GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin); - } - if (__header == true && __style == TOOLBAR_TEXT) { GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), footerButtonItemWidth); @@ -8026,14 +7870,11 @@ _Toolbar::RearrangeItems(void) { if (__style != TOOLBAR_SOFTKEY) { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin, - (__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight)); + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth, + 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight)); - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, (__itemArea.height - footerButtonItemHeight) / 2, + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f, footerButtonItemWidth, footerButtonItemHeight)); - - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); } else { @@ -8045,7 +7886,7 @@ _Toolbar::RearrangeItems(void) else { __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height, - softkeyDimension.width, softkeyDimension.height)); + softkeyDimension.width + 1, softkeyDimension.height)); } if (__pButtonItems[LEFT_BUTTON]->GetText() == L"") @@ -8063,10 +7904,8 @@ _Toolbar::RearrangeItems(void) { if (__style != TOOLBAR_SOFTKEY) { - __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin, - (__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight)); - - __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth, + 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight)); } else { @@ -8078,7 +7917,7 @@ _Toolbar::RearrangeItems(void) else { __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height, - softkeyDimension.width, softkeyDimension.height)); + softkeyDimension.width + 1, softkeyDimension.height)); } } } @@ -8087,10 +7926,8 @@ _Toolbar::RearrangeItems(void) { if (__style != TOOLBAR_SOFTKEY) { - __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, (__itemArea.height - footerButtonItemHeight) / 2, + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f, footerButtonItemWidth, footerButtonItemHeight)); - - __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin); } else { @@ -8158,14 +7995,12 @@ _Toolbar::RearrangeHeaderSegmentedItems(void) { float segmentedItemHeight = 0.0f; float leftMargin = 0.0f; - float dividerWidth = 0.0f; float vmargin = 0.0f; float blockWidth[__itemCount]; float fontSize = 0.0f; float multilineFontSize = 0.0f; GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin); - GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); if (__style == TOOLBAR_HEADER_SEGMENTED) { @@ -8182,18 +8017,16 @@ _Toolbar::RearrangeHeaderSegmentedItems(void) { if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button { - blockWidth[0] = blockWidth[1] = (GetSizeF().width - dividerWidth ) / 2; - - blockWidth[1] += 1; + blockWidth[0] = blockWidth[1] = GetSizeF().width / 2; } else { - blockWidth[0] = blockWidth[1] = (__itemArea.width + leftMargin - dividerWidth) / 2; + blockWidth[0] = blockWidth[1] = (__itemArea.width + leftMargin) / 2; } for (int i = 0; i < __itemCount ; i++) { - __pItems.at(i)->SetBounds(FloatRectangle(blockWidth[0] * i + dividerWidth * i, vmargin, blockWidth[i], segmentedItemHeight)); + __pItems.at(i)->SetBounds(FloatRectangle(blockWidth[0] * i, vmargin, blockWidth[i], segmentedItemHeight)); if (__pItems.at(i)->GetChildCount() != 0) { @@ -8222,20 +8055,22 @@ _Toolbar::RearrangeHeaderSegmentedItems(void) { if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button { - blockWidth[0] = blockWidth[1] = blockWidth[2] = (GetSizeF().width - dividerWidth * 2) / 3; + blockWidth[0] = blockWidth[1] = blockWidth[2] = GetSizeF().width / 3; + blockWidth[1] += 1; __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] + 2, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2] + 1, segmentedItemHeight)); } else { - blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin - dividerWidth * 2) / 3; + blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin) / 3; + blockWidth[1] += 1; __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(blockWidth[0] + blockWidth[1] + dividerWidth * 2, - vmargin, blockWidth[2], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] - 1, + vmargin, blockWidth[2] + 1, segmentedItemHeight)); } for (int i = 0; i < __itemCount; i++) @@ -8267,24 +8102,24 @@ _Toolbar::RearrangeHeaderSegmentedItems(void) { if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button { - blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (GetSizeF().width - dividerWidth * 3) / 4; + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = GetSizeF().width / 4; __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(blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], vmargin, blockWidth[2], segmentedItemHeight)); - __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3, - vmargin, blockWidth[3] + 1, segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + vmargin, blockWidth[3], segmentedItemHeight)); } else { - blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width + leftMargin - dividerWidth * 3) / 4; + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width + leftMargin) / 4; __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(blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], vmargin, blockWidth[2], segmentedItemHeight)); - __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3, + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], vmargin, blockWidth[3], segmentedItemHeight)); } @@ -8326,7 +8161,6 @@ _Toolbar::RearrangeFooterSegmentedItems(void) float rightMargin = 0.0f; float footerLeftMargin = 0.0f; float iconSize = 0.0f; - float dividerWidth = 0.0f; float blockWidth[__itemCount]; float fontSize = 0.0f; float multilineFontSize = 0.0f; @@ -8334,6 +8168,9 @@ _Toolbar::RearrangeFooterSegmentedItems(void) float itemButtonLeftGap = 0.0f; float itemButtonRightGap = 0.0f; + float dividerWidth = 0.0f; + + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin); GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin); GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize); @@ -8378,11 +8215,11 @@ _Toolbar::RearrangeFooterSegmentedItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth * 2, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth * 2, segmentedItemHeight)); } else { - __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); } } else @@ -8445,19 +8282,19 @@ _Toolbar::RearrangeFooterSegmentedItems(void) itemButtonLeftGap = 0; } - blockWidth[0] = blockWidth[1] = (__itemArea.width - dividerWidth) / 2; + blockWidth[0] = blockWidth[1] = __itemArea.width / 2; if (__pButtonItems[LEFT_BUTTON]) { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight)); } 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] + 1, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight)); } } else @@ -8465,12 +8302,12 @@ _Toolbar::RearrangeFooterSegmentedItems(void) if (__pButtonItems[RIGHT_BUTTON]) { __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] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight)); } 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] + 1, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); } } @@ -8524,22 +8361,23 @@ _Toolbar::RearrangeFooterSegmentedItems(void) itemButtonLeftGap = 0; } - blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width - dividerWidth * 2) / 3; + blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3; + blockWidth[1] += 1; if (__pButtonItems[LEFT_BUTTON]) { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1, + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight)); } 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(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight)); } } @@ -8548,16 +8386,16 @@ _Toolbar::RearrangeFooterSegmentedItems(void) if (__pButtonItems[RIGHT_BUTTON]) { __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] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight)); } 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(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2, - (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 1, segmentedItemHeight)); } } @@ -8582,14 +8420,14 @@ _Toolbar::RearrangeFooterSegmentedItems(void) { leftMargin = 0; - blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width - dividerWidth * 3) / 4; + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4; __pItems.at(0)->SetBounds(FloatRectangle(leftMargin, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); - __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); - __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1], (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] + 1, segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3], segmentedItemHeight)); for (int i = 0; i < __itemCount ; i++) { @@ -8627,12 +8465,7 @@ _Toolbar::RearrangeTabItmes(void) float fontSize = 0.0f; float multilineFontSize = 0.0f; float segmentedItemHeight = 0.0f; - float tabLeftMargin = 0.0f; float vmargin = 0.0f; - float dividerWidth = 0.0f; - - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin); - GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) { @@ -8646,8 +8479,8 @@ _Toolbar::RearrangeTabItmes(void) if (__itemCount == 1) { - itemWidth[0] = __itemArea.width - tabLeftMargin * 2; - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight)); + itemWidth[0] = __itemArea.width; + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 @@ -8663,10 +8496,10 @@ _Toolbar::RearrangeTabItmes(void) } else if (__itemCount == 2) { - itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth) / 2; + itemWidth[0] = itemWidth[1] = __itemArea.width / 2; - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight)); - __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1] + 1, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight)); GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 @@ -8681,11 +8514,12 @@ _Toolbar::RearrangeTabItmes(void) } else if (__itemCount == 3) { - itemWidth[0] = itemWidth[1] = itemWidth[2] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth * 2) / 3; + itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3; + itemWidth[1] += 1; - __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] + 2, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2] + 1, segmentedItemHeight)); GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26 @@ -8700,14 +8534,12 @@ _Toolbar::RearrangeTabItmes(void) } else { - itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth * 3) / 4; + itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = __itemArea.width / 4; - __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(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2] + dividerWidth * 3, - vmargin, itemWidth[3] + 1, segmentedItemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1], vmargin, itemWidth[2], segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1] + itemWidth[2], vmargin, itemWidth[3], 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 @@ -8717,7 +8549,7 @@ _Toolbar::RearrangeTabItmes(void) { itemWidth[i] = itemWidth[0]; - __pItems.at(i)->SetBounds(FloatRectangle(__pItems.at(i-1)->GetBoundsF().x + dividerWidth + itemWidth[i], vmargin, itemWidth[i], segmentedItemHeight)); + __pItems.at(i)->SetBounds(FloatRectangle(__pItems.at(i-1)->GetBoundsF().x + itemWidth[i], vmargin, itemWidth[i], segmentedItemHeight)); } for (int i = 0; i < __itemCount ; i++) @@ -8749,8 +8581,6 @@ _Toolbar::RearrangeButtonItems(void) float sideMargin = 0.0f; float itemButtonLeftGap = 0.0f; float itemButtonRightGap = 0.0f; - float tabLeftMargin = 0.0f; - float dividerWidth = 0.0f; float iconSize = 0.0f; float footerLeftMargin = 0.0f; float segmentedItemHeight = 0.0f; @@ -8758,16 +8588,14 @@ _Toolbar::RearrangeButtonItems(void) float blockWidth[__itemCount]; float fontSize = 0.0f; float multilineFontSize = 0.0f; + float dividerWidth = 0.0f; - GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize); GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin); - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin); GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, GetOrientation(), sideMargin); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight); GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin); - - float tabRightMargin = tabLeftMargin; + GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); itemHeight = GetSizeF().height; @@ -8795,27 +8623,22 @@ _Toolbar::RearrangeButtonItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2); + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); } else { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin); + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); } } else { if (__pButtonItems[RIGHT_BUTTON]) { - tabRightMargin = footerLeftMargin; itemButtonRightGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin); + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); } - - iconSize = 0; } blockWidth[0] = __itemArea.width; @@ -8824,22 +8647,22 @@ _Toolbar::RearrangeButtonItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight)); } else { - __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); } } else { if (__pButtonItems[RIGHT_BUTTON]) { - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); } else { - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); } } } @@ -8869,55 +8692,50 @@ _Toolbar::RearrangeButtonItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2); + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); } else { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin); + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); } } else { if (__pButtonItems[RIGHT_BUTTON]) { - tabRightMargin = footerLeftMargin; itemButtonRightGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin); + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); } - - iconSize = 0; } - blockWidth[0] = blockWidth[1] = (__itemArea.width - dividerWidth * 1) / 2; + blockWidth[0] = blockWidth[1] = __itemArea.width / 2; if (__pButtonItems[LEFT_BUTTON]) { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight)); } 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] + 1, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight)); } } else { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight)); } 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] + 1, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); } } @@ -8944,49 +8762,45 @@ _Toolbar::RearrangeButtonItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= ((tabLeftMargin + iconSize + itemButtonLeftGap) * 2); + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); } else { - tabLeftMargin = footerLeftMargin; itemButtonLeftGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + iconSize + itemButtonLeftGap + tabRightMargin); + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); } } else { if (__pButtonItems[RIGHT_BUTTON]) { - tabRightMargin = footerLeftMargin; itemButtonRightGap = footerLeftMargin; - __itemArea.width -= (tabLeftMargin + itemButtonRightGap + iconSize + tabRightMargin); + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); } else { - __itemArea.width -= tabLeftMargin * 2; + ;//empty } - - iconSize = 0; } - blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width - dividerWidth * 2) / 3; + blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3; + blockWidth[1] += 1; if (__pButtonItems[LEFT_BUTTON]) { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1, + (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight)); } 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(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight)); } } @@ -8994,17 +8808,17 @@ _Toolbar::RearrangeButtonItems(void) { if (__pButtonItems[RIGHT_BUTTON]) { - __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] - dividerWidth, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2], + (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight)); } 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(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2, - (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight)); + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], + (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 1, itemHeight)); } } @@ -9026,16 +8840,14 @@ _Toolbar::RearrangeButtonItems(void) } else if (__itemCount == 4) { - __itemArea.width -= tabLeftMargin * 2; - - blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width - dividerWidth * 3) / 4; + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4; - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); - __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); - __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], (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] + 1, itemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight)); for (int i = 0; i < __itemCount; i++) { @@ -9055,18 +8867,16 @@ _Toolbar::RearrangeButtonItems(void) } else if (__itemCount == 5) { - __itemArea.width -= tabLeftMargin * 2; - - blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = (__itemArea.width - dividerWidth * 4) / 5; + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = __itemArea.width / 5; - __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); - __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); - __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2, + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight)); - __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3, + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], (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] + 1, itemHeight)); + __pItems.at(4)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3], + (GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight)); for (int i = 0; i < __itemCount; i++) { @@ -9174,23 +8984,17 @@ _Toolbar::SetAnimation(ToolbarAnimationPosition animationPos) { __pButtonItems[LEFT_BUTTON]->AttachChild(*__pAnimation[animationPos]); - float topTouchMargin = __pButtonItems[LEFT_BUTTON]->GetTopTouchMarginF(); - float bottomTouchMargin = __pButtonItems[LEFT_BUTTON]->GetBottomTouchMarginF(); - SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT, (__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, - topTouchMargin + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2); + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); } else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT) { __pButtonItems[RIGHT_BUTTON]->AttachChild(*__pAnimation[animationPos]); - float topTouchMargin = __pButtonItems[RIGHT_BUTTON]->GetTopTouchMarginF(); - float bottomTouchMargin = __pButtonItems[RIGHT_BUTTON]->GetBottomTouchMarginF(); - SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT, (__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, - topTouchMargin + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2); + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); } _AccessibilityContainer* pContainer = __pAnimation[animationPos]->GetAccessibilityContainer(); if (pContainer) @@ -10262,16 +10066,6 @@ _Toolbar::GetButtonBoundsF(ToolbarButton position) const { FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); - float leftTouchMargin = __pButtonItems[position]->GetLeftTouchMarginF(); - float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF(); - float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF(); - float bottomTouchMargin = __pButtonItems[position]->GetBottomTouchMarginF(); - - bounds.x = bounds.x + leftTouchMargin; - bounds.y = bounds.y + topTouchMargin; - bounds.width = bounds.width - (leftTouchMargin + rightTouchMargin); - bounds.height = bounds.height - (topTouchMargin + bottomTouchMargin); - return bounds; } diff --git a/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp index b60a619..bd21ad0 100644 --- a/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp @@ -368,22 +368,23 @@ _ToolbarPresenter::DrawDivider(void) pCanvas->SetBackgroundColor(backgroundColor); pCanvas->Clear(); + //buttonItem Divider 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, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, (__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->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); } else { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); } } @@ -391,7 +392,7 @@ _ToolbarPresenter::DrawDivider(void) { if (__pToolbar->GetButton(LEFT_BUTTON)) { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); } } @@ -402,16 +403,16 @@ _ToolbarPresenter::DrawDivider(void) { if (__pToolbar->GetButton(LEFT_BUTTON)) { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap - - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap, + - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); } else { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); } } @@ -419,26 +420,55 @@ _ToolbarPresenter::DrawDivider(void) { if (__pToolbar->GetButton(LEFT_BUTTON)) { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); } } } + else if (style == TOOLBAR_TAB_WITH_TITLE) + { + if (__pToolbar->GetButton(RIGHT_BUTTON)) + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap + - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + else + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + } + else + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + } + } else if (style == TOOLBAR_SEGMENTED || style == TOOLBAR_TEXT || style == TOOLBAR_ICON || style == TOOLBAR_ICON_TEXT || style == TOOLBAR_COMMAND) { if (__pToolbar->GetButton(RIGHT_BUTTON)) { - DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap, + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); } if (__pToolbar->GetButton(LEFT_BUTTON)) { - DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width, + DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width + buttonItemGap / 2, (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); } } + // Headeritem, FooterItemDivider if (itemCount == 1) { ; // empty @@ -449,16 +479,32 @@ _ToolbarPresenter::DrawDivider(void) { for (int i = 0; i < itemCount - 1 ; i++) { - DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, - dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + if (i < itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + else // i == (itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } } } else { for (int i = 0; i < itemCount - 1 ; i++) { - DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, - (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + if (i < itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + else // i == (itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } } } } @@ -761,6 +807,7 @@ _ToolbarPresenter::DrawItems(void) _Label* pTitleBadgeIcon = __pToolbar->GetTitleBadgeIcon(); float iconWidth = 0.0f; + float iconRightMargin = 0.0f; float titleDisplayHeight = 0.0f; float leftMargin = 0.0f; float headerTopMargin = 0.0f; @@ -793,6 +840,7 @@ _ToolbarPresenter::DrawItems(void) } GET_SHAPE_CONFIG(HEADER::ICON_WIDTH, __pToolbar->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(HEADER::ICON_RIGHT_MARGIN, __pToolbar->GetOrientation(), iconRightMargin); if (!__titleText.IsEmpty()) { @@ -862,7 +910,7 @@ _ToolbarPresenter::DrawItems(void) { pCanvas->DrawBitmap(FloatPoint(usableArea.x, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); - __titleRect.x = usableArea.x + pTitleIcon->GetWidthF() + usableArea.x; + __titleRect.x = usableArea.x + pTitleIcon->GetWidthF() + iconRightMargin; __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) @@ -902,7 +950,7 @@ _ToolbarPresenter::DrawItems(void) if (pTitleIcon) { - __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + leftMargin; + __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + iconRightMargin; __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER) @@ -1345,9 +1393,6 @@ _ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& tou __touchInitiatedInToolbar = false; int releasedItemIndex = __pToolbar->GetItemIndexFromPosition(touchPoint); - float tabLeftMargin = 0.0f; - - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, __pToolbar->GetOrientation(), tabLeftMargin); if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) && __beingEdited == true) { @@ -1372,7 +1417,7 @@ _ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& tou { __pToolbar->MoveItem(__editItemIndex, releasedItemIndex); - AdjustItemPositionX(-__pToolbar->GetItem(__firstLoadedItemIndex)->GetBoundsF().x + tabLeftMargin); // move auto focus + AdjustItemPositionX(-__pToolbar->GetItem(__firstLoadedItemIndex)->GetBoundsF().x); // move auto focus if (__pEditItem) { @@ -1634,9 +1679,6 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi if (__tabMoved) { float distance = (touchinfo.GetCurrentPosition()).x - __currentTouchPosition.x; - float sideMargin = 0.0f; - - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, __pToolbar->GetOrientation(), sideMargin); FloatRectangle clientBounds = __pToolbar->GetBoundsF(); @@ -1674,9 +1716,9 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi itemBounds = pItem->GetBoundsF(); - if (itemBounds.x + distance >= sideMargin && !__beingEdited) + if (itemBounds.x + distance >= 0.0f && !__beingEdited) { - distance = sideMargin - itemBounds.x; + distance = 0.0f - itemBounds.x; } } else if (distance < 0) @@ -1690,17 +1732,14 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi itemBounds = pItem->GetBoundsF(); - if (itemBounds.x + itemBounds.width + distance <= clientBounds.width - sideMargin && !__beingEdited) + if (itemBounds.x + itemBounds.width + distance <= clientBounds.width && !__beingEdited) { - distance = (clientBounds.width - sideMargin) - (itemBounds.x + itemBounds.width); + distance = clientBounds.width - (itemBounds.x + itemBounds.width); } } + if (__beingEdited) { - float tabLeftMargin = 0.0f; - - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, __pToolbar->GetOrientation(), tabLeftMargin); - if (distance > 0) // right move { __tabSlideRight = false; @@ -1710,7 +1749,7 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi __tabSlideLeft = true; } - if (__tabSlideLeft && __pToolbar->GetItem(itemCount-1)->GetBoundsF().x + __pToolbar->GetItem(itemCount-1)->GetBoundsF().width > clientBounds.width - tabLeftMargin) + if (__tabSlideLeft && __pToolbar->GetItem(itemCount-1)->GetBoundsF().x + __pToolbar->GetItem(itemCount-1)->GetBoundsF().width > clientBounds.width) { AdjustItemPositionX(-distance * 5); // move auto focus } @@ -1724,7 +1763,7 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi __tabSlideRight = true; } - if (__tabSlideRight && __pToolbar->GetItem(0)->GetBoundsF().x < tabLeftMargin) + if (__tabSlideRight && __pToolbar->GetItem(0)->GetBoundsF().x < 0.0f) { AdjustItemPositionX(-distance * 5); // move auto focus } @@ -2214,6 +2253,29 @@ _ToolbarPresenter::AdjustItemPositionX(float distance) int itemCount = __pToolbar->GetItemCount(); _Button* pItem = __pToolbar->GetItem(index); + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (itemCount < 5) + { + return E_SUCCESS; + } + if (distance > 0) + { + itemBounds = __pToolbar->GetItem(0)->GetBoundsF(); + if (itemBounds.x + distance > 0.0f) + { + distance = itemBounds.x - distance; + } + } + else + { + itemBounds = __pToolbar->GetItem(itemCount - 4)->GetBoundsF(); + if (itemBounds.x + distance < 0.0f) + { + distance = itemBounds.x - distance; + } + } + while (pItem != null) { FloatRectangle bounds = pItem->GetBoundsF(); @@ -2464,17 +2526,14 @@ _ToolbarPresenter::SetItemFit(int index) FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); float fitDistance = 0.0f; - float tabLeftMargin = 0.0f; int itemCount = __pToolbar->GetItemCount(); - GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, __pToolbar->GetOrientation(), tabLeftMargin); - _Button* pItem = __pToolbar->GetItem(index); SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); bounds = pItem->GetBoundsF(); - fitDistance = -bounds.x + tabLeftMargin; + fitDistance = -bounds.x; for (int i = 0; i < itemCount; i++) { diff --git a/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp index 9b3566e..6626a84 100644 --- a/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp +++ b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp @@ -59,7 +59,7 @@ const EGLint RENDERER_EGL_DEFAULT_CONFIG_ATTRIBS[] = EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 0, + EGL_DEPTH_SIZE, 8, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE diff --git a/src/ui/inc/FUiAnim_EflLayer.h b/src/ui/inc/FUiAnim_EflLayer.h index 76a4552..b69e4ae 100644 --- a/src/ui/inc/FUiAnim_EflLayer.h +++ b/src/ui/inc/FUiAnim_EflLayer.h @@ -39,9 +39,10 @@ namespace Tizen { namespace Ui { namespace Animations { +class _EflLayerConfiguration; class _OSP_EXPORT_ _EflLayer - : public _NativeLayer + : public _NativeLayer { public: _EflLayer(void); @@ -59,7 +60,7 @@ public: void SetOpacity(float opacity); float GetOpacity(void); - result SetRotation(int angle); + result SetOrientationChanged(void); result SetInternalBounds(void); void SetOwner(_EflLayer* pOwner); @@ -105,6 +106,11 @@ public: return _needRender; } + void SetMapped(bool map) + { + _isMapped = map; + } + protected: result Initialize(Evas_Object* pWindow); virtual result Configure(_RootVisualElement& rootElement); @@ -120,15 +126,17 @@ protected: bool _needAsyncVisibilityChangeRequest; bool _isMainType; bool _needRender; + bool _isMapped; + bool _needForceManualRender; 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; + _EflLayerConfiguration* _pConfiguration; }; }}} //namespace Tizen { namespace Ui { namespace Animations diff --git a/src/ui/inc/FUiAnim_EflLayerConfiguration.h b/src/ui/inc/FUiAnim_EflLayerConfiguration.h new file mode 100644 index 0000000..2b27e3e --- /dev/null +++ b/src/ui/inc/FUiAnim_EflLayerConfiguration.h @@ -0,0 +1,46 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayerConfiguration.h + * @brief This is the header file for the _EflLayerConfiguration class. + * + * This header file contains the declarations of the _EflLayerConfiguration class. + */ + +#ifndef _FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ +#define _FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _EflLayerConfiguration +{ +public: + static _EflLayerConfiguration* GetInstance(void); + void ReleaseInstance(void); + void ApplyCustomizedConfig(void* pWin); + +private: + _EflLayerConfiguration(void); + ~_EflLayerConfiguration(void); + int __refCount; +}; // class _EflLayerConfiguration + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ diff --git a/src/ui/inc/FUiCtrl_Button.h b/src/ui/inc/FUiCtrl_Button.h index ad0232d..5ec08ce 100644 --- a/src/ui/inc/FUiCtrl_Button.h +++ b/src/ui/inc/FUiCtrl_Button.h @@ -240,24 +240,12 @@ public: int GetRightMargin(void) const; int GetBottomMargin(void) const; - result SetTouchMargin(int leftTouchMargin, int topTouchMargin, int rightTouchMargin, int bottomTouchMargin); - int GetLeftTouchMargin(void) const; - int GetTopTouchMargin(void) const; - int GetRightTouchMargin(void) const; - int GetBottomTouchMargin(void) const; - result SetMargin(float leftMargin, float topMargin, float rightMargin, float bottomMargin); float GetLeftMarginF(void) const; float GetTopMarginF(void) const; float GetRightMarginF(void) const; float GetBottomMarginF(void) const; - result SetTouchMargin(float leftTouchMargin, float topTouchMargin, float rightTouchMargin, float bottomTouchMargin); - float GetLeftTouchMarginF(void) const; - float GetTopTouchMarginF(void) const; - float GetRightTouchMarginF(void) const; - float GetBottomTouchMarginF(void) const; - Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const; int GetTextExtentSize(void) const; float GetTextExtentSizeF(void) const; @@ -338,11 +326,6 @@ private: float __rightMargin; float __bottomMargin; - float __leftTouchMargin; - float __topTouchMargin; - float __rightTouchMargin; - float __bottomTouchMargin; - Tizen::Graphics::FloatRectangle __userDefinedTextArea; Tizen::Ui::_AccessibilityElement* __pTextElement; diff --git a/src/ui/inc/FUiCtrl_ButtonPresenter.h b/src/ui/inc/FUiCtrl_ButtonPresenter.h index 51cff52..0047e5e 100644 --- a/src/ui/inc/FUiCtrl_ButtonPresenter.h +++ b/src/ui/inc/FUiCtrl_ButtonPresenter.h @@ -111,9 +111,9 @@ private: bool IsEnabledStateChanged(void); - result TimerForTitleSlideInit(void); - result TimerForTitleSlideStart(void); - result TimerForTitleSlideTimeout(void); + result TimerForTextSlideInit(void); + result TimerForTextSlideStart(void); + result TimerForTextSlideTimeout(void); private: _Button* __pButton; @@ -133,7 +133,7 @@ private: Tizen::Base::Runtime::Timer* __pTextSlideTimer; Tizen::Graphics::FloatRectangle __textRect; - Tizen::Graphics::Bitmap* __pTabLargeSelectedBitmap; + Tizen::Graphics::Bitmap* __pTextSlideClippedBitmap; }; // _ButtonPresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_CheckButton.h b/src/ui/inc/FUiCtrl_CheckButton.h index 02602ad..0deb2a9 100644 --- a/src/ui/inc/FUiCtrl_CheckButton.h +++ b/src/ui/inc/FUiCtrl_CheckButton.h @@ -244,6 +244,9 @@ public: Tizen::Graphics::Bitmap* GetCircleNormalEffectBitmap(void) const; Tizen::Graphics::Bitmap* GetCirclePressedEffectBitmap(void) const; + Tizen::Graphics::Bitmap* GetDetailedRightNormalEffectBitmap(void) const; + Tizen::Graphics::Bitmap* GetDetailedRightPressedEffectBitmap(void) const; + Tizen::Graphics::Bitmap* GetBackgroundBitmap(GroupStyle groupStyle, _CheckButtonStatus checkButtonStatus) const; Tizen::Graphics::Bitmap* GetBackgroundNormalEffectBitmap(GroupStyle groupStyle) const; Tizen::Graphics::Bitmap* GetBackgroundPressedEffectBitmap(GroupStyle groupStyle) const; @@ -326,6 +329,8 @@ private: Tizen::Graphics::Bitmap* __pCirclePressedEffectBitmap; Tizen::Graphics::Bitmap* __pDetailedRightBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pDetailedRightNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pDetailedRightPressedEffectBitmap; Tizen::Graphics::Bitmap* __pBackgroundBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; Tizen::Graphics::Bitmap* __pBackgroundNormalEffectBitmap; diff --git a/src/ui/inc/FUiCtrl_DateTimeBar.h b/src/ui/inc/FUiCtrl_DateTimeBar.h index 17b7ac1..dd577fb 100644 --- a/src/ui/inc/FUiCtrl_DateTimeBar.h +++ b/src/ui/inc/FUiCtrl_DateTimeBar.h @@ -107,6 +107,7 @@ public: void SetParentWindowBounds(Tizen::Graphics::FloatRectangle& parentWindowBounds); Tizen::Graphics::FloatRectangle GetParentWindowBounds() const; void RefreshItems(void); + void RemoveAllAnimations(void); virtual bool OnFocusGained(const _Control &source); virtual bool OnFocusLost(const _Control &source); diff --git a/src/ui/inc/FUiCtrl_DateTimePicker.h b/src/ui/inc/FUiCtrl_DateTimePicker.h index 1eb971d..8809016 100644 --- a/src/ui/inc/FUiCtrl_DateTimePicker.h +++ b/src/ui/inc/FUiCtrl_DateTimePicker.h @@ -202,6 +202,8 @@ private: Tizen::Base::Collection::LinkedListT __accessibilityElements; + bool __isInFocusMode; + }; // _DateTimePicker }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditCopyPasteManager.h b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h index 071e233..56ee14a 100644 --- a/src/ui/inc/FUiCtrl_EditCopyPasteManager.h +++ b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h @@ -135,6 +135,8 @@ private: bool __needToReleaseBlock; bool __isHandlerMoving; Tizen::Graphics::FloatRectangle __editVisibleArea; + _Window* __pParentWindow; + bool __parentWindowClipFlagChanged; }; // _EditCopyPasteManager }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditDate.h b/src/ui/inc/FUiCtrl_EditDate.h index 01f41c2..ee824bd 100644 --- a/src/ui/inc/FUiCtrl_EditDate.h +++ b/src/ui/inc/FUiCtrl_EditDate.h @@ -133,6 +133,7 @@ public: virtual void OnSettingChanged(Tizen::Base::String& key); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnFocusGained(const _Control& source); virtual bool OnFocusLost(const _Control& source); diff --git a/src/ui/inc/FUiCtrl_EditDatePresenter.h b/src/ui/inc/FUiCtrl_EditDatePresenter.h index cd51b17..9de6de3 100644 --- a/src/ui/inc/FUiCtrl_EditDatePresenter.h +++ b/src/ui/inc/FUiCtrl_EditDatePresenter.h @@ -85,7 +85,7 @@ public: virtual bool OnFocusLost(const _Control& source); void OnFocusModeStateChanged(void); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); - + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); 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){} diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h index 651cec0..5b0b1de 100755 --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -268,6 +268,8 @@ public: bool IsUsbKeyboardConnected(void) const; bool IsCurrentFocused(void); bool InitializeFocusedCondition(void); + void SetSentKeypadEvent(CoreKeypadEventStatus sentKeypadEvent); + CoreKeypadEventStatus GetLastSentKeypadEvent(void); result AppendCharacter(const Tizen::Base::Character& character); result AppendText(const Tizen::Base::String& text); @@ -493,6 +495,7 @@ private: _InputConnectionImpl* __pInputConnection; bool __isInputConnectionBound; + CoreKeypadEventStatus __sentKeypadEvent; _Clipboard* __pClipboard; diff --git a/src/ui/inc/FUiCtrl_EditTime.h b/src/ui/inc/FUiCtrl_EditTime.h index f08713d..a444ac2 100644 --- a/src/ui/inc/FUiCtrl_EditTime.h +++ b/src/ui/inc/FUiCtrl_EditTime.h @@ -118,6 +118,7 @@ public: virtual void OnSettingChanged(Tizen::Base::String& key); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); bool OnFocusGained(const _Control& source); bool OnFocusLost(const _Control& source); virtual void OnFocusModeStateChanged(void); diff --git a/src/ui/inc/FUiCtrl_EditTimePresenter.h b/src/ui/inc/FUiCtrl_EditTimePresenter.h index 4a7034d..b5e94b3 100644 --- a/src/ui/inc/FUiCtrl_EditTimePresenter.h +++ b/src/ui/inc/FUiCtrl_EditTimePresenter.h @@ -69,13 +69,14 @@ public: bool GetAmEnabled(void) const; result Draw(void); - void Animate(void); + void Animate(void); void SetFocusedElement(void); void SetFocusState(bool isFocused); bool OnFocusLost(const _Control& source); void OnFocusModeStateChanged(void); bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); diff --git a/src/ui/inc/FUiCtrl_MessageBox.h b/src/ui/inc/FUiCtrl_MessageBox.h index 5b67210..76014e8 100644 --- a/src/ui/inc/FUiCtrl_MessageBox.h +++ b/src/ui/inc/FUiCtrl_MessageBox.h @@ -77,7 +77,6 @@ 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); diff --git a/src/ui/inc/FUiCtrl_MessageBoxPresenter.h b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h index c4ac883..fa10d8c 100644 --- a/src/ui/inc/FUiCtrl_MessageBoxPresenter.h +++ b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h @@ -75,7 +75,6 @@ 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); diff --git a/src/ui/inc/FUiCtrl_OverlayAgent.h b/src/ui/inc/FUiCtrl_OverlayAgent.h index 43e8df6..1443c2e 100644 --- a/src/ui/inc/FUiCtrl_OverlayAgent.h +++ b/src/ui/inc/FUiCtrl_OverlayAgent.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -144,9 +145,37 @@ private: private: const static int _OVERLAYAGENT_XV_PORT = 100; + class _OverlayVisualElement + : public Tizen::Ui::Animations::_VisualElement + , public Tizen::Base::Runtime::ITimerEventListener + { + public: + _OverlayVisualElement(void); + _OverlayVisualElement(const _OverlayVisualElement& rhs); + + result Construct(void); + Evas_Object* GetImageObject(void) const; + void SetImageObject(Evas_Object* pImageObject); + void SetImageObjectShowStateChanged(void); + + private: + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + virtual ~_OverlayVisualElement(void); + virtual VisualElement* CloneN(void) const; + + static void OnImageObjectShown(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info); + static void OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info); + + private: + Tizen::Base::Runtime::Timer* __pTimer; + Evas_Object* __pImageObject; + bool __showStateChanged; + }; + //VisualElements + _OverlayVisualElement* __pRendererVE; Tizen::Ui::Animations::_VisualElement* __pParentVE; - Tizen::Ui::Animations::_VisualElement* __pRendererVE; //Renderer property Evas_Object* __pImageObject; diff --git a/src/ui/inc/FUiCtrl_OverlayPanelImpl.h b/src/ui/inc/FUiCtrl_OverlayPanelImpl.h index 8cccc7e..be62c9e 100644 --- a/src/ui/inc/FUiCtrl_OverlayPanelImpl.h +++ b/src/ui/inc/FUiCtrl_OverlayPanelImpl.h @@ -68,6 +68,7 @@ public: result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; Tizen::Graphics::Color GetMaskingColor(void) const; + virtual result OnAttachedToMainTree(void); virtual void OnChangeLayout(_ControlOrientation orientation); virtual const char* GetPublicClassName(void) const; @@ -91,6 +92,8 @@ private: _OverlayPanelImpl(const _OverlayPanelImpl& rhs); _OverlayPanelImpl& operator=(const _OverlayPanelImpl& rhs); + void SetChildBuilderBounds(Tizen::Ui::_ContainerImpl* pContainerImpl, Tizen::Ui::_ControlOrientation controlOrientation); + private: static bool __overlayPanelPixelFomatList[]; }; // _OverlayPanelImpl diff --git a/src/ui/inc/FUiCtrl_Popup.h b/src/ui/inc/FUiCtrl_Popup.h index 3602f8a..1b5e865 100644 --- a/src/ui/inc/FUiCtrl_Popup.h +++ b/src/ui/inc/FUiCtrl_Popup.h @@ -107,7 +107,6 @@ 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); diff --git a/src/ui/inc/FUiCtrl_PopupImpl.h b/src/ui/inc/FUiCtrl_PopupImpl.h index bd05613..4c3613c 100644 --- a/src/ui/inc/FUiCtrl_PopupImpl.h +++ b/src/ui/inc/FUiCtrl_PopupImpl.h @@ -111,6 +111,8 @@ private: bool __init; bool __callBoundsChange; Tizen::Graphics::FloatPoint __prevPos; + bool __boundsChangedInternally; + bool __boundsChangedExternally; }; // _PopupImpl diff --git a/src/ui/inc/FUiCtrl_ProgressPopup.h b/src/ui/inc/FUiCtrl_ProgressPopup.h index 21d648f..15b4843 100644 --- a/src/ui/inc/FUiCtrl_ProgressPopup.h +++ b/src/ui/inc/FUiCtrl_ProgressPopup.h @@ -89,8 +89,6 @@ 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); diff --git a/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h index 10ad22a..b5526bc 100644 --- a/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h +++ b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h @@ -149,6 +149,7 @@ public: void SetHorizontalScrollPosition(float position); float CalculatePagingScrollPosition(float position) const; + void StopScrollBarLoadEffectTimer(void); protected: // Update Layout @@ -217,7 +218,6 @@ private: // scroll bar load effect void DoScrollBarLoadEffect(void); void StartScrollBarLoadEffectTimer(void); - void StopScrollBarLoadEffectTimer(void); // Flick float CalculateFlickAmount(float flickDistance, float flickDuration); diff --git a/src/ui/inc/FUiCtrl_SearchBar.h b/src/ui/inc/FUiCtrl_SearchBar.h index 0b16b79..9c79088 100644 --- a/src/ui/inc/FUiCtrl_SearchBar.h +++ b/src/ui/inc/FUiCtrl_SearchBar.h @@ -145,7 +145,7 @@ public: Tizen::Graphics::Dimension GetContentAreaSize(void) const; SearchBarMode GetMode(void) const; bool IsModeLocked(void) const; - result SetMode(SearchBarMode mode); + result SetMode(SearchBarMode mode, bool isCalledByApp = false); result SetModeLocked(bool modeLocked); int GetButtonActionId(void) const; Tizen::Graphics::Color GetButtonColor(SearchBarButtonStatus status) const; @@ -236,6 +236,7 @@ public: bool IsFocusCallbackToBeFired(void) const; virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); @@ -258,7 +259,6 @@ public: virtual bool OnFocusGained(const _Control& source); virtual bool OnFocusLost(const _Control& source); virtual void OnDrawFocus(void); - virtual void OnFocusModeStateChanged(void); virtual bool IsChildControlFocusManage(void) const; virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); @@ -307,7 +307,6 @@ private: bool __isFocusCallbackToBeFired; bool __isButtonTextChangedByApp; bool __contentVisibilitySetByApp; - bool __isInFocusMode; bool __isFocusUiInitialized; CoreKeypadAction __keypadAction; diff --git a/src/ui/inc/FUiCtrl_SearchBarPresenter.h b/src/ui/inc/FUiCtrl_SearchBarPresenter.h index 3cca0c9..a943388 100644 --- a/src/ui/inc/FUiCtrl_SearchBarPresenter.h +++ b/src/ui/inc/FUiCtrl_SearchBarPresenter.h @@ -65,105 +65,23 @@ public: // Operations result Construct(const _SearchBar& searchBar); result Install(void); - - /** - * Updates the content area of the SearchBar control. - * - * @since 2.0 - * @return An error code - * @param[in] invalidate A Boolean flag indicating whether to perform invalidate on the content area. - * @exception E_SUCCESS The method was successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @n - * -- the current mode of SearchBar prohibits the execution of the method. @n - * @exception E_SYSTEM A system error occurred. - * @remarks The method performs Invalidate() on the content area. - */ result UpdateContentArea(bool invalidate = true); - /** - * Sets the visibility state of the content area. - * - * @since 2.0 - * @return An error code - * @param[in] visible The visibility state of the content area. - * @exception E_SUCCESS The method was successful. - * @exception E_SYSTEM A system error occurred. - * @see IsContentAreaVisible() - */ result SetContentAreaVisible(bool visible); - - /** - * Checks whether the content area is visible. - * - * @since 2.0 - * @return The visibility state of the content area. - * @exception E_SUCCESS The method was successful. - * @see SetContentAreaVisible() - */ bool IsContentAreaVisible(void) const; - - /** - * Gets the search bar mode. - * - * @since 2.0 - * @return The search bar mode - * @exception E_SUCCESS The method was successful. - * @exception E_SYSTEM A system error occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see SetMode() - */ SearchBarMode GetMode(void) const; - /** - * Determines whether the search bar mode is locked. - * - * @since 2.0 - * @return @c true if the mode is locked, @n - * else @c false - * @exception E_SUCCESS The method was successful. - * @exception E_SYSTEM A system error occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see SetModeLock() - */ bool IsModeLocked(void) const; - /** - * Sets the search bar mode. - * - * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method was successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or the mode is locked. - * @exception E_SYSTEM A system error occurred. - * @see GetMode() - * @see SetModeLock() - */ - result SetMode(SearchBarMode mode); - - /** - * Locks or unlocks the search bar mode. - * - * @since 2.0 - * @return An error code - * @param[in] modeLocked The mode lock - * @exception E_SUCCESS The method was successful. - * @exception E_SYSTEM A system error occurred. - * @see GetMode() - */ + result SetMode(SearchBarMode mode, bool isCalledByApp = false); result SetModeLocked(bool modeLocked); - - /** - * Sets the visibility state of the header. - * - * @since 2.0 - * @param[in] visible The visibility state of the the header. - */ void SetHeaderVisibleState(bool visible); result Draw(void); // callback void OnBoundsChanged(void); + void OnTouchReleased(const _Control& source); virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); private: @@ -176,7 +94,7 @@ private: result DrawIcon(void); result DrawSearchBarDefaultBitmap(void); - result ChangeMode(SearchBarMode mode); + result ChangeMode(SearchBarMode mode, bool isCalledByApp); void InitializeInputModeLayout(void); void InitializeViewModeLayout(void); result LoadSearchBarBitmaps(void); diff --git a/src/ui/inc/FUiCtrl_SliderPresenter.h b/src/ui/inc/FUiCtrl_SliderPresenter.h index fd8170f..de7c7b2 100644 --- a/src/ui/inc/FUiCtrl_SliderPresenter.h +++ b/src/ui/inc/FUiCtrl_SliderPresenter.h @@ -70,6 +70,7 @@ public: void OnFontChanged(Tizen::Graphics::Font* pFont); void OnFontInfoRequested(unsigned long& style, float& size); virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorVisibleStateChanged(const _Control& control); static _SliderPresenter* CreateInstanceN(const _Slider& slider); result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); diff --git a/src/ui/inc/FUiCtrl_TableView.h b/src/ui/inc/FUiCtrl_TableView.h index d8ab3f0..3bc6707 100644 --- a/src/ui/inc/FUiCtrl_TableView.h +++ b/src/ui/inc/FUiCtrl_TableView.h @@ -102,6 +102,9 @@ public: virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + //Focus + virtual bool OnFocusGained(const _Control& source); + // gestureListener Callback API virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); @@ -112,6 +115,12 @@ public: bool IsReorderModeEnabled(void) const; result SetReorderModeEnabled(bool enable); + //Restore list Focus + void RestoreFocus(bool isRestoreFocus); + void SetAnnexFocused(bool isAnnexFocused); + void SetTableViewFocused(bool focusStatus); + bool IsTableViewFocused(void); + _FastScroll* GetFastScrollBar(void) const; result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); @@ -239,6 +248,12 @@ public: virtual void OnDrawFocus(void); virtual void OnFocusModeStateChanged(void); + //Enable/Visible state change + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnFocusableStateChanged(bool focusalbeState); + protected: // Properties result SetPropertyItemDividerColor(const Variant& itemDividerColor); @@ -276,6 +291,7 @@ private: bool __reorderEnabled; bool __sectionStyle; bool __groupedLookEnable; + TableViewStyle __tableViewStyle; TableViewScrollBarStyle __scrollStyle; diff --git a/src/ui/inc/FUiCtrl_TableViewItem.h b/src/ui/inc/FUiCtrl_TableViewItem.h index b7a1be6..a93e30a 100644 --- a/src/ui/inc/FUiCtrl_TableViewItem.h +++ b/src/ui/inc/FUiCtrl_TableViewItem.h @@ -305,8 +305,19 @@ public: bool SetItemTapSoundEnabled(bool tapSoundEnabled); bool GetItemTapSoundEnabled(void); + void DrawAnnexFocus(void); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + //Enable/Visible state change + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnFocusableStateChanged(bool focusableState); + + //Accessibility + void SetPublicLabelUpdate(bool resetPublicLabelUpdate); + protected: _TableViewItem(float nItemHeight); @@ -440,6 +451,7 @@ private: Tizen::Base::Collection::ArrayList __individualSelectionControls; Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityOnOffElement; Tizen::Base::Runtime::Timer* __pPressedTimer; Tizen::Base::Runtime::Timer* __pReleasedTimer; @@ -467,6 +479,8 @@ private: bool __isSimpleLastItem; bool __isTouchPressOnScroll; + bool __isTouchCancelOnPressRelease; + Tizen::Ui::Animations::_VisualElement* __pHighlightVisualElement; Tizen::Ui::Animations::_VisualElement* __pBitmapVisualElement; diff --git a/src/ui/inc/FUiCtrl_TableViewPresenter.h b/src/ui/inc/FUiCtrl_TableViewPresenter.h index 6e15136..446b5f5 100644 --- a/src/ui/inc/FUiCtrl_TableViewPresenter.h +++ b/src/ui/inc/FUiCtrl_TableViewPresenter.h @@ -191,6 +191,12 @@ public: virtual void OnDrawFocus(void); virtual void OnFocusModeStateChanged(void); + //Enable/Visible state change + void OnVisibleStateChanged(void); + void OnAncestorEnableStateChanged(const _Control& control); + void OnAncestorVisibleStateChanged(const _Control& control); + void OnFocusableStateChanged(bool focusableState); + void Dispose(void); result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation); @@ -225,6 +231,12 @@ public: float GetLeftMargin(void) const; result SetLeftMargin(float leftMargin); + //Restore Focus + void RestoreFocus(bool isRestoreFocus); + void SetAnnexFocused(bool isAnnexFocused); + void SetTableViewFocused(bool focusStatus); + bool IsTableViewFocused(void); + bool IsItemChecked(int groupIndex, int itemIndex) const; result SetItemChecked(int groupIndex, int itemIndex, bool checked); @@ -397,6 +409,8 @@ private: Tizen::Graphics::FloatPoint __sweptItemPosition; TableViewItemTag __sweptItemTag; + TableViewItemTag __focusItemTag; + TableViewItemTag __reservedScrollItemIndex; TableViewScrollItemAlignment __reservedScrollItemAlignment; @@ -422,6 +436,10 @@ private: bool __isAnimationCallbackBlocked; bool __lockLoadItemWithScroll; + bool __isRestoreFocus; + bool __isAnnexFocused; + bool __isTableViewFocused; + int __itemTouchReleasedEventState; _TableViewScrollToItemTag __scrollToItemTag; diff --git a/src/ui/inc/FUiCtrl_TokenEdit.h b/src/ui/inc/FUiCtrl_TokenEdit.h index 0978dce..54d46fa 100644 --- a/src/ui/inc/FUiCtrl_TokenEdit.h +++ b/src/ui/inc/FUiCtrl_TokenEdit.h @@ -128,8 +128,6 @@ public: virtual result OnAttachedToMainTree(void); virtual void OnDrawFocus(void); virtual void OnFocusModeStateChanged(void); - void RefreshFocusUi(void); - virtual void UpdateAccessibilityElement(EditAccessibilityElementType type); _AccessibilityElement* GetTitleTextAccessibilityElement(void) const; diff --git a/src/ui/inc/FUi_AccessibilityElement.h b/src/ui/inc/FUi_AccessibilityElement.h index ad0d605..2f60f75 100644 --- a/src/ui/inc/FUi_AccessibilityElement.h +++ b/src/ui/inc/FUi_AccessibilityElement.h @@ -80,6 +80,9 @@ public: void SetStatusWithStringId(const char* id); void SetValueWithStringId(const char* id); + void SetPublicLabelUpdate(bool isPublicLabelUpdated); + bool IsPublicLabelUpdated(void); + private: _AccessibilityElement(const _AccessibilityElement& rhs); _AccessibilityElement& operator =(const _AccessibilityElement& rhs); @@ -109,6 +112,8 @@ private: bool __setHintByUser; bool __disabledHint; bool __updateContents; + + bool __publicLabelUpdated; }; }} -#endif //_FUI_INTERNAL_ACCESSIBILITY_ELEMENT_H_ \ No newline at end of file +#endif //_FUI_INTERNAL_ACCESSIBILITY_ELEMENT_H_ diff --git a/src/ui/inc/FUi_Control.h b/src/ui/inc/FUi_Control.h index 67fc760..f588e99 100644 --- a/src/ui/inc/FUi_Control.h +++ b/src/ui/inc/FUi_Control.h @@ -423,6 +423,8 @@ public: result SetFocused(bool on = true); bool IsNativeObjectFocusable(void) const; void SetNativeObjectFocusable(bool focusable); + void SetFocusWindowActivationChecked(bool isChecked); + bool IsFocusWindowActivationChecked(void); // Focus UI void SetPreviousFocus(_Control* pPreviousFocus); @@ -478,8 +480,9 @@ public: Tizen::Graphics::FloatRectangle GetClientBoundsF(void) const; Tizen::Graphics::Rectangle GetClientBounds(const Tizen::Graphics::Dimension& size) const; Tizen::Graphics::FloatRectangle GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) const; - Tizen::Graphics::Rectangle GetAbsoluteBounds(void) const; - Tizen::Graphics::FloatRectangle GetAbsoluteBoundsF(void) const; + Tizen::Graphics::Rectangle GetAbsoluteBounds(bool recalcAlways = false) const; + Tizen::Graphics::FloatRectangle GetAbsoluteBoundsF(bool recalcAlways = false) const; + void InvalidateHierarchyAbsoluteBounds(void); result SetClientBounds(const Tizen::Graphics::Rectangle& bounds); result SetClientBounds(const Tizen::Graphics::FloatRectangle& bounds); bool IsCalledSetClientBounds(void); @@ -636,6 +639,8 @@ private: private: bool __needRecalcRootWindow; + bool __needRecalcAbsBounds; + bool __needRecalcAbsBoundsF; _Window* __pRootWindow; _ControlHandle __controlHandle; @@ -648,7 +653,8 @@ private: Tizen::Graphics::FloatRectangle __bounds; Tizen::Graphics::FloatRectangle __contentAreaBounds; Tizen::Graphics::FloatRectangle __clientBounds; - Tizen::Graphics::FloatRectangle __absoluteBounds; + Tizen::Graphics::Rectangle __absoluteBounds; + Tizen::Graphics::FloatRectangle __absoluteBoundsF; Tizen::Graphics::FloatRectangle __invalidatedBounds; Tizen::Graphics::FloatDimension __minSize; Tizen::Graphics::FloatDimension __maxSize; @@ -674,6 +680,7 @@ private: bool __isCalledGetCanvasN; bool __isFocusMode; bool __isNavigatable; + bool __isFocusWindowActivationChecked; class ControlVisualElementContentProvider; ControlVisualElementContentProvider* __pVisualElementContentProvider; diff --git a/src/ui/inc/FUi_DimmingLayer.h b/src/ui/inc/FUi_DimmingLayer.h index 23901ed..c5e3bb5 100644 --- a/src/ui/inc/FUi_DimmingLayer.h +++ b/src/ui/inc/FUi_DimmingLayer.h @@ -48,7 +48,7 @@ public: result SetDimmingEnabled(bool enabled); bool IsDimmingEnabled(void) const; result Rearrange(void); - result DrawBackgroundBitmap(void); + result DrawBackground(void); private: _DimmingLayer(const _DimmingLayer& rhs); /* no impl. */ diff --git a/src/ui/inc/FUi_EcoreEvas.h b/src/ui/inc/FUi_EcoreEvas.h index 45d193c..dec9c1d 100644 --- a/src/ui/inc/FUi_EcoreEvas.h +++ b/src/ui/inc/FUi_EcoreEvas.h @@ -32,11 +32,6 @@ #include #include "FUi_Types.h" -namespace Tizen { namespace App -{ -class _IActiveWindowEventListener; -}} // Tizen::App - namespace Tizen { namespace Graphics { class Rectangle; @@ -89,7 +84,6 @@ enum _RenderBackend class _Control; class _Window; -class _ActiveWindowEvent; class _OSP_EXPORT_ _EcoreEvas : public Tizen::Base::Object @@ -152,8 +146,6 @@ public: Tizen::Graphics::Rectangle GetIndicatorBounds(const _Window& window) const; result SetIndicatorOpacity(const _Window& window, _IndicatorOpacity opacity); _IndicatorOpacity GetIndicatorOpacity(const _Window& window) const; - void AddActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener); - void RemoveActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener); Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void)const; void SetFrame(const _Control& control); const _Control* GetFrame(void) const; diff --git a/src/ui/inc/FUi_FocusManagerImpl.h b/src/ui/inc/FUi_FocusManagerImpl.h index 60ffd63..79ee018 100644 --- a/src/ui/inc/FUi_FocusManagerImpl.h +++ b/src/ui/inc/FUi_FocusManagerImpl.h @@ -97,6 +97,7 @@ public: static void ReleaseInstance(void); bool IsFocusModeStateEnabled(void) const; bool IsForwardDirection(void) const; + bool IsFocusable(_Control* pControl) const; private: /** @@ -130,7 +131,6 @@ private: void StartFocusTraversal(_Control* pControl, FocusDirection focusDirection); int GetNextIndex(int currentIndex, FocusDirection focusDirection, const Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const; - bool IsFocusable(_Control* pControl) const; _Control* FindTraversalControlFromChild(_Control* pControl); bool IsFocusControlListControl(_Control* pControl) const; diff --git a/src/ui/inc/FUi_ResourceContextMenuConfig.h b/src/ui/inc/FUi_ResourceContextMenuConfig.h index cb08c2a..3aed6d9 100644 --- a/src/ui/inc/FUi_ResourceContextMenuConfig.h +++ b/src/ui/inc/FUi_ResourceContextMenuConfig.h @@ -90,6 +90,7 @@ DECLARE_UI_CONFIG(CONTEXTMENU); DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 43); DECLARE_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 44); DECLARE_SHAPE_CONFIG(LIST_TEXT_GAP, 45); + DECLARE_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 46); DECLARE_FIXED_VALUE_CONFIG(GRID_ITEM_GAP, 1); DECLARE_END_UI_CONFIG(CONTEXTMENU); diff --git a/src/ui/inc/FUi_ResourceFooterConfig.h b/src/ui/inc/FUi_ResourceFooterConfig.h index 30a37e8..d2c85e0 100644 --- a/src/ui/inc/FUi_ResourceFooterConfig.h +++ b/src/ui/inc/FUi_ResourceFooterConfig.h @@ -304,10 +304,10 @@ DECLARE_UI_CONFIG(FOOTER); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 31); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 32); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 33); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 34); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 35); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 36); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 37); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 34); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 35); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 36); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 37); DECLARE_SHAPE_CONFIG(SOFTKEY_HEIGHT, 38); DECLARE_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 39); DECLARE_SHAPE_CONFIG(SOFTKEY_0_LEFT_MARGIN, 40); diff --git a/src/ui/inc/FUi_ResourceHeaderConfig.h b/src/ui/inc/FUi_ResourceHeaderConfig.h index 14d019e..2da5abb 100644 --- a/src/ui/inc/FUi_ResourceHeaderConfig.h +++ b/src/ui/inc/FUi_ResourceHeaderConfig.h @@ -248,18 +248,18 @@ DECLARE_UI_CONFIG(HEADER); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_MARGIN, 30); //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 31); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 32); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 33); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 34); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 35); - DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 36); - DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 37); - DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 38); - DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 39); - DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 40); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 33); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 34); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 35); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 36); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 37); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 38); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 39); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 40); DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 41); DECLARE_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 42); DECLARE_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 43); - DECLARE_SHAPE_CONFIG(TAB_LEFT_MARGIN, 44); + //DECLARE_SHAPE_CONFIG(TAB_LEFT_MARGIN, 44); DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 45); DECLARE_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 46); DECLARE_SHAPE_CONFIG(ICON_WIDTH, 47); @@ -294,6 +294,11 @@ DECLARE_UI_CONFIG(HEADER); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MARGIN_WITH_TEXT, 76); DECLARE_SHAPE_CONFIG(TAB_TEXT_DIM_WIDTH, 77); DECLARE_SHAPE_CONFIG(TITLE_TEXT_DIM_WIDTH, 78); + DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 79); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 80); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 81); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 82); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 83); DECLARE_END_UI_CONFIG(HEADER); diff --git a/src/ui/inc/FUi_ResourceManager.h b/src/ui/inc/FUi_ResourceManager.h index 03bf643..9d4fec5 100644 --- a/src/ui/inc/FUi_ResourceManager.h +++ b/src/ui/inc/FUi_ResourceManager.h @@ -137,7 +137,10 @@ enum _ResourceFeedbackPattern Tizen::Ui::_ResourceManager::GetInstance()->GetColor(Tizen::Ui::_Resource::_##colorId##_COLOR, x) #define GET_BITMAP_CONFIG_N(bitmapId, pixelFormat, pOutBitmap)\ - Tizen::Ui::_ResourceManager::GetInstance()->GetBitmapN(Tizen::Ui::_Resource::_##bitmapId##_IMAGE, pixelFormat, _CONTROL_ORIENTATION_PORTRAIT, pOutBitmap) + Tizen::Ui::_ResourceManager::GetInstance()->GetBitmapN(Tizen::Ui::_Resource::_##bitmapId##_IMAGE, pixelFormat, _CONTROL_ORIENTATION_PORTRAIT, false, 0, pOutBitmap) + +#define GET_REPLACED_BITMAP_CONFIG_N(bitmapId, pixelFormat, color ,pOutBitmap)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetBitmapN(Tizen::Ui::_Resource::_##bitmapId##_IMAGE, pixelFormat, _CONTROL_ORIENTATION_PORTRAIT, true, color, pOutBitmap) #define GET_STRING_CONFIG(stringId, string)\ Tizen::Ui::_ResourceManager::GetInstance()->GetString(#stringId, string) @@ -164,7 +167,7 @@ class _OSP_EXPORT_ _ResourceManager { public: static _ResourceManager* GetInstance(void); - result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, Tizen::Graphics::Bitmap*& pBitmap); + result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap); result GetString(const char* stringId, Tizen::Base::String& string); result GetColor(int colorId, Tizen::Graphics::Color& color); result GetShape(int shapeId, _ControlOrientation orientation, int& value); @@ -204,7 +207,7 @@ private: MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE = 3, MAP_CONTAINER_TYPE_MAX = 4, }; - result GetBitmapInternalN(const Tizen::Base::String& fileName, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, Tizen::Graphics::Bitmap*& pBitmap); + result GetBitmapInternalN(const Tizen::Base::String& fileName, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap); result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, int& value); result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Tizen::Graphics::Dimension& value); result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, float& value); diff --git a/src/ui/inc/FUi_ResourceOptionMenuConfig.h b/src/ui/inc/FUi_ResourceOptionMenuConfig.h index f9fff2d..9214e04 100644 --- a/src/ui/inc/FUi_ResourceOptionMenuConfig.h +++ b/src/ui/inc/FUi_ResourceOptionMenuConfig.h @@ -71,6 +71,8 @@ DECLARE_UI_CONFIG(OPTIONMENU); DECLARE_SHAPE_CONFIG(LIST_ITEM_FONT_SIZE, 24); DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 25); DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 26); + DECLARE_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 27); + DECLARE_END_UI_CONFIG(OPTIONMENU); #endif //_FUI_RESOURCE_OPTION_MENU_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceSliderConfig.h b/src/ui/inc/FUi_ResourceSliderConfig.h index 4506f17..306c915 100644 --- a/src/ui/inc/FUi_ResourceSliderConfig.h +++ b/src/ui/inc/FUi_ResourceSliderConfig.h @@ -62,33 +62,31 @@ DECLARE_UI_CONFIG(SLIDER); DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 21); DECLARE_SHAPE_CONFIG(HANDLE_WIDTH, 1); DECLARE_SHAPE_CONFIG(HANDLE_HEIGHT, 2); - DECLARE_SHAPE_CONFIG(HANDLE_OFFSET, 3); - DECLARE_SHAPE_CONFIG(HANDLE_ONE_DIGIT_TEXT_SIZE, 4); - DECLARE_SHAPE_CONFIG(HANDLE_TWO_DIGIT_TEXT_SIZE, 5); - DECLARE_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 6); - DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 7); - DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 8); - DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 9); - DECLARE_SHAPE_CONFIG(BAR_OFFSET, 10); - DECLARE_SHAPE_CONFIG(ICON_WIDTH, 11); - DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 12); - DECLARE_SHAPE_CONFIG(ICON_LEFT_MARGIN, 13); - DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 14); - DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 15); - DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 16); - DECLARE_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 17); - DECLARE_SHAPE_CONFIG(OVERLAY_WIDTH, 18); - DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT, 19); - DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 20); - DECLARE_SHAPE_CONFIG(OVERLAY_BOTTOM_MARGIN, 21); - DECLARE_SHAPE_CONFIG(OVERLAY_MARGIN, 22); - DECLARE_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 23); - DECLARE_SHAPE_CONFIG(NUMBER_SIZE, 24); - DECLARE_SHAPE_CONFIG(TEXT_SIZE, 25); - DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN_WITH_ICON, 26); - DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITHOUT_ICON, 27); - DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITH_ICON, 28); - DECLARE_SHAPE_CONFIG(MINIMUM_HEIGHT, 29); + DECLARE_SHAPE_CONFIG(HANDLE_ONE_DIGIT_TEXT_SIZE, 3); + DECLARE_SHAPE_CONFIG(HANDLE_TWO_DIGIT_TEXT_SIZE, 4); + DECLARE_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 5); + DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 6); + DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 7); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 8); + DECLARE_SHAPE_CONFIG(BAR_OFFSET, 9); + DECLARE_SHAPE_CONFIG(ICON_WIDTH, 10); + DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 11); + DECLARE_SHAPE_CONFIG(ICON_LEFT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 13); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 14); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 15); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 16); + DECLARE_SHAPE_CONFIG(OVERLAY_WIDTH, 17); + DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 19); + DECLARE_SHAPE_CONFIG(OVERLAY_BOTTOM_MARGIN, 20); + DECLARE_SHAPE_CONFIG(OVERLAY_MARGIN, 21); + DECLARE_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 22); + DECLARE_SHAPE_CONFIG(NUMBER_SIZE, 23); + DECLARE_SHAPE_CONFIG(TEXT_SIZE, 24); + DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITHOUT_ICON, 25); + DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITH_ICON, 26); + DECLARE_SHAPE_CONFIG(MINIMUM_HEIGHT, 27); DECLARE_END_UI_CONFIG(SLIDER); diff --git a/src/ui/inc/FUi_UiFocusEvent.h b/src/ui/inc/FUi_UiFocusEvent.h index f7fbc63..fbee957 100644 --- a/src/ui/inc/FUi_UiFocusEvent.h +++ b/src/ui/inc/FUi_UiFocusEvent.h @@ -62,6 +62,7 @@ public: public: FocusStatus GetFocusState(void) const; + virtual bool IsEventEnabled(const _Control& control) const; private: virtual _UiFocusEvent* CloneN(void) const; diff --git a/src/ui/inc/FUi_Window.h b/src/ui/inc/FUi_Window.h index d4850b1..6d523c3 100644 --- a/src/ui/inc/FUi_Window.h +++ b/src/ui/inc/FUi_Window.h @@ -161,7 +161,6 @@ private: _Control* __pOwner; _IWindowDelegate* __pWindowDelegate; bool __activated; - bool __nativeWindowActivated; bool __destroying; Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement; @@ -183,6 +182,7 @@ private: int __rotation; bool __preferredRotation; bool __orientationCallbackMode; + bool __nativeWindowActivated; friend class _ControlManager; }; // _Window diff --git a/src/ui/resource/FUi_ResourceContextMenuConfig.cpp b/src/ui/resource/FUi_ResourceContextMenuConfig.cpp index 4515c3d..dc9db74 100644 --- a/src/ui/resource/FUi_ResourceContextMenuConfig.cpp +++ b/src/ui/resource/FUi_ResourceContextMenuConfig.cpp @@ -114,6 +114,7 @@ START_UI_CONFIG(CONTEXTMENU); ADD_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 1); ADD_SHAPE_CONFIG(LIST_TEXT_GAP, 20); + ADD_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 4); END_UI_CONFIG_MODE(720x1280); START_UI_CONFIG_MODE(1280x720); diff --git a/src/ui/resource/FUi_ResourceFooterConfig.cpp b/src/ui/resource/FUi_ResourceFooterConfig.cpp index 02da9b7..dcefd9c 100644 --- a/src/ui/resource/FUi_ResourceFooterConfig.cpp +++ b/src/ui/resource/FUi_ResourceFooterConfig.cpp @@ -57,7 +57,7 @@ START_UI_CONFIG(FOOTER); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, $B013); @@ -81,7 +81,7 @@ START_UI_CONFIG(FOOTER); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, $B013); @@ -104,7 +104,7 @@ START_UI_CONFIG(FOOTER); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, $B052L4); @@ -362,10 +362,10 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 98); ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); - ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 17.5); - ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 17.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 17.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 17.5); ADD_SHAPE_CONFIG(SOFTKEY_HEIGHT, 117);//720x1280 ADD_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 42); ADD_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 38); @@ -414,10 +414,10 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 85); ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); - ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 11); - ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 11); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 11); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 11); ADD_SHAPE_CONFIG(SOFTKEY_HEIGHT, 117); ADD_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 42); ADD_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 38); diff --git a/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp b/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp index 91099c3..d7ef826 100644 --- a/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp +++ b/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp @@ -25,7 +25,7 @@ START_UI_CONFIG(GROUPCONTAINER); { ADD_COLOR_CONFIG(NORMAL_BG, $B0217); - ADD_COLOR_CONFIG(LINE_COLOR_FG, $F032L1); + ADD_COLOR_CONFIG(LINE_COLOR_FG, $B0221L4); ADD_IMAGE_CONFIG(BORDER_BG_EFFECT, #00_list_group_bg_ef.#.png); ADD_IMAGE_CONFIG(SYSTEM_CONTROL_BG, #00_list_group_press_bg.#.png); ADD_IMAGE_CONFIG(BG_NORMAL, #00_list_group_bg.#.png); diff --git a/src/ui/resource/FUi_ResourceHeaderConfig.cpp b/src/ui/resource/FUi_ResourceHeaderConfig.cpp index 1700203..1ae5974 100644 --- a/src/ui/resource/FUi_ResourceHeaderConfig.cpp +++ b/src/ui/resource/FUi_ResourceHeaderConfig.cpp @@ -62,7 +62,7 @@ START_UI_CONFIG(HEADER); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, $B013); @@ -86,7 +86,7 @@ START_UI_CONFIG(HEADER); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, $B013); @@ -109,7 +109,7 @@ START_UI_CONFIG(HEADER); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, $B013); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, $B013); - ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013); ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, $B052L4); @@ -317,27 +317,33 @@ START_UI_CONFIG(HEADER); //ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 0); ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); - ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); - ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 13.5); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 13.5); + + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); ADD_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 75); ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 63); ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 45); - ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); + //ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 0); ADD_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 16.5); ADD_SHAPE_CONFIG(ICON_WIDTH, 45); ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16); ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); @@ -415,27 +421,33 @@ START_UI_CONFIG(HEADER); //ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 0); ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); - ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); - ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); + + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 3.5); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 3.5); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); - ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); ADD_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 75); ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 63); ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 45); - ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); + //ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 0);//1280x720 ADD_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 14); ADD_SHAPE_CONFIG(ICON_WIDTH, 45); ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16); ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); diff --git a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp old mode 100644 new mode 100755 index a0fd61f..0af1446 --- a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp +++ b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp @@ -54,10 +54,6 @@ START_UI_CONFIG(MESSAGEBOX); START_UI_CONFIG_MODE(480x800); { - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 8); } END_UI_CONFIG_MODE(480x800); @@ -88,10 +84,10 @@ START_UI_CONFIG(MESSAGEBOX); ADD_SHAPE_CONFIG(TEXT_TOP_MRAGIN_NO_BUTTON, 32); // 20130403 ADD_SHAPE_CONFIG(TEXT_TOP_MRAGIN, 20); // 20121113 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 14); //20121113 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 16); //20121113 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 16); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 15); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 15); ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 74); // 20121113 ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 10); // 20130404 diff --git a/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp index cce73f2..1a92f09 100644 --- a/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp +++ b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp @@ -83,6 +83,7 @@ START_UI_CONFIG(OPTIONMENU); ADD_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 1); ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 4); ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 3); + ADD_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 3); } END_UI_CONFIG_MODE(720x1280); diff --git a/src/ui/resource/FUi_ResourcePopupConfig.cpp b/src/ui/resource/FUi_ResourcePopupConfig.cpp old mode 100644 new mode 100755 index 0491826..187ea32 --- a/src/ui/resource/FUi_ResourcePopupConfig.cpp +++ b/src/ui/resource/FUi_ResourcePopupConfig.cpp @@ -77,10 +77,6 @@ START_UI_CONFIG(POPUP); } END_UI_CONFIG_API_VERSION(); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 8); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 8); } END_UI_CONFIG_MODE(480x800); @@ -102,10 +98,10 @@ START_UI_CONFIG(POPUP); ADD_SHAPE_CONFIG(BOTTOM_BORDER, 30); // Compatibility 2.0 ADD_SHAPE_CONFIG(SIDE_BORDER, 12); // Compatibility 2.0 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 14); //20121113 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 16); //20121113 - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 16); - ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 15); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 15); ADD_SHAPE_CONFIG(OUTLINE_BORDER, 3); ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WIDTH, 63); //20130403 @@ -115,10 +111,10 @@ START_UI_CONFIG(POPUP); ADD_SHAPE_CONFIG(PROCESS_TEXT_TOP_MARGIN, 9); //20130403 ADD_SHAPE_CONFIG(PROCESS_TEXT_BOTTOM_MARGIN, 20); //20121113 - ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_TOP_MARGIN, 14); //20130122 - ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_BOTTOM_MARGIN, 16); //20130122 - ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 16); //20130122 - ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 16); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_TOP_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_BOTTOM_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 15); //20130122 } END_UI_CONFIG_MODE(720x1280); } diff --git a/src/ui/resource/FUi_ResourceSliderConfig.cpp b/src/ui/resource/FUi_ResourceSliderConfig.cpp index b8dface..58bbe97 100644 --- a/src/ui/resource/FUi_ResourceSliderConfig.cpp +++ b/src/ui/resource/FUi_ResourceSliderConfig.cpp @@ -75,21 +75,19 @@ START_UI_CONFIG(SLIDER); { ADD_SHAPE_CONFIG(HANDLE_WIDTH, 72); ADD_SHAPE_CONFIG(HANDLE_HEIGHT, 72); - ADD_SHAPE_CONFIG(HANDLE_OFFSET, 8); ADD_SHAPE_CONFIG(HANDLE_ONE_DIGIT_TEXT_SIZE, 42); ADD_SHAPE_CONFIG(HANDLE_TWO_DIGIT_TEXT_SIZE, 34); ADD_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 26); ADD_SHAPE_CONFIG(BAR_HEIGHT, 27); - ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN_WITH_ICON, 26); - ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 36); + ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 45); ADD_SHAPE_CONFIG(BAR_OFFSET, 7); ADD_SHAPE_CONFIG(ICON_WIDTH, 72); ADD_SHAPE_CONFIG(ICON_HEIGHT, 72); ADD_SHAPE_CONFIG(ICON_LEFT_MARGIN, 26); - ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 30); ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 12); ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 16); diff --git a/src/ui/resource/FUi_ResourceTableViewConfig.cpp b/src/ui/resource/FUi_ResourceTableViewConfig.cpp index 247448b..a556ac8 100644 --- a/src/ui/resource/FUi_ResourceTableViewConfig.cpp +++ b/src/ui/resource/FUi_ResourceTableViewConfig.cpp @@ -25,8 +25,8 @@ START_UI_CONFIG(TABLEVIEW); { ADD_COLOR_CONFIG(BG_NORMAL, 0x00000000); - ADD_COLOR_CONFIG(ITEM_DIVIDER_TOP_BG_NORMAL, $B0222); - ADD_COLOR_CONFIG(ITEM_DIVIDER_BOTTOM_BG_NORMAL, $B0223); + ADD_COLOR_CONFIG(ITEM_DIVIDER_TOP_BG_NORMAL, $B0223); + ADD_COLOR_CONFIG(ITEM_DIVIDER_BOTTOM_BG_NORMAL, $B0222); ADD_COLOR_CONFIG(ITEM_BG_NORMAL, 0x00000000); ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B041); ADD_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, $B041); diff --git a/src/ui/resource/FUi_ResourceTokenEditConfig.cpp b/src/ui/resource/FUi_ResourceTokenEditConfig.cpp index a9dba2d..2143995 100644 --- a/src/ui/resource/FUi_ResourceTokenEditConfig.cpp +++ b/src/ui/resource/FUi_ResourceTokenEditConfig.cpp @@ -66,7 +66,7 @@ START_UI_CONFIG(TOKENEDIT); ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_RIGHT_MARGIN, 16) ADD_SHAPE_CONFIG(TOKEN_MIN_WIDTH, 90); ADD_SHAPE_CONFIG(TOKEN_TEXT_SIZE, 32); - ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_SIZE, 34); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_SIZE, 36); ADD_SHAPE_CONFIG(TEXT_SIZE, 44); ADD_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_MARGIN, 15); ADD_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_TEXT_SIZE, 33); diff --git a/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp b/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp index 8ac9efb..ba749d9 100644 --- a/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp +++ b/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp @@ -963,6 +963,16 @@ _SceneManagerImpl::OnSceneControlEventReceived(_SceneControlEventArg::SceneContr case _SceneControlEventArg::SCENE_CONTROL_EVENT_TYPE_DESTROY: if (!__destroyPendingScene.IsEmpty()) { + // Give up if the application is terminated. + UiApp* pUiApp = UiApp::GetInstance(); + SysTryLogReturn(NID_UI_SCENES, pUiApp, , "Invalid UiApp"); + AppState appState = pUiApp->GetAppState(); + if (appState == TERMINATING || appState == TERMINATED) + { + SysLog(NID_UI_SCENES, "Application terminated, ignore the destroy event."); + return; + } + SysTryLog(NID_UI_SCENES, __destroyPendingScene == sceneId, "Abnormal! __destroyPendingScene != sceneId"); DestroyScene(sceneId); if (__destroyPendingScene == sceneId) diff --git a/src/uifw/CMakeLists.txt b/src/uifw/CMakeLists.txt index 79ec0dd..5cecd0f 100644 --- a/src/uifw/CMakeLists.txt +++ b/src/uifw/CMakeLists.txt @@ -21,6 +21,8 @@ SET (${this_target}_SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/app/FApp_AppFrame.cpp ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmap.cpp ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmapUtil.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_CoordinateInfo.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_ThemeInfo.cpp ) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" ) -- 2.7.4