From 338817c53541cccc2550f6d49c9a08ad9b3a6af6 Mon Sep 17 00:00:00 2001 From: Sehong Na Date: Thu, 7 Nov 2013 20:21:20 +0900 Subject: [PATCH] Init Tizen 2.2.1 --- LICENSE.Flora | 0 inc/FGrpBitmap.h | 216 ++- inc/FGrpCanvas.h | 66 +- inc/FGrpCanvasTexture.h | 36 +- inc/FGrpColor.h | 88 +- inc/FGrpCoordinateSystem.h | 22 +- inc/FGrpEnrichedText.h | 110 +- inc/FGrpFloatMatrix4.h | 122 +- inc/FGrpFloatPoint.h | 6 +- inc/FGrpFloatPoint3.h | 84 +- inc/FGrpFloatVector4.h | 96 +- inc/FGrpFont.h | 135 +- inc/FGrpFontCommon.h | 2 +- inc/FGrpGlPlayer.h | 144 +- inc/FGrpIGlRenderer.h | 41 +- inc/FGrpPixelFormat.h | 12 +- inc/FGrpPoint.h | 4 +- inc/FGrpRectangle.h | 4 +- inc/FGrpTextElement.h | 130 +- inc/FGrpVideoTexture.h | 37 +- inc/FUi.h | 3 +- inc/FUiAccessibilityContainer.h | 64 +- inc/FUiAccessibilityElement.h | 32 +- inc/FUiAccessibilityTypes.h | 8 +- inc/FUiAnimAnimationBase.h | 24 +- inc/FUiAnimAnimationTransaction.h | 214 ++- inc/FUiAnimBezierTimingFunction.h | 6 +- inc/FUiAnimControlAnimator.h | 41 +- inc/FUiAnimDimensionAnimation.h | 23 +- inc/FUiAnimDisplayContext.h | 4 +- inc/FUiAnimExpInTimingFunction.h | 6 +- inc/FUiAnimExpOutTimingFunction.h | 2 +- inc/FUiAnimFloatAnimation.h | 37 +- inc/FUiAnimFrameAnimator.h | 8 +- inc/FUiAnimIAnimationTransactionEventListener.h | 4 +- inc/FUiAnimIControlAnimatorDetailedEventListener.h | 4 +- inc/FUiAnimIVisualElementAnimationProvider.h | 5 +- ...nimIVisualElementAnimationStatusEventListener.h | 18 +- inc/FUiAnimIVisualElementContentProvider.h | 19 +- inc/FUiAnimIVisualElementEventListener.h | 79 +- inc/FUiAnimIntegerAnimation.h | 38 +- inc/FUiAnimParallelAnimationGroup.h | 9 +- inc/FUiAnimPointAnimation.h | 25 +- inc/FUiAnimRectangleAnimation.h | 22 +- inc/FUiAnimRotateAnimation.h | 22 +- inc/FUiAnimSequentialAnimationGroup.h | 13 +- inc/FUiAnimTypes.h | 8 +- inc/FUiAnimVisualElement.h | 183 +- inc/FUiAnimVisualElementAnimation.h | 61 +- inc/FUiAnimVisualElementAnimationGroup.h | 62 +- inc/FUiAnimVisualElementAnimationProvider.h | 3 +- inc/FUiAnimVisualElementContentProvider.h | 15 +- inc/FUiAnimVisualElementPropertyAnimation.h | 35 +- inc/FUiAnimVisualElementSurface.h | 40 +- inc/FUiAnimVisualElementValueAnimation.h | 66 +- inc/FUiAnimations.h | 2 +- inc/FUiCardLayout.h | 55 +- inc/FUiClipboard.h | 71 +- inc/FUiClipboardItem.h | 13 +- inc/FUiClipboardTypes.h | 2 +- inc/FUiCompositeMode.h | 2 +- inc/FUiContainer.h | 355 ++-- inc/FUiControl.h | 846 +++++---- inc/FUiControls.h | 82 +- inc/FUiCtrlAnimation.h | 30 +- inc/FUiCtrlAnimationFrame.h | 2 +- inc/FUiCtrlButton.h | 56 +- inc/FUiCtrlButtonItem.h | 38 +- inc/FUiCtrlCheckButton.h | 94 +- inc/FUiCtrlColorPicker.h | 40 +- inc/FUiCtrlContextMenu.h | 36 +- inc/FUiCtrlCustomItem.h | 89 +- inc/FUiCtrlCustomList.h | 37 +- inc/FUiCtrlCustomListItem.h | 129 +- inc/FUiCtrlCustomListItemFormat.h | 61 +- inc/FUiCtrlCustomListTypes.h | 2 +- inc/FUiCtrlDatePicker.h | 26 +- inc/FUiCtrlDateTimePicker.h | 49 +- inc/FUiCtrlEditArea.h | 62 +- inc/FUiCtrlEditDate.h | 66 +- inc/FUiCtrlEditField.h | 116 +- inc/FUiCtrlEditTypes.h | 14 +- inc/FUiCtrlExpandableEditArea.h | 112 +- inc/FUiCtrlExpandableList.h | 12 +- inc/FUiCtrlFooter.h | 29 +- inc/FUiCtrlFooterItem.h | 19 +- inc/FUiCtrlForm.h | 92 +- inc/FUiCtrlFrame.h | 80 +- inc/FUiCtrlFrameTypes.h | 2 +- inc/FUiCtrlGallery.h | 62 +- inc/FUiCtrlGalleryItem.h | 28 +- inc/FUiCtrlGalleryTypes.h | 4 +- inc/FUiCtrlGroupContainer.h | 110 +- inc/FUiCtrlGroupItem.h | 31 +- inc/FUiCtrlGroupedList.h | 12 +- inc/FUiCtrlGroupedListView.h | 46 +- inc/FUiCtrlGroupedListViewTypes.h | 4 +- inc/FUiCtrlGroupedTableView.h | 378 ++-- inc/FUiCtrlHeader.h | 31 +- inc/FUiCtrlHeaderItem.h | 11 +- inc/FUiCtrlICustomElement.h | 2 +- inc/FUiCtrlICustomElementF.h | 2 +- inc/FUiCtrlICustomListElement.h | 2 +- inc/FUiCtrlIExpandableEditAreaEventListener.h | 4 +- inc/FUiCtrlIFormMenuEventListener.h | 4 +- inc/FUiCtrlIFrameEventListener.h | 3 +- inc/FUiCtrlIGalleryItemProvider.h | 10 +- inc/FUiCtrlIGroupedListViewItemEventListener.h | 39 +- inc/FUiCtrlIGroupedListViewItemProvider.h | 78 +- inc/FUiCtrlIGroupedListViewItemProviderF.h | 79 +- inc/FUiCtrlIGroupedTableViewItemEventListener.h | 8 +- inc/FUiCtrlIGroupedTableViewItemProvider.h | 107 +- inc/FUiCtrlIGroupedTableViewItemProviderF.h | 103 +- inc/FUiCtrlIIconListViewItemEventListener.h | 3 +- inc/FUiCtrlIIconListViewItemProvider.h | 21 +- inc/FUiCtrlIListViewItemEventListener.h | 26 +- inc/FUiCtrlIListViewItemProvider.h | 16 +- inc/FUiCtrlIListViewItemProviderF.h | 16 +- inc/FUiCtrlIProgressPopupEventListener.h | 10 +- inc/FUiCtrlIScrollEventListener.h | 12 +- inc/FUiCtrlIScrollEventListenerF.h | 9 +- inc/FUiCtrlISectionTableViewItemEventListener.h | 6 +- inc/FUiCtrlISectionTableViewItemProvider.h | 28 +- inc/FUiCtrlISectionTableViewItemProviderF.h | 24 +- inc/FUiCtrlISplitPanelEventListener.h | 2 +- inc/FUiCtrlITableViewItemProvider.h | 8 +- inc/FUiCtrlITableViewItemProviderF.h | 16 +- inc/FUiCtrlIconList.h | 29 +- inc/FUiCtrlIconListTypes.h | 4 +- inc/FUiCtrlIconListView.h | 76 +- inc/FUiCtrlIconListViewItem.h | 9 +- inc/FUiCtrlIconListViewTypes.h | 2 +- inc/FUiCtrlInputTypes.h | 2 +- inc/FUiCtrlKeypad.h | 30 +- inc/FUiCtrlLabel.h | 38 +- inc/FUiCtrlLabelTypes.h | 6 +- inc/FUiCtrlList.h | 20 +- inc/FUiCtrlListContextItem.h | 10 +- inc/FUiCtrlListItemBase.h | 10 +- inc/FUiCtrlListTypes.h | 8 +- inc/FUiCtrlListView.h | 121 +- inc/FUiCtrlListViewTypes.h | 6 +- inc/FUiCtrlMessageBox.h | 6 +- inc/FUiCtrlOptionMenu.h | 50 +- inc/FUiCtrlOverlayPanel.h | 97 +- inc/FUiCtrlOverlayRegion.h | 75 +- inc/FUiCtrlPanel.h | 22 +- inc/FUiCtrlPopup.h | 59 +- inc/FUiCtrlProgress.h | 20 +- inc/FUiCtrlProgressPopup.h | 32 +- inc/FUiCtrlRadioGroup.h | 16 +- inc/FUiCtrlScrollEventTypes.h | 10 +- inc/FUiCtrlScrollPanel.h | 194 +- inc/FUiCtrlScrollPanelTypes.h | 4 +- inc/FUiCtrlSearchBar.h | 101 +- inc/FUiCtrlSectionTableView.h | 337 ++-- inc/FUiCtrlSimpleItem.h | 4 +- inc/FUiCtrlSlidableGroupedList.h | 164 +- inc/FUiCtrlSlidableList.h | 23 +- inc/FUiCtrlSlider.h | 50 +- inc/FUiCtrlSliderTypes.h | 2 +- inc/FUiCtrlSplitPanel.h | 102 +- inc/FUiCtrlSplitPanelTypes.h | 2 +- inc/FUiCtrlTab.h | 125 +- inc/FUiCtrlTabBar.h | 26 +- inc/FUiCtrlTabBarItem.h | 3 +- inc/FUiCtrlTableView.h | 273 +-- inc/FUiCtrlTableViewContextItem.h | 2 +- inc/FUiCtrlTableViewGroupItem.h | 18 +- inc/FUiCtrlTableViewItem.h | 41 +- inc/FUiCtrlTableViewItemBase.h | 22 +- inc/FUiCtrlTableViewSimpleGroupItem.h | 10 +- inc/FUiCtrlTableViewSimpleItem.h | 24 +- inc/FUiCtrlTableViewTypes.h | 2 +- inc/FUiCtrlTextBox.h | 34 +- inc/FUiCtrlTimePicker.h | 11 +- inc/FUiCustomControlBase.h | 44 +- inc/FUiDataBindingContext.h | 43 +- inc/FUiDataBindingTypes.h | 28 +- inc/FUiEffectsEffect.h | 66 +- inc/FUiEffectsEffectManager.h | 10 +- inc/FUiEffectsIEffectEventListener.h | 11 +- inc/FUiEffectsIEffectResourceProvider.h | 7 +- inc/FUiEffectsTypes.h | 10 +- inc/FUiFocusManager.h | 4 +- inc/FUiGridLayout.h | 104 +- inc/FUiHorizontalBoxLayout.h | 34 +- inc/FUiIAccessibilityListener.h | 2 +- inc/FUiIActionEventListener.h | 7 +- inc/FUiIAdjustmentEventListener.h | 2 +- inc/FUiIAnimationEventListener.h | 4 +- inc/FUiIClipboardPopupEventListener.h | 14 +- inc/FUiIColorChangeEventListener.h | 2 +- inc/FUiICustomItemEventListener.h | 16 +- inc/FUiIDataBindingDataTransformer.h | 19 +- inc/FUiIDataBindingDataValidator.h | 21 +- inc/FUiIDataBindingListener.h | 15 +- inc/FUiIDateChangeEventListener.h | 4 +- inc/FUiIDateTimeChangeEventListener.h | 4 +- inc/FUiIDragDropEventListener.h | 2 +- inc/FUiIDragDropEventListenerF.h | 2 +- inc/FUiIExpandableItemEventListener.h | 2 +- inc/FUiIFastScrollEventListener.h | 6 +- inc/FUiIFocusEventListener.h | 5 +- inc/FUiIInputConnectionEventListener.h | 5 +- inc/FUiIInputConnectionEventListenerF.h | 5 +- inc/FUiIInputConnectionProvider.h | 5 +- inc/FUiIKeypadEventListener.h | 13 +- inc/FUiILanguageEventListener.h | 7 +- inc/FUiIOrientationEventListener.h | 9 +- inc/FUiIPropagatedKeyEventListener.h | 18 +- inc/FUiIPropagatedTouchEventListener.h | 20 +- inc/FUiIScrollPanelEventListener.h | 5 +- inc/FUiISlidableGroupedListEventListener.h | 2 +- inc/FUiISlidableListEventListener.h | 6 +- inc/FUiITextBlockEventListener.h | 3 +- inc/FUiITextEventListener.h | 13 +- inc/FUiITimeChangeEventListener.h | 2 +- inc/FUiITouchCustomGestureEventListener.h | 5 +- inc/FUiITouchEventListener.h | 11 +- inc/FUiITouchFlickGestureEventListener.h | 5 +- inc/FUiITouchGestureEventListener.h | 5 +- inc/FUiITouchLongPressGestureEventListener.h | 5 +- inc/FUiITouchModeChangedEventListener.h | 4 +- inc/FUiITouchPanningGestureEventListener.h | 4 +- inc/FUiITouchPinchGestureEventListener.h | 5 +- inc/FUiITouchRotationGestureEventListener.h | 4 +- inc/FUiITouchTapGestureEventListener.h | 5 +- inc/FUiIUiLinkEventListener.h | 5 +- inc/FUiIWindowEventListener.h | 3 +- inc/FUiInputConnection.h | 30 +- inc/FUiInputConnectionTypes.h | 10 +- inc/FUiKeyEventInfo.h | 11 +- inc/FUiKeyEventManager.h | 6 +- inc/FUiKeyTypes.h | 1 - inc/FUiKeyboardMap.h | 8 +- inc/FUiLayout.h | 4 +- inc/FUiLayoutTypes.h | 2 +- inc/FUiRelativeLayout.h | 57 +- inc/FUiScenes.h | 6 +- inc/FUiScenesBackwardSceneTransition.h | 4 +- inc/FUiScenesForwardSceneTransition.h | 8 +- inc/FUiScenesIFormFactory.h | 10 +- inc/FUiScenesIPanelFactory.h | 6 +- inc/FUiScenesISceneAnimationProvider.h | 21 +- inc/FUiScenesISceneEventListener.h | 10 +- inc/FUiScenesISceneManagerEventListener.h | 4 +- inc/FUiScenesISceneTransitionPolicyProvider.h | 6 +- inc/FUiScenesScene.h | 8 +- inc/FUiScenesSceneManager.h | 21 +- inc/FUiScenesSceneTransition.h | 18 +- inc/FUiScenesTypes.h | 6 +- inc/FUiSystemUtil.h | 35 +- inc/FUiTouch.h | 74 +- inc/FUiTouchEffect.h | 10 +- inc/FUiTouchEffectTypes.h | 2 +- inc/FUiTouchEventInfo.h | 2 +- inc/FUiTouchEventManager.h | 20 +- inc/FUiTouchFlickGestureDetector.h | 37 +- inc/FUiTouchGestureDetector.h | 69 +- inc/FUiTouchLongPressGestureDetector.h | 52 +- inc/FUiTouchPanningGestureDetector.h | 33 +- inc/FUiTouchPinchGestureDetector.h | 25 +- inc/FUiTouchRotationGestureDetector.h | 21 +- inc/FUiTouchTapGestureDetector.h | 68 +- inc/FUiUiConfiguration.h | 21 +- inc/FUiUiConfigurationTypes.h | 142 +- inc/FUiVariant.h | 129 +- inc/FUiVerticalBoxLayout.h | 39 +- inc/FUiWindow.h | 143 +- inc/khrplatform.h | 162 +- packaging/osp-uifw.spec | 17 +- .../share/osp/bitmaps/480x800/00_check_focus.png | Bin 1210 -> 1244 bytes .../bitmaps/480x800/00_groupedlist_bg_focus.#.png | Bin 3003 -> 3001 bytes .../bitmaps/480x800/00_overscrolling_bottom.#.png | Bin 0 -> 2848 bytes .../bitmaps/480x800/00_overscrolling_left.#.png | Bin 0 -> 2845 bytes .../bitmaps/480x800/00_overscrolling_right.#.png | Bin 0 -> 2843 bytes .../osp/bitmaps/480x800/00_overscrolling_top.#.png | Bin 0 -> 2847 bytes .../bitmaps/480x800/00_popup_button_focus.#.png | Bin 1375 -> 1183 bytes .../share/osp/bitmaps/480x800/00_slider_handle.png | Bin 1575 -> 3364 bytes .../osp/bitmaps/480x800/00_slider_handle_focus.png | Bin 1849 -> 3546 bytes .../osp/bitmaps/480x800/00_slider_popup_bg.#.png | Bin 3270 -> 3262 bytes .../480x800/black/00_button_01_press_ef.#.png | Bin 1289 -> 1159 bytes .../osp/bitmaps/480x800/black/00_check_bg.png | Bin 1541 -> 1422 bytes .../osp/bitmaps/480x800/black/00_check_dim_bg.png | Bin 1532 -> 1419 bytes .../bitmaps/480x800/black/00_check_press_bg.png | Bin 1611 -> 1465 bytes .../480x800/black/00_circle_bg_ef_press.png | Bin 2142 -> 1298 bytes .../black/00_contacts_button_bg_press_ef.#.png | Bin .../480x800/black/00_popup_button_press_ef.#.png | Bin 1326 -> 1175 bytes .../bitmaps/480x800/black/00_slider_handle_ef.png | Bin 2819 -> 4746 bytes .../480x800/black/00_slider_handle_ef_dim.png | Bin 2754 -> 4640 bytes .../480x800/black/00_slider_handle_ef_press.png | Bin 2262 -> 3246 bytes .../bitmaps/480x800/black/00_tab_press_ef.#.png | Bin 2956 -> 2855 bytes .../bitmaps/480x800/black/00_title_press_ef.#.png | Bin 2858 -> 2855 bytes .../480x800/black/00_toolbar_press_ef.#.png | Bin 2861 -> 2855 bytes .../osp/bitmaps/480x800/black/pd_btn_bg.#.png | Bin 0 -> 4550 bytes .../bitmaps/480x800/black/pd_btn_bg_arrow_down.png | Bin 0 -> 1461 bytes .../bitmaps/480x800/black/pd_btn_bg_arrow_up.png | Bin 0 -> 1481 bytes .../480x800/default/00_button_01_press_ef.#.png | Bin 1289 -> 1159 bytes .../osp/bitmaps/480x800/default/00_check_bg.png | Bin 1541 -> 1422 bytes .../bitmaps/480x800/default/00_check_dim_bg.png | Bin 1532 -> 1419 bytes .../bitmaps/480x800/default/00_check_press_bg.png | Bin 1611 -> 1465 bytes .../480x800/default/00_circle_bg_ef_press.png | Bin 2142 -> 1298 bytes .../480x800/default/00_contacts_button_bg.#.png | Bin 0 -> 1114 bytes .../default/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1182 bytes .../480x800/default/00_contacts_button_bg_ef.#.png | Bin 3117 -> 1225 bytes .../default/00_contacts_button_bg_press_ef.#.png | Bin 3115 -> 1213 bytes .../480x800/default/00_contacts_button_focus.#.png | Bin 0 -> 1145 bytes .../default/00_contacts_button_focus_ef.#.png | Bin 1046 -> 1115 bytes .../480x800/default/00_popup_button_press_ef.#.png | Bin 1326 -> 1175 bytes .../480x800/default/00_slider_handle_ef.png | Bin 2819 -> 4746 bytes .../480x800/default/00_slider_handle_ef_dim.png | Bin 2754 -> 4640 bytes .../480x800/default/00_slider_handle_ef_press.png | Bin 2262 -> 3246 bytes .../bitmaps/480x800/default/00_tab_press_ef.#.png | Bin 2956 -> 2855 bytes .../480x800/default/00_title_press_ef.#.png | Bin 2858 -> 2855 bytes .../480x800/default/00_toolbar_press_ef.#.png | Bin 2861 -> 2855 bytes .../osp/bitmaps/480x800/default/pd_btn_bg.#.png | Bin 0 -> 4550 bytes .../480x800/default/pd_btn_bg_arrow_down.png | Bin 0 -> 1461 bytes .../bitmaps/480x800/default/pd_btn_bg_arrow_up.png | Bin 0 -> 1481 bytes .../osp/bitmaps/480x800/white/00_check_bg.png | Bin 1747 -> 1631 bytes .../osp/bitmaps/480x800/white/00_check_dim_bg.png | Bin 1724 -> 1638 bytes .../bitmaps/480x800/white/00_check_press_bg.png | Bin 1712 -> 1654 bytes .../bitmaps/480x800/white/00_slider_handle_ef.png | Bin 2368 -> 4460 bytes .../480x800/white/00_slider_handle_ef_dim.png | Bin 2754 -> 4355 bytes .../480x800/white/00_slider_handle_ef_press.png | Bin 2811 -> 4747 bytes .../osp/bitmaps/480x800/white/pd_btn_bg.#.png | Bin 0 -> 2082 bytes .../bitmaps/480x800/white/pd_btn_bg_arrow_down.png | Bin 0 -> 4081 bytes .../bitmaps/480x800/white/pd_btn_bg_arrow_up.png | Bin 0 -> 3799 bytes .../bitmaps/720x1280/00_overscrolling_bottom.#.png | Bin 0 -> 2847 bytes .../bitmaps/720x1280/00_overscrolling_left.#.png | Bin 0 -> 979 bytes .../bitmaps/720x1280/00_overscrolling_right.#.png | Bin 0 -> 979 bytes .../bitmaps/720x1280/00_overscrolling_top.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/720x1280/00_slider_handle.png | Bin 3564 -> 3624 bytes .../bitmaps/720x1280/00_slider_handle_focus.png | Bin 2000 -> 3900 bytes .../osp/bitmaps/720x1280/00_slider_popup_bg.#.png | Bin 3435 -> 3412 bytes .../720x1280/black/00_button_01_press_ef.#.png | Bin 3213 -> 3009 bytes .../720x1280/black/00_circle_bg_ef_press.png | Bin 2708 -> 1508 bytes .../black/00_contacts_button_bg_press_ef.#.png | Bin 1397 -> 3210 bytes .../720x1280/black/00_popup_button_press_ef.#.png | Bin 1426 -> 3057 bytes .../bitmaps/720x1280/black/00_slider_handle_ef.png | Bin 4441 -> 5773 bytes .../720x1280/black/00_slider_handle_ef_dim.png | Bin 5616 -> 5649 bytes .../720x1280/black/00_slider_handle_ef_press.png | Bin 4009 -> 3464 bytes .../bitmaps/720x1280/black/00_tab_press_ef.#.png | Bin 1231 -> 2889 bytes .../bitmaps/720x1280/black/00_title_press_ef.#.png | Bin 2872 -> 2889 bytes .../720x1280/black/00_toolbar_press_ef.#.png | Bin 2872 -> 2889 bytes .../osp/bitmaps/720x1280/black/pd_btn_bg.#.png | Bin 2255 -> 4550 bytes .../720x1280/black/pd_btn_bg_arrow_down.png | Bin 3673 -> 1461 bytes .../bitmaps/720x1280/black/pd_btn_bg_arrow_up.png | Bin 3642 -> 1481 bytes .../720x1280/default/00_button_01_press_ef.#.png | Bin 3213 -> 3009 bytes .../720x1280/default/00_circle_bg_ef_press.png | Bin 2708 -> 1508 bytes .../720x1280/default/00_contacts_button_bg.#.png | Bin 0 -> 1188 bytes .../default/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1429 bytes .../default/00_contacts_button_bg_ef.#.png | Bin 1600 -> 1429 bytes .../default/00_contacts_button_bg_press_ef.#.png | Bin 1615 -> 3210 bytes .../default/00_contacts_button_focus.#.png | Bin 0 -> 3014 bytes .../default/00_contacts_button_focus_ef.#.png | Bin 1118 -> 1174 bytes .../default/00_popup_button_press_ef.#.png | Bin 1426 -> 3057 bytes .../720x1280/default/00_slider_handle_ef.png | Bin 4441 -> 5773 bytes .../720x1280/default/00_slider_handle_ef_dim.png | Bin 5616 -> 5649 bytes .../720x1280/default/00_slider_handle_ef_press.png | Bin 4009 -> 3464 bytes .../bitmaps/720x1280/default/00_tab_press_ef.#.png | Bin 1231 -> 2889 bytes .../720x1280/default/00_title_press_ef.#.png | Bin 2872 -> 2889 bytes .../720x1280/default/00_toolbar_press_ef.#.png | Bin 2872 -> 2889 bytes .../osp/bitmaps/720x1280/default/pd_btn_bg.#.png | Bin 2255 -> 4550 bytes .../720x1280/default/pd_btn_bg_arrow_down.png | Bin 3673 -> 1461 bytes .../720x1280/default/pd_btn_bg_arrow_up.png | Bin 3642 -> 1481 bytes .../osp/bitmaps/720x1280/white/00_check_bg.png | Bin 4214 -> 3705 bytes .../osp/bitmaps/720x1280/white/00_check_dim_bg.png | Bin 4195 -> 3670 bytes .../bitmaps/720x1280/white/00_slider_handle_ef.png | Bin 6772 -> 5407 bytes .../720x1280/white/00_slider_handle_ef_dim.png | Bin 6801 -> 5257 bytes .../720x1280/white/00_slider_handle_ef_press.png | Bin 5945 -> 5974 bytes src/app/FAppUiApp.cpp | 2 +- src/app/FApp_AppResourceBitmap.cpp | 4 +- src/app/FApp_AppResourceBitmapUtil.cpp | 13 +- src/app/FApp_CoordinateInfo.cpp | 20 +- src/app/FApp_ThemeInfo.cpp | 79 +- src/app/FApp_UiAppImpl.cpp | 45 +- src/app/inc/FApp_UiAppImpl.h | 3 - src/graphics/CMakeLists.txt | 2 + src/graphics/FGrpBitmap.cpp | 6 +- src/graphics/FGrpBufferInfo.cpp | 4 +- src/graphics/FGrpCanvas.cpp | 6 +- src/graphics/FGrpCoordinateSystem.cpp | 4 +- src/graphics/FGrpEnrichedText.cpp | 2 +- src/graphics/FGrpFont.cpp | 2 +- src/graphics/FGrpTextElement.cpp | 2 +- src/graphics/FGrp_Bitmap.cpp | 36 +- src/graphics/FGrp_Bitmap.h | 5 +- src/graphics/FGrp_BitmapImpl.cpp | 70 +- src/graphics/FGrp_BitmapTool.cpp | 5 +- src/graphics/FGrp_BitmapUtil.cpp | 13 +- src/graphics/FGrp_BitmapUtil.h | 10 +- src/graphics/FGrp_BufferInfoImpl.cpp | 2 + src/graphics/FGrp_Canvas.cpp | 6 +- src/graphics/FGrp_Canvas.h | 1 - src/graphics/FGrp_CanvasGpArc.cpp | 1 - src/graphics/FGrp_CanvasImpl.cpp | 38 +- src/graphics/FGrp_CanvasPixman.cpp | 21 + src/graphics/FGrp_CoordinateSystem.cpp | 4 +- src/graphics/FGrp_CoordinateSystemUtils.cpp | 0 src/graphics/FGrp_EnrichedTextImpl.cpp | 2 +- src/graphics/FGrp_Farm.cpp | 0 src/graphics/FGrp_Farm.h | 0 src/graphics/FGrp_Font.cpp | 535 ++++-- src/graphics/FGrp_Font.h | 10 + src/graphics/FGrp_FontBidiUtil.cpp | 2 +- src/graphics/FGrp_FontBidiUtil.h | 0 src/graphics/FGrp_FontFromImage.cpp | 303 +++ src/graphics/FGrp_FontFromImage.h | 111 ++ src/graphics/FGrp_FontFt2.cpp | 118 +- src/graphics/FGrp_FontFt2.h | 15 +- src/graphics/FGrp_FontImpl.cpp | 211 ++- src/graphics/FGrp_FontPrivate.cpp | 132 ++ src/graphics/FGrp_FontPrivate.h | 59 + src/graphics/FGrp_FontRsrcManager.cpp | 145 +- src/graphics/FGrp_FontRsrcManager.h | 7 + src/graphics/FGrp_IFont.h | 12 +- src/graphics/FGrp_NonScale.cpp | 2 +- src/graphics/FGrp_ResUtil.h | 15 - src/graphics/FGrp_Screen.cpp | 2 +- src/graphics/FGrp_TextElementImpl.cpp | 10 +- src/graphics/effect/FGrp_EffectFlip.cpp | 2 +- src/graphics/effect/FGrp_EffectRotate.cpp | 2 +- src/graphics/effect/FGrp_EffectScale.cpp | 6 +- src/graphics/inc/FGrp_BitmapImpl.h | 15 +- src/graphics/inc/FGrp_BitmapTool.h | 4 +- src/graphics/inc/FGrp_BufferInfoImpl.h | 3 +- src/graphics/inc/FGrp_CanvasImpl.h | 0 src/graphics/inc/FGrp_CoordinateSystemUtils.h | 0 src/graphics/inc/FGrp_FontImpl.h | 5 + src/graphics/inc/FGrp_NonScale.h | 4 +- src/graphics/inc/FGrp_TextCommon.h | 22 +- src/graphics/inc/FGrp_TextTextSimple.h | 24 +- src/graphics/opengl/FGrpCanvasTexture.cpp | 2 +- src/graphics/opengl/FGrpEgl.cpp | 465 ++++- src/graphics/opengl/FGrpGlPlayer.cpp | 2 +- src/graphics/opengl/FGrp_CanvasTexture.cpp | 18 +- src/graphics/opengl/FGrp_CanvasTextureImpl.cpp | 4 +- src/graphics/opengl/FGrp_GlPlayerImpl.cpp | 30 +- src/graphics/opengl/FGrp_VideoTexture.cpp | 50 +- src/graphics/opengl/FGrp_VideoTexture.h | 8 +- src/graphics/opengl/FGrp_VideoTextureImpl.cpp | 2 +- src/graphics/text/FGrp_TextTextColumn.cpp | 6 +- src/graphics/text/FGrp_TextTextComposite.cpp | 1230 ++++++++---- src/graphics/text/FGrp_TextTextComposite.h | 2 + src/graphics/text/FGrp_TextTextCutLink.cpp | 4 +- src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp | 2 +- src/graphics/text/FGrp_TextTextCutLinkParser.cpp | 14 +- src/graphics/text/FGrp_TextTextImage.cpp | 6 +- src/graphics/text/FGrp_TextTextLine.cpp | 49 +- src/graphics/text/FGrp_TextTextObject.cpp | 107 +- src/graphics/text/FGrp_TextTextSimple.cpp | 153 +- src/graphics/text/FGrp_TextTextUtility.cpp | 151 +- src/graphics/text/FGrp_TextTextUtility.h | 10 + src/graphics/util/FGrp_Util.cpp | 28 +- src/graphics/util/FGrp_UtilPixmap.cpp | 6 +- src/graphics/util/FGrp_UtilType.h | 5 + src/ui/CMakeLists.txt | 3 + src/ui/FUiKeyboardMap.cpp | 6 +- src/ui/FUiTouch.cpp | 6 +- src/ui/FUiTouchEventInfo.cpp | 2 +- src/ui/FUiTouchEventManager.cpp | 4 +- src/ui/FUiVariant.cpp | 48 +- src/ui/FUiWindow.cpp | 2 +- src/ui/FUi_AccessibilityElement.cpp | 45 - src/ui/FUi_AccessibilityGesture.cpp | 3 +- src/ui/FUi_AccessibilityManager.cpp | 22 +- src/ui/FUi_AccessibilitySystemSettingLoader.cpp | 3 +- src/ui/FUi_AccessibilityTtsPlayer.cpp | 121 +- src/ui/FUi_Clipboard.cpp | 41 +- src/ui/FUi_ContainerImpl.cpp | 9 + src/ui/FUi_Control.cpp | 1321 ++++++++----- src/ui/FUi_ControlImpl.cpp | 396 ++-- src/ui/FUi_ControlManager.cpp | 428 ++++- src/ui/FUi_CustomControlBaseImpl.cpp | 10 + src/ui/FUi_DataBinding.cpp | 70 +- src/ui/FUi_DimmingLayer.cpp | 22 +- src/ui/FUi_DimmingManager.cpp | 1 - src/ui/FUi_DragAndDropEvent.cpp | 183 ++ src/ui/FUi_DragAndDropItem.cpp | 82 + src/ui/FUi_EcoreEvas.cpp | 1115 +++++++++-- src/ui/FUi_EflUiEventManager.cpp | 1053 ++++++----- src/ui/FUi_EflUiEventManager.h | 1 + src/ui/FUi_FocusManagerImpl.cpp | 78 +- src/ui/FUi_InputConnectionImpl.cpp | 123 +- src/ui/FUi_InputConnectionUtils.cpp | 55 + src/ui/FUi_InputConnectionUtils.h | 46 + src/ui/FUi_KeyEventInfoImpl.cpp | 2 +- src/ui/FUi_KeyEventManager.cpp | 8 +- src/ui/FUi_KeyEventManagerImpl.cpp | 18 +- src/ui/FUi_LayoutImpl.cpp | 12 +- src/ui/FUi_ModalLoopManager.cpp | 6 + src/ui/FUi_OrientationAgent.cpp | 31 +- src/ui/FUi_ResourceManager.cpp | 1945 +++++++++++-------- src/ui/FUi_SystemUtilImpl.cpp | 8 +- src/ui/FUi_TouchEventInfoImpl.cpp | 2 +- src/ui/FUi_TouchEventManagerImpl.cpp | 7 +- src/ui/FUi_TouchFlickGestureDetector.cpp | 18 +- src/ui/FUi_TouchFlickGestureDetectorImpl.cpp | 4 +- src/ui/FUi_TouchGestureDetector.cpp | 21 +- src/ui/FUi_TouchGestureDetectorImpl.cpp | 22 +- src/ui/FUi_TouchGestureTimerManager.cpp | 18 +- src/ui/FUi_TouchLongPressGestureDetector.cpp | 14 +- src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp | 4 +- src/ui/FUi_TouchManager.cpp | 47 +- src/ui/FUi_TouchPanningGestureDetector.cpp | 12 +- src/ui/FUi_TouchPanningGestureDetectorImpl.cpp | 10 +- src/ui/FUi_TouchPinchGestureDetector.cpp | 23 +- src/ui/FUi_TouchPinchGestureDetectorImpl.cpp | 4 +- src/ui/FUi_TouchRotationGestureDetector.cpp | 10 +- src/ui/FUi_TouchRotationGestureDetectorImpl.cpp | 4 +- src/ui/FUi_TouchTapGestureDetector.cpp | 242 ++- src/ui/FUi_TouchTapGestureDetectorImpl.cpp | 4 +- src/ui/FUi_UiBuilder.cpp | 13 +- src/ui/FUi_UiBuilderControlMaker.cpp | 27 +- src/ui/FUi_UiEventManager.cpp | 45 +- src/ui/FUi_UiFocusEvent.cpp | 2 +- src/ui/FUi_UiKeyEvent.cpp | 16 + src/ui/FUi_UiTouchEvent.cpp | 640 +------ src/ui/FUi_Window.cpp | 59 +- src/ui/FUi_WindowImpl.cpp | 2 + src/ui/animations/FUiAnimFloatAnimation.cpp | 2 +- src/ui/animations/FUiAnimVisualElementSurface.cpp | 4 +- src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp | 82 +- src/ui/animations/FUiAnim_Debug.cpp | 16 +- src/ui/animations/FUiAnim_EflLayer.cpp | 187 +- .../FUiAnim_EflVisualElementSurfaceImpl.cpp | 13 + src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp | 331 +++- src/ui/animations/FUiAnim_FrameAnimatorImpl.h | 3 +- src/ui/animations/FUiAnim_MatrixUtil.cpp | 86 +- src/ui/animations/FUiAnim_TransactionNode.cpp | 5 + src/ui/animations/FUiAnim_VisualElement.cpp | 13 + .../FUiAnim_VisualElementAnimationGroupImpl.cpp | 2 + src/ui/animations/FUiAnim_VisualElementImpl.cpp | 1158 ++++++++++-- src/ui/controls/FUiCtrlButtonItem.cpp | 2 +- src/ui/controls/FUiCtrlColorPicker.cpp | 39 +- src/ui/controls/FUiCtrlContextMenu.cpp | 267 +-- src/ui/controls/FUiCtrlEditField.cpp | 0 src/ui/controls/FUiCtrlExpandableEditArea.cpp | 2 +- src/ui/controls/FUiCtrlFooterItem.cpp | 2 +- src/ui/controls/FUiCtrlGroupContainer.cpp | 15 +- src/ui/controls/FUiCtrlGroupedListView.cpp | 2 +- src/ui/controls/FUiCtrlHeaderItem.cpp | 2 +- src/ui/controls/FUiCtrlListView.cpp | 6 +- src/ui/controls/FUiCtrlOptionMenu.cpp | 124 +- src/ui/controls/FUiCtrlPanel.cpp | 45 +- src/ui/controls/FUiCtrlPopup.cpp | 2 +- src/ui/controls/FUiCtrlProgress.cpp | 4 +- src/ui/controls/FUiCtrlScrollPanel.cpp | 91 +- src/ui/controls/FUiCtrlSlider.cpp | 18 +- src/ui/controls/FUiCtrlTabBar.cpp | 33 +- src/ui/controls/FUiCtrlTabBarItem.cpp | 68 +- src/ui/controls/FUiCtrlTableView.cpp | 8 +- src/ui/controls/FUiCtrl_Animation.cpp | 20 +- src/ui/controls/FUiCtrl_AnimationPresenter.cpp | 27 +- src/ui/controls/FUiCtrl_Button.cpp | 37 +- src/ui/controls/FUiCtrl_ButtonItemImpl.cpp | 4 +- src/ui/controls/FUiCtrl_ButtonPresenter.cpp | 40 +- src/ui/controls/FUiCtrl_CheckButton.cpp | 283 +-- src/ui/controls/FUiCtrl_CheckButtonImpl.cpp | 4 +- src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp | 492 ++--- src/ui/controls/FUiCtrl_ColorChangeEvent.cpp | 16 +- src/ui/controls/FUiCtrl_ColorPicker.cpp | 55 +- src/ui/controls/FUiCtrl_ColorPickerImpl.cpp | 91 +- src/ui/controls/FUiCtrl_ColorPickerModel.cpp | 6 +- src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp | 437 ++--- src/ui/controls/FUiCtrl_ContextMenu.cpp | 214 ++- .../controls/FUiCtrl_ContextMenuGridPresenter.cpp | 251 +-- src/ui/controls/FUiCtrl_ContextMenuImpl.cpp | 99 +- src/ui/controls/FUiCtrl_ContextMenuItem.cpp | 97 +- .../controls/FUiCtrl_ContextMenuListPresenter.cpp | 206 +- src/ui/controls/FUiCtrl_ContextMenuModel.cpp | 22 +- src/ui/controls/FUiCtrl_CustomItemImpl.cpp | 50 +- .../controls/FUiCtrl_CustomListItemFormatImpl.cpp | 2 +- src/ui/controls/FUiCtrl_DateTimeBar.cpp | 56 +- src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp | 148 +- src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp | 35 +- src/ui/controls/FUiCtrl_DateTimePicker.cpp | 14 +- src/ui/controls/FUiCtrl_DateTimePresenter.cpp | 227 ++- src/ui/controls/FUiCtrl_DateTimeUtils.cpp | 44 +- src/ui/controls/FUiCtrl_Edit.cpp | 307 ++- src/ui/controls/FUiCtrl_EditAreaImpl.cpp | 48 +- src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp | 8 +- src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 911 +++++---- src/ui/controls/FUiCtrl_EditDate.cpp | 176 +- src/ui/controls/FUiCtrl_EditDateImpl.cpp | 11 +- src/ui/controls/FUiCtrl_EditDatePresenter.cpp | 151 +- src/ui/controls/FUiCtrl_EditFieldImpl.cpp | 50 +- src/ui/controls/FUiCtrl_EditPresenter.cpp | 1978 +++++++++++++++----- src/ui/controls/FUiCtrl_EditTime.cpp | 158 +- src/ui/controls/FUiCtrl_EditTimeImpl.cpp | 10 +- src/ui/controls/FUiCtrl_EditTimePresenter.cpp | 303 +-- .../controls/FUiCtrl_ExpandableEditAreaEvent.cpp | 6 +- src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp | 52 +- src/ui/controls/FUiCtrl_ExpandableListImpl.cpp | 70 +- src/ui/controls/FUiCtrl_FastScroll.cpp | 4 +- src/ui/controls/FUiCtrl_FastScrollEvent.cpp | 4 +- src/ui/controls/FUiCtrl_FastScrollIndex.cpp | 60 +- src/ui/controls/FUiCtrl_FastScrollModel.cpp | 2 +- src/ui/controls/FUiCtrl_FastScrollPresenter.cpp | 235 ++- src/ui/controls/FUiCtrl_FooterImpl.cpp | 62 +- src/ui/controls/FUiCtrl_FooterItemImpl.cpp | 4 +- src/ui/controls/FUiCtrl_Form.cpp | 439 ++--- src/ui/controls/FUiCtrl_FormImpl.cpp | 112 +- src/ui/controls/FUiCtrl_FormPresenter.cpp | 2 +- src/ui/controls/FUiCtrl_Frame.cpp | 369 +++- src/ui/controls/FUiCtrl_FrameImpl.cpp | 9 +- src/ui/controls/FUiCtrl_FramePresenter.cpp | 2 +- src/ui/controls/FUiCtrl_Gallery.cpp | 28 + src/ui/controls/FUiCtrl_GalleryImageReader.cpp | 2 +- src/ui/controls/FUiCtrl_GalleryPresenter.cpp | 1 - src/ui/controls/FUiCtrl_GalleryRenderer.cpp | 2 +- .../controls/FUiCtrl_GalleryViewEventHandler.cpp | 15 +- src/ui/controls/FUiCtrl_GroupContainer.cpp | 69 +- src/ui/controls/FUiCtrl_GroupContainerImpl.cpp | 4 +- .../controls/FUiCtrl_GroupContainerPresenter.cpp | 29 +- src/ui/controls/FUiCtrl_GroupItemImpl.cpp | 2 +- src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp | 124 +- .../FUiCtrl_GroupedListViewItemProviderAdaptor.cpp | 33 +- src/ui/controls/FUiCtrl_HeaderImpl.cpp | 64 +- src/ui/controls/FUiCtrl_HeaderItemImpl.cpp | 4 +- src/ui/controls/FUiCtrl_IconListData.cpp | 4 +- src/ui/controls/FUiCtrl_IconListImpl.cpp | 8 +- src/ui/controls/FUiCtrl_IconListItem.cpp | 43 +- .../FUiCtrl_IconListItemDrawingProperty.cpp | 44 +- src/ui/controls/FUiCtrl_IconListPresenter.cpp | 152 +- src/ui/controls/FUiCtrl_IconListView.cpp | 30 +- src/ui/controls/FUiCtrl_IconListViewImpl.cpp | 2 +- src/ui/controls/FUiCtrl_Indicator.cpp | 737 +++++++- src/ui/controls/FUiCtrl_IndicatorManager.cpp | 13 +- src/ui/controls/FUiCtrl_InputPad.cpp | 2 +- src/ui/controls/FUiCtrl_InputPadPresenter.cpp | 82 +- src/ui/controls/FUiCtrl_Keypad.cpp | 41 +- src/ui/controls/FUiCtrl_KeypadEvent.cpp | 8 +- src/ui/controls/FUiCtrl_KeypadImpl.cpp | 2 +- src/ui/controls/FUiCtrl_Label.cpp | 55 +- src/ui/controls/FUiCtrl_LabelImpl.cpp | 8 + src/ui/controls/FUiCtrl_LanguageEvent.cpp | 4 +- src/ui/controls/FUiCtrl_LinkEvent.cpp | 4 +- src/ui/controls/FUiCtrl_ListBaseImpl.cpp | 14 +- src/ui/controls/FUiCtrl_ListContextItemImpl.cpp | 18 +- src/ui/controls/FUiCtrl_ListImpl.cpp | 8 +- src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp | 6 +- src/ui/controls/FUiCtrl_ListViewContextItem.cpp | 6 +- src/ui/controls/FUiCtrl_ListViewImpl.cpp | 119 +- src/ui/controls/FUiCtrl_ListViewItem.cpp | 128 +- .../FUiCtrl_ListViewItemProviderAdaptor.cpp | 33 +- src/ui/controls/FUiCtrl_ListViewModel.cpp | 9 +- src/ui/controls/FUiCtrl_MessageBox.cpp | 105 +- src/ui/controls/FUiCtrl_MessageBoxImpl.cpp | 1 - src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp | 104 +- src/ui/controls/FUiCtrl_OptionMenu.cpp | 436 ++++- src/ui/controls/FUiCtrl_OptionMenuImpl.cpp | 65 +- src/ui/controls/FUiCtrl_OptionMenuItem.cpp | 126 +- src/ui/controls/FUiCtrl_OptionMenuModel.cpp | 32 +- src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp | 230 ++- src/ui/controls/FUiCtrl_OverlayAgent.cpp | 461 ++++- src/ui/controls/FUiCtrl_OverlayPanel.cpp | 30 +- src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp | 5 +- src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp | 37 +- src/ui/controls/FUiCtrl_Panel.cpp | 14 +- src/ui/controls/FUiCtrl_PanelImpl.cpp | 25 +- src/ui/controls/FUiCtrl_PanelPresenter.cpp | 4 +- src/ui/controls/FUiCtrl_Popup.cpp | 209 +-- src/ui/controls/FUiCtrl_PopupImpl.cpp | 5 +- src/ui/controls/FUiCtrl_PopupPresenter.cpp | 2 + src/ui/controls/FUiCtrl_Progress.cpp | 46 +- src/ui/controls/FUiCtrl_ProgressImpl.cpp | 14 +- src/ui/controls/FUiCtrl_ProgressPopup.cpp | 210 +-- src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp | 2 +- src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp | 9 +- src/ui/controls/FUiCtrl_ProgressPresenter.cpp | 56 +- src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp | 18 +- .../FUiCtrl_PublicExpandableEditAreaEvent.cpp | 6 +- src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp | 8 +- src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp | 8 +- src/ui/controls/FUiCtrl_PublicLinkEvent.cpp | 4 +- src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp | 19 +- src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp | 4 +- src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp | 8 +- src/ui/controls/FUiCtrl_PublicTextEvent.cpp | 8 +- src/ui/controls/FUiCtrl_Scroll.cpp | 4 +- src/ui/controls/FUiCtrl_ScrollEventArg.cpp | 6 +- src/ui/controls/FUiCtrl_ScrollPanel.cpp | 39 +- src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp | 19 +- src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp | 17 +- src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp | 80 +- src/ui/controls/FUiCtrl_ScrollPresenter.cpp | 221 +-- src/ui/controls/FUiCtrl_SearchBar.cpp | 527 +++--- src/ui/controls/FUiCtrl_SearchBarEvent.cpp | 14 +- src/ui/controls/FUiCtrl_SearchBarImpl.cpp | 142 +- src/ui/controls/FUiCtrl_SearchBarPresenter.cpp | 115 +- src/ui/controls/FUiCtrl_SimpleItemImpl.cpp | 2 +- .../controls/FUiCtrl_SlidableGroupedListImpl.cpp | 2 +- src/ui/controls/FUiCtrl_SlidableListImpl.cpp | 15 +- src/ui/controls/FUiCtrl_Slider.cpp | 149 +- src/ui/controls/FUiCtrl_SliderEvent.cpp | 8 +- src/ui/controls/FUiCtrl_SliderImpl.cpp | 31 +- src/ui/controls/FUiCtrl_SliderOverlay.cpp | 28 +- src/ui/controls/FUiCtrl_SliderPresenter.cpp | 503 ++--- src/ui/controls/FUiCtrl_SplitPanel.cpp | 102 +- src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp | 157 +- src/ui/controls/FUiCtrl_Tab.cpp | 109 +- src/ui/controls/FUiCtrl_TabBar.cpp | 61 +- src/ui/controls/FUiCtrl_TabBarImpl.cpp | 71 +- src/ui/controls/FUiCtrl_TabBarItem.cpp | 8 +- src/ui/controls/FUiCtrl_TabBarModel.cpp | 29 +- src/ui/controls/FUiCtrl_TabBarPresenter.cpp | 165 +- src/ui/controls/FUiCtrl_TabImpl.cpp | 2 +- src/ui/controls/FUiCtrl_TabPresenter.cpp | 272 +-- src/ui/controls/FUiCtrl_TableView.cpp | 184 +- src/ui/controls/FUiCtrl_TableViewImpl.cpp | 94 +- src/ui/controls/FUiCtrl_TableViewItem.cpp | 740 +++++--- src/ui/controls/FUiCtrl_TableViewItemEvent.cpp | 139 +- src/ui/controls/FUiCtrl_TableViewItemImpl.cpp | 13 +- .../FUiCtrl_TableViewItemProviderAdaptor.cpp | 30 +- src/ui/controls/FUiCtrl_TableViewPresenter.cpp | 1117 ++++++++--- src/ui/controls/FUiCtrl_TextBlockEvent.cpp | 8 +- src/ui/controls/FUiCtrl_TextBoxImpl.cpp | 10 +- src/ui/controls/FUiCtrl_TextEvent.cpp | 8 +- src/ui/controls/FUiCtrl_TokenEdit.cpp | 80 +- src/ui/controls/FUiCtrl_TokenEditModel.cpp | 6 +- src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 978 ++++++---- src/ui/controls/FUiCtrl_Toolbar.cpp | 914 ++++++--- src/ui/controls/FUiCtrl_ToolbarPresenter.cpp | 64 +- src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp | 4 +- src/ui/controls/FUiCtrl_UiScrollEvent.cpp | 8 +- src/ui/controls/FUiCtrl_UiScrollEventArg.cpp | 8 +- src/ui/controls/font.png | 1166 ++++++++++++ src/ui/effects/FUiEffects_EffectErrorMessages.cpp | 2 +- src/ui/effects/FUiEffects_EffectImpl.cpp | 4 +- .../parser/FUiEffects_ParserEffectParser.cpp | 2 +- .../renderer/FUiEffects_RendererEffectRenderer.cpp | 2 +- src/ui/effects/runtime/lua-cpp-binding/tolua.cpp | 2 +- src/ui/inc/FUiAnim_EflLayer.h | 26 +- src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h | 0 src/ui/inc/FUiAnim_NativeLayer.h | 18 + src/ui/inc/FUiAnim_VisualElement.h | 3 + src/ui/inc/FUiAnim_VisualElementImpl.h | 2 +- src/ui/inc/FUiCtrl_Animation.h | 6 +- src/ui/inc/FUiCtrl_AnimationPresenter.h | 1 + src/ui/inc/FUiCtrl_Button.h | 1 + src/ui/inc/FUiCtrl_ButtonItemImpl.h | 1 - src/ui/inc/FUiCtrl_ButtonPresenter.h | 1 + src/ui/inc/FUiCtrl_CheckButton.h | 8 +- src/ui/inc/FUiCtrl_ColorPickerPresenter.h | 2 +- src/ui/inc/FUiCtrl_ContextMenu.h | 7 +- src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h | 13 +- src/ui/inc/FUiCtrl_ContextMenuItem.h | 6 +- src/ui/inc/FUiCtrl_ContextMenuListPresenter.h | 9 +- src/ui/inc/FUiCtrl_DateTimeBar.h | 3 + src/ui/inc/FUiCtrl_DateTimeBarPresenter.h | 6 + src/ui/inc/FUiCtrl_Edit.h | 40 +- src/ui/inc/FUiCtrl_EditCopyPasteManager.h | 8 +- src/ui/inc/FUiCtrl_EditDate.h | 19 + src/ui/inc/FUiCtrl_EditDatePresenter.h | 12 +- src/ui/inc/FUiCtrl_EditFieldImpl.h | 0 src/ui/inc/FUiCtrl_EditPresenter.h | 48 +- src/ui/inc/FUiCtrl_EditTime.h | 22 +- src/ui/inc/FUiCtrl_EditTimePresenter.h | 12 +- src/ui/inc/FUiCtrl_FastScrollPresenter.h | 2 +- src/ui/inc/FUiCtrl_FlickAnimation.h | 4 - src/ui/inc/FUiCtrl_FooterImpl.h | 6 +- src/ui/inc/FUiCtrl_FooterItemImpl.h | 1 - src/ui/inc/FUiCtrl_Form.h | 14 +- src/ui/inc/FUiCtrl_Frame.h | 20 +- src/ui/inc/FUiCtrl_Gallery.h | 4 + src/ui/inc/FUiCtrl_GroupedListViewImpl.h | 3 +- .../FUiCtrl_GroupedListViewItemProviderAdaptor.h | 4 + src/ui/inc/FUiCtrl_HeaderImpl.h | 6 +- src/ui/inc/FUiCtrl_HeaderItemImpl.h | 1 - src/ui/inc/FUiCtrl_IContextMenuPresenter.h | 6 +- .../FUiCtrl_IFormActivationChangeEventListener.h | 6 +- src/ui/inc/FUiCtrl_IconListItem.h | 2 +- src/ui/inc/FUiCtrl_IconListPresenter.h | 3 + src/ui/inc/FUiCtrl_IconListView.h | 3 + src/ui/inc/FUiCtrl_Indicator.h | 27 + src/ui/inc/FUiCtrl_Keypad.h | 3 + src/ui/inc/FUiCtrl_Label.h | 3 + src/ui/inc/FUiCtrl_ListViewImpl.h | 3 +- src/ui/inc/FUiCtrl_ListViewItem.h | 8 +- src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h | 3 + src/ui/inc/FUiCtrl_OptionMenu.h | 19 +- src/ui/inc/FUiCtrl_OptionMenuItem.h | 6 +- src/ui/inc/FUiCtrl_OptionMenuModel.h | 0 src/ui/inc/FUiCtrl_OptionMenuPresenter.h | 20 +- src/ui/inc/FUiCtrl_OverlayAgent.h | 70 +- src/ui/inc/FUiCtrl_OverlayRegionImpl.h | 1 + src/ui/inc/FUiCtrl_Popup.h | 5 - src/ui/inc/FUiCtrl_ProgressPresenter.h | 2 - src/ui/inc/FUiCtrl_ScrollPanel.h | 2 + src/ui/inc/FUiCtrl_ScrollPanelPresenter.h | 5 +- src/ui/inc/FUiCtrl_SearchBar.h | 13 +- src/ui/inc/FUiCtrl_SearchBarImpl.h | 8 +- src/ui/inc/FUiCtrl_SearchBarPresenter.h | 1 - src/ui/inc/FUiCtrl_Slider.h | 1 + src/ui/inc/FUiCtrl_SliderOverlay.h | 2 - src/ui/inc/FUiCtrl_SliderPresenter.h | 22 +- src/ui/inc/FUiCtrl_SplitPanelPresenter.h | 6 +- src/ui/inc/FUiCtrl_TabPresenter.h | 12 +- src/ui/inc/FUiCtrl_TableView.h | 17 +- src/ui/inc/FUiCtrl_TableViewItem.h | 23 +- src/ui/inc/FUiCtrl_TableViewPresenter.h | 45 +- src/ui/inc/FUiCtrl_TokenEditPresenter.h | 44 +- src/ui/inc/FUiCtrl_Toolbar.h | 9 +- src/ui/inc/FUi_AccessibilityGesture.h | 3 + src/ui/inc/FUi_AccessibilityTtsPlayer.h | 4 +- src/ui/inc/FUi_Control.h | 101 +- src/ui/inc/FUi_ControlImpl.h | 29 +- src/ui/inc/FUi_ControlManager.h | 27 +- src/ui/inc/FUi_DragAndDropEvent.h | 74 + src/ui/inc/FUi_DragAndDropItem.h | 60 + src/ui/inc/FUi_EcoreEvas.h | 31 +- src/ui/inc/FUi_FocusManagerImpl.h | 3 +- src/ui/inc/FUi_IDragAndDropEventListener.h | 96 + src/ui/inc/FUi_ITouchEventListener.h | 10 +- src/ui/inc/FUi_ITouchEventPreviewer.h | 10 +- src/ui/inc/FUi_IUiEventManager.h | 1 + src/ui/inc/FUi_ModalLoopManager.h | 1 + src/ui/inc/FUi_ResourceColorPickerConfig.h | 3 +- src/ui/inc/FUi_ResourceConfigLoader.h | 2 +- src/ui/inc/FUi_ResourceConfigMacro.h | 22 +- src/ui/inc/FUi_ResourceEditConfig.h | 3 + src/ui/inc/FUi_ResourceFooterConfig.h | 2 + src/ui/inc/FUi_ResourceFormConfig.h | 1 + src/ui/inc/FUi_ResourceHeaderConfig.h | 19 +- src/ui/inc/FUi_ResourceManager.h | 18 +- src/ui/inc/FUi_ResourceMap.h | 62 +- src/ui/inc/FUi_ResourceMapContainer.h | 6 + src/ui/inc/FUi_ResourceOptionMenuConfig.h | 1 + src/ui/inc/FUi_ResourceTabBarConfig.h | 4 +- src/ui/inc/FUi_TouchManager.h | 7 + src/ui/inc/FUi_TouchTapGestureDetector.h | 8 +- src/ui/inc/FUi_Types.h | 2 + src/ui/inc/FUi_UiBuilderConfig.h | 1 - src/ui/inc/FUi_UiEventManager.h | 2 + src/ui/inc/FUi_UiTouchEvent.h | 125 +- src/ui/inc/FUi_Window.h | 1 - src/ui/layout/FUi_LayoutRelativeLayout.cpp | 0 src/ui/resource/FUi_ResourceColorPickerConfig.cpp | 12 +- src/ui/resource/FUi_ResourceEditConfig.cpp | 6 +- src/ui/resource/FUi_ResourceFooterConfig.cpp | 34 +- src/ui/resource/FUi_ResourceFormConfig.cpp | 2 + src/ui/resource/FUi_ResourceHeaderConfig.cpp | 44 +- src/ui/resource/FUi_ResourceListConfig.cpp | 2 +- src/ui/resource/FUi_ResourceListViewConfig.cpp | 6 +- src/ui/resource/FUi_ResourceMapContainer.cpp | 75 +- src/ui/resource/FUi_ResourceMessageBoxConfig.cpp | 0 src/ui/resource/FUi_ResourceOptionMenuConfig.cpp | 1 + src/ui/resource/FUi_ResourcePopupConfig.cpp | 0 src/ui/resource/FUi_ResourceSearchBarConfig.cpp | 6 +- src/ui/resource/FUi_ResourceSliderConfig.cpp | 12 +- src/ui/resource/FUi_ResourceStringLoader.cpp | 1 - src/ui/resource/FUi_ResourceTabBarConfig.cpp | 3 +- src/ui/resource/FUi_ResourceTableViewConfig.cpp | 2 +- src/ui/scenes/FUiScenesSceneManager.cpp | 3 +- 856 files changed, 31126 insertions(+), 18585 deletions(-) mode change 100755 => 100644 LICENSE.Flora mode change 100755 => 100644 inc/FUiCtrlEditArea.h mode change 100755 => 100644 inc/FUiCtrlEditField.h mode change 100755 => 100644 inc/FUiCtrlExpandableEditArea.h mode change 100755 => 100644 inc/FUiCtrlOptionMenu.h mode change 100755 => 100644 inc/FUiCtrlSearchBar.h create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_top.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef_press.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_tab_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_title_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg_arrow_down.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg_arrow_up.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg_dim_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_tab_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_title_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg_arrow_down.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg_arrow_up.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_down.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_up.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_top.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_circle_bg_ef_press.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_tab_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_title_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_down.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_up.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_dim_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_tab_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_title_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_press_ef.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg.#.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_down.png mode change 100644 => 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_up.png mode change 100755 => 100644 src/app/inc/FApp_UiAppImpl.h mode change 100755 => 100644 src/graphics/FGrp_Bitmap.cpp mode change 100755 => 100644 src/graphics/FGrp_Bitmap.h mode change 100755 => 100644 src/graphics/FGrp_BitmapImpl.cpp mode change 100755 => 100644 src/graphics/FGrp_Canvas.cpp mode change 100755 => 100644 src/graphics/FGrp_Canvas.h mode change 100755 => 100644 src/graphics/FGrp_CanvasImpl.cpp mode change 100755 => 100644 src/graphics/FGrp_CanvasPixman.cpp mode change 100755 => 100644 src/graphics/FGrp_CoordinateSystemUtils.cpp mode change 100755 => 100644 src/graphics/FGrp_Farm.cpp mode change 100755 => 100644 src/graphics/FGrp_Farm.h mode change 100755 => 100644 src/graphics/FGrp_FontBidiUtil.cpp mode change 100755 => 100644 src/graphics/FGrp_FontBidiUtil.h create mode 100644 src/graphics/FGrp_FontFromImage.cpp create mode 100644 src/graphics/FGrp_FontFromImage.h mode change 100755 => 100644 src/graphics/FGrp_FontImpl.cpp create mode 100644 src/graphics/FGrp_FontPrivate.cpp create mode 100644 src/graphics/FGrp_FontPrivate.h mode change 100755 => 100644 src/graphics/inc/FGrp_BitmapImpl.h mode change 100755 => 100644 src/graphics/inc/FGrp_CanvasImpl.h mode change 100755 => 100644 src/graphics/inc/FGrp_CoordinateSystemUtils.h mode change 100755 => 100644 src/graphics/inc/FGrp_FontImpl.h create mode 100644 src/ui/FUi_DragAndDropEvent.cpp create mode 100644 src/ui/FUi_DragAndDropItem.cpp create mode 100644 src/ui/FUi_InputConnectionUtils.cpp create mode 100644 src/ui/FUi_InputConnectionUtils.h mode change 100755 => 100644 src/ui/FUi_ResourceManager.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrlEditField.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_Edit.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_EditFieldImpl.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_EditPresenter.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_FormImpl.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_Frame.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_FrameImpl.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_Keypad.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_OptionMenuImpl.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_OptionMenuItem.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_OptionMenuModel.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp mode change 100755 => 100644 src/ui/controls/FUiCtrl_PopupPresenter.cpp create mode 100644 src/ui/controls/font.png mode change 100755 => 100644 src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h mode change 100755 => 100644 src/ui/inc/FUiCtrl_Edit.h mode change 100755 => 100644 src/ui/inc/FUiCtrl_EditFieldImpl.h mode change 100755 => 100644 src/ui/inc/FUiCtrl_EditPresenter.h mode change 100755 => 100644 src/ui/inc/FUiCtrl_OptionMenuItem.h mode change 100755 => 100644 src/ui/inc/FUiCtrl_OptionMenuModel.h create mode 100644 src/ui/inc/FUi_DragAndDropEvent.h create mode 100644 src/ui/inc/FUi_DragAndDropItem.h create mode 100644 src/ui/inc/FUi_IDragAndDropEventListener.h mode change 100755 => 100644 src/ui/layout/FUi_LayoutRelativeLayout.cpp mode change 100755 => 100644 src/ui/resource/FUi_ResourceMessageBoxConfig.cpp mode change 100755 => 100644 src/ui/resource/FUi_ResourcePopupConfig.cpp diff --git a/LICENSE.Flora b/LICENSE.Flora old mode 100755 new mode 100644 diff --git a/inc/FGrpBitmap.h b/inc/FGrpBitmap.h index 235fd00..82aba55 100644 --- a/inc/FGrpBitmap.h +++ b/inc/FGrpBitmap.h @@ -20,8 +20,7 @@ * @brief This is the header file for the %Bitmap class. * * This header file contains the declarations of the %Bitmap class. @n - * The class encapsulates a bitmap, which consists of the pixel data - * for a graphics image and its attributes. + * The class encapsulates a bitmap, which consists of the pixel data for a graphics image and its attributes. * */ @@ -59,9 +58,8 @@ class Canvas; * * @final This class is not intended for extension. * - * The %Bitmap class encapsulates a bitmap, which consists of the pixel data - * for an image and its attributes. - * @n + * The %Bitmap class encapsulates a bitmap, which consists of the pixel data for an image and its attributes. + * * For more information on the class features, see Bitmaps. * * @@ -71,12 +69,10 @@ class _OSP_EXPORT_ Bitmap { public: /** - * This is the default constructor for this class. + * This is the default constructor for this class. @n + * After creating an instance of this class, one of the Construct() methods must be called explicitly to initialize this instance. * * @since 2.0 - * @remarks After creating an instance of this class, one of the - * Construct() methods must be called explicitly to initialize this instance. - * */ Bitmap(void); @@ -93,12 +89,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect The rectangular area of the Frame to copy into bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The area defined by @c rect is clipped to the edges of the Frame so that - * the rectangle does not fall outside the edges of the Frame. @n - * The rectangle must not fall outside the edges of the Frame entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] rect The rectangular area of the Frame to copy into bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The area defined by @c rect is clipped to the edges of the %Frame so that + * the rectangle does not fall outside the edges of the %Frame. @n + * The rectangle must not fall outside the edges of the %Frame entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -112,9 +108,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] dim The dimensions of the bitmap @n - * The width and height must be greater than @c 0. - * @param[in] format The pixel format + * @param[in] dim The dimensions of the bitmap @n + * The width and height must be greater than @c 0. + * @param[in] format The pixel format * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -128,15 +124,15 @@ public: * @since 2.0 * * @return An error code - * @param[in] canvas The canvas to copy @n - * The canvas must be constructed successfully before it is passed into this method. @n - * If not, an @c E_INVALID_ARG exception is returned. - * @param[in] rect The rectangular area of the canvas to copy into a bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The rectangle defined by @c rect is clipped to the edges of the canvas so that - * the rectangle does not fall outside the edges of the canvas. @n - * The rectangle must not fall outside the edges of the canvas entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] canvas The canvas to copy @n + * The canvas must be constructed successfully before it is passed into this method. @n + * If not, an @c E_INVALID_ARG exception is returned. + * @param[in] rect The rectangular area of the canvas to copy into a bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The rectangle defined by @c rect is clipped to the edges of the canvas so that + * the rectangle does not fall outside the edges of the canvas. @n + * The rectangle must not fall outside the edges of the canvas entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -150,15 +146,15 @@ public: * @since 2.0 * * @return An error code - * @param[in] bitmap The source bitmap @n - * The bitmap must be constructed successfully before it is passed into this method. @n - * If not, an @c E_INVALID_ARG exception is returned. - * @param[in] rect The rectangular area of the source bitmap to copy into this bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that - * the rectangle does not fall outside the edges of the source bitmap. @n - * The rectangle must not fall outside the edges of the source bitmap entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The source bitmap @n + * The bitmap must be constructed successfully before it is passed into this method. @n + * If not, an @c E_INVALID_ARG exception is returned. + * @param[in] rect The rectangular area of the source bitmap to copy into this bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that + * the rectangle does not fall outside the edges of the source bitmap. @n + * The rectangle must not fall outside the edges of the source bitmap entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -172,10 +168,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] buffer The buffer containing raw data - * @param[in] dim The dimensions of the bitmap @n - * The width and height must be greater than @c 0. - * @param[in] pixelFormat The pixel format of raw data + * @param[in] buffer The buffer containing raw data + * @param[in] dim The dimensions of the bitmap @n + * The width and height must be greater than @c 0. + * @param[in] pixelFormat The pixel format of raw data * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -190,13 +186,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] buffer The buffer containing raw data - * @param[in] dim The dimensions of the bitmap @n - * The width and height must be greater than @c 0. - * @param[in] pixelFormat The pixel format of raw data - * @param[in] bufferScaling The buffer scaling type - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @param[in] buffer The buffer containing raw data + * @param[in] dim The dimensions of the bitmap @n + * The width and height must be greater than @c 0. + * @param[in] pixelFormat The pixel format of raw data + * @param[in] bufferScaling The buffer scaling type + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. * @remarks The position property of %ByteBuffer can be changed. * @@ -209,12 +205,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The rectangular area of the frame that is copied into bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The area defined by @c rect is clipped to the edges of the frame so that - * the rectangle does not fall outside the edges of the frame. @n - * The rectangle must not fall outside the edges of the frame entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] rect The rectangular area of the frame that is copied into bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The area defined by @c rect is clipped to the edges of the frame so that + * the rectangle does not fall outside the edges of the frame. @n + * The rectangle must not fall outside the edges of the frame entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -228,9 +224,9 @@ public: * @since 2.1 * * @return An error code - * @param[in] dim The dimensions of the bitmap @n - * The width and height must be greater than @c 0. - * @param[in] format The pixel format + * @param[in] dim The dimensions of the bitmap @n + * The width and height must be greater than @c 0. + * @param[in] format The pixel format * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -244,15 +240,15 @@ public: * @since 2.1 * * @return An error code - * @param[in] canvas The canvas to copy @n - * The canvas must be constructed successfully before it is passed into this method. @n - * If not, an @c E_INVALID_ARG exception is returned. - * @param[in] rect The rectangular area of the canvas that is copied into a bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The rectangle defined by @c rect is clipped to the edges of the canvas so that - * the rectangle does not fall outside the edges of the canvas. @n - * The rectangle must not fall outside the edges of the canvas entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] canvas The canvas to copy @n + * The canvas must be constructed successfully before it is passed into this method. @n + * If not, an @c E_INVALID_ARG exception is returned. + * @param[in] rect The rectangular area of the canvas that is copied into a bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The rectangle defined by @c rect is clipped to the edges of the canvas so that + * the rectangle does not fall outside the edges of the canvas. @n + * The rectangle must not fall outside the edges of the canvas entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -266,15 +262,15 @@ public: * @since 2.1 * * @return An error code - * @param[in] bitmap The source bitmap @n - * The bitmap must be constructed successfully before it is passed into this method. @n - * If not, an @c E_INVALID_ARG exception is returned. - * @param[in] rect The rectangular area of the source bitmap that is copied into this bitmap @n - * The width and height of the rectangle must be greater than @c 0. @n - * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that - * the rectangle does not fall outside the edges of the source bitmap. @n - * The rectangle must not fall outside the edges of the source bitmap entirely. @n - * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The source bitmap @n + * The bitmap must be constructed successfully before it is passed into this method. @n + * If not, an @c E_INVALID_ARG exception is returned. + * @param[in] rect The rectangular area of the source bitmap that is copied into this bitmap @n + * The width and height of the rectangle must be greater than @c 0. @n + * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that + * the rectangle does not fall outside the edges of the source bitmap. @n + * The rectangle must not fall outside the edges of the source bitmap entirely. @n + * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -289,8 +285,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] dim The dimensions of the specified rectangular area @n - * The width and height must be greater than @c 0. + * @param[in] dim The dimensions of the specified rectangular area @n + * The width and height must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @@ -303,8 +299,8 @@ public: * @since 2.1 * * @return An error code - * @param[in] dim The dimensions of the specified rectangular area @n - * The width and height must be greater than @c 0. + * @param[in] dim The dimensions of the specified rectangular area @n + * The width and height must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @@ -317,15 +313,14 @@ public: * @since 2.0 * * @return An error code - * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance - * @param[in] srcBitmap The source bitmap instance to copy from - * @param[in] srcRect The rectangular area to copy from the source bitmap @n - The width and height of the rectangle must be greater than or equal to @c 0. + * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance + * @param[in] srcBitmap The source bitmap instance to copy from + * @param[in] srcRect The rectangular area to copy from the source bitmap @n + The width and height of the rectangle must be greater than or equal to @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n * - The value of the argument is outside the valid range defined by the method. @n - * - The destX, destY, srcX, or srcY has a negative value. @n - * - The specified @c srcWidth or @c srcHeight is less than @c 0. + * - The destX, destY, srcX, or srcY has a negative value. * @exception E_INVALID_ARG A specified input parameter is invalid. * */ @@ -337,15 +332,14 @@ public: * @since 2.1 * * @return An error code - * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance - * @param[in] srcBitmap The source bitmap instance to copy from - * @param[in] srcRect The rectangular area to copy from the source bitmap @n - * The width and height of the rectangle must be greater than or equal to @c 0. + * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance + * @param[in] srcBitmap The source bitmap instance to copy from + * @param[in] srcRect The rectangular area to copy from the source bitmap @n + * The width and height of the rectangle must be greater than or equal to @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n * - The value of the argument is outside the valid range defined by the method. @n * - The destX, destY, srcX, or srcY has a negative value. @n - * - The specified @c srcWidth or @c srcHeight is less than @c 0. * @exception E_INVALID_ARG A specified input parameter is invalid. * */ @@ -444,7 +438,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] quality The scaling quality to use for bitmap scaling. + * @param[in] quality The scaling quality to use for bitmap scaling. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @@ -456,8 +450,8 @@ public: * * @since 2.0 * - * @return The scaling quality - * @remarks The default value is @c BITMAP_SCALING_QUALITY_LOW. + * @return The scaling quality @n + * The default value is @c BITMAP_SCALING_QUALITY_LOW. * */ BitmapScalingQuality GetScalingQuality(void) const; @@ -469,9 +463,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] pColor The color that is treated as transparent @n - * If the parameter is set to @c null, the masking color is removed from this bitmap. @n - * Only ::BITMAP_PIXEL_FORMAT_RGB565 is supported. + * @param[in] pColor The color that is treated as transparent @n + * If the parameter is set to @c null, the masking color is removed from this bitmap. @n + * Only ::BITMAP_PIXEL_FORMAT_RGB565 is supported. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @@ -484,7 +478,7 @@ public: * @since 2.0 * * @return An error code - * @param[out] color The color that is treated as transparent + * @param[out] color The color that is treated as transparent * @exception E_SUCCESS The method is successful. * @exception E_INVALID_DATA The masking color is not defined. * @@ -497,7 +491,7 @@ public: * @since 2.0 * @param[in] opacity The opacity of the bitmap @n * This value ranges from @c 0 to @c 255. - * @remarks The alpha constant is used for the Canvas::DrawBitmap() method. + * @remarks The alpha constant is used for the Canvas::DrawBitmap() method. */ void SetAlphaConstant(int opacity); @@ -530,11 +524,11 @@ public: * @since 2.0 * * @return An error code - * @param[out] info The extra information of the bitmap - * @param[in] timeout The time in milliseconds @n - * This value determines the time the caller waits for the lock to be obtained. @n - * If the lock attempt fails, @c E_TIMEOUT is returned. @n - * The default value is @c INFINITE, which means that the method does not return a value until the lock is acquired. + * @param[out] info The extra information of the bitmap + * @param[in] timeout The time in milliseconds @n + * This value determines the time the caller waits for the lock to be obtained. @n + * If the lock attempt fails, @c E_TIMEOUT is returned. @n + * The default value is @c INFINITE, which means that the method does not return a value until the lock is acquired. * @exception E_SUCCESS The method is successful. * @exception E_TIMEOUT The operation is not completed within the specified time period. * @exception E_SYSTEM An unknown operating system error has occurred. @@ -558,19 +552,19 @@ public: result Unlock(void); /** - * Gets a non scaled bitmap. + * Gets a non-scaled bitmap. * * @since 2.0 * - * @return The non scaled bitmap, @n + * @return The non-scaled bitmap, @n * else @c null if an exception occurs - * @param[in] buffer The buffer containing raw data - * @param[in] dim The dimensions of the bitmap @n - * The width and height must be greater than @c 0. - * @param[in] pixelFormat The pixel format of raw data - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. + * @param[in] buffer The buffer containing raw data + * @param[in] dim The dimensions of the bitmap @n + * The width and height must be greater than @c 0. + * @param[in] pixelFormat The pixel format of raw data + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. * * @remarks The specific error code can be accessed using the GetLastResult() method. */ diff --git a/inc/FGrpCanvas.h b/inc/FGrpCanvas.h index e7c598a..090cba9 100644 --- a/inc/FGrpCanvas.h +++ b/inc/FGrpCanvas.h @@ -52,7 +52,7 @@ class EnrichedText; * * The %Canvas class provides a rectangular region to draw objects on the display device. The %Canvas instance is * associated with a specific context. - * @n + * * For more information on the class features, see Canvas. * */ @@ -61,11 +61,10 @@ class _OSP_EXPORT_ Canvas { public: /** - * This is the default constructor for this class. + * This is the default constructor for this class. @n + * After creating an instance of this class, one of the Construct() methods must be called explicitly to initialize this instance. * * @since 2.0 - * @remarks After creating an instance of this class, one of the Construct() methods must be - * called explicitly to initialize this instance. */ Canvas(void); @@ -263,8 +262,8 @@ public: * * @since 2.0 * - * @return An instance of LineStyle - * @remarks The default value is @c LINE_STYLE_SOLID. + * @return An instance of LineStyle @n + * The default value is @c LINE_STYLE_SOLID. */ LineStyle GetLineStyle(void) const; @@ -274,8 +273,8 @@ public: * @since 2.0 * * @return The line width, @n - * else @c -1 if the method fails - * @remarks The default value is @c 1. + * else @c -1 if the method fails @n + * The default value is @c 1. */ int GetLineWidth(void) const; @@ -285,8 +284,8 @@ public: * @since 2.1 * * @return The line width, @n - * else @c -1.0f if the method fails - * @remarks The default value is @c 1.0f. + * else @c -1.0f if the method fails @n + * The default value is @c 1.0f. */ float GetLineWidthF(void) const; @@ -361,7 +360,7 @@ public: * * @return An error code * @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. + * 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. @@ -375,7 +374,7 @@ public: * * @return An error code * @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. + * 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. @@ -399,8 +398,8 @@ public: * * @since 2.1 * - * @return The current line cap style - * @remarks The default style is @c LINE_CAP_STYLE_ROUND. + * @return The current line cap style @n + * The default style is @c LINE_CAP_STYLE_ROUND. */ LineCapStyle GetLineCapStyle(void) const; @@ -421,8 +420,8 @@ public: * * @since 2.1 * - * @return The current line join style - * @remarks The default style is @c LINE_JOIN_STYLE_ROUND. + * @return The current line join style @n + * The default style is @c LINE_JOIN_STYLE_ROUND. */ LineJoinStyle GetLineJoinStyle(void) const; @@ -588,7 +587,7 @@ public: * %Canvas control. If these conditions are not satisfied, the * @c E_OUT_OF_RANGE exception is returned. * @param[in] arcDim The width and height of the round edge @n - * The width and height in the @c arcDim parameter must be greater than or equal to @c 0. + * The width and height in the @c arcDim parameter must be greater than or equal to @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -606,7 +605,7 @@ public: * %Canvas control. If these conditions are not satisfied, the * @c E_OUT_OF_RANGE exception is returned. * @param[in] arcDim The width and height of the round edge @n - * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.0f. + * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.0f. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -625,7 +624,7 @@ public: * %Canvas control. If these conditions are not satisfied, the * @c E_OUT_OF_RANGE exception is returned. * @param[in] arcDim The width and height of the round edge @n - * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0. + * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -644,7 +643,7 @@ public: * %Canvas control. If these conditions are not satisfied, the * @c E_OUT_OF_RANGE exception is returned. * @param[in] arcDim The width and height of the round edge @n - * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.0f. + * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.0f. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -871,7 +870,7 @@ public: * @return The font of the %Canvas control, @n * else @c null if the method fails * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks * - The specific error code can be accessed using the GetLastResult() method. * - If a font is not set with the SetFont() method, this method returns the system default font. @@ -1148,7 +1147,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] destRect The destination rectangle of %Canvas @n + * @param[in] destRect The destination rectangle of %Canvas @n * The width and height of the rectangle must be greater than or equal to @c 0. * The rectangle defined by @c destRect will be clipped at the edges * of the %Canvas control to prevent the rectangle from falling @@ -1299,9 +1298,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. - * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. @n - * The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the - * left and top part of the border. + * @remarks + * - ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + * - The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the + * left and top part of the border. * @image html graphics_ninepatchedbitmap.PNG * */ @@ -1322,9 +1322,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. - * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. @n - * The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the - * left and top part of the border. + * @remarks + * - ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + * - The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the + * left and top part of the border. * @image html graphics_ninepatchedbitmap.PNG * */ @@ -1529,7 +1530,8 @@ public: * * @since 2.0 * - * @param[in] color The color that is set as background color + * @param[in] color The color that is set as background color @n + * When a non-premultiplied alpha color blends with another, it can result in an improper color. */ void SetBackgroundColor(const Color& color); @@ -1590,8 +1592,8 @@ public: * * @since 2.1 * - * @return The current composite mode - * @remarks The default value is @c COMPOSITE_MODE_SRC_OVER. + * @return The current composite mode @n + * The default value is @c COMPOSITE_MODE_SRC_OVER. */ CompositeMode GetCompositeMode(void) const; @@ -1601,7 +1603,7 @@ public: * @since 2.1 * * @param[in] enable Set to @c true to enable anti-aliasing for the current instance of %Canvas, @n - * else @c false + * else @c false * @remarks By default, the anti-aliasing is enabled. */ void SetAntiAliasingEnabled(bool enable); diff --git a/inc/FGrpCanvasTexture.h b/inc/FGrpCanvasTexture.h index 977aae8..cc8b3a3 100644 --- a/inc/FGrpCanvasTexture.h +++ b/inc/FGrpCanvasTexture.h @@ -38,14 +38,13 @@ namespace Tizen { namespace Graphics { namespace Opengl /** * @class CanvasTexture * @brief This class provides a method to bind 2D %Canvas and OpenGL-ES Texture. - * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency. * * @since 2.0 * * @final This class is not intended for extension. * * The %CanvasTexture class provides a method to bind 2D Canvas and OpenGL-ES Texture. - * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency. + * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency. * */ class _OSP_EXPORT_ CanvasTexture @@ -53,7 +52,8 @@ class _OSP_EXPORT_ CanvasTexture { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct() method be called right after calling this constructor. * * @since 2.0 * @@ -74,17 +74,23 @@ public: * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 * * @return An error code - * @param[in] textureId Texture ID which points to the texture associated with the 2D canvas @n The texture ID must be generated from glGenTextures(). - * @param[in] width The width of the input texture. The width must be greater than @c 0, and smaller or equal than GL_MAX_TEXTURE_SIZE. - * @param[in] height The height of the input texture. The height must be greater than @c 0, and smaller or equal than GL_MAX_TEXTURE_SIZE - * @exception E_SUCCESS Construction is successfully done. - * @exception E_INVALID_ARG Input parameter is invalid. + * @param[in] textureId Texture ID which points to the texture associated with the 2D canvas @n + * The texture ID must be generated from glGenTextures(). + * @param[in] width The width of the input texture @n + * The width must be greater than @c 0, and smaller or equal than @c GL_MAX_TEXTURE_SIZE. + * @param[in] height The height of the input texture @n + * The height must be greater than @c 0, and smaller or equal than @c GL_MAX_TEXTURE_SIZE. + * @exception E_SUCCESS Construction is successfully done. + * @exception E_INVALID_ARG An input parameter is invalid. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. - * For more information, see Application Filtering. - * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using the eglMakeCurrent() method. + * For more information, see Application Filtering. + * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using the eglMakeCurrent() method. * @remarks - * - Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer here. + * - Before calling this method, check whether the feature is supported by + * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + * - There is a high probability for an occurrence of an out-of-memory exception. If possible, + * check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle + * the out-of-memory exception, refer here. */ result Construct(int textureId, int width, int height); @@ -93,9 +99,9 @@ public: * * @since 2.0 * - * @return The 2D canvas of the %CanvasTexture, @n - * else @c null if an exception occurs - * @exception E_SUCCESS The method is successful. + * @return The 2D canvas of the %CanvasTexture, @n + * else @c null if an exception occurs + * @exception E_SUCCESS The method is successful. * @exception E_OPERATION_FAILED The method fails to construct the canvas properly due to some system error. */ Tizen::Graphics::Canvas* GetCanvasN(void) const; diff --git a/inc/FGrpColor.h b/inc/FGrpColor.h index 4272576..d261659 100644 --- a/inc/FGrpColor.h +++ b/inc/FGrpColor.h @@ -34,10 +34,10 @@ namespace Tizen { namespace Graphics /** * @class Color32 - * @brief This template code makes a 32-bit combination from each color component + * @brief This template code makes a 32-bit combination from each color component. * @since 2.0 * - * The following example demonstrates how to use this template code + * The following example demonstrates how to use this template code. * * @code * @@ -139,7 +139,7 @@ public: * * @param[in] rgb The RGB color value * @param[in] hasAlpha Set to @c true if @c rgb contains an alpha value, @n - * else @c false + * else @c false */ Color(unsigned int rgb, bool hasAlpha = true); @@ -155,10 +155,10 @@ public: /** * Checks whether the two instances of %Color are equal. * - * @since 2.0 + * @since 2.0 * * @return @c true if the values of the two instances of %Color are equal, @n - * else @c false + * else @c false * @param[in] rhs An instance of %Color */ bool operator ==(const Color& rhs) const; @@ -166,10 +166,10 @@ public: /** * Checks whether the two instances of %Color are not equal. * - * @since 2.0 + * @since 2.0 * * @return @c true if the values of the two instances of %Color are not equal, @n - * else @c false + * else @c false * @param[in] rhs An instance of %Color * */ @@ -178,7 +178,7 @@ public: /** * Assigns the values of the RGB components of the specified instance to the current instance of %Color. * - * @since 2.0 + * @since 2.0 * * @return The reference to the instance of %Color * @param[in] rhs An instance of %Color @@ -190,12 +190,14 @@ public: /** * Checks whether the current instance of %Color equals the specified instance of %Color. * - * @since 2.0 + * @since 2.0 * * @return @c true if the values of the current instance is equal to the value of the specified instance, @n - * else @c false + * else @c false * @param[in] rhs An instance of %Color - * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the RGB components to compare the two instances. + * @remarks + * - This method overrides Tizen::Base::Object::Equals(). + * - This method uses the values of the RGB components to compare the two instances. */ virtual bool Equals(const Tizen::Base::Object& rhs) const; @@ -205,7 +207,7 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, + * @remarks Two equal instances must return the same hash value. @n For better performance, * the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -217,7 +219,7 @@ public: * * @since 2.0 * - * @return A @c byte representation of the alpha component of the current instance of %Color + * @return A @c byte representation of the alpha component of the current instance of %Color */ byte GetAlpha(void) const; @@ -226,7 +228,7 @@ public: * * @since 2.0 * - * @return A @c byte representation of the red component of the current instance of %Color + * @return A @c byte representation of the red component of the current instance of %Color */ byte GetRed(void) const; @@ -235,7 +237,7 @@ public: * * @since 2.0 * - * @return A @c byte representation of the blue component of the current instance of %Color + * @return A @c byte representation of the blue component of the current instance of %Color */ byte GetBlue(void) const; @@ -244,14 +246,14 @@ public: * * @since 2.0 * - * @return A @c byte representation of the green component of the current instance of %Color + * @return A @c byte representation of the green component of the current instance of %Color */ byte GetGreen(void) const; /** * Gets the ARGB components of the current instance of %Color. * - * @since 2.0 + * @since 2.0 * * @param[out] r The red component * @param[out] g The green component @@ -265,7 +267,7 @@ public: * * @since 2.0 * - * @return An @c unsigned integer value representing the current instance of %Color + * @return An @c unsigned integer value representing the current instance of %Color */ unsigned int GetRGB32(void) const; @@ -320,7 +322,7 @@ public: /** * Sets the current instance of %Color to the specified 32-bit integer value. * - * @since 2.0 + * @since 2.0 * * @param[in] rgb The new RGB color value * @param[in] hasAlpha @c true if @c rgb contains alpha value, @n @@ -329,11 +331,11 @@ public: void SetRGB32(unsigned int rgb, bool hasAlpha = true); /** - * Return the Color object for the specified color + * Gets the %Color object for the specified color. * * @since 2.0 - * @return The Color object - * @param[in] colorId The enum value for the specified color + * @return The %Color object + * @param[in] colorId The enum value for the specified color */ static Color GetColor(ColorId colorId); @@ -346,8 +348,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLACK) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLACK). * @endif */ const static Color COLOR_BLACK; @@ -359,8 +361,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLUE) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLUE). * @endif */ const static Color COLOR_BLUE; @@ -372,8 +374,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_CYAN) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_CYAN). * @endif */ const static Color COLOR_CYAN; @@ -385,8 +387,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREEN) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREEN). * @endif */ const static Color COLOR_GREEN; @@ -398,8 +400,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREY) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREY). * @endif */ const static Color COLOR_GREY; @@ -411,8 +413,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_MAGENTA) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_MAGENTA). * @endif */ const static Color COLOR_MAGENTA; @@ -424,8 +426,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of us ing this static constant, it is recommended to use GetColor(COLOR_ID_RED) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_RED). * @endif */ const static Color COLOR_RED; @@ -437,8 +439,8 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_VIOLET) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_VIOLET). * @endif */ const static Color COLOR_VIOLET; @@ -450,21 +452,21 @@ public: * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_YELLOW) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_YELLOW). * @endif */ const static Color COLOR_YELLOW; /** * @if OSPDEPREC - * This attribute is pre-defined. Its value is cwhite. + * This attribute is pre-defined. Its value is white. * * @brief [Deprecated] * @since 2.0 * - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release - * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_WHITE) + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_WHITE). * @endif */ const static Color COLOR_WHITE; diff --git a/inc/FGrpCoordinateSystem.h b/inc/FGrpCoordinateSystem.h index fd3a44d..149643f 100644 --- a/inc/FGrpCoordinateSystem.h +++ b/inc/FGrpCoordinateSystem.h @@ -71,7 +71,7 @@ public: * @since 2.0 * * @return The converted logical value for the physical one - * @param[in] physicalX An input physical value to convert + * @param[in] physicalX An input physical value to convert */ static int ConvertToLogicalX(int physicalX); @@ -81,7 +81,7 @@ public: * @since 2.1 * * @return The converted logical value for the physical one - * @param[in] physicalX An input physical value to convert + * @param[in] physicalX An input physical value to convert */ static float ConvertToLogicalX(float physicalX); @@ -91,7 +91,7 @@ public: * @since 2.0 * * @return The converted logical value for the physical one - * @param[in] physicalY An input physical value to convert + * @param[in] physicalY An input physical value to convert */ static int ConvertToLogicalY(int physicalY); @@ -101,7 +101,7 @@ public: * @since 2.1 * * @return The converted logical value for the physical one - * @param[in] physicalY An input physical value to convert + * @param[in] physicalY An input physical value to convert */ static float ConvertToLogicalY(float physicalY); @@ -111,7 +111,7 @@ public: * @since 2.0 * * @return The converted physical X value - * @param[in] logicalX An input logical value to convert + * @param[in] logicalX An input logical value to convert */ static int ConvertToPhysicalX(int logicalX); @@ -121,7 +121,7 @@ public: * @since 2.1 * * @return The converted physical X value - * @param[in] logicalX An input logical value to convert + * @param[in] logicalX An input logical value to convert */ static float ConvertToPhysicalX(float logicalX); @@ -131,7 +131,7 @@ public: * @since 2.0 * * @return The converted physical Y value - * @param[in] logicalY An input logical value to convert + * @param[in] logicalY An input logical value to convert */ static int ConvertToPhysicalY(int logicalY); @@ -141,7 +141,7 @@ public: * @since 2.1 * * @return The converted physical Y value - * @param[in] logicalY An input logical value to convert + * @param[in] logicalY An input logical value to convert */ static float ConvertToPhysicalY(float logicalY); @@ -150,7 +150,7 @@ public: * * @since 2.1 * - * @return Device aligned point + * @return Device aligned point * @param[in] point The input point to align */ static FloatPoint AlignToDevice(const FloatPoint& point); @@ -160,7 +160,7 @@ public: * * @since 2.1 * - * @return Device aligned dimension + * @return Device aligned dimension * @param[in] dimension The input dimension to align */ static FloatDimension AlignToDevice(const FloatDimension& dimension); @@ -170,7 +170,7 @@ public: * * @since 2.1 * - * @return Device aligned rectangle + * @return Device aligned rectangle * @param[in] rectangle The input rectangle to align */ static FloatRectangle AlignToDevice(const FloatRectangle& rectangle); diff --git a/inc/FGrpEnrichedText.h b/inc/FGrpEnrichedText.h index 609d164..c4b72f6 100644 --- a/inc/FGrpEnrichedText.h +++ b/inc/FGrpEnrichedText.h @@ -195,12 +195,11 @@ class _OSP_EXPORT_ EnrichedText { public: /** - * This is the default constructor for this class. + * This is the default constructor for this class. @n + * After creating an instance of this class, one of the Construct() methods must be called explicitly + * to initialize this instance. * * @since 2.0 - * - * @remarks After creating an instance of this class, one of the Construct() methods must be called explicitly - * to initialize this instance. */ EnrichedText(void); @@ -240,7 +239,7 @@ public: result Construct(const Tizen::Graphics::FloatDimension& dim); /** - * Inserts the TextElement instance in the %EnrichedText instance at the specified index. + * Inserts a TextElement instance in an %EnrichedText instance at the specified index. * * @since 2.0 * @@ -253,7 +252,7 @@ public: result InsertAt(int elementIndex, TextElement& element); /** - * Removes the TextElement instance at the specified index of the %EnrichedText instance. + * Removes a TextElement instance at the specified index of an %EnrichedText instance. * * @since 2.0 * @@ -268,21 +267,21 @@ public: result RemoveAt(int elementIndex, bool deallocate); /** - * Removes the TextElement instance from the %EnrichedText instance. + * Removes a TextElement instance from an %EnrichedText instance. * * @since 2.0 * * @return An error code - * @param[in] element The TextElement to remove + * @param[in] element The TextElement to remove * @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n - * else @c false + * else @c false * @exception E_SUCCESS The method is successful. * */ result Remove(TextElement& element, bool deallocate); /** - * Adds the specified TextElement instance to the %EnrichedText instance. + * Adds the specified TextElement instance to an %EnrichedText instance. * * @since 2.0 * @@ -296,7 +295,7 @@ public: /** * @if OSPDEPREC - * Removes all the %TextElement instances from the %EnrichedText instance. + * Removes all the %TextElement instances from an %EnrichedText instance. * * @brief [Deprecated] * @deprecated This method is deprecated. Instead of this method, use the RemoveAll(). @@ -313,7 +312,7 @@ public: result RemoveAllTextElements(bool deallocate); /** - * Removes all the text and image elements from the %EnrichedText instance. + * Removes all the text and image elements from an %EnrichedText instance. * * @since 2.0 * @@ -327,7 +326,7 @@ public: result RemoveAll(bool deallocate); /** - * Gets the %TextElement instance at the specified index from the %EnrichedText instance. + * Gets a TextElement instance at the specified index from an %EnrichedText instance. * * @since 2.0 * @@ -341,11 +340,11 @@ public: TextElement* GetTextElementAt(int elementIndex) const; /** - * Gets the count of the %TextElement instances. + * Gets the count of the TextElement instances. * * @since 2.0 * - * @return The count of the %TextElement instances + * @return The count of the TextElement instances */ int GetTextElementCount(void) const; @@ -381,10 +380,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] width The new width of %EnrichedText @n - * It must be greater than @c 0. - * @param[in] height The new height of %EnrichedText @n - * It must be greater than @c 0. + * @param[in] width The new width of %EnrichedText @n + * It must be greater than @c 0. + * @param[in] height The new height of %EnrichedText @n + * It must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -396,10 +395,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] width The new width of %EnrichedText @n - * It must be greater than @c 0.0f. - * @param[in] height The new height of %EnrichedText @n - * It must be greater than @c 0.0f. + * @param[in] width The new width of %EnrichedText @n + * It must be greater than @c 0.0f. + * @param[in] height The new height of %EnrichedText @n + * It must be greater than @c 0.0f. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. */ @@ -426,7 +425,7 @@ public: Tizen::Graphics::FloatDimension GetSizeF(void) const; /** - * Gets the size of the %EnrichedText instance. + * Gets the size of an %EnrichedText instance. * * @since 2.0 * @@ -436,7 +435,7 @@ public: void GetSize(int& width, int& height) const; /** - * Gets the size of the %EnrichedText instance. + * Gets the size of an %EnrichedText instance. * * @since 2.1 * @@ -446,7 +445,7 @@ public: void GetSize(float& width, float& height) const; /** - * Gets the width of the %EnrichedText instance. + * Gets the width of an %EnrichedText instance. * * @since 2.0 * @@ -455,7 +454,7 @@ public: int GetWidth(void) const; /** - * Gets the width of the %EnrichedText instance. + * Gets the width of an %EnrichedText instance. * * @since 2.1 * @@ -464,7 +463,7 @@ public: float GetWidthF(void) const; /** - * Gets the height of the %EnrichedText instance. + * Gets the height of an %EnrichedText instance. * * @since 2.0 * @@ -473,7 +472,7 @@ public: int GetHeight(void) const; /** - * Gets the height of the %EnrichedText instance. + * Gets the height of an %EnrichedText instance. * * @since 2.1 * @@ -487,7 +486,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] alignment The vertical alignment of the text + * @param[in] alignment The vertical alignment of the text * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. */ @@ -611,7 +610,7 @@ public: float GetLineSpaceF(void) const; /** - * Refreshes the texts and bitmap according to the %EnrichedText instance's attributes. @n + * Refreshes the texts and bitmap according to an %EnrichedText instance's attributes. @n * If some attributes are changed (such as changes using @ref SetSize), you can get the exact * information of the text position or the number of lines after this method is called. * @@ -620,7 +619,7 @@ public: void Refresh(void); /** - * Gets the total line count of the text in the %EnrichedText instance. + * Gets the total line count of the text in an %EnrichedText instance. * * @since 2.0 * @@ -629,7 +628,7 @@ public: int GetTotalLineCount(void) const; /** - * Gets the height of the text in the %EnrichedText instance. + * Gets the height of the text in an %EnrichedText instance. * * @since 2.0 * @@ -638,7 +637,7 @@ public: int GetTotalLineHeight(void) const; /** - * Gets the height of the text in the %EnrichedText instance. + * Gets the height of the text in an %EnrichedText instance. * * @since 2.1 * @@ -647,7 +646,7 @@ public: float GetTotalLineHeightF(void) const; /** - * Gets the displayed line count of the text in the %EnrichedText instance. + * Gets the displayed line count of the text in an %EnrichedText instance. * * @since 2.0 * @@ -726,7 +725,7 @@ public: float GetLineHeightF(int lineIndex) const; /** - * Gets the text length of the %EnrichedText object. + * Gets the text length of an %EnrichedText object. * * @since 2.0 * @@ -735,7 +734,7 @@ public: int GetTextLength(void) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are * expanded to one line. * * @since 2.0 @@ -754,7 +753,7 @@ public: result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are * expanded to one line. * * @since 2.1 @@ -773,7 +772,7 @@ public: result GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are * expanded to one line. * * @since 2.0 @@ -791,7 +790,7 @@ public: result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are * expanded to one line. * * @since 2.1 @@ -809,8 +808,9 @@ public: result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int& actualLength) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are - * not expanded to one line. @n The %GetTextExtent() method is useful for finding the extent of %EnrichedText spanning multiple lines. + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * not expanded to one line. @n + * The %GetTextExtent() method is useful for finding the extent of %EnrichedText spanning multiple lines. * * @since 2.0 * @return An instance of Dimension containing the extent of the %EnrichedText instance, @n @@ -819,8 +819,9 @@ public: Tizen::Graphics::Dimension GetTextExtent(void) const; /** - * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are - * not expanded to one line. @n The %GetTextExtentF() method is useful for finding the extent of %EnrichedText spanning multiple lines. + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * not expanded to one line. @n + * The %GetTextExtentF() method is useful for finding the extent of %EnrichedText spanning multiple lines. * * @since 2.1 * @return An instance of FloatDimension containing the extent of the %EnrichedText instance, @n @@ -829,13 +830,13 @@ public: Tizen::Graphics::FloatDimension GetTextExtentF(void) const; /** - * Adds the specified bitmap image to the %EnrichedText instance. + * Adds the specified bitmap image to an %EnrichedText instance. * * @since 2.0 * * @return An error code * @param[in] bitmap The bitmap to draw @n - * The bitmap must be constructed before being passed to this method. + * The bitmap must be constructed before being passed to this method. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM An unknown operating system error has occurred. * @exception E_OUT_OF_MEMORY The memory is insufficient. @@ -844,13 +845,13 @@ public: result Add(const Tizen::Graphics::Bitmap& bitmap); /** - * Inserts the specified bitmap image to the %EnrichedText instance at the specified index. + * Inserts the specified bitmap image to an %EnrichedText instance at the specified index. * * @since 2.0 * * @return An error code * @param[in] bitmap The @c bitmap to draw @n - * The bitmap must be constructed before being passed to this method. + * The bitmap must be constructed before being passed to this method. * @param[in] elementIndex The index at which the @c bitmap image is to add * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM An unknown operating system error has occurred. @@ -872,7 +873,6 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OBJ_NOT_FOUND The required instance is not found. * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position. - * @see Tizen::Base::Utility::LinkInfo */ result GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; @@ -888,7 +888,6 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OBJ_NOT_FOUND The required instance is not found. * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position. - * @see Tizen::Base::Utility::LinkInfo */ result GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; @@ -905,7 +904,6 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OBJ_NOT_FOUND The required instance is not found. * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position. - * @see Tizen::Base::Utility::LinkInfo */ result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const; @@ -922,7 +920,6 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OBJ_NOT_FOUND The required instance is not found. * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position. - * @see Tizen::Base::Utility::LinkInfo */ result GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const; @@ -941,12 +938,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] alignment The vertical alignment among the text and the bitmap element + * @param[in] alignment The vertical alignment among the text and the bitmap element @n + * The default alignment @c TEXT_ALIGNMENT_BOTTOM. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @remarks This method sets how one element is positioned relative to the other elements. @n - * The vertical alignment of text and bitmap elements are decided based on the maximum height among elements. - * @remarks The default alignment @c TEXT_ALIGNMENT_BOTTOM. + * @remarks + * - This method sets how one element is positioned relative to the other elements. + * - The vertical alignment of text and bitmap elements are decided based on the maximum height among elements. */ result SetElementVerticalAlignment(TextVerticalAlignment alignment); diff --git a/inc/FGrpFloatMatrix4.h b/inc/FGrpFloatMatrix4.h index 31963f6..c8af1f5 100644 --- a/inc/FGrpFloatMatrix4.h +++ b/inc/FGrpFloatMatrix4.h @@ -62,7 +62,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %FloatMatrix4 + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4(const FloatMatrix4& rhs); @@ -87,9 +87,9 @@ public: * * @since 2.0 * - * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatMatrix4 + * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatMatrix4 */ bool operator ==(const FloatMatrix4& rhs) const; @@ -98,9 +98,9 @@ public: * * @since 2.0 * - * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatMatrix4 + * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatMatrix4 */ bool operator !=(const FloatMatrix4& rhs) const; @@ -109,17 +109,17 @@ public: * * @since 2.0 * - * @return The reference to this instance - * @param[in] rhs An instance of %FloatMatrix4 + * @return A reference to this instance + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4& operator =(const FloatMatrix4& rhs); /** - * Assigns the value to each matrix members of current instance of %FloatMatrix4. + * Assigns the value to each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return The reference to this instance + * @return A reference to this instance * @param[in] value A @c float value to assign */ FloatMatrix4& operator =(float value); @@ -129,8 +129,8 @@ public: * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatMatrix4 + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4 operator *(const FloatMatrix4& rhs) const; @@ -139,17 +139,17 @@ public: * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation - * @param[in] vector An instance of %FloatVector4 + * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @param[in] vector An instance of %FloatVector4 */ FloatVector4 operator *(const FloatVector4& vector) const; /** - * Multiplies the value to each matrix members of current instance of %FloatMatrix4. + * Multiplies the value to each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to multiply */ FloatMatrix4 operator *(float value) const; @@ -159,17 +159,17 @@ public: * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatMatrix4 + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4 operator +(const FloatMatrix4& rhs) const; /** - * Adds the value to each matrix members of current instance of %FloatMatrix4. + * Adds the value to each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to add */ FloatMatrix4 operator +(float value) const; @@ -179,17 +179,17 @@ public: * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4 operator -(const FloatMatrix4& rhs) const; /** - * Subtracts the value from each matrix members of current instance of %FloatMatrix4. + * Subtracts the value from each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to subtract */ FloatMatrix4 operator -(float value) const; @@ -199,17 +199,17 @@ public: * * @since 2.0 * - * @return The reference to %FloatMatrix4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatMatrix4 + * @return A reference to %FloatMatrix4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4& operator *=(const FloatMatrix4& rhs); /** - * Multiplies the value to each matrix members of current instance of %FloatMatrix4. + * Multiplies the value with each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return The reference to %FloatMatrix4 containing the resulting value of the operation + * @return A reference to %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to multiply */ FloatMatrix4& operator *=(float value); @@ -219,13 +219,13 @@ public: * * @since 2.0 * - * @return The reference to %FloatMatrix4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatMatrix4 + * @return The reference to %FloatMatrix4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4& operator +=(const FloatMatrix4& rhs); /** - * Adds the value to each matrix members of current instance of %FloatMatrix4. + * Adds the value to each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * @@ -239,51 +239,51 @@ public: * * @since 2.0 * - * @return The reference to %FloatMatrix4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatMatrix4 + * @return The reference to %FloatMatrix4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatMatrix4 */ FloatMatrix4& operator -=(const FloatMatrix4& rhs); /** - * Subtracts the value from each matrix members of current instance of %FloatMatrix4. + * Subtracts the value from each matrix member of the current instance of %FloatMatrix4. * * @since 2.0 * - * @return The reference to %FloatMatrix4 containing the resulting value of the operation + * @return The reference to %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to subtract */ FloatMatrix4& operator -=(float value); /** - * Gets the instance of %FloatMatrix4 resulting from the sum of the value and the specified instance of %FloatMatrix4. + * Gets an instance of %FloatMatrix4 resulting from the sum of the value and the specified instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to add - * @param[in] rhs An instance of %FloatMatrix4 + * @param[in] rhs An instance of %FloatMatrix4 */ _OSP_EXPORT_ friend FloatMatrix4 operator +(const float& value, const FloatMatrix4& rhs); /** - * Gets the instance of %FloatMatrix4 resulting from the product of the value and the specified instance of %FloatMatrix4. + * Gets an instance of %FloatMatrix4 resulting from the product of the value and the specified instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to multiply - * @param[in] rhs An instance of %FloatMatrix4 + * @param[in] rhs An instance of %FloatMatrix4 */ _OSP_EXPORT_ friend FloatMatrix4 operator *(const float& value, const FloatMatrix4& rhs); /** - * Gets the instance of %FloatMatrix4 resulting from the difference between the value and the specified instance of %FloatMatrix4. + * Gets an instance of %FloatMatrix4 resulting from the difference between the value and the specified instance of %FloatMatrix4. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation * @param[in] value A @c float value to subtract - * @param[in] rhs An instance of %FloatMatrix4 + * @param[in] rhs An instance of %FloatMatrix4 */ _OSP_EXPORT_ friend FloatMatrix4 operator -(const float& value, const FloatMatrix4& rhs); @@ -292,10 +292,12 @@ public: * * @since 2.0 * - * @return @c true if the values of the current instance is equal to the value of the specified instance, @n - * else @c false - * @param[in] obj An instance of %FloatMatrix4 - * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances. + * @return @c true if the values of the current instance is equal to the value of the specified instance, @n + * else @c false + * @param[in] obj An instance of %FloatMatrix4 + * @remarks + * - This method overrides Tizen::Base::Object::Equals(). + * - This method uses the values of the Matrix components to compare the two instances. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -304,9 +306,9 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, - * the used hash function must generate a random distribution for all inputs. + * @return The hash value of the current instance + * @remarks Two equal instances must return the same hash value. @n For better performance, the used hash function must + * generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -320,12 +322,12 @@ public: float GetDeterminant(void) const; /** - * Gets the inverse matrix of the current instance of %FloatMatrix4. + * Gets the current instance of %FloatMatrix4 as an inverse matrix. * * @since 2.0 * - * @return A new instance of %FloatMatrix4 containing the resulting value of the operation - * @remarks This method must be called after checking whether the matrix is invertible or not. + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + * @remarks This method must be called after checking whether the matrix is invertible or not. */ FloatMatrix4 GetInverse(void) const; @@ -339,7 +341,7 @@ public: float GetTrace(void) const; /** - * Gets the transpose matrix of the current instance of %FloatMatrix4. + * Gets the current instance of %FloatMatrix4 as a transpose matrix. * * @since 2.0 * @@ -375,32 +377,32 @@ public: void Negate(void); /** - * Sets the identity matrix to the current instance of %FloatMatrix4. + * Sets the current instance of %FloatMatrix4 as an identity matrix. * * @since 2.0 */ void SetAsIdentity(void); /** - * Sets the inverse matrix to the current instance of %FloatMatrix4. + * Sets the current instance of %FloatMatrix4 as an inverse matrix. * * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current instance is not invertible. */ result Invert(void); /** - * Sets the transposed matrix to the current instance of %FloatMatrix4. + * Sets the current instance of %FloatMatrix4 as a transpose matrix. * * @since 2.0 */ void Transpose(void); /** - * Sets the matrix members of current instance of %FloatMatrix4 to zero. + * Sets the matrix members of the current instance of %FloatMatrix4 to zero. * * @since 2.0 */ diff --git a/inc/FGrpFloatPoint.h b/inc/FGrpFloatPoint.h index 238c80c..4b3d0fb 100644 --- a/inc/FGrpFloatPoint.h +++ b/inc/FGrpFloatPoint.h @@ -34,7 +34,7 @@ namespace Tizen { namespace Graphics { * * @since 2.0 * - * The %FloatPoint class represents a location in a two-dimensional coordinate space specified with an single precision floating point. + * The %FloatPoint class represents a location in a two-dimensional coordinate space specified with a single precision floating point. * * For more information on the class features, see Shapes. */ @@ -118,7 +118,7 @@ public: FloatPoint operator+(const FloatPoint& rhs) const; /** - * Subtracts the value of the specified instance of %FloatPoint and the current instance. + * Subtracts the value of the specified instance of %FloatPoint from the current instance. * * @since 2.0 * @@ -165,7 +165,7 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, + * @remarks Two equal instances must return the same hash value. @n For better performance, * the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; diff --git a/inc/FGrpFloatPoint3.h b/inc/FGrpFloatPoint3.h index d8857fb..9c3e533 100644 --- a/inc/FGrpFloatPoint3.h +++ b/inc/FGrpFloatPoint3.h @@ -62,7 +62,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %FloatPoint3 + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3(const FloatPoint3& rhs); @@ -71,8 +71,9 @@ public: * * @since 2.0 * - * @param[in] vector An instance of %FloatVector4 - * @remarks The normalized vector can only be converted to point. Therefore, when the input vector is not normalized then the point is converted from the normal vector of the input instance. + * @param[in] vector An instance of %FloatVector4 + * @remarks The normalized vector can only be converted to point. Therefore, when the input vector is not normalized then + * the point is converted from the normal vector of the input instance. */ explicit FloatPoint3(const FloatVector4& vector); @@ -90,9 +91,9 @@ public: * * @since 2.0 * - * @param[in] x x component of point instance - * @param[in] y y component of point instance - * @param[in] z z component of point instance + * @param[in] x The x component of point instance + * @param[in] y The y component of point instance + * @param[in] z The z component of point instance */ FloatPoint3(float x, float y, float z); @@ -108,9 +109,9 @@ public: * * @since 2.0 * - * @return @c true if all members of the current point instance are equal to the corresponding point members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatPoint3 + * @return @c true if all members of the current point instance are equal to the corresponding point members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatPoint3 */ bool operator ==(const FloatPoint3& rhs) const; @@ -119,9 +120,9 @@ public: * * @since 2.0 * - * @return @c true if all point members of the current instance are not equal to the corresponding point members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatPoint3 + * @return @c true if all point members of the current instance are not equal to the corresponding point members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatPoint3 */ inline bool operator !=(const FloatPoint3& rhs) const { @@ -133,18 +134,18 @@ public: * * @since 2.0 * - * @return The reference to this instance - * @param[in] rhs An instance of %FloatPoint3 + * @return The reference to this instance + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3& operator =(const FloatPoint3& rhs); /** - * Multiplies the value to each point members of current instance of %FloatPoint3. + * Multiplies the value with each point members of current instance of %FloatPoint3. * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation - * @param[in] value A @c float value to multiply + * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @param[in] value A @c float value to multiply */ FloatPoint3 operator *(float value) const; @@ -153,7 +154,7 @@ public: * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @return A new instance of %FloatPoint3 containing the resulting value of the operation * @param[in] value A @c float value to divide */ FloatPoint3 operator /(float value) const; @@ -163,8 +164,8 @@ public: * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatPoint3 + * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3 operator +(const FloatPoint3& rhs) const; @@ -173,8 +174,8 @@ public: * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatPoint3 + * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3 operator -(const FloatPoint3& rhs) const; @@ -183,8 +184,8 @@ public: * * @since 2.0 * - * @return The reference to %FloatPoint3 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatPoint3 + * @return The reference to %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3& operator +=(const FloatPoint3& rhs); @@ -193,8 +194,8 @@ public: * * @since 2.0 * - * @return The reference to %FloatPoint3 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatPoint3 + * @return The reference to %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 */ FloatPoint3& operator -=(const FloatPoint3& rhs); @@ -203,10 +204,11 @@ public: * * @since 2.0 * - * @return @c true if the values of the current instance is equal to the value of the specified instance, @n - * else @c false - * @param[in] obj An instance of %FloatPoint3 - * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Point components to compare the two instances. + * @return @c true if the values of the current instance is equal to the value of the specified instance, @n + * else @c false + * @param[in] obj An instance of %FloatPoint3 + * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Point + * components to compare the two instances. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -215,28 +217,28 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, + * @return The hash value of the current instance + * @remarks Two equal instances must return the same hash value. @n For better performance, * the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; /** - * x component of the current instance of %FloatPoint3. + * The x component of the current instance of %FloatPoint3. * * @since 2.0 */ float x; /** - * y component of the current instance of %FloatPoint3. + * The y component of the current instance of %FloatPoint3. * * @since 2.0 */ float y; /** - * z component of the current instance of %FloatPoint3. + * The z component of the current instance of %FloatPoint3. * * @since 2.0 */ @@ -249,24 +251,24 @@ private: }; // FloatPoint3 /** - * Gets the instance of %FloatPoint3 resulting from the product of the value and the specified instance of %FloatPoint3. + * Gets an instance of %FloatPoint3 resulting from the product of the value and the specified instance of %FloatPoint3. * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @return A new instance of %FloatPoint3 containing the resulting value of the operation * @param[in] value A @c float value to multiply - * @param[in] rhs An instance of %FloatPoint3 + * @param[in] rhs An instance of %FloatPoint3 */ _OSP_EXPORT_ FloatPoint3 operator *(const float& value, const FloatPoint3& rhs); /** - * Gets the instance of %FloatPoint3 resulting from the divide of the value and the specified instance of %FloatPoint3. + * Gets an instance of %FloatPoint3 resulting from the divide operation of the value and the specified instance of %FloatPoint3. * * @since 2.0 * - * @return A new instance of %FloatPoint3 containing the resulting value of the operation + * @return A new instance of %FloatPoint3 containing the resulting value of the operation * @param[in] value A @c float value to divide - * @param[in] rhs An instance of %FloatPoint3 + * @param[in] rhs An instance of %FloatPoint3 */ _OSP_EXPORT_ FloatPoint3 operator /(const float& value, const FloatPoint3& rhs); diff --git a/inc/FGrpFloatVector4.h b/inc/FGrpFloatVector4.h index 42cb2fe..9aef6b6 100644 --- a/inc/FGrpFloatVector4.h +++ b/inc/FGrpFloatVector4.h @@ -63,7 +63,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %FloatVector4 + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4(const FloatVector4& rhs); @@ -73,7 +73,7 @@ public: * @since 2.0 * * @param[in] point An instance of %FloatPoint3 - * @remarks The point is converted to normal vector. + * @remarks The point is converted to normal vector. */ explicit FloatVector4(const FloatPoint3& point); @@ -91,10 +91,10 @@ public: * * @since 2.0 * - * @param[in] x x component of vector instance - * @param[in] y y component of vector instance - * @param[in] z z component of vector instance - * @param[in] w w component of vector instance + * @param[in] x The x component of the vector instance + * @param[in] y The y component of the vector instance + * @param[in] z The z component of the vector instance + * @param[in] w The w component of the vector instance */ FloatVector4(float x, float y, float z, float w); @@ -110,9 +110,9 @@ public: * * @since 2.0 * - * @return @c true if all members of the current vector instance are equal to the corresponding vector members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatVector4 + * @return @c true if all members of the current vector instance are equal to the corresponding vector members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatVector4 */ bool operator ==(const FloatVector4& rhs) const; @@ -121,9 +121,9 @@ public: * * @since 2.0 * - * @return @c true if all vector members of the current instance are not equal to the corresponding vector members in the specified instance, @n - * else @c false - * @param[in] rhs An instance of %FloatVector4 + * @return @c true if all vector members of the current instance are not equal to the corresponding vector members in the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatVector4 */ inline bool operator !=(const FloatVector4& rhs) const { @@ -135,27 +135,27 @@ public: * * @since 2.0 * - * @return The reference to this instance - * @param[in] rhs An instance of %FloatVector4 + * @return The reference to this instance + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4& operator =(const FloatVector4& rhs); /** - * Multiplies the value to each vector members of current instance of %FloatVector4. + * Multiplies the value to each vector member of the current instance of %FloatVector4. * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @return A new instance of %FloatVector4 containing the resulting value of the operation * @param[in] value A @c float value to multiply */ FloatVector4 operator *(float value) const; /** - * Divides each vector members of current instance of %FloatVector4 with the specified value. + * Divides each vector member of the current instance of %FloatVector4 with the specified value. * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @return A new instance of %FloatVector4 containing the resulting value of the operation * @param[in] value A @c float value to divide */ FloatVector4 operator /(float value) const; @@ -165,8 +165,8 @@ public: * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatVector4 + * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4 operator +(const FloatVector4& rhs) const; @@ -175,8 +175,8 @@ public: * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatVector4 + * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4 operator -(const FloatVector4& rhs) const; @@ -185,8 +185,8 @@ public: * * @since 2.0 * - * @return The reference to %FloatVector4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatVector4 + * @return The reference to %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4& operator +=(const FloatVector4& rhs); @@ -195,8 +195,8 @@ public: * * @since 2.0 * - * @return The reference to %FloatVector4 containing the resulting value of the operation - * @param[in] rhs An instance of %FloatVector4 + * @return The reference to %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 */ FloatVector4& operator -=(const FloatVector4& rhs); @@ -205,8 +205,8 @@ public: * * @since 2.0 * - * @return The value of the operation. - * @param[in] rhs An instance of %FloatVector4 + * @return The value of the operation. + * @param[in] rhs An instance of %FloatVector4 */ float DotProduct(const FloatVector4& rhs) const; @@ -215,8 +215,8 @@ public: * * @since 2.0 * - * @return The value of the operation. - * @param[in] rhs An instance of %FloatVector4 + * @return The value of the operation. + * @param[in] rhs An instance of %FloatVector4 */ float operator *(const FloatVector4& rhs) const; @@ -225,10 +225,12 @@ public: * * @since 2.0 * - * @return @c true if the values of the current instance is equal to the value of the specified instance, @n - * else @c false - * @param[in] obj An instance of %FloatVector4 - * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Vector components to compare the two instances. + * @return @c true if the values of the current instance is equal to the value of the specified instance, @n + * else @c false + * @param[in] obj An instance of %FloatVector4 + * @remarks + * - This method overrides Tizen::Base::Object::Equals(). + * - This method uses the values of the Vector components to compare the two instances. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -238,8 +240,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, - * the used hash function must generate a random distribution for all inputs. + * @remarks Two equal instances must return the same hash value. @n For better performance, + * the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -262,35 +264,35 @@ public: FloatVector4 GetNormal(void) const; /** - * Normalize the current instance of %FloatVector4. + * Normalizes the current instance of %FloatVector4. * * @since 2.0 */ void Normalize(void); /** - * x component of the current instance of %FloatVector4. + * The x component of the current instance of %FloatVector4. * * @since 2.0 */ float x; /** - * y component of the current instance of %FloatVector4. + * The y component of the current instance of %FloatVector4. * * @since 2.0 */ float y; /** - * z component of the current instance of %FloatVector4. + * The z component of the current instance of %FloatVector4. * * @since 2.0 */ float z; /** - * w component of the current instance of %FloatVector4. + * The w component of the current instance of %FloatVector4. * * @since 2.0 */ @@ -303,24 +305,24 @@ private: }; // FloatVector4 /** - * Gets the instance of %FloatVector4 resulting from the product of the value and the specified instance of %FloatVector4. + * Gets an instance of %FloatVector4 resulting from the product of the value and the specified instance of %FloatVector4. * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @return A new instance of %FloatVector4 containing the resulting value of the operation * @param[in] value A @c float value to multiply - * @param[in] rhs An instance of %FloatVector4 + * @param[in] rhs An instance of %FloatVector4 */ _OSP_EXPORT_ FloatVector4 operator *(const float& value, const FloatVector4& rhs); /** - * Gets the instance of %FloatVector4 resulting from the divide of the value and the specified instance of %FloatVector4. + * Gets an instance of %FloatVector4 resulting from the divide operation of the value and the specified instance of %FloatVector4. * * @since 2.0 * - * @return A new instance of %FloatVector4 containing the resulting value of the operation + * @return A new instance of %FloatVector4 containing the resulting value of the operation * @param[in] value A @c float value to divide - * @param[in] rhs An instance of %FloatVector4 + * @param[in] rhs An instance of %FloatVector4 */ _OSP_EXPORT_ FloatVector4 operator /(const float& value, const FloatVector4& rhs); diff --git a/inc/FGrpFont.h b/inc/FGrpFont.h index dbcf94c..f2161df 100644 --- a/inc/FGrpFont.h +++ b/inc/FGrpFont.h @@ -54,11 +54,10 @@ class _OSP_EXPORT_ Font public: /** * This is the default constructor for this class. + * After creating an instance of this class, one of the + * Construct() methods must be called explicitly to initialize this instance. * * @since 2.0 - * - * @remarks After creating an instance of this class, one of the - * Construct() methods must be called explicitly to initialize this instance. */ Font(void); @@ -76,10 +75,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] style The font style @n + * @param[in] style The font style @n * For more information, see Tizen::Graphics::FontStyle. * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -97,21 +96,22 @@ public: * For more information, see @ref CompIoPathPage "IoPath" and @ref CompFontConstructPage "FontConstructor" issues. * @endif * @return An error code - * @param[in] fontNameOrPath The local file path of a font-resource file or app font name or system font name @n - * The app font name is retrieved using GetFaceName(Tizen::Base::String& filepath). - * The system font name is retrieved using GetSystemFontListN(). - * @param[in] style The font style @n - * Multiple styles can be combined using the bitwise OR operator. - * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * @param[in] fontNameOrPath The local file path of a font-resource file or app font name or system font name @n + * The app font name is retrieved using GetFaceName(Tizen::Base::String& filepath). + * The system font name is retrieved using GetSystemFontListN(). + * @param[in] style The font style @n + * Multiple styles can be combined using the bitwise OR operator. + * @param[in] size The font size in pixels @n + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only TrueType font is supported. - * The value of fontNameOrPath is considered system font name if it matches one of the retrieved values using GetSystemFontListN(). - * If not, it is considered local file path of a font-resource file. + * @remarks + * - Only TrueType font is supported. + * - The value of @c fontNameOrPath is considered a system font name if it matches one of the retrieved values using GetSystemFontListN(). + * If not, it is considered a local file path of a font-resource file. */ result Construct(const Tizen::Base::String& fontNameOrPath, int style, int size); @@ -120,8 +120,8 @@ public: * @page CompFontConstructPage Compatibility for Construct(). * @section CompFontConstructPageIssueSection Issues * Implementing this method in OSP compatible applications has the following issues: @n - * -# In OSP, the value of 1 st parameter(fontNameOrPath) can be system font name or local font path. At first, it is compared to the retrieved values using GetSystemFontListN(). If the matched value is exist, it is considered system font name. Or, it is considered local file path of a font-resource file. - * -# In Tizen, the value of 1 st parameter(fontNameOrPath) can be app font name or system font name or local font path. At first, it is compared to the font face names in app font resource folder. If the matched value is exist, it is considered app font name. Or, it is considered system font name if it matches one of the retrieved values using GetSystemFontListN(). + * -# In OSP, the value of 1st parameter(fontNameOrPath) can be system font name or local font path. At first, it is compared to the retrieved values using GetSystemFontListN(). If the matched value exists, it is considered a system font name, else it is considered a local file path of a font-resource file. + * -# In Tizen, the value of 1st parameter(fontNameOrPath) can be app font name or system font name or local font path. At first, it is compared to the font face names in app font resource folder. If the matched value is exist, it is considered an app font name, else it is considered a system font name if it matches one of the retrieved values using GetSystemFontListN(). * @endif */ @@ -131,11 +131,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] fontData The font data - * @param[in] style The font style @n - * Multiple styles can be combined using the bitwise OR operator. - * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * @param[in] fontData The font data + * @param[in] style The font style @n + * Multiple styles can be combined using the bitwise OR operator. + * @param[in] size The font size in pixels @n + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. @@ -150,10 +150,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] style The font style @n + * @param[in] style The font style @n * For more information, see Tizen::Graphics::FontStyle. * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -165,20 +165,21 @@ public: * @since 2.1 * * @return An error code - * @param[in] fontNameOrPath The local file path of a font-resource file or system font name @n - * The system font name is retrieved using GetSystemFontListN(). - * @param[in] style The font style @n - * Multiple styles can be combined using the bitwise OR operator. - * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * @param[in] fontNameOrPath The local file path of a font-resource file or system font name @n + * The system font name is retrieved using GetSystemFontListN(). + * @param[in] style The font style @n + * Multiple styles can be combined using the bitwise OR operator. + * @param[in] size The font size in pixels @n + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only TrueType font is supported. - * The value of @c fontNameOrPath is considered as the default system font name if it matches to any one of the values that is retrieved using GetSystemFontListN(). - * If not, it is considered as the local file path of a font-resource file. + * @remarks + * - Only TrueType font is supported. + * - The value of @c fontNameOrPath is considered as the default system font name if it matches any one of the values + * that is retrieved using GetSystemFontListN(). If not, it is considered a local file path of a font-resource file. */ result Construct(const Tizen::Base::String& fontNameOrPath, int style, float size); @@ -188,11 +189,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] fontData The font data - * @param[in] style The font style @n - * Multiple styles can be combined using the bitwise OR operator. - * @param[in] size The font size in pixels @n - * The size must be greater than @c 0. + * @param[in] fontData The font data + * @param[in] style The font style @n + * Multiple styles can be combined using the bitwise OR operator. + * @param[in] size The font size in pixels @n + * The size must be greater than @c 0. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. @@ -245,7 +246,7 @@ public: * * @since 2.0 * - * @return The ascender of the current instance of %Font, @n + * @return The ascender of the current instance of %Font, @n * else @c -1 if the method fails */ int GetAscender(void) const; @@ -255,7 +256,7 @@ public: * * @since 2.1 * - * @return The ascender of the current instance of %Font, @n + * @return The ascender of the current instance of %Font, @n * else @c -1 if the method fails */ float GetAscenderF(void) const; @@ -265,7 +266,7 @@ public: * * @since 2.0 * - * @return The descender of the current instance of %Font, @n + * @return The descender of the current instance of %Font, @n * else @c -1 if the method fails */ int GetDescender(void) const; @@ -275,7 +276,7 @@ public: * * @since 2.1 * - * @return The descender of the current instance of %Font, @n + * @return The descender of the current instance of %Font, @n * else @c -1 if the method fails */ float GetDescenderF(void) const; @@ -286,10 +287,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] character A character for getting left bear - * @param[out] leftBear The left bear of the specified @c character - * @exception E_SUCCESS The method is successful. - * @exception E_DATA_NOT_FOUND The requested data does not exist. + * @param[in] character A character for getting left bear + * @param[out] leftBear The left bear of the specified @c character + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND The requested data does not exist. */ result GetLeftBear(wchar_t character, int& leftBear) const; @@ -299,10 +300,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] character A character for getting left bear - * @param[out] leftBear The left bear of the specified @c character - * @exception E_SUCCESS The method is successful. - * @exception E_DATA_NOT_FOUND The requested data does not exist. + * @param[in] character The character for getting left bear + * @param[out] leftBear The left bear of the specified @c character + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND The requested data does not exist. */ result GetLeftBear(wchar_t character, float& leftBear) const; @@ -312,10 +313,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] character A character for getting the right bear - * @param[out] rightBear The right bear of the specified @c character - * @exception E_SUCCESS The method is successful. - * @exception E_DATA_NOT_FOUND The requested data does not exist. + * @param[in] character The character for getting the right bear + * @param[out] rightBear The right bear of the specified @c character + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND The requested data does not exist. */ result GetRightBear(wchar_t character, int& rightBear) const; @@ -325,10 +326,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] character A character for getting the right bear - * @param[out] rightBear The right bear of the specified @c character - * @exception E_SUCCESS The method is successful. - * @exception E_DATA_NOT_FOUND The requested data does not exist. + * @param[in] character A character for getting the right bear + * @param[out] rightBear The right bear of the specified @c character + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND The requested data does not exist. */ result GetRightBear(wchar_t character, float& rightBear) const; @@ -347,11 +348,11 @@ public: * * @return An error code * @param[in] text The string - * @param[in] length The length of @c text @n + * @param[in] length The length of @c text @n * The length must be greater than or equal to @c 0. * @param[out] dim The width and height of the font of the @c text * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The value of @c length is greater than the actual length of @c text. + * @exception E_OUT_OF_RANGE The specified @c length is greater than the actual length of @c text. */ result GetTextExtent(const Tizen::Base::String& text, int length, Dimension& dim) const; @@ -360,11 +361,11 @@ public: * @page CompFontGetTextExtentPage Compatibility for the file path. * @section CompFontGetTextExtentPageIssueSection Issues * Implementing this method in OSP compatible applications has the following issues: @n - * -# The method returns exact height only if the font resource is designed to fit inside the emBox. @n + * -# The method returns the exact height only if the font resource is designed to fit inside the emBox. @n * * @section CompFontGetTextExtentPageSolutionSection Resolutions * This issue has been resolved in Tizen. @n - * -# The method returns exact height regardless of font design. @n + * -# The method returns the exact height regardless of font design. @n * * @endif */ @@ -377,11 +378,11 @@ public: * * @return An error code * @param[in] text The string - * @param[in] length The length of @c text @n + * @param[in] length The length of @c text @n * The length must be greater than or equal to @c 0. * @param[out] dim The width and height of the font of the @c text * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The value of @c length is greater than the actual length of @c text. + * @exception E_OUT_OF_RANGE The specified @c length is greater than the actual length of @c text. */ result GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& dim) const; @@ -411,7 +412,7 @@ public: * @since 2.0 * * @return @c true if an extra style is not defined for the current instance, @n - * else @c false + * else @c false */ bool IsPlain(void) const; @@ -482,7 +483,7 @@ public: * * @return The list of system fonts @n * The font list consists of Tizen::Base::String items. - * @remarks After using the system font list, you can call IList::RemoveAll(true) to clean up string items in the list. + * @remarks After using the system font list, you can call IList::RemoveAll(true) to clean up string items in the list. */ static Tizen::Base::Collection::IList* GetSystemFontListN(void); @@ -491,7 +492,7 @@ public: * * @since 2.0 * - * @return The face name of the font file of the specific path + * @return The face name of the font file of the specific path * @param[in] filePath The path of the font file */ static Tizen::Base::String GetFaceName(const Tizen::Base::String& filePath); diff --git a/inc/FGrpFontCommon.h b/inc/FGrpFontCommon.h index 31746f7..6fdf2a3 100644 --- a/inc/FGrpFontCommon.h +++ b/inc/FGrpFontCommon.h @@ -17,7 +17,7 @@ /** * @file FGrpFontCommon.h - * @brief This is the header file for the enumerations of the Font class. + * @brief This is the header file for the enumerations of the %Font class. * * This header file contains the definitions of the enumerations of the Font class. */ diff --git a/inc/FGrpGlPlayer.h b/inc/FGrpGlPlayer.h index 0376f16..03fee9d 100644 --- a/inc/FGrpGlPlayer.h +++ b/inc/FGrpGlPlayer.h @@ -81,7 +81,8 @@ class _OSP_EXPORT_ GlPlayer { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must + * be called right after calling this constructor. * * @since 2.0 * @@ -100,14 +101,15 @@ public: * Initializes this instance of %GlPlayer. * * @since 2.0 - * @return An error code - * @param[in] version EGL Context Client Version @n - * The version must be 1(OpenGL-ES 1.x) or 2(OpenGL-ES 2.x). - * @param[in] pControl A pointer of the target control @n - * Only Tizen::Ui::Controls::Frame and Tizen::Ui::Controls::Form are allowed as the target control. - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either the @c pControl is not Form or Frame, or - * the @c version is not @c EGL_CONTEXT_CLIENT_VERSION_1_X or @c EGL_CONTEXT_CLIENT_VERSION_2_X. + * @return An error code + * @param[in] version EGL Context Client Version @n + * The version must be 1(OpenGL-ES 1.x) or 2(OpenGL-ES 2.x). + * @param[in] pControl A pointer of the target control @n + * Only Tizen::Ui::Controls::Frame and Tizen::Ui::Controls::Form are allowed as the target control. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pControl is not Form or Frame. + * - The @c version is not @c EGL_CONTEXT_CLIENT_VERSION_1_X or @c EGL_CONTEXT_CLIENT_VERSION_2_X. * @exception E_INVALID_OPERATION The operation has failed, because of the duplicate call of Construct(). * */ @@ -117,139 +119,149 @@ public: * Starts the %GlPlayer, and initializes EGL status. * * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM Player cannot be started properly due to a severe system error. - * @exception E_INVALID_STATE The state of player is not suitable for start. For example, it is not allowable to start player when its state is pause. - * @exception E_OPENGL_ERROR There occurs an EGL error during performing EGL function. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM Player cannot be started properly due to a severe system error. + * @exception E_INVALID_STATE The state of player is not suitable for start. @n + * For example, it is not allowable to start the player when its state is pause. + * @exception E_OPENGL_ERROR An EGL error occurs during performing EGL function. * - * @remarks In the case that this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised. + * @remarks If this returns an @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised. * */ result Start(void); /** - * Pause the %GlPlayer. + * Pauses the %GlPlayer. * * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM Player cannot be paused properly due to a severe system error. - * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Pause() method which is implemented by developers. - * @exception E_INVALID_STATE The state of player is not suitable for pause. For example, it is not allowable to pause player when it does not start after the initialization yet. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM Player cannot be paused properly due to a severe system error. + * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Pause() method implemented by the developer. + * @exception E_INVALID_STATE The state of player is not suitable for pause. @n + * For example, it is not allowable to pause the player when it does not start after the initialization. * */ result Pause(void); /** - * Resume the %GlPlayer. + * Resumes the %GlPlayer. * * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM Player cannot be resumed properly due to a severe system error. - * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Resume() method which is implemented by developers. - * @exception E_INVALID_STATE The state of player is not suitable for resume. For example, it is not allowable to resume player when its state is stop. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM Player cannot be resumed properly due to a severe system error. + * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Resume() method implemented by the developer. + * @exception E_INVALID_STATE The state of player is not suitable for resume. @n + * For example, it is not allowable to resume the player when its state is stop. * */ result Resume(void); /** - * Stop the %GlPlayer, and reset the EGL status. + * Stops the %GlPlayer, and resets the EGL status. * * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM Player cannot be stopped properly due to a severe system error. - * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Pause() method which is implemented by developers. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM Player cannot be stopped properly due to a severe system error. + * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Pause() method implemented by the developer. * - * @remarks Before starting to reset the EGL status, this method calls IGlRenderer::Pause() to prevent unexpected behavior. + * @remarks Before starting to reset the EGL status, this method calls IGlRenderer::Pause() to prevent unexpected behavior. * */ result Stop(void); /** - * Redraw the scene. + * Redraws the scene. * * @since 2.0 - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_OPENGL_ERROR There occurs an EGL error during performing EGL function. - * @exception E_INVALID_STATE The state of player is invalid and fails to pause properly. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OPENGL_ERROR An EGL error occurs when executing an EGL function. + * @exception E_INVALID_STATE The state of the player is invalid and it fails to pause properly. * - * @remarks In the case that this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised. + * @remarks If this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query the EGL error that occurs. * */ result Redraw(void); /** - * Set the FPS(frames per second) of the player. + * Sets the FPS(frames per second) of the player. * * @since 2.0 - * @param[in] fps frames per second + * @param[in] fps frames per second * - * @remarks When you give negative integer for fps, then the %GlPlayer try to draw frames as fast as possible. + * @remarks When you assign a negative integer for fps, the %GlPlayer tries to draw frames as fast as possible. * */ void SetFps(int fps); /** - * Set the configuration list of EGL Attributes to initialize the EGL system. + * Sets the configuration list of EGL Attributes to initialize the EGL system. * * @since 2.0 - * @return An error code + * @return An error code * @param[in] pEglConfigList A list of EGL attributes and their values - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * - * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them. - * @remarks The format of eglConfigList is the same with the attribute list as the second input parameter of eglChooseConfig function. For detailed description, refer here. + * @remarks + * - %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not + * guarantee to set EGL configurations with the given attributes but prefers them. + * - The format of eglConfigList is the same with the attribute list as the second input parameter of + * the eglChooseConfig function. For detailed description, refer here. * */ result SetEglAttributeList(const EGLint* pEglConfigList); /** - * Set EGL configuration with the given preset. + * Sets the EGL configuration with the given preset. * * @since 2.0 * @return An error code - * @param[in] preset Preset for attributes. - * @exception E_SUCCESS The method is successful. + * @param[in] preset The preset for attributes + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * - * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them. + * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not + * guarantee to set the EGL configurations with the given attributes but prefers them. * */ result SetEglAttributePreset(EglAttributesPreset preset); /** - * Set EGL configuration for the given Attribute with the given value. + * Sets the EGL configuration for the given attribute with the given value. * * @since 2.0 * @return An error code - * @param[in] key EGL attribute - * @param[in] value Value for the attribute - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @param[in] key The EGL attribute + * @param[in] value The value for the attribute + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. * - * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them. + * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not + * guarantee to set the EGL configurations with the given attributes but prefers them. * */ result SetEglAttribute(EGLint key, EGLint value); /** - * Set the Renderer which implements %IGlRenderer interface. + * Sets the Renderer which implements %IGlRenderer interface. * * @since 2.0 * @return An error code - * @param[in] pRenderer %IGlRenderer defines how to render the scene. - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::InitializeGl() method which is implemented by developers. - * @see %IGlRenderer - * - * @remarks If %GlPlayer already has a renderer, then the previous renderer is replaced by the new one. - * @remarks If input parameter is null, then the current renderer of %GlPlayer is detached and %GlPlayer does nothing. - * @remarks When the %IGlRenderer is replaced with the input, the GL status have to be initialized for the input %IGlRenderer. For such purpose, when the input %IGlRenderer is attached, the overrided IGlRenderer::InitializedGl() method is called. On the other hand, the previous %IGlRenderer of %GlPlayer is detached after calling the overrided %IGlRenderer::TerminateGL() method. + * @param[in] pRenderer %IGlRenderer defines how to render the scene. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::InitializeGl() method implemented by the developer. + * @remarks + * - If %GlPlayer already has a renderer, then the previous renderer is replaced by the new one. + * - If the input parameter is @c null, then the current renderer of %GlPlayer is detached and %GlPlayer does nothing. + * - When the %IGlRenderer is replaced with the input, the GL status has to be initialized for the input %IGlRenderer. + * For such purposes, when the input %IGlRenderer is attached, the overridden IGlRenderer::InitializedGl() method is called. + * On the other hand, the previous %IGlRenderer of %GlPlayer is detached when the overridden %IGlRenderer::TerminateGL() + * method is called. * */ result SetIGlRenderer(IGlRenderer* pRenderer); diff --git a/inc/FGrpIGlRenderer.h b/inc/FGrpIGlRenderer.h index d9842db..b25488a 100644 --- a/inc/FGrpIGlRenderer.h +++ b/inc/FGrpIGlRenderer.h @@ -43,7 +43,8 @@ class _OSP_EXPORT_ IGlRenderer { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this. + * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called + * when the destructor of this. * * @since 2.0 * @@ -55,48 +56,50 @@ public: * * @since 2.0 * @return @c true if this method successfully initializes the GL status and allocate resources, such as shader and textures, @n - else @c false if this method meets some errors or exceptions + * else @c false if this method encounters any errors or exceptions * */ virtual bool InitializeGl(void) = 0; /** - * Terminates the Renderer to unload shader and release allocated resources. + * Terminates the Renderer to unload the shader and release allocated resources. * * @since 2.0 * @return @c true if this method successfully terminates the GL status and releases all the resources, such as shader and textures, @n - else @c false if this method meets some errors or exceptions + * else @c false if this method encounters any errors or exceptions * */ virtual bool TerminateGl(void) = 0; /** * Draws a scene. @n - * Users overload the %Draw() method and calls necessary operations for drawing a scene in this system. + * Users overload the %Draw() method and call the necessary operations for drawing a scene in this system. * * @since 2.0 * @return @c true if this method successfully draws a scene with gl functions, @n - else @c false if this method meets some errors or exceptions + * else @c false if this method encounters any errors or exceptions * */ virtual bool Draw(void) = 0; /** - * Pauses the GlPlayer instance. @n - * Users overload the %Pause() method and calls necessary operations for the pause of the system, including release of resources. + * Pauses a GlPlayer instance. @n + * Users overload the %Pause() method and call the necessary operations for the pause of the system, including release of resources. * * @since 2.0 - * @return @c true if this method successfully does intended operations for pause state, @n else @c false if this method meets some errors or exceptions + * @return @c true if this method successfully does the intended operations for pause state, @n + * else @c false if this method encounters any errors or exceptions * */ virtual bool Pause(void) = 0; /** - * Resumes the GlPlayer instance. @n - * Users overload the %Resume method and calls necessary operations for the resume of the system, including allocation of resources. + * Resumes a GlPlayer instance. @n + * Users overload the %Resume method and call the necessary operations for the resume of the system, including allocation of resources. * * @since 2.0 - * @return @c true if this method successfully does intended operations for resume state, @n else @c false if this method meets some errors or exceptions + * @return @c true if this method successfully does the intended operations for resume state, @n + * else @c false if this method encounters any errors or exceptions * */ virtual bool Resume(void) = 0; @@ -107,7 +110,8 @@ public: * @since 2.0 * * @return The width of target control - * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control width to implement this method. + * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() + * method. Therefore, developers have to declare an integer variable for control width to implement this method. * */ virtual int GetTargetControlWidth(void) = 0; @@ -118,7 +122,8 @@ public: * @since 2.0 * * @return The height of target control - * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control height to implement this method. + * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() + * method. Therefore, developers have to declare an integer variable for control height to implement this method. * */ virtual int GetTargetControlHeight(void) = 0; @@ -129,7 +134,9 @@ public: * @since 2.0 * * @param[in] width The width of target control - * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control width to implement this method. + * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with + * the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for + * control width to implement this method. * */ virtual void SetTargetControlWidth(int width) = 0; @@ -140,7 +147,9 @@ public: * @since 2.0 * * @param[in] height The height of target control - * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control height to implement this method. + * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with + * the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for + * control height to implement this method. * */ virtual void SetTargetControlHeight(int height) = 0; diff --git a/inc/FGrpPixelFormat.h b/inc/FGrpPixelFormat.h index b1a5ebc..803e6b3 100644 --- a/inc/FGrpPixelFormat.h +++ b/inc/FGrpPixelFormat.h @@ -37,13 +37,13 @@ namespace Tizen { namespace Graphics enum PixelFormat { PIXEL_FORMAT_RGB565 = 1, /**< The RGB565 pixel format */ - PIXEL_FORMAT_ARGB8888, /**AutoLink Detection. - * @param[in] canvas The canvas to initialize the text element @n - * It sets the foreground and background colors of the text element. - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM An unknown operating system error has occurred. + * @param[in] text The text string @n + * If the text contains more than one detectable link, the first link is converted to a linked text + * and rest of the links are ignored. + * @param[in] autoLink The autolink mask @n + * Multiple link types can be combined using the bitwise OR operator. @n + * For more information, see AutoLink Detection. + * @param[in] canvas The canvas to initialize the text element @n + * It sets the foreground color and background color of the text element. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM An unknown operating system error has occurred. * @see Tizen::Base::Utility::LinkType */ result Construct(const Tizen::Base::String& text, unsigned long autoLink, const Tizen::Graphics::Canvas& canvas); @@ -198,17 +202,17 @@ public: * @since 2.0 * * @return The string that contains the actual link @n - * If the text element contains no linked text, the method returns an empty string. + * If the text element contains no linked text, the method returns an empty string. */ Tizen::Base::String GetLink(void) const; /** - * Gets the type of the link of the text element. @n + * Gets the link type of the text element. @n * The link type is the first auto-detected link. * - * @since 2.0 + * @since 2.0 * - * @return The string that contains the actual link @n + * @return The string that contains the actual link @n * If the text element contains no linked text, the method returns @c LINK_TYPE_NONE. */ Tizen::Base::Utility::LinkType GetLinkType(void) const; @@ -218,9 +222,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] text The string to set - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] text The string to set + * @exception E_SUCCESS The method is successful. */ result SetText(const Tizen::Base::String& text); @@ -229,10 +233,10 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] font The font to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @return An error code + * @param[in] font The font to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ result SetFont(const Tizen::Graphics::Font& font); @@ -241,9 +245,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The color to set - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. */ result SetTextColor(const Tizen::Graphics::Color& color); @@ -252,9 +256,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The color to set - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. */ result SetBackgroundColor(const Tizen::Graphics::Color& color); @@ -263,27 +267,27 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The color to set - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. */ result SetOutlineColor(const Tizen::Graphics::Color& color); /** * Gets the text of %TextElement. * - * @since 2.0 + * @since 2.0 * - * @return A string containing the text + * @return A string containing the text */ Tizen::Base::String GetText(void) const; /** * Gets the text color of %TextElement. * - * @since 2.0 + * @since 2.0 * - * @return The foreground color + * @return The foreground color */ Tizen::Graphics::Color GetTextColor(void) const; @@ -292,7 +296,7 @@ public: * * @since 2.0 * - * @return The background color + * @return The background color */ Tizen::Graphics::Color GetBackgroundColor(void) const; @@ -301,7 +305,7 @@ public: * * @since 2.0 * - * @return The outline color + * @return The outline color */ Tizen::Graphics::Color GetOutlineColor(void) const; diff --git a/inc/FGrpVideoTexture.h b/inc/FGrpVideoTexture.h index 1a0b5b3..b70d895 100644 --- a/inc/FGrpVideoTexture.h +++ b/inc/FGrpVideoTexture.h @@ -36,7 +36,7 @@ class IVideoTextureUpdateListener; /** * @class VideoTexture * @brief This class provides a method to bind a video frame to OpenGL-ES Texture. - * With this feature, you can easily draw a video frame on OpenGL-ES Textures with consistency. + * With this feature, you can easily draw a video frame on OpenGL-ES Textures with consistency. * * @since 2.0 * @@ -50,7 +50,8 @@ class _OSP_EXPORT_ VideoTexture { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method be called right after calling this constructor. * * @since 2.0 * @@ -71,18 +72,25 @@ public: * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 * * @return An error code - * @param[in] textureId Texture ID which points to the texture associated with the video frame @n The texture ID must be generated from glGenTextures(). - * @param[in] width The width of the input texture. The width must be greater than @c 32, and smaller or equal than GL_MAX_TEXTURE_SIZE. - * @param[in] height The height of the input texture. The height must be greater than @c 32, and smaller or equal than GL_MAX_TEXTURE_SIZE - * @exception E_SUCCESS Construction is successfully done. - * @exception E_OUT_OF_RANGE The width or height is bigger than GL_MAX_TEXTURE_SIZE You can get max size of current device to call glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize). - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @param[in] textureId Texture ID which points to the texture associated with the video frame @n + * The texture ID must be generated from glGenTextures(). + * @param[in] width The width of the input texture @n + * The width must be greater than @c 32, and smaller or equal than @c GL_MAX_TEXTURE_SIZE. + * @param[in] height The height of the input texture @n + * The height must be greater than @c 32, and smaller or equal than @c GL_MAX_TEXTURE_SIZE + * @exception E_SUCCESS Construction is successfully done. + * @exception E_OUT_OF_RANGE The width or height is bigger than @c GL_MAX_TEXTURE_SIZE. + * You can get the maximum size of the current device to call glGetIntegerv(@c GL_MAX_TEXTURE_SIZE, &maxSize). + * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. * For more information, see Application Filtering. - * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using eglMakeCurrent() method. + * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by calling the eglMakeCurrent() method. * @remarks - * - Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer here. + * - Before calling this method, check whether the feature is supported by + * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + * - There is a high probability for an occurrence of an out-of-memory exception. If possible, + * check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle + * the out-of-memory exception, refer here. */ result Construct(int textureId, int width, int height); @@ -92,8 +100,9 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS Binding is successfully done. - * @exception E_INVALID_STATE Any video frames are not ready in the texture. If IVideoTextureUpdateListener is already registered, please check whether the functions have been called. + * @exception E_SUCCESS Binding is successfully done. + * @exception E_INVALID_STATE There are no video frames that are ready in the texture. If IVideoTextureUpdateListener is already + * registered, please check whether the functions have been called. */ result BindTexture(void); @@ -102,7 +111,7 @@ public: * * @since 2.0 * - * @param[in] listener The listener invoked. + * @param[in] listener The listener * @see RemoveVideoTextureUpdateListener() */ void AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener); diff --git a/inc/FUi.h b/inc/FUi.h index 2c0decd..c8ac0e7 100644 --- a/inc/FUi.h +++ b/inc/FUi.h @@ -129,7 +129,8 @@ namespace Tizen * @b Library : @b osp-uifw * * The %Ui namespace is used to construct graphical user interfaces (UI). It contains classes and interfaces for handling - * UI-related events. In addition, it has 4 sub-namespaces: Tizen::Ui::Controls, whose classes handle the display and interaction with UI elements, Tizen::Ui::Scenes, whose classes handle scene transition using the scene management functionalities, + * UI-related events. In addition, it has 4 sub-namespaces: Tizen::Ui::Controls, whose classes handle the display and interaction with UI elements, + * Tizen::Ui::Scenes, whose classes handle scene transition using the scene management functionalities, * Tizen::Ui::Animations, whose classes handle animation-related functionalities, and Tizen::Ui::Effects, whose classes * handle the effect-related functionalities. * diff --git a/inc/FUiAccessibilityContainer.h b/inc/FUiAccessibilityContainer.h index 02b612b..e5e53d5 100644 --- a/inc/FUiAccessibilityContainer.h +++ b/inc/FUiAccessibilityContainer.h @@ -16,10 +16,10 @@ // /** - * @file FUiAccessibilityContainer.h - * @brief This is the header file for the AccessibilityContainer class. + * @file FUiAccessibilityContainer.h + * @brief This is the header file for the %AccessibilityContainer class. * - * This header file contains the declarations of the AccessibilityContainer class. + * This header file contains the declarations of the %AccessibilityContainer class. */ #ifndef _FUI_ACCESSIBILITY_CONTAINER_H_ @@ -179,7 +179,7 @@ class _OSP_EXPORT_ AccessibilityContainer { public: /** - * Gets the owner of the accessibility container + * Gets the owner of the accessibility container. * * @since 2.0 * @return A pointer to the control which owns this %AccessibilityContainer @n @@ -189,7 +189,7 @@ public: const Control* GetOwner(void) const; /** - * Gets the owner of the accessibility container + * Gets the owner of the accessibility container. * * @since 2.0 * @return A pointer to the control which owns this %AccessibilityContainer @n @@ -199,27 +199,27 @@ public: Control* GetOwner(void); /** - * Adds the IAccessibilityListener instance to the %AccessibilityContainer. @n + * Adds an IAccessibilityListener instance to the %AccessibilityContainer. @n * The added listener gets notified when the accessibility status has been changed. * * @since 2.0 - * @return An error code - * @param[in] listener The event listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The instance of IAccessibilityListener is already registered. + * @return An error code + * @param[in] listener The event listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST An instance of IAccessibilityListener is already registered. * @see RemoveAccessibilityListener() */ result AddAccessibilityListener(IAccessibilityListener& listener); /** - * Removes the IAccessibilityListener listener instance. @n - * The removed listener is not notified even when the accessibility status has been changed. + * Removes an IAccessibilityListener listener instance. @n + * The removed listener is not notified when the accessibility status is changed. * * @since 2.0 - * @return An error code - * @param[in] listener The listener to remove - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The instance of listener is not found. + * @return An error code + * @param[in] listener The listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND An instance of the listener is not found. * @see AddAccessibilityListener() */ result RemoveAccessibilityListener(IAccessibilityListener& listener); @@ -228,10 +228,10 @@ public: * Adds the accessibility element to the %AccessibilityContainer. * * @since 2.0 - * @return An error code - * @param[in] element The instance of AccessibilityElement - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The instance of AccessibilityElement is already registered. + * @return An error code + * @param[in] element The instance of AccessibilityElement + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST An instance of AccessibilityElement is already registered. * @see RemoveElement() * @see RemoveAllElements() * @@ -243,19 +243,19 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * - * @param[in] element The instance of AccessibilityElement + * @param[in] element The instance of AccessibilityElement * - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The instance of AccessibilityElement is not found. + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND An instance of AccessibilityElement is not found. * @see AddElement() * */ result RemoveElement(AccessibilityElement& element); /** - * Removes all of the accessibility elements in the %AccessibilityContainer. + * Removes all the accessibility elements in the %AccessibilityContainer. * * @since 2.0 * @@ -265,25 +265,25 @@ public: void RemoveAllElements(void); /** - * Gets the instance of the accessibility element which is the child of the %AccessibilityContainer by the name. + * Gets an instance of the AccessibilityElement which is the child of the %AccessibilityContainer with the specified name. * * @since 2.0 * - * @return The instance to the child element, if there exists an element which has the given name, @n - * else @c null + * @return The instance of the child element, @n + * else @c null if no element with the specified @c name exists * - * @param[in] name The name of AccessibilityElement + * @param[in] name The name of AccessibilityElement * */ AccessibilityElement* GetElement(const Tizen::Base::String& name) const; /** - * Gets the list of accessibility elements that are the child of the %AccessibilityContainer. + * Gets the list of accessibility elements that are children of %AccessibilityContainer. * * @since 2.0 * - * @return A pointer to the list of the child element, if there exists some elements in the container, @n - * else @c null + * @return A pointer to the list of the child elements, @n + * else @c null if no elements exist */ Tizen::Base::Collection::IList* GetElementsN(void) const; diff --git a/inc/FUiAccessibilityElement.h b/inc/FUiAccessibilityElement.h index cb1adea..b2a8994 100644 --- a/inc/FUiAccessibilityElement.h +++ b/inc/FUiAccessibilityElement.h @@ -17,9 +17,9 @@ /** * @file FUiAccessibilityElement.h - * @brief This is the header file for the AccessibilityElement class. + * @brief This is the header file for the %AccessibilityElement class. * - * This header file contains the declarations of the AccessibilityElement class. + * This header file contains the declarations of the %AccessibilityElement class. * */ @@ -78,11 +78,13 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] bounds The bounds of the accessibility element - * @param[in] name The name of the accessibility element - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either the length of name parameter is @c 0, or the bounds are smaller than @c 0. + * @return An error code + * @param[in] bounds The bounds of the accessibility element + * @param[in] name The name of the accessibility element + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The length of the specified @c name is @c 0. + * - The specified @c bounds are smaller than @c 0. */ result Construct(const Tizen::Graphics::Rectangle& bounds, const Tizen::Base::String& name); @@ -91,11 +93,13 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] bounds The bounds of the accessibility element - * @param[in] name The name of the accessibility element - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either the length of @c name parameter is @c 0, or the @c bounds are smaller than @c 0. + * @return An error code + * @param[in] bounds The bounds of the accessibility element + * @param[in] name The name of the accessibility element + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The length of the specified @c name is @c 0. + * - The specified @c bounds are smaller than @c 0. */ result Construct(const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& name); @@ -116,7 +120,7 @@ public: void SetBounds(const Tizen::Graphics::Rectangle& bounds); /** - * Sets the bounds of an element. + * Sets the bounds of the element. * * @since 2.1 * @param[in] bounds The bounds of the accessibility element @@ -132,7 +136,7 @@ public: Tizen::Graphics::Rectangle GetBounds(void) const; /** - * Gets the bounds of an element. + * Gets the bounds of the element. * * @since 2.1 * @return The bounds of the element diff --git a/inc/FUiAccessibilityTypes.h b/inc/FUiAccessibilityTypes.h index 0397c8d..344e602 100644 --- a/inc/FUiAccessibilityTypes.h +++ b/inc/FUiAccessibilityTypes.h @@ -37,11 +37,11 @@ namespace Tizen { namespace Ui */ enum AccessibilityScreenReaderStatus { - ACCESSIBILITY_SCREEN_READER_STATUS__NONE, /**< Initial value to which the screen reader is set */ + ACCESSIBILITY_SCREEN_READER_STATUS__NONE, /**< The initial value to which the screen reader is set */ ACCESSIBILITY_SCREEN_READER_STATUS_ERROR, /**< An error has occurred. */ - ACCESSIBILITY_SCREEN_READER_STATUS_READY, /**< Screen reader is idle. */ - ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING, /**< Screen reader is in use. */ - ACCESSIBILITY_SCREEN_READER_STATUS_PAUSE, /**< Screen reader has been paused. */ + ACCESSIBILITY_SCREEN_READER_STATUS_READY, /**< The screen reader is idle. */ + ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING, /**< The screen reader is in use. */ + ACCESSIBILITY_SCREEN_READER_STATUS_PAUSE, /**< The screen reader has been paused. */ }; }} //Tizen::Ui diff --git a/inc/FUiAnimAnimationBase.h b/inc/FUiAnimAnimationBase.h index cc60d37..9bf6b9b 100644 --- a/inc/FUiAnimAnimationBase.h +++ b/inc/FUiAnimAnimationBase.h @@ -78,9 +78,10 @@ public: * @param[in] milliseconds The offset of the animation in milliseconds * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation. - * @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms, - * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n - * If @c autoReverseset is set to @c true, the Backward animation plays for 100ms, from @c 1.0 to @c 0.0. + * @remarks + * - If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms, + * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. + * - If @c autoReverseset is set to @c true, the Backward animation plays for 100ms, from @c 1.0 to @c 0.0. */ result SetOffset(long milliseconds); @@ -116,18 +117,18 @@ public: /** - * Sets the AutoReverse property of the animation. @n + * Sets the auto reverse state of the animation. @n * If enabled, the forward and backward animation can also be played. * * @since 2.0 * * @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n * else @c false - * @remarks If @c autoReverseset is set to @c true, the duration of the animation is doubled. - * If the repeat count is more than 1, @n - * @c autoReverse is applied to each iteration. - * Note that if @c autoReverse is set to @c true, one forward animation play and one backward animation play is one - * iteration. + * @remarks + * - If @c autoReverse is set to @c true, the duration of the animation is doubled. @n + * Note that if @c autoReverse is set to @c true, one forward animation play and one backward animation play is one + * iteration. + * - If the repeat count is more than @c 1, @c autoReverse is applied to each iteration. */ void SetAutoReverseEnabled(bool autoReverse); @@ -282,7 +283,8 @@ public: /** * Gets the control points of the Bezier interpolator. @n - * The %GetBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER. @c 0 is returned for the other interpolators. + * The %GetBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER. + * @c 0 is returned for the other interpolators. * * @since 2.0 * @@ -307,7 +309,7 @@ public: * * @since 2.0 * - * @return The key frame count + * @return The keyframe count */ int GetKeyFrameCount(void) const; diff --git a/inc/FUiAnimAnimationTransaction.h b/inc/FUiAnimAnimationTransaction.h index 8b82038..9b84fc6 100644 --- a/inc/FUiAnimAnimationTransaction.h +++ b/inc/FUiAnimAnimationTransaction.h @@ -45,7 +45,8 @@ class IVisualElementAnimationValueInterpolator; * * @since 2.0 * - * The %AnimationTransaction class enables the applications to define animation transactions that make a set of animations on one or more animators to start or stop at the same time. + * The %AnimationTransaction class enables the applications to define animation transactions that make a set of animations + * on one or more animators to start or stop at the same time. * * For more information on the class features, see Transactions. * @@ -56,8 +57,8 @@ public: /** * Initializes a transaction set. @n - * Calls ControlAnimator::StartUserAnimation() or calls VisualElement::AddAnimation() - * after calling the %Begin() method and before calling the CommitTransaction() method. + * The ControlAnimator::StartUserAnimation() method or VisualElement::AddAnimation() method must be called after + * calling the %Begin() method and before calling the CommitTransaction() method. * Nesting of the transaction set is allowed. * * @since 2.0 @@ -71,8 +72,8 @@ public: /** * Initializes a transaction set. @n - * Calls ControlAnimator::StartUserAnimation() or calls VisualElement::AddAnimation() - * after calling the %Begin() method and before calling the CommitTransaction() method. + * The ControlAnimator::StartUserAnimation() method or VisualElement::AddAnimation() method must be called after + * calling the %Begin() method and before calling the CommitTransaction() method. * Nesting of the transaction set is allowed. * * @since 2.0 @@ -118,7 +119,7 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @see Begin() */ @@ -148,9 +149,10 @@ public: * @return An error code * @param[in] pListener The listener to add * @exception E_SUCCESS The method is successful. - * @remarks Only one event listener can be set. @n - * If @c pListener is @c null, the listener already set is unregistered. @n - * An application must deregister the registered listener if the listener object needs to be deleted. + * @remarks + * - Only one event listener can be set. @n + * If @c pListener is @c null, the listener already set is unregistered. + * - An application must deregister the registered listener if the listener object needs to be deleted. * @see SetCurrentTransactionEventListener() */ static result SetTransactionEventListener(IAnimationTransactionEventListener* pListener); @@ -163,8 +165,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] pListener The listener to set - * @exception E_SUCCESS The method is successful. + * @param[in] pListener The listener to set + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @remarks If the listener is set using this method, the set default listener is not called. * @see SetTransactionEventListener() @@ -179,14 +181,15 @@ public: * @since 2.0 * * @return An error code - * @param[in] enable Set to @c true to enable the implicit animation, @n - * else @c false + * @param[in] enable Set to @c true to enable the implicit animation, @n + * else @c false * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The nested transaction created after invoking this method will inherit @c enable as the default value. - * @remarks Deciding whether to enable implicit animation depends on both the flag of transaction and the flag of VisualElement. - * If both SetVisualElementImplicitAnimationEnabled() and VisualElement::SetImplicitAnimationEnabled() are set to @c true, @n - * implicit animation is enabled. + * @remarks + * - The nested transaction created after invoking this method will inherit @c enable as the default value. + * - Deciding whether to enable implicit animation depends on both the flag of transaction and the flag of VisualElement. + * If both SetVisualElementImplicitAnimationEnabled() and VisualElement::SetImplicitAnimationEnabled() are set to @c true, @n + * implicit animation is enabled. */ static result SetVisualElementImplicitAnimationEnabled(bool enable); @@ -198,14 +201,16 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] pListener The pointer of listener instance to set - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] pListener The pointer of listener instance to set + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @remarks - * - This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. - * - If an animation that is listening to an animation status event is removed before starting, then the platform skips to call @n - * the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. + * - If an animation that is listening to an animation status event is removed before starting, then the + * platform skips to call the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() + * method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. */ static result SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener); @@ -215,11 +220,12 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] pTimingFunction The reference of interpolator instance to set - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. */ static result SetVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction); @@ -229,11 +235,12 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] pValueInterpolator The reference of InterpolatorFunction instance to set - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. */ static result SetVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator* pValueInterpolator); @@ -243,12 +250,13 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] milliseconds The duration of the animation in milliseconds - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] milliseconds The duration of the animation in milliseconds + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see GetVisualElementAnimationDuration() */ static result SetVisualElementAnimationDuration(long milliseconds); @@ -259,11 +267,13 @@ public: * * @since 2.0 * - * @return The duration value of the animation - * @exception E_SUCCESS The method is successful. + * @return The duration value of the animation + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationDuration() */ static long GetVisualElementAnimationDuration(void); @@ -275,15 +285,18 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] milliseconds The offset value of the animation in milliseconds - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation. - * @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms, - * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n - * If @c autoReverse is set to @c true, the Backward animation plays for @c 100ms, from @c 1.0 to @c 0.0. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and + * the offset value is @c 20 ms, the actual animation starts at @c 0th ms and plays for @c 80 ms with a + * start value of @c 0.2. + * - If @c autoReverse is set to @c true, the Backward animation plays for @c 100ms, from @c 1.0 to @c 0.0. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see GetVisualElementAnimationOffset() */ static result SetVisualElementAnimationOffset(long milliseconds); @@ -294,12 +307,14 @@ public: * * @since 2.0 * - * @return The offset value of the animation in milliseconds @n - * The default value of the offset is @c 0. - * @exception E_SUCCESS The method is successful. + * @return The offset value of the animation in milliseconds @n + * The default value of the offset is @c 0. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationOffset() */ static long GetVisualElementAnimationOffset(void); @@ -311,13 +326,15 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] milliseconds The delay for the animation to start in milliseconds - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @exception E_INVALID_ARG The value of the specified parameter is negative. - * @remarks This method does not alter the start, end, and duration values of the animation. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - This method does not alter the start, end, and duration values of the animation. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see GetVisualElementAnimationDelay() */ static result SetVisualElementAnimationDelay(long milliseconds); @@ -328,12 +345,14 @@ public: * * @since 2.0 * - * @return The delay value in milliseconds @n - * The default value of the delay is @c 0. - * @exception E_SUCCESS The method is successful. + * @return The delay value in milliseconds @n + * The default value of the delay is @c 0. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationDelay() */ static long GetVisualElementAnimationDelay(void); @@ -345,13 +364,15 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] count The number of times the animation has to repeat - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] count The number of times the animation has to repeat + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @exception E_INVALID_ARG The value of the specified parameter is negative. - * @remarks A delay and offset is applied to an animation only when the animation is played for the first time. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - A delay and offset is applied to an animation only when the animation is played for the first time. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see GetVisualElementAnimationRepeatCount() */ static result SetVisualElementAnimationRepeatCount(long count); @@ -362,49 +383,55 @@ public: * * @since 2.0 * - * @return The repeat count value of the animation @n - * The default value of the repeat count is @c 1. - * @exception E_SUCCESS The method is successful. + * @return The repeat count value of the animation @n + * The default value of the repeat count is @c 1. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationRepeatCount() */ static long GetVisualElementAnimationRepeatCount(void); /** - * Sets the default AutoReverse property of an animation. @n + * Sets the default auto reverse state of the animation.. @n * If enabled, the forward and backward animation can also be played. * * @since 2.0 * - * @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n - * else @c false - * @exception E_SUCCESS The method is successful. + * @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n + * else @c false + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks If @c autoReverse is set to @c true, the duration of the animation is doubled. - * If the repeat count is more than @c 1, @c autoReverse is applied to each iteration. - * Note that if @c autoReverse is set to @c true, one forward animation play - * and one backward animation play is one iteration. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - If @c autoReverse is set to @c true, the duration of the animation is doubled. + * If the repeat count is more than @c 1, @c autoReverse is applied to each iteration. + * Note that if @c autoReverse is set to @c true, one forward animation play + * and one backward animation play is one iteration. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see IsVisualElementAnimationAutoReverseEnabled() */ static result SetVisualElementAnimationAutoReverseEnabled(bool autoReverse); /** - * Checks whether the auto reverse is enabled. + * Checks whether auto reverse is enabled. * * @since 2.0 * - * @return @c true if the auto reverse is enabled, @n - * else @c false @n - * The default auto reverse value is @c false. - * @exception E_SUCCESS The method is successful. + * @return @c true if auto reverse is enabled, @n + * else @c false @n + * The default auto reverse value is @c false. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationAutoReverseEnabled() */ static bool IsVisualElementAnimationAutoReverseEnabled(void); @@ -416,12 +443,13 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] scaleRatio The scale ratio property of the animation - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] scaleRatio The scale ratio property of the animation + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. * @exception E_INVALID_ARG The value of the specified parameter is negative. - * @remarks This is used as the default value for the newly created VisualElementAnimation or its descendant classes in the current transaction. + * @remarks This is used as the default value for the newly created VisualElementAnimation or its descendant + * classes in the current transaction. * @see GetVisualElementAnimationScaleRatio() */ static result SetVisualElementAnimationScaleRatio(float scaleRatio); @@ -432,12 +460,14 @@ public: * * @since 2.0 * - * @return The scale ratio value of the animation @n - * The default value of scale ratio is @c 1.0f. - * @exception E_SUCCESS The method is successful. + * @return The scale ratio value of the animation @n + * The default value of scale ratio is @c 1.0f. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This is used as the default value for the newly created VisualElementAnimation class or its descendant + * classes in the current transaction. * @see SetVisualElementAnimationScaleRatio() */ static float GetVisualElementAnimationScaleRatio(void); diff --git a/inc/FUiAnimBezierTimingFunction.h b/inc/FUiAnimBezierTimingFunction.h index 81e2d73..dd5e931 100644 --- a/inc/FUiAnimBezierTimingFunction.h +++ b/inc/FUiAnimBezierTimingFunction.h @@ -70,8 +70,8 @@ public: * * @since 2.0 * - * @return The progress(pace) value calculated by bezier equation with control points @n - * @c 0 and @c 1 are the start and end values of an animation, respectively. + * @return The progress(pace) value calculated by bezier equation with control points @n + * @c 0 and @c 1 are the start and end values of an animation, respectively. * @param[in] timeProgress The time progress value @n * This must be in the range @c 0.0 to @c 1.0. */ @@ -83,7 +83,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] timeProgress1 The time progress of control point 1 @n * This must be in the range @c 0.0 to @c 1.0. * @param[in] progress1 The progress of control point 1 @n diff --git a/inc/FUiAnimControlAnimator.h b/inc/FUiAnimControlAnimator.h index e027797..3a62e87 100644 --- a/inc/FUiAnimControlAnimator.h +++ b/inc/FUiAnimControlAnimator.h @@ -51,7 +51,7 @@ namespace Tizen { namespace Ui { namespace Animations * * @final This class is not intended for extension. * - * @remarks This class doesn't support APIs for float type. + * @remarks This class does not support APIs for float type. * * The %ControlAnimator class is used to control the animations operated in Tizen::Ui::Controls. * @@ -86,10 +86,10 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @exception E_SYSTEM A system error has occurred. * @remarks An animation is deleted at the end of the animation playback. @n - * RectangleAnimation is used to animate only one animation target at a time. - * For example, if AnimationTarget is @c ANIMATION_TARGET_SIZE, RectangleAnimation performs only the dimension animation. @n - * To perform animation using the @c ANIMATION_TARGET_POSITION and @c ANIMATION_TARGET_SIZE properties, AnimationTransaction must be used with - * a separate call for each animation target. + * RectangleAnimation is used to animate only one animation target at a time. @n + * For example, if AnimationTarget is @c ANIMATION_TARGET_SIZE, %RectangleAnimation performs only the dimension animation. @n + * To perform animation using the @c ANIMATION_TARGET_POSITION and @c ANIMATION_TARGET_SIZE properties, AnimationTransaction + * must be used with a separate call for each animation target. */ result StartUserAnimation(AnimationTargetType animTarget, const AnimationBase& animation); @@ -161,7 +161,7 @@ public: /** - * Adds the IControlAnimatorEventListener listener instance to the current instance of the control. @n + * Adds an IControlAnimatorEventListener listener instance to the current instance of the control. @n * The %IControlAnimatorEventListener listener is called for status changes of animations associated with a control. * The added listener listens to events on the specified event dispatcher's context when they are fired. * @@ -181,7 +181,7 @@ public: /** - * Removes the IControlAnimatorEventListener listener instance from the current instance of the control. @n + * Removes an IControlAnimatorEventListener listener instance from the current instance of the control. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -197,7 +197,7 @@ public: /** - * Adds a IControlAnimatorDetailedEventListener listener instance to the current instance of the control. @n + * Adds an IControlAnimatorDetailedEventListener listener instance to the current instance of the control. @n * The %IControlAnimatorDetailedEventListener listener is called for status changes of each animation associated with the control. @n * The added listener listens to events on the specified event dispatcher's context when they are fired. * @@ -286,9 +286,9 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @exception E_SYSTEM A system error has occurred. - * @remarks The X and Y position of the object are relative to the top-left corner of its parent. @n - * Control::Invalidate() need not be called to display the control. The animation uses linear interpolator and is played for a default duration if - * the user does not overwrite the values using SetAnimation(). + * @remarks The X and Y position of the object are relative to the top-left corner of its parent. @n + * Control::Invalidate() need not be called to display the control. The animation uses linear interpolator + * and is played for a default duration if the user does not overwrite the values using SetAnimation(). * @see SetBounds() * @see SetSize() */ @@ -334,7 +334,8 @@ public: * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @exception E_SYSTEM A system error has occurred. * @remarks Control::Invalidate() need not be called to display the control. @n - * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation(). + * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not + * overwrite the values using SetAnimation(). * @see SetBounds() * @see SetPosition() */ @@ -357,7 +358,8 @@ public: * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @exception E_SYSTEM A system error has occurred. * @remarks Control::Invalidate() need not be called to display the control. @n - * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation(). + * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not + * overwrite the values using SetAnimation(). * @see SetSize() * @see SetBounds() * @see SetPosition() @@ -384,10 +386,11 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @remarks Changing the position of a parent object does not change the position of its children, the top-left position that is relative to the - * top-left corner of the parent container. If calling this method causes re-positioning of an object or changes the size of the object, the - * system redraws the object and all its children. @n + * top-left corner of the parent container. If calling this method causes re-positioning of an object or changes the size of the object, the + * system redraws the object and all its children. @n * Control::Invalidate() need not be called to display the control. @n - * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation(). + * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not + * overwrite the values using SetAnimation(). * @see SetPosition() * @see SetSize() */ @@ -409,7 +412,8 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @remarks Control::Invalidate() need not be called to display the control. @n - * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation(). + * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not + * overwrite the values using SetAnimation(). * @see SetBounds() * @see SetPosition() * @see SetSize() @@ -429,7 +433,8 @@ public: * @exception E_UNSUPPORTED_OPERATION This operation is not supported. * @exception E_SYSTEM A system error has occurred. * @remarks Control::Invalidate() need not be called to display the control. @n - * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation(). + * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not + * overwrite the values using SetAnimation(). */ result SetShowState(bool show); diff --git a/inc/FUiAnimDimensionAnimation.h b/inc/FUiAnimDimensionAnimation.h index 4d2284e..19aaf0a 100644 --- a/inc/FUiAnimDimensionAnimation.h +++ b/inc/FUiAnimDimensionAnimation.h @@ -60,7 +60,9 @@ public: * @param[in] duration The duration of animation in milliseconds * @param[in] interpolator The type of interpolator used for the animation's intermediate value calculation * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The value of the specified parameter is negative. + * - The interpolator is of an invalid type. * @remarks The specific error code can be accessed using the GetLastResult() method. */ DimensionAnimation(const Tizen::Graphics::Dimension& startValue, const Tizen::Graphics::Dimension& endValue, long duration, AnimationInterpolatorType interpolator); @@ -91,7 +93,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %DimensionAnimation + * @param[in] rhs An instance of %DimensionAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -131,7 +133,8 @@ public: * @return @c true if the value of the current instance equals the value of the specified instance, @n * else @c false * @param[in] obj An instance of %DimensionAnimation - * @remarks The %DimensionAnimation class has a semantic value that means this method checks whether the two instances have the same animation. + * @remarks The %DimensionAnimation class has a semantic value that means this method checks whether the two instances + * have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -142,7 +145,7 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random * distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -158,7 +161,7 @@ public: * @param[in] anchorY The Y value of the anchor at which the control's animation is performed * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks A default anchor point value is (0.0, 0.0). The range of an anchor point is @c 0.0 to @c 1.0. @n + * @remarks The default anchor point value is (0.0, 0.0). The range of an anchor point is @c 0.0 to @c 1.0. @n * When the anchor point value is (0.0, 0.0), the object is scaled and the top-left corner of the object remains fixed. @n * For all the other anchor point values, the position property is changed. * If the anchor point value is (0.5, 0.5), the object is scaled with respect to the center. @@ -208,7 +211,7 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks If @c time is greater than the duration, it will become the new duration and @c value becomes the new @c endValue. @n - * Also, the old duration and @c endValue will be added as a new key frame entry in the list. @n + * Also, the old duration and @c endValue will be added as a new keyframe entry in the list. @n * If a key-value pair with the current key already exists, the old value will be overwritten with the new one. @n * An exception will be returned if @c time is equal to @c 0 or the duration of the animation. */ @@ -228,8 +231,8 @@ public: * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_SYSTEM A system error has occurred. * @remarks The @c time and @c value returned is the one present at the index of the sorted map list(sorted with respect to key). @n - * For example, if the user adds key-frame in the order (10,value1), (20,value2), (5,value3) and then GetKeyFrameAt(0,time,value) is called, the - * pair returned is (5,value3). + * For example, if the user adds key-frame in the order (10,value1), (20,value2), (5,value3) and + * then GetKeyFrameAt(0,time,value) is called, the pair returned is (5,value3). */ result GetKeyFrameAt(int index, long& time, Tizen::Graphics::Dimension& value) const; @@ -240,7 +243,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] time The key frame time + * @param[in] time The keyframe time * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The keyframe @c time value is invalid. * @exception E_OBJ_NOT_FOUND The keyframe @c time value is not found in the keyframe List. @@ -255,7 +258,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * The value is sorted in an increasing order of time. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index parameter is out of range. diff --git a/inc/FUiAnimDisplayContext.h b/inc/FUiAnimDisplayContext.h index 18321c3..ee3d173 100644 --- a/inc/FUiAnimDisplayContext.h +++ b/inc/FUiAnimDisplayContext.h @@ -50,8 +50,8 @@ protected: * * @since 2.0 * - * @remarks The %DisplayContext instance cannot be created, - * it is offered by the Tizen::Ui::Window::GetDisplayContext() method. + * @remarks The %DisplayContext instance cannot be created, + * it is offered by the Tizen::Ui::Window::GetDisplayContext() method. * @see Window::GetDisplayContext() */ DisplayContext(void); diff --git a/inc/FUiAnimExpInTimingFunction.h b/inc/FUiAnimExpInTimingFunction.h index 5e095d3..5339a9f 100644 --- a/inc/FUiAnimExpInTimingFunction.h +++ b/inc/FUiAnimExpInTimingFunction.h @@ -69,8 +69,8 @@ public: * * @since 2.0 * - * @return The progress(pace) value calculated by exp-in equation with scale value @n - * @c 0 and @c 1 are the start and end values of an animation, respectively. + * @return The progress(pace) value calculated by exp-in equation with scale value @n + * @c 0 and @c 1 are the start and end values of an animation, respectively. * @param[in] timeProgress The time progress value @n * This must be in the range @c 0.0 to @c 1.0. */ @@ -82,7 +82,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] scale The scale value * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative. diff --git a/inc/FUiAnimExpOutTimingFunction.h b/inc/FUiAnimExpOutTimingFunction.h index d9bf2dd..a6caa15 100644 --- a/inc/FUiAnimExpOutTimingFunction.h +++ b/inc/FUiAnimExpOutTimingFunction.h @@ -82,7 +82,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] scale The scale value * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative. diff --git a/inc/FUiAnimFloatAnimation.h b/inc/FUiAnimFloatAnimation.h index 071623d..5d6bc48 100644 --- a/inc/FUiAnimFloatAnimation.h +++ b/inc/FUiAnimFloatAnimation.h @@ -58,7 +58,9 @@ public: * @param[in] duration The duration of animation in milliseconds * @param[in] interpolator The type of interpolation used for the intermediate value calculation of the animation * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The value of the specified parameter is negative. + * - The interpolator is of an invalid type. * @remarks The specific error code can be accessed using the GetLastResult() method. */ FloatAnimation(float startValue, float endValue, long duration, AnimationInterpolatorType interpolator); @@ -90,7 +92,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %FloatAnimation + * @param[in] rhs An instance of %FloatAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -142,8 +144,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution - * for all inputs. + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must + * generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -156,7 +158,7 @@ public: * @return An error code * @param[in] currentTime The current time value of the animation play @n * The value must be between @c 0 and the duration of the animation. - * @param[out] animatedValue The animated value for the @c currentTime passed as input + * @param[out] animatedValue The animated value for the @c currentTime that is passed as input * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. @@ -165,7 +167,7 @@ public: /** - * Adds a key frame to the animation. + * Adds a keyframe to the animation. * * @since 2.0 * @@ -175,10 +177,11 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If @c time is greater than the duration, it becomes the new @c duration and value becomes the new @c endValue. - * Also the old @c duration and @c endValue are added as a new key frame entry in the list. - * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new value. - * @remarks An exception is returned if the @c time is equal to @c 0 or the duration of the animation. + * @remarks + * - If the specified @c time is greater than the duration, it becomes the new @c duration and value becomes the new @c endValue. + * Also the old @c duration and @c endValue are added as a new keyframe entry in the list. + * - If a key-value pair with the current key already exists, the old value is overwritten with the new value. + * - An exception is returned if the specified @c time is equal to @c 0 or the duration of the animation. */ result AddKeyFrame(long time, float value); @@ -189,12 +192,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * This value is sorted in an increasing order of time. * @param[out] time The time stamp at the specified @c index * @param[out] value The value at the specified @c index * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_SYSTEM A system error has occurred. * @remarks The @c time and @c value returned, are the one present at the index of the sorted map list (sorted with respect to key). * For example, if the user adds keyframe in the order (10,value1), (20,value2), (5,value3), and @@ -204,15 +207,15 @@ public: /** - * Removes the passed keyframe object from the keyframe list. + * Removes the keyframe object from the keyframe list. * * @since 2.0 * * @return An error code - * @param[in] time The key frame time + * @param[in] time The keyframe time * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c time is invalid. - * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List. + * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List. * @exception E_SYSTEM A system error has occurred. */ result RemoveKeyFrame(long time); @@ -224,7 +227,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * This value is sorted in an increasing order of time. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. @@ -286,7 +289,7 @@ public: * * @since 2.0 * - * @return The end value + * @return The end value */ float GetEndValue(void) const; diff --git a/inc/FUiAnimFrameAnimator.h b/inc/FUiAnimFrameAnimator.h index 870196b..0b93feb 100644 --- a/inc/FUiAnimFrameAnimator.h +++ b/inc/FUiAnimFrameAnimator.h @@ -129,11 +129,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] pForm A pointer to Form object to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c pForm is @c null. + * @param[in] pForm A pointer to the Form object to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pForm is @c null. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @remarks Control::Invalidate() need not be called to display the form. @n * To select the animation that is used during this method, use SetFormTransitionAnimation() before calling this method. */ diff --git a/inc/FUiAnimIAnimationTransactionEventListener.h b/inc/FUiAnimIAnimationTransactionEventListener.h index 8550870..2d98baf 100644 --- a/inc/FUiAnimIAnimationTransactionEventListener.h +++ b/inc/FUiAnimIAnimationTransactionEventListener.h @@ -63,7 +63,7 @@ public: * * @since 2.0 * - * @param[in] transactionId The transaction ID of the transaction for which the event has occurred + * @param[in] transactionId The ID of the transaction for which the event has occurred */ virtual void OnAnimationTransactionStarted(int transactionId) = 0; @@ -73,7 +73,7 @@ public: * * @since 2.0 * - * @param[in] transactionId The transaction ID of the transaction for which the event has occurred + * @param[in] transactionId The ID of the transaction for which the event has occurred * @remarks This callback is called when user calls AnimationTransaction::Stop(). */ virtual void OnAnimationTransactionStopped(int transactionId) = 0; diff --git a/inc/FUiAnimIControlAnimatorDetailedEventListener.h b/inc/FUiAnimIControlAnimatorDetailedEventListener.h index 5c44a90..4387d7d 100644 --- a/inc/FUiAnimIControlAnimatorDetailedEventListener.h +++ b/inc/FUiAnimIControlAnimatorDetailedEventListener.h @@ -80,8 +80,8 @@ public: * @param[in] animTrigger The animator trigger type of the control @n * The animation event has occurred for the specified trigger type. * @param[in] animTarget The animation target type @n - * The animation event has occurred for the specified animation target type. In the case of implicit animations, - * @c animTarget is @c ANIMATION_TARGET_NONE. + * The animation event has occurred for the specified animation target type. In the case of + * implicit animations, @c animTarget is @c ANIMATION_TARGET_NONE. * @param[in] pAnimation The animation object @n * The event occurs for this animation object. In the case of implicit animations (animations not defined by the * application), @c pAnimation is @c null. diff --git a/inc/FUiAnimIVisualElementAnimationProvider.h b/inc/FUiAnimIVisualElementAnimationProvider.h index 4e729a5..bf9cfc8 100644 --- a/inc/FUiAnimIVisualElementAnimationProvider.h +++ b/inc/FUiAnimIVisualElementAnimationProvider.h @@ -43,8 +43,9 @@ class VisualElementAnimation; * * @since 2.0 * -* The %IVisualElementAnimationProvider interface customizes implicit animations. The class that needs to override default implicit animations must implement this interface, and -* the instance created with that class is registered with VisualElement, using the VisualElement::SetAnimationProvider() method. +* The %IVisualElementAnimationProvider interface customizes implicit animations. The class that needs to override default +* implicit animations must implement this interface, and the instance created with that class is registered with VisualElement, +* using the VisualElement::SetAnimationProvider() method. * When the properties defined in %VisualElement and its descendants are changed, the CreateAnimationForProperty() method of this interface is invoked. * * For more information on the class features, see Implicit and Explicit Animations. diff --git a/inc/FUiAnimIVisualElementAnimationStatusEventListener.h b/inc/FUiAnimIVisualElementAnimationStatusEventListener.h index e50539c..a646775 100644 --- a/inc/FUiAnimIVisualElementAnimationStatusEventListener.h +++ b/inc/FUiAnimIVisualElementAnimationStatusEventListener.h @@ -73,7 +73,7 @@ public: * @param[in] animation The animation that is started * @param[in] keyName The key name of the animation * @param[in] target An instance of VisualElement to which the animation is applied - * @remarks If the key name of the animation is not set, @c keyName is empty string. + * @remarks If the key name of the animation is not set, @c keyName is an empty string. */ virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) = 0; @@ -83,11 +83,11 @@ public: * * @since 2.0 * - * @param[in] animation The animation that is repeated - * @param[in] keyName The key name of the animation - * @param[in] target An instance of VisualElement to which the animation is applied + * @param[in] animation The animation that is repeated + * @param[in] keyName The key name of the animation + * @param[in] target An instance of VisualElement to which the animation is applied * @param[in] currentRepeatCount The current repeat count - * @remarks If the key name of the animation is not set, @c keyName is empty string. + * @remarks If the key name of the animation is not set, @c keyName is an empty string. */ virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) = 0; @@ -97,12 +97,12 @@ public: * * @since 2.0 * - * @param[in] animation The animation that is finished - * @param[in] keyName The key name of the animation - * @param[in] target An instance of VisualElement to which the animation is applied + * @param[in] animation The animation that is finished + * @param[in] keyName The key name of the animation + * @param[in] target An instance of VisualElement to which the animation is applied * @param[in] completedNormally @c true if the animation is completed normally, @n * else @c false - * @remarks If the key name of the animation is not set, @c keyName is empty string. + * @remarks If the key name of the animation is not set, @c keyName is an empty string. */ virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) = 0; diff --git a/inc/FUiAnimIVisualElementContentProvider.h b/inc/FUiAnimIVisualElementContentProvider.h index ccb7305..dfce682 100644 --- a/inc/FUiAnimIVisualElementContentProvider.h +++ b/inc/FUiAnimIVisualElementContentProvider.h @@ -40,12 +40,13 @@ class VisualElement; /** * @interface IVisualElementContentProvider - * @brief This interface customizes content of %VisualElement. + * @brief This interface customizes content of %VisualElement. * * @since 2.0 * - * The %IVisualElementContentProvider interface is the listener interface for providing content and information on it. The class that needs to customize content must implement this interface, and - * use the VisualElement::SetContentProvider() method to register to the VisualElement. + * The %IVisualElementContentProvider interface is the listener interface for providing content and information on it. The class + * that needs to customize content must implement this interface, and use the VisualElement::SetContentProvider() method to + * register to the VisualElement. * * For more information on the class features, see Content Provider. * @@ -63,7 +64,7 @@ public: public: /** - * %PrepareDraw() is invoked by UI framework before DrawContent() is called. + * %PrepareDraw() is invoked by the UI framework before DrawContent() is called. * If this method returns @c true, VisualElement can call the %DrawContent() method. * * @since 2.0 @@ -90,17 +91,17 @@ public: /** * The %HitTest() method is called by VisualElement::GetChildAt(). @n - * The %GetChildAt() method traverses through a list of all children, and performs a hit test search at the @c point using this method. - * You can modify hit test search result by overriding this method. + * The %GetChildAt() method traverses through a list of all children, and performs a hit test search at the specified @c point using this method. + * You can modify the hit test search result by overriding this method. * * @since 2.0 * * @return The hit test result * @param[in] target An instance of VisualElement to test * @param[in] point The position of the source to check - * @remarks Hit test results must be one of the following: @n - * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE - * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH + * @remarks Hit test results must be one of the following: + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH * @see VisualElement::GetChildAt() */ virtual HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point) = 0; diff --git a/inc/FUiAnimIVisualElementEventListener.h b/inc/FUiAnimIVisualElementEventListener.h index 18451c0..632c25b 100644 --- a/inc/FUiAnimIVisualElementEventListener.h +++ b/inc/FUiAnimIVisualElementEventListener.h @@ -35,13 +35,14 @@ namespace Tizen { namespace Ui { namespace Animations class VisualElement; /** -* @interface IVisualElementEventListener -* @brief This interface implements the event listener for the events generated by %VisualElement. +* @interface IVisualElementEventListener +* @brief This interface implements the event listener for the events generated by %VisualElement. * * @since 2.0 * -* The %IVisualElementEventListener interface is for receiving events on status change of VisualElement. The class that processes a status change event of %VisualElement -* implements this interface, and the instance created with that class is registered with %VisualElement, using the VisualElement::SetVisualElementEventListener() method. +* The %IVisualElementEventListener interface receives events on status change of VisualElement. The class that processes +* a status change event of %VisualElement implements this interface, and the instance created with that class is registered with +* %VisualElement, using the VisualElement::SetVisualElementEventListener() method. * * For more information on the class features, see Event Handling. * @@ -62,58 +63,56 @@ public: /** * Called when the child is attached to VisualElement. @n - * Overrides the %OnChildAttached() method to provide user-specific code just after the child is attached to the %VisualElement. - * This method is invoked when @c child is attached to @c source by @c AttachChild, @c InsertChild, @c ChangeZOder. + * Overrides the %OnChildAttached() method to provide user-specific code just after the child is attached to %VisualElement. + * This method is invoked when @c child is attached to @c source by invoking VisualElement::AttachChild(), VisualElement::InsertChild(), + * or VisualElement::ChangeZOder(). * * @since 2.0 * * @param[in] parent The parent instance * @param[in] child The child instance - * @see VisualElement::AttachChild() - * @see VisualElement::InsertChild() */ virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0; /** - * Called when the child is detached to VisualElement. @n - * Overrides the %OnChildDetached() method to provide user-specific code just after the child is detached from the %VisualElement. - * This method is invoked when @c child is detached from @c source by @c DetachChild, @c InsertChild, or @c ChangeZOder. + * Called when the child is detached from VisualElement. @n + * Overrides the %OnChildDetached() method to provide user-specific code just after the child is detached from %VisualElement. + * This method is invoked when @c child is detached from @c source by invoking VisualElement::DetachChild(), VisualElement::InsertChild(), + * or VisualElement::ChangeZOder(). * * @since 2.0 * * @param[in] parent The parent instance * @param[in] child The child instance - * @see VisualElement::DetachChild() */ virtual void OnChildDetached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0; /** * Called when VisualElement is attached to the parent. @n - * Overrides the %OnAttached() method to provide user-specific code just after the %VisualElement is attached to the parent. - * This method is invoked when @c source is attached to @c parent by @c AttachChild, @c InsertChild, @c ChangeZOder. + * Overrides the %OnAttached() method to provide user-specific code just after %VisualElement is attached to the parent. + * This method is invoked when @c source is attached to @c parent by invoking VisualElement::AttachChild(), VisualElement::InsertChild(), or + * VisualElement::ChangeZOder(). * * @since 2.0 * * @param[in] child The child instance * @param[in] parent The parent instance - * @see VisualElement::AttachChild() - * @see VisualElement::InsertChild() */ virtual void OnAttached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0; /** - * Called when VisualElement is detached to the parent. @n - * Overrides the %OnDetached() method to provide user-specific code just after the %VisualElement is detached from the parent. - * This method is invoked when @c source is detached from @c parent by @c DetachChild, @c InsertChild, or @c ChangeZOder. + * Called when VisualElement is detached from the parent. @n + * Overrides the %OnDetached() method to provide user-specific code just after %VisualElement is detached from the parent. + * This method is invoked when @c source is detached from @c parent by invoking VisualElement::DetachChild(), VisualElement::InsertChild(), + * or VisualElement::ChangeZOder(). * * @since 2.0 * * @param[in] child The child instance * @param[in] parent The parent instance - * @see VisualElement::DetachChild() */ virtual void OnDetached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0; @@ -121,14 +120,14 @@ public: /** * Called when the transform matrix is about to be changed. @n * Overrides the %OnTransformChanging() method to provide the user-specific code before the transform matrix is changed. - * This method is invoked when the transform matrix of @c source is about to be changed by invoking @c SetTransformMatrix. + * This method is invoked when the transform matrix of @c source is about to be changed by invoking VisualElement::SetTransformMatrix(). * * @since 2.0 * - * @return An error code - * @param[in] source The VisualElement to change + * @return An error code + * @param[in] source VisualElement to change * @param[in,out] newTransform The new transform matrix - * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled. + * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled. */ virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0; @@ -136,11 +135,11 @@ public: /** * Called when the transform matrix is changed. @n * Overrides the %OnTransformChanged() method to provide the user-specific code just after the transform matrix is changed. - * This method is invoked when the transform matrix of @c source is changed by invoking @c SetTransformMatrix. + * This method is invoked when the transform matrix of @c source is changed by invoking VisualElement::SetTransformMatrix(). * * @since 2.0 * - * @param[in] source The VisualElement change applied + * @param[in] source VisualElement with change applied * @param[in] previousTransform The previous transform matrix */ virtual void OnTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0; @@ -149,14 +148,14 @@ public: /** * Called when the children transform matrix is about to be changed. @n * Overrides the %OnChildrenTransformChanging() method to provide user-specific code before the children transform matrix is changed. - * This method is invoked when the children transform matrix of @c source is about to be changed by invoking @c SetChildrenTransformMatrix. + * This method is invoked when the children transform matrix of @c source is about to be changed by invoking VisualElement::SetChildrenTransformMatrix(). * * @since 2.0 * - * @return An error code - * @param[in] source The VisualElement to change + * @return An error code + * @param[in] source VisualElement to change * @param[in,out] newTransform The new transform matrix - * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled. + * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else the operation will be cancelled. */ virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0; @@ -164,11 +163,11 @@ public: /** * Called when the children transform matrix is changed. @n * Overrides the %OnChildrenTransformChanged() method to provide user-specific code just after the children transform matrix is changed. - * This method is invoked when the children transform matrix of @c source is changed by invoking @c SetChildrenTransformMatrix. + * This method is invoked when the children transform matrix of @c source is changed by invoking VisualElement::SetChildrenTransformMatrix(). * * @since 2.0 * - * @param[in] source The VisualElement change applied + * @param[in] source VisualElement with change applied * @param[in] previousTransform The previous transform matrix */ virtual void OnChildrenTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0; @@ -177,14 +176,14 @@ public: /** * Called when the bounds are about to be changed. @n * Overrides the %OnBoundsChanging() method to provide user-specific code before the bounds are changed. - * This method is invoked when the bounds @c source is about to be changed by invoking @c SetBounds. + * This method is invoked when the bounds @c source is about to be changed by invoking VisualElement::SetBounds(). * * @since 2.0 * - * @return An error code - * @param[in] source The VisualElement to change + * @return An error code + * @param[in] source VisualElement to change * @param[in,out] newBounds The new bounds - * @remarks If this method does not return @c E_SUCCESS, @c source is not applied with @c newBounds rectangle. + * @remarks If this method does not return @c E_SUCCESS, @c source is not applied with @c newBounds rectangle. */ virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatRectangle& newBounds) = 0; @@ -192,11 +191,11 @@ public: /** * Called when the bounds are changed. @n * Overrides the %OnBoundsChanged() method to provide user-specific code just after the bounds are changed. - * This method is invoked when the bounds of @c source is changed by invoking @c SetBounds. + * This method is invoked when the bounds of @c source is changed by invoking VisualElement::SetBounds(). * * @since 2.0 * - * @param[in] source The VisualElement change applied + * @param[in] source VisualElement with change applied * @param[in] previousBounds The previous bounds */ virtual void OnBoundsChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatRectangle& previousBounds) = 0; @@ -205,11 +204,11 @@ public: /** * Called when the show state is changed. @n * Overrides the %OnShowStateChanged() method to provide user-specific code when the show state is changed. - * This method is invoked when the show state of @c source is changed by invoking @c SetShowState. + * This method is invoked when the show state of @c source is changed by invoking VisualElement::SetShowState(). * * @since 2.0 * - * @param[in] source An instance whose show state is changed + * @param[in] source VisualElement with change applied * @param[in] previousShowState The previous show state */ virtual void OnShowStateChanged(Tizen::Ui::Animations::VisualElement& source, bool previousShowState) = 0; diff --git a/inc/FUiAnimIntegerAnimation.h b/inc/FUiAnimIntegerAnimation.h index 26930c2..1f7e7e3 100644 --- a/inc/FUiAnimIntegerAnimation.h +++ b/inc/FUiAnimIntegerAnimation.h @@ -52,13 +52,15 @@ public: * * @since 2.0 * - * @param[in] startValue The start value for Integer animation - * @param[in] endValue The end value for Integer animation + * @param[in] startValue The start value for integer animation + * @param[in] endValue The end value for integer animation * @param[in] duration The duration of animation in milliseconds * @param[in] interpolator The type of Interpolation @n * This is used for the intermediate value calculation of the animation. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The value of a specified parameter is negative. + * - The interpolator is of an invalid type. * @remarks The specific error code can be accessed using the GetLastResult() method. */ IntegerAnimation(int startValue, int endValue, long duration, AnimationInterpolatorType interpolator); @@ -78,8 +80,8 @@ public: * @since 2.0 * * @param[in] integerAnimation An instance of %IntegerAnimation - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ IntegerAnimation(const IntegerAnimation& integerAnimation); @@ -90,7 +92,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %IntegerAnimation + * @param[in] rhs An instance of %IntegerAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -99,7 +101,7 @@ public: /** - * Checks whether the specified and current instance of %IntegerAnimation have equal animation values. + * Checks whether the specified instance and the current instance of %IntegerAnimation have equal animation values. * * @since 2.0 * @@ -142,7 +144,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution for all inputs. + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function + * must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -166,7 +169,7 @@ public: /** - * Adds a key frame to the animation. + * Adds a keyframe to the animation. * * @since 2.0 * @@ -176,10 +179,11 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue. - * Also the old duration and @c endValue are added as a new keyframe entry in the list. - * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one. - * @remarks An exception is returned if @c time is equal to @c 0 or the duration of the animation. + * @remarks + * - If the specified @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue. + * Also the old duration and @c endValue are added as a new keyframe entry in the list. + * - If a key-value pair with the current key already exists, the old value is overwritten with the new one. + * - An exception is returned if the specified @c time is equal to @c 0 or the duration of the animation. */ result AddKeyFrame(long time, int value); @@ -190,7 +194,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * The value is sorted in an increasing order of time. * @param[out] time The time stamp at the specified @c index * @param[out] value The value at the specified @c index @@ -210,10 +214,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] time The key frame time + * @param[in] time The keyframe time * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c time value is invalid. - * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List. + * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List. * @exception E_SYSTEM A system error has occurred. */ result RemoveKeyFrame(long time); @@ -225,7 +229,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * The value is sorted in an increasing order of time. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. diff --git a/inc/FUiAnimParallelAnimationGroup.h b/inc/FUiAnimParallelAnimationGroup.h index 51fa212..e148a0a 100644 --- a/inc/FUiAnimParallelAnimationGroup.h +++ b/inc/FUiAnimParallelAnimationGroup.h @@ -88,7 +88,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %ParallelAnimationGroup + * @param[in] rhs An instance of %ParallelAnimationGroup * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -140,7 +140,7 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random * distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -177,7 +177,8 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If an animation is added to a target type that already has an animation associated with it, the old animation is overwritten with the new animation. + * @remarks If an animation is added to a target type that already has an animation associated with it, + * the old animation is overwritten with the new animation. */ result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation); @@ -190,7 +191,7 @@ public: * @return An error code * @param[in] animTarget The animation target * @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 invalid. * @exception E_OBJ_NOT_FOUND The animation with the specified animation target does not exist in the animation group. * @exception E_SYSTEM A system error has occurred. */ diff --git a/inc/FUiAnimPointAnimation.h b/inc/FUiAnimPointAnimation.h index bef61c9..52ce163 100644 --- a/inc/FUiAnimPointAnimation.h +++ b/inc/FUiAnimPointAnimation.h @@ -91,7 +91,7 @@ public: * * @since 2.0 * - * @param[in] pointAnimation An instance of %PointAnimation + * @param[in] pointAnimation An instance of %PointAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -143,8 +143,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random - * distribution for all inputs. + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must + * generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -167,7 +167,7 @@ public: /** - * Adds a key frame to the animation. + * Adds a keyframe to the animation. * * @since 2.0 * @@ -177,10 +177,11 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue. @n - * The old duration and @c endValue are added as a new key frame entry in the list. @n - * If a key-value pair with the current key already exists, then the old value will be overwritten with the new one. @n - * An exception will be returned if time is equal to @c 0 or duration of the animation. + * @remarks + * - If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue. + * The old duration and @c endValue are added as a new keyframe entry in the list. + * - If a key-value pair with the current key already exists, then the old value is overwritten with the new one. + * - An exception is returned if time is equal to @c 0 or duration of the animation. */ result AddKeyFrame(long time, const Tizen::Graphics::Point& value); @@ -191,7 +192,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * The value is sorted in an increasing order of time. * @param[out] time The time stamp at the specified @c index * @param[out] value The value at the specified @c index @@ -211,10 +212,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] time The key frame time + * @param[in] time The keyframe time * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c time value is invalid. - * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List. + * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List. * @exception E_SYSTEM A system error has occurred. */ result RemoveKeyFrame(long time); @@ -226,7 +227,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * The value is sorted in an increasing order of time. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. diff --git a/inc/FUiAnimRectangleAnimation.h b/inc/FUiAnimRectangleAnimation.h index 8767fc0..24bfefc 100644 --- a/inc/FUiAnimRectangleAnimation.h +++ b/inc/FUiAnimRectangleAnimation.h @@ -80,8 +80,8 @@ public: * @since 2.0 * * @param[in] rectangleAnimation An instance of %RectangleAnimation - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ RectangleAnimation(const RectangleAnimation& rectangleAnimation); @@ -92,7 +92,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %RectangleAnimation + * @param[in] rhs An instance of %RectangleAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -144,7 +144,7 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random * distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -202,7 +202,7 @@ public: /** - * Adds a key frame to the animation. + * Adds a keyframe to the animation. * * @since 2.0 * @@ -215,7 +215,7 @@ public: * @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new end value. @n * Also, the old duration and end value are added as a new keyframe entry in the list. * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one. - * @remarks An exception is returned if @c time is equal to @c 0 or the duration of the animation. + * @remarks An exception is returned if @c time is equal to @c 0 or equal to the duration of the animation. */ result AddKeyFrame(long time, const Tizen::Graphics::Rectangle& value); @@ -226,7 +226,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * This is sorted in an increasing order of time. * @param[out] time The time stamp at the specified @c index * @param[out] value The value at the specified @c index @@ -246,10 +246,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] time The key frame time + * @param[in] time The keyframe time * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c time value is invalid. - * @exception E_OBJ_NOT_FOUND The time passed is not found in the KeyFrame list. + * @exception E_OBJ_NOT_FOUND The time passed is not found in the keyframe list. * @exception E_SYSTEM A system error has occurred. */ result RemoveKeyFrame(long time); @@ -261,7 +261,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The index value in the Keyframe list @n + * @param[in] index The index value in the keyframe list @n * This is sorted in an increasing order of time. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. @@ -315,7 +315,7 @@ public: * * @since 2.0 * - * @return The start value + * @return The start value */ Tizen::Graphics::Rectangle GetStartValue(void) const; diff --git a/inc/FUiAnimRotateAnimation.h b/inc/FUiAnimRotateAnimation.h index 0c06f72..8e5ed87 100644 --- a/inc/FUiAnimRotateAnimation.h +++ b/inc/FUiAnimRotateAnimation.h @@ -56,10 +56,11 @@ public: * @since 2.0 * * @param[in] startValue The start value for the rotate animation @n - * If the value is positive, the control is rotated in the clockwise direction and if the value is negative, the control - * is rotated in the anti-clockwise direction. + * If the value is positive, the control is rotated in the clockwise direction and if the + * value is negative, the control is rotated in the anti-clockwise direction. * @param[in] endValue The end value for the rotate animation @n - * The value must be @c 0 or @c 360, else ControlAnimator::ControlAnimator() returns an @c E_INVALID_ARG exception. + * The value must be @c 0 or @c 360, else ControlAnimator::ControlAnimator() returns an + * @c E_INVALID_ARG exception. * @param[in] duration The duration of animation in milliseconds * @param[in] interpolator The type of interpolator @n * This is used for the intermediate value calculation of the animation. @@ -84,8 +85,8 @@ public: * @since 2.0 * * @param[in] rotateAnimation An instance of %RotateAnimation - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ RotateAnimation(const RotateAnimation& rotateAnimation); @@ -96,7 +97,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %RotateAnimation + * @param[in] rhs An instance of %RotateAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -119,7 +120,7 @@ public: /** * Checks whether the specified instance and the current instance of %RotateAnimation have different animation values. * - * @since 2.0 + * @since 2.0 * * @return @c true if the values of the animations of the two instances of %RotateAnimation are not equal, @n * else @c false @@ -136,7 +137,8 @@ public: * @return @c true if the value of the current instance is equal to the value of the specified instance, @n * else @c false * @param[in] obj An instance of %RotateAnimation - * @remarks The %RotateAnimation class has a semantic value. This means that this method checks whether the two instances have the same animation. + * @remarks The %RotateAnimation class has a semantic value. This means that this method checks whether the + * two instances have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -147,8 +149,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random - * distribution for all inputs. + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function + * must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; diff --git a/inc/FUiAnimSequentialAnimationGroup.h b/inc/FUiAnimSequentialAnimationGroup.h index c8a085c..fa6f5d3 100644 --- a/inc/FUiAnimSequentialAnimationGroup.h +++ b/inc/FUiAnimSequentialAnimationGroup.h @@ -77,8 +77,8 @@ public: * @since 2.0 * * @param[in] animationGroup An instance of %SequentialAnimationGroup - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ SequentialAnimationGroup(const SequentialAnimationGroup& animationGroup); @@ -89,7 +89,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %SequentialAnimationGroup + * @param[in] rhs An instance of %SequentialAnimationGroup * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -141,8 +141,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random - * distribution for all inputs. + * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must + * generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; @@ -194,7 +194,8 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks If an animation is added to the same index which already has an animation associated with it, the old animation will be overwritten with the new one. + * @remarks If an animation is added to the same index which already has an animation associated with it, + * the old animation will be overwritten with the new one. */ result SetAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation); diff --git a/inc/FUiAnimTypes.h b/inc/FUiAnimTypes.h index 3db54bc..ec23a60 100644 --- a/inc/FUiAnimTypes.h +++ b/inc/FUiAnimTypes.h @@ -95,8 +95,10 @@ enum AnimationTargetType ANIMATION_TARGET_NONE = -1, /**< An invalid %Animation */ ANIMATION_TARGET_SIZE, /**< An animation for the size property */ ANIMATION_TARGET_POSITION, /**< An animation for the position property */ - ANIMATION_TARGET_ALPHA, /**< An animation for alpha property @n The value range for playing the alpha animation must be between @c 0.0 to @c 1.0. */ - ANIMATION_TARGET_ROTATION, /**< An animation for rotate property @n The control will be rotated in the xy-plane along the z-axis. */ + ANIMATION_TARGET_ALPHA, /**< An animation for alpha property @n + The value range for playing the alpha animation must be between @c 0.0 to @c 1.0. */ + ANIMATION_TARGET_ROTATION, /**< An animation for rotate property @n + The control will be rotated in the xy-plane along the z-axis. */ ANIMATION_TARGET_MAX // This enum value is for internal use only. // Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. }; @@ -155,7 +157,7 @@ enum ControlAnimatorTriggerType ANIMATION_TRIGGER_USER = 0, /**< The animation attached to a control is explicitly triggered by the user */ ANIMATION_TRIGGER_POSITION_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the position of the control */ ANIMATION_TRIGGER_SIZE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the size of the control */ - ANIMATION_TRIGGER_SHOW_STATE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the showstate of the control */ + ANIMATION_TRIGGER_SHOW_STATE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the show state of the control */ }; diff --git a/inc/FUiAnimVisualElement.h b/inc/FUiAnimVisualElement.h index e375000..fded062 100644 --- a/inc/FUiAnimVisualElement.h +++ b/inc/FUiAnimVisualElement.h @@ -58,14 +58,16 @@ class _VisualElementImpl; * It encapsulates properties about coordinates (bounds, transform matrix, children transform matrix and so on), * contents (content bounds, clipping, opacity, show state and so on) and tree-hierarchy. * It also provides infrastructure necessary for animations (AddAnimation(), RemoveAnimation() and so on). - * A %VisualElement object instantiated by applications works as a model object and may have a cloned counter part for presentation on screen which has a separated life-cycle. - * The presentation object is managed by system and applications must not change properties of it. - * Use the presentation instance only to get the current state of a visual element in a tree. Calling the setter methods of a presentation instance can cause unexpected behavior to occur. - * Most animations of %VisualElement are applied on presentation objects. Properties set by applications are stored in model objects while properties of presentation objects - * are changing during implicit or explicit animations. + * A %VisualElement object instantiated by applications works as a model object and may have a cloned counter part for presentation on screen which has a + * separate life-cycle. + * The presentation object is managed by system and applications must not change its properties. + * Use the presentation instance only to get the current state of a visual element in a tree. Calling the setter methods of a presentation instance + * can cause unexpected behavior to occur. + * Most animations of %VisualElement are applied on presentation objects. Properties set by applications are stored in model objects while properties of + * presentation objects are changing during implicit or explicit animations. * - * This class also provides interfaces such as IVisualElementContentProvider, IVisualElementEventListener, and IVisualElementAnimationProvider to override default behaviors - * without inheritances. + * This class also provides interfaces such as IVisualElementContentProvider, IVisualElementEventListener, and IVisualElementAnimationProvider + * to override the default behavior without inheritances. * * For more information on the class features, see Visual Elements. * @@ -112,7 +114,7 @@ public: /** - * The object is not fully constructed after this constructor is called. + * The object is not fully constructed after this constructor is called.@n * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 @@ -136,11 +138,11 @@ public: * @since 2.0 * * @remarks This method must be used to destroy this instance. @n - * Do not use @c delete operator. + * Do not use the @c delete operator. * @remarks This method first destroys children, and then it destroys the parent(this instance). * @remarks This method will call OnDestructing() callback before deallocating the instance. * @remarks The destructing sequence is as follows: - * 1. Destroy children recursively. + * 1. Destroys children recursively. * 2. Calls %OnDestructing() callback. * 3. Detaches from parent. * 4. Removes all animations associated with this instance. @@ -158,9 +160,8 @@ public: * @param[in] pProvider The animation provider to create implicit animations * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This instance does not allow to set an animation provider. @n - * The animation provider can be set to the model instance only. + * The animation provider can be set to the model instance only. * - * @see IVisualElementAnimationProvider * @see GetAnimationProvider() */ result SetAnimationProvider(IVisualElementAnimationProvider* pProvider); @@ -172,9 +173,8 @@ public: * * @return The animation provider * @exception E_INVALID_OPERATION This instance does not allow to get an animation provider. @n - * The animation provider can be set to the model instance only. + * The animation provider can be set to the model instance only. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see IVisualElementAnimationProvider * @see SetAnimationProvider() */ IVisualElementAnimationProvider* GetAnimationProvider(void) const; @@ -188,8 +188,7 @@ public: * @param[in] pProvider The content provider to customize information on content * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This instance does not allow to set a content provider. @n - * The content provider can be set to the model instance only. - * @see IVisualElementContentProvider + * The content provider can be set to the model instance only. * @see GetContentProvider() */ result SetContentProvider(IVisualElementContentProvider* pProvider); @@ -201,9 +200,8 @@ public: * * @return The content provider * @exception E_INVALID_OPERATION This instance does not allow to get content provider. @n - * The content provider can be set to the model instance only. + * The content provider can be set to the model instance only. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see IVisualElementContentProvider * @see SetContentProvider() */ IVisualElementContentProvider* GetContentProvider(void) const; @@ -217,8 +215,7 @@ public: * @param[in] pListener The %VisualElement event listener * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This instance does not allow to set an event listener. @n - * The event listener can be set to the model instance only. - * @see IVisualElementEventListener + * The event listener can be set to the model instance only. * @see GetVisualElementEventListener() */ result SetVisualElementEventListener(IVisualElementEventListener* pListener); @@ -230,9 +227,8 @@ public: * * @return The %VisualElement event listener * @exception E_INVALID_OPERATION This instance does not allow to get an event listener. @n - * The event listener can be set to the model instance only. + * The event listener can be set to the model instance only. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see IVisualElementEventListener * @see SetVisualElementEventListener() */ IVisualElementEventListener* GetVisualElementEventListener(void) const; @@ -321,12 +317,12 @@ public: virtual VisualElementAnimation* OnCreateAnimationForProperty(const Tizen::Base::String& property); /** - * Overrides the %OnGetPropertyRequested() method to provide user-specific properties or to change default behaviors of %VisualElement class. @n + * Overrides the %OnGetPropertyRequested() method to provide user-specific properties or to change the default behavior of the %VisualElement class. @n * This method is called whenever GetProperty() is called. * * @since 2.0 * - * @return The property's value + * @return The property value * @param[in] property The property name * @see SetProperty() * @see GetProperty() @@ -401,9 +397,9 @@ public: * @return @c true if this instance is a child or descendant of a specified one, @n * else @c false * @param[in] pOther A pointer to %VisualElement instance to check its relationship - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c pOther is @c null. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pOther is @c null. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ bool IsChildOf(const VisualElement* pOther) const; @@ -423,7 +419,6 @@ public: * - The specified @c child is not instantiated successfully. @n * - The specified @c child is this instance. @n * - The specified @c child is already an ancestor of this instance. - * @see SetZOrderGroup() * @see InsertChild() * @see DetachChild() * @see ChangeZOrder() @@ -445,7 +440,6 @@ public: * - The specified @c pChild is this instance. @n * - The specified @c pChild is already an ancestor of this instance.@n * - The specified @c pChild is @c null. - * @see SetZOrderGroup() * @see InsertChild() * @see DetachChild() * @see ChangeZOrder() @@ -537,9 +531,9 @@ public: * * @return An error code * @param[in] pChild A pointer to %VisualElement instance to detach - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The specified @c pChild is not a child of this instance. - * @exception E_INVALID_ARG The specified @c pChild is @c null. + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The specified @c pChild is not a child of this instance. + * @exception E_INVALID_ARG The specified @c pChild is @c null. * @remarks This method detaches @c pChild from this instance. To deallocate %VisualElement, call Destroy() method, and not C++ delete. * @see InsertChild() * @see AttachChild() @@ -581,9 +575,10 @@ public: * @param[in] searchDescendants @c true to find a match among all the descendants of this instance, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND There is no %VisualElement with the specified @c name. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c null. + * @exception E_OBJ_NOT_FOUND There is no %VisualElement with the specified @c name. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If an exception occurs, this method returns @c null. * @see GetName() * @see SetName() */ @@ -601,11 +596,11 @@ public: * @param[in] point The position in coordinate space of this instance * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND There is no %VisualElement containing the specified @c point. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c null. - * @remarks This method assumes that all ancestors of this instance do not clip children. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If an exception occurs, this method returns @c null. + * - This method assumes that all ancestors of this instance do not clip children. * @see IVisualElementContentProvider::HitTest() - * @see OnHitTest() * @see IsClipChildrenEnabled() * @see SetClipChildrenEnabled() */ @@ -638,7 +633,7 @@ public: * @param[in] animation The animation instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The input parameter is incorrect. - * @exception E_OBJ_ALREADY_EXIST An animation with @c keyName already exists. + * @exception E_OBJ_ALREADY_EXIST An animation with the specified @c keyName already exists. * @exception E_INVALID_OPERATION This instance is not a model object. @n * An animation can be added to the model instance only. * @see RemoveAnimation() @@ -654,7 +649,7 @@ public: * @return An error code * @param[in] keyName The name of the animation to remove * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND An animation with @c keyName does not exist. + * @exception E_OBJ_NOT_FOUND An animation with the specified @c keyName does not exist. * @see AddAnimation() * @see GetAnimationN() */ @@ -668,7 +663,7 @@ public: * @return A pointer to the animation * @param[in] keyName The name of the animation * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND An animation with @c keyName does not exist. + * @exception E_OBJ_NOT_FOUND An animation with the specified @c keyName does not exist. * @remarks The specific error code can be accessed using the GetLastResult() method. * @remarks If an exception occurs, this method returns @c null. * @see AddAnimation() @@ -723,7 +718,7 @@ public: * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This instance is not attached to the maintained tree for displaying. @n - * For displaying, this instance should be descendant of the root %VisualElement. + * For displaying, this instance should be descendant of the root %VisualElement. * @exception E_SYSTEM A system error has occurred. * @see IVisualElementContentProvider */ @@ -751,14 +746,14 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n - The canvas can be created for the model instance only. - * @remarks This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using this method, - * if the size or position of the %VisualElement is changed. @n - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c null. + * The canvas can be created for the model instance only. + * @remarks + * - This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement. + * It is the developer's responsibility to deallocate the canvas after use. + * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using this method, + * if the size or position of the %VisualElement is changed. @n + * - The specific error code can be accessed using the GetLastResult() method. * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) * @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) */ @@ -775,19 +770,19 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n - The canvas can be created for the model instance only. + * The canvas can be created for the model instance only. * @exception E_OUT_OF_RANGE The specified @c bounds do not intersect with the bounds of the %VisualElement. @n * The width and height must be greater than or equal to @c 0. - * @remarks Only the graphic canvas of displayable %VisualElement can be obtained. - * If the specified area is not inside the %VisualElement, - * the graphics canvas of overlapped area between the %VisualElement and the specified @c bound is returned. @n - * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using this method, - * if the size or position of the control is changed. @n - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c null. + * @remarks + * - Only the graphic canvas of displayable %VisualElement can be obtained. + * If the specified area is not inside the %VisualElement, + * the graphics canvas of overlapped area between the %VisualElement and the specified @c bound is returned. @n + * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement. + * It is the developer's responsibility to deallocate the canvas after use. + * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using this method, + * if the size or position of the control is changed. @n + * - The specific error code can be accessed using the GetLastResult() method. * @see GetCanvasN() * @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) */ @@ -804,19 +799,19 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n - The canvas can be created for the model instance only. + * The canvas can be created for the model instance only. * @exception E_OUT_OF_RANGE The specified @c bounds do not intersect with the bounds of %VisualElement. @n * The width and height must be greater than or equal to @c 0. - * @remarks Only the graphic canvas of displayable %VisualElement can be obtained. - * If the specified area is not inside %VisualElement, - * the graphics canvas of overlapped area between %VisualElement and the specified @c bound is returned. @n - * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of %VisualElement. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using this method, - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c null. + * @remarks + * - Only the graphic canvas of displayable %VisualElement can be obtained. + * If the specified area is not inside %VisualElement, + * the graphics canvas of overlapped area between %VisualElement and the specified @c bound is returned. @n + * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of %VisualElement. + * It is the developer's responsibility to deallocate the canvas after use. + * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using this method, + * if the size or position of the control is changed. + * - The specific error code can be accessed using the GetLastResult() method. * @see GetCanvasN() * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) */ @@ -846,13 +841,14 @@ public: * * @since 2.0 * - * @return The value of the specified property + * @return The value of the specified property, @n + * else @c Variant::NULL_VARIANT if an exception occurs * @param[in] property The %VisualElement's property * @exception E_SUCCESS The method is successful. * @exception E_KEY_NOT_FOUND The specified @c property is not found. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an exception occurs, this method returns @c Variant::NULL_VARIANT. - * @remarks Additional exceptions can occur according to the behavior of subclasses. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - Additional exceptions can occur according to the behavior of subclasses. * @see SetProperty() * @see OnGetPropertyRequested() */ @@ -947,7 +943,8 @@ public: * @param[in] bounds The new bounds of this instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This instance is in an invalid state. - * @remarks When the size of @c bounds is changed, the entire content area will be added to the update region of this instance if redraw-on-resize feature is enabled. + * @remarks When the size of @c bounds is changed, the entire content area will be added to the update region of this instance + * if redraw-on-resize feature is enabled. * @see GetBounds() * @see IsRedrawOnResizeEnabled() * @see SetRedrawOnResizeEnabled() @@ -1259,7 +1256,7 @@ public: * The matrix for this conversion is singular that has a zero determinant. * @remarks This instance and @c pFromVisualElement must share a common ancestor. @n * If @c null, it is regarded that @c point is in the root coordinate space. - * @see ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) + * @see ConvertCoordinates() */ result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) const; @@ -1278,7 +1275,7 @@ public: * The matrix for this conversion is singular that has a zero determinant. * @remarks This instance and @c pFromVisualElement must share a common ancestor. @n * If @c null, it is regarded that @c rectangle is in the root coordinate space. - * @see ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) + * @see ConvertCoordinates() */ result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) const; @@ -1288,13 +1285,13 @@ public: * @since 2.1 * * @return The transformed vector - * @param[in] originPoint The point in @c pOriginVisualElement coordinate space + * @param[in] originPoint The point in @c pOriginVisualElement coordinate space * @param[in] pOriginVisualElement The %VisualElement instance with @c originPoint in its coordinate space - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The input parameter is incorrect. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - The matrix for this conversion is singular which has zero determinant. - * @remarks + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The matrix for this conversion is singular which has zero determinant. + * @remarks * - This instance and @c pOriginVisualElement must share a common ancestor. * - The specific error code can be accessed using the GetLastResult() method. */ @@ -1306,11 +1303,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] contentBounds The sub-rectangle of contents to display in uniform coordinate space + * @param[in] contentBounds The sub-rectangle of contents to display in uniform coordinate space @n + * The default value is FloatRectangle(0.0, 0.0, 1.0, 1.0). * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The width and height of @c contentBounds must be greater than @c 0.0. - * @remarks Default @c contentBounds is FloatRectangle(0.0, 0.0, 1.0, 1.0). - * @remarks If each component of @c contentBounds is not within the range [0.0, 1.0], the integer portion of the coordinates are + * @remarks If each component of @c contentBounds is not within the range [0.0, 1.0], the integer portion of the coordinates are * ignored and only fractional part is used which creates a repeating contents. * @see GetContentBounds() */ @@ -1328,7 +1325,7 @@ public: Tizen::Graphics::FloatRectangle GetContentBounds(void) const; /** - * Acquires the %VisualElement instance for display. + * Acquires a %VisualElement instance for display. * * @since 2.0 * @@ -1339,7 +1336,7 @@ public: const VisualElement* AcquirePresentationInstance(void); /** - * Releases the %VisualElement instance for display. + * Releases a %VisualElement instance for display. * * @since 2.0 * @@ -1349,7 +1346,7 @@ public: void ReleasePresentationInstance(void); /** - * Acquires the %VisualElement instance for model. + * Acquires a %VisualElement instance for model. * * @since 2.0 * @@ -1361,7 +1358,7 @@ public: const VisualElement* AcquireModelInstance(void); /** - * Releases the %VisualElement instance for model. + * Releases a %VisualElement instance for model. * * @since 2.0 * diff --git a/inc/FUiAnimVisualElementAnimation.h b/inc/FUiAnimVisualElementAnimation.h index f99dba8..51aec57 100644 --- a/inc/FUiAnimVisualElementAnimation.h +++ b/inc/FUiAnimVisualElementAnimation.h @@ -78,7 +78,7 @@ public: * * @since 2.0 * - * @param[in] animation An instance of %VisualElementAnimation + * @param[in] animation An instance of %VisualElementAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -128,7 +128,8 @@ public: * @return @c true if the value of the current instance equals the value of the specified instance, @n * else @c false * @param[in] obj An instance of %VisualElementAnimation - * @remarks The %VisualElementAnimation class has a semantic value which means that this method checks whether the two instances have the same animation. + * @remarks The %VisualElementAnimation class has a semantic value which means that this method checks whether the two + * instances have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -139,19 +140,19 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. - * For better performance, the used hash function must generate a random distribution for all inputs. + * @remarks The two equal instances must return the same hash value.@n + * For better performance, the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; /** - * Gets the copied instance of the class. + * Gets a copied instance of the class. * * @since 2.0 * - * @return An instance of %VisualElementAnimation - * @exception E_SUCCESS The method is successful. + * @return An instance of %VisualElementAnimation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ @@ -165,8 +166,9 @@ public: * @since 2.0 * * @param[in] pListener The listener instance to set - * @remarks When the animation that is listening to an animation status event is removed before it starts, the platform skips to call @n - * the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. + * @remarks When the animation that is listening to an animation status event is removed before it starts, the platform + * skips to call the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and + * directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. */ void SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener); @@ -200,8 +202,8 @@ public: * * @since 2.0 * - * @return A pointer to the timing function instance - * If timing function has not been set, the default timing function is returned. + * @return A pointer to the timing function instance @n + * If the timing function has not been set, the default timing function is returned. * @see SetTimingFunction() */ const IVisualElementAnimationTimingFunction* GetTimingFunction(void) const; @@ -224,8 +226,8 @@ public: * * @since 2.0 * - * @return A pointer to the interpolator instance - * If interpolator has not been set, the default interpolator is returned. + * @return A pointer to the interpolator instance @n + * If the interpolator has not been set, the default interpolator is returned. * @see SetValueInterpolator() */ const IVisualElementAnimationValueInterpolator* GetValueInterpolator(void) const; @@ -239,7 +241,7 @@ public: * @return An error code * @param[in] milliseconds The duration of the animation in milliseconds * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation. + * @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation. * @see GetDuration() */ result SetDuration(long milliseconds); @@ -258,17 +260,17 @@ public: /** * Sets the offset value of the animation. @n - * Additionally, the %SetOffset() alters the start value and duration for which an animation is played. + * Additionally, %SetOffset() alters the start value and duration for which an animation is played. * * @since 2.0 * - * @return An error code - * @param[in] milliseconds The offset of the animation in milliseconds + * @return An error code + * @param[in] milliseconds The offset of the animation in milliseconds * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation. + * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation. * @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms, * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n - * If @c autoReverse is set to @c true, the backward animation plays for @c 100ms, from @c 1.0 to @c 0.0. + * If @c autoReverse is set to @c true, the backward animation plays for @c 100ms, from @c 1.0 to @c 0.0. * @see GetOffset() */ result SetOffset(long milliseconds); @@ -293,9 +295,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] milliseconds The delay for the animation to start in milliseconds + * @param[in] milliseconds The delay for the animation to start in milliseconds * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative. + * @exception E_INVALID_ARG The value of the specified parameter is negative. * @remarks This method does not alter the start, end, and duration values of the animation. * @see GetDelay() */ @@ -323,7 +325,7 @@ public: * @return An error code * @param[in] count The number of times the animation is repeated * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is negative. + * @exception E_INVALID_ARG The value of the specified parameter is negative. * @remarks A delay and offset is applied to an animation only when the animation is played for the first time. * If @c count is set to @c 0, the animation is repeated indefinitely. * @see GetRepeatCount() @@ -344,7 +346,7 @@ public: /** - * Sets the @c autoReverse property of the animation. @n + * Sets the auto reverse state of the animation. @n * If enabled, the forward and backward animation can also be played. * * @since 2.0 @@ -381,7 +383,7 @@ public: * @return An error code * @param[in] scaleRatio The scale ratio value of the animation * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The value of the specified parameter is below @c 0. + * @exception E_INVALID_ARG The value of the specified parameter is below @c 0. * @remarks If @c scaleRatio is @c 0.5, then the animation speed is 2 times faster. * @see GetScaleRatio() */ @@ -427,12 +429,13 @@ public: * * @since 2.0 * - * @return The specified timing function - * @param[in] name The timing function name + * @return The specified timing function + * @param[in] name The timing function name @n + * This value must be "Linear", "EaseIn", "EaseOut", "EaseInOut", "EaseOutIn", "Discrete", "Bezier", + * "ExpIn", "ExpOut", "EaseElasticIn", or "EaseElasticOut". * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @remarks The parameter @c name must be "Linear", "EaseIn", "EaseOut", "EaseInOut", "EaseOutIn", "Discrete", "Bezier", "ExpIn", "ExpOut", "EaseElasticIn", or "EaseElasticOut". - * The specific error code can be accessed using the GetLastResult() method. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ static const IVisualElementAnimationTimingFunction* GetTimingFunctionByName(const Tizen::Base::String& name); diff --git a/inc/FUiAnimVisualElementAnimationGroup.h b/inc/FUiAnimVisualElementAnimationGroup.h index 2f05a0c..3d4d06f 100644 --- a/inc/FUiAnimVisualElementAnimationGroup.h +++ b/inc/FUiAnimVisualElementAnimationGroup.h @@ -86,7 +86,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %VisualElementAnimationGroup + * @param[in] rhs An instance of %VisualElementAnimationGroup * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -99,8 +99,8 @@ public: * * @since 2.0 * - * @return @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n - * else @c false + * @return @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementAnimationGroup */ bool operator ==(const VisualElementAnimationGroup& rhs) const; @@ -111,8 +111,8 @@ public: * * @since 2.0 * - * @return @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n - * else @c false + * @return @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementAnimationGroup */ bool operator !=(const VisualElementAnimationGroup& rhs) const; @@ -123,10 +123,11 @@ public: * * @since 2.0 * - * @return @c true if the value of the current instance equals the value of the specified instance, @n - * else @c false + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false * @param[in] obj An instance of %VisualElementAnimationGroup - * @remarks The %VisualElementAnimationGroup class has a semantic value that means this method checks whether the two instances have the same animation. + * @remarks The %VisualElementAnimationGroup class has a semantic value that means this method checks whether the two + * instances have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -136,19 +137,19 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. - * For better performance, the used hash function must generate a random distribution for all inputs. + * @return The hash value of the current instance + * @remarks The two equal instances must return the same hash value.@n + * For better performance, the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; /** - * Gets the copied instance of the class. + * Gets a copied instance of the class. * * @since 2.0 * - * @return An instance of VisualElementAnimation - * @exception E_SUCCESS The method is successful. + * @return An instance of VisualElementAnimation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ @@ -160,9 +161,9 @@ public: * * @since 2.0 * - * @return The total number of animations stored in a group - * @remarks If an error occurs, the return value is @c -1. @n - * An element of %VisualElementAnimationGroup is counted as one. + * @return The total number of animations stored in a group, @n + * else @c -1 if an error occurs + * @remarks An element of %VisualElementAnimationGroup is counted as one. */ int GetAnimationCount(void) const; @@ -172,9 +173,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] animation An instance of VisualElementAnimation - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] animation An instance of VisualElementAnimation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @see RemoveAnimationAt() */ @@ -186,9 +187,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] index The index of the animation - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] index The index of the animation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_OBJ_NOT_FOUND The specified @c index is not found. * @see AddAnimation() @@ -212,15 +213,16 @@ public: * * @since 2.0 * - * @return An animation for the specified @c index in the animation group, @n - * else @c null if the animation does not exist - * @param[in] index The index of the animation - * @exception E_SUCCESS The method is successful. + * @return An animation for the specified @c index in the animation group, @n + * else @c null if the animation does not exist + * @param[in] index The index of the animation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_OBJ_NOT_FOUND The animation is not found. - * @remarks The specific error code can be accessed using the GetLastResult() method. @n - * This method allocates a Tizen::Ui::Animations::VisualElementAnimation. - * It is the developer's responsibility to deallocate the animation after use. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This method allocates a Tizen::Ui::Animations::VisualElementAnimation. + * It is the developer's responsibility to deallocate the animation after use. * @see AddAnimation() * @see RemoveAnimationAt() * @see RemoveAllAnimations() diff --git a/inc/FUiAnimVisualElementAnimationProvider.h b/inc/FUiAnimVisualElementAnimationProvider.h index 0d2253c..7e1ef27 100644 --- a/inc/FUiAnimVisualElementAnimationProvider.h +++ b/inc/FUiAnimVisualElementAnimationProvider.h @@ -38,7 +38,8 @@ namespace Tizen { namespace Ui { namespace Animations * * @since 2.0 * -* The %VisualElementAnimationProvider class customizes the implicit animations. The class that needs to override default implicit animations must implement this interface, and +* The %VisualElementAnimationProvider class customizes the implicit animations. The class that needs to override default +* implicit animations must implement this interface, and * the instance created with that class is registered with VisualElement, using the VisualElement::SetAnimationProvider() method. * When the properties defined in %VisualElement and its descendants are changed, the CreateAnimationForProperty() method of this interface is invoked. */ diff --git a/inc/FUiAnimVisualElementContentProvider.h b/inc/FUiAnimVisualElementContentProvider.h index f550b48..f159a98 100644 --- a/inc/FUiAnimVisualElementContentProvider.h +++ b/inc/FUiAnimVisualElementContentProvider.h @@ -43,8 +43,8 @@ class VisualElement; * * @since 2.0 * -* The %VisualElementContentProvider class provides the content and information on it. The class that needs to customize content must implement this interface, and -* using the VisualElement::SetContentProvider() method register to the VisualElement. +* The %VisualElementContentProvider class provides the content and information on it. The class that needs to customize content +* must implement this interface, and using the VisualElement::SetContentProvider() method register with VisualElement. * This class implements IVisualElementContentProvider for the default operation of the contents. */ class _OSP_EXPORT_ VisualElementContentProvider @@ -68,12 +68,12 @@ public: public: /** - * Checks whether the %PrepareDraw() method is invoked by UI framework before DrawContent() is called. @n + * Checks whether the %PrepareDraw() method is invoked by the UI framework before DrawContent() is called. @n * If this method returns @c true, VisualElement can call the %DrawContent() method. * * @since 2.0 * - * @return @c true if DrawContent() can be called, @n + * @return @c true if DrawContent() can be called, @n * else @c false * @param[in] target The VisualElement instance to check */ @@ -95,15 +95,16 @@ public: /** * The %HitTest() method is called by VisualElement::GetChildAt(). @n - * The %VisualElement::GetChildAt() method traverses through a list of all the children, and performs a hit test search at the @c point using this method. @n - * You can modify hit test search result by overriding this method. + * The %VisualElement::GetChildAt() method traverses through a list of all the children, and performs a hit test search + * at the specified @c point using this method. @n + * You can modify the hit test search result by overriding this method. * * @since 2.0 * * @return The hit test result * @param[in] target The VisualElement target to test * @param[in] point The position of source to check - * @remarks Hit test results must be one of the following: @n + * @remarks Hit test results must be one of the following: * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH * @see VisualElement::GetChildAt() diff --git a/inc/FUiAnimVisualElementPropertyAnimation.h b/inc/FUiAnimVisualElementPropertyAnimation.h index dd7a767..47d12ba 100644 --- a/inc/FUiAnimVisualElementPropertyAnimation.h +++ b/inc/FUiAnimVisualElementPropertyAnimation.h @@ -71,7 +71,7 @@ public: * * @since 2.0 * - * @param[in] animation An instance of %VisualElementPropertyAnimation + * @param[in] animation An instance of %VisualElementPropertyAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -84,7 +84,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %VisualElementPropertyAnimation + * @param[in] rhs An instance of %VisualElementPropertyAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -97,8 +97,8 @@ public: * * @since 2.0 * - * @return @c true if the animation of the two instances of %VisualElementPropertyAnimation are equal, @n - * else @c false + * @return @c true if the animation of the two instances of %VisualElementPropertyAnimation are equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementPropertyAnimation */ bool operator ==(const VisualElementPropertyAnimation& rhs) const; @@ -109,8 +109,8 @@ public: * * @since 2.0 * - * @return @c true if the values of the animations of the two instances of %VisualElementPropertyAnimation are not equal, @n - * else @c false + * @return @c true if the values of the animations of the two instances of %VisualElementPropertyAnimation are not equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementPropertyAnimation */ bool operator !=(const VisualElementPropertyAnimation& rhs) const; @@ -121,10 +121,11 @@ public: * * @since 2.0 * - * @return @c true if the value of the current instance equals the value of the specified instance, @n - * else @c false + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false * @param[in] obj An instance of %VisualElementPropertyAnimation - * @remarks The %VisualElementPropertyAnimation class has a semantic value that means this method checks whether the two instances have the same animation. + * @remarks The %VisualElementPropertyAnimation class has a semantic value that means this method checks + * whether the two instances have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -134,20 +135,20 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. + * @return The hash value of the current instance + * @remarks The two equal instances must return the same hash value.@n * For better performance, the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; /** - * Gets the copied instance of the class. + * Gets a copied instance of the class. * * @since 2.0 * - * @return An instance of VisualElementAnimation - * @exception E_SUCCESS The method is successful. + * @return An instance of VisualElementAnimation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ @@ -159,9 +160,9 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] property The property name to which the animation is applied - * @exception E_SUCCESS The method is successful. + * @return An error code + * @param[in] property The property name to which the animation is applied + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @see GetPropertyName() */ diff --git a/inc/FUiAnimVisualElementSurface.h b/inc/FUiAnimVisualElementSurface.h index c14bdd5..3d4ead3 100644 --- a/inc/FUiAnimVisualElementSurface.h +++ b/inc/FUiAnimVisualElementSurface.h @@ -68,8 +68,9 @@ public: * * @param[in] rhs An instance of %VisualElementSurface * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks It does not perform a deep copy (shared with the source). + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - It does not perform a deep copy (shared with the source). */ VisualElementSurface(const VisualElementSurface& rhs); @@ -80,8 +81,9 @@ public: * * @param[in] rhs An instance of %VisualElementSurface * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks It does not perform a deep copy (shared with the source). + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - It does not perform a deep copy (shared with the source). */ VisualElementSurface& operator =(const VisualElementSurface& rhs); @@ -105,9 +107,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG The display context is invalid. - * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. - * @remarks If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned. - * @see Tizen::Ui::Window::GetDisplayContext() + * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. @n + * If this condition is not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @see Window::GetDisplayContext() */ result Construct(const DisplayContext& displayContext, const Tizen::Graphics::Dimension& size); @@ -122,14 +124,14 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG The display context is invalid. - * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. - * @remarks If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned. - * @see Tizen::Ui::Window::GetDisplayContext() + * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. @n + * If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned. + * @see Window::GetDisplayContext() */ result Construct(const DisplayContext& displayContext, const Tizen::Graphics::FloatDimension& size); /** - * Gets the buffer-related information of the %VisualElementSurface instance. + * Gets the buffer-related information of a %VisualElementSurface instance. * * @since 2.0 * @@ -141,36 +143,36 @@ public: result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; /** - * Gets the size of the %VisualElementSurface instance. + * Gets the size of a %VisualElementSurface instance. * * @since 2.0 * - * @return The size of the %VisualElementSurface instance + * @return The size of the %VisualElementSurface instance, @n + * else Tizen::Graphics::Dimension(0, 0) if an error occurs * @exception E_SUCCESS The method is successful. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0). */ Tizen::Graphics::Dimension GetSize(void) const; /** - * Gets the size of the %VisualElementSurface instance. + * Gets the size of a %VisualElementSurface instance. * * @since 2.1 * - * @return The size of the %VisualElementSurface instance + * @return The size of the %VisualElementSurface instance, @n + * else Tizen::Graphics::Dimension(0, 0) if an error occurs * @exception E_SUCCESS The method is successful. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0). */ Tizen::Graphics::FloatDimension GetSizeF(void) const; /** - * Compares the Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence. + * Compares a Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence. * * @since 2.0 * - * @return @c true if the specified instance share the content with the current instance, @n + * @return @c true if the value of the specified instance is equal to the value of the current instance, @n * else @c false * @param[in] obj The object to compare with the current instance * @see GetHashCode() diff --git a/inc/FUiAnimVisualElementValueAnimation.h b/inc/FUiAnimVisualElementValueAnimation.h index 8fffee3..2bd519b 100644 --- a/inc/FUiAnimVisualElementValueAnimation.h +++ b/inc/FUiAnimVisualElementValueAnimation.h @@ -73,7 +73,7 @@ public: * * @since 2.0 * - * @param[in] animation An instance of %VisualElementValueAnimation + * @param[in] animation An instance of %VisualElementValueAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -86,7 +86,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %VisualElementValueAnimation + * @param[in] rhs An instance of %VisualElementValueAnimation * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -99,8 +99,8 @@ public: * * @since 2.0 * - * @return @c true if the animation of the two instances of %VisualElementValueAnimation are equal, @n - * else @c false + * @return @c true if the animation of the two instances of %VisualElementValueAnimation are equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementValueAnimation */ bool operator ==(const VisualElementValueAnimation& rhs) const; @@ -111,8 +111,8 @@ public: * * @since 2.0 * - * @return @c true if the values of the animations of the two instances of %VisualElementValueAnimation are not equal, @n - * else @c false + * @return @c true if the values of the animations of the two instances of %VisualElementValueAnimation are not equal, @n + * else @c false * @param[in] rhs An instance of %VisualElementValueAnimation */ bool operator !=(const VisualElementValueAnimation& rhs) const; @@ -123,10 +123,11 @@ public: * * @since 2.0 * - * @return @c true if the value of the current instance equals the value of the specified instance, @n - * else @c false + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false * @param[in] obj An instance of %VisualElementValueAnimation - * @remarks The %VisualElementValueAnimation class has a semantic value which means that this method checks whether the two instances have the same animation. + * @remarks The %VisualElementValueAnimation class has a semantic value which means that this method checks whether the + * two instances have the same animation. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -136,20 +137,20 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks The two equal instances must return the same hash value. + * @return The hash value of the current instance + * @remarks The two equal instances must return the same hash value.@n * For better performance, the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; /** - * Gets the copied instance of the class. + * Gets a copied instance of the class. * * @since 2.0 * - * @return An instance of %VisualElementAnimation - * @exception E_SUCCESS The method is successful. + * @return An instance of %VisualElementAnimation + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. */ @@ -172,8 +173,8 @@ public: * * @since 2.0 * - * @return A pointer to the IVisualElementAnimationTickEventListener instance @n - * If listener has not been set, @c null is returned. + * @return A pointer to the IVisualElementAnimationTickEventListener instance @n + * else @c null if the listener has not been set * @see SetVisualElementAnimationTickEventListener() */ IVisualElementAnimationTickEventListener* GetVisualElementAnimationTickEventListener(void) const; @@ -184,10 +185,10 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] startValue The start value of the animation to set * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The type of Variant is empty. + * @exception E_INVALID_ARG The type of Variant is empty. * @see GetStartValue() */ result SetStartValue(const Tizen::Ui::Variant& startValue); @@ -209,10 +210,10 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] endValue The end value of the animation to set * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The type of Variant is empty. + * @exception E_INVALID_ARG The type of Tizen::Ui::Variant is empty. * @see GetEndValue() */ result SetEndValue(const Tizen::Ui::Variant& endValue); @@ -237,7 +238,7 @@ public: * @param[in] apply Set to @c true to apply the end values of the animation, @n * else @c false * @remarks There is no difference in behavior with this method in value animation. @n - * So you must set the end value by seeing this value. + * So you must set the end value based on this value. * @see IsEndValueApplied() */ void SetEndValueApplied(bool apply); @@ -257,21 +258,22 @@ public: /** - * Adds the key frame information for the animation. + * Adds the keyframe information for the animation. * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] timeProgress The specified time progress value @n * This must be in the range @c 0.0 to @c 1.0 and cannot be @c 0.0 and @c 1.0. * @param[in] value The value at the specified time - * @param[in] pTimingFunction The timing function instance that is used in keyframe segment + * @param[in] pTimingFunction The timing function instance that is used in the keyframe segment * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c value parameter is invalid. * @exception E_OUT_OF_RANGE The specified @c timeProgress is not within the range @c 0 to @c 1 (exclusive). - * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one. - * If timing function is @c null, the default timing function is applied. - * The timing function is applied to current pace from previous pace. + * @remarks + * - If a key-value pair with the current key already exists, the old value is overwritten with the new one. + * - If timing function is @c null, the default timing function is applied. + * - The timing function is applied to current pace from previous pace. * @see RemoveKeyFrame() * @see RemoveAllKeyFrames() */ @@ -279,16 +281,16 @@ public: /** - * Removes the key frame information for the animation. + * Removes the keyframe information for the animation. * * @since 2.0 * - * @return An error code - * @param[in] timeProgress The time progress for the key frame to remove + * @return An error code + * @param[in] timeProgress The time progress for the keyframe to remove @n * This must be in the range @c 0.0 to @c 1.0 and cannot be @c 0.0 and @c 1.0. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The value of the specified parameter is not within the range @c 0 to @c 1 (exclusive). - * @exception E_OBJ_NOT_FOUND The key frame with @c timeProgress does not exist. + * @exception E_OBJ_NOT_FOUND The keyframe with the specified @c timeProgress does not exist. * @see AddKeyFrame() * @see RemoveAllKeyFrames() */ @@ -296,7 +298,7 @@ public: /** - * Removes all the key frame information for the animation. + * Removes all the keyframe information for the animation. * * @since 2.0 * diff --git a/inc/FUiAnimations.h b/inc/FUiAnimations.h index 043ef54..48036a5 100644 --- a/inc/FUiAnimations.h +++ b/inc/FUiAnimations.h @@ -83,7 +83,7 @@ namespace Ui { /** * @namespace Tizen::Ui::Animations - * @brief This namespace contains the classes for the animation-related functionalities. + * @brief This namespace contains classes for the animation-related functionalities. * @since 2.0 * * @remarks @b Header @b %file: @b \#include @b @n diff --git a/inc/FUiCardLayout.h b/inc/FUiCardLayout.h index 3c5fe4e..64a6897 100644 --- a/inc/FUiCardLayout.h +++ b/inc/FUiCardLayout.h @@ -39,16 +39,28 @@ class Control; * * The %CardLayout class defines the card layout for a container.@n * + * The following example demonstrates how to use the %CardLayout class. + * * @code // Sample code for CardLayoutSample.h #include class CardLayoutSample : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITouchEventListener { public: bool Initialize(void); virtual result OnInitializing(void); + + // ITouchEventListener + virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo); + virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; + virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; + virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; + virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; + virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; + virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}; }; * @endcode * @@ -80,24 +92,40 @@ CardLayoutSample::OnInitializing(void) { result r = E_SUCCESS; - // Creates an instance of 1st panel - Panel* pFirstPanel = new Panel(); - pFirstPanel->Construct(Rectangle(0, 0, 50, 50)); - pFirstPanel->SetBackgroundColor(Color(0xFF, 0x40, 0x40, 0xFF)); + CardLayout layout; + layout.Construct(); + + Panel* pPanels[5]; + for (int i = 0; i < 5; i++) + { + // Creates an instance of panel + pPanels[i] = new Panel(); + pPanels[i]->Construct(Rectangle(0, 0, 50, 50)); + pPanels[i]->SetBackgroundColor(Color(0xFF, 0x30, i*100, 0xFF)); - // Adds the 1st panel to the form - AddControl(pFirstPanel); + // Add the label to the panel + Label* pLabel = new Label; + Tizen::Base::String panelLabel(L"nd"); + panelLabel.Insert(i+1, 0); + pLabel->Construct(Rectangle(100, 100, 100, 100), panelLabel); + pPanels[i]->AddControl(pLabel); - // Creates an instance of 2nd panel - Panel* pSecondPanel = new Panel(); - pSecondPanel->Construct(Rectangle(0, 0, 50, 50)); - pSecondPanel->SetBackgroundColor(Color(0x40, 0x40, 0xFF, 0xFF)); + // Adds the panel to the form + AddControl(pPanels[i]); - // Adds the 2nd panel to the form - AddControl(pSecondPanel); + // Adds the touch event listener + pPanels[i]->AddTouchEventListener(*this); + } return r; } + +void +CardLayoutSample::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) +{ + Panel* pPanel = dynamic_cast(const_cast(&source)); + pPanel->SetShowState(false); +} * @endcode * */ @@ -106,7 +134,8 @@ class _OSP_EXPORT_ CardLayout { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct() method must be called right after calling this constructor. * * @since 2.0 */ diff --git a/inc/FUiClipboard.h b/inc/FUiClipboard.h index 8d5d027..5c6d316 100644 --- a/inc/FUiClipboard.h +++ b/inc/FUiClipboard.h @@ -39,7 +39,7 @@ class _ClipboardImpl; /** * @class Clipboard - * @brief This class defines a common behavior for %Clipboard. + * @brief This class defines the common behavior for %Clipboard. * * @since 2.0 * @@ -162,11 +162,11 @@ class _OSP_EXPORT_ Clipboard { public: /** - * Gets the system clipboard. + * Gets a pointer to the %Clipboard instance. * * @since 2.0 * - * @return The pointer to the system clipboard, @n + * @return A 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. */ @@ -178,30 +178,30 @@ public: * @since 2.0 * * @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 either invalid or not constructed. - * @exception E_SYSTEM A system error has occurred. + * @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 either invalid or not constructed. + * @exception E_SYSTEM A system error has occurred. * @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. + * For the other types, only the file path is copied and kept. */ result CopyItem(const ClipboardItem& item); /** - * Retrieves a collection of items that matches the specified data types from the - * system clipboard. + * Retrieves a collection of items that matches the specified data types from the system clipboard. * * @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 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. + * @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. + * 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. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); @@ -212,32 +212,33 @@ public: * * @return The pointer to a ClipboardItem instance, @n * 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. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes); /** - * Shows the clipboard popup that is including the current contents of the system clipboard with the specified parameters. + * Shows the clipboard popup that contains 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 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 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 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. + * @return An error code + * @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 Either of the following conditions has occurred: + * - The clipboard popup is currently being shown. + * - Attempt is made to show the clipboard popup when the application is in the background. + * @exception E_SYSTEM A system error has occurred. + * @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); @@ -247,10 +248,10 @@ public: * @since 2.0 * * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * - No clipboard popup is currently being shown. + * @exception E_SYSTEM A system error has occurred. */ static result HidePopup(void); diff --git a/inc/FUiClipboardItem.h b/inc/FUiClipboardItem.h index 941a6f4..7724415 100644 --- a/inc/FUiClipboardItem.h +++ b/inc/FUiClipboardItem.h @@ -51,7 +51,8 @@ class _OSP_EXPORT_ ClipboardItem { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -70,11 +71,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] dataType The data type - * @param[in] data The data to copy - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @param[in] dataType The data type + * @param[in] data The data to copy + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. * @remarks For the image data type, the bitmap instance must be deleted * by the application after the item is copied to the clipboard. */ diff --git a/inc/FUiClipboardTypes.h b/inc/FUiClipboardTypes.h index 7649c53..bbfdf9f 100644 --- a/inc/FUiClipboardTypes.h +++ b/inc/FUiClipboardTypes.h @@ -41,7 +41,7 @@ enum ClipboardDataType CLIPBOARD_DATA_TYPE_IMAGE = 0x0004, /**< The image data type */ CLIPBOARD_DATA_TYPE_VIDEO = 0x0008, /**< The video data type */ CLIPBOARD_DATA_TYPE_AUDIO = 0x0010, /**< The audio data type */ - CLIPBOARD_DATA_TYPE_MAX = 0x7fff, // The data type max + CLIPBOARD_DATA_TYPE_MAX = 0x7fff, // The max data type CLIPBOARD_DATA_TYPE_NONE = 0x0000 // No data type }; diff --git a/inc/FUiCompositeMode.h b/inc/FUiCompositeMode.h index 98a5ceb..0fac826 100644 --- a/inc/FUiCompositeMode.h +++ b/inc/FUiCompositeMode.h @@ -17,7 +17,7 @@ /** * @file FUiCompositeMode.h - * @brief This is the header file for the Container class. + * @brief This is the header file for the %Container class. * * This header file contains the declarations of the enumerations of the Container class. */ diff --git a/inc/FUiContainer.h b/inc/FUiContainer.h index e53716d..958c0b1 100644 --- a/inc/FUiContainer.h +++ b/inc/FUiContainer.h @@ -78,14 +78,14 @@ public: * The specified @c control is an instance of Window, or this control's parent container. * @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit. * @exception E_SYSTEM A system error has occurred. - * @remarks When the control is added, it is placed at the top of the drawing stack maintained by the container.@n - * This means the last control added is drawn last - * @remarks A control becomes displayable only after it has been added to a displayable container. Some methods may not work normally if the methods - * of the control are called before adding the control to a container. After the control is added to a %Container, the OnInitializing() - * method of the control are called before adding the control to a container. After the control is added to a %Container, the - * OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls. - * @see Tizen::Ui::Control::OnInitializing() - * @see Tizen::Ui::Control::OnTerminating() + * @remarks + * - When the control is added, it is placed at the top of the drawing stack maintained by the container.@n + * This means the last control added is drawn last + * - A control becomes displayable only after it has been added to a displayable container. Some methods may not work normally if the methods + * of the control are called before adding the control to a container. After the control is added to a %Container, the Control::OnInitializing() + * method of the control are called before adding the control to a container. After the control is added to a %Container, the + * %Control::OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls. + * @see Control::OnTerminating() * @code * { * // Uses Panel instead of Container, because Container is an abstract class. @@ -93,7 +93,7 @@ public: * pPanel->Construct(Rectangle(100, 250, 300, 300)); * * Form* pForm = new Form(); - * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_TITLE|FORM_STYLE_PORTRAIT_INDICATOR); + * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR); * pForm->AddControl(*pPanel); * * //... @@ -110,22 +110,22 @@ public: * @since 2.1 * * @return An error code - * @param[in] pControl A pointer to the control to add to the container - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c pControl is @c null. - * The specified @c control is an instance of Window or the control's parent container. - * @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit. - * @exception E_INVALID_ARG - * @exception E_SYSTEM A system error has occurred. + * @param[in] pControl A pointer to the control to add to the container + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pControl is @c null. + * - The specified @c control is an instance of Window or the control's parent container. + * @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. * @remarks * - When a control is added, it is placed at the top of the drawing stack maintained by the container.@n - * This means the control that is added last is drawn last. + * This means the control that is added last is drawn last. * - A control becomes displayable only after it has been added to a displayable container. - * Some methods may not work normally if the methods of the control are called before adding the control to a container. After the control is added to a %Container, the OnInitializing() - * method of the control are called before adding the control to a container. After the control is added to a %Container, the - * OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls. - * @see Tizen::Ui::Control::OnInitializing() - * @see Tizen::Ui::Control::OnTerminating() + * Some methods may not work normally if the methods of the control are called before adding the control to a container. + * After the control is added to a %Container, the Control::OnInitializing() + * method of the control is called before adding the control to a container. After the control is added to a %Container, the + * %Control::OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls. + * @see Control::OnTerminating() * @code * { * // Uses Panel instead of Container, because Container is an abstract class. @@ -133,7 +133,7 @@ public: * pPanel->Construct(Rectangle(100, 250, 300, 300)); * * Form* pForm = new Form(); - * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_TITLE|FORM_STYLE_PORTRAIT_INDICATOR); + * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR); * pForm->AddControl(pPanel); * * //... @@ -145,7 +145,8 @@ public: result AddControl(Control* pControl); /** - * Before the system calls OnDraw() method to allow the user to do custom drawing, this method is called to clear the canvas. The user can override this method to change this default behavior. + * Before the system calls the OnDraw() method to allow the user to do custom drawing, this method is called to clear the canvas. @n + * The user can override this method to change this default behavior. * * @since 2.0 * @@ -183,7 +184,7 @@ public: * * @section CompOnDrawPageSolutionSection Resolutions * This issue has been resolved in Tizen. @n - * -# The platform does not call the parent's OnDraw() callback before invoking the control's OnDraw() callback. Therefore, you needs to call the parent container's OnDraw() callback in the OnDraw() callback if you override this method. + * -# The platform does not call the parent's OnDraw() callback before invoking the control's OnDraw() callback. Therefore, you need to call the parent container's OnDraw() callback in the OnDraw() callback if you override this method. * @endif */ @@ -192,8 +193,8 @@ public: * * @since 2.0 * - * @param[in] showState The new show state of the control - * @see Tizen::Ui::Control::SetShowState() + * @param[in] showState The new show state of the control + * @see Control::SetShowState() */ virtual void OnShowStateChanging(bool showState); @@ -202,8 +203,8 @@ public: * * @since 2.0 * - * @param[in] showState The new show state of the control - * @see Tizen::Ui::Control::SetShowState() + * @param[in] showState The new show state of the control + * @see Control::SetShowState() */ virtual void OnShowStateChanged(bool showState); @@ -213,13 +214,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] oldRect The old position and size values of the control - * @param[in] newRect The new position and size values of the control + * @param[in] oldRect The old position and size values of the control + * @param[in] newRect The new position and size values of the control * @remarks If the method returns an exception, the resulting exception * is propagated and the control's size is unchanged.@n * Provide control specific exceptions. - * @see Tizen::Ui::Control::SetBounds() - * @see Tizen::Ui::Control::SetSize() + * @see Control::SetBounds() + * @see Control::SetSize() */ virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); @@ -229,10 +230,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] oldRect The old position and size values of the control - * @param[in] newRect The new position and size values of the control - * @see Tizen::Ui::Control::SetBounds() - * @see Tizen::Ui::Control::SetSize() + * @param[in] oldRect The old position and size values of the control + * @param[in] newRect The new position and size values of the control + * @see Control::SetBounds() + * @see Control::SetSize() */ virtual void OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); @@ -259,9 +260,8 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The specified instance is not found within the indicated range (that is, the @c control is not found). * @exception E_SYSTEM A system error has occurred. - * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called. - * If OnTerminating() method is overridden and returns an exception, that exception is propagated. - * @see Tizen::Ui::Control::OnTerminating() + * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called. + * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated. */ result RemoveControl(const Control& control); @@ -270,15 +270,14 @@ public: * * @since 2.1 * - * @return An error code + * @return An error code * @param[in] pControl A pointer to the child control to remove * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The specified instance is not found within the indicated range (that is, the @c control is not found). * @exception E_INVALID_ARG The specified @c pControl is @c null. * @exception E_SYSTEM A system error has occurred. - * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called. - * If OnTerminating() method is overridden and returns an exception, that exception is propagated. - * @see Tizen::Ui::Control::OnTerminating() + * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called. + * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated. */ result RemoveControl(Control* pControl); @@ -292,9 +291,8 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called. - * If OnTerminating() method is overridden and returns an exception, that exception is propagated. - * @see Tizen::Ui::Control::OnTerminating() + * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called. + * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated. */ result RemoveControl(int index); @@ -303,8 +301,8 @@ public: * * @since 2.0 * - * @remarks The removed child controls are deleted from the memory. Before deletion, OnTerminating() of the child control is called. - * @see Tizen::Ui::Control::OnTerminating() + * @remarks The removed child controls are deleted from the memory. Before deletion, Control::OnTerminating() + * of the child control is called. */ void RemoveAllControls(void); @@ -315,7 +313,7 @@ public: * * @return The control at the specified index of the list, @n * else @c null if the index is not valid - * @param[in] index The index of the control + * @param[in] index The index of the control */ Control* GetControl(int index) const; @@ -346,7 +344,7 @@ public: * @page CompGetControlPage Compatibility for GetControl() * @section CompGetControlPageIssueSection Issues * Implementing this method in OSP compatible applications has the following issues: @n - * -# GetControl() method searches for itself first and then child controls in API version 2.0, whereas only @n + * -# GetControl() method searches for itself first and then child controls in API version 2.0, whereas only * child controls are searched for from 2.1. * * @section CompGetControlPageSolutionSection Resolutions @@ -381,7 +379,6 @@ public: * else @c null if the layout does not exist * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks The returned layout can be @c null, if it is not set. */ Layout* GetPortraitLayoutN(void) const; @@ -394,7 +391,6 @@ public: * else @c null if the layout does not exist * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks The returned layout can be @c null, if it is not set. */ Layout* GetLandscapeLayoutN(void) const; @@ -407,7 +403,6 @@ public: * else @c null if the layout does not exist * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks The returned layout can be @c null, if it is not set. */ Layout* GetLayoutN(void) const; @@ -431,10 +426,10 @@ public: * * @return @c true if a specified control is within the containment hierarchy of the container, @n * else @c false - * @param[in] pControl A pointer to the control - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c pControl is null. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @param[in] pControl A pointer to the control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pControl is @c null. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ bool IsAncestorOf(const Control* pControl) const; @@ -451,13 +446,14 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid.@n * The specified control is not a child of this * container. - * @remarks If multiple child control are set as "always on top", then - * their relative order is not specified. If the specified child - * control is a container, then all its children inherit this - * property and they are "always on top" of other controls.@n - * If the method is called on a child control with a @c false - * value, then it's state becomes normal. The relative order - * of child controls in normal state is not specified. + * @remarks + * - If multiple child control are set as "always on top", then + * their relative order is not specified. If the specified child + * control is a container, then all its children inherit this + * property and they are "always on top" of other controls. + * - If the method is called on a child control with a @c false + * value, then its state becomes normal. The relative order + * of child controls in normal state is not specified. * @see IsControlAlwaysOnTop() */ result SetControlAlwaysOnTop(Tizen::Ui::Control& control, bool alwaysOnTop); @@ -469,19 +465,20 @@ public: * * @return An error code * @param[in] control The child control - * @param[in] alwaysAtBottom The Boolean value indicating that @c control + * @param[in] alwaysAtBottom The boolean value indicating that @c control * must always be at the bottom. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid.@n * The specified control is not a child of this * container. - * @remarks If multiple child control are set as "always at bottom", then - * their relative order is not specified. If the specified child - * control is a container, then all its children inherit this - * property and they become "always at bottom" as well.@n - * If the method is called on a child control with a @c false - * value, then it's state becomes normal. The relative order - * of child controls in normal state is not specified. + * @remarks + * - If multiple child control are set as "always at bottom", then + * their relative order is not specified. If the specified child + * control is a container, then all its children inherit this + * property and they become "always at bottom" as well. + * - If the method is called on a child control with a @c false + * value, then its state becomes normal. The relative order + * of child controls in normal state is not specified. * @see IsControlAlwaysAtBottom() */ result SetControlAlwaysAtBottom(Tizen::Ui::Control& control, bool alwaysAtBottom); @@ -494,15 +491,13 @@ public: * @deprecated This method is deprecated. * @since 2.0 * - * @return @c true if the specified child control is set as always at the bottom, @n - * else @c false + * @return @c true if the specified child control is set as always at the bottom, @n + * else @c false * @param[in] control The child control * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified control is not a child of this - * container. - * @remarks The specific error code can be accessed using the GetLastResult() - * method. + * The specified control is not a child of this container. + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetControlAlwaysAtBottom() */ bool IsControlAlwaysAtBottom(const Tizen::Ui::Control& control) const; @@ -512,24 +507,22 @@ public: * * @since 2.1 * - * @return @c true if a specified child control is set as always at the bottom, @n - * else @c false + * @return @c true if a specified child control is set as always at the bottom, @n + * else @c false * @param[in] pControl A pointer to child control * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified control is not a child of this - * container or @c pControl is @c null . + * The specified control is not a child of this container or @c pControl is @c null . * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetControlAlwaysAtBottom() */ bool IsControlAlwaysAtBottom(const Tizen::Ui::Control* pControl) const; /** - * Checks whether the specified child control is always on the top of - * the drawing stack. + * Checks whether the specified child control is always on the top of the drawing stack. * * @brief [Deprecated] - * @deprecated This method is deprecated. + * @deprecated This method is deprecated. * @since 2.0 * * @return @c true if the specified child control is set as always on the top, @n @@ -537,10 +530,8 @@ public: * @param[in] control The child control * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified control is not a child of this - * container. - * @remarks The specific error code can be accessed using the GetLastResult() - * method. + * The specified control is not a child of this container. + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetControlAlwaysOnTop() */ bool IsControlAlwaysOnTop(const Tizen::Ui::Control& control) const; @@ -564,7 +555,7 @@ public: protected: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -587,16 +578,16 @@ protected: * @since 2.0 * * @return An error code - * @param[in] rect The rectangle bounds to set - * @param[in] resizable Set to @c true to make the container resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the container movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() + * @param[in] rect The rectangle bounds to set + * @param[in] resizable Set to @c true to make the container resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the container movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the construct methods of the derived class. + * - If the specified @c resizable is @c false, IsResizable() returns @c false. */ result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -606,16 +597,16 @@ protected: * @since 2.1 * * @return An error code - * @param[in] rect The rectangle bounds to set - * @param[in] resizable Set to @c true to make the container resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the container movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() + * @param[in] rect The rectangle bounds to set + * @param[in] resizable Set to @c true to make the container resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the container movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the construct methods of the derived class. + * - If the specified @c resizable is @c false, IsResizable() returns @c false. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); @@ -624,20 +615,19 @@ protected: * * @since 2.0 * - * @return An error code - * @param[in] layout The layout for both the portrait and landscape mode - * @param[in] rect The location and size of the %Container - * @param[in] resizable Set to @c true to make the container resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the container movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() + * @return An error code + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] rect The location and size of the %Container + * @param[in] resizable Set to @c true to make the container resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the container movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the construct methods of the derived class. + * - If the specifed @c resizable is @c false, IsResizable() returns @c false. + * @see Container::GetLayoutN() */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -646,20 +636,19 @@ protected: * * @since 2.1 * - * @return An error code - * @param[in] layout The layout for both the portrait and landscape mode - * @param[in] rect The location and size of the %Container - * @param[in] resizable Set to @c true to make the container resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the container movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() + * @return An error code + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] rect The location and size of the %Container + * @param[in] resizable Set to @c true to make the container resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the container movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the construct methods of the derived class. + * - If the specified @c resizable is @c false, IsResizable() returns @c false. + * @see Container::GetLayoutN() */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); @@ -668,23 +657,20 @@ protected: * * @since 2.0 * - * @return An error code - * @param[in] portraitLayout The layout for the portrait mode - * @param[in] landscapeLayout The layout for the landscape mode - * @param[in] rect The location and size of the %Container - * @param[in] resizable Set to @c true to make the container resizable, @n + * @return An error code + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode + * @param[in] rect The location and size of the %Container + * @param[in] resizable Set to @c true to make the container resizable, @n * else @c false - * @param[in] movable Set to @c true to make the container movable, @n + * @param[in] movable Set to @c true to make the container movable, @n * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() - * @see Tizen::Ui::Container::GetPortraitLayoutN() - * @see Tizen::Ui::Container::GetLandscapeLayoutN() + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks If the specified @c resizable is @c false, IsResizable() returns @c false. + * @see Container::GetLayoutN() + * @see Container::GetPortraitLayoutN() + * @see Container::GetLandscapeLayoutN() */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -693,23 +679,20 @@ protected: * * @since 2.1 * - * @return An error code - * @param[in] portraitLayout The layout for the portrait mode - * @param[in] landscapeLayout The layout for the landscape mode - * @param[in] rect The location and size of the %Container - * @param[in] resizable Set to @c true to make the container resizable, @n + * @return An error code + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode + * @param[in] rect The location and size of the %Container + * @param[in] resizable Set to @c true to make the container resizable, @n * else @c false - * @param[in] movable Set to @c true to make the container movable, @n + * @param[in] movable Set to @c true to make the container movable, @n * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. - * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() - * @see Tizen::Ui::Container::GetPortraitLayoutN() - * @see Tizen::Ui::Container::GetLandscapeLayoutN() + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks If the specified @c resizable is @c false, IsResizable() returns @c false. + * @see Container::GetLayoutN() + * @see Container::GetPortraitLayoutN() + * @see Container::GetLandscapeLayoutN() */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); @@ -720,8 +703,8 @@ protected: * @deprecated This method is deprecated. * @since 2.0 * @return An error code - * @param[in] control The control - * @param[out] index The index of the control + * @param[in] control The control + * @param[out] index The index of the control * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found. * @see SetControlAt() @@ -732,14 +715,14 @@ protected: /** * Gets the index of a specified control. * - * @since 2.1 - * @return An error code - * @param[in] pControl A pointer to the control - * @param[out] index The index of the control - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c pControl is @c null. - * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found. - * @see SetControlAt() + * @since 2.1 + * @return An error code + * @param[in] pControl A pointer to the control + * @param[out] index The index of the control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pControl is @c null. + * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found. + * @see SetControlAt() * */ result GetControlAt(const Control* pControl, int& index) const; @@ -759,7 +742,6 @@ protected: * @exception E_SYSTEM A system error has occurred. * @remarks The @c control must be first added to this container. @n * Call the Invalidate() method after this, to apply the change to be shown. - * @see Invalidate() * @see GetControlAt() * */ @@ -779,7 +761,6 @@ protected: * @exception E_SYSTEM A system error has occurred. * @remarks The @c control must be first added to this container. @n * Then the Invalidate() method is called to show the applied changes. - * @see Invalidate() * @see GetControlAt() * */ @@ -792,13 +773,13 @@ protected: * @since 2.1 * * @return An error code - * @param[in] oldRect The old position and size values of the control - * @param[in] newRect The new position and size values of the control + * @param[in] oldRect The old position and size values of the control + * @param[in] newRect The new position and size values of the control * @remarks If the method returns an exception, the resulting exception * is propagated and the control's size is unchanged.@n * Provide control specific exceptions. - * @see Tizen::Ui::Control::SetBounds() - * @see Tizen::Ui::Control::SetSize() + * @see Control::SetBounds() + * @see Control::SetSize() */ virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); @@ -810,8 +791,8 @@ protected: * @return An error code * @param[in] oldRect The old position and size values of the control * @param[in] newRect The new position and size values of the control - * @see Tizen::Ui::Control::SetBounds() - * @see Tizen::Ui::Control::SetSize() + * @see Control::SetBounds() + * @see Control::SetSize() */ virtual void OnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); diff --git a/inc/FUiControl.h b/inc/FUiControl.h index 94e423e..09b973c 100644 --- a/inc/FUiControl.h +++ b/inc/FUiControl.h @@ -123,7 +123,7 @@ public: virtual ~Control(void); /** - * Adds the IFocusEventListener instance to the %Control instance. @n + * Adds an IFocusEventListener instance to the %Control instance. @n * The added listener gets notified when the control gains or loses its focus. * * @since 2.0 @@ -134,7 +134,7 @@ public: void AddFocusEventListener(IFocusEventListener& listener); /** - * Adds the IKeyEventListener instance to the %Control instance. @n + * Adds an IKeyEventListener instance to the %Control instance. @n * The added listener gets notified when a key is pressed, released, or long pressed. * * @since 2.0 @@ -145,7 +145,7 @@ public: void AddKeyEventListener(IKeyEventListener& listener); /** - * Adds the ITouchEventListener instance to the %Control instance. @n + * Adds an ITouchEventListener instance to the %Control instance. @n * The added listener gets notified when a touch event such as a press or a release is fired. * * @since 2.0 @@ -156,7 +156,7 @@ public: void AddTouchEventListener(ITouchEventListener& listener); /** - * Adds the ITouchModeChangedEventListener instance to the %Control instance. @n + * Adds an ITouchModeChangedEventListener instance to the %Control instance. @n * The added listener gets notified when the device's touch mode is changed. * * @since 2.0 @@ -167,7 +167,7 @@ public: void AddTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener); /** - * Adds the IDragDropEventListener instance to the %Control instance. @n + * Adds an IDragDropEventListener instance to the %Control instance. @n * The added listener gets notified when a drag or a drop happens in the control. * * @since 2.0 @@ -178,7 +178,7 @@ public: void AddDragDropEventListener(IDragDropEventListener& listener); /** - * Adds the IDragDropEventListenerF instance to the %Control instance. @n + * Adds an IDragDropEventListenerF instance to the %Control instance. @n * The added listener gets notified when a drag or a drop happens in the control. * * @since 2.1 @@ -189,8 +189,8 @@ public: void AddDragDropEventListener(IDragDropEventListenerF& listener); /** - * Removes the focus listener instance. @n - * The removed listener is not notified even when focus events are fired. + * Removes a focus listener instance. @n + * The removed listener is not notified when focus events are fired. * * @since 2.0 * @@ -200,8 +200,8 @@ public: void RemoveFocusEventListener(IFocusEventListener& listener); /** - * Removes the key event listener instance. @n - * The removed listener is not notified even when key events are fired. + * Removes a key event listener instance. @n + * The removed listener is not notified when key events are fired. * * @since 2.0 * @@ -211,8 +211,8 @@ public: void RemoveKeyEventListener(IKeyEventListener& listener); /** - * Removes the touch event listener instance. @n - * The removed listener is not notified even when touch events are fired. + * Removes a touch event listener instance. @n + * The removed listener is not notified when touch events are fired. * * @since 2.0 * @@ -222,8 +222,8 @@ public: void RemoveTouchEventListener(ITouchEventListener& listener); /** - * Removes the touch mode changed event listener instance. @n - * The removed listener is not notified even when the touch mode changed events are fired. + * Removes a touch mode changed event listener instance. @n + * The removed listener is not notified when the touch mode changed events are fired. * * @since 2.0 * @@ -233,47 +233,49 @@ public: void RemoveTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener); /** - * Adds the IDragDropEventListener instance to the %Control instance. @n - * The added listener gets notified when a drag or a drop happens in the control. + * Removes a IDragDropEventListener instance. @n + * The removed listener is not notified when drag or drop events are fired. * * @since 2.0 * * @param[in] listener The event listener to add - * @see Tizen::Ui::IDragDropEventListener::OnTouchDragged() - * @see Tizen::Ui::IDragDropEventListener::OnTouchDropped() + * @see IDragDropEventListener::OnTouchDragged() + * @see IDragDropEventListener::OnTouchDropped() * @see RemoveDragDropEventListener() */ void RemoveDragDropEventListener(IDragDropEventListener& listener); /** - * Adds the IDragDropEventListenerF instance to the %Control instance. @n - * The added listener gets notified when a drag or a drop happens in the control. + * Removes a IDragDropEventListenerF instance. @n + * The removed listener is not notified when drag or drop events are fired. * * @since 2.1 * * @param[in] listener The event listener to add - * @see Tizen::Ui::IDragDropEventListenerF::OnTouchDraggedF() - * @see Tizen::Ui::IDragDropEventListenerF::OnTouchDroppedF() + * @see IDragDropEventListenerF::OnTouchDraggedF() + * @see IDragDropEventListenerF::OnTouchDroppedF() * @see RemoveDragDropEventListenerF() */ void RemoveDragDropEventListenerF(IDragDropEventListenerF& listener); /** - * Overrides this method to provide user-specific initialization code before the control is added to a container. + * Overrides this method to provide user-specific initialization code before the control is added to a container. @n + * The %OnInitializing() method is called when the control is about to be added to a container. + * To cancel adding the control to the parent, return any exception other than @c E_SUCCESS. * * @since 2.0 * * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_FAILURE The method has failed. - * @remarks This method is called when the control is about to be added to a container. - * @remarks To cancel adding this control to the parent, return @c E_FAILURE in this method. * @see OnTerminating() */ virtual result OnInitializing(void); /** - * Overrides this method to provide user-specific termination code. + * Overrides this method to provide user-specific termination code. @n + * The %OnTerminating() method is called right before the control is removed from the container, or Destroy() method is called. @n + * To cancel the removal or %Destroy() operation, return any exception other than @c E_SUCCESS. * * @if OSPCOMPAT * @brief [Compatibility] @@ -287,9 +289,6 @@ public: * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_FAILURE The method has failed. - * @remarks - * - This method is called right before the control is removed from the container, or Destroy() method is called. - * - To cancel the removal or Destroy() operation, return any exception other than @c E_SUCCESS. * @see OnInitializing() */ virtual result OnTerminating(void); @@ -308,26 +307,26 @@ public: */ /** - * Called asynchronously when the user event that is sent by SendUserEvent() method is + * Called asynchronously when the user event that is sent by the SendUserEvent() method is * dispatched to the control. * * @since 2.0 * * @param[in] requestId The user-defined event ID - * @param[in] pArgs A pointer to the argument list + * @param[in] pArgs A pointer to the argument list * @see SendUserEvent() */ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs); /** - * Deallocates this instance after removing all child controls of this control. + * Deallocates this instance after removing all the child controls of this control. * * @since 2.1 * * @exception E_SUCCESS The method is successful. - * @remarks The control is deleted from memory. Before it is deleted, OnTerminating() is called if it is attached to the main tree. - * @remarks If OnTerminating() method is overridden and returns an exception, that exception is propagated. - * @see Tizen::Ui::Control:OnTerminating() + * @remarks + * - The control is deleted from memory. Before it is deleted, Control::OnTerminating() is called if it is attached to the main tree. + * - If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated. */ result Destroy(void); @@ -338,11 +337,11 @@ public: * * @return @c true if the control is movable, @n * else @c false + * * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks When control is not movable SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION. - * @see SetPosition() - * @see SetBounds() + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If the control is not movable, SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION. */ bool IsMovable(void) const; @@ -354,14 +353,9 @@ public: * @return @c true if the control is resizable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @remarks Even if this method returns @c true, the size can be changed internally. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks When control is not resizable, - * SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION. - * @see SetSize() - * @see SetBounds() - * @see SetMinimumSize() - * @see SetMaximumSize() + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If the control is not resizable, SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION. */ bool IsResizable(void) const; @@ -370,11 +364,9 @@ public: * * @since 2.0 * - * @return An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner, + * @return An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner, * the width, and the height of the control - * @remarks The shape of the control is rectangular that is defined by the top-left point, - * and the width or height. The position - * of the top-left point is relative to the top-left corner of the parent container. + * @remarks The position of the top-left point is relative to the top-left corner of the parent container. * @see SetBounds() */ Tizen::Graphics::Rectangle GetBounds(void) const; @@ -384,11 +376,9 @@ public: * * @since 2.1 * - * @return An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner, + * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of top-left corner, * the width, and the height of the control - * @remarks The shape of the control is rectangular that is defined by the top-left point, - * and the width or height. The position - * of the top-left point is relative to the top-left corner of the parent container. + * @remarks The position of the top-left point is relative to the top-left corner of the parent container. * @see SetBounds() */ Tizen::Graphics::FloatRectangle GetBoundsF(void) const; @@ -402,10 +392,7 @@ public: * @param[out] y The y position of top-left corner of the control * @param[out] width The width of the rectangular region * @param[out] height The height of the rectangular region - * @remarks The shape of the control is regarded as a rectangle that is defined - * by the top-left point and the width or height. - * The position of the top-left point is relative to the top-left corner of - * the parent container. + * @remarks The position of the top-left point is relative to the top-left corner of the parent container. * @see SetBounds() */ void GetBounds(int& x, int& y, int& width, int& height) const; @@ -419,10 +406,7 @@ public: * @param[out] y The y position of top-left corner of the control * @param[out] width The width of the rectangular region * @param[out] height The height of the rectangular region - * @remarks The shape of the control is regarded as a rectangle that is defined - * by the top-left point and the width or height. - * The position of the top-left point is relative to the top-left corner of - * the parent container. + * @remarks The position of the top-left point is relative to the top-left corner of the parent container. * @see SetBounds() */ void GetBounds(float& x, float& y, float& width, float& height) const; @@ -432,8 +416,7 @@ public: * * @since 2.0 * - * @return The position of the control's top-left corner - * @remarks The position of top-left corner is relative to the top-left corner of its parent container. + * @return The position of the control's top-left corner that is relative to the top-left corner of its parent container * @see GetBounds() */ Tizen::Graphics::Point GetPosition(void) const; @@ -443,8 +426,7 @@ public: * * @since 2.1 * - * @return The position of the control's top-left corner - * @remarks The position of top-left corner is relative to the top-left corner of its parent container. + * @return The position of the control's top-left corner that is relative to the top-left corner of its parent container * @see GetBounds() */ Tizen::Graphics::FloatPoint GetPositionF(void) const; @@ -454,9 +436,8 @@ public: * * @since 2.0 * - * @param[out] x The x position of the control's top-left corner - * @param[out] y The y position of the control's top-left corner - * @remarks The position of top-left corner is relative to the top-left corner of its parent container. + * @param[out] x The x position of the control's top-left corner that is relative to the top-left corner of its parent container + * @param[out] y The y position of the control's top-left corner that is relative to the top-left corner of its parent container * @see GetBounds() */ void GetPosition(int& x, int& y) const; @@ -466,9 +447,8 @@ public: * * @since 2.1 * - * @param[out] x The x position of the control's top-left corner - * @param[out] y The y position of the control's top-left corner - * @remarks The position of top-left corner is relative to the top-left corner of its parent container. + * @param[out] x The x position of the control's top-left corner that is relative to the top-left corner of its parent container + * @param[out] y The y position of the control's top-left corner that is relative to the top-left corner of its parent container * @see GetBounds() */ void GetPosition(float& x, float& y) const; @@ -516,12 +496,12 @@ public: void GetSize(float& width, float& height) const; /** - * Gets the x position of the control. @n - * The position of control is relative to the top-left corner of its parent container. + * Gets the x position of the control. * * @since 2.0 * - * @return The x position of the control + * @return The x position of the control @n + * The position of control is relative to the top-left corner of its parent container. * @see GetBounds() * @see GetPosition() * @see GetY() @@ -529,12 +509,12 @@ public: int GetX(void) const; /** - * Gets the x position of the control. @n - * The position of control is relative to the top-left corner of its parent container. + * Gets the x position of the control. * * @since 2.1 * - * @return The x position of the control + * @return The x position of the control @n + * The position of control is relative to the top-left corner of its parent container. * @see GetBounds() * @see GetPosition() * @see GetYF() @@ -542,12 +522,12 @@ public: float GetXF(void) const; /** - * Gets the y position of the control. @n - * The position of control is relative to the top-left corner of its parent container. + * Gets the y position of the control. * * @since 2.0 * - * @return The y position of the control + * @return The y position of the control @n + * The position of control is relative to the top-left corner of its parent container. * @see GetBounds() * @see GetPosition() * @see GetX() @@ -555,12 +535,12 @@ public: int GetY(void) const; /** - * Gets the y position of the control. @n - * The position of control is relative to the top-left corner of its parent container. + * Gets the y position of the control. * * @since 2.1 * - * @return The y position of the control + * @return The y position of the control @n + * The position of control is relative to the top-left corner of its parent container. * @see GetBounds() * @see GetPosition() * @see GetXF() @@ -620,10 +600,10 @@ public: * * @since 2.0 * - * @return The minimum size of the control + * @return The minimum size of the control @n + * The first call of the method returns the system-defined minimum size. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The first call of the method returns the system-defined minimum size. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Dimension GetMinimumSize(void) const; @@ -633,10 +613,10 @@ public: * * @since 2.1 * - * @return The minimum size of the control + * @return The minimum size of the control @n + * The first call of the method returns the system-defined minimum size. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The first call of the method returns the system-defined minimum size. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const; @@ -646,10 +626,10 @@ public: * * @since 2.0 * - * @return The maximum size of the control + * @return The maximum size of the control @n + * The first call of the method returns the system-defined maximum size. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The first call of the method returns the system-defined maximum size. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Dimension GetMaximumSize(void) const; @@ -659,22 +639,22 @@ public: * * @since 2.1 * - * @return The maximum size of the control + * @return The maximum size of the control @n + * The first call of the method returns the system-defined maximum size. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The first call of the method returns the system-defined maximum size. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const; /** - * Gets a font of the control. + * Gets the font of the control. * * @since 2.0 * - * @return The font name set in the control @n - * else an empty string if the font is not set - * @see SetFont() + * @return The font name set in the control @n + * else an empty string if the font is not set + * @see SetFont() */ Tizen::Base::String GetFont(void) const; @@ -684,14 +664,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect The new bounds of the control + * @param[in] rect The new bounds of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsMovable() * @see IsResizable() * @see GetMinimumSize() @@ -707,14 +686,13 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The new bounds of the control + * @param[in] rect The new bounds of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsMovable() * @see IsResizable() * @see GetMinimumSize() @@ -732,17 +710,19 @@ public: * @since 2.0 * * @return An error code - * @param[in] x The new x position of the control - * @param[in] y The new y position of the control - * @param[in] width The new width of the control - * @param[in] height The new height of the control + * @param[in] x The new x position of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] y The new y position of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] width The new width of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] height The new height of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsMovable() * @see IsResizable() * @see GetMinimumSize() @@ -760,17 +740,19 @@ public: * @since 2.1 * * @return An error code - * @param[in] x The new x position of the control - * @param[in] y The new y position of the control - * @param[in] width The new width of the control - * @param[in] height The new height of the control + * @param[in] x The new x position of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] y The new y position of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] width The new width of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] height The new height of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsMovable() * @see IsResizable() * @see GetMinimumSize() @@ -786,13 +768,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] position The new position + * @param[in] position The new position @n + * The position of the control are relative to the top-left corner of its parent. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not movable. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The position of the control are relative to the top-left corner of its parent. * @see IsMovable() * @see SetBounds() */ @@ -804,13 +785,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] position The new position + * @param[in] position The new position @n + * The position of the control are relative to the top-left corner of its parent. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not movable. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The position of the control are relative to the top-left corner of its parent. * @see IsMovable() * @see SetBounds() */ @@ -821,14 +801,14 @@ public: * * @since 2.0 * @return An error code - * @param[in] x The new x position of the control - * @param[in] y The new y position of the control + * @param[in] x The new x position of the control @n + * The value is relative to the top-left corner of its parent. + * @param[in] y The new y position of the control @n + * The value is relative to the top-left corner of its parent. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not movable. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The x,y position of the control are relative to the top-left corner of its parent. * @see IsMovable() * @see SetBounds() */ @@ -839,34 +819,32 @@ public: * * @since 2.1 * @return An error code - * @param[in] x The new x position of the control - * @param[in] y The new y position of the control + * @param[in] x The new x position of the control @n + * The value is relative to the top-left corner of its parent. + * @param[in] y The new y position of the control @n + * The value is relative to the top-left corner of its parent. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not movable. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The x,y position of the control are relative to the top-left corner of its parent. * @see IsMovable() * @see SetBounds() */ result SetPosition(float x, float y); /** - * Sets the size of the control. @n - * The @c width and @c height parameters contain the width and height values of the object, respectively. + * Sets the size of the control. * * @since 2.0 * * @return An error code - * @param[in] size The new width and height + * @param[in] size The new width and height @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsResizable() * @see GetMinimumSize() * @see GetMaximumSize() @@ -876,19 +854,17 @@ public: /** * Sets the size of the control. - * The @c width and @c height parameters contain the width and height values of the object, respectively. * * @since 2.1 * * @return An error code - * @param[in] size The new width and height + * @param[in] size The new width and height @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsResizable() * @see GetMinimumSize() * @see GetMaximumSize() @@ -897,21 +873,20 @@ public: result SetSize(const Tizen::Graphics::FloatDimension& size); /** - * Sets the size of the control. @n - * The @c width and @c height parameters contain the width and height values of the object, respectively. + * Sets the size of the control. * * @since 2.0 * * @return An error code - * @param[in] width The new width of the control - * @param[in] height The new height of the control + * @param[in] width The new width of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] height The new height of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsResizable() * @see GetMinimumSize() * @see GetMaximumSize() @@ -921,20 +896,19 @@ public: /** * Sets the size of the control. - * The @c width and @c height parameters contain the width and height values of the object, respectively. * * @since 2.1 * * @return An error code - * @param[in] width The new width of the control - * @param[in] height The new height of the control + * @param[in] width The new width of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. + * @param[in] height The new height of the control @n + * The size of the control must be within the range defined by the minimum size and the maximum size. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The control has not been constructed as yet. + * @exception E_INVALID_OPERATION The control has not been constructed yet. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. * @see IsResizable() * @see GetMinimumSize() * @see GetMaximumSize() @@ -953,10 +927,11 @@ public: * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method can affect the maximum size and the current size of the control. @n - * The control needs to be redrawn to reflect the change in its size. @n - * If the current maximum size or the control size is smaller than the new minimum size, - * it becomes the same as the new minimum size. + * @remarks + * - This method can affect the maximum size and the current size of the control. + * - The control needs to be redrawn to reflect the change in its size. + * - If the current maximum size or the control size is smaller than the new minimum size, + * it becomes the same as the new minimum size. * @see IsResizable() */ result SetMinimumSize(const Tizen::Graphics::Dimension& newMinDim); @@ -972,10 +947,11 @@ public: * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method can affect the maximum size and the current size of the control. @n - * The control needs to be redrawn to reflect the change in its size. @n - * If the current maximum size or the control size is smaller than the new minimum size, - * it becomes the same as the new minimum size. + * @remarks + * - This method can affect the maximum size and the current size of the control. + * - The control needs to be redrawn to reflect the change in its size. + * - If the current maximum size or the control size is smaller than the new minimum size, + * it becomes the same as the new minimum size. * @see IsResizable() */ result SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinDim); @@ -986,15 +962,16 @@ public: * @since 2.0 * * @return An error code - * @param[in] newMaxDim The new maximum size of the control + * @param[in] newMaxDim The new maximum size of the control * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method can affect the minimum size and the current size of the control. @n - * The control needs to be redrawn to reflect the change in its size. @n - * If the current minimum size or the control size is greater than the new maximum size, - * it becomes the same as the new maximum size. + * @remarks + * - This method can affect the minimum size and the current size of the control. + * - The control needs to be redrawn to reflect the change in its size. + * - If the current minimum size or the control size is greater than the new maximum size, + * it becomes the same as the new maximum size. * @see IsResizable() */ result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxDim); @@ -1005,15 +982,16 @@ public: * @since 2.1 * * @return An error code - * @param[in] newMaxDim The new maximum size of the control + * @param[in] newMaxDim The new maximum size of the control * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION This control is not resizable. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method can affect the minimum size and the current size of the control. @n - * The control needs to be redrawn to reflect the change in its size. @n - * If the current minimum size or the control size is greater than the new maximum size, - * it becomes the same as the new maximum size. + * @remarks + * - This method can affect the minimum size and the current size of the control. + * - The control needs to be redrawn to reflect the change in its size. + * - If the current minimum size or the control size is greater than the new maximum size, + * it becomes the same as the new maximum size. * @see IsResizable() */ result SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxDim); @@ -1023,9 +1001,9 @@ public: * * @since 2.0 * - * @return The position relative to the top-left corner of the control's client-area - * @param[in] screenPosition The position relative to the top-left corner of the screen - * @see ConvertToScreenPosition() + * @return The position relative to the top-left corner of the control's client-area + * @param[in] screenPosition The position relative to the top-left corner of the screen + * @see ConvertToScreenPosition() */ Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const; @@ -1034,9 +1012,9 @@ public: * * @since 2.1 * - * @return The position relative to the top-left corner of the control's client-area - * @param[in] screenPosition The position relative to the top-left corner of the screen - * @see ConvertToScreenPosition() + * @return The position relative to the top-left corner of the control's client-area + * @param[in] screenPosition The position relative to the top-left corner of the screen + * @see ConvertToScreenPosition() */ Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const; @@ -1068,15 +1046,17 @@ public: * @since 2.0 * * @return An error code - * @param[in] fontName The app font name or system font name @n - * The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n - * The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN(). - * Sets an empty string to reset. + * @param[in] fontName The app font name or system font name @n + * The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n + * The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN(). + * Set an empty string to reset. * @exception E_SUCCESS The method is successful. - * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. - * @remarks At first, the value of @c fontName is considered app font name if it matches one of the face names of the font files which are located in @b '/res/font'. - * If not, the value of @c fontName is considered system font name if it matches one of the retrieved values using Tizen::Graphics::Font::GetSystemFontListN(). - * @remarks The control first attempts to find the control font. If it fails, then it searches for the application default font and the system font, in sequence. + * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. + * @remarks + * - At first, the value of @c fontName is considered app font name if it matches one of the face names of the font files which are located in @b '/res/font'. + * If not, the value of @c fontName is considered system font name if it matches one of the retrieved values using + * Tizen::Graphics::Font::GetSystemFontListN(). + * - The control first attempts to find the control font. If it fails, then it searches for the application default font and the system font, in sequence. * @see GetFont() */ result SetFont(const Tizen::Base::String& fontName); @@ -1088,8 +1068,8 @@ public: * * @return @c true if the specified @c point is inside the control, @n * else @c false - * @param[in] point The point to check - * @remarks The specified @c point must be defined relative to the top-left corner of the control. + * @param[in] point The point to check @n + * The value must be defined relative to the top-left corner of the control. */ bool Contains(const Tizen::Graphics::Point& point) const; @@ -1100,8 +1080,8 @@ public: * * @return @c true if the specified @c point is inside the control, @n * else @c false - * @param[in] point The point to check - * @remarks The specified @c point must be defined relative to the top-left corner of the control. + * @param[in] point The point to check @n + * The value must be defined relative to the top-left corner of the control. */ bool Contains(const Tizen::Graphics::FloatPoint& point) const; @@ -1112,9 +1092,10 @@ public: * * @return @c true if the specified point is inside the control, @n * else @c false - * @param[in] x The x position of the point to check - * @param[in] y The y position of the point to check - * @remarks The specified point must be defined relative to the top-left corner of the control. + * @param[in] x The x position of the point to check @n + * The value must be defined relative to the top-left corner of the control. + * @param[in] y The y position of the point to check @n + * The value must be defined relative to the top-left corner of the control. */ bool Contains(int x, int y) const; @@ -1125,9 +1106,10 @@ public: * * @return @c true if the specified point is inside the control, @n * else @c false - * @param[in] x The x position of the point to check - * @param[in] y The y position of the point to check - * @remarks The specified point must be defined relative to the top-left corner of the control. + * @param[in] x The x position of the point to check @n + * The value must be defined relative to the top-left corner of the control. + * @param[in] y The y position of the point to check @n + * The value must be defined relative to the top-left corner of the control. */ bool Contains(float x, float y) const; @@ -1143,26 +1125,26 @@ public: * @compatibility This method has compatibility issues with OSP compatible applications. @n * For more information, see @ref CompDrawPage "here". * @endif - * @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. @n - * Note: This control cannot be displayed. - * @exception E_SYSTEM A system error has occurred. - * @remarks This method calls OnDraw() immediately in a synchronous way. - * @see Show() + * @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. @n + * Note: This control cannot be displayed. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method calls OnDraw() immediately in a synchronous way. + * @see Show() */ result Draw(void); /** * @if OSPCOMPAT - * @page CompDrawPage Compatibility for Draw() - * @section CompDrawPageIssueSection Issues + * @page CompDrawPage Compatibility for Draw() + * @section CompDrawPageIssueSection Issues * Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n - * -# Draw() method draws child controls in a recursive way regardless of the visibility of the parent. + * -# The Draw() method draws child controls in a recursive way regardless of the visibility of the parent. * - * @section CompDrawPageSolutionSection Resolutions + * @section CompDrawPageSolutionSection Resolutions * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n - * -# Draw() method does not draw child controls if the control itself is not visible. + * -# The Draw() method does not draw child controls if the control itself is not visible. * @endif */ @@ -1171,15 +1153,15 @@ public: * * @since 2.0 * - * @param[in] recursive Set to @c true to draw child controls recursively, @n - * else @c false - * @return An error code - * @exception E_SUCCESS The method is successful. + * @param[in] recursive Set to @c true to draw child controls recursively, @n + * else @c false + * @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. @n - * Note: This control cannot be displayed. - * @exception E_SYSTEM A system error has occurred. - * @remarks This method calls OnDraw() immediately in a synchronous way. - * @see Show() + * Note: This control cannot be displayed. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method calls OnDraw() immediately in a synchronous way. + * @see Show() */ result Draw(bool recursive); @@ -1187,15 +1169,14 @@ public: * Shows the control on the screen. * * @since 2.0 - * @final Although this method is virtual, it should not be overridden. - * If overridden, it may not work as expected. + * @final Although this method is virtual, it should not be overridden. + * If overridden, it may not work as expected. * * @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. @n * Note: This control cannot be displayed. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. */ virtual result Show(void); @@ -1204,14 +1185,15 @@ public: * * @since 2.0 * - * @param[in] recursive Set to @c true to invalidate child controls recursively, @n - * else @c false + * @param[in] recursive Set to @c true to invalidate child controls recursively, @n + * else @c false * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * Note: This control cannot be displayed. * @exception E_SYSTEM A system error has occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks OnDraw() is not called immediately, but called asynchronously just before the screen is updated. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - OnDraw() is not called immediately, but called asynchronously just before the screen is updated. * @see InvalidateBounds() * @see Show() */ @@ -1222,11 +1204,11 @@ public: * * @since 2.0 * - * @param[in] bounds The position relative to the top-left corner of the control - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * Note: This control cannot be displayed. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @param[in] bounds The position relative to the top-left corner of the control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * Note: This control cannot be displayed. + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see Invalidate() * @see Show() */ @@ -1237,25 +1219,25 @@ public: * * @since 2.1 * - * @param[in] bounds The position relative to the top-left corner of the control - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * Note: This control cannot be displayed. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @param[in] bounds The position relative to the top-left corner of the control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * Note: This control cannot be displayed. + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see Invalidate() * @see Show() */ void InvalidateBounds(const Tizen::Graphics::FloatRectangle& bounds); /** - * Draws the control asynchronously. + * Draws the control asynchronously. @n + * This method posts a draw event in the event queue. @n + * Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control. * * @since 2.0 * - * @param[in] show Set to @c true to also show the %Control, @n + * @param[in] show Set to @c true to also show the control, @n * else @c false - * @remarks This method posts a draw event in the event queue. @n - * Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control. */ void RequestRedraw(bool show = true) const; @@ -1267,20 +1249,20 @@ public: * * @return The graphic canvas of the control, @n * else @c null if an exception occurs - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, - * if custom drawing is performed on the graphic canvas of Frame and Form - * then it will appear on the screen regardless of which control is currently visible on the screen. - * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const - * @see GetCanvasN(int x, int y, int width, int height) const + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control. + * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method + * if the size or position of the control is changed. + * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, + * if custom drawing is performed on the graphic canvas of Frame and Form + * then it will appear on the screen regardless of which control is currently visible on the screen. + * @see GetCanvasN(const Tizen::Graphics::Rectangle&) const + * @see GetCanvasN(int, int, int, int) const * @code * result * MyForm::OnDraw(void) @@ -1289,11 +1271,12 @@ public: * Canvas* pCanvas = GetCanvasN(); * if (pCanvas != null) * { - * // add your drawing code here - * } - * if (pCanvas) + * // adds your drawing code here + * * delete pCanvas; - * // Do not call Show(). It will be called automatically after OnDraw() callback. + * } + * Form::OnDraw(); + * // Do not call Show(). It will be called automatically after OnDraw() callback. * return r; * } * @endcode @@ -1307,24 +1290,24 @@ public: * * @return The graphic canvas of the control, @n * else @c null if an exception occurs - * @param[in] bounds The bounds of the graphic canvas - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control. + * @param[in] bounds The bounds of the graphic canvas + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only the graphic canvas of displayable controls can be obtained. - * If the specified area is not inside the control, - * the graphics canvas of overlapped area between the control and the specified bound is returned. @n - * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, - * if custom drawing is performed on the graphic canvas of Frame and Form - * then it will appear on the screen regardless of which control is currently visible on the screen. - * @see GetCanvasN(void) const - * @see GetCanvasN(int x, int y, int width, int height) const + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - Only the graphic canvas of displayable controls can be obtained. + * If the specified area is not inside the control, + * the graphics canvas of overlapped area between the control and the specified bound is returned. + * - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control. + * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method + * if the size or position of the control is changed. + * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, + * if custom drawing is performed on the graphic canvas of Frame and Form + * then it will appear on the screen regardless of which control is currently visible on the screen. + * @see GetCanvasN() const + * @see GetCanvasN(int, int, int, int) const */ Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const; @@ -1335,24 +1318,24 @@ public: * * @return The graphic canvas of the control, @n * else @c null if an exception occurs - * @param[in] bounds The bounds of the graphic canvas + * @param[in] bounds The bounds of the graphic canvas * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only the graphic canvas of displayable controls can be obtained. - * If the specified area is not inside the control, - * the graphics canvas of overlapped area between the control and the specified bound is returned. @n - * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. - * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, - * if custom drawing is performed on the graphic canvas of Frame and Form - * then it will appear on the screen regardless of which control is currently visible on the screen. - * @see GetCanvasN(void) const - * @see GetCanvasN(float x, float y, float width, float height) const + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - Only the graphic canvas of displayable controls can be obtained. + * If the specified area is not inside the control, + * the graphics canvas of overlapped area between the control and the specified bound is returned. + * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. + * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged. + * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method + * if the size or position of the control is changed. + * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, + * if custom drawing is performed on the graphic canvas of Frame and Form + * then it will appear on the screen regardless of which control is currently visible on the screen. + * @see GetCanvasN() const + * @see GetCanvasN(float, float, float, float) const */ Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const; @@ -1363,27 +1346,27 @@ public: * * @return The graphic canvas of the control, @n * else @c null if an exception occurs - * @param[in] x The x position relative to the top-left corner of the control - * @param[in] y The y position relative to the top-left corner of the control - * @param[in] width The width of a graphic canvas - * @param[in] height The height of a graphic canvas + * @param[in] x The x position relative to the top-left corner of the control + * @param[in] y The y position relative to the top-left corner of the control + * @param[in] width The width of a graphic canvas + * @param[in] height The height of a graphic canvas * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified bounds do not intercept with the bounds of the control. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only the graphic canvas of displayable controls can be obtained. - * If the specified area is not inside the control, - * the graphics canvas of the overlapped area between the control and the specified bound is returned. @n - * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged. - * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, - * if custom drawing is performed on the graphic canvas of Frame and Form - * then it will appear on the screen regardless of which control is currently visible on the screen. - * @see GetCanvasN(void) const - * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - Only the graphic canvas of displayable controls can be obtained. + * If the specified area is not inside the control, + * the graphics canvas of the overlapped area between the control and the specified bound is returned. + * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. + * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged. + * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method + * if the size or position of the control is changed. + * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, + * if custom drawing is performed on the graphic canvas of Frame and Form + * then it will appear on the screen regardless of which control is currently visible on the screen. + * @see GetCanvasN() const + * @see GetCanvasN(const Tizen::Graphics::Rectangle&) const */ Tizen::Graphics::Canvas* GetCanvasN(int x, int y, int width, int height) const; @@ -1394,27 +1377,28 @@ public: * * @return The graphic canvas of the control, @n * else @c null if an exception occurs - * @param[in] x The x position relative to the top-left corner of the control - * @param[in] y The y position relative to the top-left corner of the control - * @param[in] width The width of a graphic canvas - * @param[in] height The height of a graphic canvas + * @param[in] x The x position relative to the top-left corner of the control + * @param[in] y The y position relative to the top-left corner of the control + * @param[in] width The width of a graphic canvas + * @param[in] height The height of a graphic canvas * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified bounds do not intercept with the bounds of the control. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks Only the graphic canvas of displayable controls can be obtained. - * If the specified area is not inside the control, - * the graphics canvas of the overlapped area between the control and the specified bound is returned. @n - * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. - * It is the developer's responsibility to deallocate the canvas after use. - * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged. - * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method - * if the size or position of the control is changed. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, - * if custom drawing is performed on the graphic canvas of Frame and Form - * then it will appear on the screen regardless of which control is currently visible on the screen. - * @see GetCanvasN(void) const - * @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - Only the graphic canvas of displayable controls can be obtained. + * If the specified area is not inside the control, + * the graphics canvas of the overlapped area between the control and the specified bound is returned. + * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control. + * It is the developer's responsibility to deallocate the canvas after use. + * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged. + * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method + * if the size or position of the control is changed. + * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore, + * if custom drawing is performed on the graphic canvas of Frame and Form + * then it will appear on the screen regardless of which control is currently visible on the screen. + * @see GetCanvasN() const + * @see GetCanvasN(const Tizen::Graphics::FloatRectangle&) const */ Tizen::Graphics::Canvas* GetCanvasN(float x, float y, float width, float height) const; @@ -1423,9 +1407,9 @@ public: * * @since 2.0 * - * @return @c true if the control is currently visible on the screen, @n - * else @c false - * @remarks If this method is called before the control is added to a parent, @c false is returned. + * @return @c true if the show states of the specified control and its ancestor controls are set to @c true, @n + * else @c false if this method is called before the control is added to a parent or the show state + * of the specified control or its parent control is set to @c false. * @see GetShowState() * @see SetShowState() */ @@ -1454,18 +1438,18 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * Note: This control cannot be displayed. * @exception E_SYSTEM A system error has occurred. - * @remarks Do not override this method. - * @remarks Even if this method is invoked, the control is not drawn or shown. @n - * To display the control, use the Invalidate() methods. @n - * Once the control's show state is set to @c false, - * the show state needs to be set to @c true again before you invalidate the control. + * @remarks + * - Even if this method is invoked, the control is not drawn or shown. @n + * To display the control, use the Invalidate() methods. @n + * Once the control's show state is set to @c false, + * the show state needs to be set to @c true again before you invalidate the control. * @see GetShowState() * @see Invalidate() */ result SetShowState(bool state); /** - * Gets the dedicated %VisualElement instance for this control. + * Gets a dedicated %VisualElement instance for this control. * * @since 2.0 * @@ -1525,8 +1509,9 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * Note: The control does not permit to change its focus ability. * @exception E_SYSTEM A system error has occurred. - * @remarks The focus ability of the container classes like Panel is @c false by default. - * @remarks The RadioGroup class does not render the UI. + * @remarks + * - The focus ability of the container classes like Panel is @c false by default. + * - The RadioGroup class does not render the UI. * Therefore, RadioGroup::SetFocusable() returns @c E_SYSTEM. */ result SetFocusable(bool focusable); @@ -1537,8 +1522,7 @@ public: * @since 2.0 * * @return @c true if the control currently has the input focus, @n - * else @c false - * @remarks If this method is called before the control is added to a parent, @c false is returned. + * else @c false either this method is called before the control is added to a parent or the control currently has not the input focus * @see SetFocus() */ bool HasFocus(void) const; @@ -1554,7 +1538,6 @@ public: * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * Note: This control cannot be displayed. * @exception E_INVALID_CONDITION The control is not contained in, or is not the top z-order frame or form. - * @remarks Do not override this method. */ result SetFocus(void); @@ -1564,8 +1547,7 @@ public: * @since 2.0 * * @return @c true if the control is enabled, @n - * else @c false - * @remarks If this method is called before the control is added to a parent, @c false is returned. + * else @c false either this method is called before the control is added to a parent or the control is disabled * @see SetEnabled() */ bool IsEnabled(void) const; @@ -1581,7 +1563,6 @@ public: * @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_SYSTEM A system error has occurred. - * @remarks Do not override this method. */ result SetEnabled(bool enable); @@ -1592,9 +1573,8 @@ public: * @since 2.0 * * @return @c true if the device is in touch mode, @n - * else @c false - * @remarks This method returns @c false, for devices with QWERTY keyboard. - * The user can navigate the UI using directional keys. + * else @c false the device is either with QWERTY keyboard or not in touch mode + * @remarks The user can navigate the UI using directional keys if the device is with QWERTY keyboard. */ bool IsInTouchMode(void) const; @@ -1615,22 +1595,21 @@ public: * @since 2.0 * * @param[in] enable Set to @c true to enable drop operations, @n - * else @c false + * else @c false * @remarks To receive drop event, control's drag property has to be enabled. * @see SetDragEnabled() */ void SetDropEnabled(bool enable); /** - * Sends a user event to the control. + * Sends a user event to the control. @n + * The %SendUserEvent() method posts a user event in the event queue and returns immediately to support asynchronous actions of the framework. * * @since 2.0 * - * @param[in] requestId The user-defined event ID - * @param[in] pArgs A pointer to the argument list - * @remarks This method posts a user event in the event queue - * and returns immediately to support asynchronous actions of the framework. - * @see OnUserEventReceived() + * @param[in] requestId The user-defined event ID + * @param[in] pArgs A pointer to the argument list + * @see OnUserEventReceivedN() */ void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const; @@ -1638,17 +1617,19 @@ public: * Stops the current UI event dispatch sequence by indicating the current input event is consumed. * * @brief [Deprecated] - * @deprecated This method is deprecated. Instead of using this method, use IPropagatedKeyEventListener or IPropagatedTouchEventListener to consume event. @n To propagate the event, return @c true inside the implementation of IPropagatedKeyEventListener or IPropagatedTouchEventListener. + * @deprecated This method is deprecated. Instead of using this method, use IPropagatedKeyEventListener or IPropagatedTouchEventListener to consume event. @n + * To propagate the event, return @c true inside the implementation of IPropagatedKeyEventListener or IPropagatedTouchEventListener. * @since 2.0 * - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @remarks If this method is invoked during an UI event (key or touch) propagation sequence, - * the method will stop the propagation and consequently the system will not be notified of the event.@n - * The method will not have any effect if no UI event is being dispatched. @n - * It is recommended that this method is called within IKeyEventListener or - * ITouchEventListener to stop the event from propagating to the next step. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - If this method is invoked during an UI event (key or touch) propagation sequence, + * the method will stop the propagation and consequently the system will not be notified of the event. + * - The method will not have any effect if no UI event is being dispatched. + * - It is recommended that this method is called within IKeyEventListener or ITouchEventListener to stop the event from propagating to + * the next step. */ result ConsumeInputEvent(void); @@ -1671,7 +1652,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] gestureDetector The gesture detector + * @param[in] gestureDetector The gesture detector * @exception E_SUCCESS The method is successful. * @see RemoveGestureDetector() */ @@ -1698,8 +1679,8 @@ public: * @deprecated This method is deprecated. * @since 2.0 * - * @return An error code - * @param[in] gestureDetector The gesture detector + * @return An error code + * @param[in] gestureDetector The gesture detector * @exception E_SUCCESS The method is successful. * @see AddGestureDetector() */ @@ -1728,8 +1709,9 @@ public: * * @return The composite mode * @exception E_SUCCESS The method is successful. - * @remarks Since API version 2.1, this method only returns COMPOSITE_MODE_ALPHA_BLENDING. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks + * - Since API version 2.1, this method only returns @c COMPOSITE_MODE_ALPHA_BLENDING. + * - The specific error code can be accessed using the GetLastResult() method. * @endif */ Tizen::Ui::CompositeMode GetCompositeMode(void) const; @@ -1746,7 +1728,7 @@ public: * @param[in] compositeMode The composite mode * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION The method is not supported. - * @remarks In Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed. + * @remarks In %Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed. * Otherwise, this method returns @c E_UNSUPPORTED_OPERATION. * @endif */ @@ -1762,8 +1744,9 @@ public: * * @return The chroma key color * @exception E_UNSUPPORTED_OPERATION The method is not supported. - * @remarks In Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0). - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks + * - In %Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0). + * - The specific error code can be accessed using the GetLastResult() method. * @endif */ Tizen::Graphics::Color GetChromaKeyColor(void) const; @@ -1779,7 +1762,7 @@ public: * @return An error code * @param[in] chromaKeyColor The chroma key color * @exception E_UNSUPPORTED_OPERATION The method is not supported. - * @remarks In Tizen, this method always fails. + * @remarks In %Tizen, this method always fails. * @endif */ result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor); @@ -1787,10 +1770,11 @@ public: /** * Sets the bounds of the content area. * - * @since 2.1 + * @since 2.1 * - * @param[in] rect The bounds of the content area - * @see GetContentAreaBounds() + * @param[in] rect The bounds of the content area + * @remarks The content area can be used for the fitting policy of layout is ::FIT_POLICY_CONTENT. + * @see GetContentAreaBounds() */ void SetContentAreaBounds(const Tizen::Graphics::Rectangle& rect); @@ -1799,8 +1783,9 @@ public: * * @since 2.1 * - * @param[in] rect The bounds of the content area - * @see GetContentAreaBoundsF() + * @param[in] rect The bounds of the content area + * @remarks The content area can be used for the fitting policy of layout is ::FIT_POLICY_CONTENT. + * @see GetContentAreaBoundsF() */ void SetContentAreaBounds(const Tizen::Graphics::FloatRectangle& rect); @@ -1809,8 +1794,8 @@ public: * * @since 2.1 * - * @return The bounds of the content area - * @see SetContentAreaBounds() + * @return The bounds of the content area + * @see SetContentAreaBounds() */ Tizen::Graphics::Rectangle GetContentAreaBounds(void) const; @@ -1819,8 +1804,8 @@ public: * * @since 2.1 * - * @return The bounds of the content area - * @see SetContentAreaBoundsF() + * @return The bounds of the content area + * @see SetContentAreaBounds() */ Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const; @@ -1834,10 +1819,11 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION This method is not supported. * @exception E_SYSTEM A system error has occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks This method is not supported in the following class that is derived from Panel class: + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - This method is not supported in the following class that is derived from Panel class: * @li OverlayPanel - * @remarks The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene. + * - The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene. */ Tizen::Graphics::Bitmap* GetCapturedBitmapN(void) const; @@ -1906,28 +1892,28 @@ public: AccessibilityContainer* GetAccessibilityContainer(void); /** - * Sets a propagated touch event listener to the %Control instance. @n - * The registered listener is notified when a touch event occurs in the control. Using the propagated touch event listener, an application can control the touch event routing path. + * Sets a propagated touch event listener to a %Control instance. @n + * The registered listener is notified when a touch event occurs in the control. Using the propagated touch event listener, + * an application can control the touch event routing path. * * @since 2.1 * - * @param[in] pListener The event listener to which the propagated touch events are dispatched + * @param[in] pListener The event listener to which the propagated touch events are dispatched @n + * Pass @c null to unregister the event listener. * @remarks The specified event listener should be allocated in heap memory. - * To unregister the event listener, pass @c null to @c pListener. - */ void SetPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener); /** - * Sets a propagated key event listener to the %Control instance. - * The registered listener is notified when a key event occurs in the control. Using the propagated key event listener, an application can control the key event routing path. + * Sets a propagated key event listener to a %Control instance. + * The registered listener is notified when a key event occurs in the control. Using the propagated key event listener, an application + * can control the key event routing path. * * @since 2.1 * - * @param[in] pListener The event listener to which the propagated touch events are dispatched + * @param[in] pListener The event listener to which the propagated touch events are dispatched @n + * Pass @c null to unregister the event listener. * @remarks The specified event listener should be allocated in heap memory. - * To unregister the event listener, pass @c null to @c pListener. - */ void SetPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener); @@ -1937,9 +1923,11 @@ public: * * @since 2.1 * - * @param[in] pPreviousFocus The pointer to the previous focus of the control - * @remarks Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior. - * @remarks The platform will not take the ownership of @c pPreviousFocus after this call. + * @param[in] pPreviousFocus The pointer to the previous focus of the control + * @remarks + * - Focus UI supports linear navigation of controls from top-left to bottom-right direction. + * This method allows for customizing the default navigation behavior. + * - The platform will not take the ownership of @c pPreviousFocus after this call. * @see SetNextFocus() * @see GetPreviousFocus() */ @@ -1950,9 +1938,11 @@ public: * * @since 2.1 * - * @param[in] pNextFocus The pointer to the next focus of the control - * @remarks Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior. - * @remarks The platform will not take the ownership of @c pNextFocus after this call. + * @param[in] pNextFocus The pointer to the next focus of the control + * @remarks + * - Focus UI supports linear navigation of controls from top-left to bottom-right direction. + * This method allows for customizing the default navigation behavior. + * - The platform will not take the ownership of @c pNextFocus after this call. * @see SetPreviousFocus() * @see GetNextFocus() */ @@ -1984,15 +1974,14 @@ public: Control* GetNextFocus(void) const; /** - * Sets the touch press threshold of the Control in inch. + * Sets the touch press threshold of the Control in inch. @n + * The touch move events will be fired if the move distance exceeds the set allowance value. For example, set 0.5 if the distance is 0.5 inch. * * @since 2.1 * * @param[in] distance The logical threshold to fire touch move event - * @remarks A touch move events will start to fire if the move distance exceeds the set allowance value. - * For example, Set 0.5 if the distance is 0.5 inch. - * This method is offered to control sensitivity of move events. - */ + * @remarks This method is offered to control sensitivity of move events. + */ void SetTouchPressThreshold(float distance); /** @@ -2039,7 +2028,7 @@ public: * * @param[in] enable Set to @c true to enable effect sound, @n * else @c false - * @remarks If the effect sound is disabled for a container, then all of its child controls also will have the effect sound disabled. + * @remarks If the effect sound is disabled for a container, then all of its child controls also will have the effect sound disabled. */ void SetEffectSoundEnabled (bool enable); @@ -2074,48 +2063,47 @@ protected: * @deprecated This method is deprecated. * @since 2.0 * - * @return The default touch event listener @n - * If no listener has been set or a system error has occurred @c null is returned. + * @return The default touch event listener @n + * If no listener has been set or a system error has occurred @c null is returned. * @see SetDefaultTouchEventListener() */ ITouchEventListener* GetDefaultTouchEventListener(void) const; /** - * Sets the default key event listener. + * Sets the default key event listener. @n + * The registered listener will be notified to handle the key events after all application event listeners has been notified. * * @brief [Deprecated] * @deprecated This method is deprecated. Instead of using this method, use the SetPropagatedKeyEventListener() method. * @since 2.0 * - * @return An error code - * @param[in] pDefaultListener The default key event listener - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @remarks The registered listener will be notified to handle the key events - * after all application event listeners has been notified. - * @see GetDefaultkeyEventListener() + * @return An error code + * @param[in] pDefaultListener The default key event listener + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetDefaultkeyEventListener() */ result SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener); /** - * Sets the default touch event listener. + * Sets the default touch event listener. @n + * The registered listener will be notified to handle the touch events after all application event listeners has been notified. * * @brief [Deprecated] * @deprecated This method is deprecated. Instead of using this method, use the SetPropagatedTouchEventListener() method. * @since 2.0 * - * @return An error code - * @param[in] pDefaultListener The default key event listener - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @remarks The registered listener will be notified to handle the touch events - * after all application event listeners has been notified. - * @see GetDefaultTouchEventListener() + * @return An error code + * @param[in] pDefaultListener The default key event listener + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetDefaultTouchEventListener() */ result SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener); /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct() method must be called right after calling this constructor. * * @since 2.0 */ diff --git a/inc/FUiControls.h b/inc/FUiControls.h index a885eed..e600fd7 100644 --- a/inc/FUiControls.h +++ b/inc/FUiControls.h @@ -17,9 +17,9 @@ /** * @file FUiControls.h - * @brief This is the header file for the %Tizen::Ui::Controls namespace. + * @brief This is the header file for the %Controls namespace. * - * This header file contains the declarations and descriptions of the %Tizen::Ui::Controls namespace. + * This header file contains the declarations and descriptions of the Controls namespace. */ #ifndef _FUI_CONTROLS_H_ @@ -153,7 +153,7 @@ namespace Tizen { /** * @namespace Tizen::Ui::Controls - * @brief This namespace contains the classes and interfaces for creating rich user interface components for the applications. + * @brief This namespace contains classes and interfaces for creating rich user interface components for the applications. * @since 2.0 * * @remarks @b %Header @b %file: @b \#include @b @n @@ -177,10 +177,10 @@ namespace Controls * The system color for the text that appears in the indicator and the command area (for example, Header and Footer). * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_TITLE_TEXT; @@ -190,10 +190,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_TITLE_TEXT; * The system color for the text that appears in controls, has a different background color than that of its parent (for example, Button). * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BODY_TEXT; @@ -203,10 +203,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BODY_TEXT; * The system default foreground color (for example, Label and CheckButton). * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FOREGROUND; @@ -216,10 +216,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FOREGROUND; * The system default background color (for example, Label, Panel, and ScrollPanel). * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BACKGROUND; @@ -229,10 +229,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BACKGROUND; * The system default color for the List background. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_BACKGROUND; @@ -242,10 +242,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_BACKGROUND; * The system default color for the Form background. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_BACKGROUND; @@ -255,10 +255,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_BACKGROUND; * The system default color for the background of the Form with grouped style child controls. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_GROUP_BACKGROUND; @@ -268,10 +268,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_GROUP_BACKGRO * The system default color for the Popup background. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_POPUP_BACKGROUND; @@ -281,10 +281,10 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_POPUP_BACKGROUND; * The system default color of the group item text. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_GROUP_ITEM_TEXT; @@ -294,36 +294,36 @@ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_GROUP_ITEM_TEXT; * The system default color of the list text. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_TEXT; /** * @if OSPDEPREC - * The system default color of the list item text, when an item is selected. + * The system default color of the list item text when an item is selected. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_PRESSED_TEXT; /** * @if OSPDEPREC - * The system default color of the list element text when the item is highlighted. + * The system default color of the list element text when an item is highlighted. * * @brief [Deprecated] - * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. - * @since 2.0 + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * @since 2.0 * - * @remarks Different color values can be defined for different device models. + * @remarks Different color values can be defined for different device models. * @endif */ _OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_HIGHLIGHTED_TEXT; diff --git a/inc/FUiCtrlAnimation.h b/inc/FUiCtrlAnimation.h index c70db12..321343c 100644 --- a/inc/FUiCtrlAnimation.h +++ b/inc/FUiCtrlAnimation.h @@ -56,7 +56,7 @@ enum AnimationStatus /** * @class Animation - * @brief This class defines the common behavior of an %Animation control. + * @brief This class defines the common behavior of an %Animation control. * * @since 2.0 * @@ -211,15 +211,14 @@ public: * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created window along with * its width and height.@n + * The size of the control must be within the range defined by the minimum size and the maximum size. @n * The optimal size of the control is defined in - * Optimal Size of UI Controls. - * @param[in] aniFrames An IList of %AnimationFrames used in the animation + * Optimal Size of UI Controls. + * @param[in] aniFrames An Tizen::Base::Collection::IList of %AnimationFrames used in the animation * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks - * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::Collection::IList& aniFrames); @@ -233,15 +232,14 @@ public: * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created window along with * its width and height.@n + * The size of the control must be within the range defined by the minimum size and the maximum size. @n * The optimal size of the control is defined in - * Optimal Size of UI Controls. - * @param[in] aniFrames An IList of %AnimationFrames used in the animation + * Optimal Size of UI Controls. + * @param[in] aniFrames An Tizen::Base::Collection::IList of %AnimationFrames used in the animation * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks - * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::Collection::IList& aniFrames); @@ -270,12 +268,12 @@ public: /** - * Sets the repeat count of the animation. @n - * If this value is not set, the default value is @c 1. + * Sets the repeat count of the animation. * * @since 2.0 * - * @param[in] count The repeat count + * @param[in] count The repeat count @n + * If this value is not set, the default value is @c 1. */ void SetRepeatCount(int count); diff --git a/inc/FUiCtrlAnimationFrame.h b/inc/FUiCtrlAnimationFrame.h index b5d935c..2f8a4f9 100644 --- a/inc/FUiCtrlAnimationFrame.h +++ b/inc/FUiCtrlAnimationFrame.h @@ -76,7 +76,7 @@ public: ~AnimationFrame(void); /** - * Sets the bitmap to be displayed during animation play. + * Sets the bitmap to be displayed during animation play. * * @since 2.0 * diff --git a/inc/FUiCtrlButton.h b/inc/FUiCtrlButton.h index 2161c31..1961375 100644 --- a/inc/FUiCtrlButton.h +++ b/inc/FUiCtrlButton.h @@ -198,15 +198,15 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the top-left corner - * of the created window along with its width and height.@n + * This instance represents the x and y coordinates of the top-left corner of the created + * window along with its width and height.@n * The optimal size of the control is defined in - * Optimal Size of UI Controls. - * @param[in] text The text to display on the button + * Optimal Size of UI Controls. + * @param[in] text The text to display on the button @n * To display the text in multi-lines or to denote the end of line, use '\\n'. - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& text = L""); @@ -219,15 +219,15 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner - * of the created window along with its width and height.@n + * This instance represents the x and y coordinates of the top-left corner of the created window + * along with its width and height.@n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @param[in] text The text to display on the button @n - * To display the text in multi-lines or to denote the end of line, use '\\n'. - * @exception E_SUCCESS The method is successful. + * To display the text in multi-lines or to denote the end of line, use '\\n'. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& text = L""); @@ -276,7 +276,7 @@ public: * @since 2.0 * * @param[in] text The text of the button @n - * To display text in multi-lines or to denote the end of line, use '\\n'. + * To display text in multi-lines or to denote the end of line, use '\\n'. */ void SetText(const Tizen::Base::String& text); @@ -388,7 +388,7 @@ public: * * @since 2.0 * - * @param[in] color The color to set + * @param[in] color The color to set * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted. */ void SetHighlightedTextColor(const Tizen::Graphics::Color& color); @@ -398,8 +398,8 @@ public: * * @since 2.0 * - * @return The highlighted text color - * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted. + * @return The highlighted text color + * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted. */ Tizen::Graphics::Color GetHighlightedTextColor(void) const; @@ -580,12 +580,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] size The text size - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c size must be greater than @c 0. - * @exception E_SYSTEM A system error has occurred. - * @see GetTextSize() + * @param[in] size The text size @n + * The size must be greater than @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextSize() */ result SetTextSize(int size); @@ -595,12 +595,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] size The text size - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c size must be greater than @c 0. - * @exception E_SYSTEM A system error has occurred. - * @see GetTextSize() + * @param[in] size The text size @n + * The size must be greater than @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextSize() */ result SetTextSize(float size); diff --git a/inc/FUiCtrlButtonItem.h b/inc/FUiCtrlButtonItem.h index 3412eab..bc7227c 100644 --- a/inc/FUiCtrlButtonItem.h +++ b/inc/FUiCtrlButtonItem.h @@ -109,10 +109,10 @@ public: * * @return An error code * @param[in] style The style of the button item - * @param[in] actionId The action ID of the button item + * @param[in] actionId The action ID of the button item @n + * The value must be a positive integer. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c actionId of the specified item must be a positive integer. + * @exception E_INVALID_ARG A specified input parameter is invalid. */ result Construct(ButtonItemStyle style, int actionId); @@ -148,10 +148,10 @@ public: * * @since 2.0 * @return An error code - * @param[in] actionId The action ID of the button item - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c actionId of the specified item must be a positive integer. + * @param[in] actionId The action ID of the button item @n + * The value must be a positive integer. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. */ result SetActionId(int actionId); @@ -167,7 +167,7 @@ public: * else @c null if no bitmap image is displayed * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks If the size is greater than the default size, the bitmap image is scaled accordingly. + * @remarks If the size of the bitmap is greater than the default size, the bitmap image is scaled accordingly. */ result SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); @@ -180,12 +180,11 @@ public: * @return An error code * @param[in] status The item status * @param[in] pIcon The icon to set, @n - * else @c null if no icon is displayed + * else @c null if no icon is displayed @n + * If an icon is not set for a state, the icon for @c BUTTON_ITEM_STATUS_NORMAL is used. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks - * - If the style of %ButtonItem is @c BUTTON_ITEM_STYLE_TEXT, the method returns @c E_INVALID_OPERATION. - * - If an icon is not set for a state, the icon for @c BUTTON_ITEM_STATUS_NORMAL is used. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * - The style of %ButtonItem is @c BUTTON_ITEM_STYLE_TEXT. */ result SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon); @@ -196,14 +195,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] text The text to set + * @param[in] text The text to set @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The style of %ButtonItem is ::BUTTON_ITEM_STYLE_ICON. - * @remarks - * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and the ellipsis is applied if the text - * is longer than two lines. - * - Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * - The style of %ButtonItem is ::BUTTON_ITEM_STYLE_ICON. + * @remarks If the text cannot be displayed in a line, then the text is automatically displayed in two lines and + * the ellipsis is applied if the text is longer than two lines. */ result SetText(const Tizen::Base::String& text); diff --git a/inc/FUiCtrlCheckButton.h b/inc/FUiCtrlCheckButton.h index a8397cc..e58d6fc 100644 --- a/inc/FUiCtrlCheckButton.h +++ b/inc/FUiCtrlCheckButton.h @@ -196,24 +196,24 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n + * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created window * along with the width and height of the window.@n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @param[in] style The style of the %CheckButton control * @param[in] backgroundStyle The background style set of the %CheckButton control - * @param[in] showTitle Set to @c true to enable the title, @n - * else @c false + * @param[in] showTitle Set to @c true to enable the title, @n + * else @c false * @param[in] text The text of the %CheckButton control * @param[in] groupStyle The group style of the %CheckButton control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified size is less than the minimum size of the control. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * - The specified size is less than the minimum size of the control. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * - The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::Rectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, const Tizen::Base::String& text = L"", GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -221,27 +221,27 @@ public: /** * Initializes this instance of %CheckButton with the specified parameters. * - * @since 2.1 + * @since 2.1 * * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n + * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created window * along with the width and height of the window.@n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @param[in] style The style of the %CheckButton control * @param[in] backgroundStyle The background style set of the %CheckButton control - * @param[in] showTitle Set to @c true to enable the title, @n - * else @c false + * @param[in] showTitle Set to @c true to enable the title, @n + * else @c false * @param[in] text The text of the %CheckButton control * @param[in] groupStyle The group style of the %CheckButton control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified size is less than the minimum size of the control. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * - The specified size is less than the minimum size of the control. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * - The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, const Tizen::Base::String& text = L"", GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -252,7 +252,7 @@ public: * @since 2.0 * * @param[in] select Set to @c true if the %CheckButton control is selected, @n - * else @c false + * else @c false */ void SetSelected(bool select); @@ -444,8 +444,8 @@ public: * @param[in] color The color to set * @param[in] status The status * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.@n - * The operation is not supported if the background style is ::BACKGROUND_STYLE_NONE. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * - The operation is not supported if the background style is ::BACKGROUND_STYLE_NONE. * @exception E_SYSTEM A system error has occurred. */ result SetColor(CheckButtonStatus status, const Tizen::Graphics::Color& color); @@ -468,7 +468,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The text color to set * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -478,11 +478,11 @@ public: /** * Gets the text color of the %CheckButton control for the pressed status. * - * @since 2.0 - * @return The text color, @n - * else RGBA (0, 0, 0, 0) if an error occurs + * @since 2.0 + * @return The text color, @n + * else RGBA (0, 0, 0, 0) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Color GetPressedTextColor(void) const; @@ -491,8 +491,8 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The pressed title text color + * @return An error code + * @param[in] color The pressed title text color * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ @@ -503,10 +503,10 @@ public: * * @since 2.0 * - * @return The title text color, @n - * else RGBA (0, 0, 0, 0) if an error occurs + * @return The title text color, @n + * else RGBA (0, 0, 0, 0) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Color GetPressedTitleTextColor(void) const; @@ -515,7 +515,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The text color to set * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -527,10 +527,10 @@ public: * * @since 2.0 * - * @return The text color, @n - * else RGBA (0, 0, 0, 0) if an error occurs + * @return The text color, @n + * else RGBA (0, 0, 0, 0) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Color GetHighlightedTextColor(void) const; @@ -539,8 +539,8 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The highlighted title text color + * @return An error code + * @param[in] color The highlighted title text color * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ @@ -563,7 +563,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The text color to set * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -575,10 +575,10 @@ public: * * @since 2.0 * - * @return The text color, @n - * else RGBA (0, 0, 0, 0) if an error occurs + * @return The text color, @n + * else RGBA (0, 0, 0, 0) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Color GetDisabledTextColor(void) const; @@ -587,8 +587,8 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] color The disabled title text color + * @return An error code + * @param[in] color The disabled title text color * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ @@ -599,10 +599,10 @@ public: * * @since 2.0 * - * @return The title text color, @n - * else RGBA (0, 0, 0, 0) if an error occurs + * @return The title text color, @n + * else RGBA (0, 0, 0, 0) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Color GetDisabledTitleTextColor(void) const; diff --git a/inc/FUiCtrlColorPicker.h b/inc/FUiCtrlColorPicker.h index d14d071..299f9e9 100644 --- a/inc/FUiCtrlColorPicker.h +++ b/inc/FUiCtrlColorPicker.h @@ -33,7 +33,7 @@ namespace Tizen { namespace Ui { namespace Controls /** * @class ColorPicker -* @brief This class defines the common behavior of a %ColorPicker control. +* @brief This class defines the common behavior of a %ColorPicker control. * * @since 2.0 * @@ -133,13 +133,14 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] point The position of this %ColorPicker in the container @n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if + * the control is used earlier. */ result Construct(const Tizen::Graphics::Point& point); @@ -148,13 +149,14 @@ public: * * @since 2.1 * - * @return An error code + * @return An error code * @param[in] point The position of this %ColorPicker in the container @n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if + * the control is used earlier. */ result Construct(const Tizen::Graphics::FloatPoint& point); @@ -172,7 +174,7 @@ public: * * @since 2.0 * - * @return The current hue value between @c 0 to @c 100. + * @return The current hue value between @c 0 to @c 100 */ int GetHue(void) const; @@ -181,7 +183,7 @@ public: * * @since 2.0 * - * @return The current saturation value between @c 0 to @c 100. + * @return The current saturation value between @c 0 to @c 100 */ int GetSaturation(void) const; @@ -190,14 +192,14 @@ public: * * @since 2.0 * - * @return The current luminance value between @c 0 to @c 100. + * @return The current luminance value between @c 0 to @c 100 */ int GetLuminance(void) const; /** * Sets the color value of %ColorPicker. * - * @since 2.0 + * @since 2.0 * * @param[in] color The color value */ @@ -206,9 +208,9 @@ public: /** * Sets the hue value of %ColorPicker. * - * @since 2.0 + * @since 2.0 * - * @param[in] hue The hue value of this object between @c 0 to @c 100. + * @param[in] hue The hue value of this object between @c 0 to @c 100 * */ void SetHue(int hue); @@ -216,9 +218,9 @@ public: /** * Sets the saturation value of %ColorPicker. * - * @since 2.0 + * @since 2.0 * - * @param[in] saturation The saturation value between @c 0 to @c 100. + * @param[in] saturation The saturation value between @c 0 to @c 100 * */ void SetSaturation(int saturation); @@ -226,9 +228,9 @@ public: /** * Sets the luminance value of %ColorPicker. * - * @since 2.0 + * @since 2.0 * - * @param[in] luminance The luminance value between @c 0 to @c 100. + * @param[in] luminance The luminance value between @c 0 to @c 100 * */ void SetLuminance(int luminance); @@ -239,7 +241,7 @@ public: * * @since 2.0 * - * @param[in] listener The event listener to add + * @param[in] listener The event listener to add * @see RemoveColorChangeEventListener() */ void AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); @@ -250,7 +252,7 @@ public: * * @since 2.0 * - * @param[in] listener The event listener to remove + * @param[in] listener The event listener to remove * @see AddColorChangeEventListener() */ void RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); diff --git a/inc/FUiCtrlContextMenu.h b/inc/FUiCtrlContextMenu.h index 852a22d..d2df11b 100644 --- a/inc/FUiCtrlContextMenu.h +++ b/inc/FUiCtrlContextMenu.h @@ -239,7 +239,6 @@ public: * For full construction, the %Construct() method must be called right after calling this constructor. * * @since 2.0 - * */ ContextMenu(void); @@ -259,13 +258,12 @@ public: * @return An error code * @param[in] point The x and y coordinates of the anchor of %ContextMenu @n * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * Optimal Size of UI Controls. * @param[in] style The context menu style * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE This instance has already been constructed. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style); @@ -278,10 +276,9 @@ public: * @param[in] point The x and y coordinates of the anchor of %ContextMenu * @param[in] style The context menu style * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE This instance has already been constructed. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style); @@ -297,10 +294,9 @@ public: * @param[in] style The context menu style * @param[in] direction The anchor arrow direction * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE This instance has already been constructed. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction); @@ -316,10 +312,9 @@ public: * @param[in] style The context menu style * @param[in] direction The anchor arrow direction * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE This instance has already been constructed. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction); @@ -718,11 +713,11 @@ public: * @return The color of %ContextMenu control, @n * else RGBA(0, 0, 0, 0) if an error occurs * @param[in] status The menu item status @n - * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the - * color of the %ContextMenu control. + * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the + * color of the %ContextMenu control. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * - The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -737,12 +732,12 @@ public: * * @return An error code * @param[in] status The menu item status @n - * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same - * as the color of the %ContextMenu control. - * @param[in] color The color to set + * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same + * as the color of the %ContextMenu control. + * @param[in] color The color to set * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * - The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. * @see GetItemColor() @@ -767,7 +762,8 @@ public: * * @return An error code * @param[in] maxItemsCount The maximum number of the visible menu items @n - * The value should be greater than @c 0 and less than @c 8, and the default value of the visible menu items is @c 4. + * The value should be greater than @c 0 and less than @c 8, and the default value of + * the visible menu items is @c 4. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified parameter is out of possible range. * @exception E_INVALID_STATE This instance is in an invalid state. diff --git a/inc/FUiCtrlCustomItem.h b/inc/FUiCtrlCustomItem.h index 778ef27..20b8c53 100644 --- a/inc/FUiCtrlCustomItem.h +++ b/inc/FUiCtrlCustomItem.h @@ -44,11 +44,12 @@ class _CustomItemImpl; /** * @class CustomItem - * @brief This class defines the common behavior for %CustomItem. + * @brief This class defines the common behavior for %CustomItem. * * @since 2.0 * - * The %CustomItem class displays a list item, which is the unit of handling a ListView or GroupedListView. It provides customized formatting of specific list items. + * The %CustomItem class displays a list item, which is the unit for handling a ListView or GroupedListView. It provides + * customized formatting of specific list items. * * For more information on the class features, see ListViews. * @@ -59,9 +60,8 @@ class _OSP_EXPORT_ CustomItem { public: /** - * The object is not fully constructed after this constructor is - * called. @n For full construction, the %Construct() method must be - * called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the %Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -79,11 +79,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] itemSize The size of the item - * @param[in] style The style of the annex - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] itemSize The size of the item + * @param[in] style The style of the annex + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style); @@ -92,11 +92,11 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] itemSize The size of the item - * @param[in] style The style of the annex - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] itemSize The size of the item + * @param[in] style The style of the annex + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); @@ -144,8 +144,8 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If the width of the specified @c text exceeds the width of the element and @c textSliding is set to @c true, the text slides - * automatically when the user long-presses. + * @remarks If the width of the specified @c text exceeds the width of the element and @c textSliding is set to @c true, + * the text slides automatically when the user long-presses. */ result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = true); @@ -178,7 +178,7 @@ public: * @param[in] elementId The element ID * @param[in] text The text string to add * @param[in] textSize The size of the text @n - * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen. + * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen. * @param[in] normalTextColor The color of the text in the normal status * @param[in] pressedTextColor The color of the text in the pressed status * @param[in] highlightedTextColor The color of the text in the highlighted status @@ -200,7 +200,7 @@ public: * @param[in] elementId The element ID * @param[in] text The text string to add * @param[in] textSize The size of the text @n - * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen. + * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen. * @param[in] normalTextColor The color of the text in the normal status * @param[in] pressedTextColor The color of the text in the pressed status * @param[in] highlightedTextColor The color of the text in the highlighted status @@ -294,7 +294,7 @@ public: result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, ICustomElementF& element); /** - * Removes the element from the %CustomItem control. + * Removes all the elements from the %CustomItem control. * * @since 2.0 * @@ -309,11 +309,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] elementId The element ID - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] elementId The element ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. */ result RemoveElement(int elementId); @@ -322,13 +322,13 @@ public: * * @since 2.0 * - * @param[in] elementId The element ID - * @param[in] enable Set to @c true to make only the element selected when touched, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. - * @remarks Based on the selection type of an element, the area within which the background color changes is different when an element is touched. + * @param[in] elementId The element ID + * @param[in] enable Set to @c true to make only the element selected when touched, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks Based on the selection type of an element, the area within which the background color changes is different when an element is touched. */ result SetElementSelectionEnabled(int elementId, bool enable); @@ -337,12 +337,11 @@ public: * * @since 2.0 * - * @param[in] elementId The element ID - * @param[in] alignment The horizontal alignment of text + * @param[in] elementId The element ID + * @param[in] alignment The horizontal alignment of text * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The specified element does not handle text.@n - * The specified element does not contain text. + * @exception E_INVALID_OPERATION The specified element either does not handle text or does not contain text. * @exception E_SYSTEM A system error has occurred. */ result SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment); @@ -352,12 +351,11 @@ public: * * @since 2.0 * - * @param[in] elementId The element ID - * @param[in] alignment The vertical alignment of text + * @param[in] elementId The element ID + * @param[in] alignment The vertical alignment of text * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The specified element does not handle text.@n - * The specified element does not contain text. + * @exception E_INVALID_OPERATION The specified element either does not handle text or does not contain text. * @exception E_SYSTEM A system error has occurred. */ result SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment); @@ -368,16 +366,15 @@ public: * @since 2.0 * * @return An error code - * @param[in] elementId The element ID - * @param[in] mask The auto-link mask @n - * Multiple link types can be combined using bitwise OR operator. @n For more information, - * see AutoLink Detection. @n - * If it is set to @c 0, the auto-link detection is disabled. + * @param[in] elementId The element ID + * @param[in] mask The auto-link mask @n + * Multiple link types of Tizen::Base::Utility::LinkType can be combined using bitwise OR operator. @n + * For more information, see AutoLink Detection. @n + * If the value is set to @c 0, the auto-link detection is disabled. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_INVALID_OPERATION The specified element does not handle text. * @exception E_SYSTEM A system error has occurred. - * @see Tizen::Base::Utility::LinkType */ result SetElementAutoLinkMask(int elementId, unsigned long mask); diff --git a/inc/FUiCtrlCustomList.h b/inc/FUiCtrlCustomList.h index e917217..ad5d4ab 100644 --- a/inc/FUiCtrlCustomList.h +++ b/inc/FUiCtrlCustomList.h @@ -57,13 +57,13 @@ namespace Tizen { namespace Ui { namespace Controls * list item is selected and deselected, it must implement ICustomItemEventListener and register the listener to receive events from * the custom list by calling the custom list's AddCustomItemEventListener() method. * - * Note that CustomListItem and CustomListItemFormat need to be created on a heap. The items of a custom list are deleted automatically - * when the %CustomList control is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat + * Note that %CustomListItem and %CustomListItemFormat need to be created on a heap. The items of a custom list are deleted automatically + * when the %CustomList control is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat * must be deleted by the application. * - * Refer to CustomListItem and CustomListItemFormat. + * For more information, see CustomListItem and CustomListItemFormat. * - * Example: + * The following example demonstrates how to use the %CustomList control. * * @image html ui_controls_customlist.png * @@ -324,7 +324,7 @@ public: * @param[in] itemDivider Set to @c true to display the divider, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks * - The size of the control must be within the range as defined by the minimum and maximum size. @@ -336,7 +336,7 @@ public: /** * @if OSPDEPREC - * Adds the custom item event listener instance. @n + * Adds a custom item event listener instance. @n * The added listener gets notified when the state of CustomListItem is changed. * * @brief [Deprecated] @@ -350,8 +350,8 @@ public: /** * @if OSPDEPREC - * Removes the custom item event listener instance. @n - * The removed listener is not notified even when custom item events are fired. + * Removes a custom item event listener instance. @n + * The removed listener is not notified when custom item events are fired. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use ListView class. @@ -372,13 +372,13 @@ public: * * @return An error code * @param[in] item The custom list item to add - * @param[in] itemId The item ID for the item + * @param[in] itemId The ID for the item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks * - The specified @c itemId can be used to identify a specific CustomListItem or - * to associate user-allocated resources. - * - Note that the custom list does not throw an exception if the same itemID is assigned to multiple items. + * to associate user-allocated resources. + * - Note that the custom list does not throw an exception if the same itemID is assigned to multiple items. * - The added item is deleted automatically when the list is destroyed. * - Do not add, insert, or set an item that already belongs to the %CustomList control. * @endif @@ -740,7 +740,7 @@ public: /** * @if OSPDEPREC - * Gets the color of the text to display when there is no item in the CustomList control. + * Gets the color of the text to display when there is no item in the %CustomList control. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use ListView class. @@ -759,24 +759,23 @@ public: * @deprecated This class is deprecated. Instead of using this class, use ListView class. * @since 2.0 * - * @return The index of the item, @n - * else @c -1 if no item has the specified item ID + * @return The index of the item, @n + * else @c -1 if no item has the specified item ID * @param[in] itemId The item ID of the %CustomList control item - * @remarks One or more indexes can have the same item ID, @n - * and this method returns the first item from such items. + * @remarks One or more indexes can have the same item ID, and this method returns the first item from such items. * @endif */ int GetItemIndexFromItemId(int itemId) const; /** * @if OSPDEPREC - * Gets the item ID of the item at the specified index. + * Gets the ID of the item at the specified index. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use ListView class. * @since 2.0 * - * @return The item ID of the item, @n + * @return The ID of the item, @n * else @c -1 if the specified @c index is less than @c 0 or greater than the item count * @param[in] index The index of the %CustomList control item * @endif @@ -819,7 +818,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c index is less than @c 0 or greater than the item count. + * The specified @c index is less than @c 0 or greater than the item count. * @endif */ result ScrollToTop(int index); diff --git a/inc/FUiCtrlCustomListItem.h b/inc/FUiCtrlCustomListItem.h index 789aaba..f1b010b 100644 --- a/inc/FUiCtrlCustomListItem.h +++ b/inc/FUiCtrlCustomListItem.h @@ -40,18 +40,17 @@ class CustomListItemFormat; * @class CustomListItem * @brief [Deprecated] This class defines the common behavior of an item of the CustomList control. * - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class. * @since 2.0 * - * The %CustomListItem class represents a custom list item which is the unit of - * handling of a custom list. A custom list item is composed of one or more elements, - * which can be texts and bitmaps. Custom drawable elements are also supported via + * The %CustomListItem class represents a custom list item which is the unit of handling of a custom list. A custom list item is + * composed of one or more elements, which can be texts and bitmaps. Custom drawable elements are also supported via * ICustomListElement. The value of the elements is set using %CustomListItem. * * Note that %CustomListItem needs to be created on a heap. CustomListItems will be deleted automatically - * when the CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). + * when CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). * - * Refer to CustomListItemFormat. + * For more information, see CustomListItemFormat. * * @endif */ @@ -65,7 +64,7 @@ public: * For full construction, the CustomListItem::Construct() method must be called right after calling this constructor. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. * * @since 2.0 * @endif @@ -78,7 +77,7 @@ public: * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. * @since 2.0 * @endif */ @@ -90,10 +89,10 @@ public: * Initializes this instance of %CustomListItem with the specified parameter. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class. + * @since 2.0 * - * @return An error code + * @return An error code * @param[in] itemHeight The height of %CustomListItem * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -106,12 +105,12 @@ public: * Sets the format of %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class. + * @since 2.0 * - * @param[in] itemFormat An instance of %CustomListItemFormat - * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from %CustomList, - * because %CustomListItemFormat is constantly used while %CustomListItem is added to CustomList. + * @param[in] itemFormat An instance of CustomListItemFormat + * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from CustomList, + * because %CustomListItemFormat is constantly used while %CustomListItem is added to %CustomList. * @endif */ void SetItemFormat(const CustomListItemFormat& itemFormat); @@ -131,11 +130,11 @@ public: * Sets the background bitmap image which is displayed when the item is focused. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * - * @param[in] bitmap The background bitmap image - * @remarks The specified bitmap is automatically scaled to the size of an associated item. + * @param[in] bitmap The background bitmap image + * @remarks The specified bitmap is automatically scaled to the size of an associated item. * @see SetNormalItemBackgroundBitmap() * @endif */ @@ -146,11 +145,11 @@ public: * Sets the background image of the item which is displayed when the item is in normal state. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * - * @param[in] bitmap The background bitmap image - * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item. + * @param[in] bitmap The background bitmap image + * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item. * @see SetFocusedItemBackgroudBitmap() * @endif */ @@ -161,12 +160,12 @@ public: * Sets the highlighted background image on the rectangle of each list item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * - * @param[in] bitmap The background image - * @remarks When a user navigates the user interface using the directional keys, @n - * the selected UI control is highlighted and takes the focus. + * @param[in] bitmap The background image + * @remarks When a user navigates the user interface using the directional keys, + * the selected UI control is highlighted and takes the focus. * @endif */ @@ -177,15 +176,15 @@ public: * Sets the text of the element for %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * * @return An error code * @param[in] elementId The ID of the element - * @param[in] text The text string to add - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @remarks To display text in multi-lines or to denote the end of line use '\\n'. + * @param[in] text The text string to add + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks To display text in multi-lines or to denote the end of line, use '\\n'. * @endif */ result SetElement(int elementId, const Tizen::Base::String& text); @@ -195,15 +194,15 @@ public: * Sets the bitmap of the element for %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * * @return An error code - * @param[in] elementId The ID of the element - * @param[in] normalBitmap The bitmap displayed when the item is in the normal state - * @param[in] pFocusedBitmap The bitmap displayed when the item is focused - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @param[in] elementId The ID of the element + * @param[in] normalBitmap The bitmap displayed when the item is in the normal state + * @param[in] pFocusedBitmap The bitmap displayed when the item is focused + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @endif */ result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap); @@ -214,16 +213,16 @@ public: * Sets the bitmap of the element for %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * - * @return An error code - * @param[in] elementId The ID of the element - * @param[in] normalBitmap The bitmap displayed when the item is in the normal state - * @param[in] pFocusedBitmap The bitmap displayed when the item is selected - * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] normalBitmap The bitmap displayed when the item is in the normal state + * @param[in] pFocusedBitmap The bitmap displayed when the item is selected + * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @endif */ result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); @@ -233,17 +232,17 @@ public: * Sets the custom element for %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * * @return An error code - * @param[in] elementId The ID of the element - * @param[in] element The custom element + * @param[in] elementId The ID of the element + * @param[in] element The custom element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList, @n - * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n - * Call RefreshItem() to draw the custom element that has been set with this method. + * @exception E_SYSTEM A system error has occurred. + * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList, + * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n + * Call RefreshItem() to draw the custom element that has been set with this method. * @endif */ result SetElement(int elementId, const ICustomListElement& element); @@ -253,13 +252,13 @@ public: * Sets the element ID of the checkbox of %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. * @since 2.0 * * @return An error code - * @param[in] elementId The ID of the element + * @param[in] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @endif */ result SetCheckBox(int elementId); @@ -269,11 +268,11 @@ public: * Gets the percentage value of %CustomListItem. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use CustomItem class - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 * * @return The percentage value, @n - * else @c -1 if a system error occurs + * else @c -1 if a system error occurs * @endif */ int GetValue(void) const; diff --git a/inc/FUiCtrlCustomListItemFormat.h b/inc/FUiCtrlCustomListItemFormat.h index e4fd5a0..7deefdc 100644 --- a/inc/FUiCtrlCustomListItemFormat.h +++ b/inc/FUiCtrlCustomListItemFormat.h @@ -50,7 +50,6 @@ namespace Tizen { namespace Ui { namespace Controls * be manually deleted because items are removed from memory by the List when * it is destroyed. * - * Refer to CustomListItem. * @endif */ class _OSP_EXPORT_ CustomListItemFormat @@ -106,8 +105,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] elementId The ID of the element - * @param[in] rect The bounds of the element + * @param[in] elementId The ID of the element + * @param[in] rect The bounds of the element * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @endif @@ -116,7 +115,7 @@ public: /** * @if OSPDEPREC - * Adds the %CustomListElement with bounds equal to @c rect and size of the text @c textSize. + * Adds the %CustomListElement with bounds equal to @c rect and size of the text equal to @c textSize. * * @brief [Deprecated] * @deprecated This class is deprecated. There is no need to use this class. @@ -140,14 +139,14 @@ public: * @deprecated This class is deprecated. There is no need to use this class. * @since 2.0 * - * @return An error code - * @param[in] elementId The ID of the element - * @param[in] rect The bounds of the element - * @param[in] textSize The size of the text - * @param[in] normalTextColor The color of the text in the normal status - * @param[in] focusedTextColor The color of the text in the focused status - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] rect The bounds of the element + * @param[in] textSize The size of the text + * @param[in] normalTextColor The color of the text in the normal status + * @param[in] focusedTextColor The color of the text in the focused status + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @endif */ result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor); @@ -160,15 +159,15 @@ public: * @deprecated This class is deprecated. There is no need to use this class. * @since 2.0 * - * @return An error code - * @param[in] elementId The ID of the element - * @param[in] rect The bounds of the element - * @param[in] textSize The size of the text - * @param[in] normalTextColor The color of the text in the normal status - * @param[in] focusedTextColor The color of the text in the focused status - * @param[in] highlightedTextColor The color of the text in the highlighted status - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] rect The bounds of the element + * @param[in] textSize The size of the text + * @param[in] normalTextColor The color of the text in the normal status + * @param[in] focusedTextColor The color of the text in the focused status + * @param[in] highlightedTextColor The color of the text in the highlighted status + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @endif */ result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor, const Tizen::Graphics::Color& highlightedTextColor); @@ -210,9 +209,9 @@ public: * @deprecated This class is deprecated. There is no need to use this class. * @since 2.0 * - * @return The ID of the next element of the specified element, @n - * else @c -1 if there is no element next to the element specified by @c elementId - * @param[in] elementId The ID of the element + * @return The ID of the next element of the specified element, @n + * else @c -1 if there is no element next to the element specified by @c elementId + * @param[in] elementId The ID of the element * @endif */ int GetNextElementId(int elementId) const; @@ -241,7 +240,7 @@ public: * * @return The ID of the next enabled element, @n * else @c -1 if no element after the specified element is enabled - * @param[in] elementId The ID of the element + * @param[in] elementId The ID of the element * @endif */ int GetNextEnabledElementId(int elementId) const; @@ -256,7 +255,7 @@ public: * * @return The ID of the previous enabled element, @n * else @c -1 if no element before the specified element is enabled - * @param[in] elementId The ID of the element + * @param[in] elementId The ID of the element * @endif */ int GetPreviousEnabledElementId(int elementId) const; @@ -269,9 +268,9 @@ public: * @deprecated This class is deprecated. There is no need to use this class. * @since 2.0 * - * @param[in] elementId The ID of the element - * @param[in] enable Set to @c true to allow the specified element to handle the events, @n - * else @c false + * @param[in] elementId The ID of the element + * @param[in] enable Set to @c true to allow the specified element to handle the events, @n + * else @c false * @endif */ void SetElementEventEnabled(int elementId, bool enable); @@ -282,11 +281,11 @@ public: * * @brief [Deprecated] * @deprecated This class is deprecated. There is no need to use this class. - * @since 2.0 + * @since 2.0 * * @return @c true if the event status is enabled, @n * else @c false - * @param[in] elementId The ID of the element + * @param[in] elementId The ID of the element * @endif */ bool IsElementEventEnabled(int elementId); diff --git a/inc/FUiCtrlCustomListTypes.h b/inc/FUiCtrlCustomListTypes.h index 31df1ae..9fdd91c 100644 --- a/inc/FUiCtrlCustomListTypes.h +++ b/inc/FUiCtrlCustomListTypes.h @@ -37,7 +37,7 @@ namespace Tizen { namespace Ui { namespace Controls * Defines the styles of CustomList. * * @brief [Deprecated] - * @deprecated This enum is deprecated. Instead of using this enum, use the ListAnnexStyle enumeration for the CustomItem or SimpleItem class. + * @deprecated This enum is deprecated. Instead of using this enum, use the ListAnnexStyle enumeration for the CustomItem or SimpleItem class. * @since 2.0 * @endif */ diff --git a/inc/FUiCtrlDatePicker.h b/inc/FUiCtrlDatePicker.h index 7d1aa71..a974c5e 100644 --- a/inc/FUiCtrlDatePicker.h +++ b/inc/FUiCtrlDatePicker.h @@ -303,8 +303,8 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] year The year value + * @return An error code + * @param[in] year The year value * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified year value is invalid. */ @@ -342,12 +342,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] minYear The minimum year for the valid range - * @param[in] maxYear The maximum year for the valid range - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The given year range is invalid. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] minYear The minimum year for the valid range + * @param[in] maxYear The maximum year for the valid range + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The given year range is invalid. + * @exception E_SYSTEM A system error has occurred. */ result SetYearRange(int minYear, int maxYear); @@ -356,11 +356,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[out] minYear The minimum year for the valid range - * @param[out] maxYear The maximum year for the valid range - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[out] minYear The minimum year for the valid range + * @param[out] maxYear The maximum year for the valid range + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. */ result GetYearRange(int& minYear, int& maxYear) const; diff --git a/inc/FUiCtrlDateTimePicker.h b/inc/FUiCtrlDateTimePicker.h index b410c80..17b6b44 100644 --- a/inc/FUiCtrlDateTimePicker.h +++ b/inc/FUiCtrlDateTimePicker.h @@ -199,9 +199,9 @@ public: virtual ~DateTimePicker(void); /** - * Adds the IDateTimeChangeEventListener instance. @n - * The added listener gets notified when date or time of the %DateTimePicker instance is changed either by user manipulation or by calling one of its - * setters. + * Adds an IDateTimeChangeEventListener instance. @n + * The added listener gets notified when date or time of the %DateTimePicker instance is changed either by user manipulation + * or by calling one of its setters. * * @since 2.0 * @@ -213,8 +213,8 @@ public: void AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener); /** - * Removes the IDateTimeChangeEventListener instance. @n - * The removed listener is not called even when the date and time change events are fired. + * Removes an IDateTimeChangeEventListener instance. @n + * The removed listener is not called when the date and time change events are fired. * * @since 2.0 * @@ -240,7 +240,7 @@ public: result Construct(const Tizen::Base::String& title = L""); /** - * Sets the date and time value of the %DateTimePicker control. + * Sets the date and time value of the %DateTimePicker control. * * @since 2.0 * @@ -262,7 +262,7 @@ public: * * @return An error code * @param[in] year The year value @n - * It should be in the range set by SetYearRange(). The default year range is from @c 1 to @c 9999. + * It should be in the range set by SetYearRange(). The default year range is from @c 1 to @c 9999. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c year value is invalid. * @exception E_SYSTEM A system error has occurred. @@ -277,7 +277,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] month The month value between @c 1 and @c 12. + * @param[in] month The month value between @c 1 and @c 12 * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c month value is invalid. * @exception E_SYSTEM A system error has occurred. @@ -290,7 +290,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] day The day value between @c 1 and @c 31. + * @param[in] day The day value between @c 1 and @c 31 * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c day value is invalid. * @exception E_SYSTEM A system error has occurred. @@ -303,7 +303,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] hour The hour value between @c 0 and @c 23. + * @param[in] hour The hour value between @c 0 and @c 23 * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c hour value is invalid. * @exception E_SYSTEM A system error has occurred. @@ -316,7 +316,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] minute The minute value between @c 0 and @c 59. + * @param[in] minute The minute value between @c 0 and @c 59 * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c minute value is invalid. * @exception E_SYSTEM A system error has occurred. @@ -333,7 +333,7 @@ public: Tizen::Base::DateTime GetDateTime(void) const; /** - * Gets the current year value of %DateTimePicker. @n + * Gets the current year value of %DateTimePicker. * * @since 2.0 * @@ -343,7 +343,7 @@ public: int GetYear(void) const; /** - * Gets the current month value of %DateTimePicker. @n + * Gets the current month value of %DateTimePicker. * * @since 2.0 * @@ -353,7 +353,7 @@ public: int GetMonth(void) const; /** - * Gets the current day value of %DateTimePicker. @n + * Gets the current day value of %DateTimePicker. * * @since 2.0 * @@ -363,13 +363,12 @@ public: int GetDay(void) const; /** - * Gets the current hour value of the %DateTimePicker control. @n + * Gets the current hour value of the %DateTimePicker control. * * @since 2.0 * - * @return The current hour value between @c 0 to @c 23, @n + * @return The current hour value between @c 0 to @c 23 regardless of whether the time display mode is 12-hour or 24-hour, @n * else @c -1 if an error occurs - * @remarks Whether the time display mode is 12-hour or 24-hour, this method always returns the hour value ranging from @c 0 to @c 23. */ int GetHour(void) const; @@ -402,15 +401,15 @@ public: bool Is24HourNotationEnabled(void) const; /** - * Sets the valid year range. @n + * Sets the valid year range. * * @since 2.0 * * @return An error code - * @param[in] minYear The minimum year for the valid range between @c 1 and @c 9999 - * @param[in] maxYear The maximum year for the valid range + * @param[in] minYear The minimum year for the valid range between @c 1 and @c 9999 + * @param[in] maxYear The maximum year for the valid range * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified year range is invalid. + * @exception E_INVALID_ARG The specified year range is invalid. * @exception E_SYSTEM A system error has occurred. */ result SetYearRange(int minYear, int maxYear); @@ -421,10 +420,10 @@ public: * @since 2.0 * * @return An error code - * @param[out] minYear The minimum year for the valid range - * @param[out] maxYear The maximum year for the valid range - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @param[out] minYear The minimum year for the valid range + * @param[out] maxYear The maximum year for the valid range + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. */ result GetYearRange(int& minYear, int& maxYear) const; diff --git a/inc/FUiCtrlEditArea.h b/inc/FUiCtrlEditArea.h old mode 100755 new mode 100644 index adfe8ec..015433c --- a/inc/FUiCtrlEditArea.h +++ b/inc/FUiCtrlEditArea.h @@ -151,7 +151,7 @@ public: EditArea(void); /** - * This polymorphic destructor should be overridden if required.@n + * This polymorphic destructor should be overridden if required. @n * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 @@ -173,8 +173,9 @@ public: * @param[in] limitLength The maximum limit of the length of the text that can be displayed by %EditArea * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified @c limitLength is less than or equal to @c 0. @n - * The @c rect.width or the @c rect.height is less than 0. + * Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - The @c rect.width or the @c rect.height is less than 0. * @exception E_SYSTEM A system error has occurred. * @remarks * - Some methods of the control will only work as expected when it becomes 'displayable'. @@ -198,8 +199,9 @@ public: * @param[in] limitLength The maximum limit of the length of the text that can be displayed by %EditArea * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid.@n - * The specified @c limitLength is less than or equal to @c 0. @n - * The @c rect.width or the @c rect.height is less than 0. + * Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - The @c rect.width or the @c rect.height is less than 0. * @exception E_SYSTEM A system error has occurred. * @remarks * - Some methods of the control will only work as expected when it becomes 'displayable'. @@ -363,8 +365,9 @@ public: * @param[in] multiplier The line spacing multiplier * @param[in] extra The extra line spacing * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the specified line spacing value cannot be supported. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified line spacing value cannot be supported. * @exception E_SYSTEM A system error has occurred. * @see GetLineSpacing() */ @@ -383,8 +386,9 @@ public: * @param[in] multiplier The line spacing multiplier * @param[in] extra The extra line spacing * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the specified line spacing value cannot be supported. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified line spacing value cannot be supported. * @exception E_SYSTEM A system error has occurred. * @see GetLineSpacingF() */ @@ -536,10 +540,10 @@ public: * Checks whether the text prediction is enabled. * * @since 2.0 - * @return @c true if the text prediction is enabled, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @see SetTextPredictionEnabled() + * @return @c true if the text prediction is enabled, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @see SetTextPredictionEnabled() */ bool IsTextPredictionEnabled(void) const; @@ -547,12 +551,12 @@ public: * Enables or disables the text prediction. * * @since 2.0 - * @param[in] enable Set to @c true to enable the text prediction, @n - * else @c false - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION This operation is not supported. - * @see IsTextPredictionEnabled() + * @param[in] enable Set to @c true to enable the text prediction, @n + * else @c false + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @see IsTextPredictionEnabled() */ result SetTextPredictionEnabled(bool enable); @@ -634,12 +638,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] size The text size + * @param[in] size The text size @n + * The value should be greater than or equal to minimum font size which is 4. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @n * The specified @c size cannot be a negative integer. * @exception E_SYSTEM A system error has occurred. - * @remarks The specified @c size should be greater than or equal to minimum font size which is 4. * @see GetTextSize() */ result SetTextSize(int size); @@ -650,12 +654,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] size The text size + * @param[in] size The text size @n + * The value should be greater than or equal to minimum font size which is 4.0f. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @n * The specified @c size cannot be a negative integer. * @exception E_SYSTEM A system error has occurred. - * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f. * @see GetTextSizeF() */ result SetTextSize(float size); @@ -930,7 +934,7 @@ public: * @param[in] enable The category value to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input mode category is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @n + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The specified @c categories cannot be supported with the current keypad style. * @exception E_SYSTEM A system error has occurred. * @see EditInputModeCategory @@ -1153,8 +1157,7 @@ public: * * @since 2.0 * - * @param[in] guideText The guide text - * @remarks This is the default text that is displayed in the %EditArea control when the focus is given to it. + * @param[in] guideText The guide text that is displayed in the %EditArea control when the focus is given to it. */ void SetGuideText(const Tizen::Base::String& guideText); @@ -1417,24 +1420,23 @@ public: result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); /** - * Gets the current input language. + * Gets the current input language of the keypad that is associated with the current %EditArea. * * @since 2.0 * * @return An error code * @param[out] language The current input language * @exception E_SUCCESS The method is successful. - * @remarks The application can get the current language of the keypad that is associated with the current %EditArea. */ result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; /** - * Sets the text filter. + * Sets the text filter. @n + * The %EditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not. * * @since 2.1 * * @param[in] pFilter The filter to set - * @remarks The %EditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not. */ void SetEditTextFilter(IEditTextFilter* pFilter); diff --git a/inc/FUiCtrlEditDate.h b/inc/FUiCtrlEditDate.h index 31cf3e7..76f9f07 100644 --- a/inc/FUiCtrlEditDate.h +++ b/inc/FUiCtrlEditDate.h @@ -37,7 +37,8 @@ namespace Tizen { namespace Ui { namespace Controls * * @since 2.0 * -* The %EditDate class displays a small, fixed-size selector that allows the user to select a date. Unlike the DatePicker, %EditDate can be placed in a container. +* The %EditDate class displays a small, fixed-size selector that allows the user to select a date. Unlike the DatePicker, +* %EditDate can be placed in a container. * * For more information on the class features, * see EditDate and EditTime. @@ -121,7 +122,7 @@ class _OSP_EXPORT_ EditDate public: /** * The object is not fully constructed after this constructor is called. @n - * For full construction, the %Construct() method must be called right after calling this constructor. + * For full construction, the %Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -129,7 +130,7 @@ public: /** * This polymorphic destructor should be overridden if required.@n - * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -137,11 +138,12 @@ public: /** * Adds a data change event listener instance. @n - * Added listener is called when the date of the DatePicker is changed either through user manipulation or by calling one of its setters. + * The added listener is called when the date of the DatePicker is changed either through user manipulation or + * by calling one of its setters. * * @since 2.0 * - * @param[in] listener The listener to add + * @param[in] listener The listener to add * @see IDateChangeEventListener::OnDateChanged() * @see IDateChangeEventListener::OnDateChangeCanceled() * @see RemoveDateChangeEventListener() @@ -166,14 +168,14 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] point The position of the %EditDate in the container @n + * @return An error code + * @param[in] point The position of %EditDate in the container @n * The optimal size of the control is defined in * Optimal Size of UI Controls. * @param[in] title The title * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore, some methods may fail if used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::Point& point, const Tizen::Base::String& title = L""); @@ -182,14 +184,14 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] point The position of the %EditDate in the container @n + * @return An error code + * @param[in] point The position of %EditDate in the container @n * The optimal size of the control is defined in * Optimal Size of UI Controls. * @param[in] title The title * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore, some methods may fail if used earlier. + * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier. */ result Construct(const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title = L""); @@ -208,7 +210,7 @@ public: * @since 2.0 * * @return The current day value @n - * The default day value is the current system day. + * The default day value is the current system day. */ int GetDay(void) const; @@ -218,7 +220,7 @@ public: * @since 2.0 * * @return The current month value as an integer @n - * The default month value is the current system month. + * The default month value is the current system month. */ int GetMonth(void) const; @@ -228,7 +230,7 @@ public: * @since 2.0 * * @return The current year value @n - * The default year value is the current system year. + * The default year value is the current system year. */ int GetYear(void) const; @@ -254,7 +256,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] year The year to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The given year value is invalid. @@ -268,7 +270,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] month The month to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The given month value is invalid. @@ -283,7 +285,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] day The day to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The given day value is invalid. @@ -292,11 +294,11 @@ public: result SetDay(int day); /** - * Enables the %DatePicker control. + * Enables the DatePicker control. * - * @since 2.0 + * @since 2.0 * - * @param[in] enable Set to @c true to enable the DatePicker control, @n + * @param[in] enable Set to @c true to enable the %DatePicker control, @n * else @c false */ void SetDatePickerEnabled(bool enable); @@ -306,7 +308,7 @@ public: * * @since 2.0 * - * @return @c true if the DatePicker control is enabled, @n + * @return @c true if the %DatePicker control is enabled, @n * else @c false */ bool IsDatePickerEnabled(void) const; @@ -317,12 +319,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] minYear The minimum year for the valid range - * @param[in] maxYear The maximum year for the valid range - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The given year range is invalid. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[in] minYear The minimum year for the valid range + * @param[in] maxYear The maximum year for the valid range + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The given year range is invalid. + * @exception E_SYSTEM A system error has occurred. */ result SetYearRange(int minYear, int maxYear); @@ -331,11 +333,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[out] minYear The minimum year for the valid range - * @param[out] maxYear The maximum year for the valid range - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @return An error code + * @param[out] minYear The minimum year for the valid range + * @param[out] maxYear The maximum year for the valid range + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. */ result GetYearRange(int& minYear, int& maxYear) const; diff --git a/inc/FUiCtrlEditField.h b/inc/FUiCtrlEditField.h old mode 100755 new mode 100644 index beeeb4d..a59cf8e --- a/inc/FUiCtrlEditField.h +++ b/inc/FUiCtrlEditField.h @@ -152,7 +152,7 @@ public: /** * This polymorphic destructor should be overridden if required.@n - * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -165,10 +165,11 @@ public: * * @return An error code * @param[in] rect An instance of the Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created window along with - * the width and height of the control. @n - * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * This instance represents the x and y coordinates of the top-left corner of the created window along with + * the width and height of the control. @n + * If the size is less than the minimum size, %EditField is constructed with the minimum size. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. * @param[in] style The style of the %EditField control * @param[in] inputStyle The input style of the %EditField control * @param[in] showTitle Set to @c true to display the title, @n @@ -176,18 +177,18 @@ public: * @param[in] limitLength The limit for the length of the text in the %EditField control * @param[in] groupStyle The table view style of the %EditField control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c limitLength is less than or equal to @c 0, or @n - * either the @c rect.width or the @c rect.height is less than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - Either the @c rect.width or the @c rect.height is less than @c 0. * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n * The title is not supported by small style %EditField. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used * earlier. The %EditField style of SMALL property cannot be used together with group styles. - * - If the specified size is less than the minimum size, %EditField is constructed with the minimum size. - * - Following are the input styles used for creating the different orientations of a keypad: @n - * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n - * @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form. + * - Following are the input styles used for creating the different orientations of a keypad: + * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. + * - @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form. */ result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -198,10 +199,11 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created window along with - * the width and height of the control. @n - * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * This instance represents the x and y coordinates of the top-left corner of the created window along with + * the width and height of the control. @n + * If the size is less than the minimum size, %EditField is constructed with the minimum size. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. * @param[in] style The style of the %EditField control * @param[in] inputStyle The input style of the %EditField control * @param[in] showTitle Set to @c true to display the title, @n @@ -209,18 +211,18 @@ public: * @param[in] limitLength The limit for the length of the text in the %EditField control * @param[in] groupStyle The table view style of the %EditField control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c limitLength is less than or equal to @c 0, or @n - * either the @c rect.width or the @c rect.height is less than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - Either the @c rect.width or the @c rect.height is less than @c 0. * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n * The title is not supported by small style %EditField. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used * earlier. The %EditField style of SMALL property cannot be used together with group styles. - * - If the specified size is less than the minimum size, %EditField is constructed with the minimum size. - * - Following are the input styles used for creating the different orientations of a keypad: @n - * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n - * @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form. + * - Following are the input styles used for creating the different orientations of a keypad: + * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. + * - @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -231,10 +233,11 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created window along with - * the width and height of the control. @n - * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * This instance represents the x and y coordinates of the top-left corner of the created window along with + * the width and height of the control. @n + * If the size is less than the minimum size, EditFied() is constructed with the minimum size. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. * @param[in] style The style of the %EditField control * @param[in] inputStyle The input style of the %EditField control * @param[in] titleStyle The title style @@ -244,18 +247,18 @@ public: * @param[in] groupStyle The table view style of the %EditField control * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c limitLength is less than or equal to @c 0. @n - * The specified @c rect.width or the @c rect.height is less than @c 0. + * Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - The specified @c rect.width or the @c rect.height is less than @c 0. * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n * Title is not supported in small style %EditField. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier. * The %EditField style of SMALL property cannot be used together with group styles. - * - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size. - * - Following are the input styles used for creating different orientations of a keypad: @n - * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n - * @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form. + * - Following are the input styles used for creating different orientations of a keypad: + * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. + * - @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form. */ result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -266,10 +269,11 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created window along with - * the width and height of the control. @n - * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * This instance represents the x and y coordinates of the top-left corner of the created window along with + * the width and height of the control. @n + * If the size is less than the minimum size, EditFied() is constructed with the minimum size. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. * @param[in] style The style of the %EditField control * @param[in] inputStyle The input style of the %EditField control * @param[in] titleStyle The title style @@ -279,18 +283,18 @@ public: * @param[in] groupStyle The table view style of the %EditField control * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c limitLength is less than or equal to @c 0. @n - * The specified @c rect.width or the @c rect.height is less than @c 0. + * Either of the following conditions has occurred: + * - The specified @c limitLength is less than or equal to @c 0. + * - The specified @c rect.width or the @c rect.height is less than @c 0. * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n * Title is not supported in small style %EditField. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier. * The %EditField style of SMALL property cannot be used together with group styles. - * - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size. - * - Following are the input styles used for creating different orientations of a keypad: @n - * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n - * @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form. + * - Following are the input styles used for creating different orientations of a keypad: + * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. + * - @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -361,7 +365,7 @@ public: * For more information, see AutoLink Detection. @n * When it is set to @c 0, the auto-link detection is disabled. * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n + * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The input style is not ::INPUT_STYLE_OVERLAY. * @exception E_SYSTEM A system error has occurred. * @see Tizen::Base::Utility::LinkType @@ -378,7 +382,7 @@ public: * * @return The auto-link mask * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n + * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The input style is not ::INPUT_STYLE_OVERLAY. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -629,12 +633,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] size The text size + * @param[in] size The text size @n + * The size should be greater than or equal to minimum font size which is 4. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @n * The @c size cannot be a negative integer. * @exception E_SYSTEM A system error has occurred. - * @remarks The specified @c size should be greater than or equal to minimum font size which is 4. * @see GetTextSize() */ result SetTextSize(int size); @@ -645,12 +649,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] size The text size + * @param[in] size The text size @n + * The size should be greater than or equal to minimum font size which is 4.0f. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @n * The @c size cannot be a negative integer. * @exception E_SYSTEM A system error has occurred. - * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f. * @see GetTextSizeF() */ result SetTextSize(float size); @@ -735,8 +739,9 @@ public: * @param[in] start The starting index of the range * @param[in] end The last index of the range * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n - * the index is greater than the number of elements or less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified index is outside the bounds of the data structure. + * - The index is greater than the number of elements or less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetText() @@ -789,7 +794,7 @@ public: void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); /** - * Adds the ITextEventListener instance. @n + * Adds an ITextEventListener instance. @n * The added listener listens to events on the context of the specified event dispatcher when they are fired. * * @since 2.0 @@ -799,7 +804,7 @@ public: void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); /** - * Removes the ITextEventListener instance. @n + * Removes an ITextEventListener instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -920,7 +925,7 @@ public: * @param[in] enable The category value to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input mode category is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @n + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The specified @c categories cannot be supported with the current keypad style. * @exception E_SYSTEM A system error has occurred. * @endif @@ -1109,9 +1114,7 @@ public: * * @since 2.0 * - * @param[in] guideText The guide text - * @remarks This is the default text that is displayed in the %EditField - * control when the focus is given to it and no text is entered. + * @param[in] guideText The guide text that is displayed in the %EditField control when the focus is given to it and no text is entered. */ void SetGuideText(const Tizen::Base::String& guideText); @@ -1444,9 +1447,8 @@ public: * @since 2.0 * * @return An error code - * @param[out] language The current input language + * @param[out] language The current input language of the keypad that is associated with the current %EditField * @exception E_SUCCESS The method is successful. - * @remarks The application can get the current language of the keypad that is associated with the current %EditField. */ result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; diff --git a/inc/FUiCtrlEditTypes.h b/inc/FUiCtrlEditTypes.h index 44ac11d..1302dd8 100644 --- a/inc/FUiCtrlEditTypes.h +++ b/inc/FUiCtrlEditTypes.h @@ -17,9 +17,9 @@ /** * @file FUiCtrlEditTypes.h - * @brief This is the header file for the Ui::Controls edit control enumerations. + * @brief This is the header file for the %Edit enumerations. * - * This header file contains the declarations of the Ui::Controls edit control enumerations. + * This header file contains the declarations of the Edit enumerations. */ #ifndef _FUI_CTRL_EDIT_ENUM_H_ #define _FUI_CTRL_EDIT_ENUM_H_ @@ -34,8 +34,10 @@ namespace Tizen { namespace Ui { namespace Controls * Defines the input modes. * * @brief [Deprecated] - * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, or the current mode to initially set the keypad to, @n - * from this list. It is recommended to use the styles offered in EditFieldStyle or KeypadStyle enumerations instead. + * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, or the current + * mode to initially set the keypad to, from this list. It is recommended to use the styles offered in EditFieldStyle or + * KeypadStyle enumerations instead. + * * @since 2.0 * @endif */ @@ -103,7 +105,7 @@ enum EditMarginType /** * @enum EditTextColor * - * Defines the possible Edit's text colors. + * Defines the possible Edit text colors. * * @since 2.0 */ @@ -118,7 +120,7 @@ enum EditTextColor /** * @enum EditStatus * - * Defines the possible Edit's states. + * Defines the possible Edit states. * * @since 2.0 */ diff --git a/inc/FUiCtrlExpandableEditArea.h b/inc/FUiCtrlExpandableEditArea.h old mode 100755 new mode 100644 index aee9ba9..780ec90 --- a/inc/FUiCtrlExpandableEditArea.h +++ b/inc/FUiCtrlExpandableEditArea.h @@ -97,7 +97,8 @@ enum ExpandableEditAreaTokenStatus * * @since 2.0 * - * The %ExpandableEditArea class displays a multi-line text editor the height of that is automatically adjusted according to the number of lines currently visible in the text box. + * The %ExpandableEditArea class displays a multi-line text editor, the height of which is automatically adjusted according to the number of lines + * currently visible in the text box. * * For more information on the class features, see ExpandableEditArea. * @@ -318,14 +319,14 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] text The text to append @n - * It will be displayed by the @c textImage. - * @param[in] textImage The alternate bitmap to display - * @exception E_SUCCESS The method is successful. - * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea. - * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. + * @return An error code + * @param[in] text The text to append @n + * It will be displayed by the @c textImage. + * @param[in] textImage The alternate bitmap to display + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea. + * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. * @remarks The method modifies the text buffer that is managed by the %ExpanableEditArea control. To display the changes, the control must be drawn again. */ result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); @@ -395,7 +396,7 @@ public: * Either the specified @c position is greater than the number of existing text in the % ExpanableEditArea or less than @c 0. * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea. * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. + * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. * @remarks The method modifies the text buffer that is managed by the %ExpanableEditArea control. To display the changes, the control must be drawn again. */ result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); @@ -451,10 +452,11 @@ public: * @since 2.0 * * @param[in] text The text to set @n - * To denote the end of a line use '\\n'. + * To denote the end of a line use '\\n'. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid, @n - * or the length of the specified @c text exceeds system limitations. + * @exception E_INVALID_ARG Either of teh following conditions has occurred: + * - The specified input parameter is invalid. + * - The length of the specified @c text exceeds system limitations. * @exception E_SYSTEM A system error has occurred. * @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again. */ @@ -573,7 +575,7 @@ public: * @since 2.0 * @return An error code * @param[in] multiplier The line spacing multiplier - * @param[in] extra The extra line spacing + * @param[in] extra The extra line spacing * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG This exception is returned when @c multiplier or @c extra is less than 0. * @see GetLineSpacing () @@ -593,7 +595,7 @@ public: * @param[in] multiplier The line spacing multiplier * @param[in] extra The extra line spacing * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG This exception is returned when @c multiplier or @c extra is less than 0. + * @exception E_INVALID_ARG This exception is returned when the specified @c multiplier or @c extra is less than 0. * @see GetLineSpacing () */ result SetLineSpacing(int multiplier, float extra); @@ -647,8 +649,9 @@ public: * @return An error code * @param[in] size The text size * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c size is invalid, @n - * or the specified @c size is a negative integer. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c size is invalid. + * - The specified @c size is a negative integer. * @exception E_SYSTEM A system error has occurred. * @remarks The specified @c size should be greater than or equal to minimum font size which is 4. * @see GetTextSize() @@ -661,12 +664,13 @@ public: * @since 2.1 * * @return An error code - * @param[in] size The text size + * @param[in] size The text size @n + * The size should be greater than or equal to minimum font size which is 4.0f. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c size is invalid, @n - * or the specified @c size is a negative integer. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c size is invalid. + * - The specified @c size is a negative integer. * @exception E_SYSTEM A system error has occurred. - * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f. * @see GetTextSizeF() */ result SetTextSize(float size); @@ -833,11 +837,12 @@ public: * @since 2.0 * * @return An error code - * @param[out] start The start index of the text block - * @param[out] end The end index of the text block + * @param[out] start The start index of the text block @n + * The value is @c 0 if no text block is selected. + * @param[out] end The end index of the text block @n + * The value is @c 0 if no text block is selected. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The method returns the start and end indexes as @c 0 if no text block is selected. * @see ReleaseBlock() * @see SetBlockRange() */ @@ -863,8 +868,9 @@ public: * * @return An error code * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The specified instance is not found, @n - * or the text block is not selected. + * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred: + * - The specified instance is not found. + * - The text block is not selected. * @exception E_SYSTEM A system error has occurred. */ result RemoveTextBlock(void); @@ -974,7 +980,7 @@ public: * * @since 2.0 * @return @c true if the text prediction is enabled, @n - * else @c false + * else @c false * @see SetTextPredictionEnabled() */ bool IsTextPredictionEnabled(void) const; @@ -983,12 +989,12 @@ public: * Enables or disables the text prediction. * * @since 2.0 - * @param[in] enable Set to @c true to enable the text prediction, @n - * else @c false - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION This operation is not supported. - * @see IsTextPredictionEnabled() + * @param[in] enable Set to @c true to enable the text prediction, @n + * else @c false + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @see IsTextPredictionEnabled() */ result SetTextPredictionEnabled(bool enable); @@ -1001,7 +1007,7 @@ public: * @param[in] enable Set to @c true to enable the virtual keypad, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @see IsKeypadEnabled() */ result SetKeypadEnabled(bool enable); @@ -1040,9 +1046,9 @@ public: * @since 2.0 * * @return The filter, @n - * else @c null if an error occurs + * else @c null if an error occurs * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -1057,10 +1063,10 @@ public: * @return An error code * @param[in] token The token to append * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. + * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The length of the specified @c token is @c 0. + * The length of the specified @c token is @c 0. * @exception E_SYSTEM A system error has occurred. */ result AppendToken(const Tizen::Base::String& token); @@ -1089,7 +1095,7 @@ public: * * @return The token text at the specified index, @n * else an empty string if an error occurs - * @param[in] index The position to get the token + * @param[in] index The position to get the token * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN. @@ -1203,7 +1209,7 @@ public: * * @return The limit length, @n * else @c -1 if an error occurs @n - * The default limit length is @c 2048. + * The default limit length is @c 2048. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -1219,8 +1225,9 @@ public: * @return An error code * @param[in] limitLength The limit text length to set * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid, @n - * or the specified limit length is @c 0 or negative. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified input parameter is invalid. + * - The specified limit length is @c 0 or negative. * @exception E_SYSTEM A system error has occurred. * @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again. * @see GetLimitLength() @@ -1251,8 +1258,9 @@ public: * else RGBA (0,0,0,0) if an error occurs * @param[in] type The text type * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified type is not supported, or @n - * the specified @c type is @c EDIT_TEXT_COLOR_LINK. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified type is not supported. + * - The specified @c type is @c EDIT_TEXT_COLOR_LINK. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetTextColor() @@ -1469,7 +1477,7 @@ public: * generated if the candidate word list pop-up appears during the predictive texting. @n * The operation is not supported by the token style %ExpandableEditArea. * @see IsAutoResizingEnabled() - * @see Tizen::Ui::Controls::IExpandableEditAreaEventListener + * @see Controls::IExpandableEditAreaEventListener * @endif */ result SetAutoResizingEnabled(bool enable); @@ -1503,9 +1511,9 @@ public: * @deprecated We no longer provide a method to set the language of the current keypad. @n * This method is provided only for backward compatibility and will be deleted in the near future. * @return An error code - * @param[in] languageCode The language to set - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @param[in] languageCode The language to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The application can set the language of the current keypad that is associated with the current %ExpandableEditArea. */ result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); @@ -1516,8 +1524,8 @@ public: * @since 2.0 * * @return An error code - * @param[out] language The current input language - * @exception E_SUCCESS The method is successful. + * @param[out] language The current input language + * @exception E_SUCCESS The method is successful. * @remarks The application can get the current language of the keypad that is associated with the current %ExpandableEditArea. */ result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; @@ -1574,7 +1582,7 @@ public: * @since 2.0 * * @param[in] listener The event listener to remove - * @see AddActionEventListener() + * @see AddExpandableEditAreaEventListener() */ void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener); diff --git a/inc/FUiCtrlExpandableList.h b/inc/FUiCtrlExpandableList.h index 6c7e8a2..eff421c 100644 --- a/inc/FUiCtrlExpandableList.h +++ b/inc/FUiCtrlExpandableList.h @@ -58,14 +58,14 @@ namespace Tizen { namespace Ui { namespace Controls * it must implement IExpandableItemEventListener and register it to the expandable list, * It will then receive related events from %ExpandableList. * - * Unlike GroupedList which is also a list with the hierarch of depth 2, main items of + * Unlike GroupedList which is also a list with the hierarchy of depth 2, main items of * %ExpandableList can be expanded or closed. * - * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically - * when the %ExpandableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat + * Note that %CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically + * when the %ExpandableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat * must be deleted by the application. * - * Refer to CustomListItem and CustomListItemFormat. + * The following example demonstrates how to use the %ExpandableList class. * * Example: * @@ -343,7 +343,7 @@ public: /** * @if OSPDEPREC - * Adds the ExpandableItemEventListener instance. @n + * Adds an ExpandableItemEventListener instance. @n * The added listener gets notified when the state of an item is changed. * * @brief [Deprecated] @@ -357,7 +357,7 @@ public: /** * @if OSPDEPREC - * Removes the ExpandableItemEventListener instance. @n + * Removes an ExpandableItemEventListener instance. @n * The removed listener is not notified even when the expandable item events are fired. * * @brief [Deprecated] diff --git a/inc/FUiCtrlFooter.h b/inc/FUiCtrlFooter.h index 59485ac..8f09c79 100644 --- a/inc/FUiCtrlFooter.h +++ b/inc/FUiCtrlFooter.h @@ -69,9 +69,9 @@ enum FooterStyle * The %Footer class displays a multi-purpose area at the bottom of the screen. It is used to switch between different application * "views", or to host buttons for performing user-defined actions. * - *For more information on the class features, see Footer. + * For more information on the class features, see Footer. * - *The following examples demonstrate how to use the %Footer class. + * The following examples demonstrate how to use the %Footer class. * - Constructing a footer * When creating a %Form, specify the FORM_STYLE_FOOTER parameter in the Form::Construct() method. * @@ -138,7 +138,7 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n - * However, the content of the specified item is copied to the %Footer control. + * However, the content of the specified item is copied to the %Footer control. * - Depending on the style of the %Footer control, several types of items can be added or inserted. */ result AddItem(const FooterItem& item); @@ -161,7 +161,7 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n - * However, the content of the specified item is copied to the %Footer control. + * However, the content of the specified item is copied to the %Footer control. * - Depending on the style of the %Footer control, several types of items can be added or inserted. */ result InsertItemAt(int itemIndex, const FooterItem& item); @@ -459,15 +459,16 @@ public: * * @return An error code * @param[in] position The position at which to set the specified button item. @n - * If there is an existing button item at the specified position, it is replaced with the new item. - * However, the contents of the specified item are copied to the %Footer control. + * If there is an existing button item at the specified position, it is replaced with the new item. + * However, the contents of the specified item are copied to the %Footer control. * @param[in] button The button item to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n * The specified item is not constructed. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.@n * There are more than 2 footer items. - * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB + * or ::FOOTER_STYLE_TAB_LARGE. * @exception E_SYSTEM A system error has occurred. */ result SetButton(ButtonPosition position, const ButtonItem& button); @@ -560,7 +561,7 @@ public: * @return An error code * @param[in] position The button item position * @param[in] number The number value that should be displayed as the badge icon @n - * If it is set to @c 0, the numbered badge icon is removed from an item. + * If it is set to @c 0, the numbered badge icon is removed from an item. * @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 @@ -582,9 +583,8 @@ public: * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n * This device does not support the software back button. * @exception E_SYSTEM A system error has occurred. - * @remarks - * - When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called. - * @see Tizen::Ui::Controls::IFormBackEventListener + * @remarks When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called. + * @see Controls::IFormBackEventListener */ result SetBackButton(void); @@ -667,7 +667,7 @@ public: * @return An error code * @param[in] itemIndex The item index * @param[in] number The number value that must be displayed as the badge icon @n - * If it is set to @c 0, the numbered badge icon is removed from an item. + * If it is set to @c 0, the numbered badge icon is removed from an item. * @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_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n @@ -745,7 +745,8 @@ public: * @param[in] enable Set to @c true to enable the edit mode, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. + * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is ::FOOTER_STYLE_TAB + * or ::FOOTER_STYLE_TAB_LARGE. */ result SetTabEditModeEnabled(bool enable); @@ -798,7 +799,7 @@ public: * @param[in] position The position of the button item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * There is no button set at the specified position. + * There is no button set at the specified position. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const; diff --git a/inc/FUiCtrlFooterItem.h b/inc/FUiCtrlFooterItem.h index db9815d..379ad66 100644 --- a/inc/FUiCtrlFooterItem.h +++ b/inc/FUiCtrlFooterItem.h @@ -139,8 +139,8 @@ public: * @return An error code * @param[in] status The status of the footer item * @param[in] pBitmap The background bitmap to set, @n - * else @c null if no bitmap is displayed @n - * If the size of the bitmap is greater than the size of the item, the bitmap is scaled down. + * else @c null if no bitmap is displayed @n + * If the size of the bitmap is greater than the size of the item, the bitmap is scaled down. * @exception E_SUCCESS The method is successful. */ result SetBackgroundBitmap(FooterItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); @@ -153,12 +153,12 @@ public: * * @return An error code * @param[in] status The status of the footer item @n - * If it is set to @c FOOTER_ITEM_STATUS_NORMAL, the bitmap will be applied for all other statues unless different bitmaps are explicitly - * set for those by using this method. @n - * If it is set to @c FOOTER_ITEM_STATUS_SELECTED, the bitmap for the status is also ignored. + * If it is set to @c FOOTER_ITEM_STATUS_NORMAL, the bitmap will be applied for all + * other statues unless different bitmaps are explicitly set for those by using this method. @n + * If it is set to @c FOOTER_ITEM_STATUS_SELECTED, the bitmap for the status is also ignored. * @param[in] pIcon The icon to set, @n * else @c null if no bitmap is displayed @n - * If the size of the bitmap is greater than the default icon size, the bitmap is scaled down. + * If the size of the bitmap is greater than the default icon size, the bitmap is scaled down. * @exception E_SUCCESS The method is successful. */ result SetIcon(FooterItemStatus status, const Tizen::Graphics::Bitmap* pIcon); @@ -171,9 +171,10 @@ public: * * @return An error code * @param[in] text The text to set @n - * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. @n - * If it is too long to display in a line, it is automatically displayed in two lines and the ellipsis is applied if it is longer than two lines. - * @exception E_SUCCESS The method is successful. + * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. @n + * If it is too long to display in a line, it is automatically displayed in two lines and + * the ellipsis is applied if it is longer than two lines. + * @exception E_SUCCESS The method is successful. */ result SetText(const Tizen::Base::String& text); diff --git a/inc/FUiCtrlForm.h b/inc/FUiCtrlForm.h index 975ea7a..ef5e049 100644 --- a/inc/FUiCtrlForm.h +++ b/inc/FUiCtrlForm.h @@ -174,7 +174,7 @@ public: * * @return An error code * @param[in] formStyle The form style @n - * Multiple form styles can be combined using bitwise OR. + * Multiple form styles of FormStyle can be combined using bitwise OR. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @if OSPDEPREC - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time. @@ -184,7 +184,6 @@ public: * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation. * @exception E_SYSTEM A system error has occurred. * @remarks The maximum number of Forms that an application can construct is limited by available memory. - * @see FormStyle */ result Construct(unsigned long formStyle); @@ -214,7 +213,7 @@ public: * @return An error code * @param[in] layout The layout for both the portrait and landscape mode * @param[in] formStyle The form style @n - * Multiple form styles can be combined using bitwise OR. + * Multiple form styles of FormStyle can be combined using bitwise OR. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid, or * the specified layout is already bound to another container. @@ -223,7 +222,6 @@ public: * @remarks * - The maximum number of Forms that an application can construct is limited by available memory. * - The children are arranged within the client area bounds of the form area by @c layout. - * @see FormStyle */ result Construct(const Tizen::Ui::Layout& layout, unsigned long formStyle); @@ -236,7 +234,7 @@ public: * @param[in] portraitLayout The layout for the portrait mode * @param[in] landscapeLayout The layout for the landscape mode * @param[in] formStyle The form style @n - * Multiple form styles can be combined using bitwise OR. + * Multiple form styles of FormStyle can be combined using bitwise OR. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid, or * the specified layout is already bound to another container. @@ -245,7 +243,6 @@ public: * @remarks * - The maximum number of Forms that an application can construct is limited by available memory. * - The children are arranged within the bounds of the form area by @c layout. - * @see FormStyle */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, unsigned long formStyle); @@ -359,10 +356,8 @@ public: * * @since 2.0 * - * @return The bounds of the client area - * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas. - * header and footer areas. - * + * @return The bounds of the client area @n + * The client area of the %Form control does not include the title, indicator, header and footer areas. */ Tizen::Graphics::Rectangle GetClientAreaBounds(void) const; @@ -371,9 +366,8 @@ public: * * @since 2.1 * - * @return The bounds of the client area - * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas. - * header and footer areas. + * @return The bounds of the client area @n + * The client area of the %Form control does not include the title, indicator, header and footer areas. * */ Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const; @@ -441,7 +435,7 @@ public: /** * @if OSPDEPREC - * Gets the pointer of the Tab control if it exists. + * Gets a pointer to the Tab control if it exists. * * @brief [Deprecated] * @deprecated This method is deprecated because the use of the Tab control is no longer recommended. @@ -627,13 +621,13 @@ public: * * @feature %http://tizen.org/feature/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or * @c ORIENTATION_AUTOMATIC value of @c orientation - * @param[in] orientation The orientation of the %Form control - * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n + * @param[in] orientation The orientation of the %Form control + * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n * For more information, see Application Filtering. * @remarks * - The specific error code can be accessed using the GetLastResult() method. * - Before calling this method, check whether the feature is supported by - * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). */ void SetOrientation(Orientation orientation); @@ -661,8 +655,8 @@ public: * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. * @since 2.0 * - * @param[in] softkey The softkey - * @param[in] enable Set to @c true to enable this softkey @n + * @param[in] softkey The softkey + * @param[in] enable Set to @c true to enable this softkey @n * else @c false * @endif */ @@ -748,29 +742,31 @@ public: void SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text); /** - * Gets the pointer to the Footer control if it exists. + * Gets a pointer to the Footer control if it exists. * * @since 2.0 * * @return A pointer to the Footer control, @n * else @c null if there is no %Footer - * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. @n - * The optimal size of the control is defined in + * @remarks + * - The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. + * - The optimal size of the control is defined in * Optimal Size of UI Controls. */ Footer* GetFooter(void) const; /** - * Gets the pointer to the Header control if it exists. + * Gets a pointer to the Header control if it exists. * * @since 2.0 * * @return A pointer to the Header control, @n * else @c null if there is no %Header - * @remarks The retrieved pointer may be temporary. Therefore, it should not be - * stored after immediate use. @n - * The optimal size of the control is defined in + * @remarks + * - The retrieved pointer may be temporary. Therefore, it should not be + * stored after immediate use. + * - The optimal size of the control is defined in * Optimal Size of UI Controls. */ Header* GetHeader(void) const; @@ -929,10 +925,10 @@ public: * @remarks * - The specific error code can be accessed using the GetLastResult() method. * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations - * of the overlay region. @n - * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem, - * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that - * can be used as the input bounds of this method. + * of the overlay region. @n + * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem, + * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that + * can be used as the input bounds of this method. * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown. */ OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType); @@ -957,10 +953,10 @@ public: * @remarks * - The specific error code can be accessed using the GetLastResult() method. * - If the application runs on multi-screen resolutions, the specified bounds may - * not meet the hardware limitations of the overlay region. @n - * In such cases, it returns the @c E_INVALID_ARG exception. @n - * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to - * get the validated bounds that can be used as the input bounds of this method. + * not meet the hardware limitations of the overlay region. @n + * In such cases, it returns the @c E_INVALID_ARG exception. @n + * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to + * get the validated bounds that can be used as the input bounds of this method. * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown. */ OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType); @@ -979,12 +975,12 @@ public: * - The method allocates Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Form. * - It is the responsibility of the developers to deallocate the canvas after use. * - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n - * Therefore, delete the previously allocated canvas and create a new canvas using this method - * if the size or position of the control is changed. + * Therefore, delete the previously allocated canvas and create a new canvas using this method + * if the size or position of the control is changed. * - The specific error code can be accessed using the GetLastResult() method. * - The Frame and %Form instances share a single frame-buffer. @n - * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the - * screen regardless of whether the control is currently visible on the screen. + * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the + * screen regardless of whether the control is currently visible on the screen. */ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; @@ -1042,7 +1038,6 @@ public: * @since 2.0 * * @param[in] pFormBackEventListener The %Form back event listener to set - * @see Tizen::Ui::Controls::IFormBackEventListener. */ void SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener); @@ -1053,7 +1048,6 @@ public: * @since 2.2 * * @param[in] pFormMenuEventListener The %Form menu event listener to set - * @see Tizen::Ui::Controls::IFormMenuEventListener. */ void SetFormMenuEventListener(IFormMenuEventListener* pFormMenuEventListener); @@ -1076,12 +1070,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] enable Set to @c true to enable the notification tray to remain open, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n - * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE, - * the method returns @c E_INVALID_OPERATION. + * @param[in] enable Set to @c true to enable the notification tray to remain open, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n + * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE * @remarks If this method is not explicitly called, the notification tray is opened. * @see IsNotificationTrayOpenEnabled() */ @@ -1095,10 +1088,9 @@ public: * * @return @c true if the notification tray is open, @n * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n - * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE, - * the method returns @c E_INVALID_OPERATION. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n + * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetNotificationTrayOpenEnabled() */ diff --git a/inc/FUiCtrlFrame.h b/inc/FUiCtrlFrame.h index 92b30ed..5040646 100644 --- a/inc/FUiCtrlFrame.h +++ b/inc/FUiCtrlFrame.h @@ -55,7 +55,7 @@ class IFrameEventListener; * * For more information on the class features, see Frame. * - * The following example demonstrates how to use the %Frame class + * The following example demonstrates how to use the %Frame class. * * @code // Gets a pointer of the frame @@ -113,14 +113,14 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the top-left corner @n - * of the created window along with its width and height. @n - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * This instance represents the x and y coordinates of the top-left corner of the created window along + * with its width and height. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation (that * is, the method is called on an instance that is constructed). - * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation. - * @exception E_SYSTEM A system error has occurred. + * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The maximum number of Forms that an application can construct is limited by available memory. * - The specified position and size are only applied when the show mode is not ::FRAME_SHOW_MODE_FULL_SCREEN. @@ -132,16 +132,16 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner @n - * of the created window along with its width and height. @n - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @return An error code + * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n + * This instance represents the x and y coordinates of the top-left corner of the created window along with + * its width and height. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation (that * is, the method is called on an instance that is constructed). - * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation. - * @exception E_SYSTEM A system error has occurred. + * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The maximum number of Forms that an application can construct is limited by available memory. * - The specified position and size are only applied when the show mode is not ::FRAME_SHOW_MODE_FULL_SCREEN. @@ -156,8 +156,8 @@ public: * * @since 2.0 * - * @param[in] listener The listener to add - * @remarks When OnOrientationChanged() event is fired, re-position and draw the child controls, but do not explicitly call + * @param[in] listener The listener to add + * @remarks When the OnOrientationChanged() event is fired, re-position and draw the child controls, but do not explicitly call * the Show() method. * @see RemoveOrientationEventListener() */ @@ -199,7 +199,7 @@ public: // Accessor public: /** - * Gets the current %Form control of the %Frame control. + * Gets the current Form control of the %Frame control. * * @since 2.0 * @@ -225,9 +225,9 @@ public: * @remarks * - If a form is set as the current form, it becomes the topmost form amongst its siblings. * - This method does not call Invalidate() internally, so if the current form needs to be drawn - * immediately, Invalidate() should be called after SetCurrentForm(). - * - Only Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN - * can set a Form which has the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form. + * immediately, Invalidate() should be called after SetCurrentForm(). + * - Only %Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN + * can set a Form which has the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form. */ result SetCurrentForm(const Form& form); @@ -245,9 +245,9 @@ public: * @remarks * - If a form is set as the current form, it becomes the topmost form amongst its siblings. * - This method does not call Invalidate() internally, so if the current form needs to be drawn - * immediately, Invalidate() should be called after SetCurrentForm(). - * - Only Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has - * the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form. + * immediately, Invalidate() should be called after SetCurrentForm(). + * - Only %Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN can set a %Form which has + * the style ::FORM_STYLE_PORTRAIT_INDICATOR as the current form. */ result SetCurrentForm(Form* pForm); @@ -270,14 +270,14 @@ public: void SetBackgroundColor(const Tizen::Graphics::Color& color); /** - * Sets the orientation mode of a frame. + * Sets the orientation mode of the %Frame control. * * @since 2.0 * * @feature %http://tizen.org/feature/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or * @c ORIENTATION_AUTOMATIC value of @c orientation - * @param[in] orientation The orientation mode of the %Frame control - * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n + * @param[in] orientation The orientation mode of the %Frame control + * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n * For more information, see Application Filtering. * @remarks * - The specific error code can be accessed using the GetLastResult() method. @@ -286,20 +286,20 @@ public: void SetOrientation(Tizen::Ui::Orientation orientation); /** - * Gets the orientation mode of the frame. + * Gets the orientation mode of the %Frame control. * * @since 2.0 * - * @return The orientation mode of the frame + * @return The orientation mode of the %Frame control */ Tizen::Ui::Orientation GetOrientation(void) const; /** - * Gets the current orientation status of the frame. + * Gets the current orientation status of the %Frame control. * * @since 2.0 * - * @return The orientation status + * @return The orientation status of the %Frame control * @remarks The method returns @c ORIENTATION_STATUS_NONE if the %Frame control is not drawn. * Once it is drawn, the orientation of the %Frame control is set to portrait and the method * returns @c ORIENTATION_STATUS_PORTRAIT if the application has not specified its orientation. @@ -307,11 +307,11 @@ public: Tizen::Ui::OrientationStatus GetOrientationStatus(void) const; /** - * Gets the FrameAnimator of %Frame. + * Gets the FrameAnimator of the %Frame control. * * @since 2.0 * - * @return %FrameAnimator, @n + * @return The %FrameAnimator of the %Frame control, @n * else @c null if this instance is not constructed as yet */ Tizen::Ui::Animations::FrameAnimator* GetFrameAnimator(void) const; @@ -321,11 +321,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] mode The mode to show the %Frame control - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM The method cannot proceed due to a severe system error. - * @remarks The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN. + * @return An error code + * @param[in] mode The mode to show the %Frame control @n + * The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. */ result SetShowMode(FrameShowMode mode); @@ -334,8 +334,8 @@ public: * * @since 2.0 * - * @return The mode to show the %Frame control - * @remarks The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN. + * @return The mode to show the %Frame control @n + * The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN. */ FrameShowMode GetShowMode(void) const; diff --git a/inc/FUiCtrlFrameTypes.h b/inc/FUiCtrlFrameTypes.h index 5df9b21..c4ae509 100644 --- a/inc/FUiCtrlFrameTypes.h +++ b/inc/FUiCtrlFrameTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlFrameTypes.h - * @brief This is the header file for the Frame type. + * @brief This is the header file for the %Frame type. * * This header file contains the declarations of the Frame type. * diff --git a/inc/FUiCtrlGallery.h b/inc/FUiCtrlGallery.h index c45ae8f..ce8f709 100644 --- a/inc/FUiCtrlGallery.h +++ b/inc/FUiCtrlGallery.h @@ -205,14 +205,14 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created %Gallery control along with the - * width and height. @n - * The optimal size of the control is defined in + * @param[in] rect An instance of the Graphics::Rectangle class @n + * This instance represents the x and y coordinates of the top-left corner of the + * created %Gallery control along with the width and height. @n + * The optimal size of the control is defined in * Optimal Size of UI Controls. - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::Rectangle& rect); @@ -223,13 +223,13 @@ public: * * @return An error code * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created %Gallery control along with the - * width and height.@n - * The optimal size of the control is defined in + * This instance represents the x and y coordinates of the top-left corner of the + * created %Gallery control along with the width and height.@n + * The optimal size of the control is defined in * Optimal Size of UI Controls. - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. */ result Construct(const Tizen::Graphics::FloatRectangle& rect); @@ -239,7 +239,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] provider The item provider to create and delete items + * @param[in] provider The item provider to create and delete items * @exception E_SUCCESS The method is successful. * @remarks If an item provider is not set for the %Gallery control, the method does not work. @n * The item provider should be allocated on a heap memory. @@ -307,10 +307,10 @@ public: * * @return An error code * @param[in] itemIndex The index of the item to refresh - * @param[in] type The type of change for an item + * @param[in] type The type of change for an item * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c index is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_OUT_OF_RANGE The specified @c index is out of range. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @exception E_SYSTEM A system error has occurred. */ result RefreshGallery(int itemIndex, GalleryRefreshType type); @@ -320,11 +320,11 @@ public: * * @since 2.0 * - * @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. - * @exception E_SYSTEM A system error has occurred. - * @remarks This method clears items in the list and reinvokes methods of the item provider to fill the list. + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method clears items in the list and reinvokes methods of the item provider to fill the list. */ result UpdateGallery(void); @@ -362,9 +362,9 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - When @c pBitmap is @c null, the %Gallery control does not have a background bitmap. @n - * The default value for the background bitmap is @c null. + * The default value for the background bitmap is @c null. * - The background bitmap has a priority over the background color. When both the background bitmap and - * the background color are specified, only the bitmap is displayed. + * the background color are specified, only the bitmap is displayed. */ result SetBitmapOfEmptyGallery(const Tizen::Graphics::Bitmap* pBitmap); @@ -401,7 +401,7 @@ public: * * @since 2.0 * - * @param[in] duration The animation duration + * @param[in] duration The animation duration * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c duration is out of the possible duration range. @n * The specified duration should be greater than or equal to 300 or less than or equals to @c 20000. @@ -431,10 +431,10 @@ public: * @since 2.0 * * @param[in] duration The item view duration - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c duration is out of possible duration range. @n * - The specified @c duration should be greater than @c 10. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The unit of the duration is in milliseconds. * - The default animation duration is different for each slide show animation type. @@ -460,10 +460,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] repeat The repeat status + * @param[in] repeat The repeat status * @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_SYSTEM A system error has occurred. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_SYSTEM A system error has occurred. */ result StartSlideShow(bool repeat = false); @@ -525,9 +525,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] color The background color - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @param[in] color The background color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @remarks The method ignores the alpha value of the @c color parameter and sets the alpha value to @c 255. */ result SetBackgroundColor(const Tizen::Graphics::Color& color); diff --git a/inc/FUiCtrlGalleryItem.h b/inc/FUiCtrlGalleryItem.h index 8c08071..f385237 100644 --- a/inc/FUiCtrlGalleryItem.h +++ b/inc/FUiCtrlGalleryItem.h @@ -37,12 +37,12 @@ class _GalleryItemImpl; /** * @class GalleryItem - * @brief This class defines the common behavior for a %GalleryItem control. + * @brief This class defines the common behavior for a %GalleryItem control. * * @since 2.0 * * The %GalleryItem class represents an item of the Gallery control. An instance of the %GalleryItem class - * comprises of a bitmap image and its image rotation. @n @n + * comprises of a bitmap image and its image rotation. @n * * For more information on the class features, see Gallery. */ @@ -89,18 +89,18 @@ public: * @compatibility This method has compatibility issues with OSP compatible applications. @n * For more information, see @ref CompIoPathPage "here". * @endif - * @return An error code - * @param[in] bitmap The default bitmap image - * @param[in] filePath The bitmap file path - * @param[in] rotation The rotation of the bitmap image - * @exception E_SUCCESS The method is successful. - * @exception E_OVERFLOW The image specified by @c filePath has caused an overflow. - * @exception E_UNSUPPORTED_FORMAT The image specified by @c filePath is not supported. - * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed. - * @exception E_INTERRUPTED The requested operation cannot be performed due to an interruption from another thread. @n - * @exception E_ILLEGAL_ACCESS The image specified by @c filePath parameter, is protected with DRM. - * @exception E_SYSTEM A system error has occurred. - * @remarks The specified file path is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed. + * @return An error code + * @param[in] bitmap The default bitmap image + * @param[in] filePath The bitmap file path + * @param[in] rotation The rotation of the bitmap image + * @exception E_SUCCESS The method is successful. + * @exception E_OVERFLOW The image specified by @c filePath has caused an overflow. + * @exception E_UNSUPPORTED_FORMAT The image specified by @c filePath is not supported. + * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed. + * @exception E_INTERRUPTED The requested operation cannot be performed due to an interruption from another thread. + * @exception E_ILLEGAL_ACCESS The image specified by @c filePath parameter is protected with DRM. + * @exception E_SYSTEM A system error has occurred. + * @remarks The specified @c filePath is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed. */ result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String& filePath, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0); diff --git a/inc/FUiCtrlGalleryTypes.h b/inc/FUiCtrlGalleryTypes.h index a46b292..f744883 100644 --- a/inc/FUiCtrlGalleryTypes.h +++ b/inc/FUiCtrlGalleryTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlGalleryTypes.h - * @brief This is the header file for the Gallery enumerations. + * @brief This is the header file for the %Gallery enumerations. * * This header file contains the declarations of the Gallery enumerations. * @@ -39,7 +39,7 @@ namespace Tizen { namespace Ui { namespace Controls */ enum GalleryImageRotation { - GALLERY_IMAGE_ROTATION_0 = 0, /**< The no rotation */ + GALLERY_IMAGE_ROTATION_0 = 0, /**< No rotation */ GALLERY_IMAGE_ROTATION_90, /**< The 90 degree clockwise rotation */ GALLERY_IMAGE_ROTATION_180, /**< The clockwise rotation */ GALLERY_IMAGE_ROTATION_270 /**< The anticlockwise rotation */ diff --git a/inc/FUiCtrlGroupContainer.h b/inc/FUiCtrlGroupContainer.h index 5d252cb..11156b3 100644 --- a/inc/FUiCtrlGroupContainer.h +++ b/inc/FUiCtrlGroupContainer.h @@ -30,8 +30,8 @@ namespace Tizen { namespace Ui { namespace Controls { /** -* @class GroupContainer -* @brief This class defines common behavior for a %GroupContainer container. +* @class GroupContainer +* @brief This class defines common behavior for a %GroupContainer container. * * @since 2.1 * @@ -64,13 +64,15 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The location and size of the %GroupContainer control as an instance of Rectangle - * @param[in] rowCount The number of rows - * @param[in] columnCount The number of columns - * @param[in] lineWidth Width of the grid lines to draw - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The width or height of @c rect or @c rowCount or @c columnnCount is negative or the value of @c lineWidth is @c 0 or negative. + * @param[in] rect The location and size of the %GroupContainer control as an instance of Rectangle + * @param[in] rowCount The number of rows + * @param[in] columnCount The number of columns + * @param[in] lineWidth The width of the grid lines to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either of the following conditions has occured: + * - The width or height of @c rect or @c rowCount or @c columnnCount is negative. + * - The value of @c lineWidth is @c 0 or negative. * @exception E_OPERATION_FAILED The operation has failed. * @remarks The available space for controls is less than the width or height of the container by the total width or height of the grid lines. */ @@ -82,13 +84,15 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The location and size of the %GroupContainer control as an instance of FloatRectangle - * @param[in] rowCount The number of rows - * @param[in] columnCount The number of columns - * @param[in] lineWidth Width of the grid lines to draw - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The width or height of @c rect or @c rowCount or @c columnnCount is negative or the value of @c lineWidth is @c 0 or negative. + * @param[in] rect The location and size of the %GroupContainer control as an instance of FloatRectangle + * @param[in] rowCount The number of rows + * @param[in] columnCount The number of columns + * @param[in] lineWidth The width of the grid lines to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either of the following conditions has occurred: + * - The width or height of @c rect or @c rowCount or @c columnnCount is negative. + * - The value of @c lineWidth is @c 0 or negative. * @exception E_OPERATION_FAILED The operation has failed. * @remarks The available space for controls is less than the width or height of the container by the total width or height of the grid lines. */ @@ -101,12 +105,12 @@ public: * * @return An error code * @param[in] control The control to add to the container - * @param[in] rowIndex The row index of the cell + * @param[in] rowIndex The row index of the cell * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0. - * @exception E_INVALID_ARG A specified input parameter @c control is invalid. - * @exception E_INVALID_OPERATION The cell specified by @c rowIndex and @c columnIndex is already bound to another control. + * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0. + * @exception E_INVALID_ARG A specified input parameter @c control is invalid. + * @exception E_INVALID_OPERATION The cell specified by @c rowIndex and @c columnIndex is already bound to another control. * @see Merge() * @remarks * - If a control is being added to the merged cells, the row index and column index of a representative cell should be given. @@ -115,14 +119,14 @@ public: result AddControlAt(Control& control, int rowIndex, int columnIndex); /** - * Gets the control at a specified cell index in the GroupContainer. + * Gets the control at a specified cell index in the %GroupContainer. * * @since 2.1 * * @return The control at a specified index of the list, @n - * else @c null if the cell index is not valid or no control is added + * else @c null if the cell index is not valid or no control is added * @param[in] rowIndex The row index of the cell - * @param[in] columnIndex The column index of the cell + * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0. * @exception E_SYSTEM The method cannot proceed due to a severe system error. @@ -132,12 +136,12 @@ public: const Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex) const; /** - * Gets the control at a specified cell index in the GroupContainer. + * Gets the control at a specified cell index in the %GroupContainer. * * @since 2.1 * * @return The control at a specified index of the list, @n - * else @c null if the cell index is not valid or no control is added + * else @c null if the cell index is not valid or no control is added * @param[in] rowIndex The row index of the cell * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. @@ -149,7 +153,7 @@ public: Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex); /** - * Removes a specified control from a specified row and column index + * Removes a specified control from a specified row and column index. * * @since 2.1 * @@ -158,13 +162,13 @@ public: * @param[in] columnIndex The column index of the control to remove * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0. - * @exception E_OPERATION_FAILED The operation has failed. - * @exception E_INVALID_OPERATION No control has been bound to the specified cell. + * @exception E_OPERATION_FAILED The operation has failed. + * @exception E_INVALID_OPERATION No control has been bound to the specified cell. * @remarks * - When you remove the control from the merged cell, the row index and column index of a representative cell should be given. * - The removed child control is deleted from the memory. Before it is removed from the container, OnTerminating() - * of the child control is called. - * @see Tizen::Ui::Control::OnTerminating() + * of the child control is called. + * @see Control::OnTerminating() */ result RemoveControlAt (int rowIndex, int columnIndex); @@ -178,7 +182,7 @@ public: * @param[in] width The new width of the column * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0. - * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0. + * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0. * */ result SetColumnWidth(int columnIndex, int width); @@ -193,7 +197,7 @@ public: * @param[in] width The new width of the column * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0. - * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.0f. + * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.0f. * */ result SetColumnWidth(int columnIndex, float width); @@ -289,24 +293,24 @@ public: * @param[in] rowCount The number of cells to merge along the row * @param[in] columnCount The number of cells to merge along the column * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG One or more cells in the specified range is(are) already merged. + * @exception E_INVALID_ARG One or more cells in the specified range is(are) already merged. * @exception E_OUT_OF_RANGE The specified @c rowStartIndex or @c columnStartIndex is greater than the number of elements or less than @c 0 * @remarks * - When the cells are merged, the top-left cell will play the role of representative cell on behalf of merged cells. * - To manipulate the merge cell, the row index and column index of the representative cell has to be given. Merging cells - * with the merged cell is allowed, but the newly merged cell should completely contain the all cells to merge. + * with the merged cell is allowed, but the newly merged cell should completely contain all the cells to merge. */ result Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount); /** - * Enables/disables resizing of the control in a cell + * Enables/disables resizing of the control in a cell. * * @since 2.1 * * @return An error code - * @param[in] rowIndex The row index of the row in which the control is resized - * @param[in] columnIndex The column index of the column in which the control is resized - * @param[in] enable boolean value to enable or disable the resizing of control + * @param[in] rowIndex The index of the row in which the control is resized + * @param[in] columnIndex The index of the column in which the control is resized + * @param[in] enable The boolean value to enable or disable the resizing of control * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0. * @@ -314,7 +318,7 @@ public: result SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable); /** - * Sets the margin of a cell + * Sets the margin of a cell. * * @since 2.1 * @@ -333,7 +337,7 @@ public: result SetMargin(int rowIndex, int columnIndex, int leftMargin, int rightMargin, int topMargin, int bottomMargin); /** - * Sets the margin of a cell + * Sets the margin of a cell. * * @since 2.1 * @@ -352,7 +356,7 @@ public: result SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin); /** - * Splits the merged cells + * Splits the merged cells. * * @since 2.1 * @@ -371,7 +375,8 @@ public: * @since 2.1 * * @return An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner, - * the width, and the height of the cell, @n else Rectangle(0, 0, -1, -1) if an error occurs + * the width, and the height of the cell, @n + * else Rectangle(0, 0, -1, -1) if an error occurs * @param[in] rowIndex The row index of the cell * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. @@ -385,7 +390,8 @@ public: * @since 2.1 * * @return An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner, - * the width, and the height of the cell, @n else Rectangle(0.0f, 0.0f, -1.0f, -1.0f) if an error occurs + * the width, and the height of the cell, @n + * else Rectangle(0.0f, 0.0f, -1.0f, -1.0f) if an error occurs * @param[in] rowIndex The row index of the cell * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. @@ -394,25 +400,25 @@ public: Tizen::Graphics::FloatRectangle GetBoundsAtF(int rowIndex, int columnIndex) const; /** - * Enables/disables stretchable or shrinkable property of a column + * Enables/disables stretchable or shrinkable property of a column. * * @since 2.1 * * @return An error code * @param[in] columnIndex The column index of the cell - * @param[in] stretchable boolean value to set stretchable or shrinkable property + * @param[in] stretchable The boolean value to set stretchable or shrinkable property * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0. */ result SetColumnStretchable(int columnIndex, bool stretchable); /** - * Checks whether the column is stretchable or shrinkable + * Checks whether the column is stretchable or shrinkable. * * @since 2.1 * * @return @c true if the column is stretchable or shrinkable - * else @c false + * else @c false * @param[in] columnIndex The column index of the cell * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0. @@ -420,25 +426,25 @@ public: bool IsColumnStretchable(int columnIndex) const; /** - * Enables/disables stretchable or shrinkable property of a row + * Enables/disables stretchable or shrinkable property of a row. * * @since 2.1 * * @return An error code * @param[in] rowIndex The row index of the cell - * @param[in] stretchable boolean value to set stretchable or shrinkable property + * @param[in] stretchable The boolean value to set stretchable or shrinkable property * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c rowIndex is greater than the number of elements or less than @c 0. */ result SetRowStretchable(int rowIndex, bool stretchable); /** - * Checks whether the row is stretchable or shrinkable + * Checks whether the row is stretchable or shrinkable. * * @since 2.1 * * @return @c true if the row is stretchable or shrinkable - * else @c false + * else @c false * @param[in] rowIndex The row index of the cell * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c rowIndex is greater than the number of elements or less than @c 0. @@ -470,7 +476,7 @@ public: * @since 2.1 * * @return The row and column divider line color, @n - * else RGBA(0, 0, 0, 255) if line color is not set. + * else RGBA(0, 0, 0, 255) if line color is not set. */ Tizen::Graphics::Color GetLineColor(void) const; diff --git a/inc/FUiCtrlGroupItem.h b/inc/FUiCtrlGroupItem.h index f967c34..0181b35 100644 --- a/inc/FUiCtrlGroupItem.h +++ b/inc/FUiCtrlGroupItem.h @@ -54,9 +54,8 @@ class _OSP_EXPORT_ GroupItem { public: /** - * The object is not fully constructed after this constructor is - * called. @n For full construction, the %Construct() method must be - * called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the %Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -86,7 +85,7 @@ public: * * @since 2.1 * - * @return An error code + * @return An error code * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -98,12 +97,12 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] pBitmap The background bitmap image * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The background bitmap has priority over the background color. When both the background bitmap and background color are - * specified, only the bitmap is displayed. + * @remarks The background bitmap has priority over the background color. When both the background bitmap and background color + * are specified, only the bitmap is displayed. */ result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); @@ -112,13 +111,13 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The background color * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks * - The background bitmap has priority over the background color. When both the background bitmap and the - * background color are specified, only the bitmap is displayed. + * background color are specified, only the bitmap is displayed. * - The background color of the item is not applied when the item is inserted into the GroupedListView of section style. */ result SetBackgroundColor(const Tizen::Graphics::Color& color); @@ -139,7 +138,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The text color * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -163,7 +162,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] size The size of the text * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @@ -177,7 +176,7 @@ public: * * @since 2.1 * - * @return An error code + * @return An error code * @param[in] size The size of the text to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @@ -215,17 +214,17 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] text The text string to add * @param[in] pBitmap The bitmap to display * * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks - * - The behavior of %GroupItem is different according to the style of GroupedListView. + * - The behavior of %GroupItem differs according to the style of GroupedListView. * - When the style is ::GROUPED_LIST_VIEW_STYLE_INDEXED, the text and bitmap of %GroupItem are displayed, - * if they are given. However, when the style is ::GROUPED_LIST_VIEW_STYLE_SECTION, the bitmap is not displayed in any - * case and setting an empty text to %GroupItem does not show %GroupItem. + * if they are given. However, when the style is ::GROUPED_LIST_VIEW_STYLE_SECTION, the bitmap is not displayed in any + * case. When %GroupItem is set to an empty text, %GroupItem is not shown. */ result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); diff --git a/inc/FUiCtrlGroupedList.h b/inc/FUiCtrlGroupedList.h index e75a552..8510ea0 100644 --- a/inc/FUiCtrlGroupedList.h +++ b/inc/FUiCtrlGroupedList.h @@ -63,12 +63,14 @@ namespace Tizen { namespace Ui { namespace Controls { * * A typical use case of %GroupedList would be a list which groups all items alphabetically. * - * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically - * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat + * Note that %CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically + * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat * must be deleted by the application. * * Refer to CustomListItem and CustomListItemFormat. * + * The following example demonstrates how to use the %GroupedList class. + * * Example: * * @image html ui_controls_groupedlist.png @@ -288,8 +290,8 @@ public: * * @return An error code * @param[in] rect An instance of the Graphics::Rectangle class @n - * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and - * height. + * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList + * along with the width and height. * @param[in] style The style of the %GroupedList control * @param[in] itemDivider Set to @c true to display an item divider, @n * else @c false @@ -567,7 +569,7 @@ public: * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. * @since 2.0 * - * @return The color of the text to be displayed + * @return The color of the text to be displayed * @endif */ Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; diff --git a/inc/FUiCtrlGroupedListView.h b/inc/FUiCtrlGroupedListView.h index 8ee1530..547fb6d 100644 --- a/inc/FUiCtrlGroupedListView.h +++ b/inc/FUiCtrlGroupedListView.h @@ -401,7 +401,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class + * @param[in] rect An instance of the Graphics::Rectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created * %GroupedListView control along with the width and height.@n * The optimal size of the control is defined in @@ -425,7 +425,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class + * @param[in] rect An instance of the Graphics::Rectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created * %GroupedListView control along with the width and height.@n * The optimal size of the control is defined in @@ -447,7 +447,7 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class + * @param[in] rect An instance of the Graphics::Rectangle class @n * This instance represents the x and y coordinates of the top-left corner of the created * %GroupedListView control along with the width and height.@n * The optimal size of the control is defined in @@ -894,8 +894,9 @@ public: * @param[out] groupIndex The index of the group that the item belongs to * @param[out] itemIndex The index of the item * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks This method should be called only after list items are created. @n * If this method needs to be called early in the lifecycle of the ListView, * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). @@ -913,8 +914,9 @@ public: * @param[out] groupIndex The index of the group that the item belongs to * @param[out] itemIndex The index of the item * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks This method should be called only after list items are created. @n * If this method needs to be called early in the lifecycle of the ListView, * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). @@ -931,8 +933,9 @@ public: * @param[out] groupIndex The index of the group that the item belongs to * @param[out] itemIndex The index of the item * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks This method should be called only after list items are created. @n * If this method needs to be called early in the lifecycle of the ListView, * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). @@ -949,8 +952,9 @@ public: * @param[out] groupIndex The index of the group that the item belongs to * @param[out] itemIndex The index of the item * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks This method should be called only after list items are created. @n * If this method needs to be called early in the lifecycle of the ListView, * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). @@ -969,8 +973,9 @@ public: * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position. * - @c elementId is @c -1 when there is no element at the specified position @@ -993,8 +998,9 @@ public: * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position. * - @c elementId is @c -1 when there is no element at the specified position @@ -1015,8 +1021,9 @@ public: * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position. * - @c elementId is @c -1 when there is no element at the specified position @@ -1037,8 +1044,9 @@ public: * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position. * - @c elementId is @c -1 when there is no element at the specified position diff --git a/inc/FUiCtrlGroupedListViewTypes.h b/inc/FUiCtrlGroupedListViewTypes.h index 8dec8b3..b2cbd72 100644 --- a/inc/FUiCtrlGroupedListViewTypes.h +++ b/inc/FUiCtrlGroupedListViewTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlGroupedListViewTypes.h - * @brief This is the header file for the GroupedListView enumerations. + * @brief This is the header file for the %GroupedListView enumerations. * * This header file contains the declarations of the GroupedListView enumerations. */ @@ -29,7 +29,7 @@ namespace Tizen { namespace Ui { namespace Controls /** * @enum GroupedListViewStyle * - * Defines the style of %GroupedListView. + * Defines the styles of GroupedListView. * * @since 2.0 */ diff --git a/inc/FUiCtrlGroupedTableView.h b/inc/FUiCtrlGroupedTableView.h index 4289b48..62594d4 100644 --- a/inc/FUiCtrlGroupedTableView.h +++ b/inc/FUiCtrlGroupedTableView.h @@ -336,16 +336,16 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with - * the width and height.@n + * @param[in] rect An instance of the Graphics::Rectangle class @n + * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with + * the width and height.@n * The optimal size of the control is defined in * Optimal Size of UI Controls. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %GroupedTableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %GroupedTableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -356,16 +356,16 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with - * the width and height.@n + * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n + * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with + * the width and height.@n * The optimal size of the control is defined in * Optimal Size of UI Controls. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %GroupedTableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %GroupedTableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -375,7 +375,7 @@ public: * * @since 2.0 * - * @param[in] pProvider The item provider to create and delete items + * @param[in] pProvider The item provider to create and delete items * @remarks * - If an item provider is not set for the table view, the table view does not work. * - The specified provider should be allocated in heap memory. @@ -388,7 +388,7 @@ public: * * @since 2.1 * - * @param[in] pProvider The item provider to create and delete items + * @param[in] pProvider The item provider to create and delete items * @remarks * - If an item provider is not set for the table view, the table view does not work. * - The specified provider should be allocated in heap memory. @@ -402,10 +402,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] groupIndex The index of the group - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @param[in] groupIndex The index of the group + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the @@ -418,15 +418,15 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] groupIndex The index of the group - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @return An error code + * @param[in] groupIndex The index of the group + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result CollapseGroup(int groupIndex); @@ -435,9 +435,9 @@ public: * * @since 2.0 * - * @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 @b Since: @b 2.1. + * @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 @b Since: @b 2.1. * @remarks This method does not work during the ITableViewItemProvider call-back procedure. */ result ExpandAllGroups(void); @@ -447,9 +447,9 @@ public: * * @since 2.0 * - * @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 @b Since: @b 2.1. + * @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 @b Since: @b 2.1. * @remarks This method does not work during the ITableViewItemProvider call-back procedure. */ result CollapseAllGroups(void); @@ -477,17 +477,17 @@ public: } /** - * Returns whether the group is expanded or not. + * Checks whether the group is expanded or not. * * @since 2.0 * - * @return @c true if the group is expanded, @n - * else @c false - * @param[in] groupIndex The index of the group - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * @return @c true if the group is expanded, @n + * else @c false + * @param[in] groupIndex The index of the group + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsGroupExpanded(int groupIndex) const; @@ -501,12 +501,12 @@ public: void SetGroupedLookEnabled(bool enable); /** - * Returns whether the grouped look is enabled or not. + * Checks whether the grouped look is enabled or not. * * @since 2.0 * - * @return @c true if the grouped look is enabled, @n - * else @c false + * @return @c true if the grouped look is enabled, @n + * else @c false */ bool IsGroupedLookEnabled(void) const; @@ -516,11 +516,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @return An error code + * @param[in] listener The event listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. */ result AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); @@ -530,10 +530,10 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The listener is not found. */ result RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); @@ -543,11 +543,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. */ result AddFastScrollListener(IFastScrollListener& listener); @@ -558,11 +558,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. */ result RemoveFastScrollListener(IFastScrollListener& listener); @@ -572,12 +572,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListener::OnScrollEndReached() * @see RemoveScrollEventListener() */ @@ -589,11 +589,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListener::OnScrollEndReached() * @see AddScrollEventListener() */ @@ -605,12 +605,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListenerF::OnScrollEndReached() * @see RemoveScrollEventListenerF() */ @@ -622,11 +622,11 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListenerF::OnScrollEndReached() * @see AddScrollEventListenerF() */ @@ -637,17 +637,18 @@ public: * * @since 2.0 * - * @param[in] enable Set to @c true to enable the collapse by pinch gesture, else @c false + * @param[in] enable Set to @c true to enable the collapse by pinch gesture, @n + * else @c false */ void SetCollapseByPinchGestureEnabled(bool enable); /** - * Returns whether the collapse by pinch gesture is enabled or not. + * Checks whether the collapse by pinch gesture is enabled or not. * * @since 2.0 * - * @return @c true if the collapse by pinch gesture is enabled, @n - * else @c false + * @return @c true if the collapse by pinch gesture is enabled, @n + * else @c false */ bool IsCollapseByPinchGestureEnabled(void) const; @@ -656,7 +657,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] text The text of the index * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n * else @c false @@ -670,7 +671,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[out] groupIndex The group index * @param[out] itemIndex The item index * @exception E_SUCCESS The method is successful. @@ -683,7 +684,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[out] groupIndex The group index * @param[out] itemIndex The item index * @exception E_SUCCESS The method is successful. @@ -697,18 +698,18 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] groupIndex The group index * @param[in] itemIndex The item index * @param[in] itemAlignment The item alignment * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - If the specified item. itemIndex is @c -1, then the method is applied to the group item with the given index. - * This method does not work during the ITableViewItemProvider call-back procedure. + * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); @@ -717,37 +718,37 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] check Set to @c true to select the item, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] check Set to @c true to select the item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. * @remarks * - This method works only when the annex style of the item allows selection. - * This method does not work during the ITableViewItemProvider call-back procedure. + * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemChecked(int groupIndex, int itemIndex, bool check); /** - * Returns whether the item at the specified index is selected or not. + * Checks whether the item at the specified index is selected or not. * * @since 2.0 * - * @return @c true if the item is selected, @n - * else @c false - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the item is selected, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @remarks * - This method returns @c false, if the annex style of the item does not allow selection. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemChecked(int groupIndex, int itemIndex) const; @@ -756,32 +757,32 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] enable Set to @c true to enable the specified item, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] enable Set to @c true to enable the specified item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemEnabled(int groupIndex, int itemIndex, bool enable); /** - * Returns whether the item at the specified index is enabled or disabled. + * Checks whether the item at the specified index is enabled or disabled. * * @since 2.0 * - * @return @c true if the item is enabled, @n - * else @c false - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ @@ -801,9 +802,9 @@ public: * * @since 2.0 * - * @return The total number of items in the specified group - * @param[in] groupIndex The group index - * @exception E_SUCCESS The method is successful. + * @return The total number of items in the specified group + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE A specified input parameter is invalid. */ int GetItemCountAt(int groupIndex) const; @@ -819,17 +820,17 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] type The item to add, remove, or modify - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] type The item to add, remove, or modify + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - If the specified @c itemIndex is @c -1, then the method is applied to the group item with the given index. * - Note that if @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE option is used to a group item, all the items in the - * group (including the group item itself) are removed from the table view. + * group (including the group item itself) are removed from the table view. * - This method does not work during the ITableViewItemProvider call-back procedure. */ result RefreshItem(int groupIndex, int itemIndex, TableViewRefreshType type); @@ -841,9 +842,9 @@ public: * * @since 2.1 * - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The %GroupedTableView item provider is processing another request. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The %GroupedTableView item provider is processing another request. */ result RefreshAllItems(void); @@ -853,11 +854,12 @@ public: * * @since 2.0 * - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - This method will delete all the items and recreate them, so it should not be called from the inside of - * OnGroupedTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method. + * OnGroupedTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should + * use the RefreshItem() method. * - This method should not be called from IGroupedTableViewItemProvider implementation because of recursion. * - The specific error code can be accessed using the GetLastResult() method. */ @@ -868,13 +870,13 @@ public: * * @since 2.0 * - * @param[in] position The position of the item - * @param[out] groupIndex The group index of the item on specified position - * @param[out] itemIndex The item index of the item on specified position + * @param[in] position The position of the item + * @param[out] groupIndex The group index of the item on specified position + * @param[out] itemIndex The item index of the item on specified position * @remarks * - This method sets both of groupIndex and itemIndex to @c -1 if no item is found at the given position. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ void GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; @@ -883,14 +885,14 @@ public: * * @since 2.1 * - * @param[in] position The position of the item - * @param[out] groupIndex The group index of the item on specified position - * @param[out] itemIndex The item index of the item on specified position + * @param[in] position The position of the item + * @param[out] groupIndex The group index of the item on specified position + * @param[out] itemIndex The item index of the item on specified position * @remarks * - This method sets both of groupIndex and itemIndex to @c -1 if no item is found at the given position. * - This method should be called only after TableView items are created. @n - * If this method needs to be called early in the lifecycle of the TableView, then UpdateTableView() method should be called - * explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of the TableView, then UpdateTableView() method should be called + * explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ void GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; @@ -899,7 +901,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The division line color */ void SetItemDividerColor(const Tizen::Graphics::Color& color); @@ -919,7 +921,7 @@ public: * @since 2.0 * * @param[in] color The background color - * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, + * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, * only the bitmap image is displayed. */ void SetBackgroundColor(const Tizen::Graphics::Color& color); @@ -959,15 +961,15 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation + * @return An error code + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation * @remarks * - If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it - * will return @c E_OUT_OF_RANGE. @n - * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. + * will return @c E_OUT_OF_RANGE. @n + * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. * - This method does not work during the ITableViewItemProvider call-back procedure. */ result ScrollByPixel(int pixel); @@ -978,15 +980,15 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation + * @return An error code + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation * @remarks * - If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then - * it will return @c E_OUT_OF_RANGE. @n - * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. + * it will return @c E_OUT_OF_RANGE. @n + * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. * - This method does not work during the ITableViewItemProvider call-back procedure. */ result ScrollByPixel(float pixel); @@ -1053,11 +1055,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result OpenContextItem(int groupIndex, int itemIndex); @@ -1066,12 +1068,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result CloseContextItem(int groupIndex, int itemIndex); @@ -1082,10 +1084,10 @@ public: * * @return @c true if the context item has been opened, @n * else @c false - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. */ bool IsContextItemOpened(int groupIndex, int itemIndex) const; diff --git a/inc/FUiCtrlHeader.h b/inc/FUiCtrlHeader.h index 52b9d49..8d8389b 100644 --- a/inc/FUiCtrlHeader.h +++ b/inc/FUiCtrlHeader.h @@ -179,7 +179,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or the index is greater than or equal to - * the number of elements or less than @c 0. + * the number of elements or less than @c 0. * @exception E_INVALID_ARG A specified input parameter is invalid. @n * The specified @c item is not constructed. * @exception E_SYSTEM A system error has occurred. @@ -352,8 +352,9 @@ public: * @return The selected item index, @n * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION This operation is supported when the style of the %Header control is ::HEADER_STYLE_SEGMENTED, @n - * ::HEADER_STYLE_SEGMENTED_WITH_TITLE, ::HEADER_STYLE_TAB, ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. + * @exception E_UNSUPPORTED_OPERATION This operation is supported when the style of the %Header control is + * ::HEADER_STYLE_SEGMENTED, ::HEADER_STYLE_SEGMENTED_WITH_TITLE, ::HEADER_STYLE_TAB, + * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. * @remarks The specific error code can be accessed using the GetLastResult() method. */ int GetSelectedItemIndex(void) const; @@ -593,8 +594,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 - * or ::HEADER_STYLE_TAB_LARGE. + * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB + * or ::HEADER_STYLE_TAB_LARGE. */ result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); @@ -610,8 +611,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 - * or ::HEADER_STYLE_TAB_LARGE. + * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB + * 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); @@ -693,7 +694,7 @@ public: * * @return An error code * @param[in] itemIndex The index of the item to set - * @param[in] enable Set to @c true to enable the item state, @n + * @param[in] enable Set to @c true to enable the item state, @n * else @c false * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n @@ -773,7 +774,7 @@ public: * @param[in] pIcon The title icon to set @n * Set to @c null to remove the title icon. * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n + * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. * @exception E_SYSTEM A system error has occurred. */ @@ -788,7 +789,7 @@ public: * @return An error code * @param[in] text The text to set * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n + * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. * @exception E_SYSTEM A system error has occurred. * @remarks If the text cannot be displayed in a line, then the ellipsis is applied at the end. @n @@ -805,7 +806,7 @@ public: * @return An error code * @param[in] color The title text color to set * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n + * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. * @exception E_SYSTEM A system error has occurred. */ @@ -904,8 +905,8 @@ public: * @param[in] enable Set to @c true to enable the edit mode, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Header control style is ::HEADER_STYLE_TAB, @n - * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. + * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Header control style is ::HEADER_STYLE_TAB, + * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. */ result SetTabEditModeEnabled(bool enable); @@ -1026,7 +1027,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is invalid. @n * The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE - * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. + * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. * @remarks For icon size details, see here. */ result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon); @@ -1042,7 +1043,7 @@ public: * @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999. * @exception E_INVALID_OPERATION This operation is invalid. @n * The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE - * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. + * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number. */ result SetTitleNumberedBadgeIcon(int number); diff --git a/inc/FUiCtrlHeaderItem.h b/inc/FUiCtrlHeaderItem.h index 0af62df..18ec02c 100644 --- a/inc/FUiCtrlHeaderItem.h +++ b/inc/FUiCtrlHeaderItem.h @@ -159,10 +159,11 @@ public: * @exception E_SUCCESS The method is successful. * @remarks * - If the size of the bitmap is greater than the default size, the bitmap is scaled down. - * - The bitmap specified for the @c HEADER_ITEM_STATUS_NORMAL will be applied for all other statuses unless different bitmaps - * are explicitly set for those by using this method. + * - The bitmap specified for @c HEADER_ITEM_STATUS_NORMAL will be applied for all other statuses unless different bitmaps + * are explicitly set for those by using this method. * - Note that the specified bitmaps are ignored if the style of the Header control is not ::HEADER_STYLE_TITLE_BUTTON. @n - * Furthermore, the title button does not support @c HEADER_ITEM_STATUS_SELECTED status and the bitmap for the status is also ignored. + * Furthermore, the title button does not support @c HEADER_ITEM_STATUS_SELECTED status and the bitmap for + * the status is also ignored. */ result SetIcon(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pIcon); @@ -176,8 +177,8 @@ public: * @param[in] text The text to set * @exception E_SUCCESS The method is successful. * @remarks - * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and the ellipsis is applied if the text - * is longer than two lines. + * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and + * the ellipsis is applied if the text is longer than two lines. * - Use @htmlonly '\n' @endhtmlonly to denote the end of the line. */ result SetText(const Tizen::Base::String& text); diff --git a/inc/FUiCtrlICustomElement.h b/inc/FUiCtrlICustomElement.h index 2c84caf..372f039 100644 --- a/inc/FUiCtrlICustomElement.h +++ b/inc/FUiCtrlICustomElement.h @@ -66,7 +66,7 @@ public: * @since 2.0 * * @return @c true if the drawing is successful, @n - * else @c false + * else @c false * @param[in] canvas The graphic canvas of the list control * @param[in] rect The position and size of the element * @param[in] status The status of the element diff --git a/inc/FUiCtrlICustomElementF.h b/inc/FUiCtrlICustomElementF.h index 6267992..8ba1030 100644 --- a/inc/FUiCtrlICustomElementF.h +++ b/inc/FUiCtrlICustomElementF.h @@ -66,7 +66,7 @@ public: * @since 2.1 * * @return @c true if the drawing is successful, @n - * else @c false + * else @c false * @param[in] canvas The graphic canvas of the list control * @param[in] rect The position and size of the element * @param[in] status The status of the element diff --git a/inc/FUiCtrlICustomListElement.h b/inc/FUiCtrlICustomListElement.h index c8a2da2..7403b91 100644 --- a/inc/FUiCtrlICustomListElement.h +++ b/inc/FUiCtrlICustomListElement.h @@ -95,7 +95,7 @@ public: * * @return An error code * @param[in] canvas The graphic canvas of the list control - * @param[in] rect The location and size of the CustomList element + * @param[in] rect The location and size of the CustomList element * @param[in] itemStatus The status of the item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. diff --git a/inc/FUiCtrlIExpandableEditAreaEventListener.h b/inc/FUiCtrlIExpandableEditAreaEventListener.h index 6d993af..e285084 100644 --- a/inc/FUiCtrlIExpandableEditAreaEventListener.h +++ b/inc/FUiCtrlIExpandableEditAreaEventListener.h @@ -70,7 +70,7 @@ public: * * @param[in] source The source of the event * @param[in] newLineCount The new line count - * @remarks For ExpandableEditArea created with EXPANDABLE_EDIT_AREA_STYLE_TOKEN, newLineCount will be 0. + * @remarks For ExpandableEditArea created with @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN, @c newLineCount will be @c 0. */ virtual void OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) = 0; @@ -81,7 +81,7 @@ public: * * @param[in] source The source of the event * @param[in] newLineCount The new line count - * @remarks For ExpandableEditArea created with EXPANDABLE_EDIT_AREA_STYLE_TOKEN, newLineCount will be 0. + * @remarks For ExpandableEditArea created with @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN, @c newLineCount will be @c 0. */ virtual void OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) = 0; diff --git a/inc/FUiCtrlIFormMenuEventListener.h b/inc/FUiCtrlIFormMenuEventListener.h index c4bebf3..dfc330e 100644 --- a/inc/FUiCtrlIFormMenuEventListener.h +++ b/inc/FUiCtrlIFormMenuEventListener.h @@ -16,9 +16,9 @@ // /** * @file FUiCtrlIFormMenuEventListener.h - * @brief This is the header file for the %IFormMenuventListener interface. + * @brief This is the header file for the %IFormMenuEventListener interface. * - * This header file contains the declarations of the %IFormMenuventListener interface. + * This header file contains the declarations of the %IFormMenuEventListener interface. */ #ifndef _FUI_CTRL_IFORM_MENU_EVENT_LISTENER_H_ #define _FUI_CTRL_IFORM_MENU_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIFrameEventListener.h b/inc/FUiCtrlIFrameEventListener.h index d799610..5256e8c 100644 --- a/inc/FUiCtrlIFrameEventListener.h +++ b/inc/FUiCtrlIFrameEventListener.h @@ -59,7 +59,8 @@ public: public: /** * Called when a Frame instance is about to be destroyed. @n - * The %OnFrameTerminating() method is called just before the system destroys the %Frame instance of an application during the application termination sequence. + * The %OnFrameTerminating() method is called just before the system destroys the %Frame instance of an application during + * the application termination sequence. * * @since 2.0 * diff --git a/inc/FUiCtrlIGalleryItemProvider.h b/inc/FUiCtrlIGalleryItemProvider.h index 7cec3c3..f270876 100644 --- a/inc/FUiCtrlIGalleryItemProvider.h +++ b/inc/FUiCtrlIGalleryItemProvider.h @@ -70,11 +70,11 @@ public: * * @return An item of the Gallery control * @param[in] index The index of the item - * @see DeleteItem() * @remarks An application that uses the Gallery control must implement this method. This method is expected to return an item that is allocated on a - * heap memory. The returned item can be of type GalleryItem. Note that when the item is not required, the Gallery control calls the + * heap memory. The returned item can be of type GalleryItem. Note that when the item is not required, the %Gallery control calls the * IGalleryItemProvider::DeleteItem() method. - * The returned item should not be a null pointer. + * The returned item should not be a @c null pointer. + * @see DeleteItem() */ virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index) = 0; @@ -87,10 +87,10 @@ public: * else @c false * @param[in] index The index of the item * @param[in] pItem The pointer to GalleryItem to delete - * @see CreateItem() * @remarks An application that uses the Gallery control must implement this method. Using this method, an application can deallocate the item. If an * application deallocates the item, this method returns @c true. This notifies the Gallery control to not release the item. - * Otherwise, the item is deallocated by the Gallery control. + * Otherwise, the item is deallocated by the %Gallery control. + * @see CreateItem() */ virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem) = 0; diff --git a/inc/FUiCtrlIGroupedListViewItemEventListener.h b/inc/FUiCtrlIGroupedListViewItemEventListener.h index 393de5a..15b4fb1 100644 --- a/inc/FUiCtrlIGroupedListViewItemEventListener.h +++ b/inc/FUiCtrlIGroupedListViewItemEventListener.h @@ -41,8 +41,8 @@ class GroupedListView; * * The %IGroupedListViewItemEventListener interface is the listener interface for receiving GroupedListView item events. * The class that processes a list item event implements this interface, and the instance created with that class is registered - * with a UI control, using the control's AddGroupedListViewItemEventListener() method. When the list item event occurs, a - * method of that instance is invoked. + * with a UI control, using the control's AddGroupedListViewItemEventListener() method. When the list item event occurs, a + * method of that instance is invoked. * * For more information on the class features, see ListViews. */ @@ -71,9 +71,10 @@ public: * @param[in] status The status of the element * * @remarks - * - This method is called when an element of the %CustomItem control in the %GroupedListView control is checked, unchecked, - * or selected. - * - If the method is called to notify the state change of an item's annex or the item itself, the specified elementId is set to @c -1. + * - This method is called when an element of the CustomItem control in the %GroupedListView control is checked, unchecked, + * or selected. + * - If the method is called to notify the state change of an item's annex or the item itself, the specified + * elementId is set to @c -1. */ virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0; @@ -106,19 +107,19 @@ public: * * @since 2.0 * - * @param[in] listView The source of the event - * @param[in] groupIndex The index of the group - * @param[in] itemIndex The index of the item in the group - * @param[in] elementId The element ID - * @param[in,out] invokeListViewItemCallback Indicates whether to invoke %GroupedListView item callback after this method returns + * @param[in] listView The source of the event + * @param[in] groupIndex The index of the group + * @param[in] itemIndex The index of the item in the group + * @param[in] elementId The element ID + * @param[in,out] invokeListViewItemCallback Indicates whether to invoke GroupedListView item callback after this method returns * @remarks * - This method is invoked when an item or an element is long pressed. @n - * When the event comes from the annex or the whole item, @c elementId is always -1. - * - Setting @c invokeListViewItemCallback to @c true invokes GroupedListView item callbacks after this method returns. + * When the event comes from the annex or the whole item, @c elementId is always -1. + * - Setting @c invokeListViewItemCallback to @c true invokes %GroupedListView item callbacks after this method returns. * - Set @c invokeListViewItemCallback to @c false to not invoke %GroupedListView item callbacks. The default value of - * @c invokeListViewItemCallback is @c true. + * @c invokeListViewItemCallback is @c true. * - Note that other %GroupedListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, if - * %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method. + * %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method. */ virtual void OnGroupedListViewItemLongPressed(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, bool& invokeListViewItemCallback); @@ -137,11 +138,11 @@ public: * * @since 2.0 * - * @param[in] listView The source of the event - * @param[in] groupIndexFrom The source group index of the item - * @param[in] itemIndexFrom The source item index of the item - * @param[in] groupIndexTo The target group index of the item - * @param[in] itemIndexTo The target item index of the item + * @param[in] listView The source of the event + * @param[in] groupIndexFrom The source group index of the item + * @param[in] itemIndexFrom The source item index of the item + * @param[in] groupIndexTo The target group index of the item + * @param[in] itemIndexTo The target item index of the item */ virtual void OnGroupedListViewItemReordered(Tizen::Ui::Controls::GroupedListView& listView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); diff --git a/inc/FUiCtrlIGroupedListViewItemProvider.h b/inc/FUiCtrlIGroupedListViewItemProvider.h index 50bb770..db4b5db 100644 --- a/inc/FUiCtrlIGroupedListViewItemProvider.h +++ b/inc/FUiCtrlIGroupedListViewItemProvider.h @@ -65,7 +65,7 @@ public: * @since 2.0 * * @return The total number of groups - * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control. + * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control. */ virtual int GetGroupCount(void) = 0; @@ -74,9 +74,10 @@ public: * * @since 2.0 * - * @return The total number of items in the specified group - * @param[in] groupIndex The index of the group - * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedListView control. + * @return The total number of items in the specified group + * @param[in] groupIndex The index of the group + * @remarks This method must be implemented so that it returns the total number of items for the specified group + * in the GroupedListView control. */ virtual int GetItemCount(int groupIndex) = 0; @@ -85,15 +86,15 @@ public: * * @since 2.0 * - * @return A group item of the GroupedListView control - * @param[in] groupIndex The index of the group - * @param[in] itemWidth The width of the item + * @return A group item of the GroupedListView control + * @param[in] groupIndex The index of the group + * @param[in] itemWidth The width of the item * @remarks - * - An application that uses the GroupedListView control must implement this method. This method is expected to return a group item that is - * allocated on a heap memory. - * - Note that when the item is not required, the GroupedListView control calls %IGroupedListViewItemProvider::DeleteGroupItem() and the - * application deallocates the item. - * - The returned item should not be a null pointer. + * - An application that uses the GroupedListView control must implement this method. This method is expected to + * return a group item that is allocated on a heap memory. + * - Note that when the item is not required, the GroupedListView control calls + * %IGroupedListViewItemProvider::DeleteGroupItem() and the application deallocates the item. + * - The returned item should not be a @c null pointer. */ virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0; @@ -102,16 +103,16 @@ public: * * @since 2.0 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] pItem The pointer to GroupItem to delete - * @param[in] itemWidth The width of the item + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] pItem The pointer to GroupItem to delete + * @param[in] itemWidth The width of the item * @remarks - * - An application that uses the %GroupedListView control must implement this method. + * - An application that uses the GroupedListView control must implement this method. * - Using this method, an application can deallocate the item. - * - If an application deallocates the item, this method must return true. This notifies the GroupedListView control not to release the - * item. Otherwise, the item is deallocated by the GroupedListView control. + * - If an application deallocates the item, this method must return true. This notifies the GroupedListView + * control not to release the item. Otherwise, the item is deallocated by the %GroupedListView control. * @see CreateItem() */ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth) = 0; @@ -121,16 +122,16 @@ public: * * @since 2.0 * - * @return An item of the list - * @param[in] groupIndex The index of the group - * @param[in] itemIndex The index of the item - * @param[in] itemWidth The width of the item + * @return An item of the list + * @param[in] groupIndex The index of the group + * @param[in] itemIndex The index of the item + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedListView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - Note that when the item is not required, the GroupedListView control calls %IGroupedListViewItemProvider::DeleteItem() and the application - * deallocates the item. + * - Note that when the item is not required, the GroupedListView control calls + * %IGroupedListViewItemProvider::DeleteItem() and the application deallocates the item. * @see DeleteItem() */ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0; @@ -140,17 +141,18 @@ public: * * @since 2.0 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] itemIndex The index of the item - * @param[in] pItem The pointer to ListItemBase to delete - * @param[in] itemWidth The width of the item + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] itemIndex The index of the item + * @param[in] pItem The pointer to ListItemBase to delete + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedListView control must implement this method. * - Using this method, an application can deallocate the item. - * - If the application deallocates the item, this method must return true. This notifies the %GroupedListView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedListView control. + * - If the application deallocates the item, this method must return true. This notifies + * the GroupedListView control not to release the item. Otherwise, the item is deallocated by + * the %GroupedListView control. * @see CreateItem() */ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0; @@ -160,10 +162,10 @@ public: * * @since 2.0 * - * @return @c true if the item can be reordered, @n - * else @c false - * @param[in] groupIndexFrom The source group index of the item - * @param[in] groupIndexTo The target group index of the item + * @return @c true if the item can be reordered, @n + * else @c false + * @param[in] groupIndexFrom The source group index of the item + * @param[in] groupIndexTo The target group index of the item */ virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); diff --git a/inc/FUiCtrlIGroupedListViewItemProviderF.h b/inc/FUiCtrlIGroupedListViewItemProviderF.h index 6275f0a..44a7851 100644 --- a/inc/FUiCtrlIGroupedListViewItemProviderF.h +++ b/inc/FUiCtrlIGroupedListViewItemProviderF.h @@ -63,8 +63,8 @@ public: * * @since 2.1 * - * @return The total number of groups - * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control. + * @return The total number of groups + * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control. */ virtual int GetGroupCount(void) = 0; @@ -73,9 +73,10 @@ public: * * @since 2.1 * - * @return The total number of items in the specified group - * @param[in] groupIndex The index of the group - * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedListView control. + * @return The total number of items in the specified group + * @param[in] groupIndex The index of the group + * @remarks This method must be implemented so that it returns the total number of items for the specified group + * in the GroupedListView control. */ virtual int GetItemCount(int groupIndex) = 0; @@ -84,15 +85,15 @@ public: * * @since 2.1 * - * @return A group item of the GroupedListView control - * @param[in] groupIndex The index of the group - * @param[in] itemWidth The width of the item + * @return A group item of the GroupedListView control + * @param[in] groupIndex The index of the group + * @param[in] itemWidth The width of the item * @remarks - * - An application that uses the GroupedListView control must implement this method. This method is expected to return a group item that is - * allocated on a heap memory. - * - Note that when the item is not required, the GroupedListView control calls IGroupedListViewItemProvider::DeleteGroupItem() and the - * application deallocates the item. - * - The returned item should not be a null pointer. + * - An application that uses the GroupedListView control must implement this method. This method is expected + * to return a group item that is allocated on a heap memory. + * - Note that when the item is not required, the GroupedListView control calls IGroupedListViewItemProvider::DeleteGroupItem() + * and the application deallocates the item. + * - The returned item should not be a @c null pointer. */ virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0; @@ -101,16 +102,17 @@ public: * * @since 2.1 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] pItem The pointer to GroupItem to delete - * @param[in] itemWidth The width of the item + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] pItem The pointer to GroupItem to delete + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedListView control must implement this method. * - Using this method, an application can deallocate the item. - * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedListView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedListView control. + * - If an application deallocates the item, this method must return @c true. This notifies + * the GroupedListView control not to release the item. Otherwise, the item is deallocated by + * the %GroupedListView control. * @see CreateItem() */ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, float itemWidth) = 0; @@ -120,16 +122,16 @@ public: * * @since 2.1 * - * @return An item of the list - * @param[in] groupIndex The index of the group - * @param[in] itemIndex The index of the item - * @param[in] itemWidth The width of the item + * @return An item of the list + * @param[in] groupIndex The index of the group + * @param[in] itemIndex The index of the item + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedListView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - Note that when the item is not required, the %GroupedListView control calls IGroupedListViewItemProvider::DeleteItem() and the application - * deallocates the item. + * - Note that when the item is not required, the %GroupedListView control calls + * IGroupedListViewItemProvider::DeleteItem() and the application deallocates the item. * @see DeleteItem() */ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0; @@ -139,17 +141,18 @@ public: * * @since 2.1 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] itemIndex The index of the item - * @param[in] pItem The pointer to ListItemBase to delete - * @param[in] itemWidth The width of the item + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] itemIndex The index of the item + * @param[in] pItem The pointer to ListItemBase to delete + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedListView control must implement this method. * - Using this method, an application can deallocate the item. - * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedListView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedListView control. + * - If the application deallocates the item, this method must return @c true. This notifies + * the %GroupedListView control not to release the item. Otherwise, the item is deallocated by + * the %GroupedListView control. * @see CreateItem() */ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0; @@ -159,10 +162,10 @@ public: * * @since 2.1 * - * @return @c true if the item can be reordered, @n - * else @c false - * @param[in] groupIndexFrom The source group index of the item - * @param[in] groupIndexTo The target group index of the item + * @return @c true if the item can be reordered, @n + * else @c false + * @param[in] groupIndexFrom The source group index of the item + * @param[in] groupIndexTo The target group index of the item */ virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); diff --git a/inc/FUiCtrlIGroupedTableViewItemEventListener.h b/inc/FUiCtrlIGroupedTableViewItemEventListener.h index 30ceeaf..6e3ac21 100644 --- a/inc/FUiCtrlIGroupedTableViewItemEventListener.h +++ b/inc/FUiCtrlIGroupedTableViewItemEventListener.h @@ -15,8 +15,8 @@ // limitations under the License. // /** -* @file FUiCtrlIGroupedTableViewItemEventListener.h -* @brief This is the header file for the %IGroupedTableViewItemEventListener interface. +* @file FUiCtrlIGroupedTableViewItemEventListener.h +* @brief This is the header file for the %IGroupedTableViewItemEventListener interface. * * This header file contains the declarations of the %IGroupedTableViewItemEventListener interface. @n * If an item event is generated, a method of this interface is called. @@ -37,8 +37,8 @@ class TableViewContextItem; /** -* @interface IGroupedTableViewItemEventListener -* @brief This interface implements the listener for item event. +* @interface IGroupedTableViewItemEventListener +* @brief This interface implements the listener for item event. * * @since 2.0 * diff --git a/inc/FUiCtrlIGroupedTableViewItemProvider.h b/inc/FUiCtrlIGroupedTableViewItemProvider.h index d867191..dabf3b1 100644 --- a/inc/FUiCtrlIGroupedTableViewItemProvider.h +++ b/inc/FUiCtrlIGroupedTableViewItemProvider.h @@ -16,8 +16,8 @@ // /** -* @file FUiCtrlIGroupedTableViewItemProvider.h -* @brief This is the header file for the %IGroupedTableViewItemProvider interface. +* @file FUiCtrlIGroupedTableViewItemProvider.h +* @brief This is the header file for the %IGroupedTableViewItemProvider interface. * * This header file contains the declarations of the %IGroupedTableViewItemProvider interface. * If the event is generated, a method of this interface is called. @@ -33,14 +33,15 @@ class TableViewItem; class TableViewGroupItem; /** -* @interface IGroupedTableViewItemProvider -* @brief This interface implements the listener for events on %GroupedTableView. +* @interface IGroupedTableViewItemProvider +* @brief This interface implements the listener for events on %GroupedTableView. * * @since 2.0 * -* The %IGroupedTableViewItemProvider interface implements an item provider which generates items for GroupedTableView. %GroupedTableView calls the item provider -* to request an item which is about to be displayed on a screen. Applications which use %GroupedTableView must implement the item provider. -* The class is registered with a %GroupedTableView, using the GroupedTableView::SetItemProvider() method. +* The %IGroupedTableViewItemProvider interface implements an item provider which generates items for GroupedTableView. +* %GroupedTableView calls the item provider to request an item which is about to be displayed on a screen. Applications +* which use %GroupedTableView must implement the item provider. The class is registered with a %GroupedTableView, using +* the GroupedTableView::SetItemProvider() method. */ class _OSP_EXPORT_ IGroupedTableViewItemProvider { @@ -58,8 +59,8 @@ public: * * @since 2.0 * - * @return The total number of groups - * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control. + * @return The total number of groups + * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control. */ virtual int GetGroupCount(void) = 0; @@ -68,9 +69,10 @@ public: * * @since 2.0 * - * @return The total number of items in the specified group - * @param[in] groupIndex The index of the group - * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedTableView control. + * @return The total number of items in the specified group + * @param[in] groupIndex The index of the group + * @remarks This method must be implemented so that it returns the total number of items for the specified group + * in the GroupedTableView control. */ virtual int GetItemCount(int groupIndex) = 0; @@ -79,15 +81,15 @@ public: * * @since 2.0 * - * @return A group item of the GroupedTableView control - * @param[in] groupIndex The index of the group - * @param[in] itemWidth The width of the item + * @return A group item of the GroupedTableView control + * @param[in] groupIndex The index of the group + * @param[in] itemWidth The width of the item * @remarks - * - An application that uses the GroupedTableView control must implement this method. This method is expected to return a group item that is - * allocated on a heap memory. - * - Note that when the group item is not required, the %GroupedTableView control calls IGroupedTableViewItemProvider::DeleteGroupItem() and the - * application deallocates the item. - * - The returned item should not be a null pointer. + * - An application that uses the GroupedTableView control must implement this method. This method is expected to + * return a group item that is allocated on a heap memory. + * - Note that when the group item is not required, the GroupedTableView control calls + * IGroupedTableViewItemProvider::DeleteGroupItem() and the application deallocates the item. + * - The returned item should not be a @c null pointer. */ virtual TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0; @@ -96,15 +98,15 @@ public: * * @since 2.0 * - * @return @c true if the group item is deallocated by this method, - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] pItem The pointer to TableViewGroupItem to delete + * @return @c true if the group item is deallocated by this method, + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] pItem The pointer to TableViewGroupItem to delete * @remarks * - An application that uses the GroupedTableView control must implement this method. * - Using this method, an application can deallocate the item. - * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedTableView control. + * - If an application deallocates the item, this method must return @c true. This notifies the GroupedTableView + * control not to release the item. Otherwise, the item is deallocated by the %GroupedTableView control. * @see CreateGroupItem() */ virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; @@ -114,8 +116,8 @@ public: * * @since 2.0 * - * @param[in] groupIndex The group index - * @param[in] pItem The pointer to TableViewGroupItem to update + * @param[in] groupIndex The group index + * @param[in] pItem The pointer to TableViewGroupItem to update * @remarks * - An application that uses the GroupedTableView control must implement this method. * - This method is called when the modification of a group item is requested. @@ -128,16 +130,16 @@ public: * * @since 2.0 * - * @return An item of the GroupedTableView - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] itemWidth The width of the item + * @return An item of the GroupedTableView + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedTableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - Note that when the item is not required, the %GroupedTableView control calls IGroupedTableViewItemProvider::DeleteItem() - * and the application deallocates the item. + * - Note that when the item is not required, the GroupedTableView control calls + * IGroupedTableViewItemProvider::DeleteItem() and the application deallocates the item. * @see DeleteItem() */ virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0; @@ -147,16 +149,17 @@ public: * * @since 2.0 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem A pointer to TableViewItem to delete * @remarks * - An application that uses the GroupedTableView control must implement this method. * - Using this method, an application can deallocate the item. - * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedTableView control. + * - If the application deallocates the item, this method must return @c true. This notifies + * the %GroupedTableView control not to release the item. Otherwise, the item is deallocated by + * the %GroupedTableView control. * @see CreateItem() */ virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; @@ -166,9 +169,9 @@ public: * * @since 2.0 * - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem A pointer to TableViewItem to update * @remarks * - An application that uses the GroupedTableView control must implement this method. * - This method is called when the modification of an item is requested. @@ -181,8 +184,8 @@ public: * * @since 2.0 * - * @return The default height of a group item - * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control. + * @return The default height of a group item + * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control. */ virtual int GetDefaultGroupItemHeight(void) = 0; @@ -192,8 +195,8 @@ public: * * @since 2.0 * - * @return The default height of an item - * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control. + * @return The default height of an item + * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control. */ virtual int GetDefaultItemHeight(void) = 0; @@ -202,10 +205,10 @@ public: * * @since 2.1 * - * @return @c true if the item can be reordered, @n - * else @c false - * @param[in] groupIndexFrom The source group index of the item - * @param[in] groupIndexTo The target group index of the item + * @return @c true if the item can be reordered, @n + * else @c false + * @param[in] groupIndexFrom The source group index of the item + * @param[in] groupIndexTo The target group index of the item */ virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; } diff --git a/inc/FUiCtrlIGroupedTableViewItemProviderF.h b/inc/FUiCtrlIGroupedTableViewItemProviderF.h index e082656..7a3e3f7 100644 --- a/inc/FUiCtrlIGroupedTableViewItemProviderF.h +++ b/inc/FUiCtrlIGroupedTableViewItemProviderF.h @@ -16,8 +16,8 @@ // /** -* @file FUiCtrlIGroupedTableViewItemProviderF.h -* @brief This is the header file for the %IGroupedTableViewItemProviderF interface. +* @file FUiCtrlIGroupedTableViewItemProviderF.h +* @brief This is the header file for the %IGroupedTableViewItemProviderF interface. * * This header file contains the declarations of the %IGroupedTableViewItemProviderF interface. * If the event is generated, a method of this interface is called. @@ -33,14 +33,15 @@ class TableViewItem; class TableViewGroupItem; /** -* @interface IGroupedTableViewItemProviderF -* @brief This interface implements the listener for events on %GroupedTableView. +* @interface IGroupedTableViewItemProviderF +* @brief This interface implements the listener for events on %GroupedTableView. * * @since 2.1 * -* The %IGroupedTableViewItemProviderF interface implements an item provider which generates items for GroupedTableView. %GroupedTableView calls the item provider -* to request an item which is about to be displayed on a screen. Applications which use %GroupedTableView must implement the item provider. -* The class is registered with a %GroupedTableView, using the GroupedTableView::SetItemProviderF() method. +* The %IGroupedTableViewItemProviderF interface implements an item provider which generates items for GroupedTableView. +* %GroupedTableView calls the item provider to request an item which is about to be displayed on a screen. Applications +* which use %GroupedTableView must implement the item provider. +* The class is registered with %GroupedTableView, using the GroupedTableView::SetItemProviderF() method. */ class _OSP_EXPORT_ IGroupedTableViewItemProviderF { @@ -58,8 +59,8 @@ public: * * @since 2.1 * - * @return The total number of groups - * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control. + * @return The total number of groups + * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control. */ virtual int GetGroupCount(void) = 0; @@ -68,9 +69,10 @@ public: * * @since 2.1 * - * @return The total number of items in the specified group - * @param[in] groupIndex The index of the group - * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedTableView control. + * @return The total number of items in the specified group + * @param[in] groupIndex The index of the group + * @remarks This method must be implemented so that it returns the total number of items for the specified group in + * the GroupedTableView control. */ virtual int GetItemCount(int groupIndex) = 0; @@ -79,15 +81,15 @@ public: * * @since 2.1 * - * @return A group item of the GroupedTableView control - * @param[in] groupIndex The index of the group - * @param[in] itemWidth The width of the item + * @return A group item of the GroupedTableView control + * @param[in] groupIndex The index of the group + * @param[in] itemWidth The width of the item * @remarks - * - An application that uses the GroupedTableView control must implement this method. This method is expected to return a group item that is - * allocated on a heap memory. - * - Note that when the group item is not required, the %GroupedTableView control calls IGroupedTableViewItemProviderF::DeleteGroupItem() and the - * application deallocates the item. - * - The returned item should not be a null pointer. + * - An application that uses the GroupedTableView control must implement this method. This method is expected to + * return a group item that is allocated on a heap memory. + * - Note that when the group item is not required, the GroupedTableView control calls + * IGroupedTableViewItemProviderF::DeleteGroupItem() and the application deallocates the item. + * - The returned item should not be a @c null pointer. */ virtual TableViewGroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0; @@ -96,15 +98,16 @@ public: * * @since 2.1 * - * @return @c true if the group item is deallocated by this method, - * else @c false - * @param[in] groupIndex The index of the group - * @param[in] pItem The pointer to TableViewGroupItem to delete + * @return @c true if the group item is deallocated by this method, + * else @c false + * @param[in] groupIndex The index of the group + * @param[in] pItem The pointer to TableViewGroupItem to delete * @remarks * - An application that uses the GroupedTableView control must implement this method. * - Using this method, an application can deallocate the item. - * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedTableView control. + * - If an application deallocates the item, this method must return @c true. This notifies + * the GroupedTableView control not to release the item. Otherwise, the item is deallocated + * by the %GroupedTableView control. * @see CreateGroupItem() */ virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; @@ -128,16 +131,16 @@ public: * * @since 2.1 * - * @return An item of the GroupedTableView control - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] itemWidth The width of the item + * @return An item of the GroupedTableView control + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] itemWidth The width of the item * @remarks * - An application that uses the GroupedTableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - Note that when the item is not required, the %GroupedTableView control calls IGroupedTableViewItemProviderF::DeleteItem() and the application - * deallocates the item. + * - Note that when the item is not required, the GroupedTableView control calls + * IGroupedTableViewItemProviderF::DeleteItem() and the application deallocates the item. * @see DeleteItem() */ virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0; @@ -147,16 +150,16 @@ public: * * @since 2.1 * - * @return @c true if the item is deallocated by this method, @n - * else @c false - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem The pointer to TableViewItem to delete * @remarks * - An application that uses the GroupedTableView control must implement this method. * - Using this method, an application can deallocate the item. - * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the - * item. Otherwise, the item is deallocated by the %GroupedTableView control. + * - If the application deallocates the item, this method must return @c true. This notifies the GroupedTableView control not to release the + * item. Otherwise, the item is deallocated by the %GroupedTableView control. * @see CreateItem() */ virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; @@ -166,9 +169,9 @@ public: * * @since 2.1 * - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem The pointer to TableViewItem to update * @remarks * - An application that uses the GroupedTableView control must implement this method. * - This method is called when the modification of an item is requested. @@ -181,8 +184,8 @@ public: * * @since 2.1 * - * @return The default height of a group item - * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control. + * @return The default height of a group item + * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control. */ virtual float GetDefaultGroupItemHeight(void) = 0; @@ -192,8 +195,8 @@ public: * * @since 2.1 * - * @return The default height of an item - * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control. + * @return The default height of an item + * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control. */ virtual float GetDefaultItemHeight(void) = 0; @@ -202,10 +205,10 @@ public: * * @since 2.1 * - * @return @c true if the item can be reordered, @n - * else @c false - * @param[in] groupIndexFrom The source group index of the item - * @param[in] groupIndexTo The target group index of the item + * @return @c true if the item can be reordered, @n + * else @c false + * @param[in] groupIndexFrom The source group index of the item + * @param[in] groupIndexTo The target group index of the item */ virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; } diff --git a/inc/FUiCtrlIIconListViewItemEventListener.h b/inc/FUiCtrlIIconListViewItemEventListener.h index cd8708d..c3131f6 100644 --- a/inc/FUiCtrlIIconListViewItemEventListener.h +++ b/inc/FUiCtrlIIconListViewItemEventListener.h @@ -54,7 +54,8 @@ class _OSP_EXPORT_ IIconListViewItemEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n This way, the destructors of the derived classes are called + * when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiCtrlIIconListViewItemProvider.h b/inc/FUiCtrlIIconListViewItemProvider.h index d50c9f3..68a9e08 100644 --- a/inc/FUiCtrlIIconListViewItemProvider.h +++ b/inc/FUiCtrlIIconListViewItemProvider.h @@ -41,7 +41,8 @@ class IconListView; * @since 2.0 * * The %IIconListViewItemProvider interface is the interface for handling IconListView items. - * The class that handles list items implements this interface, and the instance created using the IconListView::Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method. + * The class that handles list items implements this interface, and the instance created using + * the IconListView::Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method. * * For more information on the class features, see ListViews. */ @@ -61,9 +62,9 @@ public: * * @since 2.0 * - * @return The item count of the IconListView - * @remarks Applications that use IconListView must implement this method. This method is expected to return the number of total items in the - * %IconListView. + * @return The item count of IconListView + * @remarks Applications that use IconListView must implement this method. This method is expected to return the number of + * total items in the %IconListView. */ virtual int GetItemCount(void) = 0; @@ -72,12 +73,12 @@ public: * * @since 2.0 * - * @return The item of the IconListView - * @param[in] index The index of the item - * @remarks Applications that use IconListView must implement this method. This method is expected to return an item that is allocated in a heap - * memory. The returned item can be IconListViewItem. Note that, when the item becomes unnecessary, the %IconListView calls - * DeleteItem() and applications are in charge of deallocating the item. @n - * The returned item should not be a null pointer. + * @return The item of the IconListView + * @param[in] index The index of the item + * @remarks Applications that use IconListView must implement this method. This method is expected to return an item that + * is allocated in a heap memory. The returned item can be IconListViewItem. Note that, when the item is not required any more, + * the %IconListView calls DeleteItem() and applications are in charge of deallocating the item. @n + * The returned item should not be a @c null pointer. * */ virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index) = 0; diff --git a/inc/FUiCtrlIListViewItemEventListener.h b/inc/FUiCtrlIListViewItemEventListener.h index b178280..6f519ce 100644 --- a/inc/FUiCtrlIListViewItemEventListener.h +++ b/inc/FUiCtrlIListViewItemEventListener.h @@ -90,7 +90,7 @@ public: virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction) = 0; /** - * Called when the state of an element in the %ListContextItem is changed. + * Called when the state of an element in the ListContextItem is changed. * * @since 2.0 * @@ -106,18 +106,18 @@ public: * * @since 2.0 * - * @param[in] listView The source of the event - * @param[in] index The index of the list - * @param[in] elementId The element ID - * @param[in,out] invokeListViewItemCallback Indicates whether to invoke ListView item callback after this method returns + * @param[in] listView The source of the event + * @param[in] index The index of the list + * @param[in] elementId The element ID + * @param[in,out] invokeListViewItemCallback Indicates whether to invoke ListView item callback after this method returns * @remarks * - This method is invoked when an item or an element is long pressed. * - When the event comes from the annex or the whole item, @c elementId is always @c -1. - * - Setting @c invokeListViewItemCallback to @c true invokes %ListView item callbacks after this method returns. - * - Set @c invokeListViewItemCallback to @c false to not invoke %ListView item callbacks. The default value of - * @c invokeListViewItemCallback is @c true. - * - Note that other %ListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, in case that ListView - * loses the focus, for example, due to invoking a Popup or a ContextMenu in this method. + * - Setting @c invokeListViewItemCallback to @c true invokes ListView item callbacks after this method returns. + * - Set @c invokeListViewItemCallback to @c false to not invoke ListView item callbacks. The default value of + * @c invokeListViewItemCallback is @c true. + * - Note that other ListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, + * if ListView loses the focus, for example, due to invoking a Popup or a ContextMenu in this method. */ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback); @@ -126,9 +126,9 @@ public: * * @since 2.0 * - * @param[in] listView The source of the event - * @param[in] indexFrom The start index of the item - * @param[in] indexTo The final index of the item + * @param[in] listView The source of the event + * @param[in] indexFrom The start index of the item + * @param[in] indexTo The final index of the item */ virtual void OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo); diff --git a/inc/FUiCtrlIListViewItemProvider.h b/inc/FUiCtrlIListViewItemProvider.h index e682124..1e7fc54 100644 --- a/inc/FUiCtrlIListViewItemProvider.h +++ b/inc/FUiCtrlIListViewItemProvider.h @@ -72,16 +72,16 @@ public: * * @since 2.0 * - * @return An item of the ListView - * @param[in] index The index of the item - * @param[in] itemWidth The width of the item + * @return An item of the ListView + * @param[in] index The index of the item + * @param[in] itemWidth The width of the item * @remarks * - The applications that use ListView must implement this method. * - This method is expected to return an item which is allocated in a heap memory. * - The returned item can be a SimpleItem or CustomItem. - * - The returned item should not be a null pointer. - * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of - * deallocating the item. + * - The returned item should not be a @c null pointer. + * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and + * the application is in charge of deallocating the item. * @see DeleteItem() */ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth) = 0; @@ -99,8 +99,8 @@ public: * @remarks * - Applications which use ListView must implement this method. * - In this method, the applications have the chance of deallocating the item. - * - If the application deallocates the item, this method returns @c true, notifying the %ListView not to free the item. @n - * Otherwise, the item will be deallocated by %ListView. + * - If the application deallocates the item, this method returns @c true, notifying the ListView not to free the item. @n + * Otherwise, the item will be deallocated by %ListView. * @see CreateItem() */ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0; diff --git a/inc/FUiCtrlIListViewItemProviderF.h b/inc/FUiCtrlIListViewItemProviderF.h index fd2cb49..d21f9da 100644 --- a/inc/FUiCtrlIListViewItemProviderF.h +++ b/inc/FUiCtrlIListViewItemProviderF.h @@ -72,16 +72,16 @@ public: * * @since 2.1 * - * @return An item of the ListView - * @param[in] index The index of the item - * @param[in] itemWidth The width of the item + * @return An item of the ListView + * @param[in] index The index of the item + * @param[in] itemWidth The width of the item * @remarks * - The applications that use ListView must implement this method. * - This method is expected to return an item which is allocated in a heap memory. * - The returned item can be a SimpleItem or CustomItem. - * - The returned item should not be a null pointer. - * - Note that when the item becomes unnecessary, the %ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of - * deallocating the item. + * - The returned item should not be a @c null pointer. + * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of + * deallocating the item. * @see DeleteItem() */ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, float itemWidth) = 0; @@ -99,8 +99,8 @@ public: * @remarks * - Applications which use ListView must implement this method. * - In this method, the applications have the chance of deallocating the item. - * - If the application deallocates the item, this method returns @c true, notifying the %ListView not to free the item. @n - * Otherwise, the item will be deallocated by %ListView. + * - If the application deallocates the item, this method returns @c true, notifying the ListView not to free the item. @n + * Otherwise, the item will be deallocated by %ListView. * @see CreateItem() */ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0; diff --git a/inc/FUiCtrlIProgressPopupEventListener.h b/inc/FUiCtrlIProgressPopupEventListener.h index 2b1919d..a536522 100644 --- a/inc/FUiCtrlIProgressPopupEventListener.h +++ b/inc/FUiCtrlIProgressPopupEventListener.h @@ -39,17 +39,17 @@ class Control; namespace Tizen { namespace Ui { /** - * @interface IProgressPopupEventListener - * @brief This interface implements the listener for ProgressPopup event. + * @interface IProgressPopupEventListener + * @brief This interface implements the listener for ProgressPopup event. * @since 2.0 * * The %IProgressPopupEventListener interface is the listener interface for receiving an event for closing the ProgressPopup. - * The class that processes a ProgressPopup event + * The class that processes a %ProgressPopup event * implements this interface, and the instance created with that class is registered with a UI control, using the control's - * AddProgressPopupEventListener() method. When the ProgressPopup event occurs, the OnProgressPopupCanceled() method of that instance is invoked. + * AddProgressPopupEventListener() method. When the %ProgressPopup event occurs, the OnProgressPopupCanceled() method of that instance is invoked. * * For more information on the class features, - * see in individual control topics under UI Controls. + * see individual control topics under UI Controls. */ class _OSP_EXPORT_ IProgressPopupEventListener : virtual public Tizen::Base::Runtime::IEventListener diff --git a/inc/FUiCtrlIScrollEventListener.h b/inc/FUiCtrlIScrollEventListener.h index 324dee2..2a96cd7 100644 --- a/inc/FUiCtrlIScrollEventListener.h +++ b/inc/FUiCtrlIScrollEventListener.h @@ -39,15 +39,15 @@ namespace Tizen {namespace Ui { namespace Controls /** * @interface IScrollEventListener - * @brief This interface implements a listener for scroll events. + * @brief This interface implements a listener for scroll events. * * @since 2.0 * * The %IScrollEventListener interface is the listener interface for receiving scroll events. * The class that processes a scroll event implements this interface, and the instance created with that class is registered with - * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s AddScrollEventListener() method. - * When the scroll event occurs, the OnScrollEndReached() - * method of that instance is invoked. + * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s + * AddScrollEventListener() method. + * When the scroll event occurs, the OnScrollEndReached() method of that instance is invoked. * * For more information on the class features, see Panels and * ListViews. @@ -81,8 +81,8 @@ public: * * @since 2.0 * - *@param[in] source The control being scrolled - *@param[in] scrollPosition The scrolled position + *@param[in] source The control being scrolled + *@param[in] scrollPosition The scrolled position */ virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, int scrollPosition) {}; diff --git a/inc/FUiCtrlIScrollEventListenerF.h b/inc/FUiCtrlIScrollEventListenerF.h index 4445d4e..c0da2c5 100644 --- a/inc/FUiCtrlIScrollEventListenerF.h +++ b/inc/FUiCtrlIScrollEventListenerF.h @@ -40,13 +40,14 @@ namespace Tizen {namespace Ui { namespace Controls /** * @interface IScrollEventListenerF - * @brief This interface implements a listener for scroll events. + * @brief This interface implements a listener for scroll events. * * @since 2.1 * * The %IScrollEventListenerF interface is the listener interface for receiving scroll events. * The class that processes a scroll event implements this interface, and the instance created with that class is registered with - * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s AddScrollEventListener() method. + * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s + * AddScrollEventListener() method. * When the scroll event occurs, the OnScrollEndReached() method of that instance is invoked. * * For more information on the class features, see Panels @@ -81,8 +82,8 @@ public: * * @since 2.1 * - *@param[in] source The control being scrolled - *@param[in] scrollPosition The scrolled position + *@param[in] source The control being scrolled + *@param[in] scrollPosition The scrolled position */ virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, float scrollPosition) = 0; diff --git a/inc/FUiCtrlISectionTableViewItemEventListener.h b/inc/FUiCtrlISectionTableViewItemEventListener.h index 8e33750..a319847 100644 --- a/inc/FUiCtrlISectionTableViewItemEventListener.h +++ b/inc/FUiCtrlISectionTableViewItemEventListener.h @@ -36,8 +36,8 @@ class TableViewContextItem; /** -* @interface ISectionTableViewItemEventListener -* @brief This interface implements the listener for item event. +* @interface ISectionTableViewItemEventListener +* @brief This interface implements the listener for item event. * * @since 2.0 * @@ -82,7 +82,7 @@ public: * @param[in] itemIndex The item index * @param[in] pContextItem The context item which is opened or closed * @param[in] activated @c true if a context item is opened, @n - * else @c false + * else @c false */ virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0; diff --git a/inc/FUiCtrlISectionTableViewItemProvider.h b/inc/FUiCtrlISectionTableViewItemProvider.h index e99593d..ded8c6a 100644 --- a/inc/FUiCtrlISectionTableViewItemProvider.h +++ b/inc/FUiCtrlISectionTableViewItemProvider.h @@ -69,7 +69,7 @@ public: * * @return The total number of items in the specified section * @param[in] sectionIndex The index of the section - * @remarks This method must be implemented so that it returns the total number of items for the specified section in the %SectionTableView control. + * @remarks This method must be implemented so that it returns the total number of items for the specified section in the SectionTableView control. */ virtual int GetItemCount(int sectionIndex) = 0; @@ -78,7 +78,7 @@ public: * * @since 2.0 * - * @return An item of the SectionTableView + * @return The item of the SectionTableView * @param[in] sectionIndex The section index * @param[in] itemIndex The item index * @param[in] itemWidth The width of the item @@ -86,7 +86,7 @@ public: * - An application that uses the SectionTableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - The returned item should not be a null pointer. + * - The returned item should not be a @c null pointer. * - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProvider::DeleteItem() and the application * deallocates the item. * @see DeleteItem() @@ -102,7 +102,7 @@ public: * else @c false * @param[in] sectionIndex The section index * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @param[in] pItem A pointer to TableViewItem to delete * @remarks * - An application that uses the SectionTableView control must implement this method. * - Using this method, an application can deallocate the item. @@ -119,7 +119,7 @@ public: * * @param[in] sectionIndex The section index * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] pItem A pointer to TableViewItem to update * @remarks * - An application that uses the SectionTableView control must implement this method. * - This method is called when the modification of an item is requested. @@ -128,24 +128,24 @@ public: virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; /** - * Gets the header text of a specified section. + * Gets the header text of the specified section. * * @since 2.0 * - * @return The section header text of specified section + * @return The section header text of the specified section * @param[in] sectionIndex The index of the group * @remarks * - An application that uses the SectionTableView control must implement this method. - * - The header text will be aligned left + * - The header text will be aligned left. */ virtual Tizen::Base::String GetSectionHeader(int sectionIndex) = 0; /** - * Returns whether the section has the section header or not. + * Checks whether the section has a section header or not. * * @since 2.0 * - * @return @c true if the section has an header, @n + * @return @c true if the section has a header, @n * else @c false * @param[in] sectionIndex The index of the section * @remarks An application that uses the SectionTableView control must implement this method. @@ -153,11 +153,11 @@ public: virtual bool HasSectionHeader(int sectionIndex) = 0; /** - * Gets the footer text of a specified section. + * Gets the footer text of the specified section. * * @since 2.0 * - * @return The footer text of specified section + * @return The footer text of the specified section * @param[in] sectionIndex The index of the section * @remarks * - An application that uses the SectionTableView control must implement this method. @@ -166,11 +166,11 @@ public: virtual Tizen::Base::String GetSectionFooter(int sectionIndex) = 0; /** - * Returns whether the section has the footer or not. + * Checks whether the section has a footer or not. * * @since 2.0 * - * @return @c true, if the section has the footer @n + * @return @c true, if the section has a footer @n * @c false, * @param[in] sectionIndex The index of the section * @remarks An application that uses the SectionTableView control must implement this method. diff --git a/inc/FUiCtrlISectionTableViewItemProviderF.h b/inc/FUiCtrlISectionTableViewItemProviderF.h index f437bb7..44000a5 100644 --- a/inc/FUiCtrlISectionTableViewItemProviderF.h +++ b/inc/FUiCtrlISectionTableViewItemProviderF.h @@ -63,7 +63,7 @@ public: virtual int GetSectionCount(void) = 0; /** - * Gets the total number of items in a specified group. + * Gets the total number of items in the specified group. * * @since 2.1 * @@ -74,11 +74,11 @@ public: virtual int GetItemCount(int sectionIndex) = 0; /** - * Creates a specified item. + * Creates the specified item. * * @since 2.1 * - * @return An item of the SectionTableView + * @return The item of the SectionTableView * @param[in] sectionIndex The section index * @param[in] itemIndex The item index * @param[in] itemWidth The width of the item @@ -86,7 +86,7 @@ public: * - An application that uses the SectionTableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a simple or custom item. - * - The returned item should not be a null pointer. + * - The returned item should not be a @c null pointer. * - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProviderF::DeleteItem() and the application * deallocates the item. * @see DeleteItem() @@ -94,7 +94,7 @@ public: virtual TableViewItem* CreateItem(int sectionIndex, int itemIndex, float itemWidth) = 0; /** - * Deletes a specified item. + * Deletes the specified item. * * @since 2.1 * @@ -102,7 +102,7 @@ public: * else @c false * @param[in] sectionIndex The section index * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @param[in] pItem A pointer to TableViewItem to delete * @remarks * - An application that uses the SectionTableView control must implement this method. * - Using this method, an application can deallocate the item. @@ -113,13 +113,13 @@ public: virtual bool DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; /** - * Updates a specified item. + * Updates the specified item. * * @since 2.1 * * @param[in] sectionIndex The section index * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] pItem A pointer to TableViewItem to update * @remarks * - An application that uses the SectionTableView control must implement this method. * - This method is called when the modification of an item is requested. @@ -128,7 +128,7 @@ public: virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; /** - * Gets the header text of a specified section. + * Gets the header text of the specified section. * * @since 2.1 * @@ -145,7 +145,7 @@ public: * * @since 2.1 * - * @return @c true if the section has the header, @n + * @return @c true if the section has a header, @n * else @c false * @param[in] sectionIndex The index of the section * @remarks An application that uses the SectionTableView control must implement this method. @@ -153,7 +153,7 @@ public: virtual bool HasSectionHeader(int sectionIndex) = 0; /** - * Gets the footer text of a specified section. + * Gets the footer text of the specified section. * * @since 2.1 * @@ -170,7 +170,7 @@ public: * * @since 2.1 * - * @return @c true if the section has the footer, @n + * @return @c true if the section has a footer, @n * else @c false * @param[in] sectionIndex The index of the section * @remarks An application that uses the SectionTableView control must implement this method. diff --git a/inc/FUiCtrlISplitPanelEventListener.h b/inc/FUiCtrlISplitPanelEventListener.h index d26c208..f1a785f 100644 --- a/inc/FUiCtrlISplitPanelEventListener.h +++ b/inc/FUiCtrlISplitPanelEventListener.h @@ -74,7 +74,7 @@ public: * @since 2.0 * * @param[in] source The source of the event - * @remarks This method is invoked when an divider is double pressed. + * @remarks This method is invoked when a divider is double pressed. */ virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& source) = 0; diff --git a/inc/FUiCtrlITableViewItemProvider.h b/inc/FUiCtrlITableViewItemProvider.h index 90fe4dd..43ca25e 100644 --- a/inc/FUiCtrlITableViewItemProvider.h +++ b/inc/FUiCtrlITableViewItemProvider.h @@ -68,14 +68,14 @@ public: * * @since 2.0 * - * @return An item of the TableView + * @return The item of the TableView * @param[in] itemIndex The item index * @param[in] itemWidth The width of the item * @remarks * - An application that uses the TableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a %TableViewItem or a class derived from TableViewItem. - * - The returned item should not be a null pointer. + * - The returned item should not be a @c null pointer. * - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(), * allowing the application to deallocate the item. * @see DeleteItem() @@ -90,7 +90,7 @@ public: * @return @c true if the item is deallocated by this method, @n * else @c false * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @param[in] pItem A pointer to TableViewItem to delete * @remarks * - An application that uses the TableView control must implement this method. * - Using this method, an application can deallocate the item. @@ -106,7 +106,7 @@ public: * @since 2.0 * * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] pItem A pointer to TableViewItem to update * @remarks * - An application that uses the TableView control must implement this method. * - This method is called when the modification of an item is requested. diff --git a/inc/FUiCtrlITableViewItemProviderF.h b/inc/FUiCtrlITableViewItemProviderF.h index b513a98..f9d3564 100644 --- a/inc/FUiCtrlITableViewItemProviderF.h +++ b/inc/FUiCtrlITableViewItemProviderF.h @@ -54,7 +54,7 @@ public: virtual ~ITableViewItemProviderF(void) {} /** - * Gets the total number of items in a specified group. + * Gets the total number of items in the specified group. * * @since 2.1 * @@ -64,18 +64,18 @@ public: virtual int GetItemCount(void) = 0; /** - * Creates a specified item. + * Creates the specified item. * * @since 2.1 * - * @return An item of the TableView + * @return The item of the TableView * @param[in] itemIndex The item index * @param[in] itemWidth The width of the item * @remarks * - An application that uses the TableView control must implement this method. * - This method is expected to return an item that is allocated on a heap memory. * - The returned item can be a %TableViewItem or a class derived from TableViewItem. - * - The returned item should not be a null pointer. + * - The returned item should not be a @c null pointer. * - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(), * allowing the application to deallocate the item. * @see DeleteItem() @@ -83,14 +83,14 @@ public: virtual TableViewItem* CreateItem(int itemIndex, float itemWidth) = 0; /** - * Deletes a specified item. + * Deletes the specified item. * * @since 2.1 * * @return @c true if the item is deallocated by this method, @n * else @c false * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to delete + * @param[in] pItem A pointer to TableViewItem to delete * @remarks * - An application that uses the TableView control must implement this method. * - Using this method, an application can deallocate the item. @@ -101,12 +101,12 @@ public: virtual bool DeleteItem(int itemIndex, TableViewItem* pItem) = 0; /** - * Updates a specified item. + * Updates the specified item. * * @since 2.1 * * @param[in] itemIndex The item index - * @param[in] pItem The pointer to TableViewItem to update + * @param[in] pItem A pointer to TableViewItem to update * @remarks * - An application that uses the TableView control must implement this method. * - This method is called when the modification of an item is requested. diff --git a/inc/FUiCtrlIconList.h b/inc/FUiCtrlIconList.h index 2dde82d..be1d57d 100644 --- a/inc/FUiCtrlIconList.h +++ b/inc/FUiCtrlIconList.h @@ -68,6 +68,8 @@ namespace Tizen { namespace Ui { namespace Controls * must be freed after they are passed to Additem()/InsertItem()/SetItem() to * minimize memory usage. @n * + * The following example demonstrates how to use the %IconList class. + * * Example: * * @image html ui_controls_iconlist.png @@ -189,7 +191,7 @@ public: /** * @if OSPDEPREC * The object is not fully constructed after this constructor is called. @n - * For full construction, the IconList::Construct() method must be called right after calling this constructor. + * For full construction, the IconList::Construct() method must be called right after calling this constructor. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. @@ -222,7 +224,7 @@ public: * @return An error code * @param[in] rect An instance of the Graphics::Rectangle class @n * This instance represents the X and Y coordinates of the top-left corner of the created %IconList along with - * the width and height. @n + * the width and height. * @param[in] style The style set of %IconList * @param[in] itemWidth The width of the items in the %IconList * @param[in] itemHeight The height of the items in the %IconList @@ -391,7 +393,7 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - The contents of the specified texts and bitmaps are copied and kept by %IconList. - * Call RefreshItem() to update item images. + * Call RefreshItem() to update item images. * - To display text in multi-lines or to denote the end of line, use '\\n'. * @endif */ @@ -470,8 +472,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * - * @remarks This method can only be used when the style of the list allows selection (ICON_LIST_STYLE_MARK). - * @remarks The method only changes the state of the list item. %IconList needs to be redrawn to reflect the change on the screen. + * @remarks + * - This method can only be used when the style of the list allows selection (ICON_LIST_STYLE_MARK). + * - The method only changes the state of the list item. %IconList needs to be redrawn to reflect the change on the screen. * @endif */ result SetItemChecked(int index, bool check); @@ -505,8 +508,9 @@ public: * else @c false * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks This method can only be used when the style of the list allows multiple selections (ICON_LIST_STYLE_MARK). - * @remarks The method only changes the states of the list items. %IconList needs to be redrawn to reflect the changes on the screen. + * @remarks + * - This method can only be used when the style of the list allows multiple selections (ICON_LIST_STYLE_MARK). + * - The method only changes the states of the list items. %IconList needs to be redrawn to reflect the changes on the screen. * @endif */ result SetAllItemsChecked(bool check); @@ -555,7 +559,7 @@ public: /** * @if OSPDEPREC - * Gets the next checked items at the specified index of the %IconList control. + * Gets the next checked item at the specified index of the %IconList control. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. @@ -745,8 +749,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density. * @endif */ void SetTextSize(int size); @@ -804,8 +809,8 @@ public: * @since 2.0 * * @param[in] position The position of the checkbox of the current %IconList control - * @remarks This method changes the position of the checkbox image displayed for the "selected" item(s), when the style of %IconList is either - * ICON_LIST_STYLE_RADIO or ICON_LIST_STYLE_MARK. + * @remarks This method changes the position of the checkbox image displayed for the "selected" item(s), + * when the style of %IconList is either @c ICON_LIST_STYLE_RADIO or @c ICON_LIST_STYLE_MARK. * @endif */ void SetCheckBoxPosition(IconListCheckBoxPosition position); diff --git a/inc/FUiCtrlIconListTypes.h b/inc/FUiCtrlIconListTypes.h index ef62622..977d1f1 100644 --- a/inc/FUiCtrlIconListTypes.h +++ b/inc/FUiCtrlIconListTypes.h @@ -16,7 +16,7 @@ // /** * @file FUiCtrlIconListTypes.h - * @brief This is the header file for the enumerations of the IconList class. + * @brief This is the header file for the %IconList enumerations. * * This header file contains the declarations of the enumerations of the IconList class. * @@ -42,7 +42,7 @@ namespace Tizen { namespace Ui { namespace Controls */ enum IconListStyle { - ICON_LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC The No mark or radio check @endif */ + ICON_LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC No mark or radio check @endif */ ICON_LIST_STYLE_RADIO, /**< @if OSPDEPREC The radio style for single selection @endif */ ICON_LIST_STYLE_MARK, /**< @if OSPDEPREC The mark style for multiple selection @endif */ }; diff --git a/inc/FUiCtrlIconListView.h b/inc/FUiCtrlIconListView.h index e1b5e24..d9ee6ee 100644 --- a/inc/FUiCtrlIconListView.h +++ b/inc/FUiCtrlIconListView.h @@ -221,7 +221,9 @@ class _OSP_EXPORT_ IconListView { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, + * IconListViewScrollStyle) method must be called right after calling this constructor. * * @since 2.0 */ @@ -254,10 +256,12 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * @remarks The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n - * %IconListView cannot display more than @c 256 items on the screen at once. - * @remarks The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW. + * @remarks + * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. + * - The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n + * %IconListView cannot display more than @c 256 items on the screen at once. + * - The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style + * is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW. */ result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Graphics::Dimension& itemBitmapSize, IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL, IconListViewScrollDirection direction = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL, IconListViewScrollStyle scrollStyle = ICON_LIST_SCROLL_STYLE_FADE_OUT); @@ -280,10 +284,12 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_SYSTEM A system error has occurred. - * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * @remarks The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n - * %IconListView cannot display more than @c 256 items on the screen at once. - * @remarks The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW. + * @remarks + * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. + * - The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n + * %IconListView cannot display more than @c 256 items on the screen at once. + * - The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style + * is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Graphics::FloatDimension& itemBitmapSize, IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL, IconListViewScrollDirection direction = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL, IconListViewScrollStyle scrollStyle = ICON_LIST_SCROLL_STYLE_FADE_OUT); @@ -292,12 +298,12 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] provider The item provider to create and delete items * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks If an item provider is not set for %IconListView, it does not work. @n - * The specified @c provider should be allocated in heap memory. + * @remarks If an item provider is not set for %IconListView, it does not work. @n + * The specified @c provider should be allocated in heap memory. */ result SetItemProvider(IIconListViewItemProvider& provider); @@ -377,9 +383,10 @@ public: * @param[in] pBitmap The background bitmap * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks When @c pBitmap is @c null, %IconListView does not have a background bitmap. The default value for the background bitmap is @c null. - * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, - * only the bitmap is displayed. + * @remarks + * - When @c pBitmap is @c null, %IconListView does not have a background bitmap. The default value for the background bitmap is @c null. + * - The background bitmap has priority over the background color. When both the background bitmap and the background color + * are specified, only the bitmap is displayed. */ result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); @@ -388,12 +395,13 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] color The background color * @exception E_SUCCESS The method is successful. - * @remarks This method sets the alpha value of the specified color to @c 255, when a device does not support @c 32 bit color space. - * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, - * only the bitmap is displayed. + * @remarks + * - This method sets the alpha value of the specified color to @c 255, when a device does not support @c 32 bit color space. + * - The background bitmap has priority over the background color. When both the background bitmap and the background color + * are specified, only the bitmap is displayed. */ result SetBackgroundColor(const Tizen::Graphics::Color& color); @@ -544,8 +552,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @exception E_OUT_OF_RANGE The specified @c index is out of range. - * @remarks This method can only be used when the style of the list allows selection. - * @remarks This method only changes the state of the list item. %IconListView needs to be redrawn to reflect the change on the screen. + * @remarks + * - This method can only be used when the style of the list allows selection. + * - This method only changes the state of the list item. %IconListView needs to be redrawn to reflect the change on the screen. */ result SetItemChecked(int index, bool check); @@ -799,14 +808,15 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] enable Set to @c true to enable touch animation, @n * else @c false * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks If you want to use a separate selected bitmap, the animation effect must be disabled. - * @remarks In case a touch animation is disabled, the normal bitmap of IconListViewItem is displayed in response to touch interaction if the - * selected bitmap of %IconListViewItem is @c null. + * @remarks + * - If you want to use a separate selected bitmap, the animation effect must be disabled. + * - In case a touch animation is disabled, the normal bitmap of IconListViewItem is displayed in response to touch + * interaction if the selected bitmap of %IconListViewItem is @c null. */ result SetTouchAnimationEnabled(bool enable); @@ -825,7 +835,7 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] index The index of the item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -842,8 +852,9 @@ public: * @param[in] pixel The amount of pixels to scroll * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @remarks If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it will return @c E_OUT_OF_RANGE. - * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. + * @remarks If you call ScrollByPixel() with negative @c pixel when the position of scroll is already at the top of the contents then it will + * return @c E_OUT_OF_RANGE. + * Likewise, in case of positive @c pixel at the bottom position of the scroll it will also return @c E_OUT_OF_RANGE. */ result ScrollByPixel(int pixel); @@ -852,12 +863,13 @@ public: * * @since 2.1 * - * @return An error code + * @return An error code * @param[in] pixel The amount of pixels to scroll * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @remarks If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it will return @c E_OUT_OF_RANGE. - * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. + * @remarks If you call ScrollByPixel() with negative @c pixel when the position of scroll is already at the top of the contents then it will + * return @c E_OUT_OF_RANGE. + * Likewise, in case of positive @c pixel at the bottom position of the scroll it will also return @c E_OUT_OF_RANGE. */ result ScrollByPixel(float pixel); @@ -871,7 +883,7 @@ public: * @param[in] type The type of change of an item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n - * That is, %IconListView cannot execute RefreshList() before first drawn. + * That is, %IconListView cannot execute RefreshList() before it is first drawn. * @exception E_SYSTEM A system error has occurred. * @exception E_OUT_OF_RANGE The specified @c index is out of range. */ diff --git a/inc/FUiCtrlIconListViewItem.h b/inc/FUiCtrlIconListViewItem.h index 6bfb835..794cd2a 100644 --- a/inc/FUiCtrlIconListViewItem.h +++ b/inc/FUiCtrlIconListViewItem.h @@ -44,7 +44,8 @@ class _IconListViewItemImpl; * * @since 2.0 * - * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using the %IconListView control. + * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using + * the %IconListView control. * * For more information on the class features, see ListViews. */ @@ -53,7 +54,9 @@ class _OSP_EXPORT_ IconListViewItem { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct(const Tizen::Graphics::Bitmap&, const Tizen::Base::String*, const Tizen::Graphics::Bitmap*, const Tizen::Graphics::Bitmap*) method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, + * the Construct(const Tizen::Graphics::Bitmap&, const Tizen::Base::String*, const Tizen::Graphics::Bitmap*, const Tizen::Graphics::Bitmap*) method + * must be called right after calling this constructor. * * @since 2.0 */ @@ -79,7 +82,7 @@ public: * @param[in] pHighlightedBitmap The displayed bitmap image when an item is highlighted * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks If @c pSelectedBitmap or @c pHighlightedBitmap is @c null, @c bitmap plays its role. + * @remarks If the specified @c pSelectedBitmap or @c pHighlightedBitmap is @c null, @c bitmap plays its role. */ result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String* pText = null, const Tizen::Graphics::Bitmap* pSelectedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); diff --git a/inc/FUiCtrlIconListViewTypes.h b/inc/FUiCtrlIconListViewTypes.h index bdfda96..66f2d20 100644 --- a/inc/FUiCtrlIconListViewTypes.h +++ b/inc/FUiCtrlIconListViewTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlIconListViewTypes.h - * @brief This is the header file for the enumerations of the IconListView class. + * @brief This is the header file for the enumerations of the %IconListView class. * * This header file contains the declarations of the enumerations of the IconListView class. * These enumerations define the various properties of the %IconListView control. diff --git a/inc/FUiCtrlInputTypes.h b/inc/FUiCtrlInputTypes.h index 528fbdd..9aa1069 100644 --- a/inc/FUiCtrlInputTypes.h +++ b/inc/FUiCtrlInputTypes.h @@ -29,7 +29,7 @@ namespace Tizen { namespace Ui { namespace Controls /** * @enum InputStyle * - * Defines the input style. + * Defines the input styles. * * @since 2.0 */ diff --git a/inc/FUiCtrlKeypad.h b/inc/FUiCtrlKeypad.h index 01fa874..9979278 100644 --- a/inc/FUiCtrlKeypad.h +++ b/inc/FUiCtrlKeypad.h @@ -42,7 +42,7 @@ namespace Tizen { namespace Ui { namespace Controls * * @brief [Deprecated] * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, @n -* or the current mode to initially set the keypad to, from this list. It is recommended to use the styles offered KeypadStyle enumeration instead. +* or the current mode to initially set the keypad to, from this list. It is recommended to use the styles offered by KeypadStyle enumeration instead. * @since 2.0 * @endif */ @@ -220,16 +220,17 @@ public: * * @return An error code * @param[in] keypadStyle The style of %Keypad - * @param[in] limitLength The limit of the length of text in EditField + * @param[in] limitLength The limit of the length of the text in EditField * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the specified @c limitLength is less than or equal to @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. @n + * - The specified @c limitLength is less than or equal to @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks * - If the keypad style is set to password, the input mode category is ignored. * - The orientation mode of the keypad is decided based on the G-sensor value. * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(KeypadStyle keypadStyle, int limitLength); @@ -245,10 +246,11 @@ public: * @return An error code * @param[in] keypadStyle The style of %Keypad * @param[in] category The initial category that the keypad would show first - * @param[in] limitLength The limit of the length of text in EditField + * @param[in] limitLength The limit of the length of the text in EditField * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the specified @c limitLength is less than or equal to @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. @n + * - The specified @c limitLength is less than or equal to @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks * - If the keypad style is set to password, the input mode category is ignored. @@ -262,7 +264,7 @@ public: * * @since 2.0 * @return @c true if the text prediction is enabled, @n - * else @c false + * else @c false * @see SetTextPredictionEnabled() */ bool IsTextPredictionEnabled(void) const; @@ -271,8 +273,8 @@ public: * Enables or disables the text prediction. * * @since 2.0 - * @param[in] enable Set to @c true to enable the text prediction, @n - * else @c false + * @param[in] enable Set to @c true to enable the text prediction, @n + * else @c false * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @@ -309,7 +311,7 @@ public: bool IsSingleLineEnabled(void) const; /** - * Adds a ITextEventListener instance. @n + * Adds an ITextEventListener instance. @n * The added listener can listen to text changed events when they are fired. * * @since 2.0 @@ -319,7 +321,7 @@ public: void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); /** - * Removes a ITextEventListener instance. @n + * Removes an ITextEventListener instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -357,7 +359,7 @@ public: void SetEditTextFilter(IEditTextFilter* pFilter); /** - * Sends opaque command to the input method. + * Sends an opaque command to the input method. * * @since 2.1 * diff --git a/inc/FUiCtrlLabel.h b/inc/FUiCtrlLabel.h index ad48d38..4fa53d1 100644 --- a/inc/FUiCtrlLabel.h +++ b/inc/FUiCtrlLabel.h @@ -142,8 +142,8 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - To display text in multi-lines or to denote the end of line use '\\n'. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - To display text in multi-lines or to denote the end of the line use '\\n'. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& text); @@ -164,8 +164,8 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - To display text in multi-lines or to denote the end of line use '\\n'. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - To display text in multi-lines or to denote the end of the line use '\\n'. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& text); @@ -176,7 +176,7 @@ public: * @since 2.0 * * @param[in] text The string to set - * @remarks To display text in multi-lines or to denote the end of line use '\\n'. + * @remarks To display text in multi-lines or to denote the end of the line use '\\n'. */ void SetText(const Tizen::Base::String& text); @@ -284,7 +284,7 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @remarks * - The specific error code can be accessed using the GetLastResult() method. - * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density. + * - If @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density. */ void SetTextConfig(int size, LabelTextStyle style); @@ -299,7 +299,7 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @remarks * - The specific error code can be accessed using the GetLastResult() method. - * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density. + * - If @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density. */ void SetTextConfig(float size, LabelTextStyle style); @@ -339,11 +339,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] topMargin The top margin. - * @param[in] leftMargin The left margin. + * @param[in] topMargin The top margin + * @param[in] leftMargin The left margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c size must be greater than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified @c size must be greater than @c 0. + * @remarks The margin values must be greater than or equal to 0. * @see GetTopMargin() * @see GetLeftMargin() */ @@ -355,11 +357,13 @@ public: * @since 2.1 * * @return An error code - * @param[in] topMargin The top margin. - * @param[in] leftMargin The left margin. + * @param[in] topMargin The top margin + * @param[in] leftMargin The left margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c size must be greater than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified input parameter is invalid. + * - The specified @c size must be greater than @c 0. + * @remarks The margin values must be greater than or equal to 0.0f * @see GetTopMargin() * @see GetLeftMargin() */ @@ -393,7 +397,7 @@ public: * @since 2.0 * * @return The size of the left margin, @n - * else @c -1 if an error occurs. + * else @c -1 if an error occurs * @see SetMargin() */ int GetLeftMargin(void) const; @@ -404,7 +408,7 @@ public: * @since 2.1 * * @return The size of the left margin, @n - * else @c -1.0f if an error occurs. + * else @c -1.0f if an error occurs * @see SetMargin() */ float GetLeftMarginF(void) const; diff --git a/inc/FUiCtrlLabelTypes.h b/inc/FUiCtrlLabelTypes.h index e2cbe0e..e7b451a 100644 --- a/inc/FUiCtrlLabelTypes.h +++ b/inc/FUiCtrlLabelTypes.h @@ -16,7 +16,7 @@ // /** * @file FUiCtrlLabelTypes.h -* @brief This is the header file for the LabelTextStyle enumeration. +* @brief This is the header file for the %LabelTextStyle enumeration. * * This header file contains the declarations of the LabelTextStyle enumeration. */ @@ -36,7 +36,7 @@ namespace Tizen { namespace Ui { namespace Controls enum LabelTextStyle { LABEL_TEXT_STYLE_NORMAL, /**< The plain text style */ - LABEL_TEXT_STYLE_BOLD, /**< The bold text style */ + LABEL_TEXT_STYLE_BOLD, /**< The bold text style */ LABEL_TEXT_STYLE_ITALIC, /**< The italic text style */ }; @@ -50,7 +50,7 @@ enum LabelTextStyle enum LabelContentHint { LABEL_CONTENT_HINT_DYNAMIC, /**< The contents will change */ - LABEL_CONTENT_HINT_STATIC /**< The contents will not change */ + LABEL_CONTENT_HINT_STATIC /**< The contents will not change */ }; }}} // Tizen::Ui::Controls diff --git a/inc/FUiCtrlList.h b/inc/FUiCtrlList.h index 77e78fc..b21148d 100644 --- a/inc/FUiCtrlList.h +++ b/inc/FUiCtrlList.h @@ -58,7 +58,7 @@ namespace Tizen { namespace Ui { namespace Controls * any item event listeners that have registered an interest in item events generated * by this list. * - * If an application wants to perform something based on a list being selected and + * If an application wants to perform an action based on a list being selected and * deselected, it must realize IItemEventListener and register the listener to * receive events from this list, by calling the list's AddItemEventListener() method. * @@ -75,6 +75,8 @@ namespace Tizen { namespace Ui { namespace Controls * If the application directly allocates resources, the resources must be deleted * (for example, text or bitmap). * + * The following example demonstrates how to use the %List class. + * * Example: * * @image html ui_controls_list.png @@ -324,10 +326,10 @@ public: * @param[in] pText2 A pointer to the second string * @param[in] pBitmap1 A pointer to the first normal bitmap * @param[in] pBitmap2 A pointer to the second normal bitmap - * @param[in] itemId The item ID for this item - * @exception E_SUCCESS The method is successful. + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than or equal to the item count. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The contents of the specified texts and bitmaps are copied and kept in the list. * - If the size of the text exceeds the displayable area, the text will slide automatically when a list item is selected. @@ -555,8 +557,8 @@ public: * @since 2.0 * * @return The item text color - * @param[in] textIndex The index of the text, @n - * else RGBA(0, 0, 0, 0) if the instance is invalid + * @param[in] textIndex The index of the text, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid * @endif */ Tizen::Graphics::Color GetItemTextColor(ListItemText textIndex) const; @@ -569,7 +571,7 @@ public: * @deprecated This class is deprecated. Instead of using this class, use the ListView class. * @since 2.0 * - * @param[in] textIndex The text index of the list item format to slide + * @param[in] textIndex The text index of the list item format to slide * @remarks If text slide is enabled, the texts which are too long to fit in the given list item slide show the remnant contents when a user touches * the item for a long time. * @endif @@ -664,7 +666,7 @@ public: * @param[in] row1Height The row1 height of the list item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks In logical pixels, the minimum height of the rows is 48. + * @remarks In logical pixels, the minimum height of the rows is @c 48. * @endif */ result SetRow1Height(int row1Height); @@ -681,7 +683,7 @@ public: * @param[in] row2Height The row2 height of the list item * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks In logical pixels, the minimum height of the rows is 48. + * @remarks In logical pixels, the minimum height of the rows is @c 48. * @endif */ result SetRow2Height(int row2Height); diff --git a/inc/FUiCtrlListContextItem.h b/inc/FUiCtrlListContextItem.h index 73df2f7..b1ecab4 100644 --- a/inc/FUiCtrlListContextItem.h +++ b/inc/FUiCtrlListContextItem.h @@ -35,7 +35,7 @@ class _ListContextItemImpl; /** * @class ListContextItem - * @brief This class defines common behavior for %ListContextItem. + * @brief This class defines the common behavior for %ListContextItem. * * @since 2.0 * @@ -97,7 +97,7 @@ public: * @since 2.0 * @return An error code * @param[in] elementId The ID of the element - * @param[in] normalBitmap The bitmap displayed when the item is in normal status + * @param[in] normalBitmap The bitmap displayed when the item is in the normal status * @param[in] pressedBitmap The bitmap displayed when the item is pressed * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted * @param[in] enable Set to @c true, to enable this element, @n @@ -116,7 +116,7 @@ public: * @return An error code * @param[in] elementId The ID of the element * @param[in] text The text to display - * @param[in] normalBitmap The bitmap displayed when the item is in normal status + * @param[in] normalBitmap The bitmap displayed when the item is in the normal status * @param[in] pressedBitmap The bitmap displayed when the item is pressed * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted * @param[in] enable Set to @c true, to enable this element, @n @@ -138,7 +138,7 @@ public: * @exception E_SYSTEM A system error has occurred. * @remarks * - The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only - * the bitmap is displayed. @n + * the bitmap is displayed. @n * - When @c pBitmap is set as @c null, the background color of the context item is drawn. */ result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); @@ -211,7 +211,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c elementId is invalid. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @remarks If the element text color is not set by the application, the default color is set by theme. + * @remarks If the element text color is not set by the application, the default color is set by the theme. * @see GetElementTextColor() */ result SetElementTextColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& textColor); diff --git a/inc/FUiCtrlListItemBase.h b/inc/FUiCtrlListItemBase.h index 45fce40..71e9c22 100644 --- a/inc/FUiCtrlListItemBase.h +++ b/inc/FUiCtrlListItemBase.h @@ -39,11 +39,11 @@ class _ListItemBaseImpl; /** * @class ListItemBase - * @brief This class defines common behavior for a %ListItemBase. + * @brief This class defines the common behavior for a %ListItemBase. * * @since 2.0 * - * The %ListItemBase class is a base class, which represents a list item which is the unit of handling of the ListView or + * The %ListItemBase class is a base class, which represents a list item which is the unit of handling the ListView or * GroupedListView classes. * * For more information on the class features, see ListViews. @@ -76,7 +76,7 @@ public: result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); /** - * Sets the background color of the item which is displayed when the item is in specified state. + * Sets the background color of the item which is displayed when the item is in the specified state. * * @since 2.0 * @@ -108,7 +108,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] pItem The %ListContextItem instance + * @param[in] pItem The ListContextItem instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. @@ -125,7 +125,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] text Description text + * @param[in] text The description text * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ diff --git a/inc/FUiCtrlListTypes.h b/inc/FUiCtrlListTypes.h index 5b3e275..e1a634f 100644 --- a/inc/FUiCtrlListTypes.h +++ b/inc/FUiCtrlListTypes.h @@ -16,7 +16,7 @@ // /** * @file FUiCtrlListTypes.h - * @brief This is the header file for the List enumerations. + * @brief This is the header file for the %List enumerations. * * This header file contains the declarations of the List enumerations. */ @@ -26,12 +26,6 @@ namespace Tizen { namespace Ui { namespace Controls { -// -//This integer is for internal use only. Using this integer can cause behavioral, security-related, -//and consistency-related issues in the application. -// -static const int LIST_ITEM_NOTFOUND = 0; - /** * The integer value that represents the unspecified item ID * diff --git a/inc/FUiCtrlListView.h b/inc/FUiCtrlListView.h index fb3bd51..a691466 100644 --- a/inc/FUiCtrlListView.h +++ b/inc/FUiCtrlListView.h @@ -291,9 +291,8 @@ class _OSP_EXPORT_ ListView { public: /** - * The object is not fully constructed after this constructor is - * called. @n For full construction, the %Construct() method must be - * called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the %Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -573,7 +572,7 @@ public: * @exception E_OUT_OF_RANGE The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result ScrollToItem(int index); @@ -599,14 +598,14 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The item index - * @param[in] check The check status + * @param[in] index The item index + * @param[in] check The check status * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @exception E_INVALID_OPERATION The item is disabled. * @exception E_SYSTEM A system error has occurred. * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemChecked(int index, bool check); @@ -620,7 +619,7 @@ public: * else @c false * @param[in] index The item index * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemChecked(int index) const; @@ -637,7 +636,7 @@ public: * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, + * If this method needs to be called early in the lifecycle of %ListView, * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). * */ @@ -652,7 +651,7 @@ public: * else @c false * @param[in] index The item index * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemEnabled(int index) const; @@ -679,8 +678,8 @@ public: * @remarks * - If no description text is set to the item of the specified index, this method does not show the description text. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method - * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result ShowItemDescriptionText(int index); @@ -695,8 +694,8 @@ public: * @exception E_OUT_OF_RANGE The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method - * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result HideItemDescriptionText(int index); @@ -706,23 +705,23 @@ public: * @since 2.0 * * @return An error code - * @param[in] index The item index - * @param[in] type The item to add, remove, or modify - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. - * @exception E_SYSTEM A system error has occurred. + * @param[in] index The item index + * @param[in] type The item to add, remove, or modify + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_SYSTEM A system error has occurred. * @remarks - * - 3 refresh types are supported:@c LIST_REFRESH_TYPE_ITEM_ADD, @c LIST_REFRESH_TYPE_ITEM_REMOVE, and @c LIST_REFRESH_TYPE_ITEM_MODIFY. @n - * @c LIST_REFRESH_TYPE_ITEM_ADD is used when new data is added to the data model. @n - * @c LIST_REFRESH_TYPE_ITEM_REMOVE is used when a data is deleted from the data model. @n - * @c LIST_REFRESH_TYPE_ITEM_MODIFY is used when an existing data has changes and needs to be updated. @n - * Calling this method with @c LIST_REFRESH_TYPE_ITEM_MODIFY invokes the item provider to call DeleteItem() and CreateItem() for the given index in - * sequence. + * - 3 refresh types are supported: @c LIST_REFRESH_TYPE_ITEM_ADD, @c LIST_REFRESH_TYPE_ITEM_REMOVE, and @c LIST_REFRESH_TYPE_ITEM_MODIFY. @n + * @c LIST_REFRESH_TYPE_ITEM_ADD is used when new data is added to the data model. @n + * @c LIST_REFRESH_TYPE_ITEM_REMOVE is used when data is deleted from the data model. @n + * @c LIST_REFRESH_TYPE_ITEM_MODIFY is used when an existing data has changes and needs to be updated. @n + * Calling this method with @c LIST_REFRESH_TYPE_ITEM_MODIFY invokes the item provider to call DeleteItem() and CreateItem() for the + * given index in sequence. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method - * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). -This method internally calls Invalidate(), so you do not need to call them to update the screen. + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * This method internally calls Invalidate(), so you do not need to call them to update the screen. */ result RefreshList(int index, ListRefreshType type); @@ -734,9 +733,9 @@ This method internally calls Invalidate(), so you do not need to call them to up * @return An error code * @param[in] index The item index * @param[in] elementId The item element ID - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. * @remarks This method internally calls Invalidate(), so you do not need to call them to update the screen. */ result RefreshList(int index, int elementId); @@ -765,8 +764,8 @@ This method internally calls Invalidate(), so you do not need to call them to up * @remarks * - The method returns @c -1 when there is no list item at the specified position. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method - * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). * */ int GetItemIndexFromPosition(int x, int y) const; @@ -782,9 +781,9 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[in] y The Y position of the point * @remarks * - This method returns @c -1 when there is no list item at the specified position. - * - This method should be called only after list items are created. @n If this method needs to - * be called early in the lifecycle of the ListView, then the UpdateList() method should be called explicitly - * (for example, during Tizen::Ui::Control::OnInitializing()). + * - This method should be called only after list items are created. @n + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ int GetItemIndexFromPosition(float x, float y) const; @@ -796,9 +795,9 @@ This method internally calls Invalidate(), so you do not need to call them to up * @return The index of the item * @param[in] position The position of the point, @n * else @c -1 if there is no list item at the specified position - * @remarks This method should be called only after list items are created. @n If this method needs to - * be called early in the lifecycle of the ListView, then the UpdateList() method should be called - * explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * @remarks This method should be called only after list items are created. @n + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; @@ -811,7 +810,7 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[in] position The position of the point, @n * else @c -1 if there is no list item at the specified position * @remarks This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method + * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; @@ -827,14 +826,15 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - The specified @c itemIndex is -1 when there is no list item at the specified position. * - The specified @c elementId is -1 when there is no element at the specified position. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, - * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, + * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(int x, int y, int& itemIndex, int& elementId) const; @@ -849,14 +849,15 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - The specified @c itemIndex is @c -1 when there is no list item at the specified position. * - The specified @c elementId is @c -1 when there is no element at the specified position. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, - * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, + * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(float x, float y, int& itemIndex, int& elementId) const; @@ -870,14 +871,15 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - The specified @c itemIndex is -1 when there is no list item at the specified position. * - The specified @c elementId is -1 when there is no element at the specified position. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, - * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, + * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& itemIndex, int& elementId) const; @@ -891,14 +893,15 @@ This method internally calls Invalidate(), so you do not need to call them to up * @param[out] itemIndex The index of the item * @param[out] elementId The ID of the element * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred, or @n - * there is no item at the specified position. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - There is no item at the specified position. * @remarks * - The specified @c itemIndex is @c -1 when there is no list item at the specified position. * - The specified @c elementId is @c -1 when there is no element at the specified position. * - This method should be called only after list items are created. @n - * If this method needs to be called early in the lifecycle of the ListView, - * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * If this method needs to be called early in the lifecycle of %ListView, + * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& itemIndex, int& elementId) const; @@ -933,8 +936,8 @@ This method internally calls Invalidate(), so you do not need to call them to up * @exception E_SUCCESS The method is successful. * @remarks * - The method sets the alpha value of the specified @c color to @c 255, when a device does not support 32bit color space. - * - The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only - * the bitmap image is displayed. + * - The background bitmap has priority over the background color. When both the background bitmap and the background color + * are specified, only the bitmap image is displayed. */ result SetBackgroundColor(const Tizen::Graphics::Color& color); diff --git a/inc/FUiCtrlListViewTypes.h b/inc/FUiCtrlListViewTypes.h index a563765..c13d58b 100644 --- a/inc/FUiCtrlListViewTypes.h +++ b/inc/FUiCtrlListViewTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlListViewTypes.h - * @brief This is the header file for the List enumerations. + * @brief This is the header file for the %List enumerations. * * This header file contains the declarations of the List enumerations. */ @@ -36,7 +36,7 @@ namespace Tizen { namespace Ui { namespace Controls */ enum ListAnnexStyle { - LIST_ANNEX_STYLE_NORMAL = 0, /**< The no style annex */ + LIST_ANNEX_STYLE_NORMAL = 0, /**< No style annex */ LIST_ANNEX_STYLE_MARK, /**< The mark style annex for multiple selection */ LIST_ANNEX_STYLE_ONOFF_SLIDING, /**< The slider style On/Off */ LIST_ANNEX_STYLE_DETAILED, /**< Detailed style for further interaction */ @@ -137,7 +137,7 @@ enum SweepDirection */ enum ListScrollItemAlignment { - LIST_SCROLL_ITEM_ALIGNMENT_TOP = 0, /**< The item is aligned at the top of the ListView at item scroll*/ + LIST_SCROLL_ITEM_ALIGNMENT_TOP = 0, /**< The item is aligned at the top of the ListView at item scroll */ LIST_SCROLL_ITEM_ALIGNMENT_BOTTOM /**< The item is aligned at the bottom of the ListView at item scroll */ }; diff --git a/inc/FUiCtrlMessageBox.h b/inc/FUiCtrlMessageBox.h index 9296a3c..e29d95d 100644 --- a/inc/FUiCtrlMessageBox.h +++ b/inc/FUiCtrlMessageBox.h @@ -187,7 +187,7 @@ class _OSP_EXPORT_ MessageBox { public: /** - * The object is not fully constructed after this constructor is called. @n + * The object is not fully constructed after this constructor is called. @n * For full construction, the MessageBox::Construct() method must be called right after calling this constructor. * * @since 2.0 @@ -217,9 +217,9 @@ public: * @remarks * - To create a %MessageBox control, call ShowAndWait() after the Construct() method is called. * - The message box text cannot contain over @c 399 characters. - * - To display the text in multi-lines or to denote the end of line use '\\n'. + * - To display the text in multi-lines or to denote the end of the line use '\\n'. * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. * @see ShowAndWait() */ result Construct(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout = 0); diff --git a/inc/FUiCtrlOptionMenu.h b/inc/FUiCtrlOptionMenu.h old mode 100755 new mode 100644 index cf23ad3..119450a --- a/inc/FUiCtrlOptionMenu.h +++ b/inc/FUiCtrlOptionMenu.h @@ -180,7 +180,7 @@ class _OSP_EXPORT_ OptionMenu { public: /** - * The object is not fully constructed after this constructor is called. @n + * The object is not fully constructed after this constructor is called. @n * For full construction, the OptionMenu::Construct() method must be called right after calling this constructor. * * @since 2.2 @@ -232,8 +232,8 @@ public: * * @return An error code * @param[in] text The text string of the item to append - * @param[in] actionId The action ID set by user @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM The method has failed. * @remarks %OptionMenu can have a maximum of @c 12 main items. @@ -250,7 +250,7 @@ public: * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM The method has failed. * @remarks When a user navigates the user interface using the directional keys, @n @@ -266,7 +266,7 @@ public: * @return An error code * @param[in] text The text string of the item to append * @param[in] actionId The action ID set by user @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @param[in] normalBitmap The normal bitmap of the item * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item @@ -283,8 +283,8 @@ public: * @return An error code * @param[in] mainIndex The main index * @param[in] text The text string of the item to set - * @param[in] actionId The action ID set by user @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified parameter is invalid. * @exception E_SYSTEM The method has failed. @@ -302,9 +302,9 @@ public: * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_INVALID_ARG A specified parameter is invalid. * @remarks When a user navigates the user interface using the directional keys, @n * the selected UI control is highlighted and the control takes the focus. */ @@ -319,7 +319,7 @@ public: * @param[in] mainIndex The main index * @param[in] text The text string of the item to append * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @param[in] normalBitmap The normal bitmap of the item * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item @@ -337,8 +337,8 @@ public: * @return An error code * @param[in] mainIndex The main index * @param[in] text The text string of the item to set - * @param[in] actionId The action ID set by user @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified parameter is invalid. * @exception E_SYSTEM The method has failed. @@ -356,9 +356,9 @@ public: * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_INVALID_ARG A specified parameter is invalid. * @remarks When a user navigates the user interface using the directional keys, @n * the selected UI control is highlighted and the control takes the focus. */ @@ -373,12 +373,12 @@ public: * @param[in] mainIndex The main index * @param[in] text The text string of the item to set * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @param[in] normalBitmap The normal bitmap of the item * @param[in] pPressedBitmap The pressed bitmap of the item * @param[in] pHighlightedBitmap The highlighted bitmap of the item * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_INVALID_ARG A specified parameter is invalid. */ result SetItemAt (int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap=null, const Tizen::Graphics::Bitmap* pHighlightedBitmap=null); @@ -418,7 +418,7 @@ public: * * @return The index of the item * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. */ int GetItemIndexFromActionId(int actionId) const; @@ -440,8 +440,8 @@ public: * @return An error code * @param[in] mainIndex The index of the main item * @param[in] text The text string of the item to append - * @param[in] actionId The action ID set by user @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified parameter is invalid. * @exception E_SYSTEM The method has failed. @@ -457,8 +457,8 @@ public: * @param[in] mainIndex The index of the main item * @param[in] subIndex The index of the sub-item * @param[in] text The text string of the item to set - * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user. @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified parameter is invalid. * @exception E_SYSTEM The method has failed. @@ -474,8 +474,8 @@ public: * @param[in] mainIndex The index of the main item * @param[in] subIndex The index of the sub-item * @param[in] text The text string of the item to set - * @param[in] actionId The action ID set by user. @n - * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. + * @param[in] actionId The action ID set by user. @n + * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified parameter is invalid. * @exception E_SYSTEM The method has failed. @@ -564,8 +564,8 @@ public: * @param[in] color The item color to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The item color for @c OPTION_MENU_ITEM_STATUS_NORMAL is not supported. - * @remarks The item color for the @c OPTION_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %OptionMenu control. + * The item color for @c OPTION_MENU_ITEM_STATUS_NORMAL is not supported. + * @remarks The item color for the @c OPTION_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %OptionMenu control. * @see GetItemColor() */ result SetItemColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color); diff --git a/inc/FUiCtrlOverlayPanel.h b/inc/FUiCtrlOverlayPanel.h index c0b171b..7136ab7 100644 --- a/inc/FUiCtrlOverlayPanel.h +++ b/inc/FUiCtrlOverlayPanel.h @@ -284,7 +284,7 @@ public: enum BufferPixelFormat { BUFFER_PIXEL_FORMAT_ARGB8888, /**< The ARGB8888 pixel format */ - BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */ + BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */ BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8 bit Y plane followed by 8 bit 2 X 2 subsampled U and V planes */ BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */ BUFFER_PIXEL_FORMAT_UYVY /**< The UYVY pixel format */ @@ -312,18 +312,18 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The location and size of the %OverlayPanel control @n + * @param[in] rect The location and size of the %OverlayPanel control @n * The maximum size is equal to screen size. for example 720 x 1280 on a HD screen, or 480 x 800 on a * WVGA screen. - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter @c is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The size of the control must be within the range defined by the minimum size and the maximum size. - * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, checks bounds of - * @c rect using EvaluateBounds() method before calling this method. + * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, check the bounds of + * @c rect using EvaluateBounds() method before calling this method. * - Do not use %OverlayPanel in combination with %OverlayRegion. If used, %OverlayPanel may not work as expected. - * @see %Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::Rectangle& rect); @@ -333,18 +333,18 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The location and size of the %OverlayPanel control @n + * @param[in] rect The location and size of the %OverlayPanel control @n * The maximum size is equal to screen size. for example 720 x 1280 on a HD screen, or 480 x 800 on a * WVGA screen. - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter @c is invalid. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @remarks * - The size of the control must be within the range defined by the minimum size and the maximum size. - * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, checks bounds of - * @c rect using EvaluateBounds() method before calling this method. + * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, check the bounds of + * @c rect using EvaluateBounds() method before calling this method. * - Do not use %OverlayPanel in combination with %OverlayRegion. If used, %OverlayPanel may not work as expected. - * @see %Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::FloatRectangle& rect); @@ -366,7 +366,7 @@ public: * camera preview. * @since 2.0 * - * @param[in] dim The dimension of the window to draw + * @param[in] dim The dimension of the window to draw * * @endif */ @@ -378,13 +378,13 @@ public: * @since 2.1 * * @return An error code - * @param[in] dim The dimension of the window to draw - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] dim The dimension of the window to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @remarks * - A %OverlayPanel becomes displayable only after it has been added to a form. - * - If you want to resize window to draw render buffer, calls this function after the %OverlayPanel is added to a %Form control + * - If you want to resize window to draw render buffer, call this function after the %OverlayPanel is added to a Form control. * @code * OverlayPanel* pOverlayPanel = new OverlayPanel(); * pOverlayPanel->Construct(Rectangle(100, 250, 300, 300)); @@ -403,13 +403,13 @@ public: * @since 2.1 * * @return An error code - * @param[in] dim The dimension of the window to draw - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] dim The dimension of the window to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @remarks * - A %OverlayPanel becomes displayable only after it has been added to a form. - * - If you want to resize window to draw render buffer, calls this function after the %OverlayPanel is added to a %Form control + * - If you want to resize window to draw render buffer, call this function after the %OverlayPanel is added to a Form control * @code * OverlayPanel* pOverlayPanel = new OverlayPanel(); * pOverlayPanel->Construct(FloatRectangle(100.0, 250.0, 300.0, 300.0)); @@ -428,7 +428,7 @@ public: * @since 2.1 * * @param[in] destDim The dimension of the window to draw - * @param[in] srcBuffer The source buffer + * @param[in] srcBuffer The source buffer * @param[in] srcDim The source dimension * @param[in] srcFormat The pixel format of buffer data * @exception E_SUCCESS The method is successful. @@ -445,7 +445,7 @@ public: * @since 2.1 * * @param[in] destDim The dimension of the window to draw - * @param[in] srcBuffer The source buffer + * @param[in] srcBuffer The source buffer * @param[in] srcDim The source dimension * @param[in] srcFormat The pixel format of buffer data * @exception E_SUCCESS The method is successful. @@ -462,9 +462,9 @@ public: * @since 2.1 * * @return An error code - * @param[out] info The information of the background buffer - * @exception E_SUCCESS The method is successful. - * @exception E_OPERATION_FAILED The operation has failed. + * @param[out] info The information of the background buffer + * @exception E_SUCCESS The method is successful. + * @exception E_OPERATION_FAILED The operation has failed. * @remarks Currently, this method provides buffer information except the pointer of the RGB color buffer. @n * Therefore, info.pPixels is always assigned @c null. */ @@ -478,9 +478,9 @@ public: * @deprecated This method is deprecated because the renderer aspect ratio is not guaranteed any more. * @since 2.0 * - * @param[in] fix Set to @c true if the renderer will display the aspect ratio of the input buffer even if the renderer and input data have - * different aspect ratios, @n - * else @c false + * @param[in] fix Set to @c true if the renderer will display the aspect ratio of the input buffer even if the renderer and input data have + * different aspect ratios, @n + * else @c false * @remarks This method has no effects for hardware accelerated GL backend. * @endif */ @@ -505,12 +505,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] option The option for evaluating the bounds of the overlay panel + * @return An error code + * @param[in] option The option for evaluating the bounds of the overlay panel * @param[in, out] rect An instance of %Tizen::Graphics::Rectangle that represents the validated bounds of %OverlayPanel @n - * The width and height of the input rectangle must be greater than @c 0. - * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified - * @exception E_SUCCESS The method is successful. + * The width and height of the input rectangle must be greater than @c 0. + * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter @c is invalid. * @exception E_UNSUPPORTED_OPTION The specified input parameter @c is not supported. * @exception E_OPERATION_FAILED The operation has failed. @@ -518,8 +518,8 @@ public: * - Due to the hardware accelerated rendering, there are limitations for an overlay panel. * - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount(). * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay - * panel. In such cases, Construct() will return @c E_INVALID_ARG. @n - * To prevent this kind of problem, the application must the this method to get a validated bounds + * panel. In such cases, Construct() will return @c E_INVALID_ARG. @n + * To prevent this kind of problem, the application must the this method to get a validated bounds. * - The specific error code can be accessed using the GetLastResult() method. */ static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::Rectangle& rect, bool& modified); @@ -529,12 +529,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] option The option for evaluating the bounds of the overlay panel + * @return An error code + * @param[in] option The option for evaluating the bounds of the overlay panel * @param[in, out] rect An instance of %Tizen::Graphics::FloatRectangle that represents the validated bounds of %OverlayPanel @n - * The width and height of the input float rectangle must be greater than @c 0. - * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified - * @exception E_SUCCESS The method is successful. + * The width and height of the input float rectangle must be greater than @c 0. + * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter @c is invalid. * @exception E_UNSUPPORTED_OPTION The specified input parameter @c is not supported. * @exception E_OPERATION_FAILED The operation has failed. @@ -542,8 +542,8 @@ public: * - Due to the hardware accelerated rendering, there are limitations for an overlay panel. * - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount(). * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay - * panel. In such cases, Construct() will return E_INVALID_ARG. @n - * To prevent this kind of problem, the application must use this method to get a validated bounds + * panel. In such cases, Construct() will return E_INVALID_ARG. @n + * To prevent this kind of problem, the application must use this method to get a validated bounds. * - The specific error code can be accessed using the GetLastResult() method. */ static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified); @@ -556,11 +556,12 @@ public: * * @return * - A list of the pixel formats supported by the %OverlayPanel class, @n - * else @c null if no pixel format is supported or an exception occurs + * else @c null if no pixel format is supported or an exception occurs + * @remarks * - The specific error code can be accessed using the GetLastResult() method. * - The return value and each item in the list must be deleted by the caller. * - The format list can vary depending on the device. After checking the supported formats using this method, - * it's better to use a proper pixel format. + * it is better to use a proper pixel format. */ static Tizen::Base::Collection::IListT* GetSupportedBufferPixelFormatListN(void); diff --git a/inc/FUiCtrlOverlayRegion.h b/inc/FUiCtrlOverlayRegion.h index 676b094..7c592fc 100644 --- a/inc/FUiCtrlOverlayRegion.h +++ b/inc/FUiCtrlOverlayRegion.h @@ -55,10 +55,10 @@ namespace Tizen { namespace Ui { namespace Controls enum OverlayRegionBufferPixelFormat { OVERLAY_REGION_BUFFER_PIXEL_FORMAT_ARGB8888 = 1, /**< The ARGB8888 pixel format */ - OVERLAY_REGION_BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */ - OVERLAY_REGION_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y plane followed by the 8-bit 2x2 subsampled U and V planes */ - OVERLAY_REGION_BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */ - OVERLAY_REGION_BUFFER_PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */ + OVERLAY_REGION_BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */ + OVERLAY_REGION_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y plane followed by the 8-bit 2x2 subsampled U and V planes */ + OVERLAY_REGION_BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */ + OVERLAY_REGION_BUFFER_PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */ OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. }; @@ -73,10 +73,10 @@ enum OverlayRegionBufferPixelFormat enum OverlayRegionType { OVERLAY_REGION_TYPE_PRIMARY_CAMERA = 1, /**< The primary camera type @n An overlay region displays the auto-rotated - primary camera input that comes from Camera. */ - OVERLAY_REGION_TYPE_SECONDARY_CAMERA, /**< The secondary camera type @n An overlay region displays the auto-rotated - and mirrored secondary camera input that comes from Camera. */ - OVERLAY_REGION_TYPE_NORMAL, /**< The normal type @n An overlay region displays the user input as it is. */ + primary camera input that comes from Camera */ + OVERLAY_REGION_TYPE_SECONDARY_CAMERA, /**< The secondary camera type @n An overlay region displays the auto-rotated + and mirrored secondary camera input that comes from Camera */ + OVERLAY_REGION_TYPE_NORMAL, /**< The normal type @n An overlay region displays the user input as it is */ OVERLAY_REGION_TYPE_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. OVERLAY_REGION_TYPE_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. }; @@ -93,7 +93,7 @@ enum OverlayRegionEvaluationOption OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, /**< The option evaluating the overlay region bounds and finding the minimum bounds greater than the input bounds */ OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, /**< The option evaluating the overlay region bounds and finding the maximum - bounds smaller than input bounds */ + bounds smaller than the input bounds */ }; @@ -295,10 +295,11 @@ public: * * @since 2.0 * - * @return An instance of Tizen::Graphics::Rectangle that represents the position of the top-left corner, the width, and - * the height of the overlay region - * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n - * The position of the top-left point is relative to the top-left corner of the parent form. + * @return An instance of Tizen::Graphics::Rectangle that represents the position of the top-left corner, width, and + * height of the overlay region + * @remarks + * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n + * - The position of the top-left point is relative to the top-left corner of the parent form. * */ Tizen::Graphics::Rectangle GetBounds(void) const; @@ -308,10 +309,10 @@ public: * * @since 2.1 * - * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of the top-left corner, the width, - * and the height of the overlay region - * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n - * The position of the top-left point is relative to the top-left corner of the parent form. + * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of the top-left corner, width, + * and height of the overlay region + * @remarks - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n + * - The position of the top-left point is relative to the top-left corner of the parent form. * */ Tizen::Graphics::FloatRectangle GetBoundsF(void) const; @@ -325,8 +326,9 @@ public: * @param[out] y The y position of the top-left corner of the overlay region * @param[out] width The width of the rectangular region * @param[out] height The height of the rectangular region - * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n - * The position of the top-left point is relative to the top-left corner of the parent form. + * @remarks + * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n + * - The position of the top-left point is relative to the top-left corner of the parent form. * */ void GetBounds(int& x, int& y, int& width, int& height) const; @@ -340,8 +342,9 @@ public: * @param[out] y The y position of the top-left corner of the overlay region * @param[out] width The width of the rectangular region * @param[out] height The height of the rectangular region - * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n - * The position of the top-left point is relative to the top-left corner of the parent form. + * @remarks + * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n + * - The position of the top-left point is relative to the top-left corner of the parent form. * */ void GetBounds(float& x, float& y, float& width, float& height) const; @@ -351,7 +354,7 @@ public: * Due to the hardware accelerated rendering, there are limitations for an input buffer. @n * The input buffer has the same restriction regarding its size as the overlay region and it can be checked by using the GetWidthUnit(), * GetHeightUnit() and GetMaxCount(). If the specified condition is not satisfied, the @c E_INVALID_ARG exception is returned. @n - * If an input buffer does not fit to the bounds of the overlay region, it will be scaled up or down to the overlay region bounds without + * If an input buffer does not fit the bounds of the overlay region, it will be scaled up or down to the overlay region bounds without * keeping the ratio of input. * * @since 2.0 @@ -359,7 +362,7 @@ public: * @return An error code * @param[in] srcBuffer The source buffer * @param[in] srcDim The source dimension - * @param[in] srcFormat The pixel format of buffer data + * @param[in] srcFormat The pixel format of the buffer data * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified pixel format is not supported. @@ -400,12 +403,12 @@ public: * * @since 2.0 * - * @return @c true if the evaluation process does not meet an error, @n + * @return @c true if the evaluation process does not give an error, @n * else @c false * @param[in] option The option for evaluating the bounds of the overlay region - * @param[in, out] rect An instance of %Rectangle that represents the validated bounds of %OverlayRegion @n + * @param[in, out] rect An instance of Rectangle that represents the validated bounds of %OverlayRegion @n * The width and height of the input rectangle must be greater than @c 0. - * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified + * @param[out] modified The boolean flag that indicates whether the specified @c rectangle is modified * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_UNSUPPORTED_OPTION A specified input parameter is not supported. @@ -414,9 +417,9 @@ public: * - Due to the hardware accelerated rendering, there are limitations for an overlay region. * - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount(). * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the - * overlay region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::Rectangle&, OverlayRegionType) will return - * @c E_INVALID_ARG. @n To prevent this kind of problem, the application must use this method to get a validated bounds that can be - * used as the input bounds of the %Form::GetOverlayRegionN() method. + * overlay region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::Rectangle&, OverlayRegionType) will return + * @c E_INVALID_ARG. @n To prevent this kind of problem, the application must use this method to get the validated bounds that can be + * used as the input bounds of the %Form::GetOverlayRegionN() method. * - The specific error code can be accessed using the GetLastResult() method. */ static bool EvaluateBounds(OverlayRegionEvaluationOption option, Tizen::Graphics::Rectangle& rect, bool& modified); @@ -426,10 +429,10 @@ public: * * @since 2.1 * - * @return @c true if the evaluation process does not meet an error, @n + * @return @c true if the evaluation process does not give an error, @n * else @c false * @param[in] option The option for evaluating the bounds of the overlay region - * @param[in, out] rect An instance of %FloatRectangle that represents the validated bounds of %OverlayRegion @n + * @param[in, out] rect An instance of FloatRectangle that represents the validated bounds of %OverlayRegion @n * The width and height of the input rectangle must be greater than @c 0. * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified * @exception E_SUCCESS The method is successful. @@ -440,8 +443,8 @@ public: * - Due to the hardware accelerated rendering, there are limitations for an overlay region. * - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount(). * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay - * region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::FloatRectangle&, OverlayRegionType) will return @c E_INVALID_ARG. @n To prevent this kind of problem, the application - * must use this method to get a validated bounds that can be used as the input bounds of the %Form::GetOverlayRegionN() method. + * region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::FloatRectangle&, OverlayRegionType) will return @c E_INVALID_ARG. @n To prevent this kind of problem, the application + * must use this method to get the validated bounds that can be used as the input bounds of the %Form::GetOverlayRegionN() method. * - The specific error code can be accessed using the GetLastResult() method. */ static bool EvaluateBounds(OverlayRegionEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified); @@ -452,7 +455,7 @@ public: * * @since 2.0 * - * @return The value of width + * @return The value of the width * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -490,7 +493,7 @@ public: * * @since 2.0 * - * @return A list of the pixel formats supported by the %OverlayRegion class, @n + * @return The list of pixel formats supported by the %OverlayRegion class, @n * else @c null if no pixel format is supported or an exception occurs * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. @@ -498,7 +501,7 @@ public: * - The specific error code can be accessed using the GetLastResult() method. * - The return value and each item in the list must be deleted by the caller. * - The format list can vary depending on the device. After checking the supported formats using this method, - * it's better to use a proper pixel format. + * it's better to use a proper pixel format. */ static Tizen::Base::Collection::IListT< OverlayRegionBufferPixelFormat >* GetSupportedBufferPixelFormatListN(void); diff --git a/inc/FUiCtrlPanel.h b/inc/FUiCtrlPanel.h index d74dd5e..45d1b39 100644 --- a/inc/FUiCtrlPanel.h +++ b/inc/FUiCtrlPanel.h @@ -114,7 +114,7 @@ class _OSP_EXPORT_ Panel public: /** * The object is not fully constructed after this constructor is called. @n - * For full construction, the %Construct() method must be called right after calling this constructor. + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 * @@ -141,7 +141,7 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -157,7 +157,7 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -170,13 +170,13 @@ public: * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] resourceId The resource ID describing the %Panel control * @exception E_SUCCESS The method is successful. * @exception E_FILE_NOT_FOUND The specified file cannot be found. * @exception E_INVALID_FORMAT The specified XML format is invalid. * @exception E_OPERATION_FAILED The operation has failed. - * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied + * @remarks If the SetBounds(), SetSize(), and SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied * to both orientations because the current orientation is not known. After AddControl() is called, then the values are applied only to the current orientation. */ result Construct(const Tizen::Base::String& resourceId); @@ -195,7 +195,7 @@ public: * The specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -213,7 +213,7 @@ public: * The specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -232,7 +232,7 @@ public: * The specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -251,7 +251,7 @@ public: * The specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The specified group style determines the border look of the %Panel control. - * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -278,7 +278,7 @@ public: * Enables the %Panel control to be composited to the screen buffer. * * @brief [Deprecated] - * @deprecated This method is deprecated because changing composition mode is not allowed any more. + * @deprecated This method is deprecated because the changing composition mode is not allowed any more. * @since 2.0 * * @return An error code @@ -299,7 +299,7 @@ public: * Checks whether the %Panel control is composite to the screen buffer. * * @brief [Deprecated] - * @deprecated This method is deprecated because changing composition mode is not allowed any more. + * @deprecated This method is deprecated because the changing composition mode is not allowed any more. * @since 2.0 * * @return @c true if the %Panel control is composite to the screen buffer, @n diff --git a/inc/FUiCtrlPopup.h b/inc/FUiCtrlPopup.h index 30f890a..aa894f7 100644 --- a/inc/FUiCtrlPopup.h +++ b/inc/FUiCtrlPopup.h @@ -100,6 +100,7 @@ private: using namespace Tizen::Graphics; using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui; bool PopupEventListener::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) @@ -239,7 +240,8 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(bool hasTitle, const Tizen::Graphics::Dimension& dim); @@ -258,15 +260,16 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(bool hasTitle, const Tizen::Graphics::FloatDimension& dim); /** - * Initializes this instance of %Popup and child controls with the specified resource ID @n + * Initializes this instance of %Popup and child controls with the specified resource ID. @n * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. @n - * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical in the application manifest file - * the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder. + * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical + * in the application manifest file the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder. * * @since 2.0 * @@ -276,10 +279,12 @@ public: * @exception E_FILE_NOT_FOUND The specified file cannot be found. * @exception E_INVALID_FORMAT The specified XML format is invalid. * @exception E_OPERATION_FAILED The operation has failed. - * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. - * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before Show(), then the new value is applied to both orientations - * because the current orientation is not known. After Show() is called, then the values are applied only to the current orientation. + * @remarks + * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. + * - If SetBounds(), SetSize(), SetPosition() methods are called before Show(), then the new value is applied to both orientations + * because the current orientation is not known. After Show() is called, then the values are applied only to the current orientation. */ result Construct(const Tizen::Base::String& resourceId); @@ -300,7 +305,8 @@ public: * the specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::Dimension& dim); @@ -321,7 +327,8 @@ public: * the specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim); @@ -343,7 +350,8 @@ public: * the specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::Dimension& dim); @@ -365,7 +373,8 @@ public: * the specified layout is already bound to another container. * @exception E_SYSTEM A system error has occurred. * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. + * due to this ownership relationship. @n + * In this case, use the SetOwner() method to change the ownership to the top-most window. */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim); @@ -373,11 +382,11 @@ public: * Shows the modal window. @n * * @since 2.0 - * @return An error code - * @param[out] modalResult The %Popup's notification. @n - * This value is the 'modalResult' parameter of the EndModal() method - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE The %Popup is not visible. The visible state of the %Popup should be set @c true. + * @return An error code + * @param[out] modalResult The %Popup's notification. @n + * This value is the 'modalResult' parameter of the EndModal() method + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE The %Popup is not visible. The visible state of the %Popup should be set @c true. * @remarks * - Do not call this method from Tizen::App::App::OnAppInitializing(). * - To show a %Popup properly from Tizen::Ui::Controls::Form::OnInitializing(), theForm must @@ -389,12 +398,12 @@ public: * Closes the modal window. @n * * @since 2.0 - * @return An error code - * @param[in] modalResult The result value of the modal window. @n + * @return An error code + * @param[in] modalResult The result value of the modal window. @n * The value which needs to be returned as the output parameter of DoModal() method * should be passed as the input argument - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_STATE The method is not supported because this popup isn't running as a modal window. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE The method is not supported because this popup isn't running as a modal window. */ result EndModal(int modalResult); @@ -450,8 +459,8 @@ public: * - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Popup control. * - It is the responsibility of the developers to deallocate the canvas after use. * - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n - * Therefore, delete the previously allocated canvas and create a new canvas using this method if the size or position of the - * control is changed. + * Therefore, delete the previously allocated canvas and create a new canvas using this method if the size or position of the + * control is changed. * - The specific error code can be accessed using the GetLastResult() method. */ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; @@ -500,7 +509,7 @@ public: * @return The position in relative to the top-left corner of the %Popup control, @n * else @c (-1.0f,-1.0f) if the instance is invalid * @param[in] clientPosition The position relative to the top-left corner of the client area - * @see TranslateToClientAreaPositionF() + * @see TranslateToClientAreaPosition() */ Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; diff --git a/inc/FUiCtrlProgress.h b/inc/FUiCtrlProgress.h index e718834..1261c6b 100644 --- a/inc/FUiCtrlProgress.h +++ b/inc/FUiCtrlProgress.h @@ -174,11 +174,13 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n - * The specified values should be positive and @c minValue should be less than @c maxValue. + * Either of the following conditions has occurred: + * - The specified values is not positive. + * - The specified @c minValue is not less than the specified @c maxValue. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::Rectangle& rect, int minValue, int maxValue); @@ -198,18 +200,20 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n - * The specified values should be positive and @c minValue should be less than @c maxValue. + * Either of the following conditions has occurred: + * - The specified values is not positive. + * - The specified @c minValue is not less than the specified @c maxValue. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, int minValue, int maxValue); public: /** * Sets the current value of the %Progress control. @n - * If the given value is greater than the @c maxValue with which %Progress is constructed, it will be set to %maxValue. The same applies for @c minValue. + * If the given value is greater than the @c maxValue with which %Progress is constructed, it will be set to @c maxValue. The same applies for @c minValue. * * @since 2.0 * @@ -229,7 +233,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n - * The specified values should be positive. + * The specified values are not positive. * @exception E_SYSTEM A system error has occurred. */ result SetRange(int minValue, int maxValue); @@ -240,14 +244,14 @@ public: * * @since 2.0 * - * @return An integer value representing the current value of progress, @n + * @return The integer value that represents the current value of progress, @n * else @c -1 if an error occurs */ int GetValue(void) const; /** - * Gets the minimum value and the maximum value of the %Progress control. + * Gets the minimum value and maximum value of the %Progress control. * * @since 2.0 * diff --git a/inc/FUiCtrlProgressPopup.h b/inc/FUiCtrlProgressPopup.h index 482823a..0cc440a 100644 --- a/inc/FUiCtrlProgressPopup.h +++ b/inc/FUiCtrlProgressPopup.h @@ -43,13 +43,13 @@ namespace Tizen { namespace Ui { namespace Controls * * @since 2.0 * - * The %ProgressPopup class displays processing animation to show processing status. + * The %ProgressPopup class displays the processing animation to show the processing status. * It can contain a title, body text and cancel button. * * For more information on the class features, * see ProgressPopup. * - * @see Tizen::Ui::Window + * @see Window * * The following example demonstrates how to use the %ProgressPopup class. * @@ -193,20 +193,20 @@ public: * @since 2.0 * @return An error code * @param[in] cancelButton Set to @c true if the %ProgressPopup window has a cancel button, @n - * else @c false - * @param[in] transparent Set to @c true if the %ProgressPopup window is translucent, @n - * else @c false + * else @c false + * @param[in] transparent Set to @c true if the %ProgressPopup window is translucent, @n + * else @c false * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @n - This error occurs when the internal resource is not loaded. + * This error occurs when the internal resource is not loaded. * @remarks * - To show a %ProgressPopup window, call Show() or DoModal() after calling this method. * - By default, the title area and the body text are not shown. @n - * Use SetTitleText() and SetText() to show the title area and the body text. + * Use SetTitleText() and SetText() to show the title area and body text. * - If @c transparent is set to true, a progress icon is only shown and a cancel button is not shown. @n - * Also, the texts set by %SetTitleText() and %SetText() are not shown. - * - If the specified @c cancelButton is set to true and ProgressPopup is closed by pressing a Cancel Button, - * out parameter of %DoModal(), modalResult, is @c -1. + * Also, the texts set by %SetTitleText() and %SetText() are not shown. + * - If the specified @c cancelButton is set to @c true and %ProgressPopup is closed by pressing a Cancel Button, + * out parameter of %DoModal(), modalResult, is @c -1. */ result Construct(bool cancelButton, bool transparent); @@ -239,8 +239,8 @@ public: * @since 2.0 * @return An error code * @param[in] listener The event listener to add @n Listener should be allocated at heap, not stack. - * @exception E_SUCCESS This method was successful. - * @exception E_OBJ_ALREADY_EXIST The listener was already exist. + * @exception E_SUCCESS This method is successful. + * @exception E_OBJ_ALREADY_EXIST The listener already exists. * @see RemoveProgressPopupEventListener() */ result AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); @@ -252,10 +252,10 @@ public: * @since 2.0 * @return An error code * @param[in] listener The event listener to remove @n - * The listener should be referring to previously allocated instance which is passed as an argument to + * The listener should be referring to a previously allocated instance which is passed as an argument to * AddProgressPopupEventListener(). - * @exception E_SUCCESS This method was successful. - * @exception E_OBJ_NOT_FOUND The listener was not found. + * @exception E_SUCCESS This method is successful. + * @exception E_OBJ_NOT_FOUND The listener is not found. */ result RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); @@ -272,7 +272,7 @@ public: * * @since 2.0 * @return The color, @n - * else RGBA(0, 0, 0, 0) if an error occurs + * else RGBA(0, 0, 0, 0) if an error occurs */ Tizen::Graphics::Color GetTextColor(void) const; diff --git a/inc/FUiCtrlRadioGroup.h b/inc/FUiCtrlRadioGroup.h index afb3391..8c09cd3 100644 --- a/inc/FUiCtrlRadioGroup.h +++ b/inc/FUiCtrlRadioGroup.h @@ -205,7 +205,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] checkButton The %CheckButton instance to add + * @param[in] checkButton The CheckButton instance to add * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. @@ -220,7 +220,7 @@ public: * @since 2.1 * * @return An error code - * @param[in] pCheckButton The %CheckButton instance to add + * @param[in] pCheckButton The CheckButton instance to add * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @n * The specified @c pCheckButton is @c null. @@ -238,11 +238,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] checkButton The %CheckButton instance to remove + * @param[in] checkButton The CheckButton instance to remove * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The object is not found. * @exception E_SYSTEM A system error has occurred. - * @remarks Before removing %CheckButton from its parent container, it must be removed from %RadioGroup. + * @remarks Before removing CheckButton from its parent container, it must be removed from %RadioGroup. */ result Remove(const CheckButton& checkButton); @@ -252,11 +252,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] pCheckButton The %CheckButton instance to remove + * @param[in] pCheckButton The CheckButton instance to remove * @exception E_SUCCESS The method is successful. * @exception E_OBJ_NOT_FOUND The object is not found. * @exception E_SYSTEM A system error has occurred. - * @remarks Before removing %CheckButton from its parent container, it must be removed from %RadioGroup. + * @remarks Before removing CheckButton from its parent container, it must be removed from %RadioGroup. */ result Remove(CheckButton* pCheckButton); @@ -296,8 +296,8 @@ public: * * @since 2.0 * - * @return The pointer to the selected check button, @n - * else @c null if an error occurs or no check button in the radio group is selected + * @return A pointer to the selected check button, @n + * else @c null if an error occurs or no check button in the radio group is selected * */ const CheckButton* GetSelectedItem(void) const; diff --git a/inc/FUiCtrlScrollEventTypes.h b/inc/FUiCtrlScrollEventTypes.h index 482eb4e..cccd2f0 100644 --- a/inc/FUiCtrlScrollEventTypes.h +++ b/inc/FUiCtrlScrollEventTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlScrollEventTypes.h - * @brief This is the header file for the List enumerations. + * @brief This is the header file for the %List enumerations. * * @since 2.0 * @@ -39,10 +39,10 @@ namespace Tizen { namespace Ui { namespace Controls */ enum ScrollEndEvent { - SCROLL_END_EVENT_END_TOP = 0, /**< The scroll reaches top end */ - SCROLL_END_EVENT_END_BOTTOM, /**< The scroll reaches bottom end */ - SCROLL_END_EVENT_END_LEFT, /**< The scroll reaches left end */ - SCROLL_END_EVENT_END_RIGHT /**< The scroll reaches right end */ + SCROLL_END_EVENT_END_TOP = 0, /**< The scroll reaches the top end */ + SCROLL_END_EVENT_END_BOTTOM, /**< The scroll reaches the bottom end */ + SCROLL_END_EVENT_END_LEFT, /**< The scroll reaches the left end */ + SCROLL_END_EVENT_END_RIGHT /**< The scroll reaches the right end */ }; }}} // Tizen::Ui::Controls diff --git a/inc/FUiCtrlScrollPanel.h b/inc/FUiCtrlScrollPanel.h index 8e3a10e..bcec8b6 100644 --- a/inc/FUiCtrlScrollPanel.h +++ b/inc/FUiCtrlScrollPanel.h @@ -149,7 +149,7 @@ public: * @exception E_INVALID_ARG The given width or height is less than 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::Rectangle& rect); @@ -165,16 +165,16 @@ public: * @exception E_INVALID_ARG The given width or height is less than 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Graphics::FloatRectangle& rect); /** - * Initializes this instance of %ScrollPanel and child controls with the specified resource ID @n - * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. @n - * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical in the application manifest file - * the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder. + * Initializes this instance of %ScrollPanel and child controls with the specified resource ID. @n + * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. + * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical + * in the application manifest file the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder. * * @since 2.0 * @@ -184,8 +184,9 @@ public: * @exception E_FILE_NOT_FOUND The specified file cannot be found. * @exception E_INVALID_FORMAT The specified XML format is invalid. * @exception E_OPERATION_FAILED The operation has failed. - * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied - * to both orientations because the current orientation is not known. After AddControl() is called, then the values are applied only to the current orientation. + * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(), + * then the new value is applied to both orientations because the current orientation is not known. After AddControl() is called, + * then the values are applied only to the current orientation. */ result Construct(const Tizen::Base::String& resourceId); @@ -197,11 +198,11 @@ public: * * @return An error code * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The given width or height is less than 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -213,11 +214,11 @@ public: * * @return An error code * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The given width or height is less than 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -231,10 +232,12 @@ public: * @param[in] layout The layout for both the portrait and landscape mode * @param[in] rect The location and size of the %ScrollPanel control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or the height is less than 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c layout is already bound to another container. + * - The given width or the height is less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect); @@ -248,10 +251,12 @@ public: * @param[in] layout The layout for both the portrait and landscape mode * @param[in] rect The location and size of the %ScrollPanel control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or the height is less than 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c layout is already bound to another container. + * - The given width or the height is less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect); @@ -264,11 +269,13 @@ public: * @return An error code * @param[in] layout The layout for both the portrait and landscape mode * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or height is less than 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c layout is already bound to another container. + * - The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -281,11 +288,13 @@ public: * @return An error code * @param[in] layout The layout for both the portrait and landscape mode * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or height is less than 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c layout is already bound to another container. + * - The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -300,11 +309,12 @@ public: * @param[in] landscapeLayout The layout for the landscape mode * @param[in] rect The location and size of the %ScrollPanel control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or - * height is less than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container. + * - The given width or height is less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect); @@ -319,11 +329,12 @@ public: * @param[in] landscapeLayout The layout for the landscape mode * @param[in] rect The location and size of the %ScrollPanel control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or - * height is less than @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * The specified @c portraitLayout or @c landscapeLayout is already bound to another container. + * - The given width or height is less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the scroll direction is vertical and the scroll area is resized automatically. - * @see Tizen::Ui::Container + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect); @@ -337,12 +348,13 @@ public: * @param[in] portraitLayout The layout for the portrait mode * @param[in] landscapeLayout The layout for the landscape mode * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or - * height is less than @c 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container. + * - The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -356,12 +368,13 @@ public: * @param[in] portraitLayout The layout for the portrait mode * @param[in] landscapeLayout The layout for the landscape mode * @param[in] rect The location and size of the %ScrollPanel control - * @param[in] scrollDirection The scroll direction of %ScrollPanel - * @param[in] autoResizingEnable Whether to resize the client area automatically + * @param[in] scrollDirection The scroll direction of %ScrollPanel + * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or - * the given width or height is less than 0. - * @see Tizen::Ui::Container + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container. + * - The given width or height is less than @c 0. + * @see Container */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); @@ -372,10 +385,10 @@ public: * * @since 2.0 * - * @param[in] listener The listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @see Tizen::Ui::Controls::IScrollEventListener + * @param[in] listener The listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @see Controls::IScrollEventListener * @see RemoveScrollEventListener() */ void AddScrollEventListener(IScrollEventListener& listener); @@ -387,10 +400,10 @@ public: * * @since 2.1 * - * @param[in] listener The listener to add - * @exception E_SUCCESS The method is successful. + * @param[in] listener The listener to add + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @see Tizen::Ui::Controls::IScrollEventListenerF + * @see Controls::IScrollEventListenerF * @see RemoveScrollEventListener() */ void AddScrollEventListener(IScrollEventListenerF& listener); @@ -403,7 +416,7 @@ public: * @since 2.0 * * @param[in] listener The listener to remove - * @see Tizen::Ui::Controls::IScrollEventListener + * @see Controls::IScrollEventListener * @see AddScrollEventListener() */ void RemoveScrollEventListener(IScrollEventListener& listener); @@ -416,7 +429,7 @@ public: * @since 2.1 * * @param[in] listener The listener to remove - * @see Tizen::Ui::Controls::IScrollEventListenerF + * @see Controls::IScrollEventListenerF * @see AddScrollEventListener() */ void RemoveScrollEventListener(IScrollEventListenerF& listener); @@ -447,7 +460,8 @@ public: * Sets the scroll position. * * @brief [Deprecated] - * @deprecated This method is deprecated. Instead of using this method, use the SetScrollPosition(int, bool), which supports animated scroll. + * @deprecated This method is deprecated. Instead of using this method, use the SetScrollPosition(int, bool), + * which supports animated scroll. * @since 2.0 * * @param[in] position The scroll position @@ -462,8 +476,8 @@ public: * @since 2.0 * * @param[in] position The scroll position in pixel - * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n - * else @c false. + * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n + * else @c false. * */ void SetScrollPosition(int position, bool withAnimation); @@ -475,8 +489,8 @@ public: * @since 2.1 * * @param[in] position The scroll position in pixel - * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n - * else @c false. + * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n + * else @c false. * */ void SetScrollPosition(float position, bool withAnimation); @@ -536,12 +550,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] width The width of the client area to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c width is less than the width of %ScrollPanel - * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on, - * or the scroll direction is vertical. + * @return An error code + * @param[in] width The width of the client area to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c width is less than the width of %ScrollPanel + * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on, + * or the scroll direction is vertical. * */ result SetClientAreaWidth(int width); @@ -552,12 +566,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] width The width of the client area to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c width is less than the width of %ScrollPanel - * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on, - * or the scroll direction is vertical. + * @return An error code + * @param[in] width The width of the client area to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c width is less than the width of %ScrollPanel + * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on, + * or the scroll direction is vertical. * */ result SetClientAreaWidth(float width); @@ -568,12 +582,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] height The height of the client area to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c height is less than the height of %ScrollPanel - * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on, - * or the scroll direction is horizontal. + * @return An error code + * @param[in] height The height of the client area to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c height is less than the height of %ScrollPanel + * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on, + * or the scroll direction is horizontal. * */ result SetClientAreaHeight(int height); @@ -584,12 +598,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] height The height of the client area to set - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG @c height is less than the height of %ScrollPanel - * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on, - * or the scroll direction is horizontal. + * @return An error code + * @param[in] height The height of the client area to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c height is less than the height of %ScrollPanel. + * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on, + * or the scroll direction is horizontal. * */ result SetClientAreaHeight(float height); @@ -600,18 +614,19 @@ public: * * @since 2.0 * - * @return Direction of %ScrollPanel + * @return The direction of %ScrollPanel * */ ScrollPanelScrollDirection GetScrollDirection(void) const; /** - * Gets how the scroll area the %ScrollPanel is resized. + * Checks whether auto-resizing is enabled for the scroll area. * * @since 2.0 * - * @return Whether to resize the client area automatically + * @return @c true if auto-resizing is enabled for the scroll area, @n + * else @c false * */ bool IsScrollAreaAutoResizingEnabled(void) const; @@ -622,7 +637,8 @@ public: * * @since 2.0 * - * @param[in] enable Set to @c true to enable page scroll. + * @param[in] enable Set to @c true to enable page scroll, @n + * @c false to disable page scroll * */ void SetPageScrollEnabled(bool enable); @@ -634,7 +650,7 @@ public: * @since 2.0 * * @return @c true if the page scroll is enabled. @n - * else @c false. + * else @c false. * */ bool IsPageScrollEnabled(void) const; @@ -646,7 +662,7 @@ public: * @since 2.0 * * @param[in] visible Set to @c true to show scroll bar. @n - * else @c false. + * else @c false. * */ void SetScrollBarVisible(bool visible); @@ -667,7 +683,7 @@ public: * @since 2.0 * * @param[in] mode The scroll input handling mode - * @see GetScrollInputMode() + * @see GetScrollInputMode() */ void SetScrollInputMode(ScrollInputMode mode); diff --git a/inc/FUiCtrlScrollPanelTypes.h b/inc/FUiCtrlScrollPanelTypes.h index f9db6be..d1029d8 100644 --- a/inc/FUiCtrlScrollPanelTypes.h +++ b/inc/FUiCtrlScrollPanelTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlScrollPanelTypes.h - * @brief This is the header file for the enumerations of the ScrollPanel class. + * @brief This is the header file for the enumerations of the %ScrollPanel class. * * This header file defines the data types for the ScrollPanel class. */ @@ -50,7 +50,7 @@ enum ScrollPanelScrollDirection enum ScrollInputMode { SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION = 0, /**< %Content can be scrolled in any direction */ - SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION /**<%Content can be scrolled only in the first direction */ + SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION /**< %Content can be scrolled only in the first direction */ }; }}} // Tizen::Ui::Controls diff --git a/inc/FUiCtrlSearchBar.h b/inc/FUiCtrlSearchBar.h old mode 100755 new mode 100644 index 9499223..f277007 --- a/inc/FUiCtrlSearchBar.h +++ b/inc/FUiCtrlSearchBar.h @@ -372,13 +372,14 @@ public: * else @c false * @param[in] keypadAction The keypad action * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the action ID of the specified item must be a positive integer. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The action ID of the specified item is not a positive integer. * @exception E_SYSTEM A system error has occurred. * @remarks * - It is recommended that %SearchBar should be placed at the top-left corner of Form's client area. - * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses the cancel button, - * the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically. + * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user + * presses the cancel button, the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically. */ result Construct(const Tizen::Graphics::Rectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); @@ -397,13 +398,14 @@ public: * else @c false * @param[in] keypadAction The keypad action * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the action ID of the specified item must be a positive integer. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The action ID of the specified item is not a positive integer. * @exception E_SYSTEM A system error has occurred. * @remarks * - It is recommended that %SearchBar should be placed at the top-left corner of Form's client area. - * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses the cancel button, - * the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically. + * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses + * the cancel button, the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); @@ -451,11 +453,11 @@ public: * @page CompSetContentPage Compatibility for SetContent() * @section CompSetContentPage IssueSection Issues * Implementing this method in OSP compatible applications has the following issue: @n - * SetContent() method passes the ownership of Content control to SearchBar in OSP, - * whereas the Content control ownership remains with the caller in Tizen. + * The SetContent() method passes the ownership of the Content control to %SearchBar in OSP, + * whereas the %Content control ownership remains with the caller in Tizen. * * @section CompSetContentPage SolutionSection Resolutions - * In Tizen, the caller should delete the previous Content control, if this method is called more than once. + * In Tizen, the caller should delete the previous %Content control, if this method is called more than once. */ /** @@ -464,7 +466,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] invalidate Set to @c true to perform invalidate on the content area, @n + * @param[in] invalidate Set to @c true to perform invalidate on the content area, @n * else @c false * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n @@ -536,7 +538,7 @@ public: * @since 2.0 * * @return The size of the content area - * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content areas can + * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content area can * be changed at runtime. * @see AddSearchBarEventListener() * @see ISearchBarEventListener @@ -549,7 +551,7 @@ public: * @since 2.1 * * @return The size of the content area - * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content areas can + * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content area can * be changed at runtime. * @see AddSearchBarEventListener() * @see ISearchBarEventListener @@ -580,7 +582,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see SetModeLock() + * @see SetModeLocked() */ bool IsModeLocked(void) const; @@ -592,11 +594,12 @@ public: * @return An error code * @param[in] mode The search bar mode * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or @n - * the mode is locked. + * @exception E_INVALID_OPERATION Either of the following conditions has occurred: + * - The current state of the instance prohibits the execution of the specified operation. + * - The mode is locked. * @exception E_SYSTEM A system error has occurred. * @see GetMode() - * @see SetModeLock() + * @see SetModeLocked() */ result SetMode(SearchBarMode mode); @@ -679,8 +682,9 @@ public: * @param[in] text The button text * @param[in] actionId The button action ID * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or @n - * the specified @c actionId must be greater than or equal to @c 0. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified @c actionId is not greater than or equal to @c 0. * @exception E_SYSTEM A system error has occurred. */ result SetButton(const Tizen::Base::String& text, int actionId); @@ -880,8 +884,9 @@ public: * @param[in] start The starting index of range * @param[in] end The last index of range * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n - * either the @c start or @c end parameter is greater than the number of elements or less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified index is outside the bounds of the data structure. + * - Either the @c start or @c end parameter is greater than the number of elements or less than @c 0. * @exception E_SYSTEM A system error has occurred. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetText() @@ -912,8 +917,9 @@ public: * @return An error code * @param[in] limitLength The limit text length to set * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid, or @n - * the specified limit length cannot be @c 0 or negative. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified input parameter is invalid. + * - The specified limit length is @c 0 or negative. * @exception E_SYSTEM A system error has occurred. * @see GetLimitLength() */ @@ -980,8 +986,9 @@ public: * @return An error code * @param[in] size The text size * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid, or @n - * the specified @c size cannot be a negative value. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified input parameter is invalid. + * - The specified @c size is a negative value. * @exception E_SYSTEM A system error has occurred. * @see GetSearchFieldTextSize() */ @@ -995,8 +1002,9 @@ public: * @return An error code * @param[in] size The text size * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid, or @n - * the specified @c size cannot be a negative value. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified input parameter is invalid. + * - The specified @c size cannot be a negative value. * @exception E_SYSTEM A system error has occurred. * @see GetSearchFieldTextSizeF() */ @@ -1040,8 +1048,9 @@ public: * @param[in] start The start index of the text block * @param[in] end The end index of the text block * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n - * either the @c start or @c end parameter is greater than the number of elements or less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified index is outside the bounds of the data structure. + * - Either the @c start or @c end parameter is greater than the number of elements or less than @c 0. * @exception E_SYSTEM A system error has occurred. * @see ReleaseBlock() * @see GetBlockRange() @@ -1304,9 +1313,9 @@ public: * @deprecated We no longer provide a method to set the language of the current keypad. @n * This method is provided only for backward compatibility and will be deleted in the near future. * @return An error code - * @param[in] languageCode The language to set - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @param[in] languageCode The language to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks * - The application can set the language of the current keypad that is associated with the current %SearchBar. * - This method only works if the language to set is supported by the current preloaded keypad. @@ -1320,8 +1329,8 @@ public: * @since 2.0 * * @return An error code - * @param[out] language The current input language - * @exception E_SUCCESS The method is successful. + * @param[out] language The current input language + * @exception E_SUCCESS The method is successful. * @remarks The application can get the current language of the keypad that is associated with the current %SearchBar. */ @@ -1343,9 +1352,9 @@ public: * Checks whether the text prediction is enabled. * * @since 2.0 - * @return @c true if the text prediction is enabled, @n - * else @c false - * @exception E_SUCCESS The method is successful. + * @return @c true if the text prediction is enabled, @n + * else @c false + * @exception E_SUCCESS The method is successful. * @see SetTextPredictionEnabled() */ bool IsTextPredictionEnabled(void) const; @@ -1354,12 +1363,12 @@ public: * Enables or disables the text prediction. * * @since 2.0 - * @param[in] enable Set to @c true to enable the text prediction, @n - * else @c false - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_UNSUPPORTED_OPERATION This operation is not supported. - * @see IsTextPredictionEnabled() + * @param[in] enable Set to @c true to enable the text prediction, @n + * else @c false + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @see IsTextPredictionEnabled() */ result SetTextPredictionEnabled(bool enable); @@ -1500,7 +1509,7 @@ public: * * @since 2.0 * - * @param[in] listener The listener to remove + * @param[in] listener The listener to remove * @see AddLanguageEventListener() */ @@ -1511,7 +1520,7 @@ public: * * @since 2.1 * - * @param[in] pFilter The filter + * @param[in] pFilter The filter * @remarks The %SearchBar control checks with the registered filter to decide whether the user-entered text should be replaced. */ void SetEditTextFilter(IEditTextFilter* pFilter); diff --git a/inc/FUiCtrlSectionTableView.h b/inc/FUiCtrlSectionTableView.h index 23fb73e..a10d0ba 100644 --- a/inc/FUiCtrlSectionTableView.h +++ b/inc/FUiCtrlSectionTableView.h @@ -279,13 +279,14 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class - * This instance represents the x and y coordinates of the left top corner of the created %SectionTableView along with the width and height. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %SectionTableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. + * @param[in] rect An instance of the Graphics::Rectangle class + * This instance represents the x and y coordinates of the left top corner of the + * created %SectionTableView along with the width and height. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %SectionTableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -296,13 +297,14 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the left top corner of the created %SectionTableView along with the width and height. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %SectionTableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value. + * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n + * This instance represents the x and y coordinates of the left top corner of the + * created %SectionTableView along with the width and height. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %SectionTableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -312,7 +314,7 @@ public: * * @since 2.0 * - * @param[in] pProvider The item provider to create and delete items + * @param[in] pProvider The item provider to create and delete items * @remarks If an item provider is not set for the table view, the table view does not work. * The specified provider should be allocated in heap memory. */ @@ -323,7 +325,7 @@ public: * * @since 2.1 * - * @param[in] pProvider The item provider to create and delete items + * @param[in] pProvider The item provider to create and delete items * @remarks If an item provider is not set for the table view, the table view does not work. * The specified provider should be allocated in heap memory. */ @@ -357,12 +359,12 @@ public: void SetGroupedLookEnabled(bool enable); /** - * Returns whether the grouped look is enabled or not. + * Checks whether the grouped look is enabled or not. * * @since 2.0 * - * @return @c true if the grouped look is enabled, @n - * else @c false + * @return @c true if the grouped look is enabled, @n + * else @c false */ bool IsGroupedLookEnabled(void) const; @@ -373,9 +375,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] listener The event listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The listener is already added. + * @param[in] listener The event listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. */ result AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); @@ -387,9 +389,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] listener The event listener to remove - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The listener is not found. + * @param[in] listener The event listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The listener is not found. */ result RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); @@ -399,10 +401,10 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. */ @@ -414,11 +416,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. */ result RemoveFastScrollListener(IFastScrollListener& listener); @@ -428,12 +430,12 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListener::OnScrollEndReached() * @see RemoveScrollEventListener() */ @@ -446,10 +448,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListener::OnScrollEndReached() * @see AddScrollEventListener() */ @@ -462,10 +464,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListenerF::OnScrollEndReached() * @see RemoveScrollEventListener() @@ -478,11 +480,11 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListenerF::OnScrollEndReached() * @see AddScrollEventListener() */ @@ -494,12 +496,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] text The text of the index - * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] text The text of the index + * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); @@ -508,11 +510,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[out] sectionIndex The section index - * @param[out] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND Top drawn item is not found. + * @return An error code + * @param[out] sectionIndex The section index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND Top drawn item is not found. */ result GetTopDrawnItemIndex(int& sectionIndex, int& itemIndex) const; @@ -530,7 +532,7 @@ public: result GetBottomDrawnItemIndex(int& sectionIndex, int& itemIndex) const; /** - * Scrolls to the item at the specified index. + * Scrolls to the item at the specified index. @n * The specified item is drawn at the position specified by the item alignment. * * @since 2.0 @@ -541,11 +543,11 @@ public: * @param[in] itemAlignment The item alignment * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle - * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * of the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result ScrollToItem(int sectionIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); @@ -559,32 +561,32 @@ public: * @param[in] itemIndex The item index * @param[in] check Set to @c true to select the item, @n * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. * @remarks * - This method works only when the annex style of the item allows selection. - * This method does not work during the ITableViewItemProvider call-back procedure. + * This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle - * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemChecked(int sectionIndex, int itemIndex, bool check); /** - * Returns whether the item at the specified index is selected or not. + * Checks whether the item at the specified index is selected or not. * * @since 2.0 * - * @return @c true if the item is selected, @n - * else @c false - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the item is selected, @n + * else @c false + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @remarks * - This method returns @c false, if the annex style of the item does not allow selection. - * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemChecked(int sectionIndex, int itemIndex) const; @@ -598,13 +600,13 @@ public: * @param[in] itemIndex The item index * @param[in] enable Set to @c true to enable the specified item, @n * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. - * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemEnabled(int sectionIndex, int itemIndex, bool enable); @@ -613,14 +615,14 @@ public: * * @since 2.0 * - * @return @c true if the item is enabled, @n - * else @c false - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the - * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemEnabled(int sectionIndex, int itemIndex) const; @@ -638,10 +640,10 @@ public: * * @since 2.0 * - * @return The total number of items in the specified section - * @param[in] sectionIndex The section index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return The total number of items in the specified section + * @param[in] sectionIndex The section index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. */ int GetItemCountAt(int sectionIndex) const; @@ -649,22 +651,23 @@ public: * Updates the specified item. @n * For instance, @c TABLE_VIEW_REFRESH_TYPE_ITEM_ADD is used when a new item needs to be added and @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE is * used when an item is deleted from the table view. Moreover, @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY is used when the content of an existing item has - * changed and it needs to be updated. @n Note that calling the %RefreshAllItems() method with @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY + * changed and it needs to be updated. @n + * Note that calling the %RefreshAllItems() method with @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY * invokes ISectionTableViewItemProvider::UpdateItem() or ISectionTableViewItemProviderF::UpdateItem() for the given index in sequence. * * @since 2.0 * - * @return An error code - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @param[in] type The item to add, remove, or modify - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @return An error code + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @param[in] type The item to add, remove, or modify + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - If the specified item.itemIndex is @c -1, then the method is applied to the section item with the given index. * - Note that if @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE option is used to a section item, all the items in the section - * (including the section item itself) are removed from the table view. + * (including the section item itself) are removed from the table view. * - This method does not work during the ITableViewItemProvider call-back procedure. */ result RefreshItem(int sectionIndex, int itemIndex, TableViewRefreshType type); @@ -688,11 +691,12 @@ public: * * @since 2.0 * - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1. * @remarks * - This method will delete all the items and recreate them, so it should not be called from the inside of - * OnSectionTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method. + * OnSectionTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should + * use the RefreshItem() method. * - This method should not be called from ISectionTableViewItemProvider implementation because of recursion. * - The specific error code can be accessed using the GetLastResult() method. */ @@ -703,13 +707,13 @@ public: * * @since 2.0 * - * @param[in] position The position of the item - * @param[out] sectionIndex The section index of the item on specified position - * @param[out] itemIndex The item index of the item on specified position + * @param[in] position The position of the item + * @param[out] sectionIndex The section index of the item on specified position + * @param[out] itemIndex The item index of the item on specified position * @remarks - * - This method sets both of sectionIndex and itemIndex to @c -1 if no item is found at the given position. + * - This method sets both @c sectionIndex and @c itemIndex to @c -1 if no item is found at the given position. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle - * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * of %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& sectionIndex, int& itemIndex) const; @@ -718,13 +722,13 @@ public: * * @since 2.1 * - * @param[in] position The position of the item - * @param[out] sectionIndex The section index of the item on specified position - * @param[out] itemIndex The item index of the item on specified position + * @param[in] position The position of the item + * @param[out] sectionIndex The section index of the item on specified position + * @param[out] itemIndex The item index of the item on specified position * @remarks - * - This method sets both of sectionIndex and itemIndex to -1 if no item is found at the given position. + * - This method sets both @c sectionIndex and @c itemIndex to -1 if no item is found at the given position. * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of - * the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& sectionIndex, int& itemIndex) const; @@ -788,15 +792,16 @@ public: ScrollInputMode GetScrollInputMode(void) const; /** - * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style. + * Scrolls the list contents by a specified number of pixels. @n + * When it is negative, it scrolls to opposite direction in current scroll style. * * @since 2.1 * * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @remarks * - If you call this method with negative @c pixel when position of scroll is already top of contents then it will return * @c E_OUT_OF_RANGE. @n @@ -810,11 +815,11 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation + * @return An error code + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation * @remarks * - If you call this method with negative @c pixel when position of scroll is already top of contents then it will @c * return E_OUT_OF_RANGE. @n @@ -857,11 +862,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result OpenContextItem(int sectionIndex, int itemIndex); @@ -870,12 +875,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @return An error code + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result CloseContextItem(int sectionIndex, int itemIndex); @@ -884,12 +889,12 @@ public: * * @since 2.1 * - * @return @c true if the context item is opened, @n - * else @c false - * @param[in] sectionIndex The section index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the context item is opened, @n + * else @c false + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. */ bool IsContextItemOpened(int sectionIndex, int itemIndex) const; @@ -898,11 +903,11 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] sectionIndex The index of the section - * @param[in] alignment The horizontal alignment of the section header text - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return An error code + * @param[in] sectionIndex The index of the section + * @param[in] alignment The horizontal alignment of the section header text + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @exception E_INVALID_OPERATION There is no header in the section. * @remarks By default, the text of the section header is left aligned. * @see GetSectionHeaderTextHorizontalAlignment() @@ -914,11 +919,11 @@ public: * * @since 2.1 * - * @return The horizontal alignment of the text - * @param[in] sectionIndex The index of the section - * @exception E_SUCCESS The method is successful - * @exception E_OUT_OF_RANGE The specified input parameter is invalid. - * @exception E_INVALID_OPERATION There is no header in the section. + * @return The horizontal alignment of the text + * @param[in] sectionIndex The index of the section + * @exception E_SUCCESS The method is successful + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @exception E_INVALID_OPERATION There is no header in the section. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetSectionHeaderTextHorizontalAlignment() */ @@ -930,11 +935,11 @@ public: * @since 2.1 * * @return An error code - * @param[in] sectionIndex The index of the section - * @param[in] alignment The horizontal alignment of the section footer text - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION There is no footer in the section. + * @param[in] sectionIndex The index of the section + * @param[in] alignment The horizontal alignment of the section footer text + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION There is no footer in the section. * @remarks By default, the text of the section footer is right aligned. * @see GetSectionFooterTextHorizontalAlignment() */ @@ -945,11 +950,11 @@ public: * * @since 2.1 * - * @return The horizontal alignment of the text - * @param[in] sectionIndex The index of the section - * @exception E_SUCCESS The method is successful - * @exception E_OUT_OF_RANGE The specified input parameter is invalid. - * @exception E_INVALID_OPERATION There is no footer in the section. + * @return The horizontal alignment of the text + * @param[in] sectionIndex The index of the section + * @exception E_SUCCESS The method is successful + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @exception E_INVALID_OPERATION There is no footer in the section. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetSectionFooterTextHorizontalAlignment() */ diff --git a/inc/FUiCtrlSimpleItem.h b/inc/FUiCtrlSimpleItem.h index 96ca344..9e7d59b 100644 --- a/inc/FUiCtrlSimpleItem.h +++ b/inc/FUiCtrlSimpleItem.h @@ -77,7 +77,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ @@ -90,7 +90,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. */ diff --git a/inc/FUiCtrlSlidableGroupedList.h b/inc/FUiCtrlSlidableGroupedList.h index 3a6d7d6..d4bd4fc 100644 --- a/inc/FUiCtrlSlidableGroupedList.h +++ b/inc/FUiCtrlSlidableGroupedList.h @@ -54,7 +54,7 @@ namespace Tizen { namespace Ui { namespace Controls * * The %SlidableGroupedList class represents a list which loads grouped * items on demand and unloads unused grouped items to save memory. Like GroupedList, - * the list items of GroupedList consist of groups and items. A group represents grouped + * the list items of %GroupedList consist of groups and items. A group represents grouped * items and is inserted into the first level just as items are inserted into List. Items * which are from CustomListItems are inserted under related groups. So, items are uniquely * identified with two indices: group index and item index. @@ -70,10 +70,12 @@ namespace Tizen { namespace Ui { namespace Controls * grouped list. It will then receive related events from %SlidableGroupedList. * * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically - * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat + * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat * must be deleted by the application. * - * Refer to CustomListItem and CustomListItemFormat. + * For more information, see CustomListItem and CustomListItemFormat. + * + * The following example demonstrates how to use the %SlidableGroupedList class. * * Example: * @@ -304,7 +306,7 @@ public: * For full construction, the SlidableGroupedList::Construct() method must be called right after calling this constructor. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * @endif */ @@ -316,7 +318,7 @@ public: * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * @endif */ @@ -328,20 +330,20 @@ public: * Initializes this instance of %SlidableGroupedList with the specified parameters. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class @n - * This instance represents the x and y coordinates of the top-left corner of the created %SlidableGroupedList along with - * the width and height. - * @param[in] style The style of the CustomListItem instances + * @param[in] rect An instance of the Graphics::Rectangle class @n + * This instance represents the x and y coordinates of the top-left corner of the + * created %SlidableGroupedList along with the width and height. + * @param[in] style The style of the CustomListItem instances * @param[in] itemDivider Set to @c true to display an item divider, @n * else @c false * @param[in] fastScroll Set to @c true to use fast scroll, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. * @remarks * - The size of the control must be within the range defined by the minimum size and the maximum size. @@ -357,7 +359,7 @@ public: * The added listener can listen to the events on the context of the given event dispatcher when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to add @@ -371,7 +373,7 @@ public: * The removed listener cannot listen to the events when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to remove @@ -384,7 +386,7 @@ public: * Loads the item to the top of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -401,7 +403,7 @@ public: * Loads the item to the end of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -418,7 +420,7 @@ public: * Unloads all the loaded items of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -435,7 +437,7 @@ public: * The group is not removed. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -443,7 +445,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks The removed list items are deleted from the memory. + * @remarks The removed list items are deleted from the memory. * @endif */ result RemoveAllItemsAt(int groupIndex); @@ -453,7 +455,7 @@ public: * Removes all the items in the list. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -473,7 +475,7 @@ public: * The removed listener cannot listen to events when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to remove @@ -487,7 +489,7 @@ public: * The removed listener cannot listen to events when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to remove @@ -500,7 +502,7 @@ public: * Scrolls to the bottom of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * @endif */ @@ -511,7 +513,7 @@ public: * Scrolls to the top of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * @endif */ @@ -523,10 +525,10 @@ public: * The specified item is drawn at the top of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * - * @return An error code + * @return An error code * @param[in] groupIndex The group index * @param[in] itemIndex The item index * @exception E_SUCCESS The method is successful. @@ -542,10 +544,10 @@ public: * The specified group is drawn at the top of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 * - * @return An error code + * @return An error code * @param[in] groupIndex The group index * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. @@ -560,11 +562,11 @@ public: * Sets all the items at the specified group index. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 * - * @param[in] groupIndex The group index - * @param[in] check Set to @c true to check the item, @n + * @param[in] groupIndex The group index + * @param[in] check Set to @c true to check the item, @n * else @c false to uncheck * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -578,7 +580,7 @@ public: * Sets the contents of the group of the %SlidableGroupedList control at the specified group index. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -598,9 +600,9 @@ public: * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. - * @since 2.0 + * @since 2.0 * - * @return An error code + * @return An error code * @param[in] groupIndex The group index of the item to check * @param[in] itemIndex The index of the item to check * @param[in] check Set to @c true to check the item, @n @@ -617,8 +619,8 @@ public: * Enables or disables the item at the specified index of the %SlidableGroupedList. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. - * @since 2.0 + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 * * @return An error code * @param[in] groupIndex The group index of the item to check @@ -637,7 +639,7 @@ public: * Removes all the checked items from the group. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -655,12 +657,12 @@ public: * Removes the specified item from the group. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code * @param[in] groupIndex The group index - * @param[in] itemIndex The item index + * @param[in] itemIndex The item index * @param[in] height The estimated/real height of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -676,7 +678,7 @@ public: * Removes the group of the %SlidableGroupedList control at the group index. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -696,7 +698,7 @@ public: * Gets the item at the specified indexes if the item is currently loaded. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return A pointer to the loaded item, @n @@ -713,7 +715,7 @@ public: * Gets the item ID at the specified index if the item is currently loaded. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The item ID, @n @@ -730,7 +732,7 @@ public: * Gets the item index from the specified item ID. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code, @n @@ -749,14 +751,14 @@ public: * Removes all the checked items of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code * @param[in] height The height of the item to delete * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The removed list items are deleted from the memory. + * @remarks The removed list items are deleted from the memory. * @remarks This method can only be used when the style of the list allows multiple selections. * @endif */ @@ -767,7 +769,7 @@ public: * Gets the index of the first loaded item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -784,7 +786,7 @@ public: * Gets the index of the last loaded item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -801,7 +803,7 @@ public: * Sets the first index list of the scroll by text. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -817,7 +819,7 @@ public: * Sets the background color of this control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] color The background color @@ -830,7 +832,7 @@ public: * Sets the text of the empty list. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] text The text of the empty list @@ -843,7 +845,7 @@ public: * Sets the color of the text to be displayed in the absence of a %SlidableGroupedList item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] color The color of the text to display @@ -856,7 +858,7 @@ public: * Gets the color of the text to be displayed in the absence of a %SlidableGroupedList item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The color of the text to be displayed @@ -874,7 +876,7 @@ public: * * @return An error code * @param[in] groupIndex The group index - * @param[in] itemIndex The %CustomListItem object + * @param[in] itemIndex The CustomListItem object * @param[in] item The item * @param[in] itemId The item ID * @exception E_SUCCESS The method is successful. @@ -891,7 +893,7 @@ public: * The added listener can listen to events on the context of the given event dispatcher when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to add @@ -925,7 +927,7 @@ public: * The added listener can listen to events on the context of the given event dispatcher when they are fired. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @param[in] listener The event listener to add @@ -939,7 +941,7 @@ public: * Adds the item to the specified group. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -960,7 +962,7 @@ public: * Gets the index of the current bottom drawn item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -978,7 +980,7 @@ public: * Gets the index of the first checked list item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -996,7 +998,7 @@ public: * Gets the group ID from the specified group index. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The group ID @@ -1011,7 +1013,7 @@ public: * Gets the group index from the specified group ID. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The group index @@ -1026,7 +1028,7 @@ public: * Gets the index of the last checked item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1043,7 +1045,7 @@ public: * Gets the index of the next checked item after the specified item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1060,7 +1062,7 @@ public: * Gets the index of the current top drawn item. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1077,7 +1079,7 @@ public: * Gets the index of the item at the specified item position. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1097,7 +1099,7 @@ public: * Gets the index of the item at the specified item position. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1116,7 +1118,7 @@ public: * Inserts the group at the specified group index. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1138,7 +1140,7 @@ public: * Checks whether the item at the specified index is checked. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return @c true if the item is checked, @n @@ -1156,7 +1158,7 @@ public: * Checks whether the item at the specified index is enabled. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return @c true if the item is enabled, @n @@ -1173,7 +1175,7 @@ public: * Checks whether the item at the specified index is currently loaded to the slidable list. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return @c true if the item is loaded, @n @@ -1190,7 +1192,7 @@ public: * Removes all the groups of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1208,7 +1210,7 @@ public: * Gets the count of all the groups of the %SlidableGroupedList control. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The count of all the groups @@ -1221,7 +1223,7 @@ public: * Inserts the item to the specified group and item indices. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code @@ -1243,7 +1245,7 @@ public: * Gets the count of all the items in the specified group. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return The count of all the items in the specified group @@ -1257,16 +1259,16 @@ public: * Draws and shows the specified item of %SlidableGroupedList. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code - * @param[in] groupIndex The group index - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. * @endif */ result RefreshItem(int groupIndex, int itemIndex); @@ -1276,7 +1278,7 @@ public: * Draws and shows the specified group of %SlidableGroupedList. * * @brief [Deprecated] - * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. * @since 2.0 * * @return An error code diff --git a/inc/FUiCtrlSlidableList.h b/inc/FUiCtrlSlidableList.h index e5a28d9..e46310c 100644 --- a/inc/FUiCtrlSlidableList.h +++ b/inc/FUiCtrlSlidableList.h @@ -69,10 +69,12 @@ namespace Tizen { namespace Ui { namespace Controls * It will then receive related events from %SlidableList. * * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically - * when the %SlidableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat + * when the %SlidableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat * must be deleted by the application. * - * Refer to CustomListItem and CustomListItemFormat. + * For more information, see CustomListItem and CustomListItemFormat. + * + * The following example demonstrates how to use the %SlidableList class. * * Example: * @@ -332,7 +334,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect This instance represents the X and Y coordinates of the top-left corner of the created %SlidableList along with the width and height + * @param[in] rect This instance represents the X and Y coordinates of the top-left corner of the created + * %SlidableList along with the width and height * @param[in] style The style set of %CustomList * @param[in] itemDivider Set to @c true to display an item divider, @n * else @c false @@ -470,7 +473,7 @@ public: * @deprecated This class is deprecated. Instead of using this class, use the ListView class. * @since 2.0 * - * @return The next item index + * @return The next item index * @param[in] index The item index * @remarks This method can only be used when the style of the list allows multiple selections. * @endif @@ -505,7 +508,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count. * @exception E_SYSTEM A system error has occurred. - * @remarks The inserted item is deleted automatically when the list is destroyed. + * @remarks The inserted item is deleted automatically when the list is destroyed. * Do not add, insert, or set an item that already belongs to %SlidableList. * @endif */ @@ -609,7 +612,7 @@ public: * @deprecated This class is deprecated. Instead of using this class, use the ListView class. * @since 2.0 * - * @return An error code + * @return An error code * @param[in] index The item index * @param[in] check The check status * @exception E_SUCCESS The method is successful. @@ -700,7 +703,7 @@ public: * @since 2.0 * * @return A CustomListItem - * @param[in] index The item index + * @param[in] index The item index * @endif */ const CustomListItem* GetLoadedItemAt(int index) const; @@ -714,7 +717,7 @@ public: * @since 2.0 * * @return The item ID - * @param[in] index The item index + * @param[in] index The item index * @endif */ int GetLoadedItemIdAt(int index) const; @@ -757,8 +760,8 @@ public: * @deprecated This class is deprecated. Instead of using this class, use the ListView class. * @since 2.0 * - * @return The index of the item - * @param[in] itemId The item ID + * @return The index of the item + * @param[in] itemId The item ID * @endif */ int GetLoadedItemIndexFromItemId(int itemId) const; diff --git a/inc/FUiCtrlSlider.h b/inc/FUiCtrlSlider.h index a8d07a4..f2e61a0 100644 --- a/inc/FUiCtrlSlider.h +++ b/inc/FUiCtrlSlider.h @@ -48,7 +48,7 @@ namespace Tizen { namespace Ui { namespace Controls * * @since 2.0 * - * The %Slider class displays a slider that represents changing progress or setting information. The difference between %Slider + * The %Slider class displays a slider that represents the changing progress or setting information. The difference between %Slider * and Progress is that the former accepts user input by the touch of the slider icon. * * For more information on the class features, see Slider. @@ -125,7 +125,7 @@ class _OSP_EXPORT_ Slider public: /** * The object is not fully constructed after this constructor is called. @n - * For full construction, the %Construct() method must be called right after calling this constructor. + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -165,7 +165,7 @@ public: * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier. * - If the given size is less than the minimum, it returns @c E_INVALID_ARG. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::Rectangle& rect, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, int minValue = 0, int maxValue = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); @@ -195,12 +195,12 @@ public: * @remarks * - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier. * - If the given size is less than the minimum, it returns @c E_INVALID_ARG. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The size of the control must be within the range defined by the minimum size and maximum size. */ result Construct(const Tizen::Graphics::FloatRectangle& rect, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, int minValue = 0, int maxValue = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); /** - * Adds a IAdjustmentEventListener instance. @n + * Adds an IAdjustmentEventListener instance. @n * The added listener listens to events on the context of the specified event dispatcher when they are fired. * * @since 2.0 @@ -210,7 +210,7 @@ public: void AddAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener); /** - * Removes a IAdjustmentEventListener instance. @n + * Removes an IAdjustmentEventListener instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -237,7 +237,7 @@ public: result SetRange(int minValue, int maxValue); /** - * Gets the minimum value and the maximum value of the slider. + * Gets the minimum value and maximum value of the slider. * * @since 2.0 * @@ -296,7 +296,7 @@ public: * * @return The title text of the entered string * - * @remarks By default returns an empty string. + * @remarks By default this method returns an empty string. */ Tizen::Base::String GetTitleText(void) const; @@ -330,19 +330,21 @@ public: * The optimal size of the control is defined in * Optimal Size of UI Controls. * @param[in] sliderStyle The style of the slider @n - * Multiple link types can be combined using bitwise OR operator. + * Multiple link types can be combined using the bitwise OR operator. * @param[in] minValue The minimum slider value * @param[in] maxValue The maximum slider value * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified minimum and maximum values are less than @c -99, or greater than @c 999. - * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified @c minValue is greater than @c maxVaue. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified @c minValue is greater than @c maxVaue. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully functional only after it has been added to a container. Therefore, some methods may fail if they are used before - * adding the control to the container. + * adding the control to the container. * - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum size. - * - The width and the height of the control must be greater than @c 0. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The width and height of the control must be greater than @c 0. + * - The size of the control must be within the range defined by the minimum size and maximum size. * @see SliderStyle */ result Construct(const Tizen::Graphics::Rectangle& rect, unsigned long sliderStyle, int minValue = 0, int maxValue = 100); @@ -359,25 +361,27 @@ public: * The optimal size of the control is defined in * Optimal Size of UI Controls. * @param[in] sliderStyle The style of the slider @n - * Multiple link types can be combined using bitwise OR operator. + * Multiple link types can be combined using the bitwise OR operator. * @param[in] minValue The minimum slider value * @param[in] maxValue The maximum slider value * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified minimum and maximum values are less than @c -99, or greater than @c 999. - * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified @c minValue is greater than @c maxVaue. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified @c minValue is greater than @c maxVaue. * @exception E_SYSTEM A system error has occurred. * @remarks * - A control is fully functional only after it has been added to a container. Therefore, some methods may fail if they are used before - * adding the control to the container. + * adding the control to the container. * - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum size. - * - The width and the height of the control must be greater than @c 0. - * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The width and height of the control must be greater than @c 0. + * - The size of the control must be within the range defined by the minimum size and maximum size. * @see SliderStyle */ result Construct(const Tizen::Graphics::FloatRectangle& rect, unsigned long sliderStyle, int minValue = 0, int maxValue = 100); /** - * Adds a ISliderEventListener instance. @n + * Adds an ISliderEventListener instance. @n * The added listener can listen to the slider-related events. * * @since 2.0 @@ -387,7 +391,7 @@ public: void AddSliderEventListener(ISliderEventListener& listener); /** - * Removes a ISliderEventListener instance. @n + * Removes an ISliderEventListener instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -480,8 +484,8 @@ public: * @return An error code * @param[in] status The state of the slider thumb * @param[in] bitmap The Thumb bitmap image - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. */ result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); @@ -492,7 +496,7 @@ public: * * @return An error code * @param[in] status The state of the slider thumb - * @param[in] color The color should be set for the thumb text + * @param[in] color The color to be set for the thumb text */ void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color); diff --git a/inc/FUiCtrlSliderTypes.h b/inc/FUiCtrlSliderTypes.h index 4e7d4e3..649180c 100644 --- a/inc/FUiCtrlSliderTypes.h +++ b/inc/FUiCtrlSliderTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlSliderTypes.h - * @brief This is the header file for the enumerations of the Slider class. + * @brief This is the header file for the enumerations of the %Slider class. * * This header files contains the declarations of the enumerations of the Slider class. * diff --git a/inc/FUiCtrlSplitPanel.h b/inc/FUiCtrlSplitPanel.h index 47e564d..08602cd 100644 --- a/inc/FUiCtrlSplitPanel.h +++ b/inc/FUiCtrlSplitPanel.h @@ -63,9 +63,11 @@ public: , __pFirstPanel(null) , __pSecondPanel(null){} - bool Initialize(void); + bool Initialize(void); virtual result OnInitializing(void); virtual result OnTerminating(void); + virtual void OnDividerPositionChanged(Tizen::Ui::Controls::SplitPanel& source, int position){}; + virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& source) {}; private: Tizen::Ui::Controls::SplitPanel* __pSplitPanel; @@ -102,9 +104,11 @@ SplitPanelSample::OnInitializing(void) // Creates instances of Panel __pFirstPanel = new (std::nothrow) Panel(); __pFirstPanel->Construct(Rectangle(0, 0, 400, 480)); + __pFirstPanel->SetBackgroundColor(Color::GetColor(COLOR_ID_YELLOW)); __pSecondPanel = new (std::nothrow) Panel(); __pSecondPanel->Construct(Rectangle(0, 0, 400, 480)); + __pSecondPanel->SetBackgroundColor(Color::GetColor(COLOR_ID_RED)); //Sets the divider position to the slit panel __pSplitPanel->SetDividerPosition(400); @@ -163,10 +167,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::Rectangle instance. + * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::Rectangle instance * @param[in] splitPanelDividerStyle The divider style of the %SplitPanel control * @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n - * The specified divider direction determines the divider is vertical or horizontal. + * The specified divider direction determines whether the divider is vertical or horizontal. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -178,10 +182,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::FloatRectangle instance. + * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::FloatRectangle instance * @param[in] splitPanelDividerStyle The divider style of the %SplitPanel control * @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n - * The specified divider direction determines the divider is vertical or horizontal. + * The specified divider direction determines whether the divider is vertical or horizontal. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -189,7 +193,7 @@ public: /** - * Adds a ISplitPanelEventListener instance. @n + * Adds an ISplitPanelEventListener instance. @n * The added listener listens to events on the context of the specified event dispatcher when they are fired. * * @since 2.0 @@ -201,7 +205,7 @@ public: result AddSplitPanelEventListener(ISplitPanelEventListener& listener); /** - * Adds a ISplitPanelEventListenerF instance. @n + * Adds an ISplitPanelEventListenerF instance. @n * The added listener listens to events on the context of the specified event dispatcher when they are fired. * * @since 2.1 @@ -213,7 +217,7 @@ public: result AddSplitPanelEventListener(ISplitPanelEventListenerF& listener); /** - * Removes a ISplitPanelEventListener instance. @n + * Removes an ISplitPanelEventListener instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.0 @@ -225,7 +229,7 @@ public: result RemoveSplitPanelEventListener(ISplitPanelEventListener& listener); /** - * Removes a ISplitPanelEventListenerF instance. @n + * Removes an ISplitPanelEventListenerF instance. @n * The removed listener cannot listen to events when they are fired. * * @since 2.1 @@ -243,9 +247,9 @@ public: * * @return An error code * @param[in] pControl The control to set - * @param[in] paneOrder The order of pane. @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n - * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when its direction is - * @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL. + * @param[in] paneOrder The order of the pane @n @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n + * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when its direction is + * @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @remarks The %SplitPanel control must contain exactly two panes and the user can change their relative sizes. @@ -257,13 +261,13 @@ public: * * @since 2.0 * - * @return The control at the specified pane order of the %SplitPanel @n - * @c null, if there is no panel. - * @param[in] paneOrder The order of pane. @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n - * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when - * its direction is @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL. + * @return The control at the specified pane order of the %SplitPanel, @n + * else @c null if there is no panel + * @param[in] paneOrder The order of pane @n @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n + * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when + * its direction is @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. * @remarks The specific error code can be accessed using the GetLastResult() method. */ Control* GetPane(SplitPanelPaneOrder paneOrder) const; @@ -274,10 +278,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] position The position of divider + * @param[in] position The position of the divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The divider position must be reset when the orientation of the form is changed. * @see GetDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -292,10 +298,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] position The position of divider + * @param[in] position The position of the divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The divider position must be reset when the orientation of the form is changed. * @see GetDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -335,15 +343,17 @@ public: float GetDividerPositionF(void) const; /** - * Sets the divider maximum position of the control. + * Sets the maximum divider position of the control. * * @since 2.0 * * @return An error code - * @param[in] position The position of divider. + * @param[in] position The position of the divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The maximum divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The maximum divider position must be reset when the orientation of the form is changed. * @see GetMaximumDividerPosition() * @see SetMinimumDividerPosition() * @see GetMinimumDividerPosition() @@ -351,15 +361,17 @@ public: result SetMaximumDividerPosition(int position); /** - * Sets the divider maximum position of the control. + * Sets the maximum divider position of the control. * * @since 2.1 * * @return An error code - * @param[in] position The position of divider. + * @param[in] position The position of the divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The maximum divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The maximum divider position must be reset when the orientation of the form is changed. * @see GetMaximumDividerPosition() * @see SetMinimumDividerPosition() * @see GetMinimumDividerPosition() @@ -371,7 +383,7 @@ public: * * @since 2.0 * - * @return The maximum divider position of the control. + * @return The maximum divider position of the control * @see SetMaximumDividerPosition() * @see SetMinimumDividerPosition() * @see GetMinimumDividerPosition() @@ -383,7 +395,7 @@ public: * * @since 2.1 * - * @return The maximum divider position of the control. + * @return The maximum divider position of the control * @see SetMaximumDividerPosition() * @see SetMinimumDividerPosition() * @see GetMinimumDividerPosition() @@ -396,10 +408,12 @@ public: * @since 2.0 * * @return An error code - * @param[in] position The position of divider. + * @param[in] position The position of divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The minimum divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The minimum divider position must be reset when the orientation of the form is changed. * @see GetMinimumDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -412,10 +426,12 @@ public: * @since 2.1 * * @return An error code - * @param[in] position The position of divider. + * @param[in] position The position of the divider * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @remarks This Api sets the value to current orientation. The minimum divider position must be reset when the orientation of the form is changed. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @remarks + * - This API sets the value to the current orientation. + * - The minimum divider position must be reset when the orientation of the form is changed. * @see GetMinimumDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -427,7 +443,7 @@ public: * * @since 2.0 * - * @return The minimum divider position of the control. + * @return The minimum divider position of the control * @see SetMinimumDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -439,7 +455,7 @@ public: * * @since 2.1 * - * @return The minimum divider position of the control. + * @return The minimum divider position of the control * @see SetMinimumDividerPosition() * @see SetMaximumDividerPosition() * @see GetMaximumDividerPosition() @@ -452,7 +468,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] paneOrder The order of pane. + * @param[in] paneOrder The order of the pane * @see IsPaneMaximized() */ result MaximizePane(SplitPanelPaneOrder paneOrder); diff --git a/inc/FUiCtrlSplitPanelTypes.h b/inc/FUiCtrlSplitPanelTypes.h index c320b29..3ece1e6 100644 --- a/inc/FUiCtrlSplitPanelTypes.h +++ b/inc/FUiCtrlSplitPanelTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlSplitPanelTypes.h - * @brief This is the header file for the enumerations of the SplitPanel class. + * @brief This is the header file for the %SplitPanel enumerations. * * This header file contains the declarations of the enumerations of the SplitPanel class. * diff --git a/inc/FUiCtrlTab.h b/inc/FUiCtrlTab.h index 8136dc6..10b4512 100644 --- a/inc/FUiCtrlTab.h +++ b/inc/FUiCtrlTab.h @@ -63,10 +63,12 @@ class _PublicActionEvent; * item of %Tab control consists of its text string and optional bitmap image. * Items can be added to an itemlist of the tab model with AddItem(). Items can * be inserted into an itemlist by InsertItemAt(), updated into an itemlist by SetItemAt(), - * removed from an itemlist by RemoveItemAt(), etc. It is possible to customize the + * removed from an itemlist by RemoveItemAt(), and so on. It is possible to customize the * background image of the tab shelf, and the image of the currently selected tab item. * A badge icon can also be used to give more information for each tab item. * + * The following example demonstrates how to use the %Tab class. + * * Example: * * @image html ui_controls_tab.png @@ -197,12 +199,14 @@ public: * @param[in] actionId The action ID for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. @n - * The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. - * @remarks This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. @n + * The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. * @endif */ result AddItem(const Tizen::Base::String& text, int actionId); @@ -221,13 +225,15 @@ public: * @param[in] actionId The specified @c actionId for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. @n - * The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. @n - * This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. - * @remarks If the size of bitmap is greater than the default size , the bitmap is scaled down. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. @n + * The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. + * - If the size of bitmap is greater than the default size , the bitmap is scaled down. * @endif */ result AddItem(const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId); @@ -245,13 +251,15 @@ public: * @param[in] actionId The specified @c actionId for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. @n - * The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. @n - * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n - * If the size of the bitmap is greater than the default size, the bitmap is scaled down. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. @n + * The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. + * - If the size of the bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result AddItem(const Tizen::Graphics::Bitmap& icon, int actionId); @@ -270,12 +278,14 @@ public: * @param[in] actionId The specified @c actionId for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. @n - * The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. - * @remarks This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. @n + * The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. * @endif */ result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); @@ -295,13 +305,15 @@ public: * @param[in] actionId The specified @c actionId for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. - * @remarks The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. @n - * This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. @n - * If the size of bitmap is greater than the default size, the bitmap is scaled down. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. + * - The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. + * - If the size of bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result InsertItemAt(int index, const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId); @@ -320,13 +332,15 @@ public: * @param[in] actionId The specified @c actionId for this item * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. - * @exception E_SYSTEM A system error has occurred, or @n - * the total number of items has exceed the %Tab control's maximum item count. - * @remarks The @c actionId range is @c 0-999. - * @remarks The maximum number of items for %Tab with text style is @c 9. @n - * The maximum number of items for icon style %Tab is @c 8. @n - * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n - * If the size of bitmap is greater than the default size, the bitmap is scaled down. + * @exception E_SYSTEM Either of the following conditions has occurred: + * - A system error has occurred. + * - The total number of items has exceed the %Tab control's maximum item count. + * @remarks + * - The @c actionId range is @c 0-999. + * - The maximum number of items for %Tab with text style is @c 9. @n + * The maximum number of items for icon style %Tab is @c 8. + * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. + * - If the size of bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); @@ -346,8 +360,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks The @c actionId range is @c 0-999. @n - * This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. + * @remarks + * - The @c actionId range is @c 0-999. + * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. * @endif */ result SetItemAt(int index, const Tizen::Base::String& text, int actionId); @@ -368,9 +383,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks The @c actionId range is @c 0-999. @n - * This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. @n - * If the size of bitmap is greater than the default size, the bitmap is scaled down. + * @remarks + * - The @c actionId range is @c 0-999. + * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. + * - If the size of bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result SetItemAt(int index, const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId); @@ -390,9 +406,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks The @c actionId range is @c 0-999. @n - * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n - * If the size of bitmap is greater than the default size, the bitmap is scaled down. + * @remarks + * - The @c actionId range is @c 0-999. + * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. + * - If the size of bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); @@ -443,8 +460,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c actionId is out of range. * @exception E_SYSTEM A system error has occurred. - * @remarks The @c actionId range is @c 0-999. @n - * If the size of bitmap is greater than the default size, the bitmap is scaled down. + * @remarks + * - The @c actionId range is @c 0-999. + * - If the size of bitmap is greater than the default size, the bitmap is scaled down. * @endif */ result SetBadgeIcon(int actionId, const Tizen::Graphics::Bitmap* pBadgeIcon); @@ -675,8 +693,9 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The background bitmap is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks The background bitmap must use the 9-patched bitmap. - * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted. + * @remarks + * - The background bitmap must use the 9-patched bitmap. + * @remarks - When a user navigates the user interface using the directional keys, the focused UI control is highlighted. * @endif */ result SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); diff --git a/inc/FUiCtrlTabBar.h b/inc/FUiCtrlTabBar.h index 3994791..99fd6d9 100644 --- a/inc/FUiCtrlTabBar.h +++ b/inc/FUiCtrlTabBar.h @@ -191,7 +191,6 @@ public: * Optimal Size of UI Controls. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. */ result Construct(int x, int y, int width); @@ -209,7 +208,6 @@ public: * Optimal Size of UI Controls. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. */ result Construct(float x, float y, float width); @@ -251,8 +249,10 @@ public: * @exception E_INVALID_ARG A specified input parameter is invalid. @n * The specified @c item is not constructed. * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. - * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n - * The specified @c index is either greater than or equal to the number of items or is less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified @c index is out of the range of the data structure. + * - The specified @c index is greater than or equal to the number of items. + * - The specified @c index is less than @c 0. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. * @remarks @@ -343,8 +343,10 @@ public: * @return An error code * @param[in] index The index of the item * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n - * The specified @c index is either greater than or equal to the number of items or is less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified @c index is out of the range of the data structure. + * - The specified @c index is greater than or equal to the number of items. + * - The specified @c index is less than @c 0. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. * @remarks If the currently selected item is removed, the next item is selected automatically. @@ -389,8 +391,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n * The specified @c item is not constructed. - * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n - * The specified @c index is either greater than or equal to the number of items or is less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified @c index is out of the range of the data structure. + * - The specified @c index is greater than or equal to the number of items. + * - The specified @c index is less than @c 0. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. * @remarks @@ -408,8 +412,10 @@ public: * @return An error code * @param[in] index The index of the item to select * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified @c index is not within the range of the data structure. @n - * The specified @c index is either greater than or equal to the number of items or is less than @c 0. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified @c index is out of the range of the data structure. + * - The specified @c index is greater than or equal to the number of items. + * - The specified @c index is less than @c 0. * @exception E_INVALID_STATE This instance is in an invalid state. * @exception E_SYSTEM A system error has occurred. */ diff --git a/inc/FUiCtrlTabBarItem.h b/inc/FUiCtrlTabBarItem.h index 31baef4..31e5471 100644 --- a/inc/FUiCtrlTabBarItem.h +++ b/inc/FUiCtrlTabBarItem.h @@ -77,8 +77,7 @@ public: * @param[in] actionId The action ID of this item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The @c actionId of the specified item must be greater than or equal to @c 0. - * @exception E_INVALID_STATE This instance is in an invalid state. + * The @c actionId of the specified item is not greater than or equal to @c 0. */ result Construct(const Tizen::Base::String& text, int actionId); diff --git a/inc/FUiCtrlTableView.h b/inc/FUiCtrlTableView.h index 023eec0..900cd9e 100644 --- a/inc/FUiCtrlTableView.h +++ b/inc/FUiCtrlTableView.h @@ -114,8 +114,8 @@ TableViewSample::OnInitializing(void) // Creates an instance of TableView __pTableView = new TableView(); __pTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); - __pTableView->SetItemProvider(*this); - __pTableView->AddTableViewItemEventListener(this); + __pTableView->SetItemProvider(this); + __pTableView->AddTableViewItemEventListener(*this); // Adds the TableView to the form AddControl(__pTableView); @@ -266,13 +266,16 @@ public: * @since 2.0 * * @return An error code - * @param[in] rect An instance of the Graphics::Rectangle class - * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %TableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value. + * @param[in] rect An instance of the Graphics::Rectangle class + * This instance represents the x and y coordinates of the left top corner of the created + * %TableView along with the width and height. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %TableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - Either the rect.width or rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -283,13 +286,16 @@ public: * @since 2.1 * * @return An error code - * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n - * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height. - * @param[in] itemDivider Set to @c true to display an item divider, @n - * else @c false - * @param[in] scrollStyle The style of %TableView scroll bar style - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value. + * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n + * This instance represents the x and y coordinates of the left top corner of the created + * %TableView along with the width and height. + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle The style of %TableView scroll bar style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - Either the @c rect.width or @c rect.height parameter has a negative value. * */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); @@ -325,7 +331,7 @@ public: * * @since 2.0 * - * @see ITableViewViewItemEventListener::OnTableViewItemReordered() + * @see ITableViewItemEventListener::OnTableViewItemReordered() */ void BeginReorderingMode(void); @@ -334,12 +340,12 @@ public: * * @since 2.0 * - * @see ITableViewViewItemEventListener::OnTableViewItemReordered() + * @see ITableViewItemEventListener::OnTableViewItemReordered() */ void EndReorderingMode(void); /** - * Returns whether the %TableView control is in reordering mode or not. + * Checks whether the %TableView control is in reordering mode. * * @since 2.0 * @@ -356,8 +362,8 @@ public: * * @return An error code * @param[in] listener The event listener to add - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The listener is already added. + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. */ result AddTableViewItemEventListener(ITableViewItemEventListener& listener); @@ -368,10 +374,10 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The listener is not found. */ result RemoveTableViewItemEventListener(ITableViewItemEventListener& listener); @@ -382,10 +388,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. * @remarks The specified listener should be allocated in heap memory. */ result AddFastScrollListener(IFastScrollListener& listener); @@ -397,10 +403,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. */ result RemoveFastScrollListener(IFastScrollListener& listener); @@ -411,11 +417,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListener::OnScrollEndReached() * @see RemoveScrollEventListener() */ @@ -427,11 +433,11 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @return An error code + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListener::OnScrollEndReached() * @see AddScrollEventListener() */ @@ -443,12 +449,12 @@ public: * * @since 2.1 * - * @return An error code - * @param[in] listener The event listener to add - * @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_OBJ_ALREADY_EXIST The listener is already added. - * @remarks The specified listener should be allocated in heap memory. + * @return An error code + * @param[in] listener The event listener to add + * @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_OBJ_ALREADY_EXIST The listener is already added. + * @remarks The specified listener should be allocated in heap memory. * @see IScrollEventListenerF::OnScrollEndReached() * @see RemoveScrollEventListenerF() */ @@ -461,10 +467,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] listener The event listener to remove - * @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_OBJ_NOT_FOUND The listener is not found. + * @param[in] listener The event listener to remove + * @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_OBJ_NOT_FOUND The listener is not found. * @see IScrollEventListenerF::OnScrollEndReached() * @see AddScrollEventListenerF() */ @@ -475,13 +481,13 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] text The text of the index - * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @return An error code + * @param[in] text The text of the index + * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); @@ -514,15 +520,15 @@ public: * @since 2.0 * * @return An error code - * @param[in] itemIndex The targeted item index - * @param[in] itemAlignment The item alignment - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @param[in] itemIndex The targeted item index + * @param[in] itemAlignment The item alignment + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - This method does not work inside the ITableViewItemProvider callback. * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of - * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result ScrollToItem(int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); @@ -532,17 +538,17 @@ public: * @since 2.0 * * @return An error code - * @param[in] itemIndex The item index to check - * @param[in] check Set to @c true to select the item, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. + * @param[in] itemIndex The item index to check + * @param[in] check Set to @c true to select the item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation. * @remarks * - This method works only when the annex style of the item allows selection. * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of - * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemChecked(int itemIndex, bool check); @@ -551,15 +557,15 @@ public: * * @since 2.0 * - * @return @c true if the item is selected, @n - * else @c false - * @param[in] itemIndex The item itemIndex - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the item is selected, @n + * else @c false + * @param[in] itemIndex The item itemIndex + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @remarks * - This method returns @c false, if the annex style of the item does not allow selection. * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of - * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemChecked(int itemIndex) const; @@ -569,32 +575,32 @@ public: * @since 2.0 * * @return An error code - * @param[in] itemIndex The item index - * @param[in] enable Set to @c true to enable the specified item, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @param[in] itemIndex The item index + * @param[in] enable Set to @c true to enable the specified item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - This method does not work during the ITableViewItemProvider call-back procedure. * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of - * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ result SetItemEnabled(int itemIndex, bool enable); /** - * Returns whether the item at the specified index is enabled or disabled. + * Checks whether the item at the specified index is enabled. * * @since 2.0 * - * @return @c true if the item is enabled, @n - * else @c false - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. * @remarks * - This method should be called only after %TableView items are created. - * - If this method needs to be called early in the lifecycle of the + * - If this method needs to be called early in the lifecycle of * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ bool IsItemEnabled(int itemIndex) const; @@ -619,25 +625,26 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] itemIndex The item index - * @param[in] type The item to add, remove, or modify - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE A specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @return An error code + * @param[in] itemIndex The item index + * @param[in] type The item to add, remove, or modify + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks This method does not work during the ITableViewItemProvider call-back procedure. */ result RefreshItem(int itemIndex, TableViewRefreshType type); /** * Updates all items of the table view. @n - * Note that calling the %RefreshAllItems() method invokes ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() for all loaded items. + * Note that calling the %RefreshAllItems() method invokes ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() + * for all loaded items. * * @since 2.1 * - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The %TableView item provider is processing the other request. + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The %TableView item provider is processing the other request. */ result RefreshAllItems(void); @@ -647,11 +654,11 @@ public: * * @since 2.0 * - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1 * @remarks * - This method will delete all the items and recreate them, so it should not be called from the inside of - * OnTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method. + * OnTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method. * - This method should not be called from ITableViewItemProvider implementation because of recursion. * - The specific error code can be accessed using the GetLastResult() method. */ @@ -663,12 +670,12 @@ public: * @since 2.0 * * @return The item index of the item on specified position - * @param[in] position The position of the item + * @param[in] position The position of the item * @remarks * - This method returns @c -1 if no item is found at the given position. * - This method should be called only after %TableView items are created. - * - If this method needs to be called early in the lifecycle of the %TableView, - * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * - If this method needs to be called early in the lifecycle of %TableView, + * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; @@ -678,11 +685,11 @@ public: * @since 2.1 * * @return The item index of the item on specified position - * @param[in] position The position of the item + * @param[in] position The position of the item * @remarks * - This method returns @c -1 if no item is found at the given position. * - This method should be called only after %TableView items are created. - ** - If this method needs to be called early in the lifecycle of the %TableView, then UpdateTableView() method should be called + ** - If this method needs to be called early in the lifecycle of %TableView, then UpdateTableView() method should be called * explicitly (for example, during Tizen::Ui::Control::OnInitializing()). */ int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; @@ -748,15 +755,16 @@ public: ScrollInputMode GetScrollInputMode(void) const; /** - * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style. + * Scrolls the list contents by a specified number of pixels. @n + * When it is negative, it scrolls to opposite direction in current scroll style. * * @since 2.1 * * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @remarks * - If you call this method with negative @c pixel when position of scroll is already top of contents then * it will return @c E_OUT_OF_RANGE. @n @@ -766,19 +774,20 @@ public: result ScrollByPixel(int pixel); /** - * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style. + * Scrolls the list contents by a specified number of pixels. @n + * When it is negative, it scrolls to opposite direction in current scroll style. * * @since 2.1 * * @return An error code - * @param[in] pixel The amount of pixels to scroll - * @exception E_SUCCESS The method is successful. + * @param[in] pixel The amount of pixels to scroll + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_RANGE The specified @c pixel is out of range. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. * @remarks * - If you call this method with negative @c pixel when position of scroll is already top of contents then it will - * return @c E_OUT_OF_RANGE. @n - * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. + * return @c E_OUT_OF_RANGE. @n + * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE. * - This method does not work during the ITableViewItemProvider call-back procedure. */ result ScrollByPixel(float pixel); @@ -817,10 +826,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result OpenContextItem(int itemIndex); @@ -830,10 +839,10 @@ public: * @since 2.1 * * @return An error code - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified input parameter is invalid. - * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. */ result CloseContextItem(int itemIndex); @@ -844,9 +853,9 @@ public: * * @return @c true if the context item is opened, @n * else @c false - * @param[in] itemIndex The item index - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified input parameter is invalid. + * @param[in] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified input parameter is invalid. */ bool IsContextItemOpened(int itemIndex) const; diff --git a/inc/FUiCtrlTableViewContextItem.h b/inc/FUiCtrlTableViewContextItem.h index 9de6bba..b8d5f1d 100644 --- a/inc/FUiCtrlTableViewContextItem.h +++ b/inc/FUiCtrlTableViewContextItem.h @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { namespace Controls { /** * @class TableViewContextItem -* @brief This class defines common behavior for a %TableViewContextItem. +* @brief This class defines the common behavior for a %TableViewContextItem. * * @since 2.0 * diff --git a/inc/FUiCtrlTableViewGroupItem.h b/inc/FUiCtrlTableViewGroupItem.h index 2d82d0c..7c3a6f9 100644 --- a/inc/FUiCtrlTableViewGroupItem.h +++ b/inc/FUiCtrlTableViewGroupItem.h @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { namespace Controls { /** * @class TableViewGroupItem -* @brief This class defines common behavior of %TableViewGroupItem. +* @brief This class defines the common behavior of %TableViewGroupItem. * * @since 2.0 * @@ -65,7 +65,7 @@ public: * @return An error code * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ result Construct(const Tizen::Graphics::Dimension& itemSize); @@ -75,7 +75,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -88,8 +88,8 @@ public: * @since 2.0 * * @return An error code - * @param[in] portraitLayout The layout for portrait mode - * @param[in] landscapeLayout The layout for landscape mode + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -104,7 +104,7 @@ public: * @return An error code * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ result Construct(const Tizen::Graphics::FloatDimension& itemSize); @@ -114,7 +114,7 @@ public: * @since 2.1 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -127,8 +127,8 @@ public: * @since 2.1 * * @return An error code - * @param[in] portraitLayout The layout for portrait mode - * @param[in] landscapeLayout The layout for landscape mode + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. diff --git a/inc/FUiCtrlTableViewItem.h b/inc/FUiCtrlTableViewItem.h index cb6551e..4befb17 100644 --- a/inc/FUiCtrlTableViewItem.h +++ b/inc/FUiCtrlTableViewItem.h @@ -33,11 +33,11 @@ class TableViewContextItem; /** * @class TableViewItem -* @brief This class defines common behavior for a %TableViewItem. +* @brief This class defines the common behavior for a %TableViewItem. * * @since 2.0 * -* The %TableViewItem class is a base class which represents a table view item which is the unit of handling of TableView. +* The %TableViewItem class is a base class which represents a table view item which is the unit of handling TableView. * */ @@ -47,7 +47,7 @@ class _OSP_EXPORT_ TableViewItem public: /** * The object is not fully constructed after this constructor is called. @n - * For full construction, the %Construct() method must be called right after calling this constructor. + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -67,7 +67,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -79,9 +79,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -93,10 +93,10 @@ public: * @since 2.0 * * @return An error code - * @param[in] portraitLayout The layout for portrait mode - * @param[in] landscapeLayout The layout for landscape mode + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -109,7 +109,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -121,9 +121,9 @@ public: * @since 2.1 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -135,8 +135,8 @@ public: * @since 2.1 * * @return An error code - * @param[in] portraitLayout The layout for portrait mode - * @param[in] landscapeLayout The layout for landscape mode + * @param[in] portraitLayout The layout for the portrait mode + * @param[in] landscapeLayout The layout for the landscape mode * @param[in] itemSize The size of the item * @param[in] style The style of Annex * @exception E_SUCCESS The method is successful. @@ -145,19 +145,20 @@ public: result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); /** - * Sets context item that is displayed when an item is swept. + * Sets the context item that is displayed when an item is swept. * * @since 2.0 * * @return An error code * @param[in] pItem The object of TableViewContextItem - * @remarks If context item is not set, TableView() does not display context item and an item sweep event is generated when an item is swept. - * pItem must be deleted by applications when it is no longer used. + * @remarks + * - If a context item is not set, TableView() does not display the context item and an item sweep event is generated when an item is swept. + * - @c pItem must be deleted by applications when it is no longer used. */ void SetContextItem(const TableViewContextItem* pItem); /** - * Get the width of the annex area. + * Gets the width of the annex area. * * @since 2.0 * @@ -168,13 +169,13 @@ public: static int GetAnnexWidth(TableViewAnnexStyle style); /** - * Get the width of the annex area. + * Gets the width of the annex area. * * @since 2.1 * * @return The width of the annex * @param[in] style The style of the annex - * @remarks The width of the annex area is different among annex styles. + * @remarks The width of the annex area is different from the annex styles. */ static float GetAnnexWidthF(TableViewAnnexStyle style); diff --git a/inc/FUiCtrlTableViewItemBase.h b/inc/FUiCtrlTableViewItemBase.h index 3b14aa6..9286c66 100644 --- a/inc/FUiCtrlTableViewItemBase.h +++ b/inc/FUiCtrlTableViewItemBase.h @@ -34,11 +34,11 @@ namespace Tizen { namespace Ui { namespace Controls /** * @class TableViewItemBase -* @brief This class defines common behavior for a %TableViewItemBase. +* @brief This class defines the common behavior for a %TableViewItemBase. * * @since 2.0 * -* The %TableViewItemBase class is a base class which represents a table view item which is the unit of handling of TableView. +* The %TableViewItemBase class is a base class which represents a table view item which is the unit of handling TableView. * */ @@ -47,7 +47,7 @@ class _OSP_EXPORT_ TableViewItemBase { public: /** - * Sets the background image of the item which is displayed when the item is in specified state. + * Sets the background image of the item which is displayed when the item is in the specified state. * * @since 2.0 * @@ -55,13 +55,13 @@ public: * @param[in] pBitmap The background bitmap image * @param[in] status The item drawing state * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only the bitmap is displayed. */ result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); /** - * Sets the background color of the item which is displayed when the item is in specified state. + * Sets the background color of the item which is displayed when the item is in the specified state. * * @since 2.0 * @@ -91,21 +91,23 @@ public: * * @return An error code * @param[in] pControl The child control to select individually - * @param[in] enable Set to @c true to enable the individual selection of a control, else @c false + * @param[in] enable Set to @c true to enable the individual selection of a control, @n + * else @c false * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ result SetIndividualSelectionEnabled(const Tizen::Ui::Control* pControl, bool enable); /** - * Returns whether the individual selection of a control is enabled or not. + * Checks whether the individual selection of a control is enabled or not. * * @since 2.0 * - * @return @c true if the individual selection of a control is enabled, else @c false - * @param[in] pControl The target control. + * @return @c true if the individual selection of a control is enabled, @n + * else @c false + * @param[in] pControl The target control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ bool IsIndividualSelectionEnabled(const Tizen::Ui::Control* pControl); diff --git a/inc/FUiCtrlTableViewSimpleGroupItem.h b/inc/FUiCtrlTableViewSimpleGroupItem.h index ce66dcb..79160f0 100644 --- a/inc/FUiCtrlTableViewSimpleGroupItem.h +++ b/inc/FUiCtrlTableViewSimpleGroupItem.h @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { namespace Controls { /** * @class TableViewSimpleGroupItem -* @brief This class defines common behavior of %TableViewSimpleGroupItem. +* @brief This class defines the common behavior of %TableViewSimpleGroupItem. * * @since 2.0 * @@ -65,7 +65,7 @@ public: * @return An error code * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ result Construct(const Tizen::Graphics::Dimension& itemSize); @@ -75,7 +75,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -90,7 +90,7 @@ public: * @return An error code * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. */ result Construct(const Tizen::Graphics::FloatDimension& itemSize); @@ -100,7 +100,7 @@ public: * @since 2.1 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. diff --git a/inc/FUiCtrlTableViewSimpleItem.h b/inc/FUiCtrlTableViewSimpleItem.h index da64bd1..482eae6 100644 --- a/inc/FUiCtrlTableViewSimpleItem.h +++ b/inc/FUiCtrlTableViewSimpleItem.h @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { namespace Controls { /** * @class TableViewSimpleItem - * @brief This class defines common behavior for a %TableViewSimpleItem. + * @brief This class defines the common behavior for a %TableViewSimpleItem. * * @since 2.0 * @@ -45,7 +45,7 @@ class _OSP_EXPORT_ TableViewSimpleItem public: /** * The object is not fully constructed after this constructor is called. @n - * For full construction, the %Construct() method must be called right after calling this constructor. + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -65,7 +65,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -77,9 +77,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -92,7 +92,7 @@ public: * * @return An error code * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -104,9 +104,9 @@ public: * @since 2.1 * * @return An error code - * @param[in] layout The layout for both of the portrait and landscape modes + * @param[in] layout The layout for both the portrait and landscape modes * @param[in] itemSize The size of the item - * @param[in] style The style of Annex + * @param[in] style The style of the annex * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. */ @@ -118,9 +118,9 @@ public: * @since 2.0 * * @return An error code - * @param[in] text The text string to add + * @param[in] text The text string to add * @param[in] pBitmap The bitmap image to display - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. */ result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); @@ -156,7 +156,7 @@ public: * @return An error code * @param[in] size The size of the text * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The given text size is less than 1. + * @exception E_INVALID_ARG The given text size is less than @c 1. * @see GetTextSize() */ result SetTextSize(int size); @@ -166,7 +166,7 @@ public: * * @since 2.0 * - * @return The size of the text, + * @return The size of the text * @see SetTextSize() */ int GetTextSize(void) const; diff --git a/inc/FUiCtrlTableViewTypes.h b/inc/FUiCtrlTableViewTypes.h index eecbd6b..628a96d 100644 --- a/inc/FUiCtrlTableViewTypes.h +++ b/inc/FUiCtrlTableViewTypes.h @@ -17,7 +17,7 @@ /** * @file FUiCtrlTableViewTypes.h -* @brief This is the header file for the TableView enumerations. +* @brief This is the header file for the %TableView enumerations. * * This header file contains the declarations of the TableView enumerations. */ diff --git a/inc/FUiCtrlTextBox.h b/inc/FUiCtrlTextBox.h index 6c5dd33..af047ba 100644 --- a/inc/FUiCtrlTextBox.h +++ b/inc/FUiCtrlTextBox.h @@ -236,7 +236,8 @@ public: * * @return An error code * @param[in] autoLinks The auto-link mask @n - * Multiple link types can be combined using the bitwise OR operator (see Tizen::Base::Utility::LinkType). @n For more information, + * Multiple link types can be combined using the bitwise OR operator (see Tizen::Base::Utility::LinkType). @n + * For more information, * see AutoLink Detection. * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -327,7 +328,7 @@ public: result Clear(void); /** - * Gets the number of the lines contained in the %TextBox control. + * Gets the number of lines contained in the %TextBox control. * * @since 2.0 * @@ -613,9 +614,9 @@ public: * * @since 2.0 * - * @return A bitwise combination of Tizen::Ui::Controls::TextBoxTextStyle - * @see SetTextStyle() - * @see TextBoxTextStyle + * @return A bitwise combination of Tizen::Ui::Controls::TextBoxTextStyle + * @see SetTextStyle() + * @see TextBoxTextStyle */ unsigned long GetTextStyle(void) const; @@ -632,7 +633,9 @@ public: * @param[in] style The text style @n * Multiple styles can be combined using the bitwise OR operator(see TextBoxTextStyle). * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified font typeface is not supported. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - A specified input parameter is invalid. + * - The specified font typeface is not supported. * @exception E_SYSTEM A system error has occurred. * @remarks The specified font typeface must be one of the system fonts. @n * @c italic and @c bold cannot be applied at the same time. If the specified style mask contains both @c italic and @c bold, @c italic will @@ -649,13 +652,13 @@ public: * * @since 2.0 * - * @return An error code - * @param[in] style The text style @n - * Multiple styles can be combined using the bitwise OR operator (see Tizen::Ui::Controls::TextBoxTextStyle). - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @see GetTextStyle() - * @see TextBoxTextStyle + * @return An error code + * @param[in] style The text style @n + * Multiple styles can be combined using the bitwise OR operator (see Tizen::Ui::Controls::TextBoxTextStyle). + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @see GetTextStyle() + * @see TextBoxTextStyle */ result SetTextStyle(unsigned long style); @@ -732,7 +735,7 @@ public: * * @return The color of the %TextBox control, @n * else RGBA (0,0,0,0) if an error occurs - * @param[in] status The state of the %TextBox control + * @param[in] status The state of the %TextBox control * @exception E_SUCCESS The method is successful. * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetColor() @@ -764,7 +767,6 @@ public: * @param[in] bitmap The background bitmap * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @see SetBackgroundColor() */ result SetBackgroundBitmap(TextBoxStatus status, const Tizen::Graphics::Bitmap& bitmap); @@ -801,7 +803,7 @@ public: * * @since 2.0 * - * @param[in] listener The event listener to add + * @param[in] listener The event listener to add * @remarks Programmatically modifying the text selection does not cause the text block selection event to fire. * @see RemoveTextBlockEventListener() */ diff --git a/inc/FUiCtrlTimePicker.h b/inc/FUiCtrlTimePicker.h index 0bc1d24..f7a29d2 100644 --- a/inc/FUiCtrlTimePicker.h +++ b/inc/FUiCtrlTimePicker.h @@ -220,7 +220,7 @@ public: void RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); /** - * Initializes this instance of %TimePicker to the current date and time in wall time mode. + * Initializes this instance of %TimePicker to the current date and time in the wall time mode. * * @since 2.0 * @@ -228,10 +228,11 @@ public: * @param[in] title The title * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible - * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. @n - * The optimal size of the control is defined in - * Optimal Size of UI Controls. + * @remarks + * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible + * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. @n + * - The optimal size of the control is defined in + * Optimal Size of UI Controls. */ result Construct(const Tizen::Base::String& title = L""); diff --git a/inc/FUiCustomControlBase.h b/inc/FUiCustomControlBase.h index 1bcadf0..73b85d7 100644 --- a/inc/FUiCustomControlBase.h +++ b/inc/FUiCustomControlBase.h @@ -72,11 +72,12 @@ public: * @return An error code * @param[in] oldRect The old position and size values of the control * @param[in] newRect The new position and size values of the control - * @remarks If the method returns an exception, the resulting exception - * is propagated and the control's size is unchanged. @n - * Provide control specific exceptions. - * @see Tizen::Ui::Control::SetBounds() - * @see Tizen::Ui::Control::SetSize() + * @remarks + * - If the method returns an exception, the resulting exception + * is propagated and the control's size is unchanged. + * - Provide control specific exceptions. + * @see Control::SetBounds() + * @see Control::SetSize() * @endif */ virtual result PrepareBoundsChange(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); @@ -91,10 +92,10 @@ public: * @deprecated This class is deprecated. Instead of using this class, use the Container class. * @since 2.0 * - * @return A Boolean flag that indicates whether the specified @c width - * and @ height are supported - * @param[in, out] width The width that needs to evaluate - * @param[in, out] height The height that needs to evaluate + * @return The Boolean flag that indicates whether the specified @c width + * and @c height are supported + * @param[in, out] width The width to evaluate + * @param[in, out] height The height to evaluate * @endif */ virtual bool EvaluateSize(int& width, int& height); @@ -102,7 +103,8 @@ public: protected: /** * @if OSPDEPREC - * The object is not fully constructed after this constructor is called. For full construction, one of the %Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, one of the Construct() methods must be called right after calling this constructor. * * @brief [Deprecated] * @deprecated This class is deprecated. Instead of using this class, use the Container class. @@ -128,8 +130,9 @@ protected: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @remarks + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() * @endif */ @@ -153,11 +156,11 @@ protected: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @remarks + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() + * @see Container::GetLayoutN() * @endif */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -181,12 +184,11 @@ protected: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. * @exception E_SYSTEM A system error has occurred. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @remarks If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() - * @see Tizen::Ui::Container::GetPortraitLayoutN() - * @see Tizen::Ui::Container::GetLandscapeLayoutN() + * @see Container::GetLayoutN() + * @see Container::GetPortraitLayoutN() + * @see Container::GetLandscapeLayoutN() * @endif */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); diff --git a/inc/FUiDataBindingContext.h b/inc/FUiDataBindingContext.h index c47142d..e6c28c1 100644 --- a/inc/FUiDataBindingContext.h +++ b/inc/FUiDataBindingContext.h @@ -202,7 +202,7 @@ public: * * @return An error code * @param[in] bindingId The binding ID - * @param[in] controlName The name of target property owner + * @param[in] controlName The name of the target property owner * @param[in] propertyName The target property name * @param[in] dataSource The data binding source * @param[in] sourceType The data type of the @c dataSource @@ -211,18 +211,21 @@ public: * @param[in] pListener The data binding listener * @param[in] pValidator The data validator * @param[in] pTransformer The data transformer - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @exception E_INVALID_ARG 1. sourceType is not of a supported type. - 2. flow is not of a supported type. - 3. trigger is not of a supported type. - * @exception E_OBJ_NOT_FOUND 1. The control named controlName does not exist. - 2. The parameter "propertyName" is not found in control properties. - * @exception E_UNSUPPORTED_FORMAT The given transformer does not supported changing source type to target type. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c sourceType is not of a supported type. + * - The flow is not of a supported type. + * - The trigger is not of a supported type. + * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred: + * - The control named @c controlName does not exist. + * - The parameter "propertyName" is not found in the control properties. + * @exception E_UNSUPPORTED_FORMAT The given transformer does not support changing source type to target type. * @exception E_UNSUPPORTED_OPERATION In this system, binding with the given trigger and flow is not supported. - * @remarks The propertyName parameter is defined in "UI Builder Guide". @n - * There is no duplication check for each binding ID. @n - * Please use a unique binding ID for each binding setting. + * @remarks + * - The propertyName parameter is defined in "UI Builder Guide". @n + * - There is no duplication check for each binding ID. @n + * Please use a unique binding ID for each binding setting. */ result Bind(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName, const Tizen::Base::String& propertyName, Tizen::Base::Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, DataBindingTrigger trigger, const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, const IDataBindingDataTransformer* pTransformer = null); @@ -236,9 +239,9 @@ public: * @param[in] pListener The data binding listener * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @exception E_OBJ_NOT_FOUND The given binding ID is not registered. - * @exception E_INVALID_ARG The given listener is not valid. - * @remarks If you give pListener parameter as 'null', the existing dataBindingEventListener will be removed. + * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered. + * @exception E_INVALID_ARG The specified @c pListener is not valid. + * @remarks If you set @c pListener as @c null, the existing dataBindingEventListener is removed. */ result SetDataBindingEventListener(const Tizen::Base::String& bindingId, IDataBindingListener* pListener); @@ -262,7 +265,7 @@ public: * @param[in] bindingId The binding ID * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @exception E_OBJ_NOT_FOUND The given binding ID is not registered. + * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered. */ result Unbind(const Tizen::Base::String& bindingId); @@ -293,12 +296,12 @@ public: * @param[in] destType The destination type * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @exception E_OBJ_NOT_FOUND The given binding ID is not registered. - * @exception E_INVALID_OPERATION The given binding's trigger is not 'explicit' type. - * @exception E_INVALID_ARG The specified @c destType is not supported in binding ID. + * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered. + * @exception E_INVALID_OPERATION The given binding's trigger is not of the 'explicit' type. + * @exception E_INVALID_ARG The specified @c destType is not supported in the binding ID. * @remarks * - If you have set a data binding listener, @n - * this method is returned after that listener is called. + * this method is returned after that listener is called. * - The behavior of this method is dependent on the system default locale setting. * @see IDataBindingListener */ diff --git a/inc/FUiDataBindingTypes.h b/inc/FUiDataBindingTypes.h index 4185c68..ebb3784 100644 --- a/inc/FUiDataBindingTypes.h +++ b/inc/FUiDataBindingTypes.h @@ -37,8 +37,8 @@ namespace Tizen { namespace Ui enum DataBindingFlow { DATA_BINDING_FLOW_ONE_WAY = 0, /**< The data flow is one way from source to target */ - DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE = 1, /**< The data flow is one way from target to source */ - DATA_BINDING_FLOW_TWO_WAY = 2 /**< The data flow is two way */ + DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE = 1, /**< The data flow is one way from target to source */ + DATA_BINDING_FLOW_TWO_WAY = 2 /**< The data flow is two way */ }; /** @@ -50,7 +50,7 @@ enum DataBindingFlow */ enum DataBindingTrigger { - DATA_BINDING_TRIGGER_IMMEDIATE = 0, /**< Immediate trigger */ + DATA_BINDING_TRIGGER_IMMEDIATE = 0, /**< Immediate trigger */ DATA_BINDING_TRIGGER_EXPLICIT = 1, /**< Explicit trigger */ }; @@ -64,18 +64,18 @@ enum DataBindingTrigger enum DataBindingDataType { DATA_BINDING_DATA_TYPE_BOOLEAN = 0, /**< Boolean type */ - DATA_BINDING_DATA_TYPE_COLOR = 1, /**< Color type */ - DATA_BINDING_DATA_TYPE_DIMENSION = 2, /**< Dimension type */ - DATA_BINDING_DATA_TYPE_DOUBLE = 3, /**< Double type */ - DATA_BINDING_DATA_TYPE_FLOAT = 4, /**< Float type */ - DATA_BINDING_DATA_TYPE_INTEGER = 5, /**< Integer type */ - DATA_BINDING_DATA_TYPE_LONG = 6, /**< Long type */ - DATA_BINDING_DATA_TYPE_POINT = 7, /**< Point type */ + DATA_BINDING_DATA_TYPE_COLOR = 1, /**< Color type */ + DATA_BINDING_DATA_TYPE_DIMENSION = 2, /**< Dimension type */ + DATA_BINDING_DATA_TYPE_DOUBLE = 3, /**< Double type */ + DATA_BINDING_DATA_TYPE_FLOAT = 4, /**< Float type */ + DATA_BINDING_DATA_TYPE_INTEGER = 5, /**< Integer type */ + DATA_BINDING_DATA_TYPE_LONG = 6, /**< Long type */ + DATA_BINDING_DATA_TYPE_POINT = 7, /**< Point type */ DATA_BINDING_DATA_TYPE_RECTANGLE = 8, /**< Rectangle type */ - DATA_BINDING_DATA_TYPE_STRING = 9, /**< String type */ - DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION = 10, /**< Dimension type in floating-point number @b Since: @b 2.1 */ - DATA_BINDING_DATA_TYPE_FLOAT_POINT = 11, /**Grid Layout. * * @code @@ -141,7 +141,8 @@ class _OSP_EXPORT_ GridLayout { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 * @@ -165,8 +166,10 @@ public: * @param[in] rowCount The number of rows * @param[in] columnCount The number of columns * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified index is out of range. @n - * Either @c rowCount or @c columnCount is @c 0 or negative. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified index is out of the valid range. + * - Either @c rowCount or @c columnCount is @c 0. + * - Either @c rowCount or @c columnCount is negative. * @exception E_SYSTEM A system error has occurred. */ result Construct(int rowCount, int columnCount); @@ -212,7 +215,7 @@ public: * @param[in] stretchable Set to @c true to make the column stretchable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetColumnStretchable(int columnIndex, bool stretchable); @@ -227,7 +230,7 @@ public: * @param[in] shrinkable Set to @c true to make the column shrinkable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetColumnShrinkable(int columnIndex, bool shrinkable); @@ -242,7 +245,7 @@ public: * @param[in] collapsed Set to @c true to make the column collapsible, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetColumnCollapsed(int columnIndex, bool collapsed); @@ -253,7 +256,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] stretchable Set to @c true to set all columns as stretchable, @n + * @param[in] stretchable Set to @c true to set all the columns as stretchable, @n * else @c false * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -266,7 +269,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] shrinkable Set to @c true to set all columns as shrinkable, @n + * @param[in] shrinkable Set to @c true to set all the columns as shrinkable, @n * else @c false * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. @@ -280,13 +283,14 @@ public: * * @return An error code * @param[in] columnIndex The column index - * @param[in] space An @c int representing the space + * @param[in] space The @c int that represents the space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. - * @remarks This method does not perform any operation if the value of @c columnIndex is 0. - * @remarks The column spacing cannot be applied to the first column. + * @remarks + * - This method does not perform any operation if the value of @c columnIndex is @c 0. + * - The column spacing cannot be applied to the first column. */ result SetColumnSpacing(int columnIndex, int space); @@ -297,13 +301,14 @@ public: * * @return An error code * @param[in] columnIndex The column index - * @param[in] space An @c int representing the space + * @param[in] space The @c int that represents the space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. - * @remarks This method does not perform any operation if the value of @c columnIndex is 0. - * @remarks The column spacing cannot be applied to the first column. + * @remarks + * - This method does not perform any operation if the value of @c columnIndex is @c 0. + * - The column spacing cannot be applied to the first column. */ result SetColumnSpacing(int columnIndex, float space); @@ -317,7 +322,7 @@ public: * @param[in] stretchable Set to @c true to make the row stretchable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetRowStretchable(int rowIndex, bool stretchable); @@ -332,7 +337,7 @@ public: * @param[in] shrinkable Set to @c true to make the row shrinkable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetRowShrinkable(int rowIndex, bool shrinkable); @@ -344,10 +349,10 @@ public: * * @return An error code * @param[in] rowIndex The row index - * @param[in] collapsed Set to @c true to make the row as collapsible, @n + * @param[in] collapsed Set to @c true to make the row collapsible, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. */ result SetRowCollapsed(int rowIndex, bool collapsed); @@ -385,13 +390,14 @@ public: * * @return An error code * @param[in] rowIndex The row index - * @param[in] space An @c int representing the space + * @param[in] space The @c int that represents the space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. - * @remarks This method does not perform any operation if the value of @c rowIndex is @c 0. - * @remarks The row spacing cannot be applied to the first column. + * @remarks + * - This method does not perform any operation if the value of @c rowIndex is @c 0. + * - The row spacing cannot be applied to the first column. */ result SetRowSpacing(int rowIndex, int space); @@ -402,13 +408,14 @@ public: * * @return An error code * @param[in] rowIndex The row index - * @param[in] space An @c int representing the space + * @param[in] space The @c int that represents the space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_RANGE The specified index is out of range. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_RANGE The specified index is out of the valid range. * @exception E_SYSTEM A system error has occurred. - * @remarks This method does not perform any operation if the value of @c rowIndex is @c 0. - * @remarks The row spacing cannot be applied to the first column. + * @remarks + * - This method does not perform any operation if the value of @c rowIndex is @c 0. + * - The row spacing cannot be applied to the first column. */ result SetRowSpacing(int rowIndex, float space); @@ -427,17 +434,19 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG Either of the following conditions has occurred: @n * - A specified input parameter is invalid. @n - * - Either @c rowSpan or @c columnSpan is @c 0 or negative. @n - * - The specified @c childControl parameter is not a child of the container that owns the layout. @n + * - Either @c rowSpan or @c columnSpan is @c 0. + * - Either @c rowSpan or @c columnSpan is negative. @n + * - The specified @c childControl is not a child of the container that owns the layout. @n * - The specified span has tried to include a cell, which is already included in another span. - * @exception E_OUT_OF_RANGE The specified index is out of range, or @n - * the calculated range of the cell is out of the grid. + * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: + * - The specified index is out of the valid range. + * - The calculated range of the cell is out of the grid. * @exception E_SYSTEM A system error has occurred. */ result SetPosition(Control& childControl, int rowStartIndex, int columnStartIndex, int rowSpan, int columnSpan); /** - * Sets the horizontal alignment and the vertical alignment. + * Sets the horizontal alignment and vertical alignment. * * @since 2.0 * @@ -447,14 +456,15 @@ public: * @param[in] verticalAlignment The vertical alignment * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. - * @remarks By default, the value of @c horizontalAlignment is HORIZONTAL_ALIGN_LEFT and the value of @c verticalAlignment is - * VERTICAL_ALIGN_TOP. - * The column width is set to the largest width amongst controls in the column, and the row height is set to the largest - * height amongst controls in the row. - * Therefore, the smaller controls have vertical or horizontal margins around them, and they are repositioned in cells - * according to the alignment options. + * @remarks + * - By default, the value of @c horizontalAlignment is HORIZONTAL_ALIGN_LEFT and the value of @c verticalAlignment is + * VERTICAL_ALIGN_TOP. + * - The column width is set to the largest width amongst controls in the column, and the row height is set to the largest + * height amongst controls in the row. + * Therefore, the smaller controls have vertical or horizontal margins around them, and they are repositioned in cells + * according to the alignment options. */ result SetAlignment(Control& childControl, LayoutHorizontalAlignment horizontalAlignment, LayoutVerticalAlignment verticalAlignment); @@ -471,7 +481,7 @@ public: * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ @@ -490,7 +500,7 @@ public: * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ diff --git a/inc/FUiHorizontalBoxLayout.h b/inc/FUiHorizontalBoxLayout.h index 793480b..af21648 100644 --- a/inc/FUiHorizontalBoxLayout.h +++ b/inc/FUiHorizontalBoxLayout.h @@ -38,7 +38,7 @@ class Control; * @since 2.0 * * The %HorizontalBoxLayout class defines the horizontal box layout for a Container. The layout positions the children of the %Container horizontally. - * @n + * * For more information on the class features, see Vertical and Horizontal Box Layouts. * * @code @@ -178,7 +178,7 @@ class _OSP_EXPORT_ HorizontalBoxLayout { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 * @@ -235,9 +235,9 @@ public: * @param[in] childControl The control for which the alignment is set * @param[in] alignment The vertical alignment * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. - * @remarks By default, the horizontal alignment is VERTICAL_ALIGN_TOP. + * @remarks By default, the horizontal alignment is @c VERTICAL_ALIGN_TOP. */ result SetVerticalAlignment(Control& childControl, LayoutVerticalAlignment alignment); @@ -250,7 +250,7 @@ public: * @param[in] childControl The control for which the space is set * @param[in] space The space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the spacing is set to @c 0. */ @@ -265,7 +265,7 @@ public: * @param[in] childControl The control for which the space is set * @param[in] space The space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the spacing is set to @c 0. */ @@ -281,7 +281,7 @@ public: * @param[in] top The top margin * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ @@ -297,7 +297,7 @@ public: * @param[in] top The top margin * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ @@ -312,12 +312,12 @@ public: * @param[in] childControl The control for which the width is set * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, int width); - /* + /** * Sets the width of the specified control with the fixed length. * * @since 2.1 @@ -326,7 +326,7 @@ public: * @param[in] childControl The control for which the width is set * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, float width); @@ -340,9 +340,9 @@ public: * @param[in] childControl The control for which the width is set * @param[in] policy The fitting policy for the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. - * @remarks Setting FIT_POLICY_PARENT as @c policy does not cause the width of control to change. + * @remarks Setting @c FIT_POLICY_PARENT as @c policy does not cause the width of the control to change. */ result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy); @@ -355,7 +355,7 @@ public: * @param[in] childControl The control for which the height is set * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, int height); @@ -369,7 +369,7 @@ public: * @param[in] childControl The control for which the height is set * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, float height); @@ -383,7 +383,7 @@ public: * @param[in] childControl The control for which the height is set * @param[in] policy The fitting policy for the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetVerticalFitPolicy(Control& childControl, FitPolicy policy); @@ -397,7 +397,7 @@ public: * @param[in] childControl The control for which the weight is set * @param[in] weight The weight that indicates how much extra space the control occupies in proportion to it, in the %HorizontalBoxLayout * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the weight is set to @c 0.0f. */ diff --git a/inc/FUiIAccessibilityListener.h b/inc/FUiIAccessibilityListener.h index 7b13dce..f0eb33c 100644 --- a/inc/FUiIAccessibilityListener.h +++ b/inc/FUiIAccessibilityListener.h @@ -65,7 +65,7 @@ public: virtual void OnAccessibilityFocusIn(const Control& control, const AccessibilityElement& element) = 0; /** - * Called when the accessibility element losts a focus. + * Called when the accessibility element loses a focus. * * @since 2.0 * @param[in] control The control that has an accessibility element diff --git a/inc/FUiIActionEventListener.h b/inc/FUiIActionEventListener.h index bdaaab8..a932c20 100644 --- a/inc/FUiIActionEventListener.h +++ b/inc/FUiIActionEventListener.h @@ -37,7 +37,7 @@ namespace Tizen {namespace Ui { /** * @interface IActionEventListener - * @brief This interface implements the listener for action event. + * @brief This interface implements the listener for an action event. * * @since 2.0 * @@ -45,7 +45,7 @@ namespace Tizen {namespace Ui * The class that processes an action event * implements this interface, and the instance created with that class is registered with a UI control, using the control's * AddActionEventListener() method. When the action event occurs, the OnActionPerformed() method of that instance is invoked. - * @n + * * For more information on the class features, see in individual control topics under UI Controls. */ class _OSP_EXPORT_ IActionEventListener @@ -53,7 +53,8 @@ class _OSP_EXPORT_ IActionEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiIAdjustmentEventListener.h b/inc/FUiIAdjustmentEventListener.h index ed04bc2..e167094 100644 --- a/inc/FUiIAdjustmentEventListener.h +++ b/inc/FUiIAdjustmentEventListener.h @@ -44,7 +44,7 @@ class Control; * are fired when the knob of a Slider moves. The class that processes an adjustment event implements this interface, and the * instance created with that class is registered with a UI control, using the control's AddAdjustmentEventListener() method. * When the adjustment event occurs, the OnAdjustmentValueChanged() method of that instance is invoked. - * @n + * * For more information on the class features, see Slider. */ diff --git a/inc/FUiIAnimationEventListener.h b/inc/FUiIAnimationEventListener.h index 8382455..bd2aeaa 100644 --- a/inc/FUiIAnimationEventListener.h +++ b/inc/FUiIAnimationEventListener.h @@ -44,8 +44,8 @@ class Control; * The %IAnimationEventListener interface is the listener interface for receiving animation events. * The class that processes an animation event implements this interface, and the instance created with that class is registered * with a UI control, using the control's @ref Tizen::Ui::Controls::Animation::AddAnimationEventListener() method. When the animation event occurs, the - * @ref OnAnimationStopped() method of that instance is invoked. - * @n + * OnAnimationStopped() method of that instance is invoked. + * * For more information on the class features, see Animation. * * diff --git a/inc/FUiIClipboardPopupEventListener.h b/inc/FUiIClipboardPopupEventListener.h index 6fcb61a..532cf3c 100644 --- a/inc/FUiIClipboardPopupEventListener.h +++ b/inc/FUiIClipboardPopupEventListener.h @@ -20,7 +20,7 @@ * @brief This is the header file for the %IClipboardPopupEventListener interface. * * This header file contains the declarations of the %IClipboardPopupEventListener interface. @n - * If the item event is generated, a method of this interface will be called. @n + * If an item event is generated, a method of this interface will be called. @n * The applications that perform tasks related to the item event, must call methods of this interface. */ @@ -40,7 +40,7 @@ class ClipboardItem; * @since 2.0 * * The %IClipboardPopupEventListener interface is the listener interface for receiving clipboard pop-up events. - * @n + * * For more information on the class features, see Clipboard. */ class _OSP_EXPORT_ IClipboardPopupEventListener @@ -48,7 +48,8 @@ class _OSP_EXPORT_ IClipboardPopupEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -59,10 +60,9 @@ public: * * @since 2.0 * - * @param[in] pClipboardItem The pointer to ClipboardItem that - * is selected, @n - * else @c null if no item is selected - * @remarks @c pClipboardItem is deleted by the system after this method call. + * @param[in] pClipboardItem A pointer to ClipboardItem that is selected, @n + * else @c null if no item is selected + * @remarks The @c pClipboardItem is deleted by the system after this method call. */ virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) = 0; diff --git a/inc/FUiIColorChangeEventListener.h b/inc/FUiIColorChangeEventListener.h index 6264cda..dc02f04 100644 --- a/inc/FUiIColorChangeEventListener.h +++ b/inc/FUiIColorChangeEventListener.h @@ -50,7 +50,7 @@ class Control; * The class that processes a color change event implements this interface, and the instance created with that class is * registered with a UI control, using the control's AddColorChangeEventListener() method. When the color change event occurs, * the OnColorChanged() method of that instance is invoked. - * @n + * * For more information on the class features, see ColorPicker. */ class IColorChangeEventListener diff --git a/inc/FUiICustomItemEventListener.h b/inc/FUiICustomItemEventListener.h index 3ff331e..6570be8 100644 --- a/inc/FUiICustomItemEventListener.h +++ b/inc/FUiICustomItemEventListener.h @@ -21,7 +21,7 @@ * * This header file contains the declarations of the ICustomItemEventListener interface. @n * If an item event is generated, a method of this interface is called. @n - * Application doing tasks related to the item event use the methods of this interface. + * Applications doing tasks related to the item event use the methods of this interface. * */ #ifndef _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_ @@ -79,8 +79,9 @@ public: * @param[in] index The index of the item * @param[in] itemId The item ID * @param[in] status The state of the item - * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem. - * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected. + * @remarks + * - Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem. + * - If CustomList is constructed with @c CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected. * @endif */ virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0; @@ -99,10 +100,11 @@ public: * @param[in] itemId The item ID * @param[in] elementId The element ID * @param[in] status The state of the element - * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in - * CustomListItem. - * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected. - * Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called. + * @remarks + * - Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in + * CustomListItem. + * - If CustomList is constructed with @c CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected. + * Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called. * @endif */ virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0; diff --git a/inc/FUiIDataBindingDataTransformer.h b/inc/FUiIDataBindingDataTransformer.h index f76bc6b..1473183 100644 --- a/inc/FUiIDataBindingDataTransformer.h +++ b/inc/FUiIDataBindingDataTransformer.h @@ -48,7 +48,8 @@ class _OSP_EXPORT_ IDataBindingDataTransformer { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -58,12 +59,12 @@ public: * Transforms the value of the data of source type to value of target type. * @since 2.0 * @return @c true if it is successful to convert source to target @n - * else @c false + * else @c false * @param[in] bindingId The specified binding ID - * @param[in] sourceType The source data type - * @param[in] sourceData The data source - * @param[in] targetType The target data type - * @param[out] targetData The data target + * @param[in] sourceType The source data type + * @param[in] sourceData The data source + * @param[in] targetType The target data type + * @param[out] targetData The data target */ virtual bool TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData) = 0; @@ -81,11 +82,11 @@ public: virtual bool TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData) = 0; /** - * Checks whether the this transformer can convert the source type to target type. + * Checks whether this transformer can convert the source type to target type. * * @since 2.0 * @return @c true if it is possible to transform source type to target type, @n - * else @c false + * else @c false * @param[in] bindingId The specified binding ID * @param[in] sourceType The source data type * @param[in] targetType The target data type @@ -93,7 +94,7 @@ public: virtual bool IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType) = 0; /** - * Checks whether the this transformer can convert the target type to source type. + * Checks whether this transformer can convert the target type to source type. * * @since 2.0 * @return @c true if it is possible to transform target type to source type, @n diff --git a/inc/FUiIDataBindingDataValidator.h b/inc/FUiIDataBindingDataValidator.h index 7bff073..e586899 100644 --- a/inc/FUiIDataBindingDataValidator.h +++ b/inc/FUiIDataBindingDataValidator.h @@ -38,42 +38,43 @@ namespace Tizen { namespace Ui /** * @interface IDataBindingDataValidator -* @brief This interface defines methods for validating the value of transformed data that will be updated to the binding +* @brief This interface defines methods for validating the value of the transformed data that is updated to the binding * target or source. * * @since 2.0 * -* The %IDataBindingDataValidator interface defines methods for validating the value of transformed data that will be updated to the binding. +* The %IDataBindingDataValidator interface defines methods for validating the value of the transformed data that is updated to the binding. */ class _OSP_EXPORT_ IDataBindingDataValidator { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ virtual ~IDataBindingDataValidator(void) {}; /** - * Validates the value of the transformed data that will be updated to the binding target. + * Validates the value of the transformed data that is updated to the binding target. * * @since 2.0 * @return @c true if the specified value is valid, @n - * else @c false + * else @c false * @param[in] bindingId The binding ID to validate - * @param[in] data The data to validate + * @param[in] data The data to validate */ virtual bool ValidateDataToTarget(const Tizen::Base::String& bindingId, const Tizen::Base::Object& data) = 0; /** - * Validates the value of the transformed data that will be updated to the binding source. + * Validates the value of the transformed data that is updated to the binding source. * * @since 2.0 * @return @c true if the specified value is valid, @n - * else @c false - * @param[in] bindingId The binding ID to validate - * @param[in] data The data to validate + * else @c false + * @param[in] bindingId The binding ID to validate + * @param[in] data The data to validate */ virtual bool ValidateDataToSource( const Tizen::Base::String& bindingId, const Tizen::Base::Object& data) = 0; diff --git a/inc/FUiIDataBindingListener.h b/inc/FUiIDataBindingListener.h index a9f48c9..92df3ef 100644 --- a/inc/FUiIDataBindingListener.h +++ b/inc/FUiIDataBindingListener.h @@ -44,7 +44,8 @@ class _OSP_EXPORT_ IDataBindingListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -56,8 +57,8 @@ public: * @since 2.0 * * @param[in] bindingId The binding ID - * @param[in] controlName The name of binding target control - * @param[in] propertyName The name of binding target property + * @param[in] controlName The name of the binding target control + * @param[in] propertyName The name of the binding target property */ virtual void OnDataBindingSourceUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName , const Tizen::Base::String& propertyName) = 0; @@ -68,8 +69,8 @@ public: * @since 2.0 * * @param[in] bindingId The binding ID - * @param[in] controlName The name of binding target control - * @param[in] propertyName The name of binding target property + * @param[in] controlName The name of the binding target control + * @param[in] propertyName The name of the binding target property */ virtual void OnDataBindingTargetUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName , const Tizen::Base::String& propertyName) = 0; @@ -81,8 +82,8 @@ public: * @since 2.0 * * @param[in] bindingId The binding ID - * @param[in] controlName The name of binding target control - * @param[in] propertyName The name of binding target property + * @param[in] controlName The name of the binding target control + * @param[in] propertyName The name of the binding target property * @param[in] destType The data binding destination type */ virtual void OnDataBindingValidationFailed(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName diff --git a/inc/FUiIDateChangeEventListener.h b/inc/FUiIDateChangeEventListener.h index 361499a..80f966c 100644 --- a/inc/FUiIDateChangeEventListener.h +++ b/inc/FUiIDateChangeEventListener.h @@ -49,7 +49,7 @@ namespace Tizen {namespace Ui * The class that processes a date change event implements this interface, and the instance created with that class is registered * with a UI control, using the control's AddDateChangeEventListener() method. When the date change event occurs, the * OnDateChanged() method of that instance is invoked. - * @n + * * For more information on the class features, see EditDate and EditTime and DatePicker, TimePicker, and DateTimePicker. */ class _OSP_EXPORT_ IDateChangeEventListener @@ -79,7 +79,7 @@ public: /** - * Called when the change in date is canceled. + * Called when the change in the date is cancelled. * * @since 2.0 * diff --git a/inc/FUiIDateTimeChangeEventListener.h b/inc/FUiIDateTimeChangeEventListener.h index e078bbc..720e164 100644 --- a/inc/FUiIDateTimeChangeEventListener.h +++ b/inc/FUiIDateTimeChangeEventListener.h @@ -49,7 +49,7 @@ namespace Tizen {namespace Ui * The class that processes a date and time change event implements this interface, and the instance created with that class is * registered with a UI control, using the DateTimePicker::AddDateTimeChangeEventListener() method. When the date and time change event * occurs, the OnDateTimeChanged() method of that instance is invoked. - * @n + * * For more information on the class features, see DatePicker, TimePicker, and DateTimePicker. */ class _OSP_EXPORT_ IDateTimeChangeEventListener @@ -82,7 +82,7 @@ public: /** - * Called when the date and time change is canceled. + * Called when the date and time change is cancelled. * * @since 2.0 * diff --git a/inc/FUiIDragDropEventListener.h b/inc/FUiIDragDropEventListener.h index 38b2e2a..e35dbef 100644 --- a/inc/FUiIDragDropEventListener.h +++ b/inc/FUiIDragDropEventListener.h @@ -42,7 +42,7 @@ class Control; * The class that processes a drag and drop event implements this interface, and the instance created with that class is * registered with a UI control, using the Control::AddDragDropEventListener() method. When the drag and drop event occurs, a * method of that instance is invoked. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ IDragDropEventListener diff --git a/inc/FUiIDragDropEventListenerF.h b/inc/FUiIDragDropEventListenerF.h index 36c01e8..45cdfe3 100644 --- a/inc/FUiIDragDropEventListenerF.h +++ b/inc/FUiIDragDropEventListenerF.h @@ -43,7 +43,7 @@ class Control; * The class that processes a drag and drop event implements this interface, and the instance created with that class is * registered with a UI control, using the control's AddDragDropEventListenerF() method. When the drag and drop event occurs, a * method of that instance is invoked. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ IDragDropEventListenerF diff --git a/inc/FUiIExpandableItemEventListener.h b/inc/FUiIExpandableItemEventListener.h index e6b0f01..5205882 100644 --- a/inc/FUiIExpandableItemEventListener.h +++ b/inc/FUiIExpandableItemEventListener.h @@ -90,7 +90,7 @@ public: /** * @if OSPDEPREC - * Called when the state of an element in CustomListItem in ExpandableList is changed. @n + * Called when the state of an element or CustomListItem in the ExpandableList is changed. @n * If a main item is selected, the index of the sub-item is @c -1. * @brief [Deprecated] * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedTableViewEventListener interface. diff --git a/inc/FUiIFastScrollEventListener.h b/inc/FUiIFastScrollEventListener.h index 5c8ecc7..8d4f0a6 100644 --- a/inc/FUiIFastScrollEventListener.h +++ b/inc/FUiIFastScrollEventListener.h @@ -19,8 +19,8 @@ * @brief This is the header file for the %IFastScrollEventListener interface. * * This header file contains declarations of the %IFastScrollEventListener interface. - * If item event is generated, a method of this interface will be called. - * Applications that do some jobs related to item event, call methods of this interface. + * If an item event is generated, a method of this interface will be called. + * Applications that do some jobs related to item events, call methods of this interface. * */ #ifndef _FUI_IFAST_SCROLL_EVENT_LISTENER_H_ @@ -41,7 +41,7 @@ namespace Tizen {namespace Ui /** * @if OSPDEPREC * @interface IFastScrollEventListener - * @brief [Deprecated] This interface implements the listener for fast scroll event. + * @brief [Deprecated] This interface implements the listener for a fast scroll event. * * @deprecated This interface is deprecated. Instead of using this interface, use the IFastScrollListener interface. * @since 2.0 diff --git a/inc/FUiIFocusEventListener.h b/inc/FUiIFocusEventListener.h index 3c788dd..4d89c6c 100644 --- a/inc/FUiIFocusEventListener.h +++ b/inc/FUiIFocusEventListener.h @@ -54,7 +54,7 @@ enum FocusStatus * The class that processes a focus event implements this interface, and the instance created with that class is registered with a * UI control, using the Control::AddFocusEventListener() method. When the focus event occurs, a method of that instance is * invoked. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ IFocusEventListener @@ -62,7 +62,8 @@ class _OSP_EXPORT_ IFocusEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 * diff --git a/inc/FUiIInputConnectionEventListener.h b/inc/FUiIInputConnectionEventListener.h index 149efe2..f2405d1 100644 --- a/inc/FUiIInputConnectionEventListener.h +++ b/inc/FUiIInputConnectionEventListener.h @@ -50,14 +50,15 @@ class InputConnection; * * @since 2.0 * - * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current InputMethod. + * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current InputMethod. */ class _OSP_EXPORT_ IInputConnectionEventListener : virtual public Tizen::Base::Runtime::IEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiIInputConnectionEventListenerF.h b/inc/FUiIInputConnectionEventListenerF.h index 48e7d47..9a67f6f 100644 --- a/inc/FUiIInputConnectionEventListenerF.h +++ b/inc/FUiIInputConnectionEventListenerF.h @@ -50,14 +50,15 @@ class InputConnection; * * @since 2.1 * - * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current InputMethod. + * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current InputMethod. */ class _OSP_EXPORT_ IInputConnectionEventListenerF : virtual public Tizen::Base::Runtime::IEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.1 */ diff --git a/inc/FUiIInputConnectionProvider.h b/inc/FUiIInputConnectionProvider.h index 189cd0d..679f44c 100644 --- a/inc/FUiIInputConnectionProvider.h +++ b/inc/FUiIInputConnectionProvider.h @@ -43,13 +43,14 @@ class InputConnection; * * @since 2.0 * - * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current active Input Method. + * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current active Input Method. */ class _OSP_EXPORT_ IInputConnectionProvider { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiIKeypadEventListener.h b/inc/FUiIKeypadEventListener.h index 55cdaef..bfbf05f 100644 --- a/inc/FUiIKeypadEventListener.h +++ b/inc/FUiIKeypadEventListener.h @@ -68,7 +68,7 @@ enum KeypadAction * The class that processes a software keypad event implements this interface, and the instance created with that class is * registered with a UI control, using the control's AddKeypadEventListener() method. When the software keypad event occurs, a * method of that instance is invoked. - * @n + * * For more information on the class features, see EditArea and EditField, SearchBar and ExpandableEditArea. */ @@ -78,7 +78,8 @@ class _OSP_EXPORT_ IKeypadEventListener // Lifecycle public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -95,7 +96,7 @@ public: * @param[in] source The source of the event * @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken * up by the software keypad. - * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + * @see Controls::Form::GetClientAreaBounds() */ virtual void OnKeypadWillOpen(Tizen::Ui::Control& source) = 0; @@ -107,7 +108,7 @@ public: * @param[in] source The source of the event * @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken * up by the software keypad. - * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + * @see Controls::Form::GetClientAreaBounds() */ virtual void OnKeypadOpened(Tizen::Ui::Control& source) = 0; @@ -117,7 +118,7 @@ public: * @since 2.0 * * @param[in] source The source of the event - * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + * @see Controls::Form::GetClientAreaBounds() */ virtual void OnKeypadClosed(Tizen::Ui::Control& source) = 0; @@ -138,7 +139,7 @@ public: * @since 2.0 * * @param[in] source The source of the event - * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + * @see Controls::Form::GetClientAreaBounds() */ virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source) {}; diff --git a/inc/FUiILanguageEventListener.h b/inc/FUiILanguageEventListener.h index 329b7a8..7f9c83d 100644 --- a/inc/FUiILanguageEventListener.h +++ b/inc/FUiILanguageEventListener.h @@ -61,7 +61,8 @@ public: ILanguageEventListener(void) {}; /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -72,9 +73,9 @@ public: * * @since 2.0 * - * @param[in] source The source of the event + * @param[in] source The source of the event * @param[in] oldLanguage The previous input language - * @param[in] newLanguage The current input language + * @param[in] newLanguage The current input language */ virtual void OnLanguageChanged(const Tizen::Ui::Control& source, Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage) = 0; diff --git a/inc/FUiIOrientationEventListener.h b/inc/FUiIOrientationEventListener.h index 205afd1..4a90572 100644 --- a/inc/FUiIOrientationEventListener.h +++ b/inc/FUiIOrientationEventListener.h @@ -78,7 +78,7 @@ enum OrientationStatus * The class that processes an orientation event implements this interface, and the instance created with that class is registered * with a UI control, using the control's AddOrientationEventListener() method. When the orientation event occurs, the * OnOrientationChanged() method of that instance is invoked. - * @n + * * For more information on the class features, see Form. */ class _OSP_EXPORT_ IOrientationEventListener @@ -86,7 +86,8 @@ class _OSP_EXPORT_ IOrientationEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -100,8 +101,8 @@ public: * @param[in] source The source of the event * @param[in] orientationStatus The information about the orientation event * @remarks The orientation changed event is fired on Control for which orientation mode change has been enabled by calling SetOrientation(). - * @see Tizen::Ui::Controls::Frame - * @see Tizen::Ui::Controls::Form + * @see Controls::Frame + * @see Controls::Form */ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus) = 0; diff --git a/inc/FUiIPropagatedKeyEventListener.h b/inc/FUiIPropagatedKeyEventListener.h index 92b1e80..bb6e6f6 100644 --- a/inc/FUiIPropagatedKeyEventListener.h +++ b/inc/FUiIPropagatedKeyEventListener.h @@ -47,14 +47,14 @@ class KeyEventInfo; * In both previewing and bubbling paths, event routing can be controlled by the value returned by the listener. Returning @c true, which means * the event is processed in the listener of the notified control, stops further routing. Returning @c false allows the next event listener * to listen to the event. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ IPropagatedKeyEventListener { public: /** - * This polymorphic destructor should be overridden if required. + * This polymorphic destructor should be overridden if required. @n * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.1 @@ -66,8 +66,8 @@ public: * * @since 2.1 * - * @return Whether the key event is processed by the listener or not - * @param[in] source The source of the event + * @return The boolean value that indicates whether the key event is processed by the listener or not + * @param[in] source The source of the event * @param[in] keyEventInfo The key event information */ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) = 0; @@ -77,7 +77,7 @@ public: * * @since 2.1 * - * @return Whether the key event is processed by the listener or not + * @return The boolean value that indicates whether the key event is processed by the listener or not * @param[in] source The source of the event * @param[in] keyEventInfo The key event information */ @@ -88,7 +88,7 @@ public: * * @since 2.1 * - * @return Whether the key event is processed by the listener or not + * @return The boolean value that indicates whether the key event is processed by the listener or not * @param[in] source The source of the event * @param[in] keyEventInfo The key event information */ @@ -99,7 +99,7 @@ public: * * @since 2.1 * - * @return Whether the key event is processed by the listener or not + * @return The boolean value that indicates whether the key event is processed by the listener or not * @param[in] source The source of the event * @param[in] keyEventInfo The key event information */ @@ -111,7 +111,7 @@ public: * * @since 2.1 * - * @return Whether the KeyEventInfo instance is modified or not + * @return The boolean value that indicates whether the KeyEventInfo instance is modified or not * @param[in] source The source of the event * @param[in,out] keyEventInfo The key event information that can be converted by this method */ @@ -150,4 +150,4 @@ protected: }; //IPropagatedKeyEventListener }} // Tizen::Ui -#endif // _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_ \ No newline at end of file +#endif // _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_ diff --git a/inc/FUiIPropagatedTouchEventListener.h b/inc/FUiIPropagatedTouchEventListener.h index 129c14c..05488a0 100644 --- a/inc/FUiIPropagatedTouchEventListener.h +++ b/inc/FUiIPropagatedTouchEventListener.h @@ -46,7 +46,7 @@ class TouchEventInfo; * In both previewing and bubbling paths, event routing can be controlled by the value returned by the listener. Returning @c true, which means * the event is processed in the listener of the notified control, stops further routing. Returning @c false allows the next event listener * to listen to the event. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ IPropagatedTouchEventListener @@ -65,7 +65,7 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -76,7 +76,7 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -87,18 +87,18 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ virtual bool OnTouchMoved(Control& source, const TouchEventInfo& touchEventInfo) = 0; /** - * Called during the bubbling step when a touch is canceled. + * Called during the bubbling step when a touch is cancelled. * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -109,7 +109,7 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -121,7 +121,7 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -132,7 +132,7 @@ public: * * @since 2.1 * - * @return Whether the touch event is processed by the listener or not + * @return The boolean value that indicates whether the touch event is processed by the listener or not * @param[in] source The source of the event * @param[in] touchEventInfo The touch event information */ @@ -171,4 +171,4 @@ protected: }; // IPropagatedTouchEventListener }} // Tizen::Ui -#endif // _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_ \ No newline at end of file +#endif // _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_ diff --git a/inc/FUiIScrollPanelEventListener.h b/inc/FUiIScrollPanelEventListener.h index 4fe7d5c..eb35595 100644 --- a/inc/FUiIScrollPanelEventListener.h +++ b/inc/FUiIScrollPanelEventListener.h @@ -49,7 +49,7 @@ namespace Tizen {namespace Ui * ScrollPanel. The class that processes a change event implements this interface, and the instance created with that class is * registered with a UI control, using the control's AddScrollPanelEventListener() method. When the change event occurs, a method * of that instance is invoked. - * @n + * * For more information on the class features, see Panels and Using EditArea or EditField Overlay Keypad with ScrollPanel. */ @@ -59,7 +59,8 @@ class _OSP_EXPORT_ IScrollPanelEventListener // Operation public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiISlidableGroupedListEventListener.h b/inc/FUiISlidableGroupedListEventListener.h index 7bcb486..49b50e0 100644 --- a/inc/FUiISlidableGroupedListEventListener.h +++ b/inc/FUiISlidableGroupedListEventListener.h @@ -110,7 +110,7 @@ public: /** * @if OSPDEPREC - * Called when an item is about to be unloaded from memory. @n + * Called when an item is about to be unloaded from the memory. @n * The user-allocated resources associated with the item to be unloaded need to be freed when OnUnloadItemRequested() is called. * * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. diff --git a/inc/FUiISlidableListEventListener.h b/inc/FUiISlidableListEventListener.h index bfc432f..295b248 100644 --- a/inc/FUiISlidableListEventListener.h +++ b/inc/FUiISlidableListEventListener.h @@ -40,14 +40,14 @@ namespace Tizen {namespace Ui /** * @if OSPDEPREC * @interface ISlidableListEventListener - * @brief [Deprecated] This interface implements the listener for events on SlidableList. + * @brief [Deprecated] This interface implements the listener for events on %SlidableList. * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. * @since 2.0 * * * The %ISlidableListEventListener interface implements a listener for receiving scroll events on SlidableList. This listener is implemented * to allow the application to load the items as needed, as the user scrolls through the list. - * The class is registered with a SlidableList, using the control's AddSlidableListEventListener() method. + * The class is registered with a %SlidableList, using the control's AddSlidableListEventListener() method. * @endif */ class _OSP_EXPORT_ ISlidableListEventListener @@ -111,7 +111,7 @@ public: /** * @if OSPDEPREC - * Called when an item is about to be unloaded from memory. @n + * Called when an item is about to be unloaded from the memory. @n * The user-allocated resources associated with the item must be freed before unloading, when OnUnloadItemRequested() is called. * * @brief [Deprecated] This interface implements the listener for events on SlidableList. diff --git a/inc/FUiITextBlockEventListener.h b/inc/FUiITextBlockEventListener.h index 10f0980..967ffea 100644 --- a/inc/FUiITextBlockEventListener.h +++ b/inc/FUiITextBlockEventListener.h @@ -56,7 +56,8 @@ class _OSP_EXPORT_ ITextBlockEventListener // Lifecycle public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiITextEventListener.h b/inc/FUiITextEventListener.h index 1cabc44..3168b77 100644 --- a/inc/FUiITextEventListener.h +++ b/inc/FUiITextEventListener.h @@ -71,20 +71,21 @@ public: * @since 2.0 * * @param[in] source The source of the event - * @remarks For EditField or EditArea with INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when the user presses "Done" - * soft-key. Whereas, for %EditField or %EditArea with INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a - * key. - * @remarks Note that when a non-character key is pressed, OnTextValueChanged() callback is invoked. + * @remarks + * - For EditField or EditArea with Controls::INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when the user presses "Done" + * soft-key. Whereas, for %EditField or %EditArea with Controls::INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a + * key. + * - Note that when a non-character key is pressed, OnTextValueChanged() callback is invoked. */ virtual void OnTextValueChanged(const Tizen::Ui::Control& source) = 0; /** - * Called when a change made to the text is canceled. + * Called when a change made to the text is cancelled. * * @since 2.0 * * @param[in] source The source of the event - * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with INPUT_STYLE_FULLSCREEN input + * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with Controls::INPUT_STYLE_FULLSCREEN input * style. */ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source) = 0; diff --git a/inc/FUiITimeChangeEventListener.h b/inc/FUiITimeChangeEventListener.h index 6944a7d..33a8f11 100644 --- a/inc/FUiITimeChangeEventListener.h +++ b/inc/FUiITimeChangeEventListener.h @@ -78,7 +78,7 @@ public: virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute) = 0; /** - * Called when a time change is canceled. + * Called when a time change is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchCustomGestureEventListener.h b/inc/FUiITouchCustomGestureEventListener.h index aeb4151..2783b48 100644 --- a/inc/FUiITouchCustomGestureEventListener.h +++ b/inc/FUiITouchCustomGestureEventListener.h @@ -46,7 +46,8 @@ class _OSP_EXPORT_ ITouchCustomGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -80,7 +81,7 @@ public: virtual void OnCustomGestureFinished(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0; /** - * Called when a custom gesture detection is canceled. + * Called when a custom gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchEventListener.h b/inc/FUiITouchEventListener.h index d233302..07866dd 100644 --- a/inc/FUiITouchEventListener.h +++ b/inc/FUiITouchEventListener.h @@ -37,7 +37,7 @@ class Control; /** * @interface ITouchEventListener - * @brief This interface is used as the argument to the touch event listener. + * @brief This interface is used as an argument to the touch event listener. * * @since 2.0 * @@ -45,7 +45,7 @@ class Control; * The class that processes a touch event implements this interface, and the instance created with that class is registered with a * UI control, using the Control::AddTouchEventListener() method. When the touch event occurs, a method of that instance is * invoked. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ ITouchEventListener @@ -53,7 +53,8 @@ class _OSP_EXPORT_ ITouchEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 * @@ -77,7 +78,7 @@ public: * * @brief [Deprecated] * @deprecated This callback is deprecated. - * If you want to listen to "long press" touch event, it is recommended to use the TouchLongPressGestureDetector class. + * If you want to listen to the "long press" touch event, it is recommended to use the TouchLongPressGestureDetector class. * @since 2.0 * * @param[in] source The source of the event @@ -148,7 +149,7 @@ public: virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0; /** - * Called when the touch is canceled. + * Called when the touch is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchFlickGestureEventListener.h b/inc/FUiITouchFlickGestureEventListener.h index 4afbcaa..3036d20 100644 --- a/inc/FUiITouchFlickGestureEventListener.h +++ b/inc/FUiITouchFlickGestureEventListener.h @@ -47,7 +47,8 @@ class _OSP_EXPORT_ ITouchFlickGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -63,7 +64,7 @@ public: virtual void OnFlickGestureDetected(Tizen::Ui::TouchFlickGestureDetector& gestureDetector) = 0; /** - * Called when a flick gesture detection is canceled. + * Called when a flick gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchGestureEventListener.h b/inc/FUiITouchGestureEventListener.h index d3827f0..8dc5972 100644 --- a/inc/FUiITouchGestureEventListener.h +++ b/inc/FUiITouchGestureEventListener.h @@ -37,7 +37,7 @@ namespace Tizen { namespace Ui * @since 2.0 * * The %ITouchGestureEventListener interface is a base interface that all gesture event listeners must implement. - * The event listener can listen when the specific event occurs. The event listener + * The event listener can listen when a specific event occurs. The event listener * has several methods, and each method is called when a specific event occurs. * */ @@ -46,7 +46,8 @@ class _OSP_EXPORT_ ITouchGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiITouchLongPressGestureEventListener.h b/inc/FUiITouchLongPressGestureEventListener.h index d48360b..59da16f 100644 --- a/inc/FUiITouchLongPressGestureEventListener.h +++ b/inc/FUiITouchLongPressGestureEventListener.h @@ -47,7 +47,8 @@ class _OSP_EXPORT_ ITouchLongPressGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * This is the destructor for this class. * * @since 2.0 @@ -64,7 +65,7 @@ public: virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector) = 0; /** - * Called when a long press detection is canceled. + * Called when a long press detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchModeChangedEventListener.h b/inc/FUiITouchModeChangedEventListener.h index 6c49520..c9b44b0 100644 --- a/inc/FUiITouchModeChangedEventListener.h +++ b/inc/FUiITouchModeChangedEventListener.h @@ -41,7 +41,7 @@ class Control; * @since 2.0 * * The %ITouchModeChangedEventListener interface is the listener interface for receiving touch mode change events. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ ITouchModeChangedEventListener @@ -49,7 +49,7 @@ class _OSP_EXPORT_ ITouchModeChangedEventListener { public: /** - * This polymorphic destructor should be overridden if required. + * This polymorphic destructor should be overridden if required. @n * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 diff --git a/inc/FUiITouchPanningGestureEventListener.h b/inc/FUiITouchPanningGestureEventListener.h index e3eb755..3b90d6f 100644 --- a/inc/FUiITouchPanningGestureEventListener.h +++ b/inc/FUiITouchPanningGestureEventListener.h @@ -47,7 +47,7 @@ class _OSP_EXPORT_ ITouchPanningGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. + * This polymorphic destructor should be overridden if required. @n * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 @@ -82,7 +82,7 @@ public: virtual void OnPanningGestureFinished(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 0; /** - * Called when a panning gesture detection is canceled. + * Called when a panning gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchPinchGestureEventListener.h b/inc/FUiITouchPinchGestureEventListener.h index f706a1e..60f533c 100644 --- a/inc/FUiITouchPinchGestureEventListener.h +++ b/inc/FUiITouchPinchGestureEventListener.h @@ -49,7 +49,8 @@ class _OSP_EXPORT_ ITouchPinchGestureEventListener public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -83,7 +84,7 @@ public: virtual void OnPinchGestureFinished(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 0; /** - * Called when a pinch gesture detection is canceled. + * Called when a pinch gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchRotationGestureEventListener.h b/inc/FUiITouchRotationGestureEventListener.h index 45fd8b6..114fa24 100644 --- a/inc/FUiITouchRotationGestureEventListener.h +++ b/inc/FUiITouchRotationGestureEventListener.h @@ -47,7 +47,7 @@ class _OSP_EXPORT_ ITouchRotationGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. + * This polymorphic destructor should be overridden if required. @n * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 @@ -82,7 +82,7 @@ public: virtual void OnRotationGestureFinished(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 0; /** - * Called when a rotation gesture detection is canceled. + * Called when a rotation gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiITouchTapGestureEventListener.h b/inc/FUiITouchTapGestureEventListener.h index 9450a71..c510cf9 100644 --- a/inc/FUiITouchTapGestureEventListener.h +++ b/inc/FUiITouchTapGestureEventListener.h @@ -48,7 +48,8 @@ class _OSP_EXPORT_ ITouchTapGestureEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -64,7 +65,7 @@ public: virtual void OnTapGestureDetected(Tizen::Ui::TouchTapGestureDetector& gestureDetector) = 0; /** - * Called when a tap gesture detection is canceled. + * Called when a tap gesture detection is cancelled. * * @since 2.0 * diff --git a/inc/FUiIUiLinkEventListener.h b/inc/FUiIUiLinkEventListener.h index 11be06d..77f37bd 100644 --- a/inc/FUiIUiLinkEventListener.h +++ b/inc/FUiIUiLinkEventListener.h @@ -49,7 +49,7 @@ class Control; * The class that processes a link click event implements this interface, and the instance created with that class is registered * with a UI control, using the control's AddUiLinkEventListener() method. When the link click event occurs, the OnLinkClicked() * method of that instance is invoked. - * @n + * * For more information on the class features, see EditArea and EditField, TextBox, and ListViews. */ @@ -59,7 +59,8 @@ class _OSP_EXPORT_ IUiLinkEventListener // Lifecycle public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiIWindowEventListener.h b/inc/FUiIWindowEventListener.h index 50b894d..aa91717 100644 --- a/inc/FUiIWindowEventListener.h +++ b/inc/FUiIWindowEventListener.h @@ -52,7 +52,8 @@ class _OSP_EXPORT_ IWindowEventListener // Operation public: /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 * diff --git a/inc/FUiInputConnection.h b/inc/FUiInputConnection.h index d696371..9f843a0 100644 --- a/inc/FUiInputConnection.h +++ b/inc/FUiInputConnection.h @@ -218,7 +218,8 @@ class _OSP_EXPORT_ InputConnection { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -236,8 +237,8 @@ public: * * @since 2.0 * @return An error code - * @param[in] pControl The source object for connecting the Input Method. - * @param[in] listener An instance of the %IInputConnectionEventListener for processing the event + * @param[in] pControl The source object for connecting the Input Method + * @param[in] listener An instance of %IInputConnectionEventListener for processing the event * @param[in] provider The %InputConnection provider * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @@ -246,12 +247,12 @@ public: result Construct(const Control* pControl, IInputConnectionEventListener& listener, IInputConnectionProvider& provider); /** - * Initializes this instance of %InputConnection with a specified parameter. + * Initializes this instance of %InputConnection with the specified parameter. * * @since 2.1 * * @return An error code - * @param[in] pControl The source object for connecting the Input Method + * @param[in] pControl The source object for connecting the Input Method * @param[in] listener An instance of %IInputConnectionEventListenerF for processing the event * @param[in] provider The %InputConnection provider * @exception E_SUCCESS The method is successful. @@ -267,8 +268,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. - * @see UnbindInputMethod() - * @remarks This method should be called when the %Control object has the input focus. + * @remarks This method should be called when the Control object has the input focus. + * * @see UnbindInputMethod() */ result BindInputMethod(void); @@ -315,7 +316,7 @@ public: * Sets the auto-capitalization mode. * * @since 2.0 - * @param[in] autoCapitalizationMode The auto-capitalization mode. + * @param[in] autoCapitalizationMode The auto-capitalization mode * @remarks This method may not work, depending on the current active Input Method. */ void SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode); @@ -367,7 +368,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] position The cursor position that is to set + * @param[in] position The cursor position to set * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. @@ -405,7 +406,7 @@ public: * * @since 2.0 * @return An instance of the rectangle that represents the position of the top-left corner, - * the width, and the height of the Input Panel. + * width, and height of the Input Panel * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -418,7 +419,7 @@ public: * @since 2.1 * * @return An instance of the rectangle that represents the position of the top-left corner, - * the width, and the height of the Input Panel + * width, and height of the Input Panel * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -436,13 +437,14 @@ public: void SetTextPredictionEnabled(bool enable); /** - * Sends opaque command to the input method. + * Sends an opaque command to the input method. * * @since 2.1 * * @param[in] command The opaque command - * @remarks This method can be used to provide domain-specific features that are only known between certain input methods and their clients. - * This method may not work, depending on the active Input Method. + * @remarks + * - This method can be used to provide domain-specific features that are only known between certain input methods and their clients. + * - This method may not work, depending on the active Input Method. */ void SendOpaqueCommand (const Tizen::Base::String& command); diff --git a/inc/FUiInputConnectionTypes.h b/inc/FUiInputConnectionTypes.h index fd88653..a83b4bd 100644 --- a/inc/FUiInputConnectionTypes.h +++ b/inc/FUiInputConnectionTypes.h @@ -39,10 +39,10 @@ enum InputPanelStyle { INPUT_PANEL_STYLE_NORMAL, /**< Default style */ INPUT_PANEL_STYLE_EMAIL, /**< Email style */ - INPUT_PANEL_STYLE_URL, /**< URL style */ + INPUT_PANEL_STYLE_URL, /**< URL style */ INPUT_PANEL_STYLE_NUMBER, /**< Number style */ INPUT_PANEL_STYLE_NUMBER_ONLY, /**< Number Only style */ - INPUT_PANEL_STYLE_PHONE_NUMBER, /**< Phone Number style */ + INPUT_PANEL_STYLE_PHONE_NUMBER, /**< Phone Number style */ INPUT_PANEL_STYLE_IP /**< IP style */ }; @@ -55,7 +55,7 @@ enum InputPanelStyle enum InputPanelShowState { INPUT_PANEL_SHOW_STATE_SHOW, /**< Show State */ - INPUT_PANEL_SHOW_STATE_HIDE /**< Hide State */ + INPUT_PANEL_SHOW_STATE_HIDE /**< Hide State */ }; /** @@ -69,7 +69,7 @@ enum AutoCapitalizationMode AUTO_CAPITALIZATION_MODE_NONE, /**< Auto-capitalization mode is set to None */ AUTO_CAPITALIZATION_MODE_WORD, /**< Auto-capitalization mode is Word */ AUTO_CAPITALIZATION_MODE_SENTENCE, /**< Auto-capitalization mode is Sentence */ - AUTO_CAPITALIZATION_MODE_ALL /**< Auto-capitalization mode is set to All */ + AUTO_CAPITALIZATION_MODE_ALL /**< Auto-capitalization mode is set to All */ }; /** @@ -83,7 +83,7 @@ enum InputPanelAction INPUT_PANEL_ACTION_ENTER, /**< The Enter key */ INPUT_PANEL_ACTION_GO, /**< The Go key */ INPUT_PANEL_ACTION_NEXT, /**< The Next key */ - INPUT_PANEL_ACTION_SEND, /**< The Send key */ + INPUT_PANEL_ACTION_SEND, /**< The Send key */ INPUT_PANEL_ACTION_SEARCH, /**< The Search key */ INPUT_PANEL_ACTION_LOGIN, /**< The Login key */ INPUT_PANEL_ACTION_SIGN_IN, /**< The Sign-In key */ diff --git a/inc/FUiKeyEventInfo.h b/inc/FUiKeyEventInfo.h index 2a55753..ee2a37c 100644 --- a/inc/FUiKeyEventInfo.h +++ b/inc/FUiKeyEventInfo.h @@ -37,7 +37,7 @@ class _KeyEventInfoImpl; /** * @class KeyEventInfo - * @brief This class stores the information of each key events. + * @brief This class stores the information of each key event. * * @since 2.1 * @@ -57,9 +57,8 @@ public: * @since 2.1 * * @param[in] keyCode The key code that represents the key of interest - * @param[in] keyModifiers The key modifier that modifies the normal action of the key - * @see Tizen::Ui::KeyCode - * @see Tizen::Ui::KeyModifier + * @param[in] keyModifiers The key modifier that modifies the normal action of the key + * @see KeyModifier */ KeyEventInfo(KeyCode keyCode, int keyModifiers); @@ -98,7 +97,7 @@ public: * * @param[in] keyModifiers The key modifiers that can be combined using the bitwise OR operator * @see GetKeyModifier() - * @see Tizen::Ui::KeyModifier + * @see KeyModifier * */ void SetKeyModifier(int keyModifiers); @@ -110,7 +109,7 @@ public: * * @return The bitwise ORing key modifiers * @see SetKeyModifier() - * @see Tizen::Ui::KeyModifier + * @see KeyModifier */ int GetKeyModifier(void) const; diff --git a/inc/FUiKeyEventManager.h b/inc/FUiKeyEventManager.h index 0e55d98..ff05c1c 100644 --- a/inc/FUiKeyEventManager.h +++ b/inc/FUiKeyEventManager.h @@ -48,7 +48,7 @@ class Control; * @final This class is not intended for extension. * * The %KeyEventManager class listens to all key events that are generated within the application's context. - * @n + * * For more information on the class features, see Event Listeners. */ class _OSP_EXPORT_ KeyEventManager @@ -63,7 +63,7 @@ public: virtual ~KeyEventManager(void); /** - * Gets the pointer to the current key event manager. + * Gets a pointer to the current key event manager. * * @since 2.0 * @@ -86,7 +86,7 @@ public: void AddKeyEventListener(IKeyEventListener& listener); /** - * Removes the %IKeyEventListener instance. @n + * Removes an %IKeyEventListener instance. @n * The removed listener is not notified even when the key events are fired. * * @since 2.0 diff --git a/inc/FUiKeyTypes.h b/inc/FUiKeyTypes.h index 2977032..75a61ac 100644 --- a/inc/FUiKeyTypes.h +++ b/inc/FUiKeyTypes.h @@ -32,7 +32,6 @@ namespace Tizen { namespace Ui * * Defines the list of keys supported by the system. @n * Note that certain keys may not be available on all devices. @n - * Please use the Tizen::Ui::KeyboardMap class to query the availability of a specific key on a target device. * * @since 2.0 */ diff --git a/inc/FUiKeyboardMap.h b/inc/FUiKeyboardMap.h index 219781e..5537347 100644 --- a/inc/FUiKeyboardMap.h +++ b/inc/FUiKeyboardMap.h @@ -58,21 +58,21 @@ enum KeyboardKeyLabelType /** * @if OSPDEPREC - * The second label to be displayed after KEY_CAPSLOCK or KEY_FN is pressed + * The second label to be displayed after @c KEY_CAPSLOCK or @c KEY_FN is pressed * @endif */ KEYBOARD_KEY_LABEL_2, /** * @if OSPDEPREC - * The third label to be displayed when the key is toggled twice (without pressing KEY_CAPSLOCK or KEY_FN) + * The third label to be displayed when the key is toggled twice (without pressing @c KEY_CAPSLOCK or @c KEY_FN) * @endif */ KEYBOARD_KEY_LABEL_3, /** * @if OSPDEPREC - * The fourth label to be displayed when the key is toggled the third time (without pressing KEY_CAPSLOCK or KEY_FN) + * The fourth label to be displayed when the key is toggled the third time (without pressing @c KEY_CAPSLOCK or @c KEY_FN) * @endif */ KEYBOARD_KEY_LABEL_4, @@ -136,7 +136,7 @@ public: /** * @if OSPDEPREC - * Gets the pointer to the %KeyboardMap instance. + * Gets a pointer to the %KeyboardMap instance. * * @brief [Deprecated] * @deprecated This class is deprecated because it is not supported by the platform. diff --git a/inc/FUiLayout.h b/inc/FUiLayout.h index 7a90a3a..58941d0 100644 --- a/inc/FUiLayout.h +++ b/inc/FUiLayout.h @@ -38,7 +38,7 @@ namespace Tizen { namespace Ui * @since 2.0 * * The %Layout class is the abstract base class of all the %Layout classes. - * @n + * * For more information on the class features, see Layout. */ class _OSP_EXPORT_ Layout @@ -68,7 +68,7 @@ public: * * @return An error code * - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. */ result Update(void); diff --git a/inc/FUiLayoutTypes.h b/inc/FUiLayoutTypes.h index 057a8be..305b900 100644 --- a/inc/FUiLayoutTypes.h +++ b/inc/FUiLayoutTypes.h @@ -30,7 +30,7 @@ namespace Tizen { namespace Ui /** * @enum LayoutType * - * Defines the layout type. + * Defines the layout types. * * @since 2.0 */ diff --git a/inc/FUiRelativeLayout.h b/inc/FUiRelativeLayout.h index 800b116..4e8a190 100644 --- a/inc/FUiRelativeLayout.h +++ b/inc/FUiRelativeLayout.h @@ -195,7 +195,8 @@ class _OSP_EXPORT_ RelativeLayout { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 * @@ -231,7 +232,7 @@ public: virtual LayoutType GetLayoutType(void) const; /** - * Sets the relation of the specified child control for the edge with other control. + * Sets the relation of the specified child control with the edge of another control. * * @brief [Deprecated] * @deprecated This method is deprecated. @@ -243,14 +244,14 @@ public: * It must be a parent or sibling. * @param[in] edgeRelation The edge of the specified control to align with the edge of the target control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * @exception E_INVALID_ARG A specified input parameter is invalid. @n * Either the specified @c childControl or the specified @c targetControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetRelation(Control& childControl, const Control& targetControl, RectangleEdgeRelation edgeRelation); /** - * Sets the relation of a specified child control for the edge with other control. + * Sets the relation of the specified child control with the edge of another control. * * @since 2.1 * @@ -275,8 +276,8 @@ public: * @param[in] childControl The control for which the relation is reset * @param[in] edgeType The edge type of the specified control * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result ResetRelation(Control& childControl, RectangleEdgeType edgeType); @@ -287,11 +288,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] childControl The control to center aligned + * @param[in] childControl The control to center align * @param[in] alignment The center alignment for a control either vertically or horizontally * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks The relation value that is set to a child control is ignored when the center-alignment is applied to the control. */ @@ -303,11 +304,11 @@ public: * @since 2.0 * * @return An error code - * @param[in] childControl The control to center aligned + * @param[in] childControl The control to center align * @param[in] alignment The center alignment for a control either vertically or horizontally * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result ResetCenterAligned(Control& childControl, CenterAlignmentType alignment); @@ -324,15 +325,15 @@ public: * @param[in] top The top margin * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ result SetMargin(Control& childControl, int left, int right, int top, int bottom); /** - * Sets the margins of a specified control. + * Sets the margins of the specified control. * * @since 2.1 * @@ -344,7 +345,7 @@ public: * @param[in] bottom The bottom margin * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ @@ -359,14 +360,14 @@ public: * @param[in] childControl The control for which the width is set * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, int width); /** - * Sets the width of a specified control to the fixed size. + * Sets the width of the specified control to the fixed size. * * @since 2.1 * @@ -375,7 +376,7 @@ public: * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, float width); @@ -389,8 +390,8 @@ public: * @param[in] childControl The control for which the width is set * @param[in] policy The fitting policy for the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy); @@ -404,14 +405,14 @@ public: * @param[in] childControl The control for which the height is set * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, int height); /** - * Sets the height of a specified control to the fixed size. + * Sets the height of the specified control to the fixed size. * * @since 2.1 * @@ -420,7 +421,7 @@ public: * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG A specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, float height); @@ -434,8 +435,8 @@ public: * @param[in] childControl The control for which the height is set * @param[in] policy The fitting policy for the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. @n - * The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetVerticalFitPolicy(Control& childControl, FitPolicy policy); diff --git a/inc/FUiScenes.h b/inc/FUiScenes.h index 9117340..b2de87e 100644 --- a/inc/FUiScenes.h +++ b/inc/FUiScenes.h @@ -19,7 +19,7 @@ * @file FUiScenes.h * @brief This is the header file for the %Scenes namespace. * - * This header file contains the declarations and descriptions of the %Tizen::Ui::Scenes namespace. + * This header file contains the declarations and descriptions of the %Scenes namespace. */ #ifndef _FUI_SCENES_H_ @@ -43,14 +43,14 @@ namespace Tizen { namespace Ui { /** * @namespace Tizen::Ui::Scenes - * @brief This namespace contains the classes for the scene management and its related functions. + * @brief This namespace contains classes for scene management and its related functions. * @since 2.0 * * @remarks @b Header @b %file: @b \#include @b @n * @b Library : @b osp-uifw * * The %Scenes namespace provides easy and simplified screen transition methods for form-based UI applications using the scene management feature. - * @n + * * For more information on the class features, see Scene Management. * * The following diagram illustrates the relationships between the classes belonging to the %Scenes namespace. diff --git a/inc/FUiScenesBackwardSceneTransition.h b/inc/FUiScenesBackwardSceneTransition.h index 6dbfe83..afbd9e3 100644 --- a/inc/FUiScenesBackwardSceneTransition.h +++ b/inc/FUiScenesBackwardSceneTransition.h @@ -65,7 +65,7 @@ public: * @since 2.0 * * @param[in] animationType The transition animation type - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not * @remarks Use this constructor for adjacent backward transition. */ BackwardSceneTransition(SceneTransitionAnimationType animationType, @@ -78,7 +78,7 @@ public: * * @param[in] destinationSceneId The scene ID of transition destination * @param[in] animationType The transition animation type - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not * @remarks Use this constructor for non-adjacent backward transition. */ BackwardSceneTransition(const SceneId& destinationSceneId, diff --git a/inc/FUiScenesForwardSceneTransition.h b/inc/FUiScenesForwardSceneTransition.h index d228e35..9bd4a44 100644 --- a/inc/FUiScenesForwardSceneTransition.h +++ b/inc/FUiScenesForwardSceneTransition.h @@ -65,8 +65,8 @@ public: * * @param[in] destinationSceneId The scene ID of transition destination * @param[in] animationType The transition animation type - * @param[in] historyOption The history option whether to add the current scene to the history or not - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not * @remarks Use this constructor for transition to the specified @c destinationSceneId with options. */ ForwardSceneTransition(const SceneId& destinationSceneId, @@ -80,8 +80,8 @@ public: * @since 2.0 * * @param[in] animationType The transition animation type - * @param[in] historyOption The history option whether to add the current scene to the history or not - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not * @remarks Use this constructor for transition through the policy provider. */ ForwardSceneTransition(SceneTransitionAnimationType animationType, diff --git a/inc/FUiScenesIFormFactory.h b/inc/FUiScenesIFormFactory.h index 2d98336..9c35efd 100644 --- a/inc/FUiScenesIFormFactory.h +++ b/inc/FUiScenesIFormFactory.h @@ -40,12 +40,12 @@ namespace Tizen { namespace Ui { namespace Scenes /** * @interface IFormFactory - * @brief This interface is the factory interface for creating the Form control instance. + * @brief This interface is the factory interface for creating the %Form control instance. * * @since 2.0 * * The %IFormFactory interface is the factory interface for creating the Form control instance. - * The SceneManager calls CreateFormN() with form ID string when an instance of %Form control is required. + * The SceneManager calls CreateFormN() with a form ID string when an instance of %Form control is required. * * For more information on the class features, see Scene Management. */ @@ -53,8 +53,8 @@ class _OSP_EXPORT_ IFormFactory { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -65,7 +65,7 @@ public: * * @since 2.0 * - * @return A pointer to a new Form instance + * @return A pointer to the new Form instance * @param[in] formId The form ID string that specifies the ID of the Form to create * @param[in] sceneId The scene ID corresponding to the Form * @remarks The new instance managed by the SceneManager class must not be deleted manually. diff --git a/inc/FUiScenesIPanelFactory.h b/inc/FUiScenesIPanelFactory.h index 3f071b8..3bae583 100644 --- a/inc/FUiScenesIPanelFactory.h +++ b/inc/FUiScenesIPanelFactory.h @@ -53,8 +53,8 @@ class _OSP_EXPORT_ IPanelFactory { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -65,7 +65,7 @@ public: * * @since 2.0 * - * @return A pointer to a new Panel instance + * @return A pointer to the new Panel instance * @param[in] panelId The panel ID string that specifies the ID of the Panel to create * @param[in] sceneId The scene ID corresponding to the Panel * @remarks The new instance managed by the SceneManager class must not be deleted manually. diff --git a/inc/FUiScenesISceneAnimationProvider.h b/inc/FUiScenesISceneAnimationProvider.h index d1ddd49..057cb2f 100644 --- a/inc/FUiScenesISceneAnimationProvider.h +++ b/inc/FUiScenesISceneAnimationProvider.h @@ -51,28 +51,29 @@ class _OSP_EXPORT_ ISceneAnimationProvider { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ virtual ~ISceneAnimationProvider(void) {} /** - * Called on scene transition exactly before current Form (form to form transition) is changed or show state + * Called on scene transition exactly before the current Form (form to form transition) or show state * (panel to panel transition) is changed. * * @since 2.0 * * @param[in] sceneId The scene ID that requires the animator settings - * @param[in] pArgs A pointer to an argument list + * @param[in] pArgs A pointer to the argument list * @param[in] type The animation type - * @param[in] formTransition Set to @c true if the transition is form to form transition, @n - * else @c false if the transition is panel to panel transition (Based on same Form) - * @remarks To show custom scene transition animation, add animator modification code in this callback. @n - * Animation is initiated by SceneManager after this method is called. - * The form to form transition animation is triggered by Tizen::Ui::Animations::FrameAnimator::SetCurrentForm(), - * and the panel to panel transition animation is triggered by Tizen::Ui::Animations::ControlAnimator::SetShowState(). + * @param[in] formTransition Set to @c true if the transition is a form to form transition, @n + * else @c false if the transition is a panel to panel transition (Based on same Form) + * @remarks + * - To show custom scene transition animation, add animator modification code in this callback. @n + * - Animation is initiated by SceneManager after this method is called. + * - The form to form transition animation is triggered by Tizen::Ui::Animations::FrameAnimator::SetCurrentForm(), + * and the panel to panel transition animation is triggered by Tizen::Ui::Animations::ControlAnimator::SetShowState(). * */ virtual void PrepareAnimation(const Tizen::Ui::Scenes::SceneId& sceneId, Tizen::Base::Collection::IList* pArgs, diff --git a/inc/FUiScenesISceneEventListener.h b/inc/FUiScenesISceneEventListener.h index b14072e..729c98d 100644 --- a/inc/FUiScenesISceneEventListener.h +++ b/inc/FUiScenesISceneEventListener.h @@ -57,15 +57,15 @@ class _OSP_EXPORT_ ISceneEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ virtual ~ISceneEventListener(void) {} /** - * Called after setting as current scene. @n + * Called after setting the current scene. @n * The UI element (Tizen::Ui::Controls::Form or Tizen::Ui::Controls::Panel) * has been added to a container (Frame or Form) and is ready to update. * @@ -73,8 +73,8 @@ public: * * @param[in] previousSceneId The scene ID of the deactivated scene * @param[in] currentSceneId The scene ID of the newly activated scene - * @param[in] pArgs A pointer to an argument list that is user-specified - * @remarks The argument list must be cleaned up to free memory. + * @param[in] pArgs A pointer to the argument list that is user-specified + * @remarks The argument list must be cleaned up to free the memory. */ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs) = 0; diff --git a/inc/FUiScenesISceneManagerEventListener.h b/inc/FUiScenesISceneManagerEventListener.h index 3823a63..e7c164e 100644 --- a/inc/FUiScenesISceneManagerEventListener.h +++ b/inc/FUiScenesISceneManagerEventListener.h @@ -47,8 +47,8 @@ class _OSP_EXPORT_ ISceneManagerEventListener { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ diff --git a/inc/FUiScenesISceneTransitionPolicyProvider.h b/inc/FUiScenesISceneTransitionPolicyProvider.h index 0289757..e73182a 100644 --- a/inc/FUiScenesISceneTransitionPolicyProvider.h +++ b/inc/FUiScenesISceneTransitionPolicyProvider.h @@ -51,8 +51,8 @@ class _OSP_EXPORT_ ISceneTransitionPolicyProvider { public: /** - * This polymorphic destructor should be overridden if required. This way, - * the destructors of the derived classes are called when the destructor of this interface is called. + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ @@ -67,7 +67,7 @@ public: * * @return A scene ID * @param[in] currentSceneId The scene ID of the active Scene - * @param[in] pArgs A pointer to an argument list + * @param[in] pArgs A pointer to the argument list */ virtual Tizen::Ui::Scenes::SceneId GetNextScene(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Base::Collection::IList* pArgs) = 0; diff --git a/inc/FUiScenesScene.h b/inc/FUiScenesScene.h index 8d60973..920797c 100644 --- a/inc/FUiScenesScene.h +++ b/inc/FUiScenesScene.h @@ -49,7 +49,7 @@ class ISceneEventListener; * * The %Scene is the basic unit of UI switching. @n * The %Scene class is the item class for scene management. It represents individual UI scene. - * A scene is combination of form and panel, panel can be omitted. + * A scene is a combination of form and panel, panel can be omitted. * * For more information on the class features, see Scene Management. */ @@ -114,7 +114,7 @@ public: Tizen::Base::String GetPanelId(void) const; /** - * Gets the associated Form instance pointer. + * Gets an associated Form instance pointer. * * @since 2.0 * @@ -123,13 +123,13 @@ public: Tizen::Ui::Controls::Form* GetForm(void) const; /** - * Gets the associated Panel instance pointer. + * Gets an associated Panel instance pointer. * * @since 2.0 * * @return The Panel instance pointer, @n * else a @c null pointer if the %Panel is not specified - * @remarks The Panel is optional component of %Scene so it may not be always valid. + * @remarks The Panel is an optional component of %Scene so it may not always be valid. */ Tizen::Ui::Controls::Panel* GetPanel(void) const; diff --git a/inc/FUiScenesSceneManager.h b/inc/FUiScenesSceneManager.h index 49e0da4..ddc0ef4 100644 --- a/inc/FUiScenesSceneManager.h +++ b/inc/FUiScenesSceneManager.h @@ -64,8 +64,8 @@ class ISceneTransitionPolicyProvider; * * @final This class is not intended for extension. * - * The %SceneManager class provides methods to manage scenes and scene states. This class is simplified to a single method call for UI Scene transition that changes the GUI, such as - * form to form transition or tab to tab transition. @n + * The %SceneManager class provides methods to manage scenes and scene states. This class is simplified to a single method call for UI + * Scene transition that changes the GUI, such as form to form transition or tab to tab transition. @n * * For more information on the class features, see Scene Management and Transition Animations. */ @@ -74,11 +74,11 @@ class _OSP_EXPORT_ SceneManager { public: /** - * Gets the %SceneManager instance. + * Gets the pointer to the %SceneManager instance. * * @since 2.0 * - * @return A pointer to the %SceneManager instance if successful, @n + * @return The pointer to the %SceneManager instance if successful, @n * else @c null if it fails * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. @@ -136,7 +136,7 @@ public: * * @return An error code * @param[in] resourceId The resource ID of the scene(s) @n - * A duplicated scene (scene ID) will not be registered. + * A duplicated scene (scene ID) will not be registered. * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_FILE_NOT_FOUND The corresponding resource file is not found. @@ -230,7 +230,8 @@ public: * * @return An error code * @param[in] sceneId The target scene ID - * @param[in] pSceneAnimationProvider An instance of ISceneAnimationProvider to set, @n else @c null to clear previous one + * @param[in] pSceneAnimationProvider An instance of ISceneAnimationProvider to set, @n + * else @c null to clear previous one * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c sceneId is invalid. * @exception E_OBJ_NOT_FOUND The specified scene is not found. @@ -245,7 +246,7 @@ public: * @return An error code * @param[in] pSceneTransitionPolicyProvider An instance of ISceneTransitionPolicyProvider to set, @n * else @c null to clear previous one - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @see ISceneTransitionPolicyProvider::GetNextScene() * @see GoForward() */ @@ -261,8 +262,8 @@ public: * @param[in] duration The duration of the animation in milliseconds @n The maximum duration is one second. * @param[in] interpolatorType The type of interpolator used for the intermediate value calculation of the animation * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c animationType is either @c SCENE_TRANSITION_ANIMATION_TYPE_NONE or - * @c SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM. + * @exception E_INVALID_ARG The specified @c animationType is either @c SCENE_TRANSITION_ANIMATION_TYPE_NONE or + * @c SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM. * @see GoForward() * @see GoBackward() */ @@ -388,7 +389,7 @@ public: SceneId GetCurrentSceneId(void) const; /** - * Checks whether the Scene instance with the specified sceneId has been destroyed or not. + * Checks whether the Scene instance with the specified @c sceneId has been destroyed or not. * * @since 2.0 * diff --git a/inc/FUiScenesSceneTransition.h b/inc/FUiScenesSceneTransition.h index 0567b4a..9152873 100644 --- a/inc/FUiScenesSceneTransition.h +++ b/inc/FUiScenesSceneTransition.h @@ -59,7 +59,7 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %SceneTransition + * @param[in] rhs An instance of %SceneTransition to copy */ SceneTransition(const SceneTransition& rhs); @@ -69,10 +69,10 @@ public: * @since 2.0 * * @param[in] direction The transition direction - * @param[in] destinationSceneId The scene ID of transition destination + * @param[in] destinationSceneId The scene ID of the transition destination * @param[in] animationType The transition animation type - * @param[in] historyOption The history option whether to add the current scene to the history or not - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not */ SceneTransition(SceneTransitionDirection direction, const SceneId& destinationSceneId, SceneTransitionAnimationType animationType, @@ -135,7 +135,7 @@ public: * * @since 2.0 * - * @return The direction of scene transition + * @return The direction of the scene transition * */ SceneTransitionDirection GetDirection(void) const; @@ -146,7 +146,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] sceneId The scene ID of transition destination + * @param[in] sceneId The scene ID of the transition destination * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @@ -158,7 +158,7 @@ public: * * @since 2.0 * - * @return The scene ID of transition destination + * @return The scene ID of the transition destination * */ SceneId GetDestinationSceneId(void) const; @@ -192,7 +192,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] historyOption The history option whether to add the current scene to the history or not + * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @@ -215,7 +215,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] destroyOption The destroy option whether to destroy the current scene or not + * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * diff --git a/inc/FUiScenesTypes.h b/inc/FUiScenesTypes.h index 5931959..8f9cee3 100644 --- a/inc/FUiScenesTypes.h +++ b/inc/FUiScenesTypes.h @@ -49,7 +49,7 @@ typedef Tizen::Base::String SceneTransitionId; /** * @enum SceneTransitionDirection * - * Defines the scene transition directions whether forward or backward. + * Defines the scene transition directions, that is, whether forward or backward. * * @since 2.0 */ @@ -62,7 +62,7 @@ enum SceneTransitionDirection /** * @enum SceneHistoryOption * - * Defines the scene history operation options whether to add to history or not. + * Defines the scene history operation options that indicate whether to add to history or not. * * @since 2.0 */ @@ -92,7 +92,7 @@ enum SceneDestroyOption * * @since 2.0 * - * @see Tizen::Ui::Animations::FrameAnimatorFormTransitionAnimation + * @see Animations::FrameAnimatorFormTransitionAnimation */ enum SceneTransitionAnimationType { diff --git a/inc/FUiSystemUtil.h b/inc/FUiSystemUtil.h index 6bf5cda..8f0bb5e 100644 --- a/inc/FUiSystemUtil.h +++ b/inc/FUiSystemUtil.h @@ -87,12 +87,12 @@ public: * @privilege %http://tizen.org/privilege/inputmanager * * @return An error code - * @param[in] keyEvent The event type of the key to generate + * @param[in] keyEvent The event type of the key to generate * @param[in] keyCode The code of the key - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_OPERATION_FAILED An error has occurred in the underlying system. - * @exception E_INVALID_ARG The specified @c keyEvent or @c keyCode is not supported. + * @exception E_OPERATION_FAILED An error has occurred in the underlying system. + * @exception E_INVALID_ARG The specified @c keyEvent or @c keyCode is not supported. */ static result GenerateKeyEvent(KeyEventType keyEvent, KeyCode keyCode); @@ -106,11 +106,11 @@ public: * * @return An error code * @param[in] touchEvent The event type of the touch to generate - * @param[in] point The point on which the touch occurs - * @exception E_SUCCESS The method is successful. + * @param[in] point The point on which the touch occurs + * @exception E_SUCCESS The method is successful. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_OPERATION_FAILED An error has occurred in the underlying system. - * @exception E_INVALID_ARG The specified @c touchEvent is not supported. + * @exception E_OPERATION_FAILED An error has occurred in the underlying system. + * @exception E_INVALID_ARG The specified @c touchEvent is not supported. */ static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point); @@ -125,9 +125,9 @@ public: * @return An error code * @param[in] touchEvent The event type of the touch to generate * @param[in] point The point on which the touch occurs - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_OPERATION_FAILED An error has occurred in the underlying system. + * @exception E_OPERATION_FAILED An error has occurred in the underlying system. * @exception E_INVALID_ARG The specified @c touchEvent is not supported. */ static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point); @@ -140,14 +140,15 @@ public: * @privlevel platform * @privilege %http://tizen.org/privilege/inputmanager * - * @return A pointer to the captured screen bitmap, @n - * else @c null if it fails to capture screen - * @exception E_SUCCESS The method is successful. + * @return A pointer to the captured screen bitmap, @n + * else @c null if it fails to capture the screen + * @exception E_SUCCESS The method is successful. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_OPERATION_FAILED An error has occurred in the underlying system. - * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer here. - * @remarks The specific error code can be accessed using the GetLastResult() method. @n - * The returned bitmap must be deleted by the application after use. + * @exception E_OPERATION_FAILED An error has occurred in the underlying system. + * @remarks + * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer here. + * - The specific error code can be accessed using the GetLastResult() method. @n + * - The returned bitmap must be deleted by the application after use. */ static Tizen::Graphics::Bitmap* CaptureScreenN(void); diff --git a/inc/FUiTouch.h b/inc/FUiTouch.h index 3aaf986..4cc48af 100644 --- a/inc/FUiTouch.h +++ b/inc/FUiTouch.h @@ -20,7 +20,7 @@ * @file FUiTouch.h * @brief This is the header file for the %Touch class. * - * This header file contains the declarations of the %Touch class.get + * This header file contains the declarations of the %Touch class. * @endif */ @@ -178,30 +178,30 @@ class _OSP_EXPORT_ Touch { public: /** - * @if OSPDEPREC + * @if OSPDEPREC * This is the default constructor for this class. * * @brief [Deprecated] * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager class. * @since 2.0 - * @endif + * @endif */ Touch(void); /** - * @if OSPDEPREC + * @if OSPDEPREC * This destructor overrides Tizen::Base::Object::~Object(). * * @brief [Deprecated] * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager class. * @since 2.0 - * @endif + * @endif */ virtual ~Touch(void); public: /** - * @if OSPDEPREC + * @if OSPDEPREC * Enables or disables the multi-point touch of the Control. * * @brief [Deprecated] @@ -210,16 +210,16 @@ public: * * @return An error code * @param[in] control The control - * @param[in] enable A Boolean flag indicating whether to enable to the multi-point touch - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. + * @param[in] enable The Boolean flag that indicates whether to enable the multi-point touch + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. * @see IsMultipointEnabled() - * @endif + * @endif */ result SetMultipointEnabled(const Tizen::Ui::Control& control, bool enable); /** - * @if OSPDEPREC + * @if OSPDEPREC * Checks whether the multi-point touch is enabled. * * @brief [Deprecated] @@ -229,13 +229,13 @@ public: * @return @c true if the multi-point touch is enabled, @n * else @c false * @see IsMultipointEnabled() - * @endif + * @endif */ bool IsMultipointEnabled(const Tizen::Ui::Control& control) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the touch position. @n * If there is only a single touch, that is returned. If there are multi-point touches, then the position of the last touch is returned. * @@ -246,12 +246,12 @@ public: * * @return The coordinates of the touch * @remarks If an error occurs, this method returns Point(-1, -1). - * @endif + * @endif */ Tizen::Graphics::Point GetPosition(void) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the touch position by ID. * * @brief [Deprecated] @@ -262,12 +262,12 @@ public: * @return The coordinates of the touch * @param[in] id The ID of the touch * @remarks If an error occurs, this method returns Point(-1, -1). - * @endif + * @endif */ Tizen::Graphics::Point GetPosition(unsigned long id) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the touch position relative to the specified control. * * @brief [Deprecated] @@ -278,12 +278,12 @@ public: * @return The coordinates of the touch * @param[in] control The source control * @remarks If an error occurs, this method returns Point(-1, -1). - * @endif + * @endif */ Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the touch position relative to the specified control by ID. * * @brief [Deprecated] @@ -291,16 +291,16 @@ public: * Instead, get the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method and use the Tizen::Ui::TouchEventInfo::GetCurrentPosition() method. * @since 2.0 * - * @return The coordinates of the touch + * @return The coordinates of the touch * @param[in] control The source control * @param[in] id The ID of the touch * @remarks If an error occurs, this method returns Point(-1, -1). - * @endif + * @endif */ Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control, unsigned long id) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the status of the touch by ID. * * @brief [Deprecated] @@ -310,64 +310,62 @@ public: * * @param[in] id The ID of the touch * @return The touch status - * @endif + * @endif */ TouchStatus GetTouchStatus(unsigned long id) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the list of the multi-point touches, each represented by TouchInfo. * * @brief [Deprecated] * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method. * @since 2.0 * - * @return A list of the TouchInfo instances - * @see Tizen::Ui::TouchInfo - * @endif + * @return The list of TouchInfo instances + * @endif */ Tizen::Base::Collection::IList* GetTouchInfoListN(void) const; /** - * @if OSPDEPREC - * Gets the list of the multi-point touch positions relative to the specified control, each represented by TouchInfo. + * @if OSPDEPREC + * Gets the list of multi-point touch positions relative to the specified control, each represented by TouchInfo. * * @brief [Deprecated] * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method. * @since 2.0 * - * @return A list of the TouchInfo instances + * @return The list of TouchInfo instances * @param[in] control The source object for calculating the coordinates - * @see Tizen::Ui::TouchInfo - * @endif + * @endif */ Tizen::Base::Collection::IList* GetTouchInfoListN(const Tizen::Ui::Control& control) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the count of the multi-point touches. * * @brief [Deprecated] * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, get the count of Tizen::Ui::TouchEventManager::GetTouchInfoListN() method. * @since 2.0 * - * @return The number of the multi-point touches - * @endif + * @return The number of multi-point touches + * @endif */ int GetPointCount(void) const; /** - * @if OSPDEPREC + * @if OSPDEPREC * Gets the point ID at the given index. * * @brief [Deprecated] - * @deprecated This method is deprecated because the %Touch class is not supported any more. + * @deprecated This method is deprecated because the %Touch class is not supported any more. * Instead, get the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method and use the Tizen::Ui::TouchEventInfo::GetPointId() method. * @since 2.0 * * @return The touch point ID * @param[in] index The index of the touch - * @endif + * @endif */ unsigned long GetPointId(int index) const; diff --git a/inc/FUiTouchEffect.h b/inc/FUiTouchEffect.h index 6b3ec55..82ea75d 100644 --- a/inc/FUiTouchEffect.h +++ b/inc/FUiTouchEffect.h @@ -36,7 +36,7 @@ class _TouchEffectImpl; /** * @class TouchEffect - * @brief This class is used for TouchEffect feature. + * @brief This class is used for the %TouchEffect feature. * @since 2.2 * * @@ -84,7 +84,7 @@ class _TouchEffectImpl; * * } * @endcode - * @n + * */ class _OSP_EXPORT_ TouchEffect @@ -93,8 +93,8 @@ class _OSP_EXPORT_ TouchEffect public: /** - * The object is not fully constructed after this constructor is called. For full construction, @n - * the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.2 */ @@ -123,7 +123,7 @@ public: * @since 2.2 * * @return An error code - * @param[in] type The type of touch for which effect is to be played e.g. SIP, TAP + * @param[in] type The type of touch for which the effect is to be played e.g. SIP, TAP * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @exception E_INVALID_ARG The specified @c type is invalid. diff --git a/inc/FUiTouchEffectTypes.h b/inc/FUiTouchEffectTypes.h index c95a9c1..3ba10ad 100644 --- a/inc/FUiTouchEffectTypes.h +++ b/inc/FUiTouchEffectTypes.h @@ -17,7 +17,7 @@ /** * @file FUiTouchEffectTypes.h -* @brief This is the header file for the types of TouchEffect classes. +* @brief This is the header file for the types of %TouchEffect classes. * * This header file contains the common things required for TouchEffect classes and its associated classes. */ diff --git a/inc/FUiTouchEventInfo.h b/inc/FUiTouchEventInfo.h index bc5a0b6..7d45eec 100644 --- a/inc/FUiTouchEventInfo.h +++ b/inc/FUiTouchEventInfo.h @@ -56,7 +56,7 @@ enum TouchStatus TOUCH_DOUBLE_PRESSED, /**< The touch double pressed event type */ TOUCH_FOCUS_IN, /**< The touch focus-in event type */ TOUCH_FOCUS_OUT, /**< The touch focus-out event type */ - TOUCH_CANCELED, /**< The touch canceled event type */ + TOUCH_CANCELED, /**< The touch cancelled event type */ }; /** diff --git a/inc/FUiTouchEventManager.h b/inc/FUiTouchEventManager.h index 5961608..27c4ece 100644 --- a/inc/FUiTouchEventManager.h +++ b/inc/FUiTouchEventManager.h @@ -37,7 +37,7 @@ namespace Tizen { namespace Ui class _TouchEventManagerImpl; /** * @class TouchEventManager - * @brief This class stores the information of each touch events. + * @brief This class stores the information of each touch event. * * @since 2.0 * @@ -52,23 +52,23 @@ class _OSP_EXPORT_ TouchEventManager { public: /** - * Gets the instance of %TouchEventManager. + * Gets a pointer to the %TouchEventManager instance. * * @since 2.0 - * @return An instance of %TouchEventManager - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks This method provides a global point of access to the TouchEventManager. The specific error code can be accessed using the - * GetLastResult() method. + * @return The pointer to the %TouchEventManager instance + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks + * - This method provides a global point of access to the TouchEventManager. + * - The specific error code can be accessed using the GetLastResult() method. */ static TouchEventManager* GetInstance(void); /** - * Gets the list of the multi-point touches, each represented by TouchEventInfo. + * Gets the list of multi-point touches, each represented by TouchEventInfo. * * @since 2.0 - * @return A list of TouchEventInfo - * @see Tizen::Ui::TouchEventInfo + * @return The list of TouchEventInfo * */ Tizen::Base::Collection::IListT* GetTouchInfoListN(void) const; diff --git a/inc/FUiTouchFlickGestureDetector.h b/inc/FUiTouchFlickGestureDetector.h index ef81a18..ca03d9b 100644 --- a/inc/FUiTouchFlickGestureDetector.h +++ b/inc/FUiTouchFlickGestureDetector.h @@ -64,7 +64,8 @@ class _OSP_EXPORT_ TouchFlickGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -88,7 +89,7 @@ public: result Construct(void); /** - * Adds the ITouchFlickGestureEventListener instance to the flick gesture detector instance. @n + * Adds an ITouchFlickGestureEventListener instance to the flick gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -102,7 +103,7 @@ public: result AddFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener); /** - * Removes the IFlickGestureEventListener instance from the flick gesture detector instance. + * Removes an IFlickGestureEventListener instance from the flick gesture detector instance. * * @since 2.0 * @@ -115,50 +116,52 @@ public: result RemoveFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener); /** - * Gets the distance of flick. + * Gets the distance of the flick. * * @since 2.0 * * @return An error code - * @param[out] xDistance The distance in x direction - * @param[out] yDistance The distance in y direction + * @param[out] xDistance The distance in x direction, @n + * else @c -1 if an error occurs + * @param[out] yDistance The distance in y direction, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns the x distance of -1 and the y distance of -1. */ result GetDistance(int& xDistance, int& yDistance) const; /** - * Gets the distance of flick. + * Gets the distance of the flick. * * @since 2.1 * * @return An error code - * @param[out] xDistance The distance in x direction - * @param[out] yDistance The distance in y direction + * @param[out] xDistance The distance in x direction, @n + * else @c -1 if an error occurs + * @param[out] yDistance The distance in y direction, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns the x distance of -1 and the y distance of -1. */ result GetDistance(float& xDistance, float& yDistance) const; /** - * Gets the duration of flick. + * Gets the duration of the flick. * * @since 2.0 * - * @return The duration of flick + * @return The duration of the flick, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. */ int GetDuration(void) const; /** - * Gets the direction of flick. + * Gets the direction of the flick. * * @since 2.0 * - * @return The direction of flick + * @return The direction of the flick, @n + * else @c FLICK_DIRECTION_NONE if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns FLICK_DIRECTION_NONE. */ Tizen::Ui::FlickDirection GetDirection(void) const; private: diff --git a/inc/FUiTouchGestureDetector.h b/inc/FUiTouchGestureDetector.h index 69d67b6..fcf28e6 100644 --- a/inc/FUiTouchGestureDetector.h +++ b/inc/FUiTouchGestureDetector.h @@ -41,10 +41,10 @@ namespace Tizen { namespace Ui enum TouchGestureDetectorState { GESTURE_DETECTOR_STATE_READY, /**< The gesture detector is ready to recognize the gesture */ - GESTURE_DETECTOR_STATE_STARTED, /**< The gesture detector first recognizes the continuous gesture */ - GESTURE_DETECTOR_STATE_CHANGED, /**< A subsequent change happens to the continuous gesture */ - GESTURE_DETECTOR_STATE_FINISHED, /**< The discrete gesture is recognized or the continuous gesture ends */ - GESTURE_DETECTOR_STATE_FAILED, /**< The gesture detector fails in recognizing the gesture */ + GESTURE_DETECTOR_STATE_STARTED, /**< The gesture detector first recognizes the continuous gesture */ + GESTURE_DETECTOR_STATE_CHANGED, /**< A subsequent change happens to the continuous gesture */ + GESTURE_DETECTOR_STATE_FINISHED, /**< The discrete gesture is recognized or the continuous gesture ends */ + GESTURE_DETECTOR_STATE_FAILED, /**< The gesture detector fails in recognizing the gesture */ }; class Control; @@ -65,7 +65,8 @@ class _TouchGestureDetectorImpl; { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -89,12 +90,12 @@ public: result Construct(void); /** - * Gets the control to which the gesture detector is attached. @n - * If an error occurs, this method returns @c null. + * Gets the control to which the gesture detector is attached. * * @since 2.0 * - * @return The control to which the gesture detector is attached + * @return The control to which the gesture detector is attached, @n + * else @c null if an error occurs * @exception E_SUCCESS The method is successful. */ Control* GetControl(void) const; @@ -111,7 +112,7 @@ public: * @since 2.0 * * @return An error code - * @param[in] enable Whether to delay events + * @param[in] enable The boolean value that indicates whether to delay events * @exception E_SUCCESS The method is successful. * @see IsDelayTouchEventEnabled() * @see SetCancelTouchEventOnSuccessEnabled() @@ -131,14 +132,14 @@ public: bool IsDelayTouchEventEnabled(void) const; /** - * Enables or disables canceling touch event after a gesture is recognized. @n - * If canceling touch event is enabled and a gesture is recognized, touch events which have been queued are not delivered to a UI control and discarded. + * Enables or disables cancelling touch event after a gesture is recognized. @n + * If cancelling touch event is enabled and a gesture is recognized, touch events which have been queued are not delivered to a UI control and discarded. * The default value is @c false. * * @since 2.0 * * @return An error code - * @param[in] enable Whether to cancel touch event + * @param[in] enable The boolean value that indicates whether to cancel a touch event * @exception E_SUCCESS The method is successful. * @see IsCancelTouchEventOnSuccessEnabled() * @see SetDelayTouchEventEnabled() @@ -146,11 +147,11 @@ public: result SetCancelTouchEventOnSuccessEnabled(bool enable); /** - * Checks whether touch events are canceled after a gesture is recognized. + * Checks whether touch events are cancelled after a gesture is recognized. * * @since 2.0 * - * @return @c true if canceling touch event is enabled, @n + * @return @c true if cancelling a touch event is enabled, @n * else @c false * @exception E_SUCCESS The method is successful. * @see SetCancelTouchEventOnSuccessEnabled() @@ -165,13 +166,14 @@ public: * @since 2.0 * * @return An error code - * @param[in] gestureDetector The gesture detector + * @param[in] gestureDetector The gesture detector * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c gestureDetector is invalid. - * @remarks If you want to set relationship between gesture detectors, call this method. - * If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing. - * If @c gestureDetector succeeds in recognizing a gesture, - * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL. + * @remarks + * - If you want to set relationship between gesture detectors, call this method. + * - If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing. + * - If @c gestureDetector succeeds in recognizing a gesture, + * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL. */ result StartOnFailureOf(const TouchGestureDetector& gestureDetector); @@ -183,11 +185,12 @@ public: * @return An error code * @param[in] pGestureDetector A pointer of gesture detector * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The @c pGestureDetector is null. - * @remarks If you want to set relationship between gesture detectors, call this method. - * If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing. - * If @c gestureDetector succeeds in recognizing a gesture, - * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL. + * @exception E_INVALID_ARG The @c pGestureDetector is @c null. + * @remarks + * - If you want to set relationship between gesture detectors, call this method. + * - If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing. + * - If @c gestureDetector succeeds in recognizing a gesture, + * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL. */ result StartOnFailureOf(TouchGestureDetector* pGestureDetector); @@ -222,7 +225,7 @@ public: virtual void OnTouchReleased(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo); /** - * Called when touch is canceled in the Control to which the gesture detector is attached. + * Called when touch is cancelled in the Control to which the gesture detector is attached. * * @since 2.0 * @@ -233,32 +236,32 @@ public: protected: /** - * Sets the current state of gesture detector. @n + * Sets the current state of the gesture detector. @n * You can call this method only inherit %TouchGestureDetector directly. * * @since 2.0 * * @return An error code - * @param[in] state Gesture detector state + * @param[in] state The gesture detector state * @exception E_SUCCESS The method is successful. * @see GetDetectorState() */ result SetDetectorState(Tizen::Ui::TouchGestureDetectorState state); /** - * Gets the current state of gesture detector. @n - * If an error occurs, this method returns @c GESTURE_DETECTOR_STATE_READY. + * Gets the current state of the gesture detector. * * @since 2.0 * - * @return The current state of gesture detector + * @return The current state of gesture detector, @n + * else @c GESTURE_DETECTOR_STATE_READY if an error occurs * @exception E_SUCCESS The method is successful. * @see SetDetectorState() */ Tizen::Ui::TouchGestureDetectorState GetDetectorState(void) const; /** - * Adds the IGestureEventListener instance to the gesture detector instance. @n + * Adds an IGestureEventListener instance to the gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -266,13 +269,13 @@ protected: * @return An error code * @param[in] listener The event listener to add * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_ALREADY_EXIST The listener is already added. + * @exception E_OBJ_ALREADY_EXIST The listener is already added. * @see RemoveGestureEventListener() */ result AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener); /** - * Removes the gesture listener instance. + * Removes a gesture listener instance. * * @since 2.0 * diff --git a/inc/FUiTouchLongPressGestureDetector.h b/inc/FUiTouchLongPressGestureDetector.h index 763fcb3..c6ec6ad 100644 --- a/inc/FUiTouchLongPressGestureDetector.h +++ b/inc/FUiTouchLongPressGestureDetector.h @@ -41,7 +41,7 @@ class ITouchLongPressGestureEventListener; * * @final This class is not intended for extension. * - * The %TouchLongPressGestureDetector class supports changing conditions of long press gesture, and provides information about long press gesture detector. + * The %TouchLongPressGestureDetector class supports the changing conditions of the long press gesture, and provides information about the long press gesture detector. * */ class _OSP_EXPORT_ TouchLongPressGestureDetector @@ -49,7 +49,8 @@ class _OSP_EXPORT_ TouchLongPressGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -72,7 +73,7 @@ public: result Construct(void); /** - * Adds the ITouchLongPressGestureEventListener instance to the long press gesture detector instance. @n + * Adds an ITouchLongPressGestureEventListener instance to the long press gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -86,7 +87,7 @@ public: result AddLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener); /** - * Removes the ITouchLongPressGestureEventListener instance from the long press gesture detector instance. + * Removes an ITouchLongPressGestureEventListener instance from the long press gesture detector instance. * * @since 2.0 * @@ -99,7 +100,7 @@ public: result RemoveLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener); /** - * Sets the duration needed for the recognition of long press gesture. + * Sets the duration needed for the recognition of the long press gesture. * * @since 2.0 * @@ -113,27 +114,27 @@ public: result SetDuration(int duration); /** - * Gets the duration needed for the recognition of long press gesture. + * Gets the duration needed for the recognition of the long press gesture. * * @since 2.0 * - * @return The time duration + * @return The time duration, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetDuration() */ int GetDuration(void) const; /** - * Sets the allowed displacement of touch move for the recognition of long press gesture. + * Sets the allowed displacement of touch move for the recognition of the long press gesture. * * @since 2.0 * - * @param[in] allowance The allowed move displacement + * @param[in] allowance The allowed move displacement @n + * The default allowance is @c 10. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c allowance is less than @c 0. * @remarks The long press gesture is recognized when touch is pressed and moved within the given allowed displacement from the first touch point for the given duration. - * The default allowance is @c 10. * @see GetMoveAllowance() * */ @@ -144,11 +145,11 @@ public: * * @since 2.1 * - * @param[in] allowance The allowed move displacement + * @param[in] allowance The allowed move displacement @n + * The default allowance is @c 10. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c allowance is less than @c 0. * @remarks The long press gesture is recognized when touch is pressed and moved within the given allowed displacement from the first touch point for the given duration. - * The default allowance is @c 10. * @see GetMoveAllowance() * */ @@ -159,9 +160,9 @@ public: * * @since 2.0 * - * @return The allowed move bounds + * @return The allowed move bounds, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetMoveAllowance() * */ @@ -172,38 +173,39 @@ public: * * @since 2.1 * - * @return The allowed move bounds + * @return The allowed move bounds, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetMoveAllowance() * */ float GetMoveAllowanceF(void) const; /** - * Sets the finger count for the recognition of long press gesture at the same time. + * Sets the finger count for the recognition of the long press gesture at the same time. * * @since 2.0 * - * @param[in] count The finger count for long press gesture + * @param[in] count The finger count for the long press gesture * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c count is less than @c 0. - * @remarks The default value is @c 1. - * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. - * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. + * @remarks + * - The default value is @c 1. + * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. + * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. * @see GetTouchCount() * */ result SetTouchCount(int count); /** - * Gets the finger count for the recognition of long press gesture at the same time. + * Gets the finger count for the recognition of the long press gesture at the same time. * * @since 2.0 * - * @return The finger count for long press gesture + * @return The finger count for the long press gesture, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see GetTouchCount() * */ diff --git a/inc/FUiTouchPanningGestureDetector.h b/inc/FUiTouchPanningGestureDetector.h index 5703cf4..e5250a9 100644 --- a/inc/FUiTouchPanningGestureDetector.h +++ b/inc/FUiTouchPanningGestureDetector.h @@ -41,7 +41,7 @@ class ITouchPanningGestureEventListener; * * @final This class is not intended for extension. * - * The %TouchPanningGestureDetector class supports changing condition of panning gesture, and provides information about panning gesture detector. + * The %TouchPanningGestureDetector class supports the changing condition of the panning gesture, and provides information about the panning gesture detector. * */ class _OSP_EXPORT_ TouchPanningGestureDetector @@ -49,7 +49,8 @@ class _OSP_EXPORT_ TouchPanningGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -66,13 +67,13 @@ public: * Initializes this instance of %TouchPanningGestureDetector. * * @since 2.0 - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. */ result Construct(void); /** - * Adds the ITouchPanningGestureEventListener instance to the panning gesture detector instance. @n + * Adds an ITouchPanningGestureEventListener instance to the panning gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -86,7 +87,7 @@ public: result AddPanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener); /** - * Removes the ITouchPanningGestureEventListener instance from the panning gesture detector instance. + * Removes an ITouchPanningGestureEventListener instance from the panning gesture detector instance. * * @since 2.0 * @@ -103,37 +104,37 @@ public: * * @since 2.0 * - * @return A list of the TouchInfo + * @return The list of the TouchInfo, @n + * else @c null if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c null. - * @see Tizen::Ui::TouchInfo */ Tizen::Base::Collection::IList* GetTouchInfoListN(void) const; /** - * Sets the finger count for the recognition of panning gesture at the same time. + * Sets the finger count for the recognition of the panning gesture at the same time. * * @since 2.0 * - * @param[in] count The finger count for panning gesture + * @param[in] count The finger count for the panning gesture * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c count is less than @c 0. - * @remarks The default value is @c 1. - * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. - * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. + * @remarks + * - The default value is @c 1. + * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. + * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. * @see GetTouchCount() * */ result SetTouchCount(int count); /** - * Gets the finger count for the recognition of panning gesture at the same time. + * Gets the finger count for the recognition of the panning gesture at the same time. * * @since 2.0 * - * @return The finger count for panning gesture + * @return The finger count for the panning gesture, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetTouchCount() * */ diff --git a/inc/FUiTouchPinchGestureDetector.h b/inc/FUiTouchPinchGestureDetector.h index 7ff87e9..5ad0969 100644 --- a/inc/FUiTouchPinchGestureDetector.h +++ b/inc/FUiTouchPinchGestureDetector.h @@ -43,7 +43,7 @@ class ITouchPinchGestureEventListener; * * @final This class is not intended for extension. * - * The %TouchPinchGestureDetector class provides information about pinch gesture detector. + * The %TouchPinchGestureDetector class provides information about a pinch gesture detector. * */ class _OSP_EXPORT_ TouchPinchGestureDetector @@ -51,7 +51,8 @@ class _OSP_EXPORT_ TouchPinchGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -84,7 +85,7 @@ public: /** - * Adds the ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n + * Adds an ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -98,7 +99,7 @@ public: result AddPinchGestureEventListener(Tizen::Ui::ITouchPinchGestureEventListener& listener); /** - * Removes the ITouchPinchGestureEventListener instance from the pinch gesture detector instance. + * Removes an ITouchPinchGestureEventListener instance from the pinch gesture detector instance. * * @since 2.0 * @@ -115,9 +116,9 @@ public: * * @since 2.0 * - * @return The center point + * @return The center point, @n + * else Point(-1, -1) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns Point(-1, -1). */ Tizen::Graphics::Point GetCenterPoint(void) const; @@ -126,28 +127,28 @@ public: * * @since 2.1 * - * @return The center point + * @return The center point, @n + * else Point(-1, -1) if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns Point(-1, -1). */ Tizen::Graphics::FloatPoint GetCenterPointF(void) const; /** - * Gets the scale factor among touched points. + * Gets the scale factor among the touched points. * * @since 2.0 * - * @return The scale factor among touched points + * @return The scale factor among the touched points * @remarks Gets the scale factor for a pinch gesture in progress. */ int GetScale(void) const; /** - * Gets the scale factor among touched point + * Gets the scale factor among the touched points. * * @since 2.1 * - * @return The scale factor among touched points + * @return The scale factor among the touched points * @remarks Gets the scale factor for a pinch gesture in progress. */ float GetScaleF(void) const; diff --git a/inc/FUiTouchRotationGestureDetector.h b/inc/FUiTouchRotationGestureDetector.h index 6e1a596..2329dd0 100644 --- a/inc/FUiTouchRotationGestureDetector.h +++ b/inc/FUiTouchRotationGestureDetector.h @@ -41,7 +41,7 @@ class ITouchRotationGestureEventListener; * * @final This class is not intended for extension. * - * The %TouchRotationGestureDetector class provides information about rotation gesture detector. + * The %TouchRotationGestureDetector class provides information about a rotation gesture detector. * */ class _OSP_EXPORT_ TouchRotationGestureDetector @@ -49,7 +49,8 @@ class _OSP_EXPORT_ TouchRotationGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -72,7 +73,7 @@ public: result Construct(void); /** - * Adds the ITouchRotationGestureEventListener instance to the rotation gesture detector instance. @n + * Adds an ITouchRotationGestureEventListener instance to the rotation gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -86,7 +87,7 @@ public: result AddRotationGestureEventListener(Tizen::Ui::ITouchRotationGestureEventListener& listener); /** - * Removes the ITouchRotationGestureEventListener instance from the rotation gesture detector instance. + * Removes an ITouchRotationGestureEventListener instance from the rotation gesture detector instance. * * @since 2.0 * @@ -103,9 +104,9 @@ public: * * @since 2.0 * - * @return The angle between two touch points + * @return The angle between two touch points, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. */ float GetAngle(void) const; @@ -114,9 +115,9 @@ public: * * @since 2.0 * - * @return The distance between two touch points + * @return The distance between two touch points, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. */ int GetDistance(void) const; @@ -125,9 +126,9 @@ public: * * @since 2.1 * - * @return The distance between two touch points + * @return The distance between two touch points, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. */ float GetDistanceF(void) const; diff --git a/inc/FUiTouchTapGestureDetector.h b/inc/FUiTouchTapGestureDetector.h index 25f5701..03aed59 100644 --- a/inc/FUiTouchTapGestureDetector.h +++ b/inc/FUiTouchTapGestureDetector.h @@ -41,7 +41,7 @@ class ITouchTapGestureEventListener; * * @final This class is not intended for extension. * - * The %TouchTapGestureDetector class supports changing conditions of tap gesture, and provides information about tap gesture detector. + * The %TouchTapGestureDetector class supports the changing conditions of the tap gesture, and provides information about tap gesture detector. * */ class _OSP_EXPORT_ TouchTapGestureDetector @@ -49,7 +49,8 @@ class _OSP_EXPORT_ TouchTapGestureDetector { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ @@ -72,7 +73,7 @@ public: result Construct(void); /** - * Adds the ITouchTapGestureEventListener instance to the tap gesture detector instance. @n + * Adds an ITouchTapGestureEventListener instance to the tap gesture detector instance. @n * The added listener gets notified when a gesture is recognized. * * @since 2.0 @@ -86,7 +87,7 @@ public: result AddTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener); /** - * Removes the ITouchTapGestureEventListener instance from the tap gesture detector instance. + * Removes an ITouchTapGestureEventListener instance from the tap gesture detector instance. * * @since 2.0 * @@ -99,7 +100,7 @@ public: result RemoveTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener); /** - * Sets the tap count required for the recognition of tap gesture. + * Sets the tap count required for the recognition of the tap gesture. * * @since 2.0 * @@ -113,14 +114,14 @@ public: result SetTapCount(int count); /** - * Gets the tap count required for the recognition of tap gesture. + * Gets the tap count required for the recognition of the tap gesture. * * @since 2.0 * - * @return The tap count + * @return The tap count, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an error occurs, this method returns @c -1. + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SetTapCount() */ int GetTapCount(void) const; @@ -130,7 +131,7 @@ public: * * @since 2.0 * - * @param[in] interval The time interval between taps + * @param[in] interval The time interval between taps * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c interval is less than @c 0. * @remarks If the interval between touches is longer than @c interval, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 330. @@ -144,71 +145,74 @@ public: * * @since 2.0 * - * @return The time interval between taps + * @return The time interval between taps, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an error occurs, this method returns @c -1. * @see SetTapInterval() */ int GetTapInterval(void) const; /** - * Sets the finger count for the recognition of tap gesture at the same time. + * Sets the finger count for the recognition of the tap gesture at the same time. * * @since 2.0 * - * @param[in] count The finger count for long press gesture + * @param[in] count The finger count for the long press gesture * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c count is less than @c 0. - * @remarks If the touch count at the same time is less than @c count, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 1. @n - * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. - * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. + * @remarks + * - If the touch count at the same time is less than @c count, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 1. @n + * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector. + * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected. * @see GetTouchCount() * */ result SetTouchCount(int count); /** - * Gets the finger count for the recognition of tap gesture at the same time. + * Gets the finger count for the recognition of the tap gesture at the same time. * * @since 2.0 * - * @return The finger count for tap gesture + * @return The finger count for the tap gesture, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If an error occurs, this method returns @c -1. * @see GetTouchCount() * */ int GetTouchCount(void) const; /** - * Sets the allowed displacement between touches for the recognition of tap gesture. + * Sets the allowed displacement between touches for the recognition of the tap gesture. * * @since 2.0 * * @param[in] allowance The allowed displacement between touches * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c allowance is less than @c 0. - * @exception E_INVALID_CONDITION %Touch count is more than @c 2. - * @remarks The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n - * MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored. + * @exception E_INVALID_CONDITION Touch count is more than @c 2. + * @remarks + * - The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n + * - MoveAllowance is effective only when touch count is @c 1. If touch count is more than @c 1, MoveAllowance is ignored. * @see GetMoveAllowance() * */ result SetMoveAllowance(int allowance); /** - * Sets the allowed displacement between touches for the recognition of tap gesture. + * Sets the allowed displacement between touches for the recognition of the tap gesture. * * @since 2.1 * * @param[in] allowance The allowed displacement between touches * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified @c allowance is less than @c 0. - * @exception E_INVALID_CONDITION %Touch count is more than @c 2. - * @remarks The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n - * MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored. + * @exception E_INVALID_CONDITION Touch count is more than @c 2. + * @remarks + * - The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n + * - MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored. * @see GetMoveAllowance() * */ @@ -219,9 +223,9 @@ public: * * @since 2.0 * - * @return The allowed displacement between touches + * @return The allowed displacement between touches, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetMoveAllowance() */ int GetMoveAllowance(void) const; @@ -231,9 +235,9 @@ public: * * @since 2.1 * - * @return The allowed displacement between touches + * @return The allowed displacement between touches, @n + * else @c -1 if an error occurs * @exception E_SUCCESS The method is successful. - * @remarks If an error occurs, this method returns @c -1. * @see SetMoveAllowance() */ float GetMoveAllowanceF(void) const; diff --git a/inc/FUiUiConfiguration.h b/inc/FUiUiConfiguration.h index 14ac4b7..a255767 100644 --- a/inc/FUiUiConfiguration.h +++ b/inc/FUiUiConfiguration.h @@ -58,9 +58,10 @@ public: * Sets an empty string if you want to reset * @exception E_SUCCESS The method is successful. * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. - * @remarks At First, the value of fontName is considered app font name if it matches one of the face names of the font files which is located in '/res/font'. - * If not, the value of fontName is considered system font name if it matches one of the retrieved values using GetSystemFontListN(). - * @remarks The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence. + * @remarks + * - At First, the value of fontName is considered as the app font name if it matches one of the face names of the font files which is located in '/res/font'. + * If not, the value of fontName is considered as the system font name if it matches one of the retrieved values using GetSystemFontListN(). + * - The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence. * @see GetDefaultFont() */ static result SetDefaultFont(const Tizen::Base::String& fontName); @@ -83,16 +84,16 @@ public: * * @return An error code * @param[in] fileName The file name of a font-resource located in @b '/res/font', @n - * else sets an empty string to reset - * @exception E_SUCCESS The method is successful. + * else sets an empty string to reset + * @exception E_SUCCESS The method is successful. * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. - * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. + * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. * @see GetDefaultFontFile() */ static result SetDefaultFontFromFile(const Tizen::Base::String& fileName); /** - * Gets a font file name of the control. + * Gets the font file name of the control. * * @since 2.1 * @@ -107,10 +108,10 @@ public: * * @since 2.1 * - * @return An actual font size of given font size string + * @return The actual font size of the given font size string * @param[in] sizeString The predefined string value, such as "giant", "huge", "large", "medium", or "small" @n - * It is case-insensitive and can be retrieved using Tizen::System::SettingInfo::GetValue(). - * @remarks If the specified @c sizeString is not defined, @c -1 is returned. + * It is case-insensitive and can be retrieved using Tizen::System::SettingInfo::GetValue(). + * @remarks If the specified @c sizeString is not defined, @c -1 is returned. */ static float GetFontSize(const Tizen::Base::String& sizeString); diff --git a/inc/FUiUiConfigurationTypes.h b/inc/FUiUiConfigurationTypes.h index 17388e1..a80d3c3 100644 --- a/inc/FUiUiConfigurationTypes.h +++ b/inc/FUiUiConfigurationTypes.h @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { /** * @struct ColorKey - * @brief This struct provides the color keys of controls. + * @brief This struct provides the color keys of controls. * * @since 2.1 * @@ -42,7 +42,7 @@ struct _OSP_EXPORT_ ColorKey { /** * @struct Button - * @brief This struct provides the color keys of %Button. + * @brief This struct provides the color keys of %Button. * * @since 2.1 * @@ -311,7 +311,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct ColorPicker - * @brief This struct provides the color keys of %ColorPicker. + * @brief This struct provides the color keys of %ColorPicker. * * @since 2.1 * @@ -480,7 +480,7 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED; /** - * The property key to get the diabled text color of the item of context menu. + * The property key to get the disabled text color of the item of context menu. * * @since 2.2 */ @@ -539,28 +539,28 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int BG_NORMAL; /** - * The property key to get the normal background color of button of date time picker. + * The property key to get the normal background color of the button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_BG_NORMAL; /** - * The property key to get the pressed background color of AM/PM button of date time picker. + * The property key to get the pressed background color of the AM/PM button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_BG_PRESSED; /** - * The property key to get the highlighted background color of AM/PM button of date time picker. + * The property key to get the highlighted background color of the AM/PM button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_BG_HIGHLIGHTED; /** - * The property key to get the disabled background color of AM/PM button of date time picker. + * The property key to get the disabled background color of the AM/PM button of date time picker. * * @since 2.1 */ @@ -595,28 +595,28 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int TEXT_DISABLED; /** - * The property key to get the normal text color of AM/PM button of date time picker. + * The property key to get the normal text color of the AM/PM button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_TEXT_NORMAL; /** - * The property key to get the pressed text color of AM/PM button of date time picker. + * The property key to get the pressed text color of the AM/PM button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_TEXT_PRESSED; /** - * The property key to get the highlighted text color of AM/PM button of date time picker. + * The property key to get the highlighted text color of the AM/PM button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int AM_PM_TEXT_HIGHLIGHTED; /** - * The property key to get the disabled text color of AM/PM button of date time picker. + * The property key to get the disabled text color of the AM/PM button of date time picker. * * @since 2.1 */ @@ -637,49 +637,49 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int DIVIDER_RIGHT_HALF; /** - * The property key to get the normal background color of the picker button of date time picker + * The property key to get the normal background color of the picker button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_NORMAL; /** - * The property key to get the pressed background color of the picker button of date time picker + * The property key to get the pressed background color of the picker button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_PRESSED; /** - * The property key to get the disabled background color of the picker button of date time picker + * The property key to get the disabled background color of the picker button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_DISABLED; /** - * The property key to get the highlighted background color of the picker button of date time picker + * The property key to get the highlighted background color of the picker button of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED; /** - * The property key to get the display area background color of date time picker + * The property key to get the display area background color of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int DISPLAY_BG_NORMAL; /** - * The property key to get the normal title color of date time picker + * The property key to get the normal title color of date time picker. * * @since 2.1 */ _OSP_EXPORT_ static const int TITLE_NORMAL; /** - * The property key to get the disabled title color of date time picker + * The property key to get the disabled title color of date time picker. * * @since 2.1 */ @@ -878,28 +878,28 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; /** - * The property key to get the normal background color of the picker button of edit date + * The property key to get the normal background color of the picker button of edit date. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_NORMAL; /** - * The property key to get the pressed background color of the picker button of edit date + * The property key to get the pressed background color of the picker button of edit date. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_PRESSED; /** - * The property key to get the disabled background color of the picker button of edit date + * The property key to get the disabled background color of the picker button of edit date. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_DISABLED; /** - * The property key to get the highlighted background color of the picker button of edit date + * The property key to get the highlighted background color of the picker button of edit date. * * @since 2.1 */ @@ -1009,35 +1009,35 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; /** - * The property key to get the highlighted text color of the button of edit time + * The property key to get the highlighted text color of the button of edit time. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED; /** - * The property key to get the normal background color of the picker button of edit time + * The property key to get the normal background color of the picker button of edit time. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_NORMAL; /** - * The property key to get the pressed background color of the picker button of edit time + * The property key to get the pressed background color of the picker button of edit time. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_PRESSED; /** - * The property key to get the disabled background color of the picker button of edit time + * The property key to get the disabled background color of the picker button of edit time. * * @since 2.1 */ _OSP_EXPORT_ static const int CONTENT_BG_DISABLED; /** - * The property key to get the highlighted background color of the picker button of edit time + * The property key to get the highlighted background color of the picker button of edit time. * * @since 2.1 */ @@ -1114,7 +1114,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Footer - * @brief This struct provides the color keys of %Footer. + * @brief This struct provides the color keys of %Footer. * * @since 2.1 * @@ -1700,7 +1700,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Form - * @brief This struct provides the color keys of %Form. + * @brief This struct provides the color keys of %Form. * * @since 2.1 * @@ -1719,7 +1719,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Gallery - * @brief This struct provides the color keys of %Gallery. + * @brief This struct provides the color keys of %Gallery. * * @since 2.1 * @@ -1769,7 +1769,7 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; /** - * The property key to get the color of the title text of translucent style of header. + * The property key to get the color of the title text of the translucent style of header. * * @since 2.1 */ @@ -2182,62 +2182,62 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_SELECTED; /** - * The property key to get the normal background color of badge icon of header. + * The property key to get the normal background color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_BG_NORMAL; /** - * The property key to get the disabled background color of badge icon of header. + * The property key to get the disabled background color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_BG_DISABLED; /** - * The property key to get the pressed background color of badge icon of header. + * The property key to get the pressed background color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_BG_PRESSED; /** - * The property key to get the highlighted background color of badge icon of header. + * The property key to get the highlighted background color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_BG_HIGHLIGHTED; /** - * The property key to get the normal text color of badge icon of header. + * The property key to get the normal text color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_TEXT_NORMAL; /** - * The property key to get the disabled text color of badge icon of header. + * The property key to get the disabled text color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_TEXT_DISABLED; /** - * The property key to get the pressed text color of badge icon of header. + * The property key to get the pressed text color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_TEXT_PRESSED; /** - * The property key to get the highlighted text color of badge icon of header. + * The property key to get the highlighted text color of the badge icon of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BADGE_ICON_TEXT_HIGHLIGHTED; - /** + /** * The property key to get the color of the left divider line of header. * * @since 2.1 @@ -2294,84 +2294,84 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int BUTTON_ITEM_BG_HIGHLIGHTED; /** - * The property key to get the normal background color of the button item of the translucent style of header + * The property key to get the normal background color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_NORMAL; /** - * The property key to get the disabled background color of the button item of the translucent style of header + * The property key to get the disabled background color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_DISABLED; /** - * The property key to get the pressed background color of the button item of the translucent style of header + * The property key to get the pressed background color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_PRESSED; /** - * The property key to get the highlighted background color of the button item of the translucent style of header + * The property key to get the highlighted background color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED; /** - * The property key to get the normal text color of the button item of header + * The property key to get the normal text color of the button item of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_NORMAL; /** - * The property key to get the disabled text color of the button item of header + * The property key to get the disabled text color of the button item of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_DISABLED; /** - * The property key to get the pressed text color of the button item of header + * The property key to get the pressed text color of the button item of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_PRESSED; /** - * The property key to get the highlighted text color of the button item of header + * The property key to get the highlighted text color of the button item of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_HIGHLIGHTED; /** - * The property key to get the normal text color of the button item of the translucent style of header + * The property key to get the normal text color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL; /** - * The property key to get the disabled text color of the button item of the translucent style of header + * The property key to get the disabled text color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED; /** - * The property key to get the pressed text color of the button item of the translucent style of header + * The property key to get the pressed text color of the button item of the translucent style of header. * * @since 2.1 */ _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED; /** - * The property key to get the highlighted text color of the button item of the translucent style of header + * The property key to get the highlighted text color of the button item of the translucent style of header. * * @since 2.1 */ @@ -2439,7 +2439,7 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int INNER_TEXT_HIGHLIGHTED; /** - * The property key to get the background color of inner text area of icon list. + * The property key to get the background color of the inner text area of icon list. * * @since 2.1 */ @@ -2476,7 +2476,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct InputPad - * @brief This struct provides the color keys of %InputPad. + * @brief This struct provides the color keys of %InputPad. * * @since 2.1 * @@ -2565,7 +2565,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Label - * @brief This struct provides the color keys of %Label. + * @brief This struct provides the color keys of %Label. * * @since 2.1 * @@ -2584,7 +2584,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct MessageBox - * @brief This struct provides the color keys of %MessageBox. + * @brief This struct provides the color keys of %MessageBox. * * @since 2.1 * @@ -2687,7 +2687,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct OptionMenu - * @brief This struct provides the color keys of %OptionMenu. + * @brief This struct provides the color keys of %OptionMenu. * * @since 2.1 * @@ -2804,7 +2804,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Panel - * @brief This struct provides the color keys of %Panel. + * @brief This struct provides the color keys of %Panel. * * @since 2.1 * @@ -2823,7 +2823,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Popup - * @brief This struct provides the color keys of %Popup. + * @brief This struct provides the color keys of %Popup. * * @since 2.1 * @@ -2856,7 +2856,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Progress - * @brief This struct provides the color keys of %Progress. + * @brief This struct provides the color keys of %Progress. * * @since 2.1 * @@ -2882,7 +2882,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Scroll - * @brief This struct provides the color keys of %Scroll. + * @brief This struct provides the color keys of %Scroll. * * @since 2.1 * @@ -2913,7 +2913,7 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int JUMP_TO_TOP_PRESSED; /** - * The property key to get the normal background color of the button of scroll + * The property key to get the normal background color of the button of scroll. * * @since 2.1 */ @@ -3095,7 +3095,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct Slider - * @brief This struct provides the color keys of %Slider. + * @brief This struct provides the color keys of %Slider. * * @since 2.1 * @@ -3212,7 +3212,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct SplitPanel - * @brief This struct provides the color keys of %SplitPanel. + * @brief This struct provides the color keys of %SplitPanel. * * @since 2.1 * @@ -3409,7 +3409,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct TableView - * @brief This struct provides the color keys of %TableView. + * @brief This struct provides the color keys of %TableView. * * @since 2.1 * @@ -3426,14 +3426,14 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int BG_NORMAL; /** - * The property key to get the color of top divider of table view. + * The property key to get the color of the top divider of table view. * * @since 2.1 */ _OSP_EXPORT_ static const int ITEM_DIVIDER_TOP_BG_NORMAL; /** - * The property key to get the color of bottom divider of table view. + * The property key to get the color of the bottom divider of table view. * * @since 2.1 */ @@ -3678,14 +3678,14 @@ struct _OSP_EXPORT_ ColorKey _OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL; /** - * The property key to get the normal color of Left Divider of table view. + * The property key to get the normal color of the Left Divider of table view. * * @since 2.2 */ _OSP_EXPORT_ static const int ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL; /** - * The property key to get the normal color of Right Divider of table view. + * The property key to get the normal color of the Right Divider of table view. * * @since 2.2 */ @@ -3694,7 +3694,7 @@ struct _OSP_EXPORT_ ColorKey /** * @struct TokenEdit - * @brief This struct provides the color keys of %TokenEdit. + * @brief This struct provides the color keys of %TokenEdit. * * @since 2.1 * diff --git a/inc/FUiVariant.h b/inc/FUiVariant.h index 1bad2a9..19e1ab8 100644 --- a/inc/FUiVariant.h +++ b/inc/FUiVariant.h @@ -596,8 +596,10 @@ public: * @return The @c signed @c int equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_INT. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_INT. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_INT. * */ int ToInt(void) const; @@ -610,8 +612,10 @@ public: * @return The @c unsigned @c int equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_UINT. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_UINT. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_UINT. * */ unsigned int ToUInt(void) const; @@ -624,8 +628,10 @@ public: * @return The @c bool equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_BOOL. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c false and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_BOOL. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c false and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_BOOL. * */ bool ToBool(void) const; @@ -638,8 +644,10 @@ public: * @return The @c float equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_FLOAT. * */ float ToFloat(void) const; @@ -652,8 +660,10 @@ public: * @return The @c double equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DOUBLE. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DOUBLE. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_DOUBLE. * */ double ToDouble(void) const; @@ -666,8 +676,10 @@ public: * @return The @c signed @c long equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONG. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONG. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_LONG. * */ long ToLong(void) const; @@ -680,8 +692,10 @@ public: * @return The @c unsigned @c long equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONG. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONG. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_ULONG. * */ unsigned long ToULong(void) const; @@ -694,8 +708,10 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONGLONG. * - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONGLONG. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_LONGLONG. * */ long long ToLongLong(void) const; @@ -708,8 +724,10 @@ public: * @return The @c unsigned @c long @c long equivalent of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONGLONG. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONGLONG. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_ULONGLONG. * */ unsigned long long ToULongLong(void) const; @@ -722,8 +740,10 @@ public: * @return A Tizen::Base::String representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_STRING. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns String("") and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_STRING. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns String("") and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_STRING. * */ Tizen::Base::String ToString(void) const; @@ -736,8 +756,10 @@ public: * @return A Tizen::Base::DateTime representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DATETIME. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DATETIME. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_DATETIME. * */ Tizen::Base::DateTime ToDateTime(void) const; @@ -750,8 +772,10 @@ public: * @return A Tizen::Graphics::Color representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_COLOR. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns Color and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_COLOR. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns Color and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_COLOR. * */ Tizen::Graphics::Color ToColor(void) const; @@ -764,8 +788,10 @@ public: * @return A Tizen::Graphics::Point representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_POINT. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns Point and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_POINT. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns Point and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_POINT. * */ Tizen::Graphics::Point ToPoint(void) const; @@ -778,8 +804,10 @@ public: * @return A Tizen::Graphics::FloatPoint representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_FLOAT_POINT. * */ Tizen::Graphics::FloatPoint ToFloatPoint(void) const; @@ -792,8 +820,10 @@ public: * @return A Tizen::Graphics::Rectangle representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_RECTANGLE. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_RECTANGLE. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_RECTANGLE. * */ Tizen::Graphics::Rectangle ToRectangle(void) const; @@ -806,8 +836,10 @@ public: * @return A Tizen::Graphics::FloatRectangle representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE. * */ Tizen::Graphics::FloatRectangle ToFloatRectangle(void) const; @@ -820,8 +852,10 @@ public: * @return A Tizen::Graphics::Dimension representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DIMENSION. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DIMENSION. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_DIMENSION. * */ Tizen::Graphics::Dimension ToDimension(void) const; @@ -834,8 +868,10 @@ public: * @return A Tizen::Graphics::FloatDimension representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION. * */ Tizen::Graphics::FloatDimension ToFloatDimension(void) const; @@ -848,8 +884,10 @@ public: * @return A Tizen::Graphics::FloatMatrix4 representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_MATRIX4. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatMatrix4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_MATRIX4. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatMatrix4() and generates E_INVALID_OPERATION exception if the current + * variant type is not VARIANT_TYPE_FLOAT_MATRIX4. * */ Tizen::Graphics::FloatMatrix4 ToFloatMatrix4(void) const; @@ -862,8 +900,10 @@ public: * @return A Tizen::Graphics::FloatPoint3 representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT3. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatPoint3 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT3. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatPoint3 and generates @c E_INVALID_OPERATION exception if the current + * variant type is not @c VARIANT_TYPE_FLOAT_POINT3. * */ Tizen::Graphics::FloatPoint3 ToFloatPoint3(void) const; @@ -876,8 +916,10 @@ public: * @return A Tizen::Graphics::FloatVector4 representing the value of the current instance * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_VECTOR4. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * The method returns FloatVector4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_VECTOR4. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method returns FloatVector4() and generates E_INVALID_OPERATION exception if the current + * variant type is not VARIANT_TYPE_FLOAT_VECTOR4. * */ Tizen::Graphics::FloatVector4 ToFloatVector4(void) const; @@ -919,7 +961,8 @@ public: * @since 2.0 * * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution for all inputs. + * @remarks Two equal instances must return the same hash value. @n + * For better performance, the used hash function must generate a random distribution for all inputs. */ virtual int GetHashCode(void) const; diff --git a/inc/FUiVerticalBoxLayout.h b/inc/FUiVerticalBoxLayout.h index 24e76d1..837e494 100644 --- a/inc/FUiVerticalBoxLayout.h +++ b/inc/FUiVerticalBoxLayout.h @@ -174,7 +174,8 @@ class _OSP_EXPORT_ VerticalBoxLayout { public: /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 * @@ -231,9 +232,9 @@ public: * @param[in] childControl The control for which the alignment is set * @param[in] alignment The horizontal alignment * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. - * @remarks By default, the horizontal alignment is HORIZONTAL_ALIGNLEFT. + * @remarks By default, the horizontal alignment is @c HORIZONTAL_ALIGNLEFT. */ result SetHorizontalAlignment(Control& childControl, LayoutHorizontalAlignment alignment); @@ -246,14 +247,14 @@ public: * @param[in] childControl The control for which the space is set * @param[in] space The space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the spacing is set to @c 0. */ result SetSpacing(Control& childControl, int space); /** - * Sets the space between a specified control and its predecessor. + * Sets the space between the specified control and its predecessor. * * @since 2.1 * @@ -261,7 +262,7 @@ public: * @param[in] childControl The control for which the space is set * @param[in] space The space * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the spacing is set to @c 0. */ @@ -277,14 +278,14 @@ public: * @param[in] left The left margin * @param[in] right The right margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ result SetHorizontalMargin(Control& childControl, int left, int right); /** - * Sets the horizontal margins of a specified control. + * Sets the horizontal margins of the specified control. * * @since 2.1 * @@ -293,7 +294,7 @@ public: * @param[in] left The left margin * @param[in] right The right margin * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the margins are set to @c 0. */ @@ -308,13 +309,13 @@ public: * @param[in] childControl The control for which the width is set * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, int width); /** - * Sets the width of a specified control with the fixed length. + * Sets the width of the specified control with the fixed length. * * @since 2.1 * @@ -322,7 +323,7 @@ public: * @param[in] childControl The control for which the width is set * @param[in] width The value of the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetWidth(Control& childControl, float width); @@ -336,7 +337,7 @@ public: * @param[in] childControl The control for which the width is set * @param[in] policy The fitting policy for the width * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy); @@ -350,13 +351,13 @@ public: * @param[in] childControl The control for which the height is set * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, int height); /** - * Sets the height of a specified control with a fixed length. + * Sets the height of the specified control with a fixed length. * * @since 2.1 * @@ -364,7 +365,7 @@ public: * @param[in] childControl The control for which the height is set * @param[in] height The value of the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. */ result SetHeight(Control& childControl, float height); @@ -378,9 +379,9 @@ public: * @param[in] childControl The control for which the height is set * @param[in] policy The fitting policy for the height * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. - * @remarks Setting FIT_POLICY_PARENT as @c policy does not cause the height of the control to change. + * @remarks Setting @c FIT_POLICY_PARENT as @c policy does not cause the height of the control to change. */ result SetVerticalFitPolicy(Control& childControl, FitPolicy policy); @@ -393,7 +394,7 @@ public: * @param[in] childControl The control for which the weight is set * @param[in] weight The weight that indicates how much extra space the control occupies in proportion to it, in the %VerticalBoxLayout. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout. + * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout. * @exception E_SYSTEM A system error has occurred. * @remarks By default, the weight is set to @c 0.0f. */ diff --git a/inc/FUiWindow.h b/inc/FUiWindow.h index ebc8eac..d501585 100644 --- a/inc/FUiWindow.h +++ b/inc/FUiWindow.h @@ -74,7 +74,7 @@ enum WindowZOrderGroup * * The %Window class is an abstract base class. * The %Window is a top-level window such as Controls::Frame, Controls::MessageBox, and Controls::Popup. - * The descendants of a %Window can exist outside of their applications's bounds. + * The descendants of a %Window can exist outside their applications' bounds. * */ class _OSP_EXPORT_ Window @@ -91,7 +91,7 @@ public: public: /** - * Adds the listener instance. @n + * Adds a listener instance. @n * The added listener can listen to events on when they are fired. * * @since 2.0 @@ -118,12 +118,13 @@ public: * @since 2.0 * * @final Although this method is virtual, it should not be overridden. - * If overridden, it may not work as expected. + * If overridden, it may not work as expected. * * @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, or - * this control is not 'displayable'. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION Either of the following conditions has occurred: + * - The current state of the instance prohibits the execution of the specified operation. + * - This control is not 'displayable'. * @exception E_SYSTEM A system error has occurred. */ virtual result Show(void); @@ -190,15 +191,16 @@ protected: * @since 2.0 * * @return An error code - * @param[in] rect The rectangle bounds to set - * @param[in] resizable Set to @c true to make the window resizable, @n + * @param[in] rect The rectangle bounds to set + * @param[in] resizable Set to @c true to make the window resizable, @n * else @c false - * @param[in] movable Set to @c true to make the window movable, @n + * @param[in] movable Set to @c true to make the window movable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() */ result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -209,15 +211,16 @@ protected: * @since 2.1 * * @return An error code - * @param[in] rect The rectangle bounds to set - * @param[in] resizable Set to @c true to make the window resizable, @n + * @param[in] rect The rectangle bounds to set + * @param[in] resizable Set to @c true to make the window resizable, @n * else @c false - * @param[in] movable Set to @c true to make the window movable, @n + * @param[in] movable Set to @c true to make the window movable, @n * else @c false * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() */ result Construct(const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); @@ -228,42 +231,41 @@ protected: * @since 2.0 * * @return An error code - * @param[in] layout The layout for both the portrait and landscape mode - * @param[in] rect The location and size of the %window - * @param[in] resizable Set to @c true to make the window resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the window movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks This method must be called from the derived classes's construct methods. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] rect The location and size of the %window + * @param[in] resizable Set to @c true to make the window resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the window movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() + * @see Container::GetLayoutN() */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); /** - * Initializes this instance of %Window with a specified layout and rectangular region. + * Initializes this instance of %Window with the specified layout and rectangular region. * * @since 2.1 * * @return An error code - * @param[in] layout The layout for both the portrait and landscape mode - * @param[in] rect The location and size of the window - * @param[in] resizable Set to @c true to make the window resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the window movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] rect The location and size of the window + * @param[in] resizable Set to @c true to make the window resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the window movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. * @remarks - * - This method must be called from the derived classes's construct methods. - * - If the @c resizable is @c false, IsResizable() returns @c false. + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() + * @see Container::GetLayoutN() */ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); @@ -273,22 +275,20 @@ protected: * @since 2.0 * * @return An error code - * @param[in] portraitLayout The layout for the portrait mode + * @param[in] portraitLayout The layout for the portrait mode * @param[in] landscapeLayout The layout for the landscape mode - * @param[in] rect The location and size of the %Window - * @param[in] resizable Set to @c true to make the window resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the window movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @param[in] rect The location and size of the %Window + * @param[in] resizable Set to @c true to make the window resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the window movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() - * @see Tizen::Ui::Container::GetPortraitLayoutN() - * @see Tizen::Ui::Container::GetLandscapeLayoutN() + * @see Container::GetLayoutN() + * @see Container::GetPortraitLayoutN() + * @see Container::GetLandscapeLayoutN() */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); @@ -298,27 +298,26 @@ protected: * @since 2.1 * * @return An error code - * @param[in] portraitLayout The layout for the portrait mode + * @param[in] portraitLayout The layout for the portrait mode * @param[in] landscapeLayout The layout for the landscape mode - * @param[in] rect The location and size of the %Window - * @param[in] resizable Set to @c true to make the window resizable, @n - * else @c false - * @param[in] movable Set to @c true to make the window movable, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @remarks If the @c resizable is @c false, IsResizable() returns @c false. + * @param[in] rect The location and size of the %Window + * @param[in] resizable Set to @c true to make the window resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the window movable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks If @c resizable is @c false, IsResizable() returns @c false. * @see IsResizable() - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Layout - * @see Tizen::Ui::Container::GetLayoutN() - * @see Tizen::Ui::Container::GetPortraitLayoutN() - * @see Tizen::Ui::Container::GetLandscapeLayoutN() + * @see Container::GetLayoutN() + * @see Container::GetPortraitLayoutN() + * @see Container::GetLandscapeLayoutN() */ result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. * * @since 2.0 */ diff --git a/inc/khrplatform.h b/inc/khrplatform.h index be0197b..5b7360e 100644 --- a/inc/khrplatform.h +++ b/inc/khrplatform.h @@ -393,183 +393,165 @@ typedef enum *-----------------------------------------------------------------------*/ // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef void GLvoid -// \brief A type definition for GLvoid. -// @since 2.0 -// +/** +* A type definition for GLvoid +* @since 2.0 +*/ typedef void GLvoid; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef char GLchar -// \brief A type definition for GLchar. -// @since 2.0 -// +/** +* A type definition for GLchar +* @since 2.0 +*/ typedef char GLchar; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef unsigned int GLenum -// \brief A type definition for GLenum. -// @since 2.0 -// +/** +* A type definition for GLenum +* @since 2.0 +*/ typedef unsigned int GLenum; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef unsigned char GLboolean -// \brief A type definition for GLboolean. -// @since 2.0 -// +/** +* A type definition for GLboolean +* @since 2.0 +*/ typedef unsigned char GLboolean; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef unsigned int GLbitfield -// \brief A type definition for GLbitfield. -// @since 2.0 -// +/** +* A type definition for GLbitfield +* @since 2.0 +*/ typedef unsigned int GLbitfield; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef signed char GLbyte -// \brief A type definition for GLbyte. -// @since 2.0 -// +/** +* A type definition for GLbyte +* @since 2.0 +*/ typedef khronos_int8_t GLbyte; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef short GLshort -// \brief A type definition for GLshort. -// @since 2.0 -// +/** +* A type definition for GLshort +* @since 2.0 +*/ typedef short GLshort; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef int GLint -// \brief A type definition for GLint. -// @since 2.0 -// +/** +* A type definition for GLint +* @since 2.0 +*/ typedef int GLint; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef int GLsizei -// \brief A type definition for GLsizei. -// @since 2.0 -// +/** +* A type definition for GLsizei +* @since 2.0 +*/ typedef int GLsizei; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_uint8_t GLubyte -// \brief A type definition for GLubyte. -// @since 2.0 -// +/** +* A type definition for GLubyte +* @since 2.0 +*/ typedef khronos_uint8_t GLubyte; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef unsigned short GLushort -// \brief A type definition for GLushort. -// @since 2.0 -// +/** +* A type definition for GLushort +* @since 2.0 +*/ typedef unsigned short GLushort; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var unsigned int GLuint -// \brief A type definition for GLuint. -// @since 2.0 -// +/** +* A type definition for GLuint +* @since 2.0 +*/ typedef unsigned int GLuint; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_float_t GLfloat -// \brief A type definition for GLfloat. -// @since 2.0 -// +/** +* A type definition for GLfloat +* @since 2.0 +*/ typedef khronos_float_t GLfloat; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_float_t GLclampf -// \brief A type definition for GLclampf. -// @since 2.0 -// +/** +* A type definition for GLclampf +* @since 2.0 +*/ typedef khronos_float_t GLclampf; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_int32_t GLfixed -// \brief A type definition for GLfixed. -// @since 2.0 -// +/** +* A type definition for GLfixed +* @since 2.0 +*/ typedef khronos_int32_t GLfixed; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_int32_t GLclampx -// \brief A type definition for GLclampx. -// @since 2.0 -// +/** +* A type definition for GLclampx +* @since 2.0 +*/ typedef khronos_int32_t GLclampx; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_intptr_t GLintptr -// \brief A type definition for GLintptr. -// @since 2.0 -// +/** +* A type definition for GLintptr +* @since 2.0 +*/ typedef khronos_intptr_t GLintptr; // -// This method is for internal use only. // Using this method can cause behavioral, security-related, and consistency-related issues in the application. // -// \var typedef khronos_ssize_t GLsizeiptr -// \brief A type definition for GLsizeiptr. -// @since 2.0 -// +/** +* A type definition for GLsizeiptr +* @since 2.0 +*/ typedef khronos_ssize_t GLsizeiptr; /** diff --git a/packaging/osp-uifw.spec b/packaging/osp-uifw.spec index 49be89c..9c09bad 100644 --- a/packaging/osp-uifw.spec +++ b/packaging/osp-uifw.spec @@ -101,11 +101,22 @@ The UI Framework library of OSP (DEV) %build +%if 0%{?tizen_build_binary_release_type_eng} +CXXFLAGS="$CXXFLAGS -D_SECURE_LOG" +%endif MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %ifarch %{ix86} -CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86 +%if 0%{?simulator} +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86 +%else +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86 +%endif %else -CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm +%if 0%{?tizen_build_binary_release_type_eng} +CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_SECURE_LOG -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm +%else +CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm +%endif %endif # Call make instruction with smp support @@ -115,7 +126,7 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} mkdir -p %{buildroot}/usr/share/license cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{buildroot}/usr/share/license/%{name} -cp %{_builddir}/%{name}-%{version}/LICENSE.Flora %{buildroot}/usr/share/license/%{name} +cat %{_builddir}/%{name}-%{version}/LICENSE.Flora >> %{buildroot}/usr/share/license/%{name} %make_install mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_check_focus.png b/res/common/usr/share/osp/bitmaps/480x800/00_check_focus.png index a25cf5ee69f0693744d7daf03c9af18e8a0853c3..e9dac9acd8a17cbee8f2497e1697138ca3e5dcda 100644 GIT binary patch delta 417 zcmdnRd53dD6qACbp@EyBo3V+jv8A)2p{tRjtD~#4fvJnLqlKlRxw+}&Dkd42B4eD2 zwlO6r7#liUnz&dPSpqe?8W|c|Sh$!tTew&nxmcPyxw<+{He;@<581eD4FdxskEe@c zNX4x;GcEZJ83?!@@8FZ_Qdr8~cc92uuaQNF{Q*k>iv^R$BE_#CINNe^4sobon*XAI zvCcpLWb4-CkkD5GyemCT=2jc@y??!3)bvvGvjCQt(VdGw{dK*zJN(e8vw_OBPk66< zw7KM-!Sf|HsaH#6#`PLL>;63U`0M<7EvI+e+K7w7Mcl8P+V@}eFAmmsxaVxR zZu@-Rz5g;gcj&H=ZeJ#|^{0*Clm#rR8jhS^0Zl?k%rBA|Ikyi;Puy93e7!^Xwz*CV z*-u=kN{?K(ooja`^OLP1$;#zQTDOmj?tS-xZ((cg4fY2|tEXtS>V$vU{jjK;|LxuX iT`T5?#^1EyHefh^esk3C(@XX+0D-5gpUXO@geCx8Zl+}b delta 383 zcmcb^xr=i{6qACXiJ_~Bk%gm+rL&=-p{tRjqlKlbiIa(ei;0u5le6XIDkd42B1@c# zwlO6rxEi<^yP3Ngm>D~}xf&T7Iyss+S~wcIn3CgZF_J;!)e0ZE$HU#7_DYyRmAN(l5jV)P0lJiKB3BOiIza7&fQHSI64}K9a z=v|c1_P^EP&wKl2JbORbZ;-y=A{l5TtfJ!Y{MVAXeU6TLXV1GWNYMFH{>k`S5*-R+j=ccGDpMBXP6di*Ggeicdpm5j~|s9Jmh21a_dVe!qdn&qZ{Ze7>D z_&OtpZ{Onq2|XQ9&MB-o{OPF{wvz2>=iWLwd0iLp0OF4;2P|wLb@K_Zboj~-C;79( z=;yeOA_6!I^`Zc>l4}A}UB7rPg*zzTonNkl49H_M)pt&Y6<;50VRGCiU1Xi&KFRz_y`P)YTbO|v(>6LO8Vx;b?x5_ za6KbeUtPZk6cc+or5s?{)&D%zkF6jSiWIjl*U7opb@AHIICE4ELIa_i`6Tn>Grx|; ziyiu=kq5pbfP+vk5kOXQ4cqAuXj^UvEKPFzL~=nW74!!d{s#aO-x6q08n&MR0000< KMNUMnLSTZuqHkpY diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ee4c207978f3dc4c8e9e48bf173d642e96897ff3 GIT binary patch literal 2848 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 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_right.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_right.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d7bc404c965c8bcb01014301b006921f0191045e GIT binary patch literal 2843 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 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_top.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_top.#.png new file mode 100644 index 0000000000000000000000000000000000000000..f5facf40edddcbd79dd3dbfbd86ef13cb3cc6cd4 GIT binary patch literal 2847 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 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_focus.#.png index 2f95ee1355ce5a8f85be61b7ba8a061e2f52cddb..85fe8d7ee9ce4d7cd7003407684faad0632eac85 100644 GIT binary patch delta 355 zcmcc5HJ@`s6qAC1nT4U7k)?&Jv7@n}p{tRTk)?~Xsf(MNrG<%!vyu7aDkd42B6FOI zwlO6rm>akmyBfGUI~llGx*8c8S{R#JS~@venwuCJxS1NbPBvq%tJnIku!w7d zV@SoVH`5RDHXHD`<{nYwjXrSXK$gg^hSx1^vl>LEFKhSO_JyDGzQ5o(MfpySqSlU! zEtd7XyPTHtYiY!U7WK86ZW0r76}+If@x3kc>9-QIMPD47m9jY~_(kl0UC)GiMzO2& z8Q&*eO%=TNIqs}rN8_vY%pEzu9Zs!OdQ#vVfcrzTBr7kqEnJi%B%{WlcbnemH zJ6iXy&yCP+e}6Qom0_1kRE<#09mC~oZZ1yjUDM9=#Mb#m<=d7yi#oU8dNe1f?o_GJ ghW&O=f*TkaUOvmY9~HSg2Iw~iPgg&ebxsLQ0NEIe)&Kwi delta 549 zcmbQwd7o=T6qAC9g|nNJg{7m5rIV4Np{tRFnVXZNrKO9BxwD(0v7z(iDkd42B1@c# zwlO6rIGMScn>(5sm>atoxdP2{v~+TIbuqPYGB9>$$meu=N^tySEvg0YbT{}0T6E?DyT^@<0_)+(%9;>7*vQg76q&hrbl z=3QAfb(`n0>SZ$*HqE$k?QV=kx6ir1lkUuP?VAu36vL^w#q-F|%Tw04ILTX@JTW@( z=SEBM=F;u)v#WC1UOIfTmh_xd?^eYtSCMb7&HlpFtfzf2do*&1GjaxdC2`{jV}Pi@v;FTz^3>b?S8Py{sEIEKciCe#o}c z(wKR^+{+fJjhF40E&Js5l&yS(P> z8r_fjm1>ULPHE(a%)4B1(IN1Y*U@daFMc8Gn- z*A;VB9W*%Du3xm~>gB1MA6=d#Wzp$Pz(_4Z`| diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_slider_handle.png b/res/common/usr/share/osp/bitmaps/480x800/00_slider_handle.png index f25f167a3641a34b10cc4ab8c92fa71b2b4c26ec..65344a81b87a94c74dfeab4a561063463363a376 100644 GIT binary patch delta 3361 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 literal 1575 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 SlP+Qa0000APNENkK z$68UOBB+Sfid95}df`A-P!YuoJiuBNM6^IhOVQGei0u#SkM8X5_kHia&-321>tbUf z+?>ZdQz#TSMI@{wSGN73k09Ui4*hG$#fOk35OJ7}NLAwq1=3j^@tKtYtxq1 zBhx7qN1aiXKqN%Z5^FFMQ*GB_+Dv8=O`%K=vzgVJWP|{c5WNwVFkYNE!vKt02_v2# z&5kxp5rZ)@9Y^BQV^o^-WQ|D62%7;+w~0vt6GEr~n<)jgh;0(aTV64_w~JW};H?Ug zEMW{el@J{ZNHH7%_)Knyh7E#%K)?ife1QNA1~_bx!(x-SAOz%z`2sN~6nJ+rNNc!O zCsxApcecorgkc~EvzWz7O-*H{a+w&eXMrM-$j-sxgpe8`mNb-5+d@!_|1blLSTwlN zOc*f~ursQYFe@Qpke&{OU@}KXzb8g5?-E6(jAc`sSs;_mGMVggz16l5O5`6mKB#R` zrI`_y60u-bTtn7F=RXW4bN6vWc16+~@od~k7Db%`V;ZXoK?wycVUS;#TBBABhQcC9 z2Fhh@m@VUgAO!LR;h}61%!Roep$Hu2_z)J7@}SUgkpLD+1t2Kn2)SH2Bn;)TLB5bj zo`$gs)Iz9H4Ki%kNZNge<$n|_mg0z-z;G3Yr3`mKtN|l1ivcqO(l`MS7;i+iSgIw+ zUY?<7VFWiWN3?PrGXZb&D>i<>K9>)%xpHBsjPqY{4`H?cCuc0u8J4{{{?#nQBC-SR z+xM+c9^MZRf|3)1lcTYE#HkbH#2FPZq_VX>E4UNo4NW+&udQghR^dD5Z2PaYBHoIg zU4c{mCo|~fyIodYf!y;X)_xb)oRZzX2evVqpNIDF0}qUKY+jplvSk1E&3Vyn_uimi ze{;U&=n4JCcGsdem!FIDPhQ=-`0RC7MsU#H{ENuS{D(+lcIW0#Z0_@F+M=2rO1I65 zb!&jYTPAr8yTgHXHu<+{TYS6c1bT$)ava-78sD_Oy87HqtBUx` z`IfxqPmjX*F51f;mlXH78bzfXQoxNF$L5Q?=ANa|tLIcdPG&5>-_<qX7AI#NRa z9X4M+Keqj4W>Faza+;v;TBh7l#4J`;`!&3FF&7;!s;&&^bXerqc+@KLq`EaoXO0`~ z5r=l%9qjkP#HZH3EI3kKK1PyIxso_6{bI_4#2NSNf@^R4m@`{0-V6!T7Z)7pUe{9c zApenX_xLc+`6AQ4o=s6-O$yE^Y&jUOoqivi2r*+qV@zv3v9b4}y#FhxU8zk}LWcYF4 z6;BEZkI$dDxzBCFl>R0w zytZUUUszp(JuN%4>we5(pM!gAxp`<4bwQ0(IK%tA0&HS-<>_0PwECxOlzBK1=B45nH diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_slider_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_slider_popup_bg.#.png index 4950a3e40a60c3218031949a8448e0309c35bbaf..9212b84af1d9829889a9c4edc4401425869ac237 100644 GIT binary patch delta 557 zcmV+|0@D4)8NL}IiBL{Q4GJ0x0000DNk~Le0000o0000!2nGNE0BQY5%CRAz3V-QI zL_t(|+U(jrYg9oL#_``Qu@gyH3*Qi8AvV5z0t-w11UC5;qF+K3L`3Y;SlI=v?5zZ~ z6;#w{R!HI|h^UZbad)$8$Y$4Nuk0-Iz!Y=l%pLwbGxr`YlOn>XN-5bdKcy5Ak&L0e za|f+4^f`Y`O3vU0u3{cX2F%+sd4G+%);B!GZQ<>1G$N`dmO`|n7n%0f4zbkjRgNSV z@JgP#D7UE@YZg>MM45F1}UfrX`h0-Jma(JvtiA|iHatn30-_Ev)0 z3My(e5uzSJM1?#SdzZUNq9MjT*m(xFnAy46{qeuOojvBRM1+4Wr4(C@Q%Z@5D7zeU z(`&ao#;(tK(_qC3T){=m=tlX1hkv*(yxeGwh-MS>A^I_D>Dty0F+Z#|i5F+^OdaK{ z@O)}exvHLWZFG$nOE^*q{H<_&nD~K;5}zrh#1Ot-5jR!_bY-wV6<$zho?B!ar83I2`f$FVHFqfxWnj2I4`V> z61VXYw-1+b$=?1L=P*w1u~DKMU{3hn&4-lc zwz;syp4)Ar+fTen{m>xw{ezbGI4OMX_G4*S#=WtYTWzB!lX#Q*QM|)X^n|sxPhol@ zlgF^6Sj4AEpeL93=vx0K^y`98xJ=XhEkR}O@@oKO^+*^>u9#W?015yANkvXXu0mjf DIWiTm diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_press_ef.#.png old mode 100644 new mode 100755 index b34ef0c35c434350759da9b6628817adbc9866f4..53fd5021eb9b3d20dcb7d84de6e9143c9aa45bb1 GIT binary patch delta 331 zcmeC=YUkV##iU?iWa;8);AUXp=45DS=xXd}Xz1c%V&Ld(U}Wyff!O?8v~tu-((e zF{I*F(x3nT?U@x1oH)S|e8j`UmYcb-VWLMVj}K1>i^61vuCR?!D`W@%lKV^_<(bkNzi>J8?&dzi9=OVNf#ZS=Cd^673TkFH z`wb_#dS%>6(*d%*e#Uz!{)@#Qk<6GtdtVp00i_>zopr E0P}clRR910 delta 462 zcmZqY?Bv=I#iZckWNu+@WbEo<;bdWG=xStP=xE?(YG&?c=HlvTV&XQrib)2h$OWgO zZA=LYmgcU;j+Q2tCWbCXu11E2j+Rc&t}dn)P6noq76wjclg*gx>ci}8Rx&U!T6(%T zhE&{oGj*@uVFQuY+{YoTOWal@r8F?AnH~9@@>ckZWJOb7>r9@Hh21APR~!&ZQLF!8fALUq0WXsQvwzuX6HE5~2ZuKw61dYW{hcS?f%o3b z{Tk_s{a#j+Sud=a9d|G@Ib+=s(I07dLvKCGY2D>sdgkMexeJZHOuY4(t2}81pJJy nEqrI#iU?h?&Rod>1^U^Z0TZX=xStXZer@>WawhxWNct*;AA+tib)2h$QY-h zZA=LY#)i(8CN366mZmPwu11E278Wih&K53~MlP17POh#_lg*gx>H`}tvoJ6)?(=kU z45_&FX6AYC!v-S9C*ShBeeliTWk)#~f_ho6vO_L{-9py?t**9=Md z9s5@1na*B&n7>6V@_^c_FL@>P6oo%;oe-(c)T6mz%9HlvJuj}Gm{`A# z#aTvq+v}U}Rb9XNuuVPq_OMP=;M$Cu>)OTF{x4xw>wLX+5lDbbbe~HXlk8$Ex5?+K zmN|V@$@N_HIxzNOwrgqY`eP?W&YfhiS`;kA_;-#1%e8XWEMwJSaDBYv{od|v%30gv*S9@a zmQ7FG_Etu``||5$Q)ip=WGr8qCSWjM=+Bk6WqFow98;24ehNP#GnFgFBvt6&b_QmK XYqRxi^c6p_F#v(5tDnm{r-UW|9Zmtg delta 716 zcmeCg4R=Y-ws}=xXHTVq)NGVrp*S=4fQ>Pxoz-e6#0GWB$E z45_&FW~Q&Vw4=oFbfepMkMJ&C`7vRGho0!3>Nf`$W$br5-xMP7TTsiX`@zk+9;M7& z$0<$U8{(XVJ*0(vr}~zqe@p#kqvjPiZQi9?P3sTonaske5*VL?uJX zQ-9gLUf$*5TW#>v!QU}bfV;lqD68ax>~xWufobp z>50ZqeHq`Pl1F`$I4r#;0hw3+%k*Z2)-O7;_=NYXi%Smq%gmjz_+zc{-K$FkJO19k z=cD;!lAF>8+kiJy4D18$iak13_~wG6?Dd29gw0Bp|8azmvv4FO#tD4IXM6T diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_dim_bg.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_dim_bg.png index a505b200f0c656837ed086503346085e535b5bf1..648108cea2ee5094b9605d02d561a8d9f26d5dc2 100644 GIT binary patch delta 593 zcmeyv-Oarrib=uP&B)T##LUFi*wV$&(ACJ%(Ad$**xA&;*xAX|+{9vX6_X51kugq1 z+n5p*j18SFOnA-0kV& z7*cWT&CK)OhYduIPrg->y>+spmK+QJ;bx6D3UA~E*s8ufbIt$fd+*DmldBK0{BLM% ze^_9i_{j0bjKihdj5~Wh{~nCGmOa}+?#qQG3+LC}KYjYKsL`ZLKZsUj5l=w=CoFx4eG+4u#Equ^;Vv3?+E(F=*~| zJ$R_y+Bo)oWgM&GWPPsUyB3ZQit{gdW%U$=i?>XuRA=hZTrfps+3}tq*H27b$5QVs zq`dL<&G)LV-+b7o9(;RQCn|7lM$vWc;%onxu&Q;w-ns}Rz$UuSrHe^+v6b89b5+Zn zzN+MUE_xjp`!L(Jv~~TllOktNGFUAR7GnOpNJQAH__+vAlj_y4k3X)+j%@WUKKJ+i z%x4cjc|Kt7vERLN!TGz(+oxXL%KLA^)(3h~ZoOC6G_Wqnkm=uBezEMx-h0{ARd&}3 z#nNt{OWe6Se3c)I$ztaD0e0szVq1vLNw delta 707 zcmeC?{=>Z?ib=u6)WyKm+{Mtv+0xX|(ACJ&%*@o$+{wb(*wW0v$k}Of6_X51kpWIc z+n5p*OdX939SuxeoDE$pU5yM4EsRYqEu9=K%}opq+)NEzCz~vW#j zjfQ1g7ax)_FPCYm)9P#uT3v7G#M5c>amI727e5v^M?XJ&+<*1H`Wg z+v(@=A3v+Q8FAmL+WYz2zkmPw)2%M)aIj6S*m(DwgHA_I^5ciU!*A>Non+g*(!ajk zzCKdi$zW+nYP%W-Q-Mso;%TXU-=6u|{!+XYbwALHxicnJfO*p$)n$u5r7X?l5(!-| z({36*?_U^)uwFxD-^@=YU8fAWEu>ukZ(NixVNq$mml|&aXKuWpyR9f|vq} z#_7*b9bK1f?RmVS=z>LO<~JASyRA;H{`K>Jc%9O@v}zNl~cFaG{~3g&OmRfl}7 zs=NQ_&+O-0$bkWuC9H7 z_+Gu|cYJh>pL$Med06luK4#AUL)VLY3Qn0bTLo4ME;eSbFE}lH5q`w)78&qol`;+0OeIMumAu6 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_press_bg.png index de33ecdf13d6d94d1be5e62b6aa15c93b690e18b..9473d04aba420c8597ba6dd007c3ab4d36023166 100644 GIT binary patch delta 640 zcmX@jvy*#66qACXg^QV~nWc%Vv89Wlp{tRTtDB{Tg`=~fvzeKZlZC^yyBZl9T3EQ4I9s?_8o5}SI=Q+!O*Uh$s}GaX^JidSeCg@p z7*cWT&CLDYhaE(Y$4^?_t6{;R*Yx1QlB2E~uk0VFh{U{Eu!HlF(xU~N>l^;NunU$H zh|B1(ss{?nENRtga#r>H{J1DR{>UUX-`yF->~ATQ}bDBjInKg`r zY7F-m&D1<`IX3fw1Z$>v*!p@ad6{>8)3U$kt1okX9>K6Pk!iKmkH^VRw(c;g-nDsa zSf|!4)?IraPFc0p?daDP?=1LO92pK5wJl=En8mhhopW7_#p$CnKV3Zd>?!{WDcPFh z-!(bgWA1L!Sx{0j;l6>uvm@A;)S_j1#+k3QTy!N2#lZ;td}Q8s2P96H|1_^NeVZ;Qwxs2)M@@so0?&gU`u!aeS^HNDgaw8K&**&rKJa3Q@7$`w z<|AUPi7ZbI1uR8*S)axnSv39X;+Q$s!8K{BUo-m8HfX3#-SO(-{#W(a7b`ToAHDm; zb4#^SXEVoir@+GVKC4vJ1uM__YF)>9lK{zl)Lq;((Lo!A)Mlm=cUF+ngiL_;w|IYlxt zF*q|dIXOZ>IX5&hFh(^nMUyrIet$B6>stT-0((hBK~#9!?3qDp6G0TmXC^O6yB2AS zB{sbYRYAXjN5w-ytfDuuH^Gx2=(%SF!IR)k!IPIrp@*WELJPf>(t=hEy|fbACbg8r z&CbsFUbb7e*|ojM&TMhQ%WP&A_Ln#RH}iIeYpq!pieMQj5MErqQt8yobARIntOn2q z(fZJGDY5uyduVmE9nQH+jp2wx^iG64jaB*0yN_dER%X4UUPc$TNg%4Qxo^D zO(Wn2!tREBJfczZWcksP*ORqc>wa5GEV7JCW|a-c7c4&Ht7?BOSpL3c2Di%ZozZrepjl7}{8 z^lV~4mfOS>i+a>UOG^K&^nBwHP7KIWCZ?q63A9!y1!WwR7>Fer?C_Uc?VU%1e_{ux zj=;qX2(9{$i7DdX@6>FK9`P1Q${_y z?@i9NVU5OTo{UEQfj$gJedlvh=FwmYHJ_E7lzCL|hn(T8v11cnU+vinrjD~HArR=;jWi@;HvqIVY&Lj|!TQTs#s|Za%xg^k2zUS^L-~8T_ zQi>r<123H<&|G7?I)5cSPy4o|IB*x4B+f`!>6P&G8*)+QVO&zeRiZ=Z8v{ZaRG<*98>&Qyp^Y?lkw-XEtjq zAMocYS|j8;1WE;Ai&zbz4YT0D0aD^5z0pC#5426RLx&Cg{~S5fKQ6xo7yxLcUGJq_ Ra3BBx002ovPDHLkV1g(DX7&I8 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef_press.png old mode 100644 new mode 100755 index 4497b8dda7252e915c698bcc0de1b0b2475ef793..0f5b65eeca0ef9596aa2171f05bb8fce757838b8 GIT binary patch delta 471 zcmca7Fo|nJ6qACPp}D28vzv>7o0Ey5p{uczxw(alk&&~Dshg#diId6XDkd42B4?b6 zwlO6rIGZ{f8yc7yIhq)_xf&Z9T3EOmIlDObP0l+XkKQ2DwN delta 1322 zcmV+_1=aeJ3f>T~S^^+2I7KrtL^(x7I6^`(F-0;tL_|YEK{Z7&I5kE_IWstudIB6E zFgQgsF+@2;L^wi1F)>9lIYdN5LP0e}F*r3wMmaM$lePk2AUQcjGeJ2tIW#duGDR{m zF+n*(Lq$Y2I6^QrK{zl%Hj_33et#Ydp$z~41dd5WK~#9!)SAyv8%Gq!cfIQ$2s;oQ z93$~Vs@w`%94Z-1)W#}Q>H(?ZR*6Gzkx+$1s@ypAz_q7J^wI-=M#ZJApiKgbg_M$# z5Gkz?!Y(w#F2Z(Wv-VEE&w5T4V*;2pUO(xhF>8C~`)1y}`C(+qd>aB^0)Lqy6U89fO{n85@BvU5W1R&q6~i;Z&xt4Chk7`mg73H_aY^t8cn-^dbYX<$`V}AXd zN7yt6sMnn!%Dj|nV_q-}!halwcg%3$dywK@e+)FKwq^%Ga0__A^xHnHoKo4h+}po! z#wbX&Hy!M9VxUR>IrzC62fhIZU3MbO?cYmd%Q$7M;aQQn( zOV+UhXTs~?JzhMIjeyE!oHKycEXmqrgVrM>@EMoScuBXSWjHH!b7p+w346A0vCt{E zG;3@sAAy_fOpG^aRyLXsS9n(&Qw=lyKaMkDaR-u|QiU;ubdGynvc3t964jW6go#_@ z%bLuhGzZ>cN0QZ?h=1y2q|-%b2Xes8-W)X02;})xsHyyiEH$3doGqxFmP7+&pGpqs z3hzAiOFFEW9!kc$9MPx_$R}*88(}@rl-b!?v9q(|2m}JQcs$++3z;-LJgm6gZfSaY zI;SixEs1bA>_hFAwCCMI0@d|scQpU)OUCm0M0zklCvGh`!6Lt07m>#fA# z;Gl3iouW}3Ag!eNwF4s~BgLVanVE4}J$y2z>&bJIULIcb;P{2p8rs10h1+N8Em(cb+=r zDo2C%OSj+v#chtANoF#c{q^ssmGPjzB#(GFIJ3jPTyFtdZ;L3qO zW_Mmx#=>+3<|_^b{}12OZWeW!+|*bVk&rXN&?jRW$Ha#Qi79+1916@&9<&x#QRH6| z*=d@>xhhObP0 Hl+XkKHf(kx delta 499 zcmbQvxsGc?6qACfg{!53ld+MDrIV4Np{tRTg^97Nk(;rbk(-6Ng_GgrDkd42B14>t zwlO6rIGMScn>(5sm>atoxdP2{v~+TIbuqPYGB9OL)GD9-f! z7yrz?0#{_X<7}R){fu-<+jlqBoO{2~u?wpLyl$#&)rv1=(R*Jn-f<|}WcLL3yN_hG z4(|BH!tzGSm%-K{_=PXmzIv{A1@czyY7^L=x7{!0J#to6PR>#Pg7VIznk77E7g)#3 z**UMjB<21<*krooMD^&VM5(9=)jCV2Nv60*I9Xq@_qr(LVHA2ZATr^kIwQ%C| zpPsXpRbRTf{gKSMr&8-gnNx4Y}X!|rxx_3J3>na9^1R4cYU&~{Mn%pZXS YhO0}jX-t&zopr03~(H0ssI2 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef.png index be8e801268978b9c048a9f0da839274a764f6bf4..fb1d40d2ec6e470cbb3f9a24a17a0abcc2fbedad 100644 GIT binary patch literal 4746 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 literal 2819 zcmbVOc|25mA3oNyBti%oqb&DkHfET~$TBl!-YfI5B-WVPqBvm{OTOAjE=B_5&S3GBrG;6*K|>Azzxa zJICF|8b@K$VdM=Aj7tyZvjM>905_OS2?RM1AJC7+z(aXewNMC+iif(PZ4frW=Ab|A zPy`Efim-L2LROkU?h!GdZ7odY2GK5PHVz6;sJoKwBjz8bnhC?A=A)G)w^qW)e zHuey6CJTh1VS2h01QH3sU|>jnGzNp*2SFi_C^&+DV|0=FI5Y-_GJt%)pnPjAsxQuw zK>BWrzrsWPIhR^&_JPd`3PNhIDN40Gn+gPwO<~c3 zIW#5%vY|-!VIJe)p?pujg+LFsvH2m)V1G{(KV@((IT((FA>efSMqFRfY>p%NA2-sJ1&-FibY|OL;}_vgG3ThW@aQb z*1*(M4~;NIV@Z0OTnh%9LuOFGO}jL{-S1q&KXP&AERf7$vYeUBpv?}j_h)jLY=34j z#M}u3(RQOTsLU|7&PI8@MN0r#v`~;rVlnBEuldE%{>Hu@+7zKjGBhBf{#V@JxYYkA zXK=nV@Qvp9uV&fY;&+VZd))#(} zYaTdp{H1|zIfpCRYSP^}>7!Ya)nlma_N35C;bF)`XW`F%5A6+LM=Cmm)k3<@HD2*0 zoNNS6;V9glmU+5`+gBLb!`V8grFC@W#E-H%PrL}@;lHrgCqj5`3)9m#rXfdn^$65T z83BK;D3^O2zml%75@@jgs=vSTR;#F}Xk!kk@w}n5-c^MvNcf(l#uUU3BFfX#b3nYV zzP_Fp>78SFSjG;P8QA7qCe@hIK2hu7L%kj_bU+iT3(unQ$$ynuu~8^z9>+S1;oud#6LI@S?Hx zj|~-e2b8$)gT4E0BvmBl?bDuvHIJkYNoSrF*ct3od4GI-+_lCF-oEPR=QnZNvufu< z_Jr*tN6KJD$m8IZ`6*Iy&uf+B=I!M8ttQpLoFMeBi)8!(PVZ5Opviq|P;8)}1-FU~x`{nOBw70hx z2Z)%wo$4ym>AbPHwz_mWAwjGwqefc3clnQcAypTc(D7dG(Xzx7R>ZlYD{dp}Ypc_` z0#R!#F3F?ER8>_k<>loK+8+K8aHJ&9#IoH?BaUHW75bDe4$KtO*tZ&)XK$C4sD*kt zj~lISL&voVE2KYO1urebmsw)bq6%KKL=acLw7YZpcTU^||QU%gZFU8K91twU{XI{-1_(>Es zuhw|ZL-deQ_n^eR9Xsdm=0&CJPFPw1lgeYJQ_(6xrFsQj%f?rdRnmT0wsvS??Tu95 zbzOVAC6B46D0$yw(e%rN9I^IEwDDMOZf;?he`I9jZ$tYfljNRciS5#;IrO45wLd7- zOzmfr25R%?($_Tqw-;qGqP==2i!*x9e36TJ*vJ=|=0se5 zlRRs#?NxW2QT1l1rKVINCxWKzekZQnQ!!*WMM?jPz|uN_qOQ0?*WCpGTB}_mrEdWP@d` z44yijgvqxh!VMeaVq;@vD<0$!GeQ=aQM-$JKE4cie)p9TAbatprM{ok{*WF?;^6{c zi+A}ki{1;y?~>?+QB80|K>hZ8!MA>>E*>>rc9Kjz51u_How+LZ7h>3HI8YG0bF$P| z=RCLlG1t%G6VPdw-)l9vrU4hW(mDD`;{3K)Fz5F(#Yx(;65?xT51x-VRf1nA%yt3_ z^31Lo@}gIRj3pga5>+xYqt*8rpIaL8S#XFsXesi332=_0I^MIsWKr#I6r&{ybP431 zpIcKryAHVpk15D}ZD^F(DRUD~^jVH?YR;mZ9xe!fo?)JSqq^|OmOWz9!=0U-(BVR_ zth_jR1guUUc;Zo@bGl8uJfkF3F|LrPU|~_y-{Bjr5qBdb#(tk=porZEi6)^_M?OWm t1hm}Oc5bUC64^KK6;glw3%@S!4cJ|o8ICFy%-{GewIJFOZku_Z`ZskC!K(lO diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_dim.png index 11341976c23f3294d6ee02341415b32d2b2eb4ae..aa3b9d9af8a40922c6173c04f3a8b9af3ac7a428 100644 GIT binary patch literal 4640 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 W$D{1T&3zvL0000iH?wi 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 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_press.png index 3d3bb8049f0bd40714c4c2ae7e3e10696754bae4..85f6daad639e98c6f35265a7cbdd8cbdfc5eadf7 100644 GIT binary patch delta 3242 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 cvu%F{02fC@&XfI+2H>$nC!>76bYn;W;O zB;Xwc-NGlmcPc7qBOpSwFu^91L;&6cC*N!7njN6(!GHX z7YVbbl_hdRA-@l{uoa&qM^O!zN=->gp`kz#*0XvUGmw7UlyFWK%1Y+KBgS86mP^3x-NzkicH7bGlB1rhqFZA;p7+s0uvU=_%lx#63V4@auHqB+8B8IK;m7tC)Bji8@42%7Cuda5 z8LF{3{;OE#x3CH{PCu4Dw)ogQuo~+aE!G-+%J0_Ta0?bnAYr)S_IPwquv6q`vp1jN z8(uCcxXr{%E4Wtj=;$?Q*kSW1=kq46!`}6f^5p{0n+@?73k2s21lcyL6~)o=62c+Y zmvQ%>-keB%vK4M`NmAZldYCsRzigQM`+@Ynj>+Gg4x?OE`sFTl`sjVzoV2B!=XtJ@ zGIrNu)P(Qz)fBXTu|p@>Y9Yn2g8;k5B@g|&)JiCo3#@QFAL7F+P~@S5CTjqEUUt~< z@~Kst$Xa};+OE+7FWqdvbDOX$!e>!!j>oWzRrLtH+PP<~n`BY-w3Ehk?!vis#XcO< zy!8hN)Uni&KXi^$_@asck;9NVk1*%zTC{?Io#1Cf@BeH;YlGbUNrLV7Xka5(CqnB@yi*MInB>%gm1PE_r$-Han*5 z)fcmzE}9)KG90{EZRrvS%f3)<_ql$9?b6#=@moaR=Hd9%?n-?3+}xSc0N2p2t}Y8qMTEoa}p zeR+(^sh&#uo$~(kCkH2=uPQ7k2(L+J{^4kAYiqgV_t8<=x9LQE^{)K<1%*E=#>&d< zjvScY6ceNGZLF%Os0e-5JezL@y?*^VLL3rWQc^;mrEg12yfpFDaI&=2+S$qCaZxlW zn<#ck^0&EDzv9@PJ9nXOjEC_T%xHnQwY;-70@OJ*~B3Ey30L zvMQ}LxW2zVeNnP;_0066M?GDE8=0Lie(vw@$KORvpIhQ4;x|wOv+cbJ+hPV{^SeeO zySuxG8XCYOj+YRn(u>#^8ylNdlD^C2?A@WGGLyL+TZ5%d-Q>i?+1$ggSl-^u@16ZKd|bQiuI!y861hx}da3L`1U%GuE}nU}2X>F1R&u@`#x%rUw6}bIVL%e?!!GVP$1yXK$~>sb=q>dt95% zl7)kjC zK@vMcz*gTY>u9{*!dc=(fWOwM`M6Eb_5csb%#^C60$Ezff5T6y%ERLtr1?OYgAGW^d+1)=s5qZ1J;>9=F{I+wn~MvD z91=uWAKL!sNMnip^6&hTN(SHPR<|9K5-xLo_cqt^R~0;Q*EeL6&y^_ahPpZJUAMNk vGOSv8KxJETz}kaoJMg&#b z_e(b_PbCq^-Az=IOw?LCfPS2ZirTk@0II3LB(`%b-y|B$Qk@6hoh`A)@^^l&6c1{P?tGbGhUMkxKCRDFN}0C0aB UUMcWZ7ytkO07*qoM6N<$f>2d9_5c6? diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_press_ef.#.png old mode 100644 new mode 100755 index 758700cb8562afc57fac096ed4669705ffeeb19b..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch delta 111 zcmV-#0FeK!7N-`lzzSzlNkl#b z_e(b_PbCq^-Az=IOw?LCfPS2ZirTk@0II3LB(`%JQ30-Xe|)+ekXH7e`i|<=z1R XA$A^KpPxFH00000NkvXXu0mjfCpR~X diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..a37a4208712083af3327f115d42d05d7d44a9085 GIT binary patch literal 4550 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 b*TBfY5%@lZ^JdONP(kYH>gTe~DWM4fW_%l% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg_arrow_up.png b/res/common/usr/share/osp/bitmaps/480x800/black/pd_btn_bg_arrow_up.png new file mode 100755 index 0000000000000000000000000000000000000000..3f240194cfd9bf94e5b22c300863f24213f6c2b0 GIT binary patch literal 1481 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(vA}5_ zRBsAyw^-uTs}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+^pJT_A;lfyvg>#WAGf z)|+r|zuN&Kd&^|hy(CqFY}l+iLo`$Ga9+?;SiFICLW1ZT1)I&N;sTc}(% z;lI6N{p{j6o}#NA7K({a)FUe^>%Pw^e{XB&XL7voiEX>ydmE-h4F(E49L$Hd^D9q2 zxkjkGExYM;R_38p=A7IA%x3x&&9G`qw0W`XUwX3Y(cPbu_uu~?xH9C>4xcmcH*DKH zk%w`QsSICz`0CKr0U904GL7c?tqsta((j@a|KV@p+?HDvHv86IfBiCOrOMf~;%yw4 z3M~Fu&h)wW;B&|GC>9Z~r9s>`FKjNJFvq}n!l?|CB>kP|&Kxy4>wn_X$IItiTNuu5 zyZzRCLgtIv3)bALZaNdX>|(|jh9mWc^%0RK40m3Ct-AiSDAM`8$jtBV;?H9q+rB$^ zFZ#%ma3z)*rV>1#7`hpK7?v5$D%L3Nuio&TnQub+n@ufhze@V+a)VXw=9TNsoWAAq zOOEf?vbM$^`KQvB@ATyJ+8-=AF!&MDzMbjiJzf1=);T3K0RYsNEF}N{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_press_ef.#.png old mode 100644 new mode 100755 index b34ef0c35c434350759da9b6628817adbc9866f4..53fd5021eb9b3d20dcb7d84de6e9143c9aa45bb1 GIT binary patch delta 331 zcmeC=YUkV##iU?iWa;8);AUXp=45DS=xXd}Xz1c%V&Ld(U}Wyff!O?8v~tu-((e zF{I*F(x3nT?U@x1oH)S|e8j`UmYcb-VWLMVj}K1>i^61vuCR?!D`W@%lKV^_<(bkNzi>J8?&dzi9=OVNf#ZS=Cd^673TkFH z`wb_#dS%>6(*d%*e#Uz!{)@#Qk<6GtdtVp00i_>zopr E0P}clRR910 delta 462 zcmZqY?Bv=I#iZckWNu+@WbEo<;bdWG=xStP=xE?(YG&?c=HlvTV&XQrib)2h$OWgO zZA=LYmgcU;j+Q2tCWbCXu11E2j+Rc&t}dn)P6noq76wjclg*gx>ci}8Rx&U!T6(%T zhE&{oGj*@uVFQuY+{YoTOWal@r8F?AnH~9@@>ckZWJOb7>r9@Hh21APR~!&ZQLF!8fALUq0WXsQvwzuX6HE5~2ZuKw61dYW{hcS?f%o3b z{Tk_s{a#j+Sud=a9d|G@Ib+=s(I07dLvKCGY2D>sdgkMexeJZHOuY4(t2}81pJJy nEqrI#iU?h?&Rod>1^U^Z0TZX=xStXZer@>WawhxWNct*;AA+tib)2h$QY-h zZA=LY#)i(8CN366mZmPwu11E278Wih&K53~MlP17POh#_lg*gx>H`}tvoJ6)?(=kU z45_&FX6AYC!v-S9C*ShBeeliTWk)#~f_ho6vO_L{-9py?t**9=Md z9s5@1na*B&n7>6V@_^c_FL@>P6oo%;oe-(c)T6mz%9HlvJuj}Gm{`A# z#aTvq+v}U}Rb9XNuuVPq_OMP=;M$Cu>)OTF{x4xw>wLX+5lDbbbe~HXlk8$Ex5?+K zmN|V@$@N_HIxzNOwrgqY`eP?W&YfhiS`;kA_;-#1%e8XWEMwJSaDBYv{od|v%30gv*S9@a zmQ7FG_Etu``||5$Q)ip=WGr8qCSWjM=+Bk6WqFow98;24ehNP#GnFgFBvt6&b_QmK XYqRxi^c6p_F#v(5tDnm{r-UW|9Zmtg delta 716 zcmeCg4R=Y-ws}=xXHTVq)NGVrp*S=4fQ>Pxoz-e6#0GWB$E z45_&FW~Q&Vw4=oFbfepMkMJ&C`7vRGho0!3>Nf`$W$br5-xMP7TTsiX`@zk+9;M7& z$0<$U8{(XVJ*0(vr}~zqe@p#kqvjPiZQi9?P3sTonaske5*VL?uJX zQ-9gLUf$*5TW#>v!QU}bfV;lqD68ax>~xWufobp z>50ZqeHq`Pl1F`$I4r#;0hw3+%k*Z2)-O7;_=NYXi%Smq%gmjz_+zc{-K$FkJO19k z=cD;!lAF>8+kiJy4D18$iak13_~wG6?Dd29gw0Bp|8azmvv4FO#tD4IXM6T diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_dim_bg.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_dim_bg.png index a505b200f0c656837ed086503346085e535b5bf1..648108cea2ee5094b9605d02d561a8d9f26d5dc2 100644 GIT binary patch delta 593 zcmeyv-Oarrib=uP&B)T##LUFi*wV$&(ACJ%(Ad$**xA&;*xAX|+{9vX6_X51kugq1 z+n5p*j18SFOnA-0kV& z7*cWT&CK)OhYduIPrg->y>+spmK+QJ;bx6D3UA~E*s8ufbIt$fd+*DmldBK0{BLM% ze^_9i_{j0bjKihdj5~Wh{~nCGmOa}+?#qQG3+LC}KYjYKsL`ZLKZsUj5l=w=CoFx4eG+4u#Equ^;Vv3?+E(F=*~| zJ$R_y+Bo)oWgM&GWPPsUyB3ZQit{gdW%U$=i?>XuRA=hZTrfps+3}tq*H27b$5QVs zq`dL<&G)LV-+b7o9(;RQCn|7lM$vWc;%onxu&Q;w-ns}Rz$UuSrHe^+v6b89b5+Zn zzN+MUE_xjp`!L(Jv~~TllOktNGFUAR7GnOpNJQAH__+vAlj_y4k3X)+j%@WUKKJ+i z%x4cjc|Kt7vERLN!TGz(+oxXL%KLA^)(3h~ZoOC6G_Wqnkm=uBezEMx-h0{ARd&}3 z#nNt{OWe6Se3c)I$ztaD0e0szVq1vLNw delta 707 zcmeC?{=>Z?ib=u6)WyKm+{Mtv+0xX|(ACJ&%*@o$+{wb(*wW0v$k}Of6_X51kpWIc z+n5p*OdX939SuxeoDE$pU5yM4EsRYqEu9=K%}opq+)NEzCz~vW#j zjfQ1g7ax)_FPCYm)9P#uT3v7G#M5c>amI727e5v^M?XJ&+<*1H`Wg z+v(@=A3v+Q8FAmL+WYz2zkmPw)2%M)aIj6S*m(DwgHA_I^5ciU!*A>Non+g*(!ajk zzCKdi$zW+nYP%W-Q-Mso;%TXU-=6u|{!+XYbwALHxicnJfO*p$)n$u5r7X?l5(!-| z({36*?_U^)uwFxD-^@=YU8fAWEu>ukZ(NixVNq$mml|&aXKuWpyR9f|vq} z#_7*b9bK1f?RmVS=z>LO<~JASyRA;H{`K>Jc%9O@v}zNl~cFaG{~3g&OmRfl}7 zs=NQ_&+O-0$bkWuC9H7 z_+Gu|cYJh>pL$Med06luK4#AUL)VLY3Qn0bTLo4ME;eSbFE}lH5q`w)78&qol`;+0OeIMumAu6 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_press_bg.png index de33ecdf13d6d94d1be5e62b6aa15c93b690e18b..9473d04aba420c8597ba6dd007c3ab4d36023166 100644 GIT binary patch delta 640 zcmX@jvy*#66qACXg^QV~nWc%Vv89Wlp{tRTtDB{Tg`=~fvzeKZlZC^yyBZl9T3EQ4I9s?_8o5}SI=Q+!O*Uh$s}GaX^JidSeCg@p z7*cWT&CLDYhaE(Y$4^?_t6{;R*Yx1QlB2E~uk0VFh{U{Eu!HlF(xU~N>l^;NunU$H zh|B1(ss{?nENRtga#r>H{J1DR{>UUX-`yF->~ATQ}bDBjInKg`r zY7F-m&D1<`IX3fw1Z$>v*!p@ad6{>8)3U$kt1okX9>K6Pk!iKmkH^VRw(c;g-nDsa zSf|!4)?IraPFc0p?daDP?=1LO92pK5wJl=En8mhhopW7_#p$CnKV3Zd>?!{WDcPFh z-!(bgWA1L!Sx{0j;l6>uvm@A;)S_j1#+k3QTy!N2#lZ;td}Q8s2P96H|1_^NeVZ;Qwxs2)M@@so0?&gU`u!aeS^HNDgaw8K&**&rKJa3Q@7$`w z<|AUPi7ZbI1uR8*S)axnSv39X;+Q$s!8K{BUo-m8HfX3#-SO(-{#W(a7b`ToAHDm; zb4#^SXEVoir@+GVKC4vJ1uM__YF)>9lK{zl)Lq;((Lo!A)Mlm=cUF+ngiL_;w|IYlxt zF*q|dIXOZ>IX5&hFh(^nMUyrIet$B6>stT-0((hBK~#9!?3qDp6G0TmXC^O6yB2AS zB{sbYRYAXjN5w-ytfDuuH^Gx2=(%SF!IR)k!IPIrp@*WELJPf>(t=hEy|fbACbg8r z&CbsFUbb7e*|ojM&TMhQ%WP&A_Ln#RH}iIeYpq!pieMQj5MErqQt8yobARIntOn2q z(fZJGDY5uyduVmE9nQH+jp2wx^iG64jaB*0yN_dER%X4UUPc$TNg%4Qxo^D zO(Wn2!tREBJfczZWcksP*ORqc>wa5GEV7JCW|a-c7c4&Ht7?BOSpL3c2Di%ZozZrepjl7}{8 z^lV~4mfOS>i+a>UOG^K&^nBwHP7KIWCZ?q63A9!y1!WwR7>Fer?C_Uc?VU%1e_{ux zj=;qX2(9{$i7DdX@6>FK9`P1Q${_y z?@i9NVU5OTo{UEQfj$gJedlvh=FwmYHJ_E7lzCL|hn(T8v11cnU+vinrjD~HArR=;jWi@;HvqIVY&Lj|!TQTs#s|Za%xg^k2zUS^L-~8T_ zQi>r<123H<&|G7?I)5cSPy4o|IB*x4B+f`!>6P&G8*)+QVO&zeRiZ=Z8v{ZaRG<*98>&Qyp^Y?lkw-XEtjq zAMocYS|j8;1WE;Ai&zbz4YT0D0aD^5z0pC#5426RLx&Cg{~S5fKQ6xo7yxLcUGJq_ Ra3BBx002ovPDHLkV1g(DX7&I8 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_circle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_circle_bg_ef_press.png old mode 100644 new mode 100755 index 4497b8dda7252e915c698bcc0de1b0b2475ef793..0f5b65eeca0ef9596aa2171f05bb8fce757838b8 GIT binary patch delta 471 zcmca7Fo|nJ6qACPp}D28vzv>7o0Ey5p{uczxw(alk&&~Dshg#diId6XDkd42B4?b6 zwlO6rIGZ{f8yc7yIhq)_xf&Z9T3EOmIlDObP0l+XkKQ2DwN delta 1322 zcmV+_1=aeJ3f>T~S^^+2I7KrtL^(x7I6^`(F-0;tL_|YEK{Z7&I5kE_IWstudIB6E zFgQgsF+@2;L^wi1F)>9lIYdN5LP0e}F*r3wMmaM$lePk2AUQcjGeJ2tIW#duGDR{m zF+n*(Lq$Y2I6^QrK{zl%Hj_33et#Ydp$z~41dd5WK~#9!)SAyv8%Gq!cfIQ$2s;oQ z93$~Vs@w`%94Z-1)W#}Q>H(?ZR*6Gzkx+$1s@ypAz_q7J^wI-=M#ZJApiKgbg_M$# z5Gkz?!Y(w#F2Z(Wv-VEE&w5T4V*;2pUO(xhF>8C~`)1y}`C(+qd>aB^0)Lqy6U89fO{n85@BvU5W1R&q6~i;Z&xt4Chk7`mg73H_aY^t8cn-^dbYX<$`V}AXd zN7yt6sMnn!%Dj|nV_q-}!halwcg%3$dywK@e+)FKwq^%Ga0__A^xHnHoKo4h+}po! z#wbX&Hy!M9VxUR>IrzC62fhIZU3MbO?cYmd%Q$7M;aQQn( zOV+UhXTs~?JzhMIjeyE!oHKycEXmqrgVrM>@EMoScuBXSWjHH!b7p+w346A0vCt{E zG;3@sAAy_fOpG^aRyLXsS9n(&Qw=lyKaMkDaR-u|QiU;ubdGynvc3t964jW6go#_@ z%bLuhGzZ>cN0QZ?h=1y2q|-%b2Xes8-W)X02;})xsHyyiEH$3doGqxFmP7+&pGpqs z3hzAiOFFEW9!kc$9MPx_$R}*88(}@rl-b!?v9q(|2m}JQcs$++3z;-LJgm6gZfSaY zI;SixEs1bA>_hFAwCCMI0@d|scQpU)OUCm0M0zklCvGh`!6Lt07m>#fA# z;Gl3iouW}3Ag!eNwF4s~BgLVanVE4}J$y2z>&bJIULIcb;P{2p8rs10h1+N8Em(cb+=r zDo2C%OSj+v#chtANoF#c{q^VZ|W=pPmS=L8+vNM@J};!#pIe8i+IJc2;pF~(348P?3H_o#s68yT=3Ap`QP0+F(N&TiC&W{EzFaPI zh8 zEm1UOe8up1$O*jTgmG2T0V$$CZmf$AN;4kfizvX;zDe(6w6jj8x%;=F5Je|dQd3e?7qoZ`CiG}Vgiy&Q;%Nzrf|!WQLK@aJ*5gWAO42l4 z$;1^6!i=a$Sy9mxUDuS9B&75@H}3|-a7|RVYg4;5ZsMO@Rr8TSuwTM>s$KyDU#>@mI0bw`c{1)3ws4i?!xKF6|hfwnoSOqf4}{F6H%9sq$rH zd1a-yQGUI+*nH#U+lNiZu3b-c^i6DlUAJE>9h$rHwf9Zrd2?Uq_9qR$zO8KE#Vv2U zu=C8v`R=n5Q+w}iZhHnM=hE}x+F~+h^R>i zHxMX$);y{r%UOQy2Q*GmbknWX<9g+wYGaSJ5*xPT1q4k|_@TX+o-SW65SqFdni`b zLS)4_tYO^hSHR2yj&Zbr1E9@H;Mqg2@8EXyTyi{{(dsC4Uq_A^Vh?oltGe6hn;M^o zhNdYcL+-}S8zn`CN=cJpR?B6X9@hCkIpc^kTv8nWDVF{gsla5qRr+MH)jY^29TSq) za1T1`q^*7|>yx$4jmCqGjUp{wxqdx$a_-vagT`a4_1#nM4!G~srCa;o9A3Tm)Cu$S zpakAvW%>Nx7k1vJ!TqOCnQLwQ>d3&IJ^Mf2@ynm@3>>k)djH+4Yk&Rv@^4^5I{eDb z@AqZSUfjL9_Q=;ezr1_=qjM)G*b3ijG;ykSKXt8nOf_!&ymx(w9+-0)bTv&6N;9eL*7=*a2O4LS?6pFa5TgO`S%um1hrSXxP^FCYEv%v)!!o>*VM gTcq8ikAo}Jt}mYaBvt(5Z1Tq_8`JtXrMYAO00$|2i~s-t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg_ef.#.png index 33214138620105c85ebd2bd1282e28c1b7359511..a7cecd3ac0e0c3565d7fa2b7266ae87a3380ddc7 100644 GIT binary patch literal 1225 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 P_@U&pliG)wnG^p28>NX( delta 3110 zcmV+>4B7L&39A^8B!3BTNLh0L01FcU01FcV0GgZ_000V4X+uL$P-t&-Z*ypGa3D!T zLm+T+Z)Rz1WdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl32@pz%A)(n7 zQNa;KMFbnjpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yk$_f_vX$1wbwr9tn;0- z&j-K=43f59&ghTmgWD0l;*TI7}*0BAb^tj|`8MF3bZ02F3R#5n-i zEdVe{S7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@ znX){&BsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nSU8Ffiw@`^UMGMppg|3;Dhu1 zc+L*4&dxTDwhmt{>c0m6B4T3W{^ifBa6kY6;dFk{{wy!E8h|?nfNlPwCGG@hUJIag z_lst-4?wj5py}FI^KkfnJUm6Akh$5}<>chpO2k52Vaiv1{%68pz*qfj`F=e7_x0eu z;v|7GU4MZ`1o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcqjPo+3 zB8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S1Au6Q z;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO0Dk~Ppn)o|K^yeJ7%adB9Ki+L!3+Fg zHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_vKpix|QD}yfa1JiQRk#j4a1Z)n2%fLC6RbVIkUx0b+_+BaR3cnT7Zv!AJxWizFb)h!jyGOOZ85F;a?DAXP{m@;!0_ zIe&*-M!JzZ$N(~e{D!NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPrN9dR61N3(c z4Tcqi$B1Vr8Jidf7-t!G7_XR2rWw%BIv?Wdily+ylO`+*KY$4Vz$Cr4+G&IO(4Q`uA9rwXSQO+7mGt}d!;r5mBU zM0dY#r|y`ZzFvTyOmC;&dA;ZQ9DOhSRQ+xGr}ak+SO&8UBnI0I&KNw!HF0k|9WTe* z@liuv!$3o&VU=N*;e?U7(SJOn)kcj*4~%KXT;n9;ZN_cJqb3F>Atp;r>P_yNQcbz0 zDW*G2J50yT%*~?B)|oY%Ju%lZ=bPu7*PGwBU|M)uEVih&xMfMQu79>|wtZn|Vi#w( z#jeBdlf9FDx_yoPJqHbk*$%56S{;6Kv~mM9!g3B(KJ}#RZ#@)!h;8Eq#KMS9gFl*neeosSBfoHYnBQIkwkyowPu(zdm zs`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMeBmZRodjHV?r+_5^X9J0W zL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0?0=B0A@}E)&XLY(4uw#D z=+@8&Vdi0r!+s1Wg@=V#hChyQh*%oYF_$%W(cD9G-$eREmPFp0XE9GXuPsV7Dn6<% zYCPIEx-_~!#x7=A%+*+(SV?S4962s3t~PFLzTf=q^M~S{;tS(@7nm=|U2u7!&cgJC zrxvL$5-d8FKz~e#PB@hCK@cja7K|nG6L%$!3VFgE!e=5c(KgYD*h5?@9!~N|DouKl z?2)`Rc_hU%r7Y#SgeR$xyi5&D-J3d|7MgY-Z8AMNy)lE5k&tmhsv%92wrA>R=4N)w ztYw9={>5&Kw=W)*2gz%*kgNq+Eef_mrsz~!DAy_nvVUh~S7yJ>iOM;atDY;(?aZ^v z+mJV$@1Ote62cPUlD4IWOIIx&SmwQ~YB{nzae3Pc;}r!fhE@iwJh+OsDs9zItL;~p zu715HdQEGAUct(O!LkCy1<%NCg+}G`0PgpNm-?d@-hMgNe6^V+j6x$b<6@S<$ z+<4_1hktL%znR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX4c}I@?e+FW+b@^R zDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&_B8C(+grT%{XWUQ z+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?SIDu(gXbmBM!FLxzyDi(mhmCkJc;e zM-ImyzW$x>cP$Mz4ONYt#^NJzM0w=t_X*$k9t}F$c8q(h;Rn+nb{%IOFKR-X@|s4Q zQ=0o*Vq3aT%s$c9>fU<%N829{oHRUHc}nwC$!Xf@g42^{^3RN&m7RTlF8SPG+oHC6 z=YM0)-)awU@466l;nGF_i|0GMJI-A4xODQe+vO8ixL2C5I$v$-bm~0*lhaSfyPUh4 zuDM)mx$b(swR>jw=^LIm&fWCAdGQwi*43UlJ>9+YdT;l|_x0Zv-F|W>{m#p~*>@-I zt-MdXU-UrjLD@syht)q@{@mE_+<$7ocYmPs(cDM(28Dyq{*m>M4?_iynUBkc4TkHU zI6gT!;y-fz>HMcd&t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M z!p0uH$#^p{Ui4P`?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&Gk-1H z0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F}00042Nkl-3oi6G=PigO>p!98!_;8S##zJ^n`EN)q(ph#N^ zR%^)VU?L)lb}V?{Eccv`bNC(ZPk)IBhe9bO03xCe)-zBkWdnCW3D|EI;2U@okq@Pm zkb*YQ>i7HiVHg%fHt$)6VOSUp1`j|h?cEeS&ua!j;HHy~W)K9f=Xp&)41g$#a*pH7 zPJxc&%%UjD?e5vp@9ty#_I^T$r7Gu2xE7>2Q2uh(%L#~Tq$ zlYBmJCP`A7OeTflaClR#R$nrgE3a0or_pHiJ|2(17K=r)yP{=TMx)WV@_qlhSS&sR zpK8ZfOQ|i~?x_tB15@A?SRZcBk(uwgAtLH`0L?^zG2Jt2SpWb407*qoM6N<$f)9z( AasU7T diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..82760505fd337bc87a6616821a6173d6e3fdec08 GIT binary patch literal 1145 zcmbVMUue{J98WElT2Na>#ue6u9D;v(Nq)JzDlHkgA6o&#YI^JOn%n~#F}=0l|6CdyJ+QT>zlWlzt%bZ+B61sf`n$Wx`{H)zOClmzpTOg23fBxDQW*acakBWQ{m8m@bWISVmefz!5|W?ujFn4xVe z%^XV>`J$)789Tq=!|{dDvbiv8$`&*HIXzTY2!R8!LD!wC8z}WO)8tjiIy~kWx~YO^ z)6AMv6U8xFMLwjHY&>T20MMeyf<#gj!5}U0K;U?Ci!qQ;lAHQ$<2N?NXE zi|o?O491?qakW~Ft;Jd7Pjf()<&Z-VVnibr%)8jA$J`*=X3$_@`nHE{TnR5K24NJ;AdgnZMS9OM+qF{3A`vomiuK!tCSzR6O6n|+ny01+>x!ZN*%GJ!L`Qw|w{+mDkHF9d{@8Mr#KXm7# zy$?Iy{s4=%U1XeX)O|@7{zzgMvP)eV?5?_a3alY?%N6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png index b3daa2b7acece7bea6513067ff8d2db62b205354..bbf157f0a71f46156a70cf9cdb310ae7e6d8c9c2 100644 GIT binary patch delta 459 zcmbQnahqd;Cu7=1FLlPrvlvq*XEAEl7x?;G`4?rTXXYj5xa237=BDPAc)HjsRpb`v zrDUd9Ihq)|7&x1o8d|s*yBZl9TDn=7JDC_785miZn;AG6Dk%U}0?ojt*TmG>#Ms=) z!qwc;+0f9{$kEKu(Amtz*~HYy(8S!u0H}AeE|a7JRGm34b(4QF8ctr!q#xtvY+zyN z>g;Uk(W;;O}}LXGSc)->s~B|0ogn-^&(H9j*> zNnpGBK{`z!B*)xq+L7>e8V_{L8g8u!eHO^7(8A5 KT-G@yGywoCew3^L delta 367 zcmcc3F^yw_C!^9vFLlPrcNmo>XEA0^-o>Olxtd8@!PU*x*~P-x(!#*f&Ct-*$kNi- z(Zblx(8$!t(A2`wd9odo3`~(DPDRg{3}T=rnd4HVq)=QEl$vIhlAm0fo0?bR>0+x? zkz1gbl9^%!)oX!E@8lw8r+SyxS`!8ahAvMR$B>F!Nq_$Tw`VpxaN-2VG=@{gNmGw6 z6_jU?JaxoDO(9yDTP(eWapiJ{Khj!9xQ<+M&|m8m{#*WuzXTgownCcQB=(JKFJ4Lb zs(fPEevd!zyJVw&Bq92!<}s1_ow^<-aUHnf$fi0dy9Fr>mdKI;Vst0G4=q?EnA( diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_press_ef.#.png old mode 100644 new mode 100755 index 4719b188ae3bfbae341557534957357e0b344a3e..67a91268470152ae9148eb387288a870818d586d GIT binary patch delta 347 zcmZ3-HJx)q6qAC5iKCH`iG{I&o0E~Dp{uczi<`5vsfC$^xud0{qoK*ssmGPjzB#(GFIJ3jPTyFtdZ;L3qO zW_Mmx#=>+3<|_^b{}12OZWeW!+|*bVk&rXN&?jRW$Ha#Qi79+1916@&9<&x#QRH6| z*=d@>xhhObP0 Hl+XkKHf(kx delta 499 zcmbQvxsGc?6qACfg{!53ld+MDrIV4Np{tRTg^97Nk(;rbk(-6Ng_GgrDkd42B14>t zwlO6rIGMScn>(5sm>atoxdP2{v~+TIbuqPYGB9OL)GD9-f! z7yrz?0#{_X<7}R){fu-<+jlqBoO{2~u?wpLyl$#&)rv1=(R*Jn-f<|}WcLL3yN_hG z4(|BH!tzGSm%-K{_=PXmzIv{A1@czyY7^L=x7{!0J#to6PR>#Pg7VIznk77E7g)#3 z**UMjB<21<*krooMD^&VM5(9=)jCV2Nv60*I9Xq@_qr(LVHA2ZATr^kIwQ%C| zpPsXpRbRTf{gKSMr&8-gnNx4Y}X!|rxx_3J3>na9^1R4cYU&~{Mn%pZXS YhO0}jX-t&zopr03~(H0ssI2 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef.png index be8e801268978b9c048a9f0da839274a764f6bf4..fb1d40d2ec6e470cbb3f9a24a17a0abcc2fbedad 100644 GIT binary patch literal 4746 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 literal 2819 zcmbVOc|25mA3oNyBti%oqb&DkHfET~$TBl!-YfI5B-WVPqBvm{OTOAjE=B_5&S3GBrG;6*K|>Azzxa zJICF|8b@K$VdM=Aj7tyZvjM>905_OS2?RM1AJC7+z(aXewNMC+iif(PZ4frW=Ab|A zPy`Efim-L2LROkU?h!GdZ7odY2GK5PHVz6;sJoKwBjz8bnhC?A=A)G)w^qW)e zHuey6CJTh1VS2h01QH3sU|>jnGzNp*2SFi_C^&+DV|0=FI5Y-_GJt%)pnPjAsxQuw zK>BWrzrsWPIhR^&_JPd`3PNhIDN40Gn+gPwO<~c3 zIW#5%vY|-!VIJe)p?pujg+LFsvH2m)V1G{(KV@((IT((FA>efSMqFRfY>p%NA2-sJ1&-FibY|OL;}_vgG3ThW@aQb z*1*(M4~;NIV@Z0OTnh%9LuOFGO}jL{-S1q&KXP&AERf7$vYeUBpv?}j_h)jLY=34j z#M}u3(RQOTsLU|7&PI8@MN0r#v`~;rVlnBEuldE%{>Hu@+7zKjGBhBf{#V@JxYYkA zXK=nV@Qvp9uV&fY;&+VZd))#(} zYaTdp{H1|zIfpCRYSP^}>7!Ya)nlma_N35C;bF)`XW`F%5A6+LM=Cmm)k3<@HD2*0 zoNNS6;V9glmU+5`+gBLb!`V8grFC@W#E-H%PrL}@;lHrgCqj5`3)9m#rXfdn^$65T z83BK;D3^O2zml%75@@jgs=vSTR;#F}Xk!kk@w}n5-c^MvNcf(l#uUU3BFfX#b3nYV zzP_Fp>78SFSjG;P8QA7qCe@hIK2hu7L%kj_bU+iT3(unQ$$ynuu~8^z9>+S1;oud#6LI@S?Hx zj|~-e2b8$)gT4E0BvmBl?bDuvHIJkYNoSrF*ct3od4GI-+_lCF-oEPR=QnZNvufu< z_Jr*tN6KJD$m8IZ`6*Iy&uf+B=I!M8ttQpLoFMeBi)8!(PVZ5Opviq|P;8)}1-FU~x`{nOBw70hx z2Z)%wo$4ym>AbPHwz_mWAwjGwqefc3clnQcAypTc(D7dG(Xzx7R>ZlYD{dp}Ypc_` z0#R!#F3F?ER8>_k<>loK+8+K8aHJ&9#IoH?BaUHW75bDe4$KtO*tZ&)XK$C4sD*kt zj~lISL&voVE2KYO1urebmsw)bq6%KKL=acLw7YZpcTU^||QU%gZFU8K91twU{XI{-1_(>Es zuhw|ZL-deQ_n^eR9Xsdm=0&CJPFPw1lgeYJQ_(6xrFsQj%f?rdRnmT0wsvS??Tu95 zbzOVAC6B46D0$yw(e%rN9I^IEwDDMOZf;?he`I9jZ$tYfljNRciS5#;IrO45wLd7- zOzmfr25R%?($_Tqw-;qGqP==2i!*x9e36TJ*vJ=|=0se5 zlRRs#?NxW2QT1l1rKVINCxWKzekZQnQ!!*WMM?jPz|uN_qOQ0?*WCpGTB}_mrEdWP@d` z44yijgvqxh!VMeaVq;@vD<0$!GeQ=aQM-$JKE4cie)p9TAbatprM{ok{*WF?;^6{c zi+A}ki{1;y?~>?+QB80|K>hZ8!MA>>E*>>rc9Kjz51u_How+LZ7h>3HI8YG0bF$P| z=RCLlG1t%G6VPdw-)l9vrU4hW(mDD`;{3K)Fz5F(#Yx(;65?xT51x-VRf1nA%yt3_ z^31Lo@}gIRj3pga5>+xYqt*8rpIaL8S#XFsXesi332=_0I^MIsWKr#I6r&{ybP431 zpIcKryAHVpk15D}ZD^F(DRUD~^jVH?YR;mZ9xe!fo?)JSqq^|OmOWz9!=0U-(BVR_ zth_jR1guUUc;Zo@bGl8uJfkF3F|LrPU|~_y-{Bjr5qBdb#(tk=porZEi6)^_M?OWm t1hm}Oc5bUC64^KK6;glw3%@S!4cJ|o8ICFy%-{GewIJFOZku_Z`ZskC!K(lO diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_dim.png index 11341976c23f3294d6ee02341415b32d2b2eb4ae..aa3b9d9af8a40922c6173c04f3a8b9af3ac7a428 100644 GIT binary patch literal 4640 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 W$D{1T&3zvL0000iH?wi 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 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_press.png index 3d3bb8049f0bd40714c4c2ae7e3e10696754bae4..85f6daad639e98c6f35265a7cbdd8cbdfc5eadf7 100644 GIT binary patch delta 3242 zcmV;b3{~^i5w01KB!3BTNLh0L01FcU01FcV0GgZ_000V4X+uL$P-t&-Z*ypGa3D!T zLm+T+Z)Rz1WdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl32@pz%A)(n7 zQNa;KMFbnjpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yk$_f_vX$1wbwr9tn;0- z&j-K=43f59&ghTmgWD0l;*TI7}*0BAb^tj|`8MF3bZ02F3R#5n-i zEdVe{S7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@ znX){&BsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nSU8Ffiw@`^UMGMppg|3;Dhu1 zc+L*4&dxTDwhmt{>c0m6B4T3W{^ifBa6kY6;dFk{{wy!E8h|?nfNlPwCGG@hUJIag z_lst-4?wj5py}FI^KkfnJUm6Akh$5}<>chpO2k52Vaiv1{%68pz*qfj`F=e7_x0eu z;v|7GU4MZ`1o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcqjPo+3 zB8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S1Au6Q z;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO0Dk~Ppn)o|K^yeJ7%adB9Ki+L!3+Fg zHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_vKpix|QD}yfa1JiQRk#j4a1Z)n2%fLC6RbVIkUx0b+_+BaR3cnT7Zv!AJxWizFb)h!jyGOOZ85F;a?DAXP{m@;!0_ zIe&*-M!JzZ$N(~e{D!NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPrN9dR61N3(c z4Tcqi$B1Vr8Jidf7-t!G7_XR2rWw%BIv?Wdily+ylO`+*KY$4Vz$Cr4+G&IO(4Q`uA9rwXSQO+7mGt}d!;r5mBU zM0dY#r|y`ZzFvTyOmC;&dA;ZQ9DOhSRQ+xGr}ak+SO&8UBnI0I&KNw!HF0k|9WTe* z@liuv!$3o&VU=N*;e?U7(SJOn)kcj*4~%KXT;n9;ZN_cJqb3F>Atp;r>P_yNQcbz0 zDW*G2J50yT%*~?B)|oY%Ju%lZ=bPu7*PGwBU|M)uEVih&xMfMQu79>|wtZn|Vi#w( z#jeBdlf9FDx_yoPJqHbk*$%56S{;6Kv~mM9!g3B(KJ}#RZ#@)!h;8Eq#KMS9gFl*neeosSBfoHYnBQIkwkyowPu(zdm zs`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMeBmZRodjHV?r+_5^X9J0W zL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0?0=B0A@}E)&XLY(4uw#D z=+@8&Vdi0r!+s1Wg@=V#hChyQh*%oYF_$%W(cD9G-$eREmPFp0XE9GXuPsV7Dn6<% zYCPIEx-_~!#x7=A%+*+(SV?S4962s3t~PFLzTf=q^M~S{;tS(@7nm=|U2u7!&cgJC zrxvL$5-d8FKz~e#PB@hCK@cja7K|nG6L%$!3VFgE!e=5c(KgYD*h5?@9!~N|DouKl z?2)`Rc_hU%r7Y#SgeR$xyi5&D-J3d|7MgY-Z8AMNy)lE5k&tmhsv%92wrA>R=4N)w ztYw9={>5&Kw=W)*2gz%*kgNq+Eef_mrsz~!DAy_nvVUh~S7yJ>iOM;atDY;(?aZ^v z+mJV$@1Ote62cPUlD4IWOIIx&SmwQ~YB{nzae3Pc;}r!fhE@iwJh+OsDs9zItL;~p zu715HdQEGAUct(O!LkCy1<%NCg+}G`0PgpNm-?d@-hMgNe6^V+j6x$b<6@S<$ z+<4_1hktL%znR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX4c}I@?e+FW+b@^R zDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&_B8C(+grT%{XWUQ z+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?SIDu(gXbmBM!FLxzyDi(mhmCkJc;e zM-ImyzW$x>cP$Mz4ONYt#^NJzM0w=t_X*$k9t}F$c8q(h;Rn+nb{%IOFKR-X@|s4Q zQ=0o*Vq3aT%s$c9>fU<%N829{oHRUHc}nwC$!Xf@g42^{^3RN&m7RTlF8SPG+oHC6 z=YM0)-)awU@466l;nGF_i|0GMJI-A4xODQe+vO8ixL2C5I$v$-bm~0*lhaSfyPUh4 zuDM)mx$b(swR>jw=^LIm&fWCAdGQwi*43UlJ>9+YdT;l|_x0Zv-F|W>{m#p~*>@-I zt-MdXU-UrjLD@syht)q@{@mE_+<$7ocYmPs(cDM(28Dyq{*m>M4?_iynUBkc4TkHU zI6gT!;y-fz>HMcd&t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M z!p0uH$#^p{Ui4P`?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&Gk-1H z0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F}0005mNklqe4_9A}AOHixutmLs;)8n%3_iQ&~9Jh)Nnkf&?K& zVzXkQyM-}vY)&AB!JXMPy9@7W27hLlndkqW%X@}1SyfeL*;;1Y5|>ko$n0C?gP~m96xvK>|ns cvu%F{02fC@&XfI+2H>$nC!>76bYn;W;O zB;Xwc-NGlmcPc7qBOpSwFu^91L;&6cC*N!7njN6(!GHX z7YVbbl_hdRA-@l{uoa&qM^O!zN=->gp`kz#*0XvUGmw7UlyFWK%1Y+KBgS86mP^3x-NzkicH7bGlB1rhqFZA;p7+s0uvU=_%lx#63V4@auHqB+8B8IK;m7tC)Bji8@42%7Cuda5 z8LF{3{;OE#x3CH{PCu4Dw)ogQuo~+aE!G-+%J0_Ta0?bnAYr)S_IPwquv6q`vp1jN z8(uCcxXr{%E4Wtj=;$?Q*kSW1=kq46!`}6f^5p{0n+@?73k2s21lcyL6~)o=62c+Y zmvQ%>-keB%vK4M`NmAZldYCsRzigQM`+@Ynj>+Gg4x?OE`sFTl`sjVzoV2B!=XtJ@ zGIrNu)P(Qz)fBXTu|p@>Y9Yn2g8;k5B@g|&)JiCo3#@QFAL7F+P~@S5CTjqEUUt~< z@~Kst$Xa};+OE+7FWqdvbDOX$!e>!!j>oWzRrLtH+PP<~n`BY-w3Ehk?!vis#XcO< zy!8hN)Uni&KXi^$_@asck;9NVk1*%zTC{?Io#1Cf@BeH;YlGbUNrLV7Xka5(CqnB@yi*MInB>%gm1PE_r$-Han*5 z)fcmzE}9)KG90{EZRrvS%f3)<_ql$9?b6#=@moaR=Hd9%?n-?3+}xSc0N2p2t}Y8qMTEoa}p zeR+(^sh&#uo$~(kCkH2=uPQ7k2(L+J{^4kAYiqgV_t8<=x9LQE^{)K<1%*E=#>&d< zjvScY6ceNGZLF%Os0e-5JezL@y?*^VLL3rWQc^;mrEg12yfpFDaI&=2+S$qCaZxlW zn<#ck^0&EDzv9@PJ9nXOjEC_T%xHnQwY;-70@OJ*~B3Ey30L zvMQ}LxW2zVeNnP;_0066M?GDE8=0Lie(vw@$KORvpIhQ4;x|wOv+cbJ+hPV{^SeeO zySuxG8XCYOj+YRn(u>#^8ylNdlD^C2?A@WGGLyL+TZ5%d-Q>i?+1$ggSl-^u@16ZKd|bQiuI!y861hx}da3L`1U%GuE}nU}2X>F1R&u@`#x%rUw6}bIVL%e?!!GVP$1yXK$~>sb=q>dt95% zl7)kjC zK@vMcz*gTY>u9{*!dc=(fWOwM`M6Eb_5csb%#^C60$Ezff5T6y%ERLtr1?OYgAGW^d+1)=s5qZ1J;>9=F{I+wn~MvD z91=uWAKL!sNMnip^6&hTN(SHPR<|9K5-xLo_cqt^R~0;Q*EeL6&y^_ahPpZJUAMNk vGOSv8KxJETz}kaoJMg&#b z_e(b_PbCq^-Az=IOw?LCfPS2ZirTk@0II3LB(`%b-y|B$Qk@6hoh`A)@^^l&6c1{P?tGbGhUMkxKCRDFN}0C0aB UUMcWZ7ytkO07*qoM6N<$f>2d9_5c6? diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_press_ef.#.png old mode 100644 new mode 100755 index 758700cb8562afc57fac096ed4669705ffeeb19b..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch delta 111 zcmV-#0FeK!7N-`lzzSzlNkl#b z_e(b_PbCq^-Az=IOw?LCfPS2ZirTk@0II3LB(`%JQ30-Xe|)+ekXH7e`i|<=z1R XA$A^KpPxFH00000NkvXXu0mjfCpR~X diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..a37a4208712083af3327f115d42d05d7d44a9085 GIT binary patch literal 4550 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 b*TBfY5%@lZ^JdONP(kYH>gTe~DWM4fW_%l% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg_arrow_up.png b/res/common/usr/share/osp/bitmaps/480x800/default/pd_btn_bg_arrow_up.png new file mode 100755 index 0000000000000000000000000000000000000000..3f240194cfd9bf94e5b22c300863f24213f6c2b0 GIT binary patch literal 1481 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(vA}5_ zRBsAyw^-uTs}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+^pJT_A;lfyvg>#WAGf z)|+r|zuN&Kd&^|hy(CqFY}l+iLo`$Ga9+?;SiFICLW1ZT1)I&N;sTc}(% z;lI6N{p{j6o}#NA7K({a)FUe^>%Pw^e{XB&XL7voiEX>ydmE-h4F(E49L$Hd^D9q2 zxkjkGExYM;R_38p=A7IA%x3x&&9G`qw0W`XUwX3Y(cPbu_uu~?xH9C>4xcmcH*DKH zk%w`QsSICz`0CKr0U904GL7c?tqsta((j@a|KV@p+?HDvHv86IfBiCOrOMf~;%yw4 z3M~Fu&h)wW;B&|GC>9Z~r9s>`FKjNJFvq}n!l?|CB>kP|&Kxy4>wn_X$IItiTNuu5 zyZzRCLgtIv3)bALZaNdX>|(|jh9mWc^%0RK40m3Ct-AiSDAM`8$jtBV;?H9q+rB$^ zFZ#%ma3z)*rV>1#7`hpK7?v5$D%L3Nuio&TnQub+n@ufhze@V+a)VXw=9TNsoWAAq zOOEf?vbM$^`KQvB@ATyJ+8-=AF!&MDzMbjiJzf1=);T3K0RYsNEF}N{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_bg.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_bg.png index 9ce5f1ab87f1f16efc5a3dfd8644fea1e772fa4c..af3640ca6e92b4413d7d2d5902e0bdacbd148873 100644 GIT binary patch delta 807 zcmV+?1K9l24c`o~S^^+4GBG$XML0J_GeS5qF-0;tG)6>5LODi6Ff=emK|?T;dIB6E zGBPnZFhw{vMKeM;F)>9lIW$H@MnXA8L@+ckMnOX`lePk2ATu&UIW$B#GC4IwLq#$% zF*rCxG($KeAl}7`=%p51LG+*qt)RV#1?%`##SO8|7AW9?BdGi;qUzST^XWL(2i5k$;b?a-Nm* zaKSv5oS)=emP)@Hs%Z1(jfK~*UW(0)4dMHq5F#ja;+c3hG9XK?qHCX7)U2 zECfHWAnv>deK_ZTL zs`Z%C>(Ty`(nvC8a#RQ)IZ~j4OzG1cRV}@cr6;N=RAguar5A+EB>q!+s%Fyq(9x3^ zXVTwN(f&7laQVua&;!>gzG>|e7_z6-$$V?H(@X}K=lag;HYJZBR%v70piUXgX zqLmE%bQBP}kEY@&b`v>0D_Z)VnSh{~k~un%_vCIR!*Y~vbhO9Z98I$744CBJ+J-k`w!UJ`Bkc_cs4R13o>PT zR4%r@d~ToPp%0d2LVu&tkjjn&W2`Vh$8n+4>A>dJ7ObtUL$~X;GV%0udF9RA-1X=0 zKYYAWuh(E|aspIUEmX}g3}Nq&3EMxn!7%g|GG%)dz*$;)GJomfh4sk^<{q^_m?&`CZ)fdQg5LFNE-#yrP`_4V&9+z_p_AuXwXa%=u0Q+x7_Rv$w ltQ-I>V@PpE+V@w00RXw8p-OKG*J}U(002ovPDHLkV1m_{cMbpm delta 924 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 Z03Ug%^pvCy+KB)F002ovPDHLkV1kH!miYhx diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_press_bg.png index b64acb4cdf81bdbe4ae06cf92a547fb0add7689a..4242dc5ed0ddee6255a0da1ac127524928e25aaa 100644 GIT binary patch delta 830 zcmV-E1Ht^T4fYJMS^^+7GDR~)F)}wrGeS5qF-0;sFhw#rGd4vwGc!3xH8DApdIB6E zH8MprL@_cpMKeM;F)>9lI50&rI5RdyHZwChMl~@xlePk2ATu&UIW$B#GC4IwLq#$% zF*rCxG($KL3@dXG8h={S5EBPef#6T>>)Q)y5w1#o2iY72= zl(hJgfmn#?Z#8N+WN#a>m-CW8-I-_1yj56)G_dx z0ex!kQz)(4Rj88s6g5*b zz^zrUDat}SQwoZdr{t7J&rH!HRSJ%I`ktSRNai*8w}cpQr-3i;+UU8xp0waSJW){3 z6M(`En3RFvxcKcjuYZlrHLz_v(WsJdVjvb`iqvSOQeCn>y?|do*X4BuT*s9^@|98W zf0cZZPx4I+_0KN@rpS1jUwHUzeEj+&dv*D8b>9$t&Gv&}J+VeJgD&(s8?a}66>>RP znv+b?8U?UtXYWs3ym0>A5tCi&<9)|D&zP~+rV#a7z4mdf@<;9Q+|%VJ#I)W2Q+IA{ z8&2N5P24%Dd!g}0B<`;Apz&s8Q|gvF_B%k65E-1V?EVNa0J+V8f$dBorT_o{07*qo IM6N<$g6|K0_W%F@ delta 889 zcmV-<1BU$e46qHbS^^+OK|(P!GcrO%Lpe1uF-0;#LP9e^LP9h(K`=NuMngiAdIB6E zMnOU`G&3?mL_;|>F)>9lK|(?^K|(?_H9;^qIYvW5lePk2ATUHQK{+@!GBZL%K}9k# zF+ny(F-1i+G(ti_L^(k?MUyrIet#=b&e;F}0^mtRK~#9!)R;kN6G0S)-)v)cO;yqs zgrbC0N-pX_t$47~W7L8mcu?$JbMcUfEfhT{g?dnrQayMLR1k|*DqcKDEPD1JRYML2 zXvoHg^UuH?YS%<|$y$qRQXfZ-ne$5Kv)^Jv}*kF=ZTzgHFPpQp(H#c_W{hyvLps zLedCabp=JpXTxLHZ~s(=0BUvq9S6Pg7GFdG=sg9)W6{*g=PZsu%DUY%df_~u0q2ab zX9p9f=T;Ao0Ih97opMm>X@94bqA(QH@Bj>u&5;v{*!x^=`LCHwq_G(2k)#Qu?-&3A zQk?8pGoOtNThSrTbhE>HT+I=KhMKGLH^VuD&i3)^(T?(j;Yj!dGcJ8@oT0&Dn%z(o zv#Sxy1jx>?2!*rBzP2Ptj&5`G7*6!CE!e^;1zre zU#uAITJS}SQP`zC2_$J-d9tGlw#B#cNV~}`nDxZkrkd~KIPd%u=lo?N0woh?ArQPB zeyFXCinS>T;xV^S|wgI$W|F@%P zv#zd|N?G;SGL*|@s8p)HLGov7ng;6cZ%|rWo9~Fx7cXDsGU+?7;m?aw+oBu@yp3@rMPls^M7Cr)Nrr2sbiF3zgmC; zN`2wo$4_@TQ|sQ$qX*`P>FNZ)OoD^=k6%hAUF`qBIS^TiH zghT7tYaO6go4)^$d(E>cf<5eE-QsC(VAq;TI*z?NK)r4#%%0|L3ornbNNfnE#Loo) P0000KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000J;Nkl{NXCDK^`uu*LyM(S96_Q`qZfHGR$*hCnu2kxRkf?xUo&^^%4BKl;Ipu4mSq4MfNlW206GoBXwPP|%H6wn*DhVU^bY{v1>S1P1Mq$S2Nq%+7#ka# z$Ye5qu`KIT-}le@zCYsozTCtzkc01h$Qb)Hlga#fY;0^I0Bi{G1HDZG49(BaU&-h5 ze{@|pWm(oxI-M2)aNDtTIxSk3HRQT(DwoTBHa9o-Cjf_D6~M^C!onA(X@2B5&bw=C zYq9ML-)igY>x$zz?@>xWzH{f!=K$W=ZGh4F`T5`5wtbc{HnO<5NOntn%@!9I31jR{ z+qTcn&CUG*!02uPjLgo?USy1&u`Fw7dU~4QZSggmo}T6{%Nk~kjnB@`UaaSdW&sXf zzkdCquInF^%jJ>D$w?vDfnJ$SPEHEta(P78^;1(*Qx^gBZx?`^J9ln!d3pI4hG87N zcI_H@)#7V5GczL^hVjbPl|?_@F=Wv|57?9rn~anm&4 zxpL*ouK^rx7C@YsnE2$ug9k^l+3a9&;_kU+v)RG>_wT=zN~L~R%Nn-oeNi$u9F0bw z4Gau;H*Va>wklD(b?esJ;NYMm2*NV}!_8!)!>3Q5eqO0m*woaN_o{ZCMt1q~k=e>o61$)1E;NHD^4##m` za7}FpAeg2}Zr;3!{SpJWZ{G%`RII1B9)NEchLlVu#r@&|%d!ZiG#d6Ca16sxB}v*h z039725yLQ408W@7HjBk#yDZC6Py%Uv?S~M#QmG^Xm|;ASFO^E&k|f3Uiw7i0l8eP+ zS5WO}2=G+b^)5n4T+=kE)d8$&n#A+GS}Yd30Xz)@@Qg85v~9aL5{YQ7o_$di+e@WV zKVvKp;CUDT8^DwG_4UJwqI9;nekv%6(xL16D1iUe3*vg>JOIlZ8ymxfkOPTCqN`QQ zM^)7>LP+n%#>NnUbf7KNeL(j-?_arG?zo~T2US&#?)B8i<8evTw1c@^?mf@*z6nZ| zp)WKpfUk93?+^rGL=?r^wQ{d!Ul2v{5P(r#*Hr*t1)4$w_yBa@_rF|SU437c<g;SKM%wgUR3yfS$W+7@Qvd*z4?6p15MMscsyP$m&@5ORpjl8 zR}`gBmgTo|x!ftoah3oqzG(Kt^ao4;f1{Mj9LJ5v<8dMg!b+h~_^w_+?X+8@Y1)7+ z%kLHng;SK$6###4)CdXF9}oa^0Qf|bq~nQ1Vu>+!-*w&pRw@;1HYaojRv?Avm={J$M|Lr@f@yREJ5 zXti2BQ7jgJ=DP0J0B+S2zY~C(CsY6*avV1<%W_nf<$rS=_t5jaN3QGUN~IDDqgqwf zs2~VkJkK8iaF|m1wrQG15U^hcJ+x|=4o$NyCJx^>^ZEe%hUfWlNs=m}C_d$R{waXx zf*`E=zP~{!EeV3)0zkD|C9*8506Ki%@AG}X$Md{HwrvkG#$?a)z5?*iAXPA5wn^+1 zVDpkv0UQMIO8{>WLXJivk+L8N1ppO}$;`?r-9Ec~I y4oWW&X$RXP4bGXSgTEob>o$IRSEAM9{{sMVKBHBlNAJJ@0000p*( z$YNP4ic;{%A`}cLsE9ya5D>S51vjuNY6yt3%AKg#`@_>8_d7H5ZSV8E`#F=oZRXB3T5K!1F?`9uXzphkS|Aj>JTz5lQV%Xnb)PjPVt6BVZQHdy>1P*&5|o&a)# z57MFL^lv*65L&B zObU%grV}X;4Fug6u)ZRhoGaqN3wi~J-p^Q~_djB(3@OZ&i={zgar8n3Y>O1j#j;4T z1j7gAigW;nzcoTfPbr&tz_kP6f+zm`6-`Pw|N2&4H968*hbLt1>`p~f~*V0q^Nr2kFcy@k% z?#+V_iQSJraGpxsfvz$8b#HVn(pT3TcU?dOtGXub$H)I2;6)vE&T897sWJ7?Gj6dR z^|9Ho)4;&~uwo=OHul$vi3zp4b4*OkzJP#$Lxh6P@N*%<`uh5Woa?233=CwdUcKrS ziN*7&s@cWP$DH(-#*;Q_V9QOj3nk~z?~hNI*_ zm#E=5**5dc)YQ~wWLSrUguHz+b+$#0H#}W&=8Wyb{{CnfhE20`a$?P1izDakiwp3_ zpZ!>BUl;70j>#9)^%1PCt?SCl%CHSe<$ix)QF13;-LiacZti$@SJ$Pcy1GCU&b9pF zVypdFwbjVT$c?J1Dtf1Sx~;8kW?*0-G_0ArO_#t63lo_xUc5ieuKI@!f4SgrzfS^_ zF$#rIZ2*-_{=g0meN=8!F-}g-Xl-rvPfbl7eE8>|K_e5>cLxUteGV8L(B(4QI<{A_ zXF~k_yM-A8W7f$DB~!`C$qgoYjAgEQkNvM4v(MFT=+sWfZUe+*|b+jr${I(M(H@4R{C`#pSqTk^Z<8l^IBc|%Ui=1ajR%1)m? zy==+SjLb|&2s9$O+WOsi@#4k3+1c6MM|_%VyI4o9K zbnCgDWacDUxB6^#^`Lm~-hR84D@nReBaK&whWNTe_}0AV78Vvp__B9*QwGgfXBqbP zjiwkoI5>={)#}5IqBt1Mu}af}I&PorETRvnx;s1FdwYAKEweg9iFC}89v%J2`_3g& zyNDAXJ+AD~_xQ^&+0wi*FE7trQc@EvK6#t?tbSu+chmPhX?vp%&bXgW&a#W-MK@cn zhQ6!YmyHffnK`jbd8luUv-a+dqaUF~EAr%O=U;q$5|1_=PG(fgU~ae;g*db%Ubl_P zrdd3ZLjl;s>#V1Le(7|d65Q%FQ`_mK7jG4e&Ynt<^i8rPX9ahbEPBxhXG2l>tqMgp znjP;^+t^#LD!P*krpAy|M=(i_hlZQuoRg)FF=JM5Ub{&1*u(AjE zSgGVFES@fZ9OVSIa9gpx2I5W2*4fD{D5*j8|q4*SC-!?pk$clxGAu#5kn*4fV%m z4ylebzbsWuSZhT9;OpDC+h|s>qB@4lKjlz*_maW1e#>I?{hqKj>&K}_w=!A^(lT~H z*Jaud6_M-fddnw_r#&z9U8;DG`9pW7c{WSpsCr}hF6+U^3j6ta4$$`d0c~T{_IBOt UHjkW>H2*Zd%&ky0eb2%F0#9n;)c^nh diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_dim.png index 8a573723dfc26da65201e5158e7d9917baf37ee8..8d2baeabf4c2182fcf59911c54f443ada8acea6f 100644 GIT binary patch literal 4355 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 literal 2754 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 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_press.png index d90eb050be60fa5354645da98e8f2ea223a2b440..6c573ed82411c7277e17f71c15420044d9c193f5 100644 GIT binary patch literal 4747 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 As{jB1 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e028aaabea7683648b4c5b0ceef3b9ac7b1af087 GIT binary patch literal 2082 zcma)7Yd8}O8{SNo)0`q~A4MWbG|XWm=OHF9b7oY?Att?JAvu*Yk%s2b7|HU+9Ew_6 zu?RV(lv7T{hLFQv!|T=eUf=ay-@os^?&p4<=en=^`TJxzJK2hhD2f080C79CmCIgt z-mC2WLVNmPb3p+B0CViD%w1!L7stjh-WOotW%Ia;rPU|;@}AWRR9s-*6G+P=0Y5N| ze9KlkyVSa-%qEN9LQiI991VSXTWvfxtPJs1v{*jn%NF#iB|_d?A*Jr%+wK_CS1Sq6 z{d=9#*b$7yrTqAlhoX8m6M9yQW?9w`#G!w^TJMlN_8(ML|B;M*=Kwt3%|Igh)&o7G zb>__zjw0c;Ww1L6-zhimPh^I$(RNujynJD}>I`vW&CcGf`sNASvaMs*_Me3B3x%Y+ zhoAnSuJs#Z)}vF5djF77Alc4vJPD-w$8}O`C$W_fR9bszBikZ<0^{Cr%cilR^y$}_(z2g)=$J-kDjIKU^Jch2R zgS^->8jV&Mj&l{ScWu@|&O10bfQ~##+zc3>W^m#sSouq?uCA%~&VovA zXhS?mYFBf6XXlZZr{>g?^Ro=Ea7GU|K1wI&C}Tgu`aoag)?0?)W(bsa2**y_$EuYOmH7Z%O%Vl5b~~8@nBNG47$6w~EL0eOe$K9*-Bq zl3>~2^~`No(vNvLDb#CR^_A@6`%bp>Gj1fu^IlSJ7OS#a&H)GBzK$ z=SBgrKnU7DMtI^m;9TvgeVM{kKuZX#DOyBy;u<(ymNhGe{+cOD1&I72ZqMBt>;;_x z`1J8gv-msmn-Mm zkD5w1tQ9>#;;E&j*X6SPJT^&N8GTqpPFY!*xgtHZm5R336$~j9LNVPT`=do zBAyx*_XHTT78=c3dJ)X#HnRUC!m|-nwN`q-8$|g}%3^qd7m4HVtw{?#(lRhMhKkyl z$-!`ZH6+G)N=0Uuw?&DmRlo*ch435J5=wZ-AQLFI?yNjZBQx-G7Cm^XheDx98PEMW zsXSiTOx%R7`^E5oKc$;1YBx?nnV2MOj$~x4@HmWbtDEUn!4nZ_)|CNkZj{9zUXKZe zZBe8tKnzv)HoI}FymapXvL%t5Mx@i}!{#WuA3>LySk2^*)%1iD z+)cht${vq~CgwDL9NeT@0@xDE;`3p6 z@OCUnLbqGH9IC$b?ygnTdp=*^Yd^|hGIGo-m&DQc(*-w7Kw%64iLOvsIfOvV2@uN0 z7BNpaNWa-T9BGar$!lGazw$BMl8B1XFG&N*slfWv$>}r2Vgt8j20;x#^@z5Z-t>@1 zLV3o>S)^DG5LqbfcNnaNyD7JgJC?}k25{c2vPijc^5KqoZDCEnBZ$$Z?WDP8F`)__ zhEAn`DpiWnAy@|kKfzI*guL&o;T4`Fs1oaFwyHik!hVW}Z1qyK3~}sRV#h92 zpEPxYzec6;B5666p=ZRs-r(wWnKuH{gHn(CNQ@F~%HKA~JJ+L_m2bpUf81X_WgcYl oKJ7erH4ST?Wo7?gXx`>3lSx*S))3=kd%quGXYFM5!~&Q6H@1|_&j0`b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_down.png b/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..da64f3493e401f577d096234eb5a6d009e5f759e GIT binary patch literal 4081 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 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_up.png b/res/common/usr/share/osp/bitmaps/480x800/white/pd_btn_bg_arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..f0d9c6691f1909608be4a24bc4dccb3ece75a7b5 GIT binary patch literal 3799 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 N002ovPDHLkV1h2`BX9r! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_bottom.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3fa1eb5c0b97d23f40a5bfe49b6d29905f59c0 GIT binary patch literal 2847 zcmV+)3*hvLP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0000=NklsoNus@zXXMt@gY(1+Bx>rOkdwJ7G)yz7Q1i(IvifM{S2R)Y_aiCT-mMR2<5ai#{?4_G=h-k}9sYFu_3! zd!SgAz`45ZS~v`*2Y6kVH8&uJYa&fmSgOF;wk4OLkP)R!R)uqO5SGM(3Wa%9oENf! zSQHma30K8t*Fi2xxYhwz8q1BX;CM8$ihTPzvdTVoz~IQTJwBJrSiK?F8lTJTST0YK z;p4{s)#zl4x+k8FY)cm-<0F^4-KVy`xPxEPE3u@hgwfDtbaEB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_right.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_right.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8bbb3e16ae0a290422e4b829ab83a80578d9b9a9 GIT binary patch literal 979 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 delta 826 zcmV-A1I7HP9PAsgzzTmCNklhAW%^%3gRgsco3x! zsVIS-`T;x?1iyjzKn|rhK@_}LT09hlUW7`55-~Io5X6AcQ>YLKg!Pb(mT2-`GW+uO zZTBCR917XlA3Hm5=gl;wl)`Jg&UgeKkO$-ec|i8+?8LvOBAI{l0#E>Qz$IW|pJ#4ZHxF^8kcWYW$FYiVAh0CeJeKIMBZ@ z`vlAq6`&P`sz(H7bky~Hi2$^yP;ci1W_0Z6`K<-Cs!+!(iO|$pzW)~an*PN ztS98Qu&(W$Nwc`v9qn4_1YN26+ST@=K7$s4Pe3Mt_s$M*4fq!28B|Uv9JJl#D9@mK zdL&s>uOY09rGYxIYF$AtmIZ#`t}dczOLkBJw^fk3*s|k*mZgC5jswa|0p%PA zl#>Ela2!xZ3Mg~h0R@G5_sh@JQ9z;A6(%RW1blT6kg=R}1E@I$rxy0; z2>V{_xnqDrugAYxHS}h+4?J~b_dNRp$DoT1PyM7vv|R?ZijZ#_~-s* zxIU-_Je+2WTB5$Td+N*gEH#RIz(&FVZScSHyD)ze6q0XQRy;m#Y{gYb?(3uj)C2BM z8x`iLZEc?@uP$xL>;eyfP0QeHYP-7PUozP3Q?jJnr(}D-*pBZP3)hNyI43ZNqSnlq z0G)KZYD8eFQ@c|P{bFHtg+Wc=D)O%9H^58aixJB#X$wE8EQ89f>l#*;zkTyV4g2NW z8cH&aLEn7axHTd`UjAQGct9SI2jl^HKpv0>bZYf`0E)C4B>Yj`E&u=k07*qoM6N<$ Eg3aKG-~a#s diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle_focus.png b/res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle_focus.png index 30c6cec591211284844fb553f33239c3731eca0d..e7ab052f2db76b47548d24bb2531d922708f912d 100644 GIT binary patch literal 3900 zcmV-C55w?@P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000DMNklmQIeY{A&p*qFfbP>oS}AfYt0H8jw}!<^E??au6WXLfdGxMwoS-P_%n zbH6=z?%8wCX-P!z5-vR+fd}LPc|abJ2b5cRHTD%sJN`s3a15vdhk>_&*MU7iS>N*r zcnJIhECPQ3)4(sldZGlHcsZrmeo$+G_5hy&0KQg>Y4n_%2d)Emfjhw8I;9@z-^*%suK@>v z5#STxod(z1P>Z?%{FQYJ>J{W-h{enba$1mq7~l7RUSl@Iq9#>`#4IRDKyQU8J}pQk z)--5*RP@^J{pMAdOab~-kmUvzGu8nx?lIQji&++=mK8u}1$pB1ewhLo_xQrm;fd+2?X>za17KbpbfA-+ zZsX|yLJkS?(6Jmc2Pn{W#(8ib>MS6nPmnp&Q_sk>3IjAM$Q{Q8=<6h)i%!q`nS;YN zoyVM>$<6>m-V|ij^qkHl92)9wU4T^`OX7gOHLvC}3x`ns?W5tlWB~=PyIr-aIRsQS zubv8WxD`OHMieK2SG0Xo&wPn+6PPiP)QOgY6-~n(CCb1(U_g7`1AfgojIgo1Yjj@) z_9M?jEN#c6YX;75nTHb%ZdS*Dj;WSJ(EfAN{-ywNcsquZ@upabUXANYrtNF$L(6saRX;Q7jT-xTh+0kV>=dSid9YfrvhzvU3ZM2Z9o;%UMLWtx@ix` z0d&x`7d@cua=^6zD-fW6O?xN~ph44KDi9#+9G2rO^Ac+pK8wrzmiw}~w67!d#c>p0 zYUxSJ6mur!kTLEU&{D|r$OCGyavdlTprMczZO4EXLwusV%W#NKv|~UEAzrlyq+%n7 z9~TJFN2Yx%$#BPRf=HYXcj%4Q3338AWxN2^W5;kK3Qntz;*@EhF94wPA!BP}iUlS) zs7v84?Kukkp35m#qGELa9~eTSe`EHvaI+=gd((3{$JS%x(brn~0p8-q;SoVL3bb*! z@jQJv!L8@31=@PP>XR2zPhM!8{xas%U!oJJZs#C@>UMewR9h){%RU7!8qx_T9cC&A zNt`FTod(>gl7l2l6jDwD-h%X%(^L0}yGEvM@>tZoWHS5JJ zwj63M<#MQ>^HL6F3+g5#3hGV?(jNm#zg{D?g1T;(WY+b(r@yRMOyqJ9*r%HX6~aq0 zg`mK90{AoWU07e#+Z_vXWiLTlcn$b~cxB=ngDzvklU0sz2kf*8IS8)K}GlLPjCd$cAR8(v2vQ_)0ZE2@)dAb=}FG9XZ(l*l15 zB#{}iuR&n|U`K$HQqff5Cbkq&k|b6PNv~96Yyb$`pjS(z+aMIofaI`>Ll~=XB!IAt zLr4h`QiN(Aq<~{`HBe%1T#__*o0KIZYzPO#^lVH(384~Dugp?u*?JD)g)SSLTerys z@C5|j#v%NkRH{$}@(>LKhLGq)DTPV}84MCNIE2BVt_NupDveCRZU&JW%no6&X`$fD zi-1Mb$hNY@{HT|)uoZ`(Kv6ZDOxEdiBpscEXyjxni^Z~P&}c*qLDU*ls69@g~GpwDwVI$ zT2u`Ek?&s$Ym*FWh%AP*NRCE|HE!!0)=+9TPXkF%M3aOdS@WkTQXnXzRUm4Rm&gDE zQec$~(P;x;;DtiAK&3?`Dk&u3a|oCM35I2CEJ|#N)Yc ztyQ>zj{x@qyYh+4OYx_0&GuKg4MB<+vuDQngHAKi9&>>6QKlhqCGXeI67c(8~7q?egz~TUhdhvvH4|xb^|I zgYux1OK$%}+PKG)D>SExY-<-y;7f7J-QRG%%qu!qDd-BhwC#V> zU4^OiYF~62%0E^YY8G_9-BC1cHXrYep)=t z9&R|z8wm=Kk6%j=HFl}58jZJ3d|3W7?~B#R4xX0jCZgyF!K3_6Q_iVJtCsC5Sp30b zjyZdut~FxRC;!Xa=XbSy`aHXTON`0mu4CDui{p!ef1rDmJMtU8{THiWe%bU(pHBQs zN1}+9&fFSTJY$Kc*Il{3HsZ>`u2yqd$q$DwME$xu&uhsN*MWwET}5l+i=PkC`j<{w zdW;eKeQlwHhjh_7e|7tNYi5I{=<8;mtmrH~UK>ego;X8XzNKo`u1Q~Y92LFE%sO%- ze|cs7MaNPjxRW?tai!Lw^hw_0k5BGyYjC(l4CDyyMfFWjzS?Y;OETmr5@aN^Nt-cS2J zzvS;No&0&mhPeIflD@XRmUzX@Q$FGKpLgYVfKQztzhC}N(bNTpQvOuzJ<}&8dGDx}1IY1G~%|#g>WSvC-}@x$isSBiA>zGaMCt-I8Xblpr z>FR+ge1BB$k9o-hANt5c>MExm-W;rr|LCWo=0fhutV;eDoeGTzw zU-pnc>u;?8?ih>jpLXACls_{yD@tOqAa`}p>j zMjzLY_&9ZS_N@cO4;sxE-dRzj)}Vf%_Cc6$gIOa#OP;=D)35tKzwqyG2z^i(d+yBa ziPvlklT5iDa2r&fDZR(o|Eg^5c8evY=V}&9?F$uVuKQn|u&r-1``zSuPxRdGTwBq5 zDrzft&;Peo+&iR&wZ7Galpk0eVO;;I%q>5p?By2j7;c^a9A{kaI(a9zZD!V4YGtVJUKYqOy>|7wAJ1w)!j~sG=#&Vt*f(?VIXMdK>Pp(E zFs*6P>d68eVuxN|m_5OsP56@Z`H9bO-n#8@ZhgN0-oR|jF4rCFeR^u{eYt%sH3jR}mFC-fZ@4=1gLTsNTQOgimh4`- zW9pUrPw(kI4gczW`PFLAf+fsyRc9Xf@~?a!+I3dpAglNt7AT4-5RNIR2Vx*P=nF%v z<_CeOn0@`fQ>W*A_%C9kG>OM=#{)GmYMT83fw=RUph#~ACk%lVRtP@O)y!JYxrFb> zHo2|e_m&^J{&mIP-i{adN|G6W^qAjUv3lX}A2qCDr7P>#Eb z)h)mI!@Ym));a1j50p2UJWP&bG~X2C`=nkkHPx-Z@X+dKt2E%P4$r z-Ur^BUe8{itUF{Kysw^F=g-?1)&kAfQ(YvVAHJQu?^TA#hG|M_dx~!*vRfEF`VsxW z>D%g#qIEysF!g)g+wDEOprP^scR|gA&+i*QyRK0!B3P`u3*BaEGGXOyLBS&v>Hqj0=iq{ v!)A*Q?^rozN8Z&v`hSy6Gh@HUes%`Al+E=L*JZ4M>6O9L)z4*}Q$iB}-^^6% diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_press_ef.#.png old mode 100644 new mode 100755 index f4150921e8edcf1cf5c6838671c234b91c4fc31d..bd97759ad4aeeada64a2dcba7b825bbed64da987 GIT binary patch delta 268 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 literal 1397 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 LNkvXXu0mjfv;^~3 literal 4441 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 literal 5616 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 literal 4009 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 NY;R2@)LDk4{~sAK$B6&{ diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_tab_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_tab_press_ef.#.png old mode 100644 new mode 100755 index c2ed78a8ab11d6b3bb3445b4fd75e0d6c8328037..b8e86854f4b134ef068379f5e730aa94c49179a8 GIT binary patch literal 2889 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 imC8vx0RRC1{{sL=?jm#0XeQDC0000p31 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_press_ef.#.png old mode 100644 new mode 100755 index 560aae37f847cb6f45a3e60bf7f007563b984464..b8e86854f4b134ef068379f5e730aa94c49179a8 GIT binary patch delta 146 zcmV;D0B!%c7ReT{zzTnKNklJQ3mW!3~~MF`|c4?(0%0* zh75r<3B9NRNMd(43F=Bs7J&d$5pZkQuonTjfye8C`JVFefB9E_8aPs%BT;F9z+82q imC8vx0RRC1{{sL=?jm#0XeQDC0000p31 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg.#.png old mode 100644 new mode 100755 index b12720c63720de152a771186a40d04aaecbd6605..a37a4208712083af3327f115d42d05d7d44a9085 GIT binary patch literal 4550 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 My$#x$io_)T14{)(Jpcdz diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_down.png b/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_down.png old mode 100644 new mode 100755 index a071e408202aa6a8123eea75cfeed43db61faae3..e65fa879c44fb3d3109079e54a8a2372b2e8e669 GIT binary patch literal 1461 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(F~Mmb zRBsAyx0vG8s}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+`!3DKUZZmXNUd>9HwXDTyq4}(3vHDVOXA3NHCOJ-!l~JVV!omDb04SU;ISJY0IP5cAbAN+<#noT59Z~Qnu!U&y+GQ-1S}>bpO=T zO$@&dtPIg=l3C5)qQ5upJ^O;T+}p498xkx_ho)EI0iwd3g)>n!AmC zUnR^KW#0KLy0}71&!@`Lc@}HZse+(Kq2#3Q;RGnJio& zbBbLpi*Xm5@ZQ=(D!wUCFTYr$xK_Ay_N+^V!Vj&2rnPnSR+%W&JY&dC&Y50pQ7)CE zRgj`2Hg9*^4c#O69N(nn1fPnKcwN*t+4C7w-vSec*!Ej<7MsamxGNtQ{r+P4NyA;g z;|)SzN50{6=E&ncn0lb>%FB{(7yojrWnP^4hr8gMk9)iMX|MWydKXxCIf%btikJTo b*TBfY5%@lZ^JdONP(kYH>gTe~DWM4fW_%l% literal 3673 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 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_up.png b/res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_up.png old mode 100644 new mode 100755 index 321b88e2fa5e31e2038619ef86ad2fdc096f9e24..3f240194cfd9bf94e5b22c300863f24213f6c2b0 GIT binary patch literal 1481 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(vA}5_ zRBsAyw^-uTs}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+^pJT_A;lfyvg>#WAGf z)|+r|zuN&Kd&^|hy(CqFY}l+iLo`$Ga9+?;SiFICLW1ZT1)I&N;sTc}(% z;lI6N{p{j6o}#NA7K({a)FUe^>%Pw^e{XB&XL7voiEX>ydmE-h4F(E49L$Hd^D9q2 zxkjkGExYM;R_38p=A7IA%x3x&&9G`qw0W`XUwX3Y(cPbu_uu~?xH9C>4xcmcH*DKH zk%w`QsSICz`0CKr0U904GL7c?tqsta((j@a|KV@p+?HDvHv86IfBiCOrOMf~;%yw4 z3M~Fu&h)wW;B&|GC>9Z~r9s>`FKjNJFvq}n!l?|CB>kP|&Kxy4>wn_X$IItiTNuu5 zyZzRCLgtIv3)bALZaNdX>|(|jh9mWc^%0RK40m3Ct-AiSDAM`8$jtBV;?H9q+rB$^ zFZ#%ma3z)*rV>1#7`hpK7?v5$D%L3Nuio&TnQub+n@ufhze@V+a)VXw=9TNsoWAAq zOOEf?vbM$^`KQvB@ATyJ+8-=AF!&MDzMbjiJzf1=);T3K0RYsNEF}N{ literal 3642 zcmV-A4#n|_P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000AJNklVO zMVdun7I7fc7f2ZB&d^0apry;u7w7}bOJr?q>B^QY$=CXtjnvAj)5?yrn34k*fpm4w z`RShjIf(OpAOCkF_zCO*;sN3TV$g&no6gVA6Fa=Ry5fGcr&g;aZi$zdm+3%^n0Oq5 z1K`K@j|FsZ>s&4;#6Z5hcUKUS0zfn&K3qpfM=xC0-PCm*ilS_7Z*N~jpT}VC1VU0Mp*VnW zdV0D^2)Qr}1I=a=jYb2is$Lu%9Bc$S90oFWX_1rwLI`1ZclSv)n|*Cr7N;l*D5cOe z4T_@hyFCj9X684=gI1ZDOlaM6IC4~HWeSQ5I zfE_FsfEQWt6C_AR)WJ7pw6U@A>)hO2z1QpUlu}Si(eL+hTWsI=!5D+0C_EvgzP`R* zxUH_^Mnk{}RRu;->RIQLEKxJZLCn z(=-$7;CuQoO%s&T*`6pHRCwC#*gXz{KoExEcfg-0QDd~V^#&%|VJx|Y9Vepm z7L-PMZ(!>QjIppVYqP=CSYZ|lXF4{(vqNT!4>872r9{L4QssH6ivCgo4OAm&%e{z` z)EiXfSvd=lX#q@A+Q0~zzpdA(BU080|#JV#~qb?=J18W_S&# zcF-5pLwjfs?V*1?^kJdw2ugpaokQ!F!*v7PiBBez`f19*y<0Bl^ZDa0CC+BEN5Jp3 z(&ciw7X*RdrP3e>{KaB%ce0Ym^ZX!5l2H^zz6)fl9z~I#B*`ex^8-LgLegQDW#cqW zkGBnuqR3Cv^f=41v82N$6iFvlRZYvXJS~c17{~E`7=}^xo&T4IVK|86c)uu$VOf@^ zRaH$Tow#95_b2Hg@bX@#+SFFSSKy}`*4mBl8x6z{0bO?_H_zb@xDkd42A_JU? zwlO6rxVX9+7@C=wJ31SlAe9=G=9f6B~{=e@a(--0F4u`MYN=MdwU2J}zTm zQD9)?aA05(XkchzBg|$|FkxWSFrF~WY6}xL17n8$g0fd)^=8|}fF@*J2yPTv^ul~{ z43CF@?FyL{vwul2XT3Z-YxXjoqGE4e-~1b0m%UFaa5iT7Z=U^S7rRNA#iFzKe&5N8 zyWHN+wfK0eX$9Yj$1_&OYj-VrVSD^rv(>LlTZI&y4gPOZV|!A_#}e|Z<675?jVm2w zT>qV}edxg6G;{6F?+x`9UB{ZZ%iNoT1X#mk3W+qN*s5;p!(GA+MMp6-SvU{>Xd{Y|F~7` z_xJyGIT<4%_ep;j%sM==IPUY~Jj=*b6?c#KcDphU1!fm+V=A=nv^?@*S-ocZk(hUz zH1*|eW}BNF;?18{G$%;5H)QtpDb+T64rm@fJt_PhlZK#anYY(dhDn#pA`i@;S=RM$ zpU#opI{ig9|B4p;dg9`8vu9={ob)Xm)2*=cj(wvzI^ek=570{ zGpid8aZ246$9lLPa<*LNPEnFgQUoK{YrxlePk2AU8ubIYl!wG(<8)Fhw#k zF+njjHbOTrIYcu=Gcq_iF_Sg}et%xwOalM_2E<83K~#9!?3~Y2TU8Xt-%DN+LPCB~ zprnO%GAL7i7K;jHq^%B%ZaU6%tZu3^xN?CT7cO+c!i@_zxavRPqML3VH>Gx%qB2rO z9jz@?S_>s|V`A*V==H2tj_nv$1O+XNg*nc&|5?@b( zzJW|Ci7Kf>QAt+mGbmX}fZl@!Au|J_cn&>)9zh`}46Q;5e%=Z>AP-ar9f6u57e7yc zQqV2vyK)3n4Smf(2+Rs}8@kItHu8L33j=!vIth6h6ao7jifJ8CEi}pwSc4{^KcJ^P zRSG?Jx?Vff2UW2HNBMf11AjEeV8|g8(BDwJM5V$Gy$TJm!wA%;S^@MG~^gZ+w6xC4sLdE(% z6yzyKE9qanSQH)5N6`DwpU@A`EcYi`3z-2u;#KuscGgTW0nrL^9Dn)+x>3m0qKHAx z{+I9fK>g5oF#vr5IT_9^ZtTh>)}aM%HK^fy6S`SQKp(R`Z*y<6R)*UuYEBn9=ObK4 zrwak7i5szdT#U;RPC8Otm#P@jJa2pU1!$OSO}S00T#@80d(JMc=4yW9eZFYBNW__-O4 zb;!kNCMmy0=mgJ}Jsnidk3X!ix|1tbI9GC!>;C|Hhl|)fK|e9ao7yv(Pe@t*ZQ))a zrXxUC&a6RitBTi#ps$E?Z`8z&%IYAIm%pf>zki5w?$%s2sGk7^1^q^l zne=CKkeQ3~6QS@2?Bx=adxN_4m@;~Tn4rzWuTu6!F||R`fL#3GGr@>w49cZm#abBF zW1Txl;C`rv8|IKnwR)`!CH%}=sIw;)-*?m4=A|8($4nly10v2SR=$3<;o10Ar znis(=woS2=)9DlqG%tc#q|`+^;dZ+vqe#C9un^LHVcJ2->gsC4K^)8?u?485rA2nR zHaD+|AweM)V4`dRI)DDWVVjIdGuZ-UwOW<-_I6S4?tdW$#9{{^o6V+NxNyOycjpiT zVzCX7D2nTijg6^5ARy`8LBxPq5EJz(CJYP=Y~K3)e%-ES>D<#Sb^tP)&GN{|h)u8V zq1=f+q`tmB+11sh+d4$K69Zzg0}w@LXD7Kx93CFF=nW3#Ot}*Sb(k_XX%R`1 z(wXf&z}4h}xm1EA~Iuls6hYQ$5gPCW;p)tnAu7p*llH7Rvh`#X!7*w(=N2$6}yS0+<(rUJLksMLdNR#I2((cO<^n+Yg$@b zGA}GF#LyS4RHAz(CMLW`j~;c>(r&lgA7uL((=KNs4?P|at!%Dq*RDA#4G!f*xgq3S zaCQYm;q`j|!BkUvdV0L5N0v&NT9garM7dFpyD`}Fpx*6vuQ{Dg+tAQZ-RS6O*)RQ+ z1Apa0IZABGE@xmRrz{$nM#p746UbUAC92zT)nZ`~zyiCqw9*{cG0#vQ8u7>C4 z=9c>U`ZWDJWRsJVjzA#L;BYuRSee(*41fMs^os)0k&TUw{zxR!fp;cdyiHmXjfuua zW2CXtnDfbXU#Ew3VJMYIBtrA^^TF=!?zk3QGcz+|KX&X`Jv!t%i^XDwZXMWQ@Xovr zNQ0Q)-JwvZ5%b-8P_ChC2ZO=GG!_~YjcvdAi3J4pRx+6sWLXZwQA>C3+*#@E?SC!F zm$Ig&rs$}`1IIL&OeU`+Nwn#{S%}vb3+yKPQ2RB2l5szR+h8~xUiSO_MVWe7w(Zys z`2eIIKx%MHPWl!13-*0)u}IU7n#q0u+WhqfhV=y2508(J$1h#Fl-GB$F@;QL&z`lT z3-$oUA%cR3ZMeVr*Qn^IrqH>FC2got^yj&(0F?ep2?2{?Dz1_+9nm$!*5QT?v<;i! zuuqb(4Y1g3HY*CO9n;1^0s#7Q_hyqyN5iyE;ISWzIsTG<1_m(H4xHJ?b!oGCBlB3) ehy#rO1Q-Bd`Vq#9RfClP0000uSK z&#J*9w4CXK*Wds_^i1MOiXbYSM0OquYm1z!Qq=Pu zU3izJ>Ij7j!!#NVy1~;yRAWFUlSw!@E`=ph@wAVuX3CGZbs2OR+mRb0H}J`X(Hak? zP?o}$uDIZZrnyS&$DKgokTFdwWB|=Fo|pL5mX1*o{%gjX(s6k@giH~}!Bk}9d{nn} z!8mpgSCj~1Ym|MFi<4qa>VZAwK_3%?K)R^JqKwcK3#b^i0dE9?g2w-a#tM?HUT{h&mGp;x3MuaBR3?>xQkjpMV6x9GWh zn@8vVo;yBvVIz>Pk34uB9sRKXes~*v$M^8u*>l7rPk()SUzYyzix)5Mtu603_Wr=B z(yPYY^QZ1SG1`B?VU8~3=06?0{=;6mcWXA64=)edDoTDx2n)rz+fReDagpI~(78?t$@BY4#+4BfY%EY>gb- ja<$QV=G^6_J5P=gH^2ILVd>^IFZpj2j3Ip?H}=*)F5`^d literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ac0cbb894b6ea12a86edede0445c7d8df1d2cb21 GIT binary patch literal 1429 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lh!3HFcSnpm9q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1FfgZOhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Kep0RGSfuW&-nVFuU ziK&^Hp^k!)fuWJU0T7w#8k$&{npqi{D?ot~(6*wKG^-#NH>h1eo~=?wNlAf~zJ7Um zxn8-kUVc%!zM-Y1CCCgTBVC{h-Qvo;lEez#ykcdT2`;I{$wiq3C7Jno3Lp~`lk!VT zY?Xj6g?J&iz}FXUa9%MqpnyT9Uy)d#Z>VRWpPLKv7g%+1Nl+@n8CX>phg24%>IbD3 z=a&{G1LGr28KxN+cK9sAz>EaktaVzQ9|Nr*Piaad;7tUA^rN;J%L0RN+_>mJo=5zWwaCb~+ z_!zA4k3ERtkcZwMe$n6Tp_?U^u;1hnQ#pL7;fj*8@a(x(Rm-+=b-nsNbH60g%!*m@uU^f}Wx2HOfk6xFu02h+ zm?xM^da&C+5xx43G1Iev;qW6C5yl;ddK$F!m9Ws~Q5C-Fan9 z3$7dpWH#hYS#m(eZI<*8`73)GwsCl@{@PIGP?h+VOZdtcaenzbK@Dd59;`C`a(BX5 zW;VV#v^QLD?l<;JNf(~6Zd}K_QgnaG#}tMM_ge2nTw>gG-fGv6^4peG=am<3RAI}} zS;`>oebiwagTe~DWM4fPh0iy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_ef.#.png index b73b634fb4ee1230f22a77d9a4100130c50f4d15..ac0cbb894b6ea12a86edede0445c7d8df1d2cb21 100644 GIT binary patch delta 716 zcmX@WGnIRT9Fu~hiLr};v$?6Eg^RJPk)ffbn}xZPiJ_5!k%hULfs^56J0=+gBPUBI zV+%8LS91$jLqk_1CqrjfX9FioQ#VsXV<#7<$yEqNW;hjXV^ZZdQ_u*{%uC5HFV>v= zjL9Iz#nR2((!#{p$k4?EY`uktAlg_1&XNlMv>iKmOL zQblfoUP@+)6+x#LF+0^CU;W}B0|VnxPZ!6Kid#v){{OdUR^(y%zi`HaC^fc649X&p z!;hT!F`v`dfxBZm!^dESf9ydFhdlKD@QeOt58W)Wg#9Lun9AWp4Of($g=f#Ts#>;{ ztLxSGnKNe8F&+K4(6Z&_{r&ZC_}||T+Ew#%%Ke|l?&p}k9%J0QTPla|#Qk~)#$1Kp zb0%jy^sjBc9;5JERN#Nc3a`J-XR~>8H#_n@WJvnx{Cm6F`}>Dw=&w{}ubLFR~M4`MI6b7nqwj#JH_VOkh^bihuQL zW-iO6bq@?$Sayzn6+=gvByFR zbzG(|?D_uiuSzrY;4iu?`OYbeVF9Cg{h;fk)ff5fsui$vzeQ#qlJl?n~Te2J0=+g6C+Cl zBSSND3o}5Tqc{CXu7YQgD9gqrIXyc(y&oy~)pJ>}%xaW+ z@J{!2PowyO^$!kqa|dr?5c{Dt(`R0RjCu2d;s^W>zGolV_&IE~X?uin)`5vz z@rU$}IyK2vS6^M<8g=$wj@i}MvpQYsefP%MyYibXDNt6Q%$dA3s&d8*VXj80?xRL7 z{F&Yj>5DI(SYcv4vFRJn-i()gJ;#$8k~nUOYTP`j+sUhVJ?O}^!gAGo?(%S>JBxe0 z#kTy9KKbbXj94$2D6%m>CDP9ZdMJB4}mC-@5<%PCpG= zo87iCZ+rFn7(IKgR;TtL>+5gJ?%&SY=4T?c*F>r}W@E%3&bwDbmtT&&lfq&slHy`L z_uSsH-G5EQx@~hzq|~eS{yV(NrTO56vrmiE=AW;3cTt+iy#Bg%f<&6l{PW`1?`PWt z&RV9qqk8w%tkB6`OJ_JOOh}5HHra?Jqw)Q(zyFlx`h7Q=$#ehp*LDBG*7+?DW@Tzz zTww7>q9OXb;I&;7tRjAFJ@g>@LEoil=07Zdl+FhnF}%QOvi7D>J#!sfTvx5R=IaC7 f7(Y#CU}ktx=pyKG+`vJL0SG)@{an^LB{Ts5bkTK8 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_press_ef.#.png old mode 100644 new mode 100755 index 34fb75ce976dcf7c478077aaf07cb9018578cf20..20ca6764084a3f905316987e14ef9cbb05c3cd81 GIT binary patch delta 3205 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 literal 1615 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 IM6N<$f1J+e zVPb4#=wbqPjD?wnn}MZ)tFyCc03K<@mtjFwB|G)M63I+y-W1cRK zAr-fh{`~)M&#ZXh#0iezBOV^M+{}dy6E$2Nx@StP;OQt*G(5<}98#`WyN8G8PNc&t zDS`bgkL)A9bTDreGtjtXz|*3}`Q-_N(Hj#1d&WomGpc4ZMzme=sN^(#bFtoJb^~97 zs-k7kA%Q1n_y6DMq95``KY7{$38jrTSr1k;E@tbKvdDT6U@j0MZKQm);Kf!s<8@M# zS=~>2$%K7p`ucd)^rN0Dr*EC`DsGN0`d)C!^9vFLlPrcNmo>XEA0^-o>Olxtd8@!NS7G+0D?v+`_=p$0+x? zkz1gbl9^%!)oX@J@8lw8r~0?XKMffe7%q9bIEGZ*dJ`7S#bn5nb7gNs(|Yb7j|2Ct zGylk^wMhNKu}-&$U6F6I1Y3D{TDQ%7#;R#pT*0ceEA~+As<*7CrxmdjEAoGLO8m3$ z!2(rrZ5`(iEc1A!Ev=RQziwNgvMJ8CRU+qrtVHjMWe<#QJAd^#vTe>5M$i5EcMRW8 za^^JNbTN3BcyGub&#AE&SV8E+>|~J@B}(5?dzJ);y=Mxg22ob~?aTJb$OFB{;OXk; Jvd$@?2>_rooumK& diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_press_ef.#.png old mode 100644 new mode 100755 index edc2836638016674facd60bacb1ac5e22ebbd8d3..ef508be4671ae64c244f8b8eb8185fa7fb31bc5d GIT binary patch delta 3051 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 LNkvXXu0mjfv;^~3 literal 4441 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 literal 5616 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 literal 4009 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 NY;R2@)LDk4{~sAK$B6&{ diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_tab_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_tab_press_ef.#.png old mode 100644 new mode 100755 index c2ed78a8ab11d6b3bb3445b4fd75e0d6c8328037..b8e86854f4b134ef068379f5e730aa94c49179a8 GIT binary patch literal 2889 zcmV-P3%2x$P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001VNklJQ3c-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`VQS`R;9_dwVq$1vXy|HWY3XF*Y-H}{=H%#N zWbEh&)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p9GS!cKU0`nN7v!{z=NX4x; zclPEr1u(QF20A$1u=@I3ugZGw?t6ak7iC(PW;k(hdA(ey7HhG~#K`7;g3QUu-y51| z@f_X|b!n1{Wo*EvCE48K#&LHppGvCstG{2famSh!?jjfW&RHNA;qrY}kN)ARz5CJ) z_dovlLu|n%lf8!x_wRdupE+dS^94$`-+vbl2^86G@$CAxx9&eGHr&j~m=oC`mH&*n zi+h1cspXVKBCMw_M(bSpadJ+};^iw=JM46~tm>1~_^#pFxM_bt8M5OJQ3mW!3~~MF`|c4?(0%0* zh75r<3B9NRNMd(43F=Bs7J&d$5pZkQuonTjfye8C`JVFefB9E_8aPs%BT;F9z+82q imC8vx0RRC1{{sL=?jm#0XeQDC0000p31 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_press_ef.#.png old mode 100644 new mode 100755 index 560aae37f847cb6f45a3e60bf7f007563b984464..b8e86854f4b134ef068379f5e730aa94c49179a8 GIT binary patch delta 146 zcmV;D0B!%c7ReT{zzTnKNklJQ3mW!3~~MF`|c4?(0%0* zh75r<3B9NRNMd(43F=Bs7J&d$5pZkQuonTjfye8C`JVFefB9E_8aPs%BT;F9z+82q imC8vx0RRC1{{sL=?jm#0XeQDC0000p31 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg.#.png old mode 100644 new mode 100755 index b12720c63720de152a771186a40d04aaecbd6605..a37a4208712083af3327f115d42d05d7d44a9085 GIT binary patch literal 4550 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 My$#x$io_)T14{)(Jpcdz diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_down.png b/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_down.png old mode 100644 new mode 100755 index a071e408202aa6a8123eea75cfeed43db61faae3..e65fa879c44fb3d3109079e54a8a2372b2e8e669 GIT binary patch literal 1461 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(F~Mmb zRBsAyx0vG8s}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+`!3DKUZZmXNUd>9HwXDTyq4}(3vHDVOXA3NHCOJ-!l~JVV!omDb04SU;ISJY0IP5cAbAN+<#noT59Z~Qnu!U&y+GQ-1S}>bpO=T zO$@&dtPIg=l3C5)qQ5upJ^O;T+}p498xkx_ho)EI0iwd3g)>n!AmC zUnR^KW#0KLy0}71&!@`Lc@}HZse+(Kq2#3Q;RGnJio& zbBbLpi*Xm5@ZQ=(D!wUCFTYr$xK_Ay_N+^V!Vj&2rnPnSR+%W&JY&dC&Y50pQ7)CE zRgj`2Hg9*^4c#O69N(nn1fPnKcwN*t+4C7w-vSec*!Ej<7MsamxGNtQ{r+P4NyA;g z;|)SzN50{6=E&ncn0lb>%FB{(7yojrWnP^4hr8gMk9)iMX|MWydKXxCIf%btikJTo b*TBfY5%@lZ^JdONP(kYH>gTe~DWM4fW_%l% literal 3673 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 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_up.png b/res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_up.png old mode 100644 new mode 100755 index 321b88e2fa5e31e2038619ef86ad2fdc096f9e24..3f240194cfd9bf94e5b22c300863f24213f6c2b0 GIT binary patch literal 1481 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`z!3HExy*&LKNJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_J!9Qu14BavGc!Fy z6H_xYLmdSp14AQy10XWfH8im@HM24@SAYT~plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OOP2xM!G;1y2X`wC5aWfdBw^w6I@b@lZ!G7N;32F6hI~>Cgqow z*eU^C3h_d20o>TUVrVb{15Cdnu|VHY&j92lm_lD){7Q3k;i`*Ef>IIg#cFVINM%8) zeo$(0erZuMFyhjbK~@!5ITxiSmgEx(xwAm%KD6=dz#jPkmR{`v0t4!Q(vA}5_ zRBsAyw^-uTs}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+^pJT_A;lfyvg>#WAGf z)|+r|zuN&Kd&^|hy(CqFY}l+iLo`$Ga9+?;SiFICLW1ZT1)I&N;sTc}(% z;lI6N{p{j6o}#NA7K({a)FUe^>%Pw^e{XB&XL7voiEX>ydmE-h4F(E49L$Hd^D9q2 zxkjkGExYM;R_38p=A7IA%x3x&&9G`qw0W`XUwX3Y(cPbu_uu~?xH9C>4xcmcH*DKH zk%w`QsSICz`0CKr0U904GL7c?tqsta((j@a|KV@p+?HDvHv86IfBiCOrOMf~;%yw4 z3M~Fu&h)wW;B&|GC>9Z~r9s>`FKjNJFvq}n!l?|CB>kP|&Kxy4>wn_X$IItiTNuu5 zyZzRCLgtIv3)bALZaNdX>|(|jh9mWc^%0RK40m3Ct-AiSDAM`8$jtBV;?H9q+rB$^ zFZ#%ma3z)*rV>1#7`hpK7?v5$D%L3Nuio&TnQub+n@ufhze@V+a)VXw=9TNsoWAAq zOOEf?vbM$^`KQvB@ATyJ+8-=AF!&MDzMbjiJzf1=);T3K0RYsNEF}N{ literal 3642 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 delta 1482 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 R71;m)002ovPDHLkV1lMm;qm|g diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef.png index ba5e3466adacd8060dbdc8634156786dbb9cd0ab..c6d4246e8314c09b195a5d0daae2f347cb47aa58 100644 GIT binary patch delta 2684 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 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_press.png index 6c27fe559aa261dc9efabc6109a6c1dac81c498c..b4b2e6f0b008173ba85d8cddecab3d77339c8ad6 100644 GIT binary patch delta 3255 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 delta 3226 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 M07*qoM6N<$f+Dyi3;+NC diff --git a/src/app/FAppUiApp.cpp b/src/app/FAppUiApp.cpp index a163b6c..e943df1 100644 --- a/src/app/FAppUiApp.cpp +++ b/src/app/FAppUiApp.cpp @@ -40,7 +40,7 @@ UiApp::UiApp(void) { __pUiAppImpl = new (std::nothrow) _UiAppImpl(this); SysAssertf(__pUiAppImpl != null, "Allocating memory for UiApp instance failed."); - SysTryReturnVoidResult(NID_APP, __pUiAppImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturnVoidResult(NID_APP, __pUiAppImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } diff --git a/src/app/FApp_AppResourceBitmap.cpp b/src/app/FApp_AppResourceBitmap.cpp index 2896113..93e973c 100644 --- a/src/app/FApp_AppResourceBitmap.cpp +++ b/src/app/FApp_AppResourceBitmap.cpp @@ -53,10 +53,10 @@ _AppResourceBitmap::Get_AppResourceBitmapN(int type, const String& value) std::unique_ptr< _AppResourceBitmapUtil > pAppResourceBitmapUtil(_AppResourceBitmapUtil::GetInstanceN(type, value)); - SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _AppResourceBitmap* pAppResourceBitmap = new (std::nothrow) _AppResourceBitmap(); - SysTryReturn(NID_APP, pAppResourceBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_APP, pAppResourceBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pAppResourceBitmap->__pAppResourceBitmapUtil = std::move(pAppResourceBitmapUtil); diff --git a/src/app/FApp_AppResourceBitmapUtil.cpp b/src/app/FApp_AppResourceBitmapUtil.cpp index 8d106ec..a743956 100644 --- a/src/app/FApp_AppResourceBitmapUtil.cpp +++ b/src/app/FApp_AppResourceBitmapUtil.cpp @@ -129,7 +129,7 @@ _AppResourceBitmapUtil::GetInstanceN(int type, const String& value) } std::unique_ptr< _AppResourceBitmapUtil > pAppResourceBitmapUtil(new (std::nothrow) _AppResourceBitmapUtil()); - SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient." ); + SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed." ); pAppResourceBitmapUtil->__resourceType = appResourceType; @@ -150,7 +150,7 @@ _AppResourceBitmapUtil::Construct(const String& resourceFolder) int deviceDPI = 0; result r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", deviceDPI); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Failed to get Screen DPI", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Failed to get Screen DPI"); // 1. Get directory path matched device's resolution (e.g.720x1280) if (GetDirectoryPath(resourceFolder, DENSITY_NONE, __resolutionDirectories) == false) @@ -403,7 +403,7 @@ _AppResourceBitmapUtil::GetBitmapN(const String& resourcePath, const _Density re if (lazyDecoding) { pBitmap.reset(new (std::nothrow) Bitmap()); - SysTryReturn(NID_APP, pBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_APP, pBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = _BitmapImpl::GetInstance(*pBitmap)->Construct(resourcePath, pixelFormat); } @@ -480,7 +480,14 @@ _AppResourceBitmapUtil::GetBitmapN(const String& resourcePath, const _Density re r = GetLastResult(); SysTryReturn(NID_APP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + } + r = pBitmap->Scale(logicalImageSize); + pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_LOW); + SysTryReturn(NID_APP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); } diff --git a/src/app/FApp_CoordinateInfo.cpp b/src/app/FApp_CoordinateInfo.cpp index e3bca0a..9e589cc 100644 --- a/src/app/FApp_CoordinateInfo.cpp +++ b/src/app/FApp_CoordinateInfo.cpp @@ -62,7 +62,7 @@ _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogi 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)); + SysTryReturnResult(NID_APP, appId != null, E_OBJ_NOT_FOUND, "Cannot get application id"); { File uiScalabilityInfoFile; @@ -70,10 +70,10 @@ _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogi // Get UI Scalability Infomation r = uiScalabilityInfoFile.Construct(_AppInfo::GetAppRootPath() + scalabilityInfoFilePath, L"r"); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); r = uiScalabilityInfoFile.Read(uiScalabilityInfoString); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); } StringTokenizer infoTokenizer(uiScalabilityInfoString, L" "); @@ -82,18 +82,18 @@ _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogi { String magicNumString(null); r = infoTokenizer.GetNextToken(magicNumString); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); 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); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + SysTryReturnResult(NID_APP, magicNumber == 1, 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)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); if (coordinateSystem.Equals(L"Physical", false)) { @@ -107,7 +107,7 @@ _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogi // Get Base Screen String baseScreenSize(null); r = infoTokenizer.GetNextToken(baseScreenSize); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); // logicalBaseScreenSize if (baseScreenSize.Equals(L"Large", false)) @@ -122,10 +122,10 @@ _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogi // Get Application Logical Resolution String logicalCoordinate(null); r = infoTokenizer.GetNextToken(logicalCoordinate); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); 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()); diff --git a/src/app/FApp_ThemeInfo.cpp b/src/app/FApp_ThemeInfo.cpp index 5b9ee9a..debcf7c 100644 --- a/src/app/FApp_ThemeInfo.cpp +++ b/src/app/FApp_ThemeInfo.cpp @@ -48,7 +48,9 @@ _ThemeInfo::LoadThemeInformation(String& systemTheme, String& userTheme) r = _ThemeInfo::LoadThemeInfoFromInfoFile(systemTheme, userTheme); if( r != E_SUCCESS) - _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme); + { + r = _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme); + } return r; } @@ -56,21 +58,26 @@ _ThemeInfo::LoadThemeInformation(String& systemTheme, String& userTheme) result _ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme) { - AppId appId = _AppInfo::GetApplicationId(); - SysLog(NID_UI, "AppId = %ls" , appId.GetPointer()); + 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)); + if (File::IsFileExist(_AppInfo::GetAppRootPath() + themeInfoFilePath)) { + File uiThemeInfoFile; + r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r"); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + r = uiThemeInfoFile.Read(uiThemeInfoString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + } else { + ClearLastResult(); + return E_FILE_NOT_FOUND; + } } StringTokenizer infoTokenizer(uiThemeInfoString, L" "); @@ -79,18 +86,18 @@ _ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme) { String magicNumString(null); r = infoTokenizer.GetNextToken(magicNumString); - SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); 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); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + SysTryReturnResult(NID_APP, magicNumber == 1, 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)); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); if (_systemTheme.Equals(L"White", false)) { @@ -105,13 +112,13 @@ _ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme) // By default, black system theme systemTheme = L"black"; } - SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer()); + SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer()); // Get User Defined Theme String _userTheme(null); r = infoTokenizer.GetNextToken(_userTheme); - if (!(_userTheme.IsEmpty())) + if (!(_userTheme.IsEmpty())) { SysLog(NID_UI, "Custom theme :%ls" , _userTheme.GetPointer()); userTheme = _userTheme; @@ -124,27 +131,27 @@ 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; + 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 index b55ad62..9f7696e 100644 --- a/src/app/FApp_UiAppImpl.cpp +++ b/src/app/FApp_UiAppImpl.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include "FApp_AppFrame.h" #include "FApp_AppInfo.h" @@ -185,7 +184,7 @@ TransientResponseCb(void* pData) void _UiAppImpl::OnService(service_s* service, bool initial) { - Frame* pFrame = dynamic_cast(__pFrameList->GetAt(0)); + Frame* pFrame = (__pFrameList) ? dynamic_cast(__pFrameList->GetAt(0)) : null; _EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); const int type = _AppInfo::GetAppType(); @@ -358,11 +357,7 @@ _UiAppImpl::OnWindowHandleRequest(void) long handle = -1; const int type = _AppInfo::GetAppType(); - if (type & _APP_TYPE_IME_APP) - { - handle = GetTargetWindowHandle(); - } - else + if (!(type & _APP_TYPE_IME_APP)) { const _EcoreEvas* const pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); handle = (pEvas) ? static_cast(pEvas->GetXWindow()) : -1; @@ -434,13 +429,16 @@ _UiAppImpl::GetAppFrame(void) result _UiAppImpl::RemoveFrame(const Frame& frame) { - result r = E_SUCCESS; - SysTryReturnResult(NID_APP, __pFrameList != null, E_INVALID_STATE, "Getting FrameList failed."); + if (__pFrameList == null) + { + SysLog(NID_APP, "No framelist available."); + return E_SUCCESS; + } Frame& tmpFrame = const_cast (frame); _WindowImpl* pFrameImpl = _WindowImpl::GetInstance(tmpFrame); - r = __pFrameList->Remove(frame, false); + const result r = __pFrameList->Remove(frame, false); if (pFrameImpl) { @@ -454,8 +452,11 @@ _UiAppImpl::RemoveFrame(const Frame& frame) result _UiAppImpl::RemoveAllFrames(void) { - result r = E_SUCCESS; - SysTryReturnResult(NID_APP, __pFrameList != null, E_INVALID_STATE, "Getting FrameList failed."); + if (__pFrameList == null) + { + SysLog(NID_APP, "No framelist available."); + return E_SUCCESS; + } int frameCount = __pFrameList->GetCount(); for (int i = 0; i < frameCount; i++) @@ -479,7 +480,7 @@ _UiAppImpl::RemoveAllFrames(void) delete __pFrameList; __pFrameList = null; - return r; + return E_SUCCESS; } @@ -493,13 +494,12 @@ _UiAppImpl::GetFrameList(void) Frame* _UiAppImpl::GetFrame(const String& name) { - Frame* pFrame = null; SysTryReturn(NID_APP, __pFrameList != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Getting FrameList failed."); int frameCount = __pFrameList->GetCount(); for (int i = 0; i < frameCount; i++) { - pFrame = dynamic_cast (__pFrameList->GetAt(i)); + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(i)); if (pFrame != null && pFrame->GetName() == name) { @@ -514,14 +514,13 @@ _UiAppImpl::GetFrame(const String& name) Frame* _UiAppImpl::GetFrameAt(int index) { - Frame* pFrame = null; SysTryReturn(NID_APP, __pFrameList != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Getting FrameList failed."); SysTryReturn(NID_APP, index >= 0, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is less than 0."); int frameCount = __pFrameList->GetCount(); SysTryReturn(NID_APP, index < frameCount, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is greater than the number of frames."); - pFrame = dynamic_cast (__pFrameList->GetAt(index)); + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(index)); return pFrame; } @@ -559,7 +558,6 @@ _UiAppImpl::OnAppInitializing(void) const bool bReturn = __pUiApp->OnAppInitializing(*(AppRegistry::GetInstance())); SysLog(NID_APP, "Back to the platform initializing routine."); - _SettingInfoImpl::AddSettingEventListenerForInternal(*this); return bReturn; } @@ -702,15 +700,4 @@ _UiAppImpl::GetUiAppInstance(void) return __pUiApp; } -void -_UiAppImpl::OnSettingChanged(String& key) -{ - SysLog(NID_APP,"Changed Key: %ls", key.GetPointer()); - - if (key == L"http://tizen.org/setting/locale.language") - { - _AppImpl::OnLanguageChanged(null); - } -} - } } //Tizen::App diff --git a/src/app/inc/FApp_UiAppImpl.h b/src/app/inc/FApp_UiAppImpl.h old mode 100755 new mode 100644 index 0546e1d..9d52f8f --- a/src/app/inc/FApp_UiAppImpl.h +++ b/src/app/inc/FApp_UiAppImpl.h @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -52,7 +51,6 @@ class _OSP_EXPORT_ _UiAppImpl : public Tizen::Base::Object , public Tizen::App::_IAppImpl , public Tizen::Ui::_IKeyEventListener - , public Tizen::System::ISettingEventListener , virtual public Tizen::Ui::_IUiEventListener , virtual public Tizen::Base::Runtime::IEventListener { @@ -192,7 +190,6 @@ public: */ virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); - virtual void OnSettingChanged(Tizen::Base::String& key); private: /** * This is the default constructor for this class. diff --git a/src/graphics/CMakeLists.txt b/src/graphics/CMakeLists.txt index 31cb1f9..77afdbf 100644 --- a/src/graphics/CMakeLists.txt +++ b/src/graphics/CMakeLists.txt @@ -68,6 +68,8 @@ SET (${this_target}_SOURCE_FILES FGrp_Screen.cpp FGrp_TextElementImpl.cpp FGrp_EnrichedTextImpl.cpp + FGrp_FontFromImage.cpp + FGrp_FontPrivate.cpp util/FGrp_Util.cpp util/FGrp_UtilPixmap.cpp util/FGrp_UtilScratchpad.cpp diff --git a/src/graphics/FGrpBitmap.cpp b/src/graphics/FGrpBitmap.cpp index 7bd3153..81369ab 100644 --- a/src/graphics/FGrpBitmap.cpp +++ b/src/graphics/FGrpBitmap.cpp @@ -33,13 +33,13 @@ #define CHECK_INSTANCE \ - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") #define CHECK_INSTANCE_EX(_result) \ - SysTryReturn(NID_GRP, this->__pImpl != null, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturn(NID_GRP, this->__pImpl != null, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") #define CHECK_INSTANCE_VOID \ - SysTryReturnVoidResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturnVoidResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") #define CHECK_NOT_CONSTRUCTED \ diff --git a/src/graphics/FGrpBufferInfo.cpp b/src/graphics/FGrpBufferInfo.cpp index 278b33e..554f23f 100644 --- a/src/graphics/FGrpBufferInfo.cpp +++ b/src/graphics/FGrpBufferInfo.cpp @@ -47,7 +47,7 @@ BufferInfo::BufferInfo(void) { __pImpl = new (std::nothrow) _BufferInfoImpl; - SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } BufferInfo::BufferInfo(const BufferInfo& rhs) @@ -63,7 +63,7 @@ BufferInfo::BufferInfo(const BufferInfo& rhs) { __pImpl = new (std::nothrow) _BufferInfoImpl(*_BufferInfoImpl::GetInstance(rhs)); - SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } } diff --git a/src/graphics/FGrpCanvas.cpp b/src/graphics/FGrpCanvas.cpp index 644521c..3781dad 100644 --- a/src/graphics/FGrpCanvas.cpp +++ b/src/graphics/FGrpCanvas.cpp @@ -32,13 +32,13 @@ #define CHECK_INSTANCE \ - SysTryReturnResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturnResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "Memory allocation failed.") #define CHECK_INSTANCE_EX(_result) \ - SysTryReturn(NID_GRP, this->__pImpl, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturn(NID_GRP, this->__pImpl, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") #define CHECK_INSTANCE_VOID \ - SysTryReturnVoidResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") + SysTryReturnVoidResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") #define CHECK_NOT_CONSTRUCTED \ diff --git a/src/graphics/FGrpCoordinateSystem.cpp b/src/graphics/FGrpCoordinateSystem.cpp index 9e2a2ee..44bed3d 100644 --- a/src/graphics/FGrpCoordinateSystem.cpp +++ b/src/graphics/FGrpCoordinateSystem.cpp @@ -209,8 +209,8 @@ CoordinateSystem::AlignToDevice(const FloatRectangle& rectangle) float convertedX = pTransformer->TransformHorizontalFloatToInt(rectangle.x); float convertedY = pTransformer->TransformVerticalFloatToInt(rectangle.y); - float convertedW = pTransformer->TransformHorizontalFloatToInt(rectangle.width); - float convertedH = pTransformer->TransformVerticalFloatToInt(rectangle.height); + float convertedW = pTransformer->TransformHorizontalFloatToInt(rectangle.x + rectangle.width) - convertedX; + float convertedH = pTransformer->TransformVerticalFloatToInt(rectangle.y + rectangle.height) - convertedY; output.x = CoordinateSystem::ConvertToLogicalX(convertedX); output.y = CoordinateSystem::ConvertToLogicalY(convertedY); diff --git a/src/graphics/FGrpEnrichedText.cpp b/src/graphics/FGrpEnrichedText.cpp index f2c400d..f101a8f 100644 --- a/src/graphics/FGrpEnrichedText.cpp +++ b/src/graphics/FGrpEnrichedText.cpp @@ -39,7 +39,7 @@ using namespace Tizen::Graphics; using namespace Tizen::Base::Utility; #define CHECK_NOT_CONSTRUCTED \ - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \ + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \ SysAssertf(!this->__pImpl->IsConstructed(), \ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); diff --git a/src/graphics/FGrpFont.cpp b/src/graphics/FGrpFont.cpp index bac39dc..e47f1ba 100644 --- a/src/graphics/FGrpFont.cpp +++ b/src/graphics/FGrpFont.cpp @@ -33,7 +33,7 @@ #include "FGrp_ResUtil.h" #define CHECK_NOT_CONSTRUCTED \ - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \ + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \ SysAssertf(!this->__pImpl->IsConstructed(), \ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); diff --git a/src/graphics/FGrpTextElement.cpp b/src/graphics/FGrpTextElement.cpp index 55e90ef..0d37c77 100644 --- a/src/graphics/FGrpTextElement.cpp +++ b/src/graphics/FGrpTextElement.cpp @@ -36,7 +36,7 @@ using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; #define CHECK_NOT_CONSTRUCTED \ - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \ + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \ SysAssertf(!this->__pImpl->IsConstructed(), \ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); diff --git a/src/graphics/FGrp_Bitmap.cpp b/src/graphics/FGrp_Bitmap.cpp old mode 100755 new mode 100644 index da4b502..e7048ed --- a/src/graphics/FGrp_Bitmap.cpp +++ b/src/graphics/FGrp_Bitmap.cpp @@ -299,6 +299,8 @@ _Bitmap::_Bitmap(void) , __pLockCallbackParam(null) , __pUnlockCallbackFunc(null) , __pUnlockCallbackParam(null) + , __pPostlockCallbackFunc(null) + , __pPostlockCallbackParam(null) { _Util::CarveMagicKey(*this, __magicKey); } @@ -334,11 +336,11 @@ _Bitmap::Construct(const Rectangle& rect) std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); - SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient"); + SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient"); result r = this->Construct((void*) pAllocated.get(), width, height, systemBpp); - SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); // copy contents from the current screen { @@ -412,11 +414,11 @@ _Bitmap::Construct(const Dimension& dim, BitmapPixelFormat pixelFormat) std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); - SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient"); + SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient"); result r = this->Construct((void*) pAllocated.get(), width, height, bytesPerPixel * 8); - SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); memset(pAllocated.get(), 0, allocSize); @@ -539,11 +541,11 @@ _Bitmap::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); - SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient"); + SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient"); result r = this->Construct((void*) pAllocated.get(), width, height, bytesPerPixel * 8); - SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); memcpy(pAllocated.get(), buffer.GetPointer(), allocSize); @@ -634,10 +636,10 @@ _Bitmap::Construct(const void* pExtBuffer, int width, int height, int bitsPerPix return E_SYSTEM; } - SysTryReturnResult(NID_GRP, __pScratchPad16 || __pScratchPad32, E_OUT_OF_MEMORY, "The memory is insufficient"); + SysTryReturnResult(NID_GRP, __pScratchPad16 || __pScratchPad32, E_OUT_OF_MEMORY, "Memory allocation failed."); this->__hasOwnership = false; - this->__isOpaqueAllOver = true; + this->__isOpaqueAllOver = 0; this->__bitmapPixelFormat = (bitsPerPixel == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565; @@ -721,9 +723,6 @@ _Bitmap::Merge(const Point& dest, const _Bitmap& src, const Rectangle& srcRect) return E_SUCCESS; } - // TODO, shkim, I'm not sure why it's E_OUT_OF_RANGE? - // TryReturnI(NID_GRP, srcRect.x >= 0 && srcRect.y >= 0, E_OUT_OF_RANGE, "the argument is out of range.\n"); - SysTryReturnResult(NID_GRP, src.IsValid(), E_INVALID_ARG, "The specified source bitmap is invalid.\n"); result r = this->__Merge(dest.x, dest.y, src, srcRect.x, srcRect.y, srcRect.width, srcRect.height); @@ -928,7 +927,14 @@ _Bitmap::LockFast(BufferInfo& info, long timeout) this->__pLockCallbackFunc(this->__pLockCallbackParam); } - return this->__Lock(info, timeout); + result r = this->__Lock(info, timeout); + + if (r == E_SUCCESS && this->__pPostlockCallbackFunc) + { + this->__pPostlockCallbackFunc(info, this->__pPostlockCallbackParam); + } + + return r; } result @@ -1016,13 +1022,17 @@ _Bitmap::AssignUserBuffer(unsigned char* pExtBuffer, int bytesPerLine) void _Bitmap::SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam, - void (* UnlockCallback)(void*), void* pUnlockCallbackParam) + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam) { this->__pLockCallbackFunc = LockCallback; this->__pLockCallbackParam = pLockCallbackParam; this->__pUnlockCallbackFunc = UnlockCallback; this->__pUnlockCallbackParam = pUnlockCallbackParam; + + this->__pPostlockCallbackFunc = PostlockCallback; + this->__pPostlockCallbackParam = pPostlockCallbackParam; } result diff --git a/src/graphics/FGrp_Bitmap.h b/src/graphics/FGrp_Bitmap.h old mode 100755 new mode 100644 index 17d1daa..7da7281 --- a/src/graphics/FGrp_Bitmap.h +++ b/src/graphics/FGrp_Bitmap.h @@ -93,7 +93,8 @@ public: void AssignUserBuffer(unsigned char* pBuffer, int bytesPerLine); void SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam, - void (* UnlockCallback)(void*), void* pUnlockCallbackParam); + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam); protected: void _SetOwnership(bool ownership); @@ -132,6 +133,8 @@ private: void* __pLockCallbackParam; void (* __pUnlockCallbackFunc)(void*); void* __pUnlockCallbackParam; + void (* __pPostlockCallbackFunc)(BufferInfo&, void*); + void* __pPostlockCallbackParam; friend class _Canvas; friend class _BitmapImpl; diff --git a/src/graphics/FGrp_BitmapImpl.cpp b/src/graphics/FGrp_BitmapImpl.cpp old mode 100755 new mode 100644 index 48ff2e9..c583f8b --- a/src/graphics/FGrp_BitmapImpl.cpp +++ b/src/graphics/FGrp_BitmapImpl.cpp @@ -321,6 +321,9 @@ _BitmapImpl::_BitmapImpl(void) this->_sharedItem->pLockCallbackParam = null; this->_sharedItem->pUnlockCallbackFunc = null; this->_sharedItem->pUnlockCallbackParam = null; + this->_sharedItem->pPostlockCallbackFunc = null; + this->_sharedItem->pPostlockCallbackParam = null; + this->_sharedItem->isMutable = true; this->_sharedItem->associated.pixelFormat = BITMAP_PIXEL_FORMAT_ARGB8888; this->_sharedItem->associated.hasBeenDetectedByUsingName = false; @@ -374,7 +377,7 @@ _BitmapImpl::Construct(const Rectangle& vc_rect) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, _CheckValidityOfRectangle(vc_rect), E_INVALID_ARG, "Both of width(%d) and height(%d) of 'rect' MUST be greater than 0.", vc_rect.width, vc_rect.height); @@ -401,7 +404,7 @@ _BitmapImpl::Construct(const Dimension& vc_dim, BitmapPixelFormat pixelFormat) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); // check arg. SysTryReturnResult(NID_GRP, vc_dim.width > 0 && vc_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of 'dim' MUST be greater than 0.", vc_dim.width, vc_dim.height); @@ -435,7 +438,7 @@ _BitmapImpl::Construct(const _CanvasImpl& canvas, const Rectangle& vc_rect) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, &canvas, E_INVALID_ARG, "A canvas is invalid."); SysTryReturnResult(NID_GRP, canvas._pNativeCanvas && canvas._pNativeCanvas->IsValid(), E_INVALID_ARG, "A canvas is invalid."); @@ -471,7 +474,7 @@ _BitmapImpl::Construct(const _BitmapImpl& bitmap, const Rectangle& vc_rect) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid."); @@ -522,7 +525,7 @@ _BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& r SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, __pImpl && this->_nativeBitmap, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, __pImpl && this->_nativeBitmap, E_OUT_OF_MEMORY, "Memory allocation failed."); 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); @@ -673,7 +676,7 @@ _BitmapImpl::Construct(const BufferInfo& bufferInfo) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0) , E_INVALID_ARG @@ -735,7 +738,7 @@ _BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& r { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); 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); @@ -781,7 +784,7 @@ _BitmapImpl::Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, pBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid."); @@ -824,7 +827,7 @@ _BitmapImpl::Construct(const byte* pExtBuffer, int width, int height, BitmapPixe { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, pExtBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.", width, height); @@ -855,7 +858,7 @@ _BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& r { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); 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); @@ -940,7 +943,7 @@ _BitmapImpl::Construct(const Tizen::Base::String& fileName, BitmapPixelFormat pi { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); switch (pixelFormat) { @@ -969,7 +972,7 @@ _BitmapImpl::Construct(const FloatRectangle& vcRectF) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcRectF.width > 0.0f && vcRectF.height > 0.0f, E_INVALID_ARG, "Both of width(%f) and height(%f) of a rectangle MUST be greater than 0.", vcRectF.width, vcRectF.height); @@ -999,7 +1002,7 @@ _BitmapImpl::Construct(const FloatDimension& vcDimF, BitmapPixelFormat pixelForm { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcDimF.width > 0.0f && vcDimF.height > 0.0f, E_INVALID_ARG, "Both of width(%f) and height(%f) of a dimension MUST be greater than 0.", vcDimF.width, vcDimF.height); @@ -1030,7 +1033,7 @@ _BitmapImpl::Construct(const _CanvasImpl& canvas, const FloatRectangle& vcRectF) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, &canvas, E_INVALID_ARG, "A canvas is invalid."); SysTryReturnResult(NID_GRP, canvas._pNativeCanvas && canvas._pNativeCanvas->IsValid(), E_INVALID_ARG, "A canvas is invalid."); @@ -1067,7 +1070,7 @@ _BitmapImpl::Construct(const _BitmapImpl& bitmap, const FloatRectangle& vcRectF) { 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, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid."); @@ -1155,7 +1158,7 @@ _BitmapImpl::Scale(const FloatDimension& vcDimF) } result -_BitmapImpl::Merge(const Point& vc_dest, const _BitmapImpl& src, const Rectangle& vc_srcRect) +_BitmapImpl::Merge(const Point& vcDest, const _BitmapImpl& src, const Rectangle& vcSrcRect) { SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); @@ -1163,22 +1166,23 @@ _BitmapImpl::Merge(const Point& vc_dest, const _BitmapImpl& src, const Rectangle SysTryReturnResult(NID_GRP, src._sharedItem->nativeBitmap->IsValid(), E_INVALID_ARG, "The source bitmap is invalid."); - SysTryReturnResult(NID_GRP, &vc_srcRect, E_INVALID_ARG, "The source rectangle is invalid."); - SysTryReturnResult(NID_GRP, &vc_dest, E_INVALID_ARG, "The destination position is invalid."); - SysTryReturnResult(NID_GRP, vc_dest.x >= 0 && vc_dest.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (dest(x:%d,y:%d)).", vc_dest.x, vc_dest.y); + SysTryReturnResult(NID_GRP, &vcSrcRect, E_INVALID_ARG, "The source rectangle is invalid."); + SysTryReturnResult(NID_GRP, &vcDest, E_INVALID_ARG, "The destination position is invalid."); + SysTryReturnResult(NID_GRP, vcDest.x >= 0 && vcDest.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (dest(x:%d,y:%d)).", vcDest.x, vcDest.y); + SysTryReturnResult(NID_GRP, vcSrcRect.x >= 0 && vcSrcRect.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (source(x:%d,y:%d)).", vcSrcRect.x, vcSrcRect.y); - SysTryReturnResult(NID_GRP, (vc_srcRect.width >= 0) && (vc_srcRect.height >= 0), E_INVALID_ARG, "The given rectangle(width:%d,height:%d) is invalid.", vc_srcRect.width, vc_srcRect.height); + SysTryReturnResult(NID_GRP, (vcSrcRect.width >= 0) && (vcSrcRect.height >= 0), E_INVALID_ARG, "The given rectangle(width:%d,height:%d) is invalid.", vcSrcRect.width, vcSrcRect.height); - if ((vc_srcRect.width == 0) || (vc_srcRect.height == 0)) + if ((vcSrcRect.width == 0) || (vcSrcRect.height == 0)) { return E_SUCCESS; } else { Rectangle rtBitmap(0, 0, src.GetWidth(), src.GetHeight()); - SysTryReturnResult(NID_GRP, _CheckValidity(vc_srcRect, rtBitmap), E_OUT_OF_RANGE, "The argument is out of range. (srcRect(x:%d,y:%d,w:%d,h:%d)).", vc_srcRect.x, vc_srcRect.y, vc_srcRect.width, vc_srcRect.height); + SysTryReturnResult(NID_GRP, _CheckValidity(vcSrcRect, rtBitmap), E_OUT_OF_RANGE, "The argument is out of range. (srcRect(x:%d,y:%d,w:%d,h:%d)).", vcSrcRect.x, vcSrcRect.y, vcSrcRect.width, vcSrcRect.height); - return this->Merge(FloatPoint(float(vc_dest.x), float(vc_dest.y)), src, FloatRectangle(float(vc_srcRect.x), float(vc_srcRect.y), float(vc_srcRect.width), float(vc_srcRect.height))); + return this->Merge(FloatPoint(float(vcDest.x), float(vcDest.y)), src, FloatRectangle(float(vcSrcRect.x), float(vcSrcRect.y), float(vcSrcRect.width), float(vcSrcRect.height))); } } @@ -1194,6 +1198,7 @@ _BitmapImpl::Merge(const FloatPoint& destVcPosF, const _BitmapImpl& srcBitmap, c SysTryReturnResult(NID_GRP, &srcVcRectF, E_INVALID_ARG, "The source rectangle is invalid."); SysTryReturnResult(NID_GRP, &destVcPosF, E_INVALID_ARG, "The destination position is invalid."); SysTryReturnResult(NID_GRP, destVcPosF.x >= 0.0f && destVcPosF.y >= 0.0f, E_OUT_OF_RANGE, "The argument is out of range. (destPoint(x:%f,y:%f)).", destVcPosF.x, destVcPosF.y); + SysTryReturnResult(NID_GRP, srcVcRectF.x >= 0.0f && srcVcRectF.y >= 0.0f, E_OUT_OF_RANGE, "The argument is out of range. (source(x:%f,y:%f)).", srcVcRectF.x, srcVcRectF.y); SysTryReturnResult(NID_GRP, srcVcRectF.width >= 0.0f && srcVcRectF.height >= 0.0f, E_INVALID_ARG, "The given rectangle(width:%f,height:%f) is invalid.", srcVcRectF.width, srcVcRectF.height); @@ -1267,7 +1272,7 @@ _BitmapImpl::Merge(const FloatPoint& destVcPosF, const _BitmapImpl& srcBitmap, c r = srcResizedBitmap.Construct(srcVcDim, pSrcBitmapEx->GetPixelColorFormat()); - SysTryReturnResult(NID_GRP, !IsFailed(r), E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, !IsFailed(r), E_OUT_OF_MEMORY, "Memory allocation failed."); } _UpdateScaledBitmapEx(pSrcBitmapEx, &srcResizedBitmap); @@ -1641,10 +1646,18 @@ _BitmapImpl::CheckNinePatchedBitmapStrictly(const Bitmap& bitmap) } } +void +_BitmapImpl::SetNinePatchedTagByForce(bool isNinePatched) +{ + _sharedItem->associated.hasBeenDetectedByUsingName = true; + _sharedItem->associated.determinedNinePatchedAtFirst = isNinePatched; +} + bool _BitmapImpl::_SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam, void (* LockCallback)(void*), void* pLockCallbackParam, - void (* UnlockCallback)(void*), void* pUnlockCallbackParam) + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam) { if (!(INSTANCE_IS_VALID)) { @@ -1663,14 +1676,17 @@ _BitmapImpl::_SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbac this->_sharedItem->pUnlockCallbackFunc = UnlockCallback; this->_sharedItem->pUnlockCallbackParam = pUnlockCallbackParam; + this->_sharedItem->pPostlockCallbackFunc = PostlockCallback; + this->_sharedItem->pPostlockCallbackParam = pPostlockCallbackParam; + if (this->_sharedItem->nativeBitmap.get()) { - this->_sharedItem->nativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam); + this->_sharedItem->nativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam); } if (this->_sharedItem->scaledNativeBitmap.get()) { - this->_sharedItem->scaledNativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam); + this->_sharedItem->scaledNativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam); } return true; diff --git a/src/graphics/FGrp_BitmapTool.cpp b/src/graphics/FGrp_BitmapTool.cpp index e0b9ff4..44a8b15 100644 --- a/src/graphics/FGrp_BitmapTool.cpp +++ b/src/graphics/FGrp_BitmapTool.cpp @@ -38,9 +38,10 @@ bool _BitmapTool::SetCallback(Tizen::Graphics::Bitmap& bitmap, void (* DestroyCallback)(void*), void* pCallbackParam, void (* LockCallback)(void*), void* pLockParam, - void (* UnlockCallback)(void*), void* pUnlockParam) + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam) { - return _BitmapUtil::SetCallback(bitmap, DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam); + return _BitmapUtil::SetCallback(bitmap, DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam, PostlockCallback, pPostlockParam); } void diff --git a/src/graphics/FGrp_BitmapUtil.cpp b/src/graphics/FGrp_BitmapUtil.cpp index 10f73ed..8b30214 100644 --- a/src/graphics/FGrp_BitmapUtil.cpp +++ b/src/graphics/FGrp_BitmapUtil.cpp @@ -171,7 +171,7 @@ Tizen::Graphics::_BitmapUtil::CreateBitmapN(_BitmapImpl* pBitmapImpl) std::auto_ptr bitmap(new (std::nothrow) Tizen::Graphics::Bitmap); - SysTryReturn(NID_GRP, bitmap.get() != 0, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, bitmap.get() != 0, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); // change the implentation instance of Bitmap class { @@ -201,7 +201,7 @@ Tizen::Graphics::_BitmapUtil::CreateBitmapN(void* pBuffer, int width, int height std::auto_ptr bitmapTemp(new (std::nothrow) Tizen::Graphics::_BitmapTemp(pBuffer, width, height, depth)); - SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get()); @@ -219,7 +219,7 @@ Tizen::Graphics::_BitmapUtil::CreateBitmapN(Dimension physicalSize, int depth) { std::auto_ptr bitmapTemp(new (std::nothrow) Tizen::Graphics::_BitmapTemp(physicalSize, depth)); - SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get()); @@ -247,7 +247,7 @@ Tizen::Graphics::_BitmapUtil::ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, v return E_SYSTEM; } - if (!SetCallback(srcBitmap, DestroyCallback, pCallbackParam, null, null, null, null)) + if (!SetCallback(srcBitmap, DestroyCallback, pCallbackParam, null, null, null, null, null, null)) { return E_SYSTEM; } @@ -261,13 +261,14 @@ bool Tizen::Graphics::_BitmapUtil::SetCallback(Tizen::Graphics::Bitmap& bitmap, void (* DestroyCallback)(void*), void* pCallbackParam, void (* LockCallback)(void*), void* pLockParam, - void (* UnlockCallback)(void*), void* pUnlockParam) + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam) { Tizen::Graphics::_BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(bitmap); _BitmapImplHack* pBitmapImplHack = static_cast <_BitmapImplHack*>(pBitmapImpl); - return (pBitmapImplHack) ? pBitmapImplHack->SetCallback(DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam) : false; + return (pBitmapImplHack) ? pBitmapImplHack->SetCallback(DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam, PostlockCallback, pPostlockParam) : false; } void diff --git a/src/graphics/FGrp_BitmapUtil.h b/src/graphics/FGrp_BitmapUtil.h index 954dd8b..748c489 100644 --- a/src/graphics/FGrp_BitmapUtil.h +++ b/src/graphics/FGrp_BitmapUtil.h @@ -58,7 +58,8 @@ result ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, void* pBuffer, long byte bool SetCallback(Tizen::Graphics::Bitmap& bitmap, void (* DestroyCallback)(void*), void* pCallbackParam, void (* LockCallback)(void*), void* pLockParam, - void (* UnlockCallback)(void*), void* pUnlockParam); + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam); void ResetCallback(Tizen::Graphics::Bitmap& bitmap); @@ -124,14 +125,15 @@ public: bool SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam, void (* LockCallback)(void*), void* pLockCallbackParam, - void (* UnlockCallback)(void*), void* pUnlockCallbackParam) + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam) { if (this->_sharedItem.get() == 0) { return false; } - return this->_SetCallback(DestroyCallback, pDestroyCallbackParam, LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam); + return this->_SetCallback(DestroyCallback, pDestroyCallbackParam, LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam); } void ResetCallback(void) @@ -147,6 +149,8 @@ public: this->_sharedItem->pLockCallbackParam = null; this->_sharedItem->pUnlockCallbackFunc = null; this->_sharedItem->pUnlockCallbackParam = null; + this->_sharedItem->pPostlockCallbackFunc = null; + this->_sharedItem->pPostlockCallbackParam = null; } }; // _BitmapImplHack diff --git a/src/graphics/FGrp_BufferInfoImpl.cpp b/src/graphics/FGrp_BufferInfoImpl.cpp index e94aae2..f9e27b8 100644 --- a/src/graphics/FGrp_BufferInfoImpl.cpp +++ b/src/graphics/FGrp_BufferInfoImpl.cpp @@ -73,6 +73,7 @@ _BufferInfoImpl::GetHandle(HandleType handleType) const case HANDLE_TYPE_OVERLAY_REGION: case HANDLE_TYPE_VE_SURFACE: case HANDLE_TYPE_CANVAS_TEXTURE: + case HANDLE_TYPE_NATIVE_PIXMAP: return (__handleType == handleType) ? __handle : INVALID_BUFFER_HANDLE; case HANDLE_TYPE_NONE: default: @@ -105,6 +106,7 @@ _BufferInfoImpl::SetHandle(HandleType handleType, int handle, void* pUserData) case HANDLE_TYPE_OVERLAY_REGION: case HANDLE_TYPE_VE_SURFACE: case HANDLE_TYPE_CANVAS_TEXTURE: + case HANDLE_TYPE_NATIVE_PIXMAP: __handleType = handleType; __handle = handle; __pUserData = pUserData; diff --git a/src/graphics/FGrp_Canvas.cpp b/src/graphics/FGrp_Canvas.cpp old mode 100755 new mode 100644 index fd92850..5ccaef1 --- a/src/graphics/FGrp_Canvas.cpp +++ b/src/graphics/FGrp_Canvas.cpp @@ -512,9 +512,6 @@ namespace typedef Tizen::Graphics::_Canvas::SystemPixel _SystemPixel; typedef Tizen::Graphics::_Util::ScratchPad<_SystemPixel> _ScratchPad32; -static std::unique_ptr<_SystemPixel[]> _systemFontBuffer; -static std::auto_ptr<_ScratchPad32> _systemFont; - } //////////////////////////////////////////////////////////////////////////////// @@ -613,7 +610,6 @@ _Canvas::_Canvas(void) , __lineJoinStyle(LINE_JOIN_STYLE_ROUND) , __isClipBoundsSet(false) , __textOrigin(TEXT_ORIGIN_LEFT_TOP) - , __applyEmoji(true) , __bitmapDrawingQuality(BITMAP_DRAWING_QUALITY_LOW) , __compositeMode(COMPOSITE_MODE_SRC_OVER) , __useStableRenderer(false) @@ -1920,7 +1916,7 @@ _Canvas::DrawBitmapForNinePatchedBitmap(const Rectangle& destRect, const _Bitmap const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); { - if (srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied)) + if (srcBufferInfo.bitsPerPixel == 32) { _Util::Rectangle outRect = { 0, 0, -1, -1 }; _Util::Rectangle dstRect = { destRect.x, destRect.y, destRect.width, destRect.height }; diff --git a/src/graphics/FGrp_Canvas.h b/src/graphics/FGrp_Canvas.h old mode 100755 new mode 100644 index 7b60206..2e7675a --- a/src/graphics/FGrp_Canvas.h +++ b/src/graphics/FGrp_Canvas.h @@ -256,7 +256,6 @@ private: bool __isClipBoundsSet; Rectangle __clipBounds; TextOrigin __textOrigin; - bool __applyEmoji; struct { diff --git a/src/graphics/FGrp_CanvasGpArc.cpp b/src/graphics/FGrp_CanvasGpArc.cpp index 05465dd..f9a18b7 100644 --- a/src/graphics/FGrp_CanvasGpArc.cpp +++ b/src/graphics/FGrp_CanvasGpArc.cpp @@ -36,7 +36,6 @@ namespace // unnamed { const int _ARC_DELTA_SOLID_LINE = 4; -const int _ARC_DELTA_DOT_LINE = 1; const int _MAX_ARC_OUTLINE_POINTS = 20000; const int _MAX_STACK_COUNT = 200; diff --git a/src/graphics/FGrp_CanvasImpl.cpp b/src/graphics/FGrp_CanvasImpl.cpp old mode 100755 new mode 100644 index 53477bf..cdaf16a --- a/src/graphics/FGrp_CanvasImpl.cpp +++ b/src/graphics/FGrp_CanvasImpl.cpp @@ -118,7 +118,7 @@ _Util::Point* Convert[]> pPointArray(new (std::nothrow) _Util::Point[count]); - SysTryReturn(NID_GRP, pPointArray, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pPointArray, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); { for (int i = 0; i < count; i++) @@ -204,7 +204,7 @@ _CanvasImpl::Construct(void) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = this->_pNativeCanvas->Construct(); @@ -225,7 +225,7 @@ _CanvasImpl::Construct(const Rectangle& vcRect) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcRect.width > 0 && vcRect.height > 0, E_OUT_OF_RANGE, "The given rectangle(width:%d,height:%d) is out of range.", vcRect.width, @@ -248,7 +248,7 @@ _CanvasImpl::Construct(const BufferInfo& bufferInfo) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0) , E_INVALID_ARG @@ -323,7 +323,7 @@ _CanvasImpl::Construct(Handle windowHandle) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); return this->_pNativeCanvas->Construct(windowHandle); } @@ -333,7 +333,7 @@ _CanvasImpl::Construct(Handle windowHandle, const Rectangle& vcRect) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcRect.width >= 0 && vcRect.height >= 0, E_OUT_OF_RANGE, "The given rectangle(width:%d,height:%d) is out of range.", vcRect.width, @@ -358,7 +358,7 @@ _CanvasImpl::Construct(const FloatRectangle& vcRectF) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcRectF.width > 0.0f && vcRectF.height > 0.0f, E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRectF.width, @@ -397,7 +397,7 @@ _CanvasImpl::Construct(Handle windowHandle, const FloatRectangle& vcRectF) { SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); - SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); SysTryReturnResult(NID_GRP, vcRectF.width >= 0.0f && vcRectF.height >= 0.0f, E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRectF.width, @@ -2340,7 +2340,7 @@ _CanvasImpl::SetLineCapStyle(LineCapStyle lineCapStyle) case LINE_CAP_STYLE_SQUARE: break; default: - SysTryReturn(NID_GRP, false, E_INVALID_ARG, E_INVALID_ARG, "The given line cap style is out of range."); + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line cap style is out of range."); } return this->_pNativeCanvas->SetLineCapStyle(lineCapStyle); @@ -2358,7 +2358,7 @@ _CanvasImpl::SetLineJoinStyle(LineJoinStyle lineJoinStyle) case LINE_JOIN_STYLE_BEVEL: break; default: - SysTryReturn(NID_GRP, false, E_INVALID_ARG, E_INVALID_ARG, "The given line join style is out of range."); + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line join style is out of range."); } return this->_pNativeCanvas->SetLineJoinStyle(lineJoinStyle); @@ -2814,7 +2814,7 @@ _CanvasImpl::GetFontN(void) else { pFont = new Font(); - SysTryCatch(NID_GRP, pFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory."); + SysTryCatch(NID_GRP, pFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); const float defaultFontSize = _ResUtil::ConvertToVirCoordY(16.0f); result r = pFont->Construct(FONT_STYLE_PLAIN, defaultFontSize); @@ -2895,7 +2895,7 @@ _CanvasImpl::SetClipBounds(const Rectangle& vcRect) if (IsSucceeded(r)) { - _Util::Rectangle vcRect = + _Util::Rectangle vcRevisedRect = { revisedVcRect.x, revisedVcRect.y, @@ -2903,7 +2903,7 @@ _CanvasImpl::SetClipBounds(const Rectangle& vcRect) revisedVcRect.height }; - this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRect); + this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect); } return r; @@ -2914,7 +2914,7 @@ _CanvasImpl::SetClipBounds(const Rectangle& vcRect) if (IsSucceeded(r)) { - _Util::Rectangle vcRect = + _Util::Rectangle vcRevisedRect = { revisedVcRect.x, revisedVcRect.y, @@ -2922,7 +2922,7 @@ _CanvasImpl::SetClipBounds(const Rectangle& vcRect) revisedVcRect.height }; - this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRect); + this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect); } return r; @@ -3118,7 +3118,7 @@ _CanvasImpl::SetPosition(int vcX, int vcY) Canvas* _CanvasImpl::GetSubCanvasN(const Rectangle& subRegion) const { - SysTryReturn(NID_GRP, INSTANCE_IS_VALID, null, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); _Canvas* pSourceNativeCanvas = this->_pNativeCanvas; @@ -3126,11 +3126,11 @@ _CanvasImpl::GetSubCanvasN(const Rectangle& subRegion) const Canvas* pSubCanvas = subCanvas.get(); - SysTryReturn(NID_GRP, pSubCanvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pSubCanvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _CanvasImpl* pSubCanvasImpl = _CanvasImpl::GetInstance(*pSubCanvas); - SysTryReturn(NID_GRP, pSubCanvasImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pSubCanvasImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (_ResUtil::NeedToConvertCoord()) { @@ -3179,7 +3179,7 @@ _CanvasImpl::GetSubCanvasFN(const FloatRectangle& subRegion) const void _CanvasImpl::SetAntialiasingEnabled(bool enable) { - SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "[E_OUT_OF_MEMORY] This instance is not constructed yet."); return this->_pNativeCanvas->SetAntialiasingEnabled(enable); } diff --git a/src/graphics/FGrp_CanvasPixman.cpp b/src/graphics/FGrp_CanvasPixman.cpp old mode 100755 new mode 100644 index 0167e18..6e13a2a --- a/src/graphics/FGrp_CanvasPixman.cpp +++ b/src/graphics/FGrp_CanvasPixman.cpp @@ -373,6 +373,22 @@ bool CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics: return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE); } + case PIXMAN_OP_SRC: + case PIXMAN_OP_CLEAR: + { + int dstX1 = int(floor(xDest)); + int dstX2 = int(ceil(xDest + srcImage.width)); + int dstY1 = int(floor(yDest)); + int dstY2 = int(ceil(yDest + srcImage.height)); + + Tizen::Graphics::_Util::Pixmap dstImageSub = dstImage.GetSubBitmap(dstX1, dstY1, dstX2 - dstX1, dstY2 - dstY1); + Tizen::Graphics::_Util::Pixmap srcImageSub = srcImage.GetSubBitmap((dstX1 >= 0) ? 0 : -dstX1, (dstY1 >= 0) ? 0 : -dstY1, srcImage.width, srcImage.height); + + pixman_transform_t transform; + pixman_transform_init_identity(&transform); + pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(dstX1 -(xDest - 0.5)), pixman_double_to_fixed(dstY1 -(yDest - 0.5))); + return CompositePixmap(dstImageSub, srcImageSub, rop, filter, transform, PIXMAN_REPEAT_REFLECT); + } default: { int dstX1 = int(floor(xDest)); @@ -398,6 +414,11 @@ bool ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics return true; } + if (dstImage.width == srcImage.width && dstImage.height == srcImage.height) + { + return CopyPixmap(dstImage, srcImage, drawingQuality, compositeMode); + } + pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode); pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality); pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, dstImage.width, dstImage.height); diff --git a/src/graphics/FGrp_CoordinateSystem.cpp b/src/graphics/FGrp_CoordinateSystem.cpp index 89ef2b5..b66a243 100644 --- a/src/graphics/FGrp_CoordinateSystem.cpp +++ b/src/graphics/FGrp_CoordinateSystem.cpp @@ -126,7 +126,7 @@ _CoordinateSystem::Reset(_LogicalResolution logicalResolution, _BaseScreenSize l std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl()); - SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Insufficient memory."); + SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = pImpl->Initialize(logicalResolution, logicalBaseScreenSize); @@ -406,7 +406,7 @@ _CoordinateSystem::Reset(int srcResolution, _BaseScreenSize srcBaseScreenSize, D std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl()); - SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Insufficient memory."); + SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = pImpl->Initialize(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); diff --git a/src/graphics/FGrp_CoordinateSystemUtils.cpp b/src/graphics/FGrp_CoordinateSystemUtils.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/FGrp_EnrichedTextImpl.cpp b/src/graphics/FGrp_EnrichedTextImpl.cpp index 6ea5f63..571c762 100644 --- a/src/graphics/FGrp_EnrichedTextImpl.cpp +++ b/src/graphics/FGrp_EnrichedTextImpl.cpp @@ -1579,7 +1579,7 @@ _EnrichedTextImpl::GetCloneN(void) const TextElementType type = TEXT_ELEMENT_TYPE_NONE; Dimension dim = this->GetSize(); - TextVerticalAlignment verticalAlignment = this->GetElementVerticalAlignment(); + TextVerticalAlignment verticalAlignment = this->GetVerticalAlignment(); TextHorizontalAlignment horizontalAlignment = this->GetHorizontalAlignment(); TextVerticalAlignment elementVerticalAlignment = this->GetElementVerticalAlignment(); TextWrap wrap = this->GetTextWrapStyle(); diff --git a/src/graphics/FGrp_Farm.cpp b/src/graphics/FGrp_Farm.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/FGrp_Farm.h b/src/graphics/FGrp_Farm.h old mode 100755 new mode 100644 diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp index 16f3ca3..412a125 100644 --- a/src/graphics/FGrp_Font.cpp +++ b/src/graphics/FGrp_Font.cpp @@ -53,10 +53,11 @@ #include "FGrp_Canvas.h" +#include "FGrp_FontPrivate.h" #include "util/FGrp_UtilTemplate.h" //#define USE_FONTCONFIG -#define USE_EMOJI +//#define APPLY_BOLD_SPACE #define SYNCHRONIZATION_2_0 #define __pNativeFont __sharedFont.get() @@ -186,7 +187,7 @@ _GetSystemFontList(Tizen::Base::Collection::IList& list) if (FcPatternGetString(pSet->fonts[i], FC_FILE, 0, &pName) == FcResultMatch) { String* pFamilyName = new (std::nothrow) String(Tizen::Graphics::_Font::GetFaceName(String((char*)pName))); - SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory"); + SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); list.Add(*pFamilyName); @@ -200,7 +201,7 @@ _GetSystemFontList(Tizen::Base::Collection::IList& list) if (defaultFontExists == false) { String* pDefaultFontName = new (std::nothrow) String(defaultFontFaceName); - SysTryCatch(NID_GRP, pDefaultFontName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory"); + SysTryCatch(NID_GRP, pDefaultFontName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); list.InsertAt(*pDefaultFontName, 0); } @@ -279,7 +280,7 @@ CATCH: bool isNewFont = true; String* pFamilyName = new (std::nothrow) String(Tizen::Graphics::_Font::GetFaceName(fullName)); - SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory"); + SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); for (int idx = 0; idx < list.GetCount(); idx++) { @@ -460,72 +461,6 @@ const char* _SampleLanguages[] = const int _sampleLanguageCount = sizeof(_SampleLanguages) / sizeof(_SampleLanguages[0]); -unsigned long -GetPredefinedColor(const wchar_t unicode, unsigned long fgColor) -{ -#ifdef USE_EMOJI - // - // Emoji Unicode List 176 + 76 - // - static const unsigned long _EMOJI_BLACK = 0xFF000000; - static const unsigned long _EMOJI_BLUE = 0xFF0000FF; - static const unsigned long _EMOJI_GREEN = 0xFF00FF00; - static const unsigned long _EMOJI_RED = 0xFFFF0000; - static const unsigned long _EMOJI_ORANGE = 0xFFFF6600; - static const unsigned long _EMOJI_PURPLE = 0xFF9370DB; - static const unsigned long _EMOJI_DEEP_PURPLE = 0xFF800080; - static const unsigned long _EMOJI_DARK_BLUE = 0xFF00008B; - static const unsigned long _EMOJI_BROWN = 0xFFA52A2A; - static const unsigned long _NOT_EMOJI = 0; - - static const wchar_t _MAX_EMOJI_UNICODE = 0xE757; - static const wchar_t _MIN_EMOJI_UNICODE = 0xE63E; - - static const unsigned long _emojiTable[] = - { - _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE, - _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_GREEN, _EMOJI_BLUE, - _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_PURPLE, _EMOJI_GREEN, - _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED, - _EMOJI_BLACK, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_PURPLE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, - _EMOJI_GREEN, _EMOJI_PURPLE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, - _EMOJI_BLUE, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE, - _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_RED, - _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_BLACK, - _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, - _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, - _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, - _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, - _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, - _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLACK, - _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED, - _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, - _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED, - _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_ORANGE, - _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_RED, - _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK, - _EMOJI_RED, _EMOJI_DARK_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_BROWN, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_GREEN, - _EMOJI_ORANGE, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_PURPLE, _EMOJI_BLUE, _EMOJI_BLUE, - _EMOJI_RED, _EMOJI_DEEP_PURPLE, _EMOJI_PURPLE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_PURPLE, _EMOJI_DARK_BLUE, _EMOJI_ORANGE, _EMOJI_BLUE, - _EMOJI_BLUE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_ORANGE, - _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_GREEN, - _EMOJI_RED, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BROWN, - _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_BROWN, _EMOJI_ORANGE, _EMOJI_DARK_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_ORANGE, - _EMOJI_DEEP_PURPLE, _EMOJI_DEEP_PURPLE - }; - - if (unicode >= _MIN_EMOJI_UNICODE && unicode <= _MAX_EMOJI_UNICODE) - { - if (_emojiTable[unicode - _MIN_EMOJI_UNICODE] != _NOT_EMOJI) - { - fgColor = _emojiTable[unicode - _MIN_EMOJI_UNICODE]; - } - } -#endif - - return fgColor; -} - struct _TextFragment { _Util::String textFragment; @@ -789,6 +724,14 @@ _Font::GetSize(void) const return __fontAttrib.size; } +result +_Font::SetXExpansion(_Util::FixedPoint26_6 xExpansion) +{ + __fontAttrib.xExpansion = xExpansion; + + return E_SUCCESS; +} + void _Font::SetStrikeOut(bool strikeout) { @@ -832,13 +775,12 @@ Tizen::Base::Collection::IList* _Font::GetSystemFontListN(void) { std::auto_ptr pList(new (std::nothrow) Tizen::Base::Collection::ArrayList); - SysTryReturn(NID_GRP, pList.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory"); + SysTryReturn(NID_GRP, pList.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = _GetSystemFontList(*pList); SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); return pList.release(); - } Tizen::Base::String @@ -874,7 +816,7 @@ _Font::CloneN() { // make the clone _Font* pNativeFont = new (std::nothrow) _Font(*this); - SysTryReturn(NID_GRP, pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory"); + SysTryReturn(NID_GRP, pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); // done return pNativeFont; @@ -892,6 +834,7 @@ _Font::ApplyAttribute() fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; + fontAttrib.xExpansion = __fontAttrib.xExpansion; rtn = __pNativeFont->SetAttrib(fontAttrib); SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute"); @@ -901,18 +844,28 @@ _Font::ApplyAttribute() result _Font::GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const { - if (text.pStart == null || text.length <= 0) + if (text.pStart == null) { pcDim.SetSize(0, 0); count = 0; - return E_SUCCESS; + SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid."); } - result r = this->__GetTextExtentEx(width, text, outline, count, pcDim); + if (text.length <= 0) + { + pcDim.SetSize(0, 0); + count = 0; + return E_SUCCESS; + } - if (r == E_SUCCESS) + if (_GetTextBidiHint() != TEXT_BIDI_HINT_RTL) { - return r; + result r = this->__GetTextExtentEx(width, text, outline, count, pcDim); + + if (r == E_SUCCESS) + { + return r; + } } _TextBidiPropertyWithReorder bidiProperty(text.pStart, text.length, _Util::Convert(_GetTextBidiHint())); @@ -1061,12 +1014,14 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int _IFont::Property property; GET_FONT_PROPERTY(property, false); +#ifdef APPLY_BOLD_SPACE if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT) { _IFont::Attrib attr; pThis->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif const wchar_t* pText = text.pStart; int length = text.length; @@ -1102,6 +1057,7 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; + fontAttrib.xExpansion = __fontAttrib.xExpansion; rtn = pFont->SetAttrib(fontAttrib); //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute"); } @@ -1125,7 +1081,7 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int #ifdef SYNCHRONIZATION_2_0 // adjusting x2 bounds for synchronizing fuctionality with 2.0 - glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + italicSpace + boldSpace; + glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace; #endif if (outline) { @@ -1140,11 +1096,7 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int _ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2); _ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2); -#ifdef SYNCHRONIZATION_2_0 - curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace; -#else curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; -#endif curY += pFontGlyphData->yAdvance.ToInt(); pFont->UnloadGlyph(&pFontGlyphData); @@ -1176,7 +1128,7 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int SysTryCatch(NID_GRP, preX1 <= preX2 && preY1 <= preY2, pcDim.SetSize(0, 0); count = 0, E_SYSTEM, "[E_SYSTEM] Failed to calculate text extent"); count = characters; - pcDim.width = preX2 - preX1; + pcDim.width = preX2 - preX1 + italicSpace; #ifdef SYNCHRONIZATION_2_0 pcDim.height = __fontAttrib.size.ToInt(); #else @@ -1192,12 +1144,6 @@ CATCH: result _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const { - if (text.pStart == null) - { - pcDim.SetSize(0, 0); - SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid."); - } - int preX1 = 0x7FFFFFFF; int preY1 = 0x7FFFFFFF; int preX2 = -0x7FFFFFFF; @@ -1243,6 +1189,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& } } +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1252,6 +1199,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& pThis->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif const wchar_t* pText = text.pStart; int length = text.length; @@ -1272,6 +1220,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; + fontAttrib.xExpansion = __fontAttrib.xExpansion; rtn = pFont->SetAttrib(fontAttrib); //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute"); } @@ -1295,7 +1244,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& #ifdef SYNCHRONIZATION_2_0 // adjusting x2 bounds for synchronizing fuctionality with 2.0 - glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + italicSpace + boldSpace; + glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace; #endif if (outline) { @@ -1310,11 +1259,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& _ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2); _ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2); -#ifdef SYNCHRONIZATION_2_0 - curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace; -#else curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; -#endif curY += pFontGlyphData->yAdvance.ToInt(); pFont->UnloadGlyph(&pFontGlyphData); @@ -1346,7 +1291,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& SysTryCatch(NID_GRP, preX1 <= preX2 && preY1 <= preY2, pcDim.SetSize(0, 0); count = 0, E_SYSTEM, "[E_SYSTEM] Failed to calculate text extent"); count = characters; - pcDim.width = preX2 - preX1; + pcDim.width = preX2 - preX1 + italicSpace; #ifdef SYNCHRONIZATION_2_0 pcDim.height = __fontAttrib.size.ToInt(); #else @@ -1362,6 +1307,20 @@ CATCH: result _Font::GetTextExtent(int width, const _Util::String& text, bool outline, const Tizen::Base::String& delimiter, int& count, Dimension& dim) const { + if (text.pStart == null) + { + dim.SetSize(0, 0); + count = 0; + SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid."); + } + + if (text.length <= 0) + { + dim.SetSize(0, 0); + count = 0; + return E_SUCCESS; + } + const wchar_t* pText = text.pStart; const wchar_t* pTextEnd = pText + text.length; @@ -1382,15 +1341,14 @@ _Font::GetTextExtent(int width, const _Util::String& text, bool outline, const T result _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const { - SysAssert(text.pStart != null && text.length > 0); - outList.Clear(); _Font* pThis = const_cast <_Font*>(this); APPLY_ATTRIBUTE(E_SYSTEM); - int addingSpace = __fontAttrib.charSpace; + int italicSpace = 0; + int boldSpace = 0; #ifdef SYNCHRONIZATION_2_0 { @@ -1400,11 +1358,12 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa if (__fontAttrib.style & FONT_STYLE_ITALIC) { - addingSpace += (sizeProperty.ascender.ToInt() * 2) >> 4; + italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4; } } #endif +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1414,9 +1373,10 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa if (pThis->GetAttrib(attr)) { - addingSpace += static_cast(attr.boldWeight.ToFloat() + 0.5f); + boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } } +#endif int curX = 0; int curY = 0; @@ -1444,6 +1404,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; + fontAttrib.xExpansion = __fontAttrib.xExpansion; pFont->SetAttrib(fontAttrib); } } @@ -1466,7 +1427,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa int prevX = curX; - curX += pFontGlyphData->xAdvance.ToInt() + addingSpace; + curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; curY += pFontGlyphData->yAdvance.ToInt(); pFont->UnloadGlyph(&pFontGlyphData); @@ -1568,7 +1529,7 @@ _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::Ac fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; - + fontAttrib.xExpansion = __fontAttrib.xExpansion; textFragment->pUsingFont->SetAttrib(fontAttrib); } } @@ -1675,7 +1636,13 @@ _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::Ac result _Font::GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const { - if (text.pStart == null || text.length <= 0) + if (text.pStart == null) + { + outList.Clear(); + SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid."); + } + + if (text.length <= 0) { outList.Clear(); return E_SUCCESS; @@ -1728,12 +1695,10 @@ _Font::GetLeading(void) const } result -_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length) +_Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text, unsigned long color, bool ignorePredefinedColor) { SysTryReturnResult(NID_GRP, canvas.__pScratchPad != null, E_INVALID_ARG, "A canvas is invalid"); - const wchar_t* pText = text.GetPointer() + startIndex; - bool rtn = this->ApplyAttribute(); SysTryReturn(NID_GRP, rtn, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fails to apply font attribute."); @@ -1778,6 +1743,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String } } +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1787,8 +1753,12 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String this->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif + + const wchar_t* pText = text.pStart; + int length = text.length; - unsigned long canvasFgColor = canvas.__fgColor; + unsigned long canvasFgColor = color; _TextBidiPropertyWithReorder bidiProperty(pText, length, _Util::Convert(_GetTextBidiHint())); @@ -1854,7 +1824,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; - + fontAttrib.xExpansion = __fontAttrib.xExpansion; textFragment->pUsingFont->SetAttrib(fontAttrib); } } @@ -1911,6 +1881,11 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String yDest -= pGlyph->yAdvance.ToInt(); } + // temporary indent for convenience of code review + switch (pGlyph->image.depth) + { + case 8: + { for (int h = 0; h < pGlyph->image.height; h++) { int y = yDest - pGlyph->yOffset.ToInt() + h; @@ -1966,6 +1941,101 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String ++pDest32; } } + } + break; + + case 16: + { + scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + for (int h = 0; h < pFontGlyphData->image.height; h++) + { + int y = yDest - pFontGlyphData->yOffset.ToInt() + h; + + if (y < clipY1) + { + continue; + } + + if (y >= clipY2) + { + break; + } + + for (int w = 0; w < pFontGlyphData->image.width; w++) + { + int x = xDest + pFontGlyphData->xOffset.ToInt() + w; + + if (x < clipX1) + { + continue; + } + + if (x >= clipX2) + { + break; + } + + unsigned short* pSource = (unsigned short*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine]; + pSource += w; + + TPixel dest32 = ((*pSource & 0xF000) << 16) | ((*pSource & 0x0F00) << 12) | ((*pSource & 0x00F0) << 8) | ((*pSource & 0x000F) << 4); + dest32 |= (dest32 >> 4); + + scratchPad.FillRect(x, y, 1, 1, dest32, 255); + } + } + scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit); + } + break; + + case 32: + { + scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + for (int h = 0; h < pGlyph->image.height; h++) + { + int y = yDest - pGlyph->yOffset.ToInt() + h; + + if (y < clipY1) + { + continue; + } + + if (y >= clipY2) + { + break; + } + + TPixel* pDest32 = pBufferStartAddr + y * bufferPitch + xDest + pGlyph->xOffset.ToInt(); + + for (int w = 0; w < pGlyph->image.width; w++) + { + int x = xDest + pGlyph->xOffset.ToInt() + w; + + if (x < clipX1) + { + ++pDest32; + continue; + } + + if (x >= clipX2) + { + break; + } + + unsigned long* pSource = (unsigned long*)&pGlyph->image.pBitmap[h * pGlyph->image.bytesPerLine]; + pSource += w; + + scratchPad.FillRect(x, y, 1, 1, *pSource, 255); + } + } + + scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit); + } + break; + } + if (_TextBidiUtil::IsTextBidiBaseLtr()) { @@ -1992,13 +2062,24 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String } else { + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + while (*pText && --length >= 0) { + if (mgr.SearchSpaceList(*pText)) + { + pText++; + + continue; + } + // find out proper native font _IFont* pFont = this->__GetFont(*pText); if (pFont == null) { + pText++; + continue; } @@ -2013,7 +2094,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0; - + fontAttrib.xExpansion = __fontAttrib.xExpansion; rtn = pFont->SetAttrib(fontAttrib); //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute"); } @@ -2021,7 +2102,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String _IFont::Property property; pFont->GetFontProperty(property); - unsigned long fgColor = (canvas.__applyEmoji && pFont->IsEmoji()) ? GetPredefinedColor(*pText, canvasFgColor) : canvasFgColor; + unsigned long fgColor = (!ignorePredefinedColor && pFont->hasPredefinedColor()) ? _GetPredefinedColor(*pText, canvasFgColor) : canvasFgColor; if (left > 0) { @@ -2038,8 +2119,22 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String continue; } + if (pFontGlyphData->xAdvance == 0 && pFontGlyphData->image.width == 0) + { + mgr.AddSpaceList(*(pText - 1)); + + pFont->UnloadGlyph(&pFontGlyphData); + + continue; + } + typedef unsigned long TPixel; + // temporary indent for convenience of code review + switch (pFontGlyphData->image.depth) + { + case 8: + { TPixel srcA = (fgColor >> 24) & 0xFF; srcA += (srcA >> 7); @@ -2108,12 +2203,118 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String } } - xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace; + xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; yDest += pFontGlyphData->yAdvance.ToInt(); left++; leftChar = *(pText - 1); pFont->UnloadGlyph(&pFontGlyphData); + } + break; + + case 16: + { + scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + for (int h = 0; h < pFontGlyphData->image.height; h++) + { + int y = yDest - pFontGlyphData->yOffset.ToInt() + h; + + if (y < clipY1) + { + continue; + } + + if (y >= clipY2) + { + break; + } + + for (int w = 0; w < pFontGlyphData->image.width; w++) + { + int x = xDest + pFontGlyphData->xOffset.ToInt() + w; + + if (x < clipX1) + { + continue; + } + + if (x >= clipX2) + { + break; + } + + unsigned short* pSource = (unsigned short*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine]; + pSource += w; + + TPixel dest32 = ((*pSource & 0xF000) << 16) | ((*pSource & 0x0F00) << 12) | ((*pSource & 0x00F0) << 8) | ((*pSource & 0x000F) << 4); + dest32 |= (dest32 >> 4); + + scratchPad.FillRect(x, y, 1, 1, dest32, 255); + } + } + + xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; + yDest += pFontGlyphData->yAdvance.ToInt(); + left++; + leftChar = *(pText - 1); + + pFont->UnloadGlyph(&pFontGlyphData); + + scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit); + } + break; + + case 32: + { + scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + for (int h = 0; h < pFontGlyphData->image.height; h++) + { + int y = yDest - pFontGlyphData->yOffset.ToInt() + h; + + if (y < clipY1) + { + continue; + } + + if (y >= clipY2) + { + break; + } + + for (int w = 0; w < pFontGlyphData->image.width; w++) + { + int x = xDest + pFontGlyphData->xOffset.ToInt() + w; + + if (x < clipX1) + { + continue; + } + + if (x >= clipX2) + { + break; + } + + unsigned long* pSource = (unsigned long*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine]; + pSource += w; + + scratchPad.FillRect(x, y, 1, 1, *pSource, 255); + } + } + + xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; + yDest += pFontGlyphData->yAdvance.ToInt(); + left++; + leftChar = *(pText - 1); + + pFont->UnloadGlyph(&pFontGlyphData); + + scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit); + } + break; + } } } @@ -2148,32 +2349,33 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String scratchPad.RegisterFillRect(null); - return E_SUCCESS; } #undef BLEND_ALPHA_COMPONEMT result -_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length) { - unsigned long textColor = canvas.__fgColor; - bool applyEmoji = canvas.__applyEmoji; + _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length); + + return this->__DrawText(canvas, point, utilText, canvas.__fgColor, false); +} - //sunmi557.shin: draw border of font - canvas.__fgColor = outlineColor.GetRGB32(); - canvas.__applyEmoji = false; +result +_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + unsigned long textColor32 = canvas.__fgColor; + unsigned long outlineColor32 = outlineColor.GetRGB32();; - this->__DrawText(canvas, Point(point.x - 1, point.y), text, startIndex, length); - this->__DrawText(canvas, Point(point.x + 1, point.y), text, startIndex, length); - this->__DrawText(canvas, Point(point.x, point.y - 1), text, startIndex, length); - this->__DrawText(canvas, Point(point.x, point.y + 1), text, startIndex, length); + _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length); - //sunmi557.shin: draw original shape of font - canvas.__applyEmoji = applyEmoji; - canvas.__fgColor = textColor; + this->__DrawText(canvas, Point(point.x - 1, point.y), utilText, outlineColor32, true); + this->__DrawText(canvas, Point(point.x + 1, point.y), utilText, outlineColor32, true); + this->__DrawText(canvas, Point(point.x, point.y - 1), utilText, outlineColor32, true); + this->__DrawText(canvas, Point(point.x, point.y + 1), utilText, outlineColor32, true); - this->__DrawText(canvas, point, text, startIndex, length); + this->__DrawText(canvas, point, utilText, textColor32, false); return E_SUCCESS; } @@ -2228,6 +2430,40 @@ _Font::CheckGlyph(unsigned long character) return __pNativeFont->CheckGlyph(character); } +float +_Font::GetFontSizeFromMaxHeight(const _Util::FixedPoint26_6 expectedMaxHeight) +{ + return __pNativeFont->GetFontSizeFromMaxHeight(expectedMaxHeight); +} + +float +_Font::GetFontSizeFromMaxHeight(int style, const _Util::FixedPoint26_6 expectedMaxHeight) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + _FontRsrcManager::SharedFontResource out; + + result r = mgr.GetFont(style, expectedMaxHeight, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, -1.0f, r, "[%s] Getting system default font failed.", GetErrorMessage(r)); + + _IFont* pTempFont = out.get(); + + return pTempFont->GetFontSizeFromMaxHeight(expectedMaxHeight); +} + +float +_Font::GetFontSizeFromMaxHeight(const Tizen::Base::String& fontName, int style, const _Util::FixedPoint26_6 expectedMaxHeight) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + _FontRsrcManager::SharedFontResource out; + + result r = mgr.GetFont(fontName, style, expectedMaxHeight, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, -1.0f, r, "[%s] Getting font failed.", GetErrorMessage(r)); + + _IFont* pTempFont = out.get(); + + return pTempFont->GetFontSizeFromMaxHeight(expectedMaxHeight); +} + void _Font::__UpdateFontAttribute(int style, _Util::FixedPoint26_6 pcSize) { @@ -2350,24 +2586,27 @@ _Font::GetInstance(const _FontImpl& font) _IFont* _Font::__GetFont(wchar_t character) { - //------------------------------------------------------ - // - // 1. check if this font has a requested glyph - // - //------------------------------------------------------ - unsigned long idx = __pNativeFont->CheckGlyph(character); + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); - if (idx > 0) + if (!_HasEmoticonImage(character)) { - return __pNativeFont; - } + //------------------------------------------------------ + // + // 1. check if this font has a requested glyph + // + //------------------------------------------------------ + unsigned long idx = __pNativeFont->CheckGlyph(character); - // Check the BlackList - _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + if (idx > 0) + { + return __pNativeFont; + } - if (mgr.SearchBlackList(character)) - { - return __pNativeFont; + // Check the BlackList + if (mgr.SearchBlackList(character)) + { + return __pNativeFont; + } } //------------------------------------------------------ @@ -2393,7 +2632,7 @@ _Font::__GetFont(wchar_t character) { if (mgr.SearchFont(key)) { - if (pTempFont.get()->CheckGlyph(character) > 0) + if (pTempFont->CheckGlyph(character) > 0) { return pTempFont.get(); } @@ -2406,7 +2645,7 @@ _Font::__GetFont(wchar_t character) } } #else - for (_FontRsrcManager::FontMapT::const_iterator fontIterator = pFallbackFontMap->begin(); fontIterator != pFallbackFontMap->end(); ++fontIterator) + for (_IFont::FontMapT::const_iterator fontIterator = pFallbackFontMap->begin(); fontIterator != pFallbackFontMap->end(); ++fontIterator) { if (fontIterator->second != null) { @@ -2459,7 +2698,7 @@ _Font::__GetFont(wchar_t character) if (r == E_SUCCESS) { - unsigned long idx = out.get()->CheckGlyph(character); + unsigned long idx = out->CheckGlyph(character); if (idx > 0) { @@ -2506,6 +2745,12 @@ CATCH: bool _Font::__GetFallbackFontFileList(wchar_t character, Tizen::Base::Collection::IListT& out) { + if (_HasEmoticonImage(character)) + { + out.Add(String(_GetVirtualFileNameForEmoticon())); + return true; + } + GUnicodeScript script = g_unichar_get_script(character); if (script < 0 || script >= _sampleLanguageCount) { @@ -2542,7 +2787,7 @@ _Font::__GetFallbackFontFileList(wchar_t character, Tizen::Base::Collection::ILi { if (FcPatternGetString(pSet->fonts[i], FC_FILE, 0, &pName) == FcResultMatch) { - out.Add(String((char*)pName)); + out.Add(String((char*)pName)); } } diff --git a/src/graphics/FGrp_Font.h b/src/graphics/FGrp_Font.h index 2697f51..cbe0f1c 100644 --- a/src/graphics/FGrp_Font.h +++ b/src/graphics/FGrp_Font.h @@ -72,6 +72,7 @@ struct _FontAttribute int lineThickness; bool strikeout; bool underline; + _Util::FixedPoint26_6 xExpansion; void Init() { @@ -86,6 +87,7 @@ struct _FontAttribute lineThickness = -1; strikeout = false; underline = false; + xExpansion.Reset(_Util::FixedPoint26_6(1.0f)); } }; @@ -122,6 +124,8 @@ public: _Util::FixedPoint26_6 GetSize(void) const; + result SetXExpansion(_Util::FixedPoint26_6 xExpansion); + void SetStrikeOut(bool strikeOut); void SetUnderline(bool underline); @@ -159,6 +163,11 @@ public: bool UnloadGlyph(_IFont::Glyph** ppFontGlyphData); unsigned long CheckGlyph(unsigned long character); + float GetFontSizeFromMaxHeight(const _Util::FixedPoint26_6 expectedMaxHeight); + + static float GetFontSizeFromMaxHeight(int style, const _Util::FixedPoint26_6 expectedMaxHeight); + static float GetFontSizeFromMaxHeight(const Tizen::Base::String& fontName, int style, const _Util::FixedPoint26_6 expectedMaxHeight); + static result DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length); static result DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); @@ -173,6 +182,7 @@ private: result __DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length); result __DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + result __DrawText(_Canvas& canvas, const Point& point, const _Util::String& text, unsigned long color, bool ignorePredefinedColor); static result __DrawTextLastFallback(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length); static result __DrawTextDefault(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length); diff --git a/src/graphics/FGrp_FontBidiUtil.cpp b/src/graphics/FGrp_FontBidiUtil.cpp old mode 100755 new mode 100644 index bf5bd43..98688d1 --- a/src/graphics/FGrp_FontBidiUtil.cpp +++ b/src/graphics/FGrp_FontBidiUtil.cpp @@ -144,7 +144,7 @@ _GetBidiParagraphProperty(const wchar_t* pText, size_t len, int* pSegmentIndex, // precondition check { - CHECK_IF((pText) && _IsRtl(pText, len)); + CHECK_IF((pText) && (hint == Tizen::Graphics::_TextBidiProperty::BIDI_HINT_RTL || _IsRtl(pText, len))); size_t textLength = _GetStringLength(pText); len = (len < textLength) ? len : textLength; diff --git a/src/graphics/FGrp_FontBidiUtil.h b/src/graphics/FGrp_FontBidiUtil.h old mode 100755 new mode 100644 diff --git a/src/graphics/FGrp_FontFromImage.cpp b/src/graphics/FGrp_FontFromImage.cpp new file mode 100644 index 0000000..1c366ae --- /dev/null +++ b/src/graphics/FGrp_FontFromImage.cpp @@ -0,0 +1,303 @@ +// +// 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 FGrp_FontFromImage.cpp + * @brief This is the implementation file for _FontFromImage class. + * + */ + +#include "FGrp_FontFromImage.h" +#include "FGrp_FontPrivate.h" + +namespace +{ + +bool _CreateNullGlyph(Tizen::Graphics::_IFont::Glyph** ppFontGlyphData) +{ + using namespace Tizen::Graphics; + using Tizen::Graphics::_IFont; + + _IFont::Glyph* pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph)]; + + if (pFontGlyphData) + { + pFontGlyphData->id = 0; + pFontGlyphData->xOffset = _Util::FixedPoint22_10(0); + pFontGlyphData->yOffset = _Util::FixedPoint22_10(0); + pFontGlyphData->xAdvance = _Util::FixedPoint22_10(0); + pFontGlyphData->yAdvance = _Util::FixedPoint22_10(0); + pFontGlyphData->hasOwnerShip = 1; + + pFontGlyphData->image.width = 0; + pFontGlyphData->image.height = 0; + pFontGlyphData->image.bytesPerLine = 0; + pFontGlyphData->image.depth = 32; + pFontGlyphData->image.pBitmap = 0; + + pFontGlyphData->ptrAux = 0; + + *ppFontGlyphData = pFontGlyphData; + + return true; + } + + return false; +} + +} + +namespace Tizen { namespace Graphics +{ +_FontFromImage::_FontFromImage() + : __timeStamp(0) +{ + __fontAttrib.size = _Util::FixedPoint26_6(48); + __fontAttrib.angle = 0.0f; + __fontAttrib.style = _IFont::STYLE_NONE; + __fontAttrib.quality = _IFont::QUALITY_HIGH; + __fontAttrib.xExpansion.Reset(_Util::FixedPoint26_6(1.0f)); + __fontAttrib.boldWeight.Reset(_Util::FixedPoint26_6(1.0f)); + + memset(__fontImageCache, 0, sizeof(__fontImageCache)); +} + +bool +_FontFromImage::SetAttrib(const Attrib& fontAttrib) +{ + __fontAttrib = fontAttrib; + return true; +} + +bool +_FontFromImage::GetAttrib(Attrib& fontAttrib) const +{ + fontAttrib = __fontAttrib; + return true; +} + +bool +_FontFromImage::GetKerning(unsigned long ch1, unsigned long ch2, long& xVector, long& yVector) const +{ + return false; +} + +bool +_FontFromImage::LoadGlyph(unsigned long character, Glyph** ppFontGlyphData) +{ + bool rtn = __FindCache(character, __fontAttrib.size, ppFontGlyphData); + + if (rtn) + { + return true; + } + + rtn = _GetImageGlyph(character, __fontAttrib.size.ToFloat(), ppFontGlyphData); + + if (rtn) + { + (*ppFontGlyphData)->hasOwnerShip = 0; + + rtn = __AddCache(character, __fontAttrib.size, *ppFontGlyphData); + + if (!rtn) + { + (*ppFontGlyphData)->hasOwnerShip = 1; + } + } + + return rtn; +} + +bool +_FontFromImage::UnloadGlyph(Glyph** ppFontGlyphData) +{ + if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip == 0)) + { + //?? ykahn: false? + return false; + } + + delete[] (char*) (*ppFontGlyphData); + + *ppFontGlyphData = null; + + return true; +} + +unsigned long +_FontFromImage::CheckGlyph(unsigned long character) +{ + return _HasEmoticonImage(character); +} + +float +_FontFromImage::GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const +{ + SizeProperty sizeProperty; + + const float testSize = 100.0f; + + if (!_GetImageGlyphSizeProperty(testSize, sizeProperty)) + { + return 0.0f; + } + + return expectedMaxHeight * testSize / sizeProperty.maxHeight; +} + +bool +_FontFromImage::GetFontSizeProperty(SizeProperty& sizeProperty) const +{ + return _GetImageGlyphSizeProperty(__fontAttrib.size.ToFloat(), sizeProperty); +} + +bool +_FontFromImage::GetFontProperty(Property& property) const +{ + property.fontCaps = _IFont::CAPS_SCALABLE; + property.styleCaps = _IFont::STYLE_NONE; + + property.pEngineName = ""; + property.pFamilyName = ""; + property.pStyleName = ""; + property.styleFlag = 0; + property.weightClass = 400; + + return true; +} + +bool +_FontFromImage::GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT& out, int script) +{ + out.RemoveAll(); + + const wchar_t* pBegin = text.pStart; + const wchar_t* pEnd = pBegin + text.length; + + for ( ; pBegin < pEnd; ++pBegin) + { + _IFont::Glyph* pFontGlyphData = 0; + + if (!_GetImageGlyph(*pBegin, __fontAttrib.size.ToFloat(), &pFontGlyphData)) + { + _CreateNullGlyph(&pFontGlyphData); + } + + if (pFontGlyphData) + { + out.Add(pFontGlyphData); + } + } + + return true; +} + +_IFont::FontMapT* +_FontFromImage::GetFallbackMap(void) +{ + return 0; +} + +bool +_FontFromImage::hasPredefinedColor(void) const +{ + return false; +} + +bool +_FontFromImage::Create(const void* pBuffer, long bufSize, long face) +{ + return false; +} + +bool +_FontFromImage::Create(const char* pFilePath, long face) +{ + return _IsVirtualFontFileName(pFilePath); +} + +bool +_FontFromImage::CreateStatic(const void* pBuffer, long bufSize, long face) +{ + return false; +} + +bool +_FontFromImage::Reload(const void* pBuffer, long bufSize, long face) +{ + return false; +} + +bool +_FontFromImage::Reload(const char* pFilePath, long face) +{ + return _IsVirtualFontFileName(pFilePath); +} + +void +_FontFromImage::Destroy(void) +{ +} + +bool +_FontFromImage::_ClearCache(void) +{ + return true; +} + +bool +_FontFromImage::__FindCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph** pOut) +{ + for (unsigned int i = 0; i < _MAX_FONT_IMAGE_CACHE; i++) + { + if (__fontImageCache[i].character == characterIndex && __fontImageCache[i].size.__fixedPoint == size.__fixedPoint) + { + *pOut = __fontImageCache[i].pGlyph.get(); + + return true; + } + } + + return false; +} + +bool +_FontFromImage::__AddCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph* pGlyph) +{ + if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0) + { + return false; + } + + if (__fontAttrib.xExpansion != 1.0f) + { + return false; + } + + unsigned long addIndex = __timeStamp % _MAX_FONT_IMAGE_CACHE; + + __fontImageCache[addIndex].character = characterIndex; + __fontImageCache[addIndex].size = size; + __fontImageCache[addIndex].pGlyph.reset(pGlyph); + __timeStamp++; + + return true;; +} + + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontFromImage.h b/src/graphics/FGrp_FontFromImage.h new file mode 100644 index 0000000..a197e2d --- /dev/null +++ b/src/graphics/FGrp_FontFromImage.h @@ -0,0 +1,111 @@ +// +// 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 FGrp_FontFromImage.h + * @brief This is the header file for _FontFromImage class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_FROM_IMAGE_H_ +#define _FGRP_INTERNAL_FONT_FROM_IMAGE_H_ + +#include "FGrp_IFont.h" + + +namespace Tizen { namespace Graphics +{ +const unsigned int _MAX_FONT_IMAGE_CACHE = 20; + +struct _FontImageCache +{ + unsigned long character; + _Util::FixedPoint26_6 size; + std::auto_ptr<_IFont::Glyph> pGlyph; +}; + + +class _FontFromImage + : public _IFont +{ +public: + _FontFromImage(); + virtual ~_FontFromImage(void) {} + + //! Changes the attribute using fontAttrib. + virtual bool SetAttrib(const Attrib& fontAttrib); + //! Gets current attribute and store it in fontAttrib. + virtual bool GetAttrib(Attrib& fontAttrib) const; + + //! Gets the value of the interval correctness between two characters. + virtual bool GetKerning(unsigned long ch1, unsigned long ch2, long& xVector, long& yVector) const; + + //! Loads the font glyph data for displaying font. + virtual bool LoadGlyph(unsigned long character, Glyph** pFontGlyphData); + //! Releases the resource of the font glyph data that is not needed any more. + virtual bool UnloadGlyph(Glyph** pFontGlyphData); + //! Check if specified glyph is included. + virtual unsigned long CheckGlyph(unsigned long character); + + virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const; + + //! Gets the support range and the property for this font engine. + virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const; + virtual bool GetFontProperty(Property& property) const; + + //! Harfbuzz test + virtual bool GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT& out, int script); + + //! Gets the font fallback map. + virtual FontMapT* GetFallbackMap(void); + + virtual bool hasPredefinedColor(void) const; + +protected: + //! Initializes a font instance with the font data on the memory buffer. + virtual bool Create(const void* pBuffer, long bufSize, long face); + //! Initializes a font instance with the font file. + virtual bool Create(const char* pFilePath, long face); + //! Initializes a font instance with the font data on the static memory buffer. + virtual bool CreateStatic(const void* pBuffer, long bufSize, long face); + //! Reloads a font instance with the font data on the memory buffer. + virtual bool Reload(const void* pBuffer, long bufSize, long face); + //! Reloads a font instance with the font file + virtual bool Reload(const char* filePath, long face); + //! Destroys the instance. + virtual void Destroy(void); + //! Clean cache + virtual bool _ClearCache(void); + +private: + _FontFromImage(const _FontFromImage& font); + _FontFromImage& operator =(const _FontFromImage& rhs); + + bool __FindCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph** pOut); + bool __AddCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph* pGlyph); + + _IFont::Attrib __fontAttrib; + + //_FontImageCache + _FontImageCache __fontImageCache[_MAX_FONT_IMAGE_CACHE]; + unsigned long __timeStamp; + +}; // _FontFromImage + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_FROM_IMAGE_H_ diff --git a/src/graphics/FGrp_FontFt2.cpp b/src/graphics/FGrp_FontFt2.cpp index 6ca3c5f..12f45ad 100644 --- a/src/graphics/FGrp_FontFt2.cpp +++ b/src/graphics/FGrp_FontFt2.cpp @@ -40,6 +40,8 @@ #include "FGrp_FontFt2.h" #include "FGrp_FontCache.h" #include "FGrp_FontBidiUtil.h" +#include "FGrp_FontPrivate.h" + #include "util/FGrp_UtilTemplate.h" #include "util/FGrp_UtilType.h" @@ -64,28 +66,6 @@ const unsigned long _INDEX_COUNT = 95; // first resource character count const long _MEDIUM_FONT_BOLD_WEIGHT = 600; -bool -_CompareFamilyForTitling(const char* pFamilyName) -{ - static const char* _compNames[] = - { - "TitlingGothicFB Comp", - "TitlingGothicFB Cond", - "TitlingGothicFB Narrow", - "TitlingGothicFB Skyline" - }; - - for (unsigned int i = 0; i < sizeof(_compNames) / sizeof(_compNames[0]); i++) - { - if (strcmp(pFamilyName, _compNames[i]) == 0) - { - return true; - } - } - - return false; -} - #ifdef USE_HASHMAP_FOR_FONT template class _FontHashCodeProvider @@ -178,14 +158,14 @@ _FontFt2::_FontFt2() , __pFontFace(null) , __pFontBuffer(null) , __isStaticBuffer(false) - , __isEmoji(false) + , __hasPredefinedColor(false) { __fontAttrib.size = _SYSTEM_DEFAULT_FONT_SIZE; __fontAttrib.angle = 0.0f; __fontAttrib.style = _IFont::STYLE_NONE; __fontAttrib.quality = _IFont::QUALITY_HIGH; - __fontAttrib.xExpansion = 100; - __fontAttrib.boldWeight = _Util::FixedPoint26_6(1.0f); + __fontAttrib.xExpansion.Reset(_Util::FixedPoint26_6(1.0f)); + __fontAttrib.boldWeight.Reset(_Util::FixedPoint26_6(1.0f)); #ifdef USE_HASHMAP_FOR_FONT __fallbackFontMap.Construct(1, 0, _fontHashCodeProviderEx, _fontComparerEx); @@ -461,6 +441,12 @@ _FontFt2::Destroy(void) } bool +_FontFt2::_ClearCache() +{ + return (__fontCache.get()) ? __fontCache->Cleanup() : false; +} + +bool _FontFt2::FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut) { return (__fontCache.get()) ? __fontCache->Find(glyphIndex, __fontAttrib.size, __fontAttrib.style, pOut) : false; @@ -474,13 +460,12 @@ _FontFt2::AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int sty return false; } - return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false; -} + if (__fontAttrib.xExpansion != 1.0f) + { + return false; + } -bool -_FontFt2::CleanCache() -{ - return (__fontCache.get()) ? __fontCache->Cleanup() : false; + return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false; } bool @@ -493,8 +478,7 @@ _FontFt2::SetAttrib(const Attrib& fontAttrib) if (!(fontAttrib.size >= 1) || !(fontAttrib.quality >= 0 && fontAttrib.quality <= 3) || - !(fontAttrib.xExpansion >= 1) || - !(fontAttrib.size.ToInt() * fontAttrib.xExpansion >= _DEFAULT_RES) || + !(fontAttrib.xExpansion > 0.0f) || !(fontAttrib.boldWeight > 0)) { return false; @@ -669,7 +653,13 @@ _FontFt2::LoadGlyph(unsigned long character, Glyph** ppFontGlyphData) if (isSynthetic) { +#if 1 + FT_Pos strength = FT_MulFix(pFace->units_per_EM, pFace->size->metrics.y_scale) / 64; + + FT_Outline_Embolden(&pFace->glyph->outline, strength); +#else FT_Outline_Embolden(&pFace->glyph->outline, __fontAttrib.boldWeight.__fixedPoint); +#endif } FT_Render_Glyph(pFace->glyph, FT_RENDER_MODE_NORMAL); @@ -720,8 +710,9 @@ _FontFt2::UnloadGlyph(Glyph** ppFontGlyphData) CHECK_NULL_PARAM(ppFontGlyphData); - if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip == 0)) + if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip != 1)) { + // s.woo Need to check condition. return false; } @@ -730,7 +721,7 @@ _FontFt2::UnloadGlyph(Glyph** ppFontGlyphData) *ppFontGlyphData = null; __isLoadGlyph = false; - return false; + return true; } unsigned long @@ -834,21 +825,7 @@ _FontFt2::__InitProperty() FT_Set_Char_Size(FT_Face(__pFontFace), __fontAttrib.size.__fixedPoint * _DEFAULT_RES, __fontAttrib.size.__fixedPoint * _DEFAULT_RES, 1, 1); - static const char* emojiFaceNames[] = - { - "keitaiemoji" - }; - - __isEmoji = false; - - for (unsigned int i = 0; i < sizeof(emojiFaceNames) / sizeof(emojiFaceNames[0]); i++) - { - if (strcmp(__fontProperty.pFamilyName, emojiFaceNames[i]) == 0) - { - __isEmoji = true; - break; - } - } + __hasPredefinedColor = _CompareFamilyForPredefinedColor(__fontProperty.pFamilyName); } else { @@ -859,9 +836,9 @@ _FontFt2::__InitProperty() } bool -_FontFt2::IsEmoji(void) const +_FontFt2::hasPredefinedColor(void) const { - return __isEmoji; + return __hasPredefinedColor; } bool @@ -985,7 +962,13 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti if (isSynthetic) { +#if 1 + FT_Pos strength = FT_MulFix(pFace->units_per_EM, pFace->size->metrics.y_scale) / 64; + + FT_Outline_Embolden(&pFace->glyph->outline, strength); +#else FT_Outline_Embolden(&pFace->glyph->outline, __fontAttrib.boldWeight.__fixedPoint); +#endif } error = FT_Render_Glyph(pFace->glyph, FT_RENDER_MODE_NORMAL); @@ -1048,14 +1031,35 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti pFontGlyphData->xOffset = _Util::FixedPoint22_10(pSlot->bitmap_left); pFontGlyphData->yOffset = _Util::FixedPoint22_10(pSlot->bitmap_top); - AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData); + if (*(reorderedText.pStart + i) > 255) + { + AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData); - pFontGlyphData->hasOwnerShip = 1; + pFontGlyphData->hasOwnerShip = 1; + } } return true; } +float +_FontFt2::GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const +{ + FT_Face pFace = (FT_Face) __pFontFace; + + if (pFace == null) + { + return -1.0f; + } + + int verticalResolution = 1; + + _Util::FixedPoint26_6 fontSize; + fontSize.Reset(pFace->units_per_EM * expectedMaxHeight / (pFace->height * verticalResolution) - (1 / (2 * verticalResolution))); + + return fontSize.ToFloat(); +} + void _FontFt2::__CleanUp() { @@ -1187,7 +1191,7 @@ _FontFt2::__SetTransMatrix(void* pMatrix) if (_IsEqual(0.0f, __fontAttrib.angle)) { // apply font size - pTrans->xx = (FT_Fixed) (0x10000 * (__fontAttrib.xExpansion)) / 100; + pTrans->xx = (FT_Fixed) 0x10000 * __fontAttrib.xExpansion.ToDouble(); pTrans->xy = (FT_Fixed) 0; pTrans->yx = (FT_Fixed) 0; pTrans->yy = (FT_Fixed) 0x10000; @@ -1206,9 +1210,9 @@ _FontFt2::__SetTransMatrix(void* pMatrix) { double radAngle = __fontAttrib.angle * radian; - pTrans->xx = (FT_Fixed) (cos(radAngle) * (__fontAttrib.xExpansion) * 0x10000) / 100; + pTrans->xx = (FT_Fixed) (cos(radAngle) * __fontAttrib.xExpansion.ToDouble() * 0x10000); pTrans->xy = (FT_Fixed) (-sin(radAngle) * 0x10000); - pTrans->yx = (FT_Fixed) (sin(radAngle) * (__fontAttrib.xExpansion) * 0x10000) / 100; + pTrans->yx = (FT_Fixed) (sin(radAngle) * __fontAttrib.xExpansion.ToDouble() * 0x10000); pTrans->yy = (FT_Fixed) (cos(radAngle) * 0x10000); // apply italic style diff --git a/src/graphics/FGrp_FontFt2.h b/src/graphics/FGrp_FontFt2.h index 8f3a72e..00d310f 100644 --- a/src/graphics/FGrp_FontFt2.h +++ b/src/graphics/FGrp_FontFt2.h @@ -17,7 +17,7 @@ /* * @file FGrp_FontFt2.h - * @brief This is the header file for FGrp_FontFt2 class. + * @brief This is the header file for _FontFt2 class. * */ @@ -55,7 +55,9 @@ public: virtual _IFont::FontMapT* GetFallbackMap(void); - virtual bool IsEmoji(void) const; + virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const; + + virtual bool hasPredefinedColor(void) const; protected: virtual bool Create(const void* pBuffer, long bufSize, long face = 0); @@ -64,9 +66,10 @@ protected: virtual bool Reload(const void* pBuffer, long bufSize, long face = 0); virtual bool Reload(const char* filePath, long face = 0); virtual void Destroy(void); - virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut); - virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph); - virtual bool CleanCache(void); + virtual bool _ClearCache(void); + + bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut); + bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph); private: _FontFt2(const _FontFt2& font); @@ -95,7 +98,7 @@ private: void* __pFontFace; void* __pFontBuffer; bool __isStaticBuffer; - bool __isEmoji; + bool __hasPredefinedColor; //_FontCache fontCache; std::auto_ptr<_FontCache> __fontCache; diff --git a/src/graphics/FGrp_FontImpl.cpp b/src/graphics/FGrp_FontImpl.cpp old mode 100755 new mode 100644 index 2944b10..b8787d7 --- a/src/graphics/FGrp_FontImpl.cpp +++ b/src/graphics/FGrp_FontImpl.cpp @@ -48,10 +48,10 @@ using namespace Tizen::Base::Runtime; #define IsSucceeded(X) (!IsFailed(X)) -#if 1 -#define CRITICAL_SECTION _MutexGuard __mutexGuard__ +#ifdef _MUTEX_GUARD_NOT_SUPPORTED + #define CRITICAL_SECTION #else -#define CRITICAL_SECTION + #define CRITICAL_SECTION _MutexGuard __mutexGuard__ #endif @@ -102,31 +102,84 @@ Mutex* _MutexGuard::pMutexInstance = null; struct _FontCoordHolder { - _ResUtil::CoordHolder size; - _ResUtil::CoordHolder charSpace; - _ResUtil::CoordHolder sizeF; - _ResUtil::CoordHolder charSpaceF; + _ResUtil::CoordinateHolder size; + _ResUtil::CoordinateHolder charSpace; _FontCoordHolder() + : __pcBaseScale(1.0f) + , __vcBaseScale(1.0f) { - Reset(-1); - Reset(-1.0f); + _CoordinateSystem* pCoordinateSystem = _CoordinateSystem::GetInstance(); + + if (pCoordinateSystem) + { + __pcBaseScale = pCoordinateSystem->GetTargetBaseScaleFactor(); + __vcBaseScale = pCoordinateSystem->GetAppBaseScaleFactor(); + } + + ResetFromVc(-1); } - void Reset(int _size) + void ResetFromVc(int intVcSize) { - size = _size; - charSpace = 0; - sizeF = static_cast(_size); - charSpaceF = 0.0f; + this->ResetFromVc(static_cast(intVcSize)); + size.vcInt = intVcSize; + size.vcFloatActual = static_cast(intVcSize); } - void Reset(float _size) + void ResetFromVc(float floatVcSize) { - size = static_cast(_size); - charSpace = 0; - sizeF = _size; - charSpaceF = 0.0f; + size.vcInt = _FloatToIntForSize(floatVcSize); + size.pcInt = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcSize))); + size.vcFloat = floatVcSize; + size.vcFloatActual = size.vcFloat; + + SetCharSpaceFromVc(0.0f); + } + + void ResetFromPc(int intPcSize) + { + this->ResetFromPc(static_cast(intPcSize)); + size.pcInt = intPcSize; + } + + void ResetFromPc(float floatPcSize) + { + size.vcInt = _FloatToIntForSize(static_cast(__ConvertToVirCoord(floatPcSize))); + size.pcInt = _FloatToIntForSize(floatPcSize); + size.vcFloat = static_cast(__ConvertToVirCoord(floatPcSize)); + size.vcFloatActual = static_cast(__ConvertToVirCoord(static_cast(size.pcInt))); + + SetCharSpaceFromVc(0.0f); + } + + void SetCharSpaceFromVc(int intVcSize) + { + this->SetCharSpaceFromVc(static_cast(intVcSize)); + charSpace.vcInt = intVcSize; + charSpace.vcFloatActual = static_cast(intVcSize); + } + + void SetCharSpaceFromVc(float floatVcSize) + { + charSpace.vcInt = _FloatToIntForPos(floatVcSize); + charSpace.pcInt = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(floatVcSize))); + charSpace.vcFloat = floatVcSize; + charSpace.vcFloatActual = floatVcSize; + } + +private: + double __pcBaseScale; + double __vcBaseScale; + + inline double __ConvertToPhyCoord(double val) + { + return val * __pcBaseScale / __vcBaseScale; + } + + inline double __ConvertToVirCoord(double val) + { + return val * __vcBaseScale / __pcBaseScale; } }; @@ -205,7 +258,7 @@ _FontImpl::Construct(int style, int vcSize) result r = _pNativeFont->Construct(style, pcSize); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -227,7 +280,7 @@ _FontImpl::Construct(const Tizen::Base::String& fontName, int style, int vcSize, result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -249,7 +302,7 @@ _FontImpl::Construct(const Tizen::Base::ByteBuffer& fontData, int style, int vcS result r = _pNativeFont->Construct(fontData, style, pcSize); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -271,7 +324,7 @@ _FontImpl::Construct(int style, float vcSize) result r = _pNativeFont->Construct(style, pcSize); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -293,7 +346,7 @@ _FontImpl::Construct(const Tizen::Base::String& fontName, int style, float vcSiz result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -315,7 +368,7 @@ _FontImpl::Construct(const Tizen::Base::ByteBuffer& fontData, int style, float v result r = _pNativeFont->Construct(fontData, style, pcSize); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); return E_SUCCESS; } @@ -632,7 +685,7 @@ _FontImpl::GetSize(void) const CRITICAL_SECTION; IF_NOT_CONSTRUCTED(return -1); - return _pCoordHolder->size.required; + return _FloatToIntForSize(_pCoordHolder->size.vcFloatActual); } float @@ -641,7 +694,17 @@ _FontImpl::GetSizeF(void) const CRITICAL_SECTION; IF_NOT_CONSTRUCTED(return -1.0f); - return _pCoordHolder->sizeF.required; + return _pCoordHolder->size.vcFloatActual; +} + +result +_FontImpl::SetXExpansion(float xExpansion) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + SysTryReturnResult(NID_GRP, xExpansion > 0.0f, E_INVALID_ARG, "Expansion value should be greater than 0"); + + return _pNativeFont->SetXExpansion(_Util::FixedPoint26_6(xExpansion)); } void @@ -673,12 +736,9 @@ _FontImpl::SetCharSpace(int vcSpace) IF_NOT_CONSTRUCTED(return); // save it - _pCoordHolder->charSpace = vcSpace; + _pCoordHolder->SetCharSpaceFromVc(vcSpace); - // convert VC -> PC - int pcSpace = _ResUtil::ConvertToPhyCoordWidth(vcSpace); - - _pNativeFont->SetCharSpace(pcSpace); + _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt); return; } @@ -690,12 +750,9 @@ _FontImpl::SetCharSpace(float vcSpace) IF_NOT_CONSTRUCTED(return); // save it - _pCoordHolder->charSpaceF = vcSpace; - - // convert VC -> PC - float pcSpace = _ResUtil::ConvertToPhyCoordWidth(vcSpace); + _pCoordHolder->SetCharSpaceFromVc(vcSpace); - _pNativeFont->SetCharSpace(_FloatToIntForPos(pcSpace)); + _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt); return; } @@ -706,7 +763,7 @@ _FontImpl::GetCharSpace(void) const CRITICAL_SECTION; IF_NOT_CONSTRUCTED(return 0); - return _pCoordHolder->charSpace.required; + return _pCoordHolder->charSpace.vcInt; } float @@ -715,7 +772,7 @@ _FontImpl::GetCharSpaceF(void) const CRITICAL_SECTION; IF_NOT_CONSTRUCTED(return 0.0f); - return _pCoordHolder->charSpaceF.required; + return _pCoordHolder->charSpace.vcFloatActual; } Tizen::Base::String @@ -749,7 +806,7 @@ _FontImpl::CloneN(void) std::auto_ptr<_FontImpl> pFontImpl(new (std::nothrow) _FontImpl(*this)); - SysTryReturn(NID_GRP, pFontImpl.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory"); + SysTryReturn(NID_GRP, pFontImpl.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); SysTryReturn(NID_GRP, pFontImpl->_pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] FontEx::CloneN() has been failed"); return pFontImpl.release(); @@ -766,7 +823,63 @@ _FontImpl::CloneN(const Font& font) // make sure if the copy construction is well done std::auto_ptr pFont(new (std::nothrow) Font(font)); - SysTryReturn(NID_GRP, pFont.get() && pFont->__pImpl && pFont->__pImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory"); + SysTryReturn(NID_GRP, pFont.get() && pFont->__pImpl && pFont->__pImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pFont.release(); +} + +Font* +_FontImpl::CreateFontN(int style, float expectedMaxHeight) +{ + CRITICAL_SECTION; + SysTryReturn(NID_GRP, expectedMaxHeight > 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified max-height MUST be greater than 0.0f."); + + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(expectedMaxHeight)); + + std::auto_ptr pFont(new (std::nothrow) Font()); + SysTryReturn(NID_GRP, pFont.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont); + SysTryReturn(NID_GRP, pFontImpl, null, E_SYSTEM, "[E_SYSTEM] Getting native font instance failed."); + + result r = pFontImpl->_pNativeFont->Construct(style, _Util::FixedPoint26_6(expectedMaxHeight)); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] _Font construct is failed.", GetErrorMessage(r)); + + _Util::CarveMagicKey(*pFontImpl, pFontImpl->_magicKey); + SysTryReturn(NID_GRP, pFontImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + float fontPcSize = pFontImpl->_pNativeFont->GetFontSizeFromMaxHeight(pcSize); + + pFontImpl->_pCoordHolder->ResetFromPc(fontPcSize); + pFontImpl->SetSize(pFontImpl->_pCoordHolder->size.vcFloat); + + return pFont.release(); +} + +Font* +_FontImpl::CreateFontN(const Tizen::Base::String& fontName, int style, float expectedMaxHeight) +{ + CRITICAL_SECTION; + SysTryReturn(NID_GRP, expectedMaxHeight > 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified max-height MUST be greater than 0.0f."); + + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(expectedMaxHeight)); + + std::auto_ptr pFont(new (std::nothrow) Font()); + SysTryReturn(NID_GRP, pFont.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont); + SysTryReturn(NID_GRP, pFontImpl, null, E_SYSTEM, "[E_SYSTEM] Getting native font instance failed."); + + result r = pFontImpl->_pNativeFont->Construct(fontName, style, _Util::FixedPoint26_6(expectedMaxHeight)); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] _Font construct is failed.", GetErrorMessage(r)); + + _Util::CarveMagicKey(*pFontImpl, pFontImpl->_magicKey); + SysTryReturn(NID_GRP, pFontImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + float fontPcSize = pFontImpl->_pNativeFont->GetFontSizeFromMaxHeight(pcSize); + + pFontImpl->_pCoordHolder->ResetFromPc(fontPcSize); + pFontImpl->SetSize(pFontImpl->_pCoordHolder->size.vcFloat); return pFont.release(); } @@ -878,7 +991,7 @@ _FontImpl::SetSize(int vcSize) IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); SysTryReturnResult(NID_GRP, vcSize > 0, E_INVALID_ARG, "Font size should be greater than 0"); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); // convert VC -> PC _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); @@ -887,8 +1000,10 @@ _FontImpl::SetSize(int vcSize) { pcSize = _Util::FixedPoint26_6(1); - _pCoordHolder->size.phyCoord = 1; - _pCoordHolder->size.virCoord = vcSize; + _pCoordHolder->ResetFromPc(1); + _pCoordHolder->size.vcInt = vcSize; + _pCoordHolder->size.vcFloat = static_cast(vcSize); + _pCoordHolder->size.vcFloatActual = _pCoordHolder->size.vcFloat; } result r = _pNativeFont->SetSize(pcSize); @@ -904,7 +1019,7 @@ _FontImpl::SetSize(float vcSize) IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); SysTryReturnResult(NID_GRP, vcSize > 0.0f, E_INVALID_ARG, "Font size should be greater than 0"); - _pCoordHolder->Reset(vcSize); + _pCoordHolder->ResetFromVc(vcSize); // convert VC -> PC _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); @@ -913,8 +1028,10 @@ _FontImpl::SetSize(float vcSize) { pcSize = _Util::FixedPoint26_6(1.0f); - _pCoordHolder->sizeF.phyCoord = 1.0f; - _pCoordHolder->sizeF.virCoord = vcSize; + _pCoordHolder->ResetFromPc(1.0f); + _pCoordHolder->size.vcInt = static_cast(vcSize); + _pCoordHolder->size.vcFloat = vcSize; + _pCoordHolder->size.vcFloatActual = _pCoordHolder->size.vcFloat; } result r = _pNativeFont->SetSize(pcSize); diff --git a/src/graphics/FGrp_FontPrivate.cpp b/src/graphics/FGrp_FontPrivate.cpp new file mode 100644 index 0000000..6da4003 --- /dev/null +++ b/src/graphics/FGrp_FontPrivate.cpp @@ -0,0 +1,132 @@ +// +// 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 FGrp_FontPrivate.cpp + * @brief This is the implementation file for the private part of _Font class. + * + */ + +#include "FGrp_FontPrivate.h" + + +namespace Tizen { namespace Graphics +{ + +namespace +{ + +static const char* _familyForTitling[] = +{ + 0 // NULL +}; + +static const char* _familyForPredefinedColor[] = +{ + 0 // NULL +}; + +inline unsigned long +_GetPredefinedColorPrivate(unsigned long unicode, unsigned long defaultColor) +{ + return defaultColor; +} + +inline bool +_CompareFamily(const char** ppTableBegin, const char** ppTableEnd, const char* pFamilyName) +{ + while (*ppTableBegin && ppTableBegin < ppTableEnd) + { + if (strcmp(pFamilyName, *ppTableBegin) == 0) + { + return true; + } + + ++ppTableBegin; + } + + return false; +} + +} + + +bool +_CompareFamilyForTitling(const char* pFamilyName) +{ + const char** pBegin = &_familyForTitling[0]; + const char** pEnd = pBegin + sizeof(_familyForTitling) / sizeof(_familyForTitling[0]); + + return _CompareFamily(pBegin, pEnd, pFamilyName); +} + +bool +_CompareFamilyForPredefinedColor(const char* pFamilyName) +{ + const char** pBegin = &_familyForPredefinedColor[0]; + const char** pEnd = pBegin + sizeof(_familyForPredefinedColor) / sizeof(_familyForPredefinedColor[0]); + + return _CompareFamily(pBegin, pEnd, pFamilyName); +} + +unsigned long +_GetPredefinedColor(unsigned long unicode, unsigned long defaultColor) +{ + return _GetPredefinedColorPrivate(unicode, defaultColor); +} + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +bool +_HasEmoticonImage(unsigned long character) +{ + return false; +} + +const wchar_t* +_GetVirtualFileNameForEmoticon(void) +{ + return L""; +} + +bool +_IsVirtualFontFileName(const char* pFileName) +{ + return false; +} + +bool +_IsVirtualFontFileName(const wchar_t* pFileName) +{ + return false; +} + +bool _GetImageGlyph(unsigned long character, float size, _IFont::Glyph** ppFontGlyphData) +{ + return false; +} + +bool _GetImageGlyphSizeProperty(float size, _IFont::SizeProperty& sizeProperty) +{ + return false; +} + +}} // Tizen::Graphics \ No newline at end of file diff --git a/src/graphics/FGrp_FontPrivate.h b/src/graphics/FGrp_FontPrivate.h new file mode 100644 index 0000000..947b121 --- /dev/null +++ b/src/graphics/FGrp_FontPrivate.h @@ -0,0 +1,59 @@ +// +// 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 FGrp_FontPrivate.h + * @brief This is the header file for the private part of _Font class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_PRIVATE_H_ +#define _FGRP_INTERNAL_FONT_PRIVATE_H_ + +#include "FGrp_IFont.h" + + +namespace Tizen { namespace Graphics +{ + +bool _CompareFamilyForTitling(const char* pFamilyName); +bool _CompareFamilyForPredefinedColor(const char* pFamilyName); +unsigned long _GetPredefinedColor(unsigned long unicode, unsigned long defaultColor); + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +bool _HasEmoticonImage(unsigned long character); +const wchar_t* _GetVirtualFileNameForEmoticon(void); +bool _IsVirtualFontFileName(const char* pFileName); +bool _IsVirtualFontFileName(const wchar_t* pFileName); + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +bool _GetImageGlyph(unsigned long character, float size, _IFont::Glyph** ppFontGlyphData); +bool _GetImageGlyphSizeProperty(float size, _IFont::SizeProperty& pSizeProperty); + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_PRIVATE_H_ diff --git a/src/graphics/FGrp_FontRsrcManager.cpp b/src/graphics/FGrp_FontRsrcManager.cpp index 6a0ea05..fddf424 100644 --- a/src/graphics/FGrp_FontRsrcManager.cpp +++ b/src/graphics/FGrp_FontRsrcManager.cpp @@ -43,6 +43,8 @@ #include "FGrp_FontRsrcManager.h" #include "FGrp_FontMemoryManager.h" #include "FGrp_FontFt2.h" +#include "FGrp_FontFromImage.h" +#include "FGrp_FontPrivate.h" #define USE_REMOVE_ALL_CACHE #define USE_MMAP @@ -68,11 +70,13 @@ namespace // unnamed { const int _DEFAULT_FONT_ENGINE = 0; +const int _FONT_ENGINE_IMAGE = 1; 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; +const unsigned int _BLACK_LIST_MAX_COUNT = 1000; +const unsigned int _SPACE_LIST_MAX_COUNT = 1000; class _FontNull : public Tizen::Graphics::_IFont @@ -128,7 +132,12 @@ public: return null; } - virtual bool IsEmoji(void) const + virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const + { + return 0.0f; + } + + virtual bool hasPredefinedColor(void) const { return false; } @@ -161,17 +170,7 @@ protected: virtual void Destroy(void) {} - virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut) - { - return false; - } - - virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph) - { - return false; - } - - virtual bool CleanCache(void) + virtual bool _ClearCache(void) { return false; } @@ -293,8 +292,14 @@ _FontRsrcManager::_FontRsrcManager() static _FontComparerEx<_Util::WString> fontComparerEx; __fontRsrcMap.Construct(0, 0, fontHashCodeProviderEx, fontComparerEx); __appFontMap.Construct(0, 0, fontHashCodeProviderEx, fontComparerEx); +#else + __fontRsrcMap.clear(); + __appFontMap.clear(); #endif + __blackListUnicodeSet.clear(); + __spaceListUnicodeSet.clear(); + __defaultSystemFontPath.Clear(); __defaultSystemBoldFontPath.Clear(); __pDefaultSystemFont = null; @@ -322,6 +327,9 @@ _FontRsrcManager::~_FontRsrcManager() __appFontMap.clear(); #endif + __blackListUnicodeSet.clear(); + __spaceListUnicodeSet.clear(); + delete __pDefaultSystemFont; delete __pFontMemoryManager; @@ -413,11 +421,10 @@ _FontRsrcManager::GetFont(const Tizen::Base::String& fontPath, int style, _Util: // create font rtn = __CreateFont(_DEFAULT_FONT_ENGINE, buffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont); #endif - std::auto_ptr<_IFont> autoPtrFont(pFont); - SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); // make shared resource - sharedFont.reset(autoPtrFont.release()); + sharedFont.reset(pFont); _IFont::Attrib fontAttrib; rtn = pFont->GetAttrib(fontAttrib); @@ -464,22 +471,25 @@ _FontRsrcManager::GetTempFont(const Tizen::Base::String& fontPath, int style, _U bool rtn = false; //unsigned char* pBuffer = null; - //-------------------------------------------------------------------------- - // validation check of input param - // - // in case input fontPath is indicating folder, - // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did. - //-------------------------------------------------------------------------- + if (!_IsVirtualFontFileName(fontPath.GetPointer())) { - FileAttributes attr; - result r = File::GetAttributes(fontPath, attr); - if (IsFailed(r)) - { - return E_FILE_NOT_FOUND; - } - else if (attr.IsDirectory()) + //-------------------------------------------------------------------------- + // validation check of input param + // + // in case input fontPath is indicating folder, + // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did. + //-------------------------------------------------------------------------- { - return E_UNSUPPORTED_FORMAT; + FileAttributes attr; + result r = File::GetAttributes(fontPath, attr); + if (IsFailed(r)) + { + return E_FILE_NOT_FOUND; + } + else if (attr.IsDirectory()) + { + return E_UNSUPPORTED_FORMAT; + } } } @@ -512,12 +522,10 @@ _FontRsrcManager::GetTempFont(const Tizen::Base::String& fontPath, int style, _U std::auto_ptr pathString(pBuffer); rtn = __CreateFont(_DEFAULT_FONT_ENGINE, (char*)pathString->GetPointer(), _DEFAULT_FONT_FACE, &pFont); - - std::auto_ptr<_IFont> autoPtrFont(pFont); - SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); // make shared resource - sharedFont.reset(autoPtrFont.release()); + sharedFont.reset(pFont); _IFont::Attrib fontAttrib; rtn = pFont->GetAttrib(fontAttrib); @@ -582,6 +590,31 @@ _FontRsrcManager::ClearBlackList() __blackListUnicodeSet.clear(); } +void +_FontRsrcManager::AddSpaceList(const wchar_t unicode) +{ + if (__spaceListUnicodeSet.size() > _SPACE_LIST_MAX_COUNT) + { + this->ClearSpaceList(); + } + + __spaceListUnicodeSet.insert(unicode); +} + +bool +_FontRsrcManager::SearchSpaceList(const wchar_t unicode) const +{ + SpaceListSetT::const_iterator spaceListIterator = __spaceListUnicodeSet.find(unicode); + + return (spaceListIterator != __spaceListUnicodeSet.end()); +} + +void +_FontRsrcManager::ClearSpaceList() +{ + __spaceListUnicodeSet.clear(); +} + result _FontRsrcManager::GetFont(const byte* pFontData, int fontDataSize, int style, _Util::FixedPoint26_6 size, SharedFontResource& out) { @@ -594,11 +627,10 @@ _FontRsrcManager::GetFont(const byte* pFontData, int fontDataSize, int style, _U // create new font with user resource. //-------------------------------------------------------------------------- bool rtn = __CreateFont(_DEFAULT_FONT_ENGINE, pFontData, fontDataSize, _DEFAULT_FONT_FACE, &pFont); - std::auto_ptr<_IFont> autoPtrFont(pFont); - SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont"); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont"); // make shared resource - sharedFont.reset(autoPtrFont.release()); + sharedFont.reset(pFont); _IFont::Attrib fontAttrib; rtn = pFont->GetAttrib(fontAttrib); @@ -712,11 +744,10 @@ _FontRsrcManager::GetFont(int style, _Util::FixedPoint26_6 size, SharedFontResou rtn = __CreateFont(_DEFAULT_FONT_ENGINE, autoPtrBuffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont); #endif - std::auto_ptr<_IFont> autoPtrFont(pFont); - SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); // make shared resource - sharedFont.reset(autoPtrFont.release()); + sharedFont.reset(pFont); _IFont::Attrib fontAttrib; rtn = pFont->GetAttrib(fontAttrib); @@ -841,7 +872,7 @@ _FontRsrcManager::__CreateFont(int fontEngine, const void* pBuffer, long bufSize switch (fontEngine) { - case 0: + case _DEFAULT_FONT_ENGINE: autoPtrFont.reset(new (std::nothrow) _FontFt2); break; @@ -850,7 +881,7 @@ _FontRsrcManager::__CreateFont(int fontEngine, const void* pBuffer, long bufSize break; } - SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory"); + SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); bool rtn = autoPtrFont->Create(pBuffer, bufSize, face); SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource"); @@ -867,20 +898,27 @@ _FontRsrcManager::__CreateFont(int fontEngine, const char* filePath, const long // check input param SysTryReturn(NID_GRP, ppOut, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid out param is given"); + if (_IsVirtualFontFileName(filePath)) + { + fontEngine = _FONT_ENGINE_IMAGE; + } + std::auto_ptr<_IFont> autoPtrFont; switch (fontEngine) { - case 0: + case _DEFAULT_FONT_ENGINE: autoPtrFont.reset(new (std::nothrow) _FontFt2); break; - + case _FONT_ENGINE_IMAGE: + autoPtrFont.reset(new (std::nothrow) _FontFromImage); + break; default: autoPtrFont.reset(new (std::nothrow) _FontNull); break; } - SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory"); + SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); bool rtn = autoPtrFont->Create(filePath, face); SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource"); @@ -910,7 +948,7 @@ _FontRsrcManager::__CreateStaticFont(int fontEngine, const void* pBuffer, long b break; } - SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory"); + SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); bool rtn = autoPtrFont->CreateStatic(pBuffer, bufSize, face); SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource"); @@ -1105,7 +1143,7 @@ _FontRsrcManager::__ReloadFont(String fontName, bool isBold) SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to reload font"); #endif - pFont->CleanCache(); + pFont->_ClearCache(); this->ClearBlackList(); } @@ -1283,7 +1321,7 @@ _FontRsrcManager::RemoveMemory(unsigned long requestedSize) SharedFontResource fontRsrc; r = enumerator->GetValue(fontRsrc); - fontRsrc.get()->CleanCache(); + fontRsrc->_ClearCache(); } return true; @@ -1292,7 +1330,7 @@ _FontRsrcManager::RemoveMemory(unsigned long requestedSize) { SharedFontResource fontRsrc(fontIterator->second); - fontRsrc.get()->CleanCache(); + fontRsrc->_ClearCache(); } return true; @@ -1323,9 +1361,9 @@ _FontRsrcManager::RemoveMemory(unsigned long requestedSize) SharedFontResource fontRsrc; r = enumerator->GetValue(fontRsrc); - while (!fontRsrc.get()->second->IsEmpty()) + while (!fontRsrc->second->IsEmpty()) { - fontRsrc.get()->second->RemoveFirst(); + fontRsrc->second->RemoveFirst(); remainedMemory = __pFontMemoryManager->GetRemainedMemory(); @@ -1356,6 +1394,11 @@ _FontRsrcManager::FindAppFontName(const _Util::WString& fontName) //dirName = L"/usr/share/app_font"; dirName = Tizen::App::App::GetInstance()->GetAppResourcePath() + L"font"; + if (File::IsFileExist(dirName) == false) + { + return fontPath; + } + // Open the directory if (IsFailed(dir.Construct(dirName))) { diff --git a/src/graphics/FGrp_FontRsrcManager.h b/src/graphics/FGrp_FontRsrcManager.h index c5f585f..3185ea3 100644 --- a/src/graphics/FGrp_FontRsrcManager.h +++ b/src/graphics/FGrp_FontRsrcManager.h @@ -55,6 +55,7 @@ class _FontRsrcManager public: typedef std::tr1::shared_ptr<_IFont> SharedFontResource; typedef std::set BlackListSetT; + typedef std::set SpaceListSetT; #ifdef USE_HASHMAP_FOR_FONT typedef Tizen::Base::Collection::HashMapT <_Util::WString, SharedFontResource> FontMapT; typedef Tizen::Base::Collection::HashMapT <_Util::WString, _Util::WString> AppFontMapT; @@ -79,6 +80,10 @@ public: bool SearchBlackList(const wchar_t) const; void ClearBlackList(void); + void AddSpaceList(const wchar_t); + bool SearchSpaceList(const wchar_t) const; + void ClearSpaceList(void); + bool ReloadDefaultSystemFont(void); _FontMemoryManager& GetMemoryManager(void); _Font& GetDefaultSystemFont(void); @@ -111,6 +116,7 @@ private: FontMapT __fontRsrcMap; AppFontMapT __appFontMap; BlackListSetT __blackListUnicodeSet; + SpaceListSetT __spaceListUnicodeSet; Tizen::Base::String __defaultSystemFontPath; Tizen::Base::String __defaultSystemBoldFontPath; @@ -125,3 +131,4 @@ private: }} // Tizen::Graphics #endif // _FGRP_INTERNAL_FONT_RSRC_MANAGER_H_ + diff --git a/src/graphics/FGrp_IFont.h b/src/graphics/FGrp_IFont.h index fbbb965..8c89156 100644 --- a/src/graphics/FGrp_IFont.h +++ b/src/graphics/FGrp_IFont.h @@ -91,7 +91,7 @@ public: unsigned int style; //!< Style of the font. (_IFont::Style) int quality; //!< Quality of the font. (_IFont::Quality) float angle; //!< Angle of the font. - long xExpansion; //!< Expansion of the font. + _Util::FixedPoint26_6 xExpansion; //!< Expansion of the font. _Util::FixedPoint26_6 boldWeight; //!< Bold weight of the font }; @@ -162,6 +162,8 @@ public: //! Check if specified glyph is included. virtual unsigned long CheckGlyph(unsigned long character) = 0; + virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const = 0; + //! Gets the support range and the property for this font engine. virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const = 0; virtual bool GetFontProperty(Property& property) const = 0; @@ -172,7 +174,7 @@ public: //! Gets the font fallback map. virtual FontMapT* GetFallbackMap(void) = 0; - virtual bool IsEmoji(void) const = 0; + virtual bool hasPredefinedColor(void) const = 0; protected: //! Initializes a font instance with the font data on the memory buffer. @@ -187,12 +189,8 @@ protected: virtual bool Reload(const char* filePath, long face = 0) = 0; //! Destroys the instance. virtual void Destroy(void) = 0; - //! Finds glyph in the cache - virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut) = 0; - //! Adds glyph in the cache - virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph) = 0; //! Clean cache - virtual bool CleanCache(void) = 0; + virtual bool _ClearCache(void) = 0; private: friend class _FontRsrcManager; diff --git a/src/graphics/FGrp_NonScale.cpp b/src/graphics/FGrp_NonScale.cpp index 95f84f2..fa6af49 100644 --- a/src/graphics/FGrp_NonScale.cpp +++ b/src/graphics/FGrp_NonScale.cpp @@ -17,7 +17,7 @@ /* * @file FGrp_NonScale.cpp - * @brief This is the header file for internal util class. + * @brief This is the implementation file for internal util class. * */ diff --git a/src/graphics/FGrp_ResUtil.h b/src/graphics/FGrp_ResUtil.h index 6c17f00..f8bef1d 100644 --- a/src/graphics/FGrp_ResUtil.h +++ b/src/graphics/FGrp_ResUtil.h @@ -1442,21 +1442,6 @@ ConvertToPhyCoordPointList(Tizen::Base::Collection::ArrayList& dest, const Tizen //////////////////////////////////////////////////////////////////////////////// -template -struct CoordHolder -{ - T required; - T phyCoord; - T virCoord; - - void operator =(const T& in) - { - required = in; - phyCoord = ConvertToPhyCoord(required); - virCoord = ConvertToVirCoord(phyCoord); - } -}; - template struct CoordinateHolder { diff --git a/src/graphics/FGrp_Screen.cpp b/src/graphics/FGrp_Screen.cpp index 25106ff..0fb13a8 100644 --- a/src/graphics/FGrp_Screen.cpp +++ b/src/graphics/FGrp_Screen.cpp @@ -17,7 +17,7 @@ /* * @file FGrp_Screen.cpp - * @brief This is the header file for internal _Screen namespace. + * @brief This is the implementation file for internal _Screen namespace. * */ diff --git a/src/graphics/FGrp_TextElementImpl.cpp b/src/graphics/FGrp_TextElementImpl.cpp index e1dee5a..5cf4d60 100644 --- a/src/graphics/FGrp_TextElementImpl.cpp +++ b/src/graphics/FGrp_TextElementImpl.cpp @@ -457,7 +457,7 @@ result _TextElementImpl::SetText(const Tizen::Base::String& text) { SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet"); + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); result r = E_SUCCESS; @@ -589,7 +589,7 @@ _TextElementImpl::SetFont(const Tizen::Graphics::Font& font) { SysTryReturn(NID_GRP, _Util::CheckValidity(&font), E_INVALID_ARG, E_INVALID_ARG , "[E_INVALID_ARG] The infomation of the given font is invalid."); - SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet"); + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); result r = E_SUCCESS; TextSimple* pTextElement = null; @@ -630,7 +630,7 @@ _TextElementImpl::SetFont(const Tizen::Graphics::Font& font) result _TextElementImpl::SetTextColor(const Tizen::Graphics::Color& color) { - SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet"); + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); __foregroundColor = color; @@ -657,7 +657,7 @@ _TextElementImpl::SetTextColor(const Tizen::Graphics::Color& color) result _TextElementImpl::SetBackgroundColor(const Tizen::Graphics::Color& color) { - SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet"); + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); __backgroundColor = color; __bgColorEnable = true; @@ -686,7 +686,7 @@ _TextElementImpl::SetBackgroundColor(const Tizen::Graphics::Color& color) result _TextElementImpl::SetOutlineColor(const Tizen::Graphics::Color& color) { - SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet"); + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); __outlineColor = color; __outlineColorEnable = true; diff --git a/src/graphics/effect/FGrp_EffectFlip.cpp b/src/graphics/effect/FGrp_EffectFlip.cpp index 4151ce8..0a64fc4 100644 --- a/src/graphics/effect/FGrp_EffectFlip.cpp +++ b/src/graphics/effect/FGrp_EffectFlip.cpp @@ -39,7 +39,7 @@ CreateFlippedImage(int width, int height, int pitch, Pixel* pSour, _Effect::Flip { std::auto_ptr <_Util::Pixmap> dstImage(new (std::nothrow) _Util::Pixmap(width, height, sizeof(Pixel) * 8)); - SysTryReturn(NID_GRP, dstImage.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, dstImage.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Pixel* pDest = (Pixel*) dstImage->pBitmap; diff --git a/src/graphics/effect/FGrp_EffectRotate.cpp b/src/graphics/effect/FGrp_EffectRotate.cpp index 0cd25ae..597dfaa 100644 --- a/src/graphics/effect/FGrp_EffectRotate.cpp +++ b/src/graphics/effect/FGrp_EffectRotate.cpp @@ -635,7 +635,7 @@ _RotateImage(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcIm std::unique_ptr tempLeftVertices(new (std::nothrow) long[numVerticalPixel]); std::unique_ptr tempRightVertices(new (std::nothrow) long[numVerticalPixel]); - SysTryReturn(NID_GRP, tempLeftVertices && tempRightVertices, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, tempLeftVertices && tempRightVertices, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); // left <- max value of 'x', right <- min value of 'x' memset(tempRightVertices.get(), 0x80, numVerticalPixel * sizeof(long)); diff --git a/src/graphics/effect/FGrp_EffectScale.cpp b/src/graphics/effect/FGrp_EffectScale.cpp index 790c183..70a275b 100644 --- a/src/graphics/effect/FGrp_EffectScale.cpp +++ b/src/graphics/effect/FGrp_EffectScale.cpp @@ -94,7 +94,7 @@ _ScaleImageUnclipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImage, _Util::GenericBuffer srcBuffer(new (std::nothrow) _GenericBufferPixmap (*pSrcImage, null)); _Util::GenericBuffer dstBuffer(new (std::nothrow) _GenericBufferPixmap (*pRetImage, null)); - SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FIXED16x16 xSour = 0; FIXED16x16 ySour = 0; @@ -150,7 +150,7 @@ _ScaleImageCopyClipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImag _Util::GenericBuffer srcBuffer(new (std::nothrow) _GenericBufferPixmap (*pSrcImage, null)); _Util::GenericBuffer dstBuffer(new (std::nothrow) _GenericBufferPixmap (*pRetImage, null)); - SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FIXED16x16 xSour = 0; FIXED16x16 ySour = 0; @@ -245,7 +245,7 @@ _ScaleImageClipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImage, c _Util::GenericBuffer srcBuffer(new (std::nothrow) _GenericBufferPixmap (*pSrcImage, null)); _Util::GenericBuffer dstBuffer(new (std::nothrow) _GenericBufferPixmap (*pRetImage, null)); - SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FIXED16x16 xSour = 0; FIXED16x16 ySour = 0; diff --git a/src/graphics/inc/FGrp_BitmapImpl.h b/src/graphics/inc/FGrp_BitmapImpl.h old mode 100755 new mode 100644 index 585e9c3..401b0a0 --- a/src/graphics/inc/FGrp_BitmapImpl.h +++ b/src/graphics/inc/FGrp_BitmapImpl.h @@ -117,6 +117,8 @@ public: result LockFast(BufferInfo& info, long timeout = INFINITE); result UnlockFast(void); + void SetNinePatchedTagByForce(bool isNinePatched); + static bool CheckNinePatchedBitmapStrictly(const Bitmap& bitmap); /** @@ -134,7 +136,7 @@ public: * @param[in] height The height of the returned bitmap. * @exception E_SUCCESS The method was successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_OUT_OF_MEMORY Memory allocation failed. * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. * @exception E_SYSTEM An unknown operating system error has occurred. * @@ -158,7 +160,7 @@ public: * @param[in] newColor The color replacing. * @exception E_SUCCESS The method was successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OUT_OF_MEMORY Memory allocation failed. * @exception E_SYSTEM An unknown operating system error has occurred. * * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -178,7 +180,7 @@ public: * @param[in] bitmap The source bitmap * @exception E_SUCCESS The method was successful. * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OUT_OF_MEMORY Memory allocation failed. * @exception E_SYSTEM An unknown operating system error has occurred. * * @remarks The specific error code can be accessed using the GetLastResult() method. @@ -204,7 +206,7 @@ public: * @exception E_SUCCESS The method was successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. - * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_OUT_OF_MEMORY Memory allocation failed. * * @remarks The specific error code can be accessed using the GetLastResult() method. */ @@ -226,7 +228,8 @@ public: protected: bool _SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam, void (* LockCallback)(void*), void* pLockCallbackParam, - void (* UnlockCallback)(void*), void* pUnlockCallbackParam); + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam); static _BitmapImpl*& _GetBitmapImpl(Bitmap* pBitmap); private: @@ -257,6 +260,8 @@ protected: void* pLockCallbackParam; void (* pUnlockCallbackFunc)(void*); void* pUnlockCallbackParam; + void (* pPostlockCallbackFunc)(BufferInfo&, void*); + void* pPostlockCallbackParam; struct { diff --git a/src/graphics/inc/FGrp_BitmapTool.h b/src/graphics/inc/FGrp_BitmapTool.h index 4de370e..10663b4 100644 --- a/src/graphics/inc/FGrp_BitmapTool.h +++ b/src/graphics/inc/FGrp_BitmapTool.h @@ -26,6 +26,7 @@ #include #include +#include namespace Tizen { namespace Graphics @@ -43,7 +44,8 @@ bool SetCallback(Tizen::Graphics::Bitmap& bitmap, void (* DestroyCallback)(void*), void* pCallbackParam, void (* LockCallback)(void*), void* pLockParam, - void (* UnlockCallback)(void*), void* pUnlockParam); + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*) = 0, void* pPostlockParam = 0); void ResetCallback(Tizen::Graphics::Bitmap& bitmap); diff --git a/src/graphics/inc/FGrp_BufferInfoImpl.h b/src/graphics/inc/FGrp_BufferInfoImpl.h index 283d9c1..b76c599 100644 --- a/src/graphics/inc/FGrp_BufferInfoImpl.h +++ b/src/graphics/inc/FGrp_BufferInfoImpl.h @@ -56,7 +56,8 @@ public: HANDLE_TYPE_NONE, HANDLE_TYPE_OVERLAY_REGION, HANDLE_TYPE_VE_SURFACE, - HANDLE_TYPE_CANVAS_TEXTURE + HANDLE_TYPE_CANVAS_TEXTURE, + HANDLE_TYPE_NATIVE_PIXMAP }; enum Rotation diff --git a/src/graphics/inc/FGrp_CanvasImpl.h b/src/graphics/inc/FGrp_CanvasImpl.h old mode 100755 new mode 100644 diff --git a/src/graphics/inc/FGrp_CoordinateSystemUtils.h b/src/graphics/inc/FGrp_CoordinateSystemUtils.h old mode 100755 new mode 100644 diff --git a/src/graphics/inc/FGrp_FontImpl.h b/src/graphics/inc/FGrp_FontImpl.h old mode 100755 new mode 100644 index b8b8d2d..5fa222a --- a/src/graphics/inc/FGrp_FontImpl.h +++ b/src/graphics/inc/FGrp_FontImpl.h @@ -114,6 +114,8 @@ public: int GetSize(void) const; float GetSizeF(void) const; + result SetXExpansion(float xExpansion); + void SetStrikeOut(bool strikeOut); void SetUnderline(bool underline); @@ -129,6 +131,9 @@ public: _FontImpl* CloneN(void); static Font* CloneN(const Font& font); + static Font* CreateFontN(int style, float expectedMaxHeight); + static Font* CreateFontN(const Tizen::Base::String& fontName, int style, float expectedMaxHeight); + /* * Gets the count and dimension of characters which can be get in the given width. @n * diff --git a/src/graphics/inc/FGrp_NonScale.h b/src/graphics/inc/FGrp_NonScale.h index ef7a019..a3366f9 100644 --- a/src/graphics/inc/FGrp_NonScale.h +++ b/src/graphics/inc/FGrp_NonScale.h @@ -47,7 +47,7 @@ namespace _NonScale * @exception E_SUCCESS The method was successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_UNSUPPORTED_FORMAT The specified format is not supported - * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_OUT_OF_MEMORY Memory allocation failed. */ _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, const FloatDimension& logicalSizeF); @@ -56,7 +56,7 @@ _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, c * @exception E_SUCCESS The method was successful. * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_OUT_OF_MEMORY Memory allocation failed. */ _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Dimension& dim, BitmapPixelFormat pixelFormat); diff --git a/src/graphics/inc/FGrp_TextCommon.h b/src/graphics/inc/FGrp_TextCommon.h index 0dffb43..cfa6983 100644 --- a/src/graphics/inc/FGrp_TextCommon.h +++ b/src/graphics/inc/FGrp_TextCommon.h @@ -200,6 +200,20 @@ struct BitmapDisplayProperty const Bitmap* pBitmap; }; +struct TextObjectColorRGB +{ + float R; + float G; + float B; +}; + +struct TextObjectColorHSL +{ + float H; + float S; + float L; +}; + typedef int TextObjectAlignment; //special character definistion @@ -207,11 +221,11 @@ static const unsigned short TEXT_OBJ_CHARACTER = 0xFFFC; static const unsigned short TEXT_LINE_FEED = 0x0A; static const unsigned short TEXT_CARRIAGE_RETURN = 0x0D; static const unsigned short TEXT_ABBREV_CHARACTER = 0x2026; -static const unsigned short TEXT_LINE_SEPARATOR = 0x2028; +//static const unsigned short TEXT_LINE_SEPARATOR = 0x2028; static const unsigned short TEXT_PARAGRAPH_SEPARATOR = 0x2029; -static const unsigned short TEXT_TAB_CHARACTER = 0x09; -static const unsigned short TEXT_JAPANESE_DOT = 0x3001; -static const unsigned short TEXT_JAPANESE_COMMA = 0x3002; +//static const unsigned short TEXT_TAB_CHARACTER = 0x09; +//static const unsigned short TEXT_JAPANESE_DOT = 0x3001; +//static const unsigned short TEXT_JAPANESE_COMMA = 0x3002; static const unsigned short TEXT_JAPANESE_SPACE = 0x3000; static const unsigned short TEXT_ZERO_WIDTH_SPACE = 0x200B; diff --git a/src/graphics/inc/FGrp_TextTextSimple.h b/src/graphics/inc/FGrp_TextTextSimple.h index 9885297..8ce7270 100644 --- a/src/graphics/inc/FGrp_TextTextSimple.h +++ b/src/graphics/inc/FGrp_TextTextSimple.h @@ -138,9 +138,25 @@ public: bool IsDelimiter(const wchar_t ch) const; -private: + void SetOutlineEnabled(bool enable); + + bool IsOutlineEnable(void) const; + + void SetTextShadowEnabled(bool enable); + + bool IsTextShadowEnable(void) const; + + void SetTextShadowColor(const Color color); + + Color GetTextShadowColor(void) const; + + void SetTextShadowOffset(const FloatPoint& offset); + + FloatPoint GetTextShadowOffset(void) const; + static int ConvertEnterToSpace(wchar_t* pDstText, const wchar_t* pSrcText, int textLength); +private: bool IsKorean(const wchar_t* ch) const; bool IsChinese(const wchar_t ch) const; @@ -155,6 +171,8 @@ private: int GetGlyphedLength(const wchar_t* pText, int textLength, int& actualLength) const; + void SetTextShadowColor(void); + protected: virtual Font* GetCurrentFont(void) const; @@ -174,6 +192,10 @@ protected: bool _outline; int _offset; bool _isBackgroundDrawingModeEnabled; + bool _shadow; + Color _shadowColor; + FloatPoint _shadowOffset; + int _opacity; private: BitmapDisplayProperty __bitmapProperty; diff --git a/src/graphics/opengl/FGrpCanvasTexture.cpp b/src/graphics/opengl/FGrpCanvasTexture.cpp index 735b0df..8cbbfe9 100644 --- a/src/graphics/opengl/FGrpCanvasTexture.cpp +++ b/src/graphics/opengl/FGrpCanvasTexture.cpp @@ -48,7 +48,7 @@ CanvasTexture::~CanvasTexture(void) result CanvasTexture::Construct(int textureId, int width, int height) { - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); result r = this->__pImpl->Construct(textureId, width, height); diff --git a/src/graphics/opengl/FGrpEgl.cpp b/src/graphics/opengl/FGrpEgl.cpp index 0c7c985..32108a9 100644 --- a/src/graphics/opengl/FGrpEgl.cpp +++ b/src/graphics/opengl/FGrpEgl.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -58,6 +59,7 @@ #include #include +#include #include #include #include @@ -122,6 +124,9 @@ namespace Opengl namespace // unnamed { +PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR = null; +PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = null; + class _SglInfo; #define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT @@ -346,7 +351,7 @@ _OnBoundsChanged(void* pData) && pSglInfo->sglIndex > INVALID_SGL_INDEX && pSglInfo->pVisualElement != null && pSglInfo->pWindow != null - , E_INVALID_STATE, "Invalid state."); + , E_INVALID_STATE, "[E_INVALID_STATE] Invalid state."); if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo)) { @@ -370,7 +375,7 @@ _OnBoundsChanged(void* pData) EGLDisplay eglDisplay = eglGetCurrentDisplay(); EGLSurface drawSurface = _SglGetCurrentSurface(EGL_DRAW); EGLSurface readSurface = _SglGetCurrentSurface(EGL_READ); - EGLSurface eglContext = eglGetCurrentContext(); + EGLContext eglContext = eglGetCurrentContext(); if (drawSurface != EGL_NO_SURFACE && readSurface != EGL_NO_SURFACE) { @@ -385,7 +390,7 @@ _OnBoundsChanged(void* pData) eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); EGLBoolean ret = eglDestroySurface(pSglInfo->display, pSglInfo->surface); pSglInfo->surface = null; - SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed."); + SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglDestroySurface failed."); #if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) if (pSglInfo->pEcoreImage != null) @@ -398,10 +403,10 @@ _OnBoundsChanged(void* pData) FloatRectangle rect = pSglInfo->pVisualElement->GetBounds(); int width = int(rect.width); int height = int(rect.height); - SysTryReturnVoidResult(NID_GRP, width > 0 && height > 0, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", width, height); + SysTryReturnVoidResult(NID_GRP, width > 0 && height > 0, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", width, height); int widthPhysical = static_cast (CoordinateSystem::ConvertToPhysicalX(rect.width)); int heightPhysical = static_cast (CoordinateSystem::ConvertToPhysicalY(rect.height)); - SysTryReturnVoidResult(NID_GRP, widthPhysical > 0 && heightPhysical > 0, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", widthPhysical, heightPhysical); + SysTryReturnVoidResult(NID_GRP, widthPhysical > 0 && heightPhysical > 0, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", widthPhysical, heightPhysical); evas_object_image_size_set(pSglInfo->pObject, widthPhysical, heightPhysical); evas_object_resize(pSglInfo->pObject, widthPhysical, heightPhysical); @@ -409,13 +414,13 @@ _OnBoundsChanged(void* pData) delete pSglInfo->pBitmap; pSglInfo->pBitmap = null; std::auto_ptr bitmap(new (std::nothrow) Bitmap); - SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfo->sglIndex, bitmap.get()); - SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "Propagating."); + SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Creating NativePixmap failed."); EGLSurface eglSurface = eglCreatePixmapSurface(pSglInfo->display, pSglInfo->config, nativePixmap, null); - SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "eglCreatePixmapSurface failed."); + SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed."); pSglInfo->nativePixmap = nativePixmap; pSglInfo->surface = eglSurface; @@ -425,12 +430,12 @@ _OnBoundsChanged(void* pData) if (__isDoublePixmapEnabled) { _SglInfo* pSglInfoSecond = pSglInfo->pSecondSglInfo; - SysTryReturnVoidResult(NID_GRP, pSglInfoSecond != null, E_INVALID_STATE, "Invalid pSecondSglInfo."); + SysTryReturnVoidResult(NID_GRP, pSglInfoSecond != null, E_INVALID_STATE, "[E_INVALID_STATE] Invalid pSecondSglInfo."); eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ret = eglDestroySurface(pSglInfoSecond->display, pSglInfoSecond->surface); pSglInfoSecond->surface = null; - SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed."); + SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglDestroySurface failed."); evas_object_image_size_set(pSglInfoSecond->pObject, widthPhysical, heightPhysical); evas_object_resize(pSglInfoSecond->pObject, widthPhysical, heightPhysical); @@ -438,13 +443,13 @@ _OnBoundsChanged(void* pData) delete pSglInfoSecond->pBitmap; pSglInfoSecond->pBitmap = null; std::auto_ptr bitmapSecond(new (std::nothrow) Bitmap); - SysTryReturnVoidResult(NID_GRP, bitmapSecond.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnVoidResult(NID_GRP, bitmapSecond.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = bitmapSecond.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfoSecond->sglIndex, bitmapSecond.get()); - SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "Propagating."); + SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Creating NativePixmap failed."); EGLSurface eglSurface = eglCreatePixmapSurface(pSglInfoSecond->display, pSglInfoSecond->config, nativePixmap, null); - SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "eglCreatePixmapSurface failed."); + SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed."); pSglInfoSecond->nativePixmap = nativePixmap; pSglInfoSecond->surface = eglSurface; @@ -456,6 +461,16 @@ _OnBoundsChanged(void* pData) _EvasObjectImageChange(pSglInfoSecond); } + if (pSglInfo->isCopyNeeded) + { + delete pSglInfo->pBitmapCopyNeeded; + std::auto_ptr bitmap(new (std::nothrow) Bitmap); + SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + pSglInfo->pBitmapCopyNeeded = bitmap.release(); + } + pSglInfo->pBitmap = bitmap.release(); _EvasObjectImageChange(pSglInfo); @@ -476,16 +491,6 @@ _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; } @@ -511,7 +516,7 @@ public: _SglInfoTableManipulator() { result r = __SglMutex.Create(); - SysTryLog(NID_GRP, r == E_SUCCESS, "Failed to create mutex. [%s]", GetErrorMessage(r)); + SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Failed to create mutex.", GetErrorMessage(r)); __SglIndexLastUsed = INVALID_SGL_INDEX; __SglInitialized = false; } @@ -732,6 +737,40 @@ _PixmapSurfaceDestroyCallback(void* pCallbackParam) delete (_PixmapInfo*)pCallbackParam; } +void +_PixmapPostLockCallback(BufferInfo& bufferInfo, void* pData) +{ + _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo); + SysTryReturnVoidResult(NID_GRP, pBufferInfoImpl != null, + E_INVALID_STATE, "[E_INVALID_STATE] Invalid pBufferInfoImpl:%#x.", (unsigned int)pBufferInfoImpl); + + pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_NATIVE_PIXMAP, (int)pData, null); +} + +result +_GetNativePixmap(Bitmap* pBitmap, EGLNativePixmapType& nativePixmap, BufferInfo& bufferInfo) +{ + SysTryReturnResult(NID_GRP, pBitmap != null, + E_INVALID_ARG, "Invalid pBitmap:%#x", (unsigned int)pBitmap); + + _BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap); + SysTryReturnResult(NID_GRP, (pBitmapImpl != null && pBitmapImpl->IsConstructed()), + E_INVALID_ARG, "Invalid pBitmapImpl:%#x", (unsigned int)pBitmapImpl); + + result r = pBitmapImpl->LockFast(bufferInfo); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + r = pBitmapImpl->UnlockFast(); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + + _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo); + SysTryReturnResult(NID_GRP, pBufferInfoImpl != null, + E_INVALID_ARG, "Invalid pBufferInfoImpl:%#x", (unsigned int)pBufferInfoImpl); + + nativePixmap = (EGLNativePixmapType)pBufferInfoImpl->GetHandle(_BufferInfoImpl::HANDLE_TYPE_NATIVE_PIXMAP); + + return E_SUCCESS; +} + #if defined(FGRAPHICS_INTERNAL_USE_DRM) void _PixmapLockCallBack(void* pCallbackParam) @@ -778,14 +817,14 @@ _GetEvasEngineType(Evas_Object* pObject) Evas* pEvas = evas_object_evas_get(pObject); if (pEvas == null) { - SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEvas failed."); + SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEvas failed."); return ENGINE_TYPE_SOFEWARE_X11; } Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas); if (pEcoreEvas == null) { - SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEcoreEvas failed."); + SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEcoreEvas failed."); return ENGINE_TYPE_SOFEWARE_X11; } @@ -820,7 +859,7 @@ _EvasObjectImageChange(_SglInfo* pSglInfo) Evas* pEvas = evas_object_evas_get(pSglInfo->pObject); if (pEvas == null) { - SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEvas failed."); + SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEvas failed."); return; } @@ -851,6 +890,24 @@ _EvasObjectImageChange(_SglInfo* pSglInfo) } #if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) +bool +__isMainThread(void) +{ + Tizen::Base::Runtime::Thread* pThread = Tizen::Base::Runtime::Thread::GetCurrentThread(); + if (pThread == null) + { + return false; + } + + String string = pThread->GetName(); + if (string.Equals(L"MainThread", true)) + { + return true; + } + + return false; +} + void __RestoreContext(void) { @@ -895,7 +952,7 @@ _PostRenderCallback(Ecore_Evas* ee) } } - if (__pPreviousSglInfo != null) + if (__pPreviousSglInfo != null && __isMainThread()) { EGLDisplay display = __pPreviousSglInfo->display; EGLSurface surface = __pPreviousSglInfo->surface; @@ -937,7 +994,7 @@ _PostRenderCallback(Ecore_Evas* ee) void _SaveCurrentContext(_SglInfo* pSglInfo) { - if (pSglInfo != null) + if (pSglInfo != null && __isMainThread()) { __pPreviousSglInfo = pSglInfo; } @@ -967,10 +1024,10 @@ _RegisterRenderCallback(Evas_Object* pObject) 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."); + SysTryReturnVoidResult(NID_GRP, swapQueue.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = swapQueue.get()->Construct(MAX_SGL_INDEX / 2); - SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pSwapQueue = swapQueue.release(); } @@ -1015,7 +1072,7 @@ _UnregisterRenderCallback(Evas_Object* pObject) #if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) void _RestoreContext(void) { - if (__needRestoreContext && __pPreviousSglInfo != null) + if (__needRestoreContext && __pPreviousSglInfo != null && __isMainThread()) { EGLDisplay display = __pPreviousSglInfo->display; EGLSurface surface = __pPreviousSglInfo->surface; @@ -1135,22 +1192,24 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi Object* pObj = (Object*)win; VisualElement* pVisualElement = dynamic_cast (pObj); Tizen::Ui::Control* pControl = dynamic_cast (pObj); -#if 0//!defined(_OSP_EMUL_) + +//#define FGRAPHICS_INTERNAL_USE_WINDOWSURFACE +#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE) Tizen::Ui::Controls::Frame* pFrame = dynamic_cast (pControl); #endif - SysTryReturn(NID_GRP, pControl != null || pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "Invalid NativeWindow."); + SysTryReturn(NID_GRP, pControl != null || pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow."); _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); -#if 0//!defined(_OSP_EMUL_) +#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE) if (pFrame != null && _GetEvasEngineType(null) != ENGINE_TYPE_OPENGL_X11) { _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl); _WindowImpl* pWindowImpl = dynamic_cast<_WindowImpl*> (pControlImpl); - SysTryReturn(NID_GRP, pWindowImpl != null, EGL_NO_SURFACE, E_INVALID_STATE, "Invalid window state."); + SysTryReturn(NID_GRP, pWindowImpl != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid window state."); EGLNativeWindowType nativeWindow = (EGLNativeWindowType)pWindowImpl->GetNativeHandle(); sglIndex = pSglInfoTableManipulatorInstance->CreateSglIndex(); - SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid SglIndex."); + SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid SglIndex."); EGLSurface windowSurface = eglCreateWindowSurface(dpy, config, nativeWindow, pAttribList); if (windowSurface == EGL_NO_SURFACE) @@ -1184,7 +1243,7 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi return (EGLSurface)sglIndex; } else -#endif //#if !defined(_OSP_EMUL_) +#endif //#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE) { result r = E_SUCCESS; @@ -1192,15 +1251,15 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi { pVisualElement = pControl->GetVisualElement(); } - SysTryReturn(NID_GRP, pVisualElement != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + SysTryReturn(NID_GRP, pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow."); _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*pVisualElement); - SysTryReturn(NID_GRP, pVisualElementImpl != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + SysTryReturn(NID_GRP, pVisualElementImpl != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow."); FloatRectangle rect = pVisualElement->GetBounds(); int width = int(rect.width); int height = int(rect.height); - SysTryReturn(NID_GRP, width > 0 && height > 0, EGL_NO_SURFACE, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", width, height); + SysTryReturn(NID_GRP, width > 0 && height > 0, EGL_NO_SURFACE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", width, height); Control* pFrame = pControl; Control* pTemp = pFrame->GetParent(); @@ -1211,15 +1270,15 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi } Tizen::Ui::Window* pWindow = dynamic_cast (pFrame); - SysTryReturn(NID_GRP, pWindow != null, EGL_NO_SURFACE, E_INVALID_STATE, "Invalid window."); + SysTryReturn(NID_GRP, pWindow != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid window."); VisualElementSurface* pVisualElementSurface = pVisualElement->GetSurfaceN(); - SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); _VisualElementSurfaceImpl* pVisualElementSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pVisualElementSurface); if (pVisualElementSurfaceImpl == null) { - SysLogException(NID_GRP, E_OPERATION_FAILED, "Propagating."); + SysLogException(NID_GRP, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); delete pVisualElementSurface; return EGL_NO_SURFACE; } @@ -1229,7 +1288,7 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi Evas* pEvas = evas_object_evas_get(pObject); pObject = evas_object_image_filled_add(pEvas); - SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid object."); + SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid object."); __evasEngineType = _GetEvasEngineType(pObject); @@ -1243,16 +1302,18 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN( *pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height)); - SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); std::auto_ptr bitmap(new (std::nothrow) Bitmap); - SysTryReturn(NID_GRP, bitmap.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturn(NID_GRP, bitmap.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "Propagating."); + SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r)); sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmap.get(), null); - SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid sglIndex."); _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); pSglInfo->sglIndex = sglIndex; @@ -1280,7 +1341,7 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi if (__isDoublePixmapEnabled) { pObject = evas_object_image_filled_add(pEvas); - SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid object."); + SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid object."); evas_object_image_alpha_set(pObject, EINA_TRUE); evas_object_image_size_set(pObject, widthPhysical, heightPhysical); @@ -1289,19 +1350,21 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN( *pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height)); - SysTryReturn(NID_GRP, pSglInfo->pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); delete pSglInfo->pBitmap; pSglInfo->pBitmap = null; std::auto_ptr bitmapSecond(new (std::nothrow) Bitmap); - SysTryReturn(NID_GRP, bitmapSecond.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturn(NID_GRP, bitmapSecond.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = bitmapSecond.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "Propagating."); + SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r)); sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmapSecond.get(), null); - SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating."); + SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid sglIndex."); _SglInfo* pSglInfoSecond = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); pSglInfoSecond->sglIndex = sglIndex; @@ -1380,6 +1443,8 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) result r = E_FAILURE; Tizen::Graphics::BufferInfo bufferInfo; _PixmapInfo* pPixmapInfo = null; + EGLNativePixmapType nativePixmap = 0; + _BitmapImpl* pBitmapImpl = null; #if defined(FGRAPHICS_INTERNAL_USE_DRM) unsigned int attachments[] = { DRI2BufferFrontLeft }; char* pDeviceName = null; @@ -1405,17 +1470,26 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) } pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); - r = pBitmap->Lock(bufferInfo); + pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap); + if (pBitmapImpl == null) + { + goto CATCH_01; + } + + r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo); if (r != E_SUCCESS) { goto CATCH_01; } + if (nativePixmap != (Pixmap)0) + { + return nativePixmap; + } + width = bufferInfo.width; height = bufferInfo.height; bitsPerPixel = bufferInfo.bitsPerPixel; - - r = pBitmap->Unlock(); if (r != E_SUCCESS || width <= 0 || height <= 0 || bitsPerPixel <= 0) { goto CATCH_01; @@ -1496,8 +1570,11 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) goto CATCH_06; } - if (!Tizen::Graphics::_BitmapTool::SetCallback(*pBitmap, _PixmapSurfaceDestroyCallback, pPixmapInfo, - _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject,_PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject)) + if (!_BitmapTool::SetCallback(*pBitmap, + _PixmapSurfaceDestroyCallback, pPixmapInfo, + _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject, + _PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject, + _PixmapPostLockCallback, (void*)pPixmapInfo->nativePixmap)) { goto CATCH_06; } @@ -1567,14 +1644,14 @@ _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) #endif //#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) #endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM) - pBitmap->Lock(bufferInfo); + pBitmapImpl->Lock(bufferInfo); { Canvas canvas; canvas.Construct(bufferInfo); canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK)); canvas.Clear(); } - pBitmap->Unlock(); + pBitmapImpl->Unlock(); return (EGLNativePixmapType)pPixmapInfo->nativePixmap; @@ -1607,6 +1684,187 @@ CATCH_01: return (EGLNativePixmapType)0; } +EGLNativePixmapType +__CreateNativePixmapEx(Bitmap* pBitmap) +{ + int width = 0; + int height = 0; + int bitsPerPixel = 0; + Display* pNativeDisplay = null; + Drawable nativeWindow = 0; + result r = E_FAILURE; + BufferInfo bufferInfo; + EGLNativePixmapType nativePixmap = 0; + _BitmapImpl* pBitmapImpl = null; +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + _PixmapInfo* pPixmapInfo = null; + unsigned int attachments[] = { DRI2BufferFrontLeft }; + char* pDeviceName = null; + char* pDriverName = null; + DRI2Buffer* pDri2Buffer = null; + int dri2Width = 0; + int dri2Height = 0; + int dri2BufferCount = 0; + tbm_bo_handle tbmData = { null, }; + + Bool ret = False; + drm_magic_t magic = 0; + int pitch = 0; +#endif + pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap); + if (pBitmapImpl == null) + { + goto CATCH_01; + } + + r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo); + if (r != E_SUCCESS) + { + goto CATCH_01; + } + + if (nativePixmap != (Pixmap)0) + { + return nativePixmap; + } + + width = bufferInfo.width; + height = bufferInfo.height; + bitsPerPixel = bufferInfo.bitsPerPixel; + if (r != E_SUCCESS || width <= 0 || height <= 0 || bitsPerPixel <= 0) + { + goto CATCH_01; + } + + pNativeDisplay = (Display*) ecore_x_display_get(); + nativeWindow = DefaultRootWindow(pNativeDisplay); + +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + pPixmapInfo = new (std::nothrow) _PixmapInfo; + if (pPixmapInfo == null) + { + goto CATCH_01; + } + + + pPixmapInfo->nativePixmap = XCreatePixmap(pNativeDisplay, nativeWindow, width, height, + ecore_x_default_depth_get(pNativeDisplay, ecore_x_default_screen_get())); + if (pPixmapInfo->nativePixmap == (Pixmap)0) + { + goto CATCH_02; + } + + DRI2CreateDrawable(pNativeDisplay, pPixmapInfo->nativePixmap); + XSync(pNativeDisplay, False); + + ret = DRI2Connect(pNativeDisplay, nativeWindow, &pDriverName, &pDeviceName); + free(pDriverName); + if (!ret || pDeviceName == null) + { + goto CATCH_03; + } + + pPixmapInfo->drmFd = open(pDeviceName, O_RDWR); + + free(pDeviceName); + if (pPixmapInfo->drmFd < 0) + { + goto CATCH_03; + } + + drmGetMagic(pPixmapInfo->drmFd, &magic); + ret = DRI2Authenticate(pNativeDisplay, nativeWindow, (unsigned int)magic); + if (!ret) + { + goto CATCH_04; + } + + pPixmapInfo->pTbmBufMgr = tbm_bufmgr_init(pPixmapInfo->drmFd); + if (pPixmapInfo->pTbmBufMgr == null) + { + goto CATCH_04; + } + + pDri2Buffer = DRI2GetBuffers(pNativeDisplay, pPixmapInfo->nativePixmap, &dri2Width, &dri2Height, attachments, 1, &dri2BufferCount); + if (pDri2Buffer == null) + { + goto CATCH_05; + } + + pPixmapInfo->pTbmBufferObject = tbm_bo_import(pPixmapInfo->pTbmBufMgr, pDri2Buffer->name); + pitch = pDri2Buffer->pitch; + free(pDri2Buffer); + if (pPixmapInfo->pTbmBufferObject == null) + { + goto CATCH_05; + } + + tbmData = tbm_bo_get_handle(pPixmapInfo->pTbmBufferObject, TBM_DEVICE_CPU); + if (tbmData.ptr == null) + { + goto CATCH_06; + } + + r = _BitmapTool::ChangeBuffer(*pBitmap, tbmData.ptr, pitch, + _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo); + if (r != E_SUCCESS) + { + goto CATCH_06; + } + + if (!_BitmapTool::SetCallback(*pBitmap, + _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo, + _PixmapLockCallBack, (void*)pPixmapInfo->pTbmBufferObject, + _PixmapUnlockCallBack, (void*)pPixmapInfo->pTbmBufferObject, + _PixmapPostLockCallback, (void*)pPixmapInfo->nativePixmap)) + { + goto CATCH_06; + } + + pBitmapImpl->Lock(bufferInfo); + { + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK)); + canvas.Clear(); + } + pBitmapImpl->Unlock(); + + return (EGLNativePixmapType)pPixmapInfo->nativePixmap; +#else + return (EGLNativePixmapType)XCreatePixmap(pNativeDisplay, nativeWindow, width, height, + ecore_x_default_depth_get(pNativeDisplay, ecore_x_default_screen_get())); +#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM) + +#if defined(FGRAPHICS_INTERNAL_USE_DRM) +CATCH_06: + tbm_bo_unmap(pPixmapInfo->pTbmBufferObject); + tbm_bo_unref(pPixmapInfo->pTbmBufferObject); + //fall through + +CATCH_05: + tbm_bufmgr_deinit(pPixmapInfo->pTbmBufMgr); + //fall through + +CATCH_04: + close(pPixmapInfo->drmFd); + //fall through + +CATCH_03: + DRI2DestroyDrawable(pNativeDisplay, pPixmapInfo->nativePixmap); + XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap); + //fall through + +CATCH_02: + delete pPixmapInfo; + //fall through +#endif + +CATCH_01: + SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap); + return (EGLNativePixmapType)0; +} + _OSP_LOCAL_ EGLNativePixmapType _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferInfo bufferInfo) { @@ -1616,8 +1874,8 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI Display* pNativeDisplay = null; Drawable nativeWindow = 0; Tizen::Graphics::_BitmapImpl* pBitmapImpl = null; - _PixmapInfo* pPixmapInfo = null; #if defined(FGRAPHICS_INTERNAL_USE_DRM) + _PixmapInfo* pPixmapInfo = null; unsigned int attachments[] = { DRI2BufferFrontLeft }; char* pDeviceName = null; char* pDriverName = null; @@ -1654,6 +1912,7 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI pNativeDisplay = (Display*) ecore_x_display_get(); nativeWindow = DefaultRootWindow(pNativeDisplay); +#if defined(FGRAPHICS_INTERNAL_USE_DRM) pPixmapInfo = new (std::nothrow) _PixmapInfo; if (pPixmapInfo == null) { @@ -1667,7 +1926,6 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI goto CATCH_02; } -#if defined(FGRAPHICS_INTERNAL_USE_DRM) DRI2CreateDrawable(pNativeDisplay, pPixmapInfo->nativePixmap); XSync(pNativeDisplay, False); @@ -1735,9 +1993,12 @@ _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferI { goto CATCH_06; } -#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM) return (EGLNativePixmapType)pPixmapInfo->nativePixmap; +#else + return (EGLNativePixmapType)XCreatePixmap(pNativeDisplay, nativeWindow, width, height, bitsPerPixel); +#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM) + #if defined(FGRAPHICS_INTERNAL_USE_DRM) CATCH_06: @@ -1757,11 +2018,11 @@ CATCH_03: DRI2DestroyDrawable(pNativeDisplay, pPixmapInfo->nativePixmap); XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap); //fall through -#endif CATCH_02: delete pPixmapInfo; //fall through +#endif CATCH_01: SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap); @@ -2353,6 +2614,58 @@ EGLBoolean _SglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface) return EGL_TRUE; } +EGLImageKHR _SglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* pAttribList) +{ + if (eglCreateImageKHR == null) + { + eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR"); + } + SysTryReturn(NID_GRP, eglCreateImageKHR != null, EGL_NO_IMAGE_KHR + , E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] eglCreateImageKHR is not supported on this device."); + + switch (target) + { + case EGL_NATIVE_PIXMAP_KHR: + { + Bitmap* pBitmap = dynamic_cast ((Bitmap*)buffer); + if (pBitmap != null) + { + EGLNativePixmapType nativePixmap = (EGLNativePixmapType)0; + BufferInfo bufferInfo; + result r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo); + SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_IMAGE_KHR, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (nativePixmap != (EGLNativePixmapType)0) + { + buffer = (EGLClientBuffer)nativePixmap; + } + else + { + buffer = (EGLClientBuffer)__CreateNativePixmapEx(pBitmap); + } + } + } + break; + + default : + break; + } + + return eglCreateImageKHR(dpy, ctx, target, buffer, pAttribList); +} + +EGLBoolean _SglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) +{ + if (eglDestroyImageKHR == null) + { + eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR"); + } + SysTryReturn(NID_GRP, eglDestroyImageKHR != null, EGL_FALSE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] eglDestroyImageKHR is not supported on this device."); + + return eglDestroyImageKHR(dpy, image); +} + + __EglMustCastToProperFunctionPointerType _SglGetProcAddress(const char* pProcName) { @@ -2366,8 +2679,22 @@ _SglGetProcAddress(const char* pProcName) { return (__EglMustCastToProperFunctionPointerType)_SglUnlockSurfaceKHR; } - - return eglGetProcAddress(pProcName); + else if (name.CompareTo(String("eglCreateImageKHR")) == 0) + { + return (__EglMustCastToProperFunctionPointerType)_SglCreateImageKHR; + } + else if (name.CompareTo(String("eglDestroyImageKHR")) == 0) + { + return (__EglMustCastToProperFunctionPointerType)_SglDestroyImageKHR; + } + else if (name.CompareTo(String("eglCreateImageKHR_INTERNAL")) == 0) + { + return (__EglMustCastToProperFunctionPointerType)eglGetProcAddress("eglCreateImageKHR"); + } + else + { + return eglGetProcAddress(pProcName); + } } EGLBoolean diff --git a/src/graphics/opengl/FGrpGlPlayer.cpp b/src/graphics/opengl/FGrpGlPlayer.cpp index f40608b..9a413c8 100644 --- a/src/graphics/opengl/FGrpGlPlayer.cpp +++ b/src/graphics/opengl/FGrpGlPlayer.cpp @@ -51,7 +51,7 @@ result GlPlayer::Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl) { ClearLastResult(); - SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Fails to allocate memory.") + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") SysAssertf(this->__pImpl->IsValid() == false , "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. "); result r = this->__pImpl->Construct(version, pControl); diff --git a/src/graphics/opengl/FGrp_CanvasTexture.cpp b/src/graphics/opengl/FGrp_CanvasTexture.cpp index 0251dd1..8f2250c 100644 --- a/src/graphics/opengl/FGrp_CanvasTexture.cpp +++ b/src/graphics/opengl/FGrp_CanvasTexture.cpp @@ -99,7 +99,7 @@ _CanvasTexture::Construct(const int textureId, const int width, const int height this->__eglSurface = eglGetCurrentSurface(EGL_DRAW); this->__eglContext = eglGetCurrentContext(); - eglQueryContext(this->__eglDisplay, this->__eglContext, EGL_CONTEXT_CLIENT_VERSION, &this->__glVersion); + eglQueryContext(this->__eglDisplay, this->__eglContext, EGL_CONTEXT_CLIENT_VERSION, &this->__glVersion); SysTryReturnResult(NID_GRP , this->__eglDisplay != EGL_NO_DISPLAY && this->__eglSurface != EGL_NO_SURFACE @@ -121,10 +121,10 @@ _CanvasTexture::Construct(const int textureId, const int width, const int height , E_INVALID_ARG, "width(%d) or height(%d) not supported.", width, height); std::auto_ptr bitmap(new (std::nothrow) Bitmap); - SysTryReturnResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturnResult(NID_GRP, !IsFailed(r), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); if (IsSupported(L"GL_EXT_texture_format_BGRA8888")) { @@ -133,10 +133,10 @@ _CanvasTexture::Construct(const int textureId, const int width, const int height else { std::auto_ptr bitmapColorConvert(new (std::nothrow) Bitmap); - SysTryReturnResult(NID_GRP, bitmapColorConvert.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_GRP, bitmapColorConvert.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = bitmapColorConvert.get()->Construct(Rectangle(0, 0, width, height)); - SysTryReturnResult(NID_GRP, !IsFailed(r), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); this->__pBitmapColorConvert = bitmapColorConvert.release(); } @@ -166,7 +166,7 @@ bool _CanvasTexture::ShowCallback(void* pParam) { _CanvasTexture* pCanvasTexture = dynamic_cast<_CanvasTexture*> ((_CanvasTexture*)pParam); - SysTryReturnResult(NID_GRP, pCanvasTexture != null, true, "Invalid parameter."); + SysTryLogReturn(NID_GRP, pCanvasTexture != null, false, "Invalid parameter."); pCanvasTexture->UpdateTexture(); @@ -177,13 +177,13 @@ Canvas* _CanvasTexture::GetCanvasN(void) const { std::auto_ptr canvas(new (std::nothrow) Canvas); - SysTryReturnResult(NID_GRP, canvas.get() != null, null, "The memory is insufficient."); + SysTryReturn(NID_GRP, canvas.get() != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = canvas.get()->Construct(__bufferInfo); - SysTryReturnResult(NID_GRP, !IsFailed(r), null, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); bool ret = _CanvasTool::SetCallback(*canvas.get(), this->ShowCallback, (void*)this); - SysTryReturnResult(NID_GRP, ret, null, "[%s] Propagating."); + SysTryReturn(NID_GRP, ret, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Registering callback failed."); return canvas.release(); } diff --git a/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp b/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp index 4908257..18e90bf 100644 --- a/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp +++ b/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp @@ -48,7 +48,7 @@ _CanvasTextureImpl::~_CanvasTextureImpl(void) result _CanvasTextureImpl::Construct(int textureId, int width, int height) { - SysTryReturnResult(NID_GRP, this->__pNativeCanvasTexture != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, this->__pNativeCanvasTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); return this->__pNativeCanvasTexture->Construct(textureId, width, height); } @@ -56,7 +56,7 @@ _CanvasTextureImpl::Construct(int textureId, int width, int height) Canvas* _CanvasTextureImpl::GetCanvasN(void) const { - SysTryReturn(NID_GRP, this->__pNativeCanvasTexture != null, null, E_OUT_OF_MEMORY, "[Fails to allocate memory.\n"); + SysTryReturn(NID_GRP, this->__pNativeCanvasTexture != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.\n"); return this->__pNativeCanvasTexture->GetCanvasN(); } diff --git a/src/graphics/opengl/FGrp_GlPlayerImpl.cpp b/src/graphics/opengl/FGrp_GlPlayerImpl.cpp index ef7519a..d79cf6a 100644 --- a/src/graphics/opengl/FGrp_GlPlayerImpl.cpp +++ b/src/graphics/opengl/FGrp_GlPlayerImpl.cpp @@ -16,8 +16,8 @@ // /* - * @file FGrp_GlPlayerImpl.cpp - * @brief This is the implementation file for _GlPlayerImpl class. + * @file FGrp_GlPlayerImpl.cpp + * @brief This is the implementation file for _GlPlayerImpl class. * */ @@ -109,9 +109,9 @@ _GlPlayerImpl::Construct(EglContextClientVersion version, Tizen::Ui::Control* pC Tizen::Ui::Controls::Form* pForm = dynamic_cast (pControl); Tizen::Ui::Controls::Frame* pFrame = dynamic_cast (pControl); - SysTryReturnResult(NID_GRP, pForm != null || pFrame != null, E_INVALID_ARG, + SysTryReturnResult(NID_GRP, pForm != null || pFrame != null, E_INVALID_ARG, "The input target pControl is not allowable. Only Form/Frame are acceptable. "); - SysTryReturnResult(NID_GRP, __pTargetControl == null, E_INVALID_OPERATION, + SysTryReturnResult(NID_GRP, __pTargetControl == null, E_INVALID_OPERATION, "It is not allowable to call Construct() function, and the target pControl is not replacable."); std::auto_ptr timer(new (std::nothrow) Tizen::Base::Runtime::Timer); @@ -442,7 +442,7 @@ _GlPlayerImpl::SetIGlRenderer(IGlRenderer* pRenderer) pRenderer->SetTargetControlWidth(width); pRenderer->SetTargetControlHeight(height); - SysTryReturnResult(NID_GRP, pRenderer->InitializeGl(), E_INVALID_OPERATION, "Fail to InitializeGl() for the given pRenderer. "); + SysTryReturnResult(NID_GRP, pRenderer->InitializeGl(), E_INVALID_OPERATION, "Fail to InitializeGl() for the given pRenderer. "); } if (__pRenderer != null) { @@ -457,16 +457,16 @@ _GlPlayerImpl::SetIGlRenderer(IGlRenderer* pRenderer) void _GlPlayerImpl::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) { - if (__pTimer == null) - { - return; - } - __pTimer->Start(__renderTimeInterval); - - if (Redraw() != E_SUCCESS) - { - SysLog(NID_GRP, "Redraw() in OnTimerExpired() has failed. "); - } + if (__pTimer == null) + { + return; + } + __pTimer->Start(__renderTimeInterval); + + if (Redraw() != E_SUCCESS) + { + SysLog(NID_GRP, "Redraw() in OnTimerExpired() has failed. "); + } } _GlPlayerImpl* diff --git a/src/graphics/opengl/FGrp_VideoTexture.cpp b/src/graphics/opengl/FGrp_VideoTexture.cpp index 46b47de..6b38709 100644 --- a/src/graphics/opengl/FGrp_VideoTexture.cpp +++ b/src/graphics/opengl/FGrp_VideoTexture.cpp @@ -91,9 +91,9 @@ _DamageEvent::_DamageEvent(void) _DamageEvent::~_DamageEvent(void) { - for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) { - XDamageDestroy(__pDisplay, __damage[i]); + XDamageDestroy(__pDisplay, __damage[i]); } XCloseDisplay(__pDisplay); } @@ -103,19 +103,19 @@ _DamageEvent::Construct(_VideoTexture* pVideoTexture) { __pVideoTexture = pVideoTexture; - int errorBaseReturn = 0; - __pDisplay = (Display*)XOpenDisplay(NULL); + int errorBaseReturn = 0; + __pDisplay = (Display*)XOpenDisplay(NULL); - if (!XDamageQueryExtension(__pDisplay, &__eventBaseReturn, &errorBaseReturn)) - { - return E_SYSTEM; - } + if (!XDamageQueryExtension(__pDisplay, &__eventBaseReturn, &errorBaseReturn)) + { + return E_SYSTEM; + } - for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) - { - __pixmap[i] = (Drawable)__pVideoTexture->__pBuffer[i].__nativePixmap; - __damage[i] = XDamageCreate (__pDisplay, __pixmap[i], XDamageReportRawRectangles); - } + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + __pixmap[i] = (Drawable)__pVideoTexture->__pBuffer[i].__nativePixmap; + __damage[i] = XDamageCreate (__pDisplay, __pixmap[i], XDamageReportRawRectangles); + } return Thread::Construct(); } @@ -136,8 +136,8 @@ _DamageEvent::Run(void) { XDamageNotifyEvent* pDamageEvent = (XDamageNotifyEvent*)&ev; - for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) - { + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { if (__pVideoTexture != null && pDamageEvent != null && pDamageEvent->drawable == __pixmap[i]) { __pVideoTexture->__pBuffer[i].__bufferState = _BUFFER_STATE_ENQUEUE; @@ -166,7 +166,7 @@ _DamageEvent::Run(void) } break; } - } + } XDamageSubtract (__pDisplay, pDamageEvent->damage, None, None ); } @@ -179,7 +179,7 @@ _DamageEvent::Run(void) } _VideoTexture::_VideoTexture(void) - : __textureId(0) + : __textureId(0) , __isEglSyncAvailable(false) , __glVersion(0) , __eglDisplay(EGL_NO_DISPLAY) @@ -229,14 +229,14 @@ _VideoTexture::Construct(const int textureId, const int width, const int height) __eglDisplay = eglGetCurrentDisplay(); EGLContext eglContext = eglGetCurrentContext(); - eglQueryContext(__eglDisplay, eglContext, EGL_CONTEXT_CLIENT_VERSION, &__glVersion); + eglQueryContext(__eglDisplay, eglContext, EGL_CONTEXT_CLIENT_VERSION, &__glVersion); SysTryReturnResult(NID_GRP, __eglDisplay != EGL_NO_DISPLAY && eglContext != EGL_NO_CONTEXT && (__glVersion == 1 || __glVersion == 2) , E_INVALID_STATE, "Getting egl informations failed! eglDisplay:%#x eglContext:%#x glVersion:%d" , (unsigned int)__eglDisplay, (unsigned int)eglContext, __glVersion); __funcGlEglImageTargetTexture2dOes = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES"); - PFNEGLCREATEIMAGEKHRPROC funcEglCreateImageKhr = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR"); + PFNEGLCREATEIMAGEKHRPROC funcEglCreateImageKhr = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR_INTERNAL"); #if !defined(_OSP_EMUL_) //fixme SysTryReturnResult(NID_GRP, IsSupported(L"GL_OES_EGL_image") @@ -286,7 +286,7 @@ _VideoTexture::Construct(const int textureId, const int width, const int height) for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) { __pBuffer[i].__pBitmap = new (std::nothrow) Bitmap; - SysTryCatch(NID_GRP, __pBuffer[i].__pBitmap != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryCatch(NID_GRP, __pBuffer[i].__pBitmap != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pBuffer[i].__nativePixmap = _CreateNativePixmapEx(__pBuffer[i].__pBitmap, bufferInfo); __pBuffer[i].__eglImage = @@ -297,7 +297,7 @@ _VideoTexture::Construct(const int textureId, const int width, const int height) } __pDamageEvent = new (std::nothrow)_DamageEvent; - SysTryReturnResult(NID_GRP, __pDamageEvent != null, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryReturnResult(NID_GRP, __pDamageEvent != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pDamageEvent->Construct(this); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -305,7 +305,7 @@ _VideoTexture::Construct(const int textureId, const int width, const int height) __pDamageEvent->Start(); __pVideoTextureUpdateListener = new (std::nothrow) VideoTextureUpdateListenerList; - SysTryCatch(NID_GRP, __pVideoTextureUpdateListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Fails to allocate memory."); + SysTryCatch(NID_GRP, __pVideoTextureUpdateListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return r; @@ -384,14 +384,14 @@ _VideoTexture::AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listen { __pVideoTexture = pVideoTexture; result r = __pVideoTextureUpdateListener->Add(const_cast (&listener)); - SysTryLog(NID_GRP, r != E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); } void _VideoTexture::RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener) { result r = __pVideoTextureUpdateListener->Remove(const_cast (&listener)); - SysTryLog(NID_GRP, r != E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); } int @@ -533,7 +533,7 @@ _VideoTexture::Release(void) if (__funcEglDestroySyncKhr != null && __pBuffer[i].__eglSync != EGL_NO_SYNC_KHR) { - __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[i].__eglSync); + __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[i].__eglSync); __pBuffer[i].__eglSync = EGL_NO_SYNC_KHR; } diff --git a/src/graphics/opengl/FGrp_VideoTexture.h b/src/graphics/opengl/FGrp_VideoTexture.h index c6d1de1..ee46bfe 100644 --- a/src/graphics/opengl/FGrp_VideoTexture.h +++ b/src/graphics/opengl/FGrp_VideoTexture.h @@ -74,11 +74,11 @@ private: Drawable __pixmap[_VIDEO_TEXTURE_BUFFER_MAX]; Damage __damage[_VIDEO_TEXTURE_BUFFER_MAX]; Display* __pDisplay; - int __eventBaseReturn; - _VideoTexture* __pVideoTexture; - bool __keepRunning; + int __eventBaseReturn; + _VideoTexture* __pVideoTexture; + bool __keepRunning; - friend class _VideoTexture; + friend class _VideoTexture; }; class _VideoTexture diff --git a/src/graphics/opengl/FGrp_VideoTextureImpl.cpp b/src/graphics/opengl/FGrp_VideoTextureImpl.cpp index 7cb3c3c..02364eb 100644 --- a/src/graphics/opengl/FGrp_VideoTextureImpl.cpp +++ b/src/graphics/opengl/FGrp_VideoTextureImpl.cpp @@ -44,7 +44,7 @@ _VideoTextureImpl::~_VideoTextureImpl(void) result _VideoTextureImpl::Construct(int textureId, int width, int height) { - SysTryReturnResult(NID_GRP, this->__pNativeVideoTexture != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, this->__pNativeVideoTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); return this->__pNativeVideoTexture->Construct(textureId, width, height); } diff --git a/src/graphics/text/FGrp_TextTextColumn.cpp b/src/graphics/text/FGrp_TextTextColumn.cpp index de4d41d..8c5d0a4 100644 --- a/src/graphics/text/FGrp_TextTextColumn.cpp +++ b/src/graphics/text/FGrp_TextTextColumn.cpp @@ -770,7 +770,7 @@ TextColumn::SetChangeAction(ChangeAction changeAction, int textIndex, int textLe pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo; SysTryReturn(NID_GRP , pChangeActionEventInfo - , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pChangeActionEventInfo->action = changeAction; pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged; @@ -802,7 +802,7 @@ TextColumn::SetChangeAction(ChangeAction changeAction, int textIndex, int textLe pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo; SysTryReturn(NID_GRP , pChangeActionEventInfo - , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pChangeActionEventInfo->action = changeAction; pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged; @@ -2073,7 +2073,7 @@ TextColumn::KeepLines(int lineIndex, int lineCount) { pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); pKeepTextLine = pTextLine->CopyN(); - SysTryReturn(NID_GRP, pKeepTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pKeepTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pNextTextLineNode = pTextLineNode->pNext; diff --git a/src/graphics/text/FGrp_TextTextComposite.cpp b/src/graphics/text/FGrp_TextTextComposite.cpp index 86a9482..58a22d6 100644 --- a/src/graphics/text/FGrp_TextTextComposite.cpp +++ b/src/graphics/text/FGrp_TextTextComposite.cpp @@ -72,7 +72,7 @@ struct NoneWrapComposeInfo TextComposite::TextComposite(TextElement* pTextElement) { __pTextElementList = new (std::nothrow) LinkedList; - SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __wrap = TEXT_OBJECT_WRAP_TYPE_WORD; __workStart = 0; @@ -708,7 +708,8 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int st drawAbbrevText = false; } - blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height); + blockRect = adjustedRect; + blockRect.y = displayRect.y; currentLength = Math::Min(textLength, currentLength); while (textLength > 0) @@ -824,13 +825,15 @@ TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& display int LTRTextLength = 0; int RTLTextLength = 0; bool drawAbbrevText = false; + bool isEndRTL = false; + int savedLTRTextLength = 0; if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) { - pTextElement = GetElementAtTextIndex(startTextIndex + textLength - 1, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); - SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + pLastDisplayTextElement = GetElementAtTextIndex(startTextIndex + textLength - 1, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pLastDisplayTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - const TextSimple* pSimpleText = dynamic_cast (pTextElement); + const TextSimple* pSimpleText = dynamic_cast (pLastDisplayTextElement); if (pSimpleText != null) { int length = startTextIndex + textLength - elementTextOffset - 1; @@ -883,20 +886,35 @@ TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& display , TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height); } - pLastDisplayTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1); - SysTryCatch(NID_GRP, pLastDisplayTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - - if (pLastDisplayTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastDisplayTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + do { - TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastDisplayTextElement); - SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); + TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1); + SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - SetAbbrevObjectFontInfo(pSimpleText); - } - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); + if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement); + SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); - ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width - , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); + SetAbbrevObjectFontInfo(pSimpleText); + } + __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); + + if (textLength > 0) + { + TextElement* pPrevTextElement = GetElementAtTextIndex(startTextIndex + textLength -1); + SysTryCatch(NID_GRP, pPrevTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (pLastTextElement == pPrevTextElement) + { + break; + } + } + } + while (textLength > 0); textSize.width += abbrevTextDim.width; currentLength = Math::Min(currentLength, textLength); @@ -932,19 +950,21 @@ TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& display SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r)); } - blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height); + blockRect = adjustedRect; + blockRect.y = displayRect.y; currentLength = Math::Min(textLength, currentLength); if (drawAbbrevText) { - if (IsRTLCharacter(startTextIndex + currentLength)) + if (IsRTLCharacter(startTextIndex + currentLength)) // LTR + RTL { + isEndRTL = true; LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex; RTLTextLength = textLength - LTRTextLength; if (LTRTextLength <= 0) { - if (pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) + if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) { r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -958,182 +978,383 @@ TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& display drawAbbrevText = false; } } - else + else // RTL + LTR { - LTRTextLength = textLength; - RTLTextLength = 0; + RTLTextLength= SearchRTLTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex; + LTRTextLength= textLength - RTLTextLength; + + if (LTRTextLength <= 0) + { + if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + + drawAbbrevText = false; + } } } - if (LTRTextLength > 0) + if (isEndRTL == false) { - currentLength = Math::Min(LTRTextLength, currentLength); - - while (LTRTextLength > 0) + if (LTRTextLength > 0) { - LTRTextLength -= currentLength; - - pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + savedLTRTextLength = LTRTextLength; + currentLength = Math::Min(LTRTextLength, currentLength); - switch (alignment & TEXT_ALIGNMASK_VERT) + while (LTRTextLength > 0) { - case TEXT_OBJECT_ALIGNMENT_MIDDLE: - adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; - break; + LTRTextLength -= currentLength; - case TEXT_OBJECT_ALIGNMENT_BOTTOM: - adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); - break; + //pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + pTextElement->GetRegion(textIndexFromElementOffset+RTLTextLength, currentLength, textSize.width, textSize.height); - case TEXT_OBJECT_ALIGNMENT_TOP: - // fall through - default: - adjustedRect.y = displayRect.y; - break; + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; + + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } + + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex+RTLTextLength, currentLength, alignment, action); + } + + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset+RTLTextLength, currentLength, alignment, action); + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!LTRTextLength || adjustedRect.width <= 0) + { + break; + } + + startTextIndex += currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } } + textLength -= savedLTRTextLength; + } + + if (drawAbbrevText && (RTLTextLength > 0)) + { if (pTextElement->IsBackGroundDrawingModeEnable()) { - DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; - if (__displayBlock && isAlternateLookEnabled == false) - { - DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); - } + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; - adjustedRect.x += textSize.width; - adjustedRect.width -= textSize.width; + drawAbbrevText = false; + } - if (!LTRTextLength || adjustedRect.width <= 0) - { - break; - } + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - startTextIndex += currentLength; + if (RTLTextLength > 0) + { + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + currentLength = Math::Min(RTLTextLength, currentLength); - if (pEnum->MoveNext() != E_SUCCESS) + while (RTLTextLength > 0) { - break; + RTLTextLength -= currentLength; + + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; + + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } + + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } + + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!RTLTextLength) + { + break; + } + + startTextIndex += currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } } - pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); - SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + textLength -= RTLTextLength; + } - textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); - currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); - if (currentLength == 0) + if (drawAbbrevText) + { + if (pTextElement->IsBackGroundDrawingModeEnable()) { - break; + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - } - textIndexFromElementOffset += LTRTextLength; - textLength -= LTRTextLength; - } + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - if (drawAbbrevText && (RTLTextLength > 0)) + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + } + } + else { - if (pTextElement->IsBackGroundDrawingModeEnable()) + if (LTRTextLength > 0) { - r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - } + currentLength = Math::Min(LTRTextLength, currentLength); - __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + while (LTRTextLength > 0) + { + LTRTextLength -= currentLength; - adjustedRect.x += abbrevTextDim.width; - adjustedRect.width -= abbrevTextDim.width; + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); - drawAbbrevText = false; - } + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; - if (RTLTextLength > 0) - { - currentLength = Math::Min(RTLTextLength, currentLength); + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; - while (RTLTextLength > 0) - { - RTLTextLength -= currentLength; + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } - pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } - switch (alignment & TEXT_ALIGNMASK_VERT) - { - case TEXT_OBJECT_ALIGNMENT_MIDDLE: - adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; - break; + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } - case TEXT_OBJECT_ALIGNMENT_BOTTOM: - adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); - break; + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); - case TEXT_OBJECT_ALIGNMENT_TOP: - // fall through - default: - adjustedRect.y = displayRect.y; - break; + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + startTextIndex += currentLength; + if (!LTRTextLength || adjustedRect.width <= 0) + { + break; + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } } + textIndexFromElementOffset += LTRTextLength; + textLength -= LTRTextLength; + } + + if (drawAbbrevText && (RTLTextLength > 0)) + { if (pTextElement->IsBackGroundDrawingModeEnable()) { - DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; - if (__displayBlock && isAlternateLookEnabled == false) - { - DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); - } + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; - adjustedRect.x += textSize.width; - adjustedRect.width -= textSize.width; + drawAbbrevText = false; + } - if (!RTLTextLength) - { - break; - } + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - startTextIndex += currentLength; + if (RTLTextLength > 0) + { + currentLength = Math::Min(RTLTextLength, currentLength); - if (pEnum->MoveNext() != E_SUCCESS) + while (RTLTextLength > 0) { - break; - } + RTLTextLength -= currentLength; - pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); - SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); - textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); - currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; - if (currentLength == 0) - { - break; + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; + + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } + + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } + + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!RTLTextLength) + { + break; + } + + startTextIndex += currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } } - } - textLength -= RTLTextLength; - } + textLength -= RTLTextLength; + } - if (drawAbbrevText) - { - if (pTextElement->IsBackGroundDrawingModeEnable()) + if (drawAbbrevText) { - r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - } + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } - __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - adjustedRect.x += abbrevTextDim.width; - adjustedRect.width -= abbrevTextDim.width; + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + } } Release(pEnum); @@ -1276,7 +1497,8 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& display SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r)); } - blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height); + blockRect = adjustedRect; + blockRect.y = displayRect.y; adjustedRect.y = displayRect.y + displayRect.height - baseline; canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE); @@ -1299,16 +1521,16 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& display DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); } - FloatRectangle imageRect = adjustedRect; - imageRect.y -= textSize.height; TextElementType objectType = pTextElement->GetType(); - if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) { pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); } else { + FloatRectangle imageRect = adjustedRect; + imageRect.y -= textSize.height; + pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action); } @@ -1365,6 +1587,7 @@ CATCH: return r; } + result TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, const TextObjectActionType action, int baseline) @@ -1393,6 +1616,8 @@ TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectan int LTRTextLength = 0; int RTLTextLength = 0; bool drawAbbrevText = false; + bool isEndRTL = false; + int savedLTRTextLength = 0; if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) { @@ -1451,247 +1676,500 @@ TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectan , TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height); } - TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1); - SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + do + { + TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1); + SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement); + 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); + + ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width + , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); + + if (textLength > 0) + { + TextElement* pPrevTextElement = GetElementAtTextIndex(startTextIndex + textLength -1); + SysTryCatch(NID_GRP, pPrevTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (pLastTextElement == pPrevTextElement) + { + break; + } + } + } + while (textLength > 0); + + textSize.width += abbrevTextDim.width; + currentLength = Math::Min(currentLength, textLength); + drawAbbrevText = true; + } + + switch (alignment & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_CENTER: + if (textSize.width < adjustedRect.width) { - TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement); - SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); + adjustedRect.x += (adjustedRect.width - textSize.width) / 2; + } + break; - SetAbbrevObjectFontInfo(pSimpleText); + case TEXT_OBJECT_ALIGNMENT_RIGHT: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += adjustedRect.width - textSize.width; } - __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); + break; + + case TEXT_OBJECT_ALIGNMENT_LEFT: + // fall through + default: + break; + } + + pEnum = __pTextElementList->GetEnumeratorN(); + for (int i = 0; i <= elementIndex; i++) + { + r = pEnum->MoveNext(); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r)); + } + + currentLength = Math::Min(textLength, currentLength); + blockRect = adjustedRect; + blockRect.y = displayRect.y; + adjustedRect.y = displayRect.y + displayRect.height - baseline; + canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE); + + if (drawAbbrevText) + { + if (IsRTLCharacter(startTextIndex + currentLength)) // LTR + RTL + { + isEndRTL = true; + LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex; + RTLTextLength = textLength - LTRTextLength; + + if (LTRTextLength <= 0) + { + if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + + drawAbbrevText = false; + } + } + else // RTL + LTR + { + RTLTextLength= SearchRTLTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex; + LTRTextLength= textLength - RTLTextLength; + + if (LTRTextLength <= 0) + { + if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + + drawAbbrevText = false; + } + } + } + + if (isEndRTL == false) + { + if (LTRTextLength > 0) + { + savedLTRTextLength = LTRTextLength; + currentLength = Math::Min(LTRTextLength, currentLength); + + while (LTRTextLength > 0) + { + LTRTextLength -= currentLength; + + //pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + pTextElement->GetRegion(textIndexFromElementOffset+RTLTextLength, currentLength, textSize.width, textSize.height); + + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; + + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } + + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex+RTLTextLength, currentLength, alignment, action); + } + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset+RTLTextLength, currentLength, alignment, action); + } + else + { + FloatRectangle imageRect = adjustedRect; + imageRect.y -= textSize.height; + + pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action); + } + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!LTRTextLength || adjustedRect.width <= 0) + { + break; + } + + startTextIndex += currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } + } + + textLength -= savedLTRTextLength; + } + + if (drawAbbrevText && (RTLTextLength > 0)) + { + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + + drawAbbrevText = false; + } + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (RTLTextLength > 0) + { + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + currentLength = Math::Min(RTLTextLength, currentLength); + + while (RTLTextLength > 0) + { + RTLTextLength -= currentLength; + + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; - ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width - , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height); + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; - textSize.width += abbrevTextDim.width; - currentLength = Math::Min(currentLength, textLength); - drawAbbrevText = true; - } + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } - switch (alignment & TEXT_ALIGNMASK_HORIZ) - { - case TEXT_OBJECT_ALIGNMENT_CENTER: - if (textSize.width < adjustedRect.width) - { - adjustedRect.x += (adjustedRect.width - textSize.width) / 2; - } - break; + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } - case TEXT_OBJECT_ALIGNMENT_RIGHT: - if (textSize.width < adjustedRect.width) - { - adjustedRect.x += adjustedRect.width - textSize.width; - } - break; + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } - case TEXT_OBJECT_ALIGNMENT_LEFT: - // fall through - default: - break; - } + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); - pEnum = __pTextElementList->GetEnumeratorN(); - for (int i = 0; i <= elementIndex; i++) - { - r = pEnum->MoveNext(); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r)); - } + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; - currentLength = Math::Min(textLength, currentLength); - blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height); - adjustedRect.y = displayRect.y + displayRect.height - baseline; - canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE); + if (!RTLTextLength) + { + break; + } - if (drawAbbrevText) - { - if (IsRTLCharacter(startTextIndex + currentLength)) - { - LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex; - RTLTextLength = textLength - LTRTextLength; + startTextIndex += currentLength; - if (LTRTextLength <= 0) - { - if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable()) + if (pEnum->MoveNext() != E_SUCCESS) { - r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + break; } - __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - adjustedRect.x += abbrevTextDim.width; - adjustedRect.width -= abbrevTextDim.width; + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); - drawAbbrevText = false; + if (currentLength == 0) + { + break; + } } + + textLength -= RTLTextLength; } - else - { - LTRTextLength = textLength; - RTLTextLength = 0; - } - } - if (LTRTextLength > 0) - { - currentLength = Math::Min(LTRTextLength, currentLength); - while (LTRTextLength > 0) + if (drawAbbrevText) { - LTRTextLength -= currentLength; - - pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); - if (pTextElement->IsBackGroundDrawingModeEnable()) { - DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; - if (__displayBlock && isAlternateLookEnabled == false) - { - DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); - } + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - FloatRectangle imageRect = adjustedRect; - imageRect.y -= textSize.height; - TextElementType objectType = pTextElement->GetType(); + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + } + } + else + { + if (LTRTextLength > 0) + { + currentLength = Math::Min(LTRTextLength, currentLength); - if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + while (LTRTextLength > 0) { + LTRTextLength -= currentLength; + + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; + + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } + + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); - } - else - { - pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action); - } - adjustedRect.x += textSize.width; - adjustedRect.width -= textSize.width; + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; - if (!LTRTextLength || adjustedRect.width <= 0) - { - break; + startTextIndex += currentLength; + if (!LTRTextLength || adjustedRect.width <= 0) + { + break; + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } } - startTextIndex += currentLength; + textIndexFromElementOffset += LTRTextLength; + textLength -= LTRTextLength; + } - if (pEnum->MoveNext() != E_SUCCESS) + if (drawAbbrevText && (RTLTextLength > 0)) + { + if (pTextElement->IsBackGroundDrawingModeEnable()) { - break; + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); - SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); - currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength()); + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; - if (currentLength == 0) - { - break; - } + drawAbbrevText = false; } - textIndexFromElementOffset += LTRTextLength; - textLength -= LTRTextLength; - } + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - if (drawAbbrevText && (RTLTextLength > 0)) - { - if (pTextElement->IsBackGroundDrawingModeEnable()) + if (RTLTextLength > 0) { - r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - } + currentLength = Math::Min(RTLTextLength, currentLength); - __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + while (RTLTextLength > 0) + { + RTLTextLength -= currentLength; - adjustedRect.x += abbrevTextDim.width; - adjustedRect.width -= abbrevTextDim.width; + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); - drawAbbrevText = false; - } + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2; + break; - if (RTLTextLength > 0) - { - currentLength = Math::Min(RTLTextLength, currentLength); + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + adjustedRect.y = displayRect.y + (displayRect.height - textSize.height); + break; - while (RTLTextLength > 0) - { - RTLTextLength -= currentLength; + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + adjustedRect.y = displayRect.y; + break; + } - pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); + } - if (pTextElement->IsBackGroundDrawingModeEnable()) - { - DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action); - } + bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if (__displayBlock && isAlternateLookEnabled == false) + { + DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); + } - bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; - if (__displayBlock && isAlternateLookEnabled == false) - { - DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action); - } + TextElementType objectType = pTextElement->GetType(); - FloatRectangle imageRect = adjustedRect; - imageRect.y -= textSize.height; - TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); + } + else + { + FloatRectangle imageRect = adjustedRect; + imageRect.y -= textSize.height; - if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) - { - pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action); - } - else - { - pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action); - } + pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action); + } - adjustedRect.x += textSize.width; - adjustedRect.width -= textSize.width; + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; - if (!RTLTextLength) - { - break; - } + if (!RTLTextLength) + { + break; + } - startTextIndex += currentLength; + startTextIndex += currentLength; - if (pEnum->MoveNext() != E_SUCCESS) - { - break; - } + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } - pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); - SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); - textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); - currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength()); - if (currentLength == 0) - { - break; + if (currentLength == 0) + { + break; + } } - } - textLength -= RTLTextLength; - } + textLength -= RTLTextLength; + } - if (drawAbbrevText) - { - if (pTextElement->IsBackGroundDrawingModeEnable()) + if (drawAbbrevText) { - r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); - SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - } + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height)); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } - __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action); - adjustedRect.x += abbrevTextDim.width; - adjustedRect.width -= abbrevTextDim.width; + adjustedRect.x += abbrevTextDim.width; + adjustedRect.width -= abbrevTextDim.width; + } } canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP); @@ -1914,18 +2392,12 @@ TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const Floa int lineOffset = 0; int lineLength = 0; - FloatRectangle adjustedRect; - FloatRectangle lineBounds; - FloatDimension lineTextSize; + FloatRectangle adjustedRect = displayRect; lineLength = pTextLine->GetTextLength(); lineOffset = pTextLine->GetTextOffset(); - lineBounds = pTextLine->GetBoundsF(); - pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); - - adjustedRect = displayRect; - adjustedRect.height = lineBounds.height; + adjustedRect.height = pTextLine->GetBoundsF().height; if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) { @@ -2331,7 +2803,7 @@ TextComposite::GetTextN(int startTextIndex, int textLength) const int textIndexFromElementOffset = 0; wchar_t* pText = new (std::nothrow) wchar_t[textLength+1]; - SysTryReturn(NID_GRP, pText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); wchar_t* pTextPointer = pText; @@ -3303,7 +3775,7 @@ TextComposite::NotifyTextChanged(wchar_t* pText, int startTextIndex, int textLen { TextSimple* pSimpleText = null; pSimpleText = new (std::nothrow)TextSimple(pText, gap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont, fgColor, bgColor, outlineColor); - SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pSimpleText->SetTextOffset(__workStart - startTextIndex); InsertElementAt(*pSimpleText, __workStart); @@ -3379,7 +3851,7 @@ TextComposite::NotifyTextChanged(wchar_t* pText, int startTextIndex, int textLen TextSimple* pSimpleText = null; pSimpleText = new (std::nothrow)TextSimple(pText, gap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont, fgColor, bgColor, outlineColor); - SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pSimpleText->SetTextOffset(__workStart - startTextIndex); InsertElementAt(*pSimpleText, __workStart); @@ -3994,9 +4466,16 @@ TextComposite::SetAbbrevObjectFontInfo(TextSimple* pSimpleText) __pAbbrevTextElement->SetForegroundColor(pSimpleText->GetForegroundColor()); __pAbbrevTextElement->SetBackgroundColor(pSimpleText->GetBackgroundColor()); __pAbbrevTextElement->SetOutlineColor(pSimpleText->GetOutlineColor()); + __pAbbrevTextElement->SetOutlineEnabled(pSimpleText->IsOutlineEnable()); __pAbbrevTextElement->SetAlternativeForegroundColor(pSimpleText->GetAlternativeForegroundColor()); __pAbbrevTextElement->SetAlternateLookEnabled(pSimpleText->IsAlternateLookEnabled()); + if (pSimpleText->IsTextShadowEnable() == true) + { + __pAbbrevTextElement->SetTextShadowEnabled(true); + __pAbbrevTextElement->SetTextShadowOffset(pSimpleText->GetTextShadowOffset()); + } + return true; } @@ -4006,7 +4485,7 @@ TextComposite::ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNon SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); TextLine* pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FloatRectangle lineBounds; FloatDimension lineTextSize; @@ -4106,8 +4585,29 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const Collection::ArrayListT<_FloatPair> pCurrentElementGapListF; - const wchar_t* pText = pSimpleText->GetTextSource(); - pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, currentLength, pCurrentElementGapListF); + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + const wchar_t* pText = pSimpleText->GetText(); + int textLength = pSimpleText->GetTextLength(); + + wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1]; + SysTryCatch(NID_GRP, pModifiedText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + int length = TextSimple::ConvertEnterToSpace(pModifiedText, pText, textLength); + if (length > 0) + { + pModifiedText[textLength] = 0; + pFontImpl->GetTextExtentList(pModifiedText, 0, currentLength, pCurrentElementGapListF); + } + + delete[] pModifiedText; + pModifiedText = null; + } + else + { + const wchar_t* pText = pSimpleText->GetTextSource(); + pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, currentLength, pCurrentElementGapListF); + } IEnumeratorT<_FloatPair >* pCurrentElementGapEnum = pCurrentElementGapListF.GetEnumeratorN(); while (pCurrentElementGapEnum->MoveNext() == E_SUCCESS) @@ -4234,7 +4734,7 @@ TextComposite::ComposeInWrap(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.y = nextY; @@ -4271,7 +4771,7 @@ TextComposite::ComposeInWrap(FloatRectangle& rect) if (!hasPrevLine) { pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.width = rect.width; @@ -4417,7 +4917,7 @@ TextComposite::ComposeInWrap(FloatRectangle& rect) float nextY = lineBounds.y + lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -4434,7 +4934,7 @@ TextComposite::ComposeInWrap(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -4550,7 +5050,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.y = nextY; @@ -4587,7 +5087,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) if (!hasPrevLine) { pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.width = rect.width; @@ -4639,6 +5139,12 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) textCount = 1; } + if ((__frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) && + (textIndex+textCount < __length) && (GetCharacter(textIndex+textCount) == ' ')) + { + textCount++; + } + lineOffset = textIndex; lineLength = textCount; lineTextSize.width = textSize.width; @@ -4706,7 +5212,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) while(pPrevTextLine) { TextLine* pNewTextLine = pPrevTextLine->CopyN(); - SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pNewTextLine->SetTextOffset(pNewTextLine->GetTextOffset() + __workLength); GetTextExtentList(pNewTextLine); @@ -4727,7 +5233,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) while(pPrevTextLine) { TextLine* pNewTextLine = pPrevTextLine->CopyN(); - SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pNewTextLine->SetTextOffset(pNewTextLine->GetTextOffset() - __workLength); GetTextExtentList(pNewTextLine); @@ -4756,7 +5262,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) float nextY = lineBounds.y + lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -4773,7 +5279,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -4890,7 +5396,7 @@ TextComposite::ComposeInPartialMode(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.y = nextY; @@ -4927,7 +5433,7 @@ TextComposite::ComposeInPartialMode(FloatRectangle& rect) if (!hasPrevLine) { pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.width = rect.width; @@ -5084,7 +5590,7 @@ TextComposite::ComposeInPartialMode(FloatRectangle& rect) float nextY = lineBounds.y + lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -5101,7 +5607,7 @@ TextComposite::ComposeInPartialMode(FloatRectangle& rect) lineTextSize.height = lineBounds.height; pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); lineBounds.x = rect.x; lineBounds.y = nextY; @@ -5212,7 +5718,7 @@ TextComposite::ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect) maxHeight = (maxHeight < textSize.height) ? textSize.height : maxHeight; TextLine* pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineBounds.width, maxHeight); @@ -5279,7 +5785,7 @@ TextComposite::ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect) maxHeight = textSize.height; TextLine* pTextLine = new (std::nothrow)TextLine(this); - SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineBounds.width, maxHeight); @@ -6037,7 +6543,7 @@ TextComposite::GetDisplayableText(FloatRectangle displayRect, TextObjectActionTy displayableTextLength += lineLength; wchar_t* pText = GetTextN(firstDisplayTextIndex, displayableTextLength); - SysTryReturn(NID_GRP, pText, String(L""), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pText, String(L""), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); String text(pText); delete[] pText; @@ -6277,4 +6783,46 @@ TextComposite::SearchLTRTextIndex(int startTextIndex,int fromTextIndex) const return LTRTextIndex; } +int +TextComposite::SearchRTLTextIndex(int startTextIndex,int fromTextIndex) const +{ + SysTryReturn(NID_GRP, 0 <= fromTextIndex, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + bool isRTL = false; + int RTLTextIndex = -1; + wchar_t ch = 0; + + for (int i = fromTextIndex; i >= startTextIndex; i--) + { + ch = GetCharacter(i); + + if (TextUtility::IsRTLCharacter(ch)) + { + isRTL = true; + } + + if (isRTL == true) + { + RTLTextIndex = i + 1; + + while(1) + { + ch = GetCharacter(RTLTextIndex); + if (TextUtility::IsStrongCharacter(ch)) + { + break; + } + + RTLTextIndex++; + } + + break; + } + } + + RTLTextIndex = (startTextIndex <= RTLTextIndex && RTLTextIndex <= fromTextIndex) ? RTLTextIndex : startTextIndex; + + return RTLTextIndex; +} + }}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextComposite.h b/src/graphics/text/FGrp_TextTextComposite.h index 4606bf9..db36d7a 100644 --- a/src/graphics/text/FGrp_TextTextComposite.h +++ b/src/graphics/text/FGrp_TextTextComposite.h @@ -290,6 +290,8 @@ public: int SearchLTRTextIndex(int startTextIndex,int fromTextIndex) const; + int SearchRTLTextIndex(int startTextIndex,int fromTextIndex) const; + private: int ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null); diff --git a/src/graphics/text/FGrp_TextTextCutLink.cpp b/src/graphics/text/FGrp_TextTextCutLink.cpp index be626b7..bea0647 100644 --- a/src/graphics/text/FGrp_TextTextCutLink.cpp +++ b/src/graphics/text/FGrp_TextTextCutLink.cpp @@ -95,7 +95,7 @@ TextCutLink::CloneN(TextComponentInfoValueType type, unsigned int value) pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, _pText, _length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, _pFont, _foregroundColor, _backgroundColor, _outlineColor); - SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); TextElement::CopyMembers(pLinkElement); @@ -126,7 +126,7 @@ TextCutLink::CopyN(int textStartIndex, int textLength) pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, pText, textLength, _sourceType, _pFont, _foregroundColor, _backgroundColor, _outlineColor); - SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pLinkElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled; pLinkElement->__isEdited = __isEdited; diff --git a/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp b/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp index c36ec94..342643e 100644 --- a/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp +++ b/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp @@ -76,7 +76,7 @@ TextCutLinkListInfo::InsertCutLinkElementInfo(int textIndex, TextCutLink& linkTe CutLinkTextElementInfo* pCutlinkTextElementInfo = new (std::nothrow) CutLinkTextElementInfo; SysTryCatch(NID_GRP , pCutlinkTextElementInfo - , r = E_INVALID_ARG, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + , r = E_INVALID_ARG, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); while (pEnum->MoveNext() == E_SUCCESS) diff --git a/src/graphics/text/FGrp_TextTextCutLinkParser.cpp b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp index a4b8ebb..f163424 100644 --- a/src/graphics/text/FGrp_TextTextCutLinkParser.cpp +++ b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp @@ -324,7 +324,7 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta int linkOffset = index; const wchar_t* pText = text.GetPointer(); - if (pText[index + 1] == L'@') + if ((index+1 < totalLength) && (pText[index + 1] == L'@')) { return false; } @@ -333,7 +333,7 @@ IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkSta if (index > lastLinkEndIndex) { - while (IsEmailCharacter(pText[linkOffset]) && lastLinkEndIndex <= linkOffset) + while (lastLinkEndIndex <= linkOffset && IsEmailCharacter(pText[linkOffset])) { linkOffset--; } @@ -514,7 +514,7 @@ 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] Memory allocation failed."); r = gpUrlPrefixes->Construct(); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); @@ -528,7 +528,7 @@ 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] Memory allocation failed."); r = gpDomainNames->Construct(); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); @@ -670,7 +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] Memory allocation failed."); pTextLink->index = -1; @@ -728,7 +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] Memory allocation failed."); AppendTextLinkInfo(pTextLink, pNextLink); } @@ -802,7 +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] Memory allocation failed."); pTextLinkInfo->index = 0; pTextLinkInfo->srcOffset = offset; diff --git a/src/graphics/text/FGrp_TextTextImage.cpp b/src/graphics/text/FGrp_TextTextImage.cpp index 6b25ddb..e61112a 100644 --- a/src/graphics/text/FGrp_TextTextImage.cpp +++ b/src/graphics/text/FGrp_TextTextImage.cpp @@ -53,7 +53,7 @@ TextImage::TextImage(Bitmap& bitmap, TextElementSourceType sourceType, TextObjec __pBitmap = new (std::nothrow) Bitmap(); SysTryCatch(NID_GRP , __pBitmap - , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pBitmap->Construct(bitmap, Rectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight())); SysTryCatch(NID_GRP @@ -245,7 +245,7 @@ TextImage::CloneN(TextComponentInfoValueType type, unsigned int value) pImageText = new (std::nothrow) TextImage(*__pBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __align); SysTryReturn(NID_GRP , pImageText - , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); TextElement::CopyMembers(pImageText); @@ -270,7 +270,7 @@ TextImage::CopyN(int startTextIndex, int textLength) } TextImage* pImageText = new (std::nothrow) TextImage(*__pBitmap, _sourceType, __align); - SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pImageText; } diff --git a/src/graphics/text/FGrp_TextTextLine.cpp b/src/graphics/text/FGrp_TextTextLine.cpp index d22c42f..d83dfc7 100644 --- a/src/graphics/text/FGrp_TextTextLine.cpp +++ b/src/graphics/text/FGrp_TextTextLine.cpp @@ -26,6 +26,7 @@ #include "FGrp_TextCommon.h" #include "FGrp_TextTextComposite.h" #include "FGrp_TextTextLine.h" +#include "FGrp_TextTextUtility.h" #include "FGrp_CoordinateSystemUtils.h" #include @@ -160,7 +161,7 @@ TextLine::CopyN(void) pTextLine = new (std::nothrow) TextLine(__pCompositeText); - SysTryReturn(NID_GRP, pTextLine, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextLine, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextLine->__rect = __rect; pTextLine->__endType = __endType; @@ -514,10 +515,15 @@ TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const pEnum->GetCurrent(currentGap); - FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) }; - FriBidiCharType type[1] = { 0 }; - fribidi_get_bidi_types(text, 1, type); - bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0; + TextBidiHint bidiHint = _GetTextBidiHint(); + wchar_t ch = __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1); + bool isRtl = TextUtility::IsRTLCharacter(ch); + bool isLtr = TextUtility::IsLTRCharacter(ch); + bool isNeutral = TextUtility::IsNeutralCharacter(ch); + + bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false; + + isRtl = (!isRtl && !isLtr && isNeutral) ? isBidiEnabled : isRtl; extent.x = (isRtl == true) ? currentGap.first : currentGap.second; extent.width = 0; @@ -545,12 +551,18 @@ TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const } else { + TextBidiHint bidiHint = _GetTextBidiHint(); float prevLeft = 0; float prevRight = 0; - FriBidiChar text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1), __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)}; - FriBidiCharType type[2] = { 0, 0 }; - fribidi_get_bidi_types(text, 2, type); - bool isRtl[2] = {(type[0] & FRIBIDI_MASK_RTL) > 0, (type[1] & FRIBIDI_MASK_RTL) > 0}; + wchar_t text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1), __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)}; + bool isRtl[2] = {TextUtility::IsRTLCharacter(text[0]), TextUtility::IsRTLCharacter(text[1])}; + bool isLtr[2] = {TextUtility::IsLTRCharacter(text[0]), TextUtility::IsLTRCharacter(text[1])}; + bool isNeutral[2] = {TextUtility::IsNeutralCharacter(text[0]), TextUtility::IsNeutralCharacter(text[1])}; + bool isWeak[2] = {TextUtility::IsWeakCharacter(text[0]), TextUtility::IsWeakCharacter(text[1])}; + + bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false; + isRtl[0] = (!isRtl[0] && !isLtr[0] && isNeutral[0]) ? isBidiEnabled : isRtl[0]; + isRtl[1] = (!isRtl[1] && !isLtr[1] && isNeutral[1]) ? isBidiEnabled : isRtl[1]; for (int i = 0; i < textIndexFromLineOffset; i++) { @@ -566,7 +578,14 @@ TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const if (isRtl[0] && isRtl[1]) // R + R { - extent.x = prevLeft; + if (isNeutral[0] && isNeutral[1]) + { + extent.x = prevRight; + } + else + { + extent.x = prevLeft; + } } else if (isRtl[0] && !isRtl[1]) // R + L { @@ -574,7 +593,14 @@ TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const } else if (!isRtl[0] && !isRtl[1]) // L + L { - extent.x = currentGap.first; + if ((isWeak[0] && isWeak[1]) && (prevLeft != currentGap.second)) + { + extent.x = prevRight; + } + else + { + extent.x = currentGap.first; + } } else if (!isRtl[0] && isRtl[1]) // L + R { @@ -582,7 +608,6 @@ TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const } extent.width = 0; - for (int i = 0; i < textLength; i++) { pEnum->GetCurrent(currentGap); diff --git a/src/graphics/text/FGrp_TextTextObject.cpp b/src/graphics/text/FGrp_TextTextObject.cpp index 9b60925..cbc83a7 100644 --- a/src/graphics/text/FGrp_TextTextObject.cpp +++ b/src/graphics/text/FGrp_TextTextObject.cpp @@ -139,13 +139,13 @@ TextObject::Construct(void) __bidiHint = TEXT_BIDI_HINT_NONE; __pCompositeText = new (std::nothrow)TextComposite(); - SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextColumn = new (std::nothrow)TextColumn(__pCompositeText); - SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pDefaultFont = new (std::nothrow)Font(); - SysTryCatch(NID_GRP, __pDefaultFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pDefaultFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font."); @@ -182,13 +182,13 @@ TextObject::Construct(const Rectangle& rect) __rect = _CoordinateSystemUtils::ConvertToFloat(rect); __pCompositeText = new (std::nothrow)TextComposite(); - SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextColumn = new (std::nothrow)TextColumn(__pCompositeText); - SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pDefaultFont = new (std::nothrow)Font(); - SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font."); @@ -225,13 +225,13 @@ TextObject::Construct(const FloatRectangle& rect) __rect = rect; __pCompositeText = new (std::nothrow)TextComposite(); - SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextColumn = new (std::nothrow)TextColumn(__pCompositeText); - SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pDefaultFont = new (std::nothrow)Font(); - SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font."); @@ -261,7 +261,7 @@ TextObject::CloneN(void) int count = __pCompositeText->GetElementCount(); pTextObject = new (std::nothrow)TextObject(); - SysTryReturn(NID_GRP, pTextObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pTextObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pTextObject->Construct(); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -721,6 +721,7 @@ TextObject::Compose(void) { if (GetTotalLineCount() != 0) { + _SetTextBidiHint(bidiHint); return E_SUCCESS; } } @@ -729,6 +730,7 @@ TextObject::Compose(void) { if (!__isChanged || __pTextColumn->GetChangeActionEventCount() == 0) { + _SetTextBidiHint(bidiHint); return E_SUCCESS; } } @@ -1498,10 +1500,14 @@ TextObject::SetFont(Font* pFont, int startTextIndex, int textLength) __pDefaultFont = pTmpFont; __pCompositeText->SetRange(startTextIndex, textLength); - r = __pCompositeText->SetFont(__pDefaultFont); - SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - UpdateChangedInfo(__pCompositeText->GetWorkStart(), 0); + if (textLength > 0) + { + r = __pCompositeText->SetFont(__pDefaultFont); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UpdateChangedInfo(__pCompositeText->GetWorkStart(), 0); + } return E_SUCCESS; } @@ -1795,7 +1801,7 @@ TextObject::InsertElementAt(int textIndex, Bitmap& bitmap, TextElementSourceType IF_NOT_CONSTRUCTED(return E_INVALID_STATE); TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP)); - SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); int addedTextLength = pImageText->GetTextLength(); __pCompositeText->InsertElementAt(*pImageText, textIndex); @@ -1812,7 +1818,7 @@ TextObject::AppendElement(Bitmap& bitmap, TextElementSourceType sourceType) result r = E_SUCCESS; TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP)); - SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pCompositeText->AppendElement(*pImageText); SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2839,11 +2845,6 @@ TextObject::GetTextIndexFromPositionInWrap(float x, float y, bool cursorMode) co break; } - if (x < 0.0f) - { - x = 0.0f; - } - int index = pTextLine->GetTextIndexFromPosition(x); _SetTextBidiHint(bidiHint); @@ -3284,18 +3285,22 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex) int lineOffset = 0; int lineEndIndex = 0; int lineLength = 0; - int count = 0; float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); FloatRectangle lineBounds; FloatDimension lineTextSize; - FloatDimension currentLinetextSize; - FloatDimension prevTextSize; + + FloatRectangle currentLinetextSizeRect; + FloatRectangle prevTextSizeRect; _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); TextLine* pTextLine = __pTextColumn->GetTextLine(0); - SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + if (!pTextLine) + { + SysLog(NID_GRP, "Fail to get text line"); + return E_SYSTEM; + } lineOffset = pTextLine->GetTextOffset(); lineLength = pTextLine->GetTextLength(); @@ -3304,68 +3309,68 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex) pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); - __pCompositeText->ForwardAnalyze(lineOffset, textIndex, lineBounds.width, __wrap, count, currentLinetextSize.width, currentLinetextSize.height); + currentLinetextSizeRect = pTextLine->GetTextExtentF(textIndex, 1); if (0 < textIndex) { - __pCompositeText->ForwardAnalyze(lineOffset, textIndex - 1, lineBounds.width,__wrap, count, prevTextSize.width, prevTextSize.height); + prevTextSizeRect = pTextLine->GetTextExtentF(textIndex - 1, 1); } - if (prevTextSize.width < firstDisplayPositionX) + if (textIndex == 0) { - SetFirstDisplayPositionX(prevTextSize.width); + SetFirstDisplayPositionX(lineBounds.x); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); pTextLine->SetTextLength(lineLength); - __pCompositeText->GetTextExtentList(pTextLine); } - else if (firstDisplayPositionX + __rect.width <= currentLinetextSize.width) // 글자가 display 영역 뒤로 계속 쓸 때 + else if (prevTextSizeRect.x < firstDisplayPositionX) { - float tempWidth = 0.0f; - float tempHeight = 0.0f; - int textCount = 0; + SetFirstDisplayPositionX(prevTextSizeRect.x); - __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight); - SetFirstDisplayPositionX(tempWidth - __rect.width); + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + } + else if (firstDisplayPositionX + __rect.width <= currentLinetextSizeRect.x) // 글자가 display 영역 뒤로 계속 쓸 때 + { + FloatRectangle tempTextSize; + + tempTextSize = pTextLine->GetTextExtentF(textIndex, 1); + + SetFirstDisplayPositionX(tempTextSize.x - __rect.width); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); pTextLine->SetTextOffset(0); pTextLine->SetTextLength(lineLength); - __pCompositeText->GetTextExtentList(pTextLine); } else if (lineBounds.width < firstDisplayPositionX + __rect.width && lineLength <= textIndex) // 글 꽉 채운 후 한글자씩 지울 때 { - float tempWidth = 0.0f; - float tempHeight = 0.0f; - int textCount = 0; + FloatRectangle tempTextSize; - __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight); - SetFirstDisplayPositionX(tempWidth - __rect.width); + tempTextSize = pTextLine->GetTextExtentF(textIndex, 1); + + SetFirstDisplayPositionX(tempTextSize.x - __rect.width); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); pTextLine->SetTextOffset(0); pTextLine->SetTextLength(lineLength); - __pCompositeText->GetTextExtentList(pTextLine); } else if (lineBounds.width < firstDisplayPositionX + __rect.width) // 글 꽉 채운 후에, 중간에 글자를 지울 때, { - float tempWidth = 0.0f; - float tempHeight = 0.0f; - int textCount = 0; + FloatRectangle tempTextSize; - float gap = __rect.width - (lineBounds.width - currentLinetextSize.width); + float gap = __rect.width - (lineBounds.width - currentLinetextSizeRect.x); + tempTextSize = pTextLine->GetTextExtentF(textIndex, 1); - __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight); - SetFirstDisplayPositionX(tempWidth - gap); + SetFirstDisplayPositionX(tempTextSize.x - gap); pTextLine->SetBounds(lineBounds); pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); pTextLine->SetTextOffset(0); pTextLine->SetTextLength(lineLength); - __pCompositeText->GetTextExtentList(pTextLine); } __pTextColumn->SetFirstDisplayLineIndex(0); @@ -3562,7 +3567,7 @@ TextObject::GetTextPositionInfoInWrapAt(int row, int column, float& width, float float lineY = lineBounds.y; SysTryReturn(NID_GRP, lineOffset <= textIndex && textIndex <= lineOffset + lineLength - , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d column = %d)", row, column); + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d, column = %d)", row, column); FloatDimension lineTextSize; pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); @@ -3954,6 +3959,8 @@ TextObject::GetTextPositionInfoInNoneWrapAt(int row, int column, float& width, f float posX = 0.0f; float posY = 0.0f; + SysTryReturn(NID_GRP, 0 <= column && column <= lineLength, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d, column = %d)", row, column); + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); diff --git a/src/graphics/text/FGrp_TextTextSimple.cpp b/src/graphics/text/FGrp_TextTextSimple.cpp index 80032af..0bde98a 100644 --- a/src/graphics/text/FGrp_TextTextSimple.cpp +++ b/src/graphics/text/FGrp_TextTextSimple.cpp @@ -43,7 +43,7 @@ namespace // unnamed { const int DEFAULT_FONT_SIZE = 42; - const int LINE_FEED_WIDTH = 8; + //const int LINE_FEED_WIDTH = 8; } namespace Tizen { namespace Graphics @@ -102,6 +102,13 @@ TextSimple::TextSimple(const wchar_t* pText, int length, TextElementSourceType s __bitmapProperty.displayEnable = false; __bitmapProperty.pBitmap = null; + + _shadow = false; + _shadowOffset.x = 0; + _shadowOffset.y = 2; + _opacity = 191; + _shadowColor = Color::GetColor(COLOR_ID_WHITE); + _shadowColor.SetAlpha(_opacity); } TextSimple::~TextSimple(void) @@ -201,7 +208,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, T if (_userWrap == TEXT_OBJECT_WRAP_TYPE_NONE) { wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1]; - SysTryReturn(NID_GRP, pModifiedText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pModifiedText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); int length = ConvertEnterToSpace(pModifiedText, pText, textLength); pModifiedText[length] = 0; @@ -452,7 +459,7 @@ TextSimple::GetRegion(int textIndex, int textLength, float& width, float& height case TEXT_OBJECT_WRAP_TYPE_NONE: { wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1]; - SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); int length = ConvertEnterToSpace(pModifiedText, pText, textLength); pModifiedText[textLength] = 0; @@ -559,27 +566,55 @@ TextSimple::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int start { if (_outline) { + if (_shadow) + { + canvasImpl.SetForegroundColor(_shadowColor); + r = TextUtility::DrawOutlineText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, &_pText[startTextIndex], textLength, outlineColor); + } + + canvasImpl.SetForegroundColor(foregroundColor); return TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength, outlineColor); } else { + if (_shadow) + { + canvasImpl.SetForegroundColor(_shadowColor); + r = TextUtility::DrawText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, &_pText[startTextIndex], textLength); + } + + canvasImpl.SetForegroundColor(foregroundColor); return TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength); } } else { wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1]; - SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); int length = ConvertEnterToSpace(pModifiedText, &_pText[startTextIndex], textLength); pModifiedText[length] = 0; if (_outline) { + if (_shadow) + { + canvasImpl.SetForegroundColor(_shadowColor); + TextUtility::DrawOutlineText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, pModifiedText, length, outlineColor); + } + + canvasImpl.SetForegroundColor(foregroundColor); TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length, outlineColor); } else { + if (_shadow) + { + canvasImpl.SetForegroundColor(_shadowColor); + TextUtility::DrawText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, pModifiedText, length); + } + + canvasImpl.SetForegroundColor(foregroundColor); TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length); } @@ -600,7 +635,7 @@ TextSimple::CloneN(TextComponentInfoValueType type, unsigned int value) pSimpleTextElement = new (std::nothrow) TextSimple(_pText, _length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, _pFont, _foregroundColor, _backgroundColor, _outlineColor); - SysTryReturn(NID_GRP, pSimpleTextElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pSimpleTextElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); TextElement::CopyMembers(pSimpleTextElement); @@ -638,7 +673,7 @@ TextSimple::CopyN(int startTextIndex, int textLength) pText = &_pText[_offset + startTextIndex]; pSimpleTextElement = new (std::nothrow) TextSimple(pText, textLength, _sourceType, _pFont, _foregroundColor, _backgroundColor, _outlineColor); - SysTryReturn(NID_GRP, pSimpleTextElement, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pSimpleTextElement, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pSimpleTextElement->SetUserWrap(_userWrap); pSimpleTextElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled; @@ -733,6 +768,10 @@ TextSimple::SetValue(TextComponentInfoValueType type, unsigned int value) case SET_FONT_FGCOLOR: _foregroundColor = Color(value); + if (_shadow) + { + SetTextShadowColor(); + } break; case SET_FONT_BGCOLOR: @@ -792,6 +831,10 @@ void TextSimple::SetForegroundColor(const Color& color) { _foregroundColor = color; + if (_shadow) + { + SetTextShadowColor(); + } } void @@ -807,6 +850,18 @@ TextSimple::SetOutlineColor(const Color& color) _outline = true; } +void +TextSimple::SetOutlineEnabled(bool enable) +{ + _outline = enable; +} + +bool +TextSimple::IsOutlineEnable(void) const +{ + return _outline; +} + const Font* TextSimple::GetFont(void) const { @@ -1141,14 +1196,14 @@ int TextSimple::GetGlyphedLength(const wchar_t* pText, int textLength, int& actualLength) const { FriBidiChar* pBidiText = new (std::nothrow) FriBidiChar[textLength]; - SysTryReturn(NID_GRP, pBidiText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_GRP, pBidiText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); for (int i = 0; i < textLength; i++) { pBidiText[i] = pText[i]; } FriBidiCharType* pBidiType = new (std::nothrow) FriBidiCharType[textLength]; - SysTryCatch(NID_GRP, pBidiText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryCatch(NID_GRP, pBidiText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); fribidi_get_bidi_types(pBidiText, textLength, pBidiType); @@ -1360,7 +1415,7 @@ TextSimple::SetBitmap(const Bitmap& bitmap) result r = E_SUCCESS; Bitmap* pBitmap = new (std::nothrow) Bitmap(); - SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pBitmap->Construct(bitmap, Rectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight())); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); @@ -1389,7 +1444,7 @@ TextSimple::SetBitmap(BitmapDisplayProperty bitmapDisplayProperty) result r = E_SUCCESS; Bitmap* pBitmap = new (std::nothrow) Bitmap(); - SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pBitmap->Construct(*bitmapDisplayProperty.pBitmap, Rectangle(0, 0, bitmapDisplayProperty.pBitmap->GetWidth(), bitmapDisplayProperty.pBitmap->GetHeight())); SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); @@ -1665,4 +1720,82 @@ TextSimple::IsDelimiter(const wchar_t ch) const return isDelimiter; } +void +TextSimple::SetTextShadowColor(void) +{ + TextObjectColorRGB rgb; + TextObjectColorHSL hsl; + + rgb.R = _foregroundColor.GetRed(); + rgb.G = _foregroundColor.GetGreen(); + rgb.B = _foregroundColor.GetBlue(); + + hsl = TextUtility::ConvertRGBToHSL(rgb); + float minL = (50.0f - ((pow(9, 0.5f) - 1.0f)/8.0f * 50.0f)); + + hsl.L = hsl.L / 100; + + if (0.0f <= hsl.L && hsl.L < 0.5f) + { + hsl.L = (50.0f - ((pow(9, hsl.L) - 1.0f)/8.0f * 50.0f)) + 50.0f; + } + else if (0.5f <= hsl.L && hsl.L <= 1.0f) + { + hsl.L -= 0.5f; + hsl.L = (50.0f - ((pow(9, hsl.L) - 1.0f)/8.0f * 50.0f)) - minL; + } + + hsl.H = 0; + hsl.S = 0; + + rgb = TextUtility::ConvertHSLToRGB(hsl); + + _shadowColor = Color(rgb.R, rgb.G, rgb.B, (float)_foregroundColor.GetAlpha() * (float)_opacity / 255.0f); +} + +void +TextSimple::SetTextShadowColor(const Color color) +{ + _shadowColor = color; + _opacity = color.GetAlpha(); +} + +Color +TextSimple::GetTextShadowColor(void) const +{ + return _shadowColor; +} + +void +TextSimple::SetTextShadowOffset(const FloatPoint& offset) +{ + _shadowOffset = offset; +} + +FloatPoint +TextSimple::GetTextShadowOffset(void) const +{ + return _shadowOffset; +} + +void +TextSimple::SetTextShadowEnabled(bool enable) +{ + if (_shadow != enable) + { + _shadow = enable; + + if (_shadow) + { + SetTextShadowColor(); + } + } +} + +bool +TextSimple::IsTextShadowEnable(void) const +{ + return _shadow; +} + }}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextUtility.cpp b/src/graphics/text/FGrp_TextTextUtility.cpp index 5f03970..0a7ada0 100644 --- a/src/graphics/text/FGrp_TextTextUtility.cpp +++ b/src/graphics/text/FGrp_TextTextUtility.cpp @@ -473,6 +473,36 @@ TextUtility::IsStrongCharacter(wchar_t ch) return false; } +bool +TextUtility::IsNeutralCharacter(wchar_t ch) +{ + FriBidiChar text[1] = { ch }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + + if (type[0] & (FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_LETTER)) + { + return true; + } + + return false; +} + +bool +TextUtility::IsWeakCharacter(wchar_t ch) +{ + FriBidiChar text[1] = { ch }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + + if (type[0] & (FRIBIDI_MASK_WEAK | FRIBIDI_MASK_LETTER)) + { + return true; + } + + return false; +} + float TextUtility::Abs(const float t) { @@ -482,9 +512,13 @@ TextUtility::Abs(const float t) const float TextUtility::Min(const float a, const float b) { - if (a < b) - return a; - return b; + return (a < b) ? a : b; +} + +const float +TextUtility::Max(const float a, const float b) +{ + return (a >= b) ? a : b; } bool @@ -493,5 +527,116 @@ TextUtility::FloatCompareL(float p1, float p2) return (p1 < p2 && Abs(p1 - p2) >= ALMOST_ZERO_FLOAT * Min(Abs(p1), Abs(p2))); } +TextObjectColorHSL +TextUtility::ConvertRGBToHSL(TextObjectColorRGB rgb) +{ + float min; + float max; + float delta; + TextObjectColorHSL hsl; + + rgb.R = rgb.R / 255; + rgb.G = rgb.G / 255; + rgb.B = rgb.B / 255; + + min = Min(rgb.R,Min(rgb.G,rgb.B)); + max = Max(rgb.R,Max(rgb.G,rgb.B)); + delta = max - min; + hsl.L = (min + max) / 2; + + hsl.S = 0; + if (hsl.L > 0 && hsl.L < 1) + { + hsl.S = delta / (hsl.L < 0.5 ? (2 * hsl.L) : (2 - 2 * hsl.L)); + } + hsl.H = 0; + + if (delta > 0) + { + if (max == rgb.R && max != rgb.G) + { + hsl.H += (rgb.G - rgb.B) / delta; + } + if (max == rgb.G && max != rgb.B) + { + hsl.H += (2 + (rgb.B - rgb.R) / delta); + } + if (max == rgb.B && max != rgb.R) + { + hsl.H += (4 + (rgb.R - rgb.G) / delta); + } + hsl.H *= 60; + } + + hsl.S = hsl.S * 100; + hsl.L = hsl.L * 100; + + return(hsl); +} + +TextObjectColorRGB +TextUtility::ConvertHSLToRGB(TextObjectColorHSL hsl) +{ + TextObjectColorRGB rgb,sat,ctmp; + + hsl.S = hsl.S / 100; + hsl.L = hsl.L / 100; + + while (hsl.H < 0) + { + hsl.H += 360; + } + while (hsl.H > 360) + { + hsl.H -= 360; + } + + if (hsl.H < 120) + { + sat.R = (120 - hsl.H) / 60.0; + sat.G = hsl.H / 60.0; + sat.B = 0; + } + else if (hsl.H < 240) + { + sat.R = 0; + sat.G = (240 - hsl.H) / 60.0; + sat.B = (hsl.H - 120) / 60.0; + } + else + { + sat.R = (hsl.H - 240) / 60.0; + sat.G = 0; + sat.B = (360 - hsl.H) / 60.0; + } + + sat.R = Min(sat.R,1); + sat.G = Min(sat.G,1); + sat.B = Min(sat.B,1); + + ctmp.R = 2 * hsl.S * sat.R + (1 - hsl.S); + ctmp.G = 2 * hsl.S * sat.G + (1 - hsl.S); + ctmp.B = 2 * hsl.S * sat.B + (1 - hsl.S); + + if (hsl.L < 0.5) + { + rgb.R = hsl.L * ctmp.R; + rgb.G = hsl.L * ctmp.G; + rgb.B = hsl.L * ctmp.B; + } + else + { + rgb.R = (1 - hsl.L) * ctmp.R + 2 * hsl.L - 1; + rgb.G = (1 - hsl.L) * ctmp.G + 2 * hsl.L - 1; + rgb.B = (1 - hsl.L) * ctmp.B + 2 * hsl.L - 1; + } + + rgb.R = rgb.R * 255; + rgb.G = rgb.G * 255; + rgb.B = rgb.B * 255; + + return(rgb); +} + }}} // Tizen::Graphics::_Texts diff --git a/src/graphics/text/FGrp_TextTextUtility.h b/src/graphics/text/FGrp_TextTextUtility.h index 7c97590..4cb4d8e 100644 --- a/src/graphics/text/FGrp_TextTextUtility.h +++ b/src/graphics/text/FGrp_TextTextUtility.h @@ -79,12 +79,22 @@ public: static bool IsStrongCharacter(wchar_t ch); + static bool IsNeutralCharacter(wchar_t ch); + + static bool IsWeakCharacter(wchar_t ch); + static float Abs(const float t); static const float Min(const float a, const float b); + static const float Max(const float a, const float b); + static bool FloatCompareL(float p1, float p2); + static TextObjectColorHSL ConvertRGBToHSL(TextObjectColorRGB rgb); + + static TextObjectColorRGB ConvertHSLToRGB(TextObjectColorHSL hsl); + }; // TextUtility }}} // Tizen::Graphics::_Text diff --git a/src/graphics/util/FGrp_Util.cpp b/src/graphics/util/FGrp_Util.cpp index d0eccb4..8dc9a56 100644 --- a/src/graphics/util/FGrp_Util.cpp +++ b/src/graphics/util/FGrp_Util.cpp @@ -90,7 +90,7 @@ _Util::Validate(const ::Tizen::Graphics::Rectangle& rtSrc, const ::Tizen::Graphi if (rtSrc.width <= 0 || rtSrc.height <= 0 || rtDest.width <= 0 || rtDest.height <= 0) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%d,h:%d), dst(w:%d,h:%d)).\n", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(w:%d,h:%d), dst(w:%d,h:%d)).\n", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height); } // check 2. is src exiting outside of dest entirely? @@ -98,14 +98,14 @@ _Util::Validate(const ::Tizen::Graphics::Rectangle& rtSrc, const ::Tizen::Graphi rtSrc.x + rtSrc.width - 1 < rtDest.x) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); } if (rtSrc.y > rtDest.y + rtDest.height - 1 || rtSrc.y + rtSrc.height - 1 < rtDest.y) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); } return E_SUCCESS; @@ -118,21 +118,21 @@ _Util::Validate(const ::Tizen::Graphics::FloatRectangle& rtSrcF, const ::Tizen:: if (rtSrcF.width <= 0.0f || rtSrcF.height <= 0.0f || rtDestF.width <= 0.0f || rtDestF.height <= 0.0f) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%f,h:%f), dst(w:%f,h:%f)).\n", rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(w:%f,h:%f), dst(w:%f,h:%f)).\n", rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height); } // check 2. is src exiting outside of dest entirely? if (rtSrcF.x >= rtDestF.x + rtDestF.width || rtSrcF.x + rtSrcF.width <= rtDestF.x) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); } if (rtSrcF.y >= rtDestF.y + rtDestF.height || rtSrcF.y + rtSrcF.height <= rtDestF.y) { SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); } return E_SUCCESS; @@ -147,7 +147,7 @@ _Util::Validate(const ::Tizen::Graphics::Point& ptSrc, const ::Tizen::Graphics:: } SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n", ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n", ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width, rtDest.height); } result @@ -159,7 +159,7 @@ _Util::Validate(const ::Tizen::Graphics::FloatPoint& ptSrcF, const ::Tizen::Grap } SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); - SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); + SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height); } bool @@ -501,19 +501,19 @@ _Util::GetPatchList(_Util::AccumList <_Util::Pair <_Util::Rectangle, _Util: // APPLY_SRC_BITMAP_ATTRIB(srcImage, bitmap); std::unique_ptr pRegionWidthes(new (std::nothrow) int[srcImage.width]); - SysTryReturnResult(NID_GRP, pRegionWidthes, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pRegionWidthes, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); std::unique_ptr pWidthStretchable(new (std::nothrow) bool[srcImage.width]); - SysTryReturnResult(NID_GRP, pWidthStretchable, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pWidthStretchable, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); memset(pRegionWidthes.get(), 0, sizeof(int) * srcImage.width); memset(pWidthStretchable.get(), 0, sizeof(bool) * srcImage.width); std::unique_ptr pRegionHeights(new (std::nothrow) int[srcImage.height]); - SysTryReturnResult(NID_GRP, pRegionHeights, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pRegionHeights, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); std::unique_ptr pHeightStretchable(new (std::nothrow) bool[srcImage.height]); - SysTryReturnResult(NID_GRP, pHeightStretchable, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pHeightStretchable, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); memset(pRegionHeights.get(), 0, sizeof(int) * srcImage.height); memset(pHeightStretchable.get(), 0, sizeof(bool) * srcImage.height); @@ -538,7 +538,7 @@ _Util::GetPatchList(_Util::AccumList <_Util::Pair <_Util::Rectangle, _Util: // 2. Split source image into separate stretchable/unstretchable regions. std::unique_ptr< ::Tizen::Graphics::Rectangle[]> pSrcRectLists(new (std::nothrow) ::Tizen::Graphics::Rectangle[numWidth * numHeight]); - SysTryReturnResult(NID_GRP, pSrcRectLists, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pSrcRectLists, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); int vertical = 0; int horizontal = 0; @@ -607,7 +607,7 @@ _Util::GetPatchList(_Util::AccumList <_Util::Pair <_Util::Rectangle, _Util: } std::unique_ptr< ::Tizen::Graphics::Rectangle[]> pDstRectLists(new (std::nothrow) ::Tizen::Graphics::Rectangle[numWidth * numHeight]); - SysTryReturnResult(NID_GRP, pDstRectLists, E_OUT_OF_MEMORY, "Fails to allocate memory.\n"); + SysTryReturnResult(NID_GRP, pDstRectLists, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); index = 0; diff --git a/src/graphics/util/FGrp_UtilPixmap.cpp b/src/graphics/util/FGrp_UtilPixmap.cpp index 1d71f8b..7a43e7b 100644 --- a/src/graphics/util/FGrp_UtilPixmap.cpp +++ b/src/graphics/util/FGrp_UtilPixmap.cpp @@ -78,7 +78,7 @@ _Util::Pixmap::Pixmap(int _width, int _height, int _depth, int _bytesPerLine) pBitmap = new (std::nothrow) unsigned char[bytesPerLine * height]; - SysTryReturnVoidResult(NID_GRP, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_GRP, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); // ¸ðµç °ÍÀÌ ¼º°øÇßÀ» ¶§¸¸ 1ÀÇ °ªÀ» °¡Áö°Ô µÈ´Ù. reserved = 1; @@ -256,7 +256,7 @@ ConvertBitmap(const _Util::Pixmap& srcBitmap) { std::unique_ptr buffer(new (std::nothrow) DestPixel[srcBitmap.width * srcBitmap.height]); - SysTryReturn(NID_GRP, buffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, buffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); DestPixel* pDest = (DestPixel*) buffer.get(); SourPixel* pSour = (SourPixel*) srcBitmap.pBitmap; @@ -467,7 +467,7 @@ _Util::Pixmap::GetClone(unsigned long depth) const _Util::Pixmap* pImageEx = new (std::nothrow) _Util::Pixmap(this->width, this->height, depth, pConvertedBuffer, this->width * depth / 8); - SysTryReturn(NID_GRP, pImageEx, pImageEx, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_GRP, pImageEx, pImageEx, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pImageEx->reserved = 1; diff --git a/src/graphics/util/FGrp_UtilType.h b/src/graphics/util/FGrp_UtilType.h index 8b0c0be..a042b3a 100644 --- a/src/graphics/util/FGrp_UtilType.h +++ b/src/graphics/util/FGrp_UtilType.h @@ -60,6 +60,11 @@ struct FixedPoint { } + explicit FixedPoint(double value) + : __fixedPoint(value * ((1 << SHIFT) * 1.0)) + { + } + inline int ToInt() const { diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 0bf345d..29d3634 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -139,6 +139,8 @@ SET (${this_target}_SOURCE_FILES FUiClipboardItem.cpp FUi_ClipboardItemImpl.cpp FUi_ClipboardItem.cpp + FUi_DragAndDropEvent.cpp + FUi_DragAndDropItem.cpp FUi_ClipboardPopupEvent.cpp FUi_CustomControlBaseImpl.cpp FUiDataBindingContext.cpp @@ -225,6 +227,7 @@ SET (${this_target}_SOURCE_FILES FUi_CardLayoutImpl.cpp FUiInputConnection.cpp FUi_InputConnectionImpl.cpp + FUi_InputConnectionUtils.cpp FUi_Matrix3Df.cpp FUi_TouchEventManagerImpl.cpp FUiTouchEventManager.cpp diff --git a/src/ui/FUiKeyboardMap.cpp b/src/ui/FUiKeyboardMap.cpp index ebf54f4..18993f6 100644 --- a/src/ui/FUiKeyboardMap.cpp +++ b/src/ui/FUiKeyboardMap.cpp @@ -1871,11 +1871,10 @@ KeyboardMap::LoadKeyboarMapFromFile(void) return E_SUCCESS; } - +/* KeyboardMapType GetKeyboardMapType(void) { -/* KeyboardMapType type = KEYBOARD_MAP_NONE; // get keyboard type @@ -2015,9 +2014,8 @@ GetKeyboardMapType(void) CATCH: return KEYBOARD_MAP_NONE; -*/ - return KEYBOARD_MAP_NONE; } +*/ result LoadKeyboardMap(void) diff --git a/src/ui/FUiTouch.cpp b/src/ui/FUiTouch.cpp index fc0ac95..e5b0e43 100644 --- a/src/ui/FUiTouch.cpp +++ b/src/ui/FUiTouch.cpp @@ -58,7 +58,7 @@ GetMultiFingerInfoListN(const Control* pControl) } LinkedList* pReturnList = new (std::nothrow) LinkedList; - SysTryReturn(NID_UI, pReturnList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pReturnList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); Tizen::Base::Collection::IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); SysTryCatch(NID_UI, pFingerInfoList, , E_SYSTEM, "[E_SYSTEM] System error occurred."); @@ -74,7 +74,7 @@ GetMultiFingerInfoListN(const Control* pControl) } TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo; - SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (pFingerInfo->GetStatus() == _TOUCH_PRESSED ||pFingerInfo->GetStatus() == _TOUCH_MOVED ) { @@ -193,7 +193,7 @@ result Touch::SetMultipointEnabled(const Control& control, bool enable) { _ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(control)); - SysTryReturnResult(NID_UI, pControlImpl, E_SYSTEM, "[E_SYSTEM] System error occurred."); + SysTryReturnResult(NID_UI, pControlImpl, E_SYSTEM, "System error occurred."); pControlImpl->SetMultiTouchEnabled(enable); diff --git a/src/ui/FUiTouchEventInfo.cpp b/src/ui/FUiTouchEventInfo.cpp index 328cead..53a18ed 100644 --- a/src/ui/FUiTouchEventInfo.cpp +++ b/src/ui/FUiTouchEventInfo.cpp @@ -53,7 +53,7 @@ TouchEventInfo::Construct(const IEventArg& eventArg) SysAssertf(__pTouchEventInfoImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); const _TouchEventArg* pTouchArg = dynamic_cast (&eventArg); - SysTryReturnResult(NID_UI, pTouchArg, E_INVALID_ARG, "[E_INVALID_ARG] pTouchArg is invalid."); + SysTryReturnResult(NID_UI, pTouchArg, E_INVALID_ARG, "pTouchArg is invalid."); _TouchEventInfoImpl* pImpl = _TouchEventInfoImpl::CreateInstanceN(this); result r = GetLastResult(); diff --git a/src/ui/FUiTouchEventManager.cpp b/src/ui/FUiTouchEventManager.cpp index 6ba77fe..59b1376 100644 --- a/src/ui/FUiTouchEventManager.cpp +++ b/src/ui/FUiTouchEventManager.cpp @@ -38,7 +38,7 @@ TouchEventManager::TouchEventManager(void) : __pTouchEventManagerImpl(null) { __pTouchEventManagerImpl = new _TouchEventManagerImpl; - SysTryReturnVoidResult(NID_UI, __pTouchEventManagerImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pTouchEventManagerImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } TouchEventManager::~TouchEventManager(void) @@ -53,7 +53,7 @@ TouchEventManager::GetInstance(void) if (__pTouchEventManager == null) { __pTouchEventManager = new TouchEventManager; - SysTryReturn(NID_UI, __pTouchEventManager, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + SysTryReturn(NID_UI, __pTouchEventManager, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } return __pTouchEventManager; diff --git a/src/ui/FUiVariant.cpp b/src/ui/FUiVariant.cpp index 1ba7fe5..9852784 100644 --- a/src/ui/FUiVariant.cpp +++ b/src/ui/FUiVariant.cpp @@ -52,7 +52,7 @@ Variant::Variant(void) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } } @@ -80,7 +80,7 @@ Variant::Variant(int value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -96,7 +96,7 @@ Variant::Variant(unsigned int value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -112,7 +112,7 @@ Variant::Variant(bool value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -128,7 +128,7 @@ Variant::Variant(float value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -144,7 +144,7 @@ Variant::Variant(double value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -160,7 +160,7 @@ Variant::Variant(long value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -176,7 +176,7 @@ Variant::Variant(unsigned long value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -192,7 +192,7 @@ Variant::Variant(long long value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -208,7 +208,7 @@ Variant::Variant(unsigned long long value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -224,7 +224,7 @@ Variant::Variant(const char* pValue) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -240,7 +240,7 @@ Variant::Variant(const wchar_t* pValue) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -256,7 +256,7 @@ Variant::Variant(const String& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -272,7 +272,7 @@ Variant::Variant(const DateTime& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -288,7 +288,7 @@ Variant::Variant(const Color& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -304,7 +304,7 @@ Variant::Variant(const Point& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -320,7 +320,7 @@ Variant::Variant(const FloatPoint& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -336,7 +336,7 @@ Variant::Variant(const Rectangle& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -352,7 +352,7 @@ Variant::Variant(const FloatRectangle& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -368,7 +368,7 @@ Variant::Variant(const Dimension& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -384,7 +384,7 @@ Variant::Variant(const FloatDimension& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -400,7 +400,7 @@ Variant::Variant(const FloatMatrix4& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -416,7 +416,7 @@ Variant::Variant(const Tizen::Graphics::FloatPoint3& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { @@ -432,7 +432,7 @@ Variant::Variant(const Tizen::Graphics::FloatVector4& value) __pVariantImpl = new (std::nothrow) _VariantImpl; if (__pVariantImpl == null) { - SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null."); + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); } else { diff --git a/src/ui/FUiWindow.cpp b/src/ui/FUiWindow.cpp index 9e0c5c2..f28be66 100644 --- a/src/ui/FUiWindow.cpp +++ b/src/ui/FUiWindow.cpp @@ -160,7 +160,7 @@ Window::SetZOrderGroup(WindowZOrderGroup windowZOrderGroup) } void -Window::SetOwner(Tizen::Ui::Control *pControl) +Window::SetOwner(Tizen::Ui::Control* pControl) { _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); diff --git a/src/ui/FUi_AccessibilityElement.cpp b/src/ui/FUi_AccessibilityElement.cpp index f070bd4..5b93da3 100644 --- a/src/ui/FUi_AccessibilityElement.cpp +++ b/src/ui/FUi_AccessibilityElement.cpp @@ -31,51 +31,6 @@ using namespace Tizen::Graphics; namespace Tizen { namespace Ui { -const wchar_t* _traitString[] = -{ - L"",//ACCESSIBILITY_TRAITS_NONE, - L"TITLE",//ACCESSIBILITY_TRAITS_TITLE, - L"OPTION HEADER",//ACCESSIBILITY_TRAITS_OPTION_HEADER, - L"PICTURE",//ACCESSIBILITY_TRAITS_PICTURE, - L"STATUS BAR",//ACCESSIBILITY_TRAITS_STATUS_BAR, - L"TEXT FIELD",//ACCESSIBILITY_TRAITS_TEXT_FIELD, - L"RATING",//ACCESSIBILITY_TRAITS_RATING, - L"ACTION BAR",//ACCESSIBILITY_TRAITS_ACTION_BAR, - L"ACTION BAR MENU",//ACCESSIBILITY_TRAITS_ACTION_BAR_MENU, - L"BACK BUTTON",//ACCESSIBILITY_TRAITS_BUTTON, - L"BUTTON",//ACCESSIBILITY_TRAITS_BUTTON, - L"LABEL",//ACCESSIBILITY_TRAITS_LABEL, - L"LIST",//ACCESSIBILITY_TRAITS_LIST, - L"SELECTOR",//ACCESSIBILITY_TRAITS_DATA_SELECTOR, - L"SCROLL",//ACCESSIBILITY_TRAITS_DRAG_SCROLL, - L"EXPAND BUTTON",//ACCESSIBILITY_TRAITS_EXPAND_BUTTON, - L"FUNCTION PANEL",//ACCESSIBILITY_TRAITS_FUNCTION_PANEL, - L"IN DEPTH BUTTON",//ACCESSIBILITY_TRAITS_IN_DEPTH_BUTTON, - L"INDEX SCROLL",//ACCESSIBILITY_TRAITS_INDEX_SCROLL, - L"IMAGE",//ACCESSIBILITY_TRAITS_IMAGE - L"INDICATOR",//ACCESSIBILITY_TRAITS_INDICATOR, - L"NOTIFICATION",//ACCESSIBILITY_TRAITS_NOTIFICATION, - L"RADIO BUTTON",//ACCESSIBILITY_TRAITS_RADIO_BUTTON, - L"SCROLL BAR",//ACCESSIBILITY_TRAITS_SCROLL_BAR, - L"SEARCH FIELD",//ACCESSIBILITY_TRAITS_SEARCH_FIELD, - L"SEGMENT",//ACCESSIBILITY_TRAITS_SEGMENT, - L"SLIDER",//ACCESSIBILITY_TRAITS_SLIDER, - L"SOFT KEY",//ACCESSIBILITY_TRAITS_SOFT_KEY, - L"SUB MENU TITLE",//ACCESSIBILITY_TRAITS_SUB_MENU_TITLE, - L"TAB",//ACCESSIBILITY_TRAITS_TAB, - L"TICK BOX",//ACCESSIBILITY_TRAITS_TICKBOX, - L"TIME SELECTOR",//ACCESSIBILITY_TRAITS_TIME_SELECTOR, - L"VOLUME SLIDER",//ACCESSIBILITY_TRAITS_VOLUME_SLIDER, - L"HOUR",//ACCESSIBILITY_TRAITS_HOUR, - L"MINUTE",//ACCESSIBILITY_TRAITS_MINUTE, - L"SECOND",//ACCESSIBILITY_TRAITS_SECOND, - L"YEAR",//ACCESSIBILITY_TRAITS_YEAR, - L"MONTH",//ACCESSIBILITY_TRAITS_MONTH, - L"DAY",//ACCESSIBILITY_TRAITS_DAY, - L"END",//ACCESSIBILITY_TRAITS_END = 0xff -}; - - _AccessibilityElement::_AccessibilityElement(bool systemElement) : __name(L"") , __bounds(0,0,0,0) diff --git a/src/ui/FUi_AccessibilityGesture.cpp b/src/ui/FUi_AccessibilityGesture.cpp index 37668a0..186fa61 100644 --- a/src/ui/FUi_AccessibilityGesture.cpp +++ b/src/ui/FUi_AccessibilityGesture.cpp @@ -153,8 +153,7 @@ _AccessibilityGesture::ProcessGesture(_AccessibilityGestureType type, float x, f x = CoordinateSystem::ConvertToLogicalX(x); y = CoordinateSystem::ConvertToLogicalY(y); //ConvertTouchPosition(type, x,y); - _AccessibilityManager::GetInstance()->ProcessGesture(type,Tizen::Graphics::FloatPoint(x, y)); - return true; + return _AccessibilityManager::GetInstance()->ProcessGesture(type,Tizen::Graphics::FloatPoint(x, y)); } }} //Tizen::Ui diff --git a/src/ui/FUi_AccessibilityManager.cpp b/src/ui/FUi_AccessibilityManager.cpp index 8e27a38..5ab2477 100644 --- a/src/ui/FUi_AccessibilityManager.cpp +++ b/src/ui/FUi_AccessibilityManager.cpp @@ -1645,7 +1645,7 @@ _AccessibilityManager::MoveFocus(_AccessibilityFocusDirection direction) __pTargetContainer->SetCurrentFocusedElement(null); } __pTargetContainer = null; - + } else { @@ -1926,6 +1926,12 @@ _AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const Floa { switch(type) { + case _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV: + if(IsFirstElementGainedFocus()) + { + return false; + } + //fall through case _ACCESSIBILITY_GESTURE_TYPE_FLICK_UP: case _ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT: if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS)) @@ -1933,6 +1939,12 @@ _AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const Floa SetGestureMode(MODE_FOCUS_MOVE); } break; + case _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT: + if(IsLastElementGainedFocus()) + { + return false; + } + //fall through case _ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN: case _ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT: if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT)) @@ -2078,6 +2090,10 @@ _AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const Floa { return false; } + if (__pTargetContainer->IsContains(*__pTargetElement) == false) + { + return false; + } if (_pControl == null) { return false; @@ -2130,8 +2146,8 @@ _AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const Floa } } break; - - case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_LONGPRESS: + case _ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT: + ResetFocusInformation(); break; case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_STARTED: case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_CHANGED: diff --git a/src/ui/FUi_AccessibilitySystemSettingLoader.cpp b/src/ui/FUi_AccessibilitySystemSettingLoader.cpp index 81648dd..5a3a2f9 100644 --- a/src/ui/FUi_AccessibilitySystemSettingLoader.cpp +++ b/src/ui/FUi_AccessibilitySystemSettingLoader.cpp @@ -38,8 +38,9 @@ _AccessibilitySystemSettingLoader::_AccessibilitySystemSettingLoader(_Accessibil : __pManager(&manager) { _screenReaderActivated = IsScreenReaderActivated(); - _SettingInfoImpl::AddSettingEventListenerForInternal(*this); vconf_notify_key_changed(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, _AccessibilitySystemSettingLoader::SetSystemSetting, null); + result r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } _AccessibilitySystemSettingLoader::~_AccessibilitySystemSettingLoader(void) { diff --git a/src/ui/FUi_AccessibilityTtsPlayer.cpp b/src/ui/FUi_AccessibilityTtsPlayer.cpp index 0e6ee16..f22b9e4 100644 --- a/src/ui/FUi_AccessibilityTtsPlayer.cpp +++ b/src/ui/FUi_AccessibilityTtsPlayer.cpp @@ -30,14 +30,18 @@ using namespace Tizen::Locales; namespace Tizen { namespace Ui { +const int MAX_TTS_CHARACTER_COUNT = 400; + _AccessibilityTtsPlayer::_AccessibilityTtsPlayer(_AccessibilityManager& manager) : __initialized(false) , __activated(false) + , __extra(false) , __ttsHandle(0) , __localeIdx(-1) , __speed(TTS_SPEED_AUTO) , __status(ACCESSIBILITY_SCREEN_READER_STATUS_ERROR) , __grammar(L"") + , __readingContents(L"") , __pCurrentLocale(null) , __pSupportedLocaleList(null) , __pManager(&manager) @@ -60,13 +64,13 @@ result _AccessibilityTtsPlayer::Construct(void) { Locale *pLocale = new (std::nothrow) Locale(LANGUAGE_INVALID, COUNTRY_INVALID); - SysTryReturnResult(NID_UI, pLocale != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_UI, pLocale != null, E_OUT_OF_MEMORY, "Memory allocation failed."); ArrayList* pLocaleList = new (std::nothrow) ArrayList(); - SysTryReturnResult(NID_UI, pLocaleList != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_UI, pLocaleList != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = pLocaleList->Construct(); - SysTryReturnResult(NID_UI, r == E_SUCCESS, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_OUT_OF_MEMORY, "Memory allocation failed."); __pCurrentLocale = pLocale; __pSupportedLocaleList = pLocaleList; @@ -87,21 +91,21 @@ _AccessibilityTtsPlayer::Activate(void) SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to create."); ttsError = tts_set_error_cb(__ttsHandle, TtsErrorReceiver, (void*)(this)); - SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); ttsError = tts_set_state_changed_cb(__ttsHandle, TtsStateChangedReceiver, (void*)(this)); - SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); ttsError = tts_set_utterance_started_cb(__ttsHandle, TtsStartedReceiver, (void*)(this)); - SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); ttsError = tts_set_utterance_completed_cb(__ttsHandle, TtsCompletedReceiver, (void*)(this)); - SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); tts_set_mode(__ttsHandle, TTS_MODE_SCREEN_READER); ttsError = tts_prepare(__ttsHandle); - SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __activated = true; return E_SUCCESS; @@ -192,7 +196,7 @@ _AccessibilityTtsPlayer::TtsStateChangedReceiver(tts_h ttsHandle, tts_state_e pr ttsError = tts_foreach_supported_voices(ttsHandle, TtsSupportedLocaleListGetter, (void*)(static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__pSupportedLocaleList)); SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to get supported voices", GetEngineErrorMessage(ttsError)); - static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__initialized = true; + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__initialized = true; static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_READY); } else if ((previousState == TTS_STATE_READY || previousState == TTS_STATE_PAUSED) && (currentState == TTS_STATE_PLAYING)) @@ -221,12 +225,19 @@ _AccessibilityTtsPlayer::TtsStartedReceiver(tts_h ttsHandle, int utteranceId, vo void _AccessibilityTtsPlayer::TtsCompletedReceiver(tts_h ttsHandle, int utteranceId, void* pTtsInstance) { - int ttsError = tts_stop(ttsHandle); - SysTryReturnVoidResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, - "[CB] Failed to stop, error[%s]", GetEngineErrorMessage(ttsError)); _AccessibilityTtsPlayer* pPlayer = static_cast<_AccessibilityTtsPlayer*>(pTtsInstance); - pPlayer->SetStatus(ACCESSIBILITY_SCREEN_READER_STATUS_READY); - pPlayer->__pManager->OnFinishReading(pPlayer->__grammar); + if(static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__extra) + { + pPlayer->Speak(pPlayer->__readingContents); + } + else + { + int ttsError = tts_stop(ttsHandle); + SysTryReturnVoidResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, + "[CB] Failed to stop, error[%s]", GetEngineErrorMessage(ttsError)); + pPlayer->SetStatus(ACCESSIBILITY_SCREEN_READER_STATUS_READY); + pPlayer->__pManager->OnFinishReading(pPlayer->__grammar); + } } void _AccessibilityTtsPlayer::TtsErrorReceiver(tts_h ttsHandle, int ttsUtteranceId, tts_error_e error, void* pTtsInstance) @@ -320,13 +331,89 @@ _AccessibilityTtsPlayer::Speak(const String& text) "Not yet initialized! This method should be called after initialized."); result r = E_SUCCESS; + String _text = text; tts_state_e ttsState = TTS_STATE_READY; int ttsError = tts_get_state(__ttsHandle, &ttsState); SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to get the current state."); Stop(); - const char* pTextN = _StringConverter::CopyToCharArrayN(text); + if(_text.GetLength() > MAX_TTS_CHARACTER_COUNT) + { + bool find = false; + int index = -1; + r = _text.IndexOf(L' ', MAX_TTS_CHARACTER_COUNT, index); + if (r == E_SUCCESS) + { + if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2) + { + find = true; + } + } + if(find == false) + { + r = _text.IndexOf(L'\n', MAX_TTS_CHARACTER_COUNT, index); + if (r == E_SUCCESS) + { + if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2) + { + find = true; + } + } + } + if(find == false) + { + r = _text.IndexOf(L'\t', MAX_TTS_CHARACTER_COUNT, index); + if (r == E_SUCCESS) + { + if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2) + { + find = true; + } + } + } + if(find == false) + { + r = _text.IndexOf(L'.', MAX_TTS_CHARACTER_COUNT, index); + if (r == E_SUCCESS) + { + if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2) + { + find = true; + } + } + } + if(find == false) + { + r = _text.IndexOf(L',', MAX_TTS_CHARACTER_COUNT, index); + if (r == E_SUCCESS) + { + if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2) + { + find = true; + } + } + } + if (find == false) + { + index = MAX_TTS_CHARACTER_COUNT; + } + if(_text.GetLength() > index + 1) + { + _text.SubString(index+1, _text.GetLength() - index-1, __readingContents); + _text.SubString(0,index, const_cast(_text)); + __extra = true; + } + else + { + __extra = false; + } + } + else + { + __extra = false; + } + const char* pTextN = _StringConverter::CopyToCharArrayN(_text); int ttsUtteranceId = 0; ttsError = tts_add_text(__ttsHandle, pTextN, null, TTS_VOICE_TYPE_AUTO, __speed, &ttsUtteranceId); @@ -502,6 +589,10 @@ _AccessibilityTtsPlayer::OnErrorOccurred(Tizen::Base::String& errorString) void _AccessibilityTtsPlayer::OnStatusChanged(AccessibilityScreenReaderStatus status) { + if(__extra) + { + return; + } switch(status) { case ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING: diff --git a/src/ui/FUi_Clipboard.cpp b/src/ui/FUi_Clipboard.cpp index 1ee91c9..8621b21 100644 --- a/src/ui/FUi_Clipboard.cpp +++ b/src/ui/FUi_Clipboard.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "FUi_Clipboard.h" #include "FUi_ClipboardItem.h" #include "FUi_ControlManager.h" @@ -49,12 +50,13 @@ using namespace Tizen::Io; using namespace Tizen::Media; using namespace Tizen::Text; using namespace Tizen::Ui::Controls; +using namespace Tizen::System; namespace { 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_PATH = L"/tmp/clipboard/OSP_"; const String _CLIPBOARD_DEFAULT_EXTENSION = L".png"; } // Anonymous @@ -766,26 +768,23 @@ _Clipboard::CreateImageFilePath(void) String filePath; String extension(_CLIPBOARD_DEFAULT_EXTENSION); - - bool find = false; - for (int i = 0; i < _CLIPBOARD_ITEM_MAX; i++) - { - filePath = _CLIPBOARD_DEFAULT_PATH; - - r = filePath.Append(i); - SysTryReturn(NID_UI, r == E_SUCCESS, String(""), r, "[%s] Propagating.", GetErrorMessage(r)); - - r = filePath.Append(extension); - SysTryReturn(NID_UI, r == E_SUCCESS, String(""), r, "[%s] Propagating.", GetErrorMessage(r)); - - if (File::IsFileExist(filePath) == false) - { - find = true; - break; - } - } - - SysTryReturn(NID_UI, find == true, String(""), E_SYSTEM, "[E_SYSTEM] A system error occurred."); + Tizen::Base::DateTime dateTime; + r = SystemTime::GetCurrentTime(TIME_MODE_STANDARD, dateTime); + SysTryReturn(NID_UI, r == E_SUCCESS, L"", r, "[%s] Propagating.", GetErrorMessage(r)); + int month = dateTime.GetMonth(); + int day = dateTime.GetDay(); + int hour = dateTime.GetHour(); + int minute = dateTime.GetMinute(); + int second = dateTime.GetSecond(); + + filePath = _CLIPBOARD_DEFAULT_PATH; + + filePath.Append(month); + filePath.Append(day); + filePath.Append(hour); + filePath.Append(minute); + filePath.Append(second); + filePath.Append(extension); SetLastResult(E_SUCCESS); diff --git a/src/ui/FUi_ContainerImpl.cpp b/src/ui/FUi_ContainerImpl.cpp index 9d97ff7..6960b3d 100644 --- a/src/ui/FUi_ContainerImpl.cpp +++ b/src/ui/FUi_ContainerImpl.cpp @@ -171,6 +171,15 @@ _ContainerImpl::AddChild(_ControlImpl* pChild, bool transferOwnership) } r = GetCore().AttachChild(pChild->GetCore()); + if (IsFailed(r)) + { + result listResult = RemoveChild(pChild, false); + if (IsFailed(listResult)) + { + SysLogException(NID_UI, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Unable to find the specified child."); + } + } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); return E_SUCCESS; diff --git a/src/ui/FUi_Control.cpp b/src/ui/FUi_Control.cpp index 1697386..111700d 100644 --- a/src/ui/FUi_Control.cpp +++ b/src/ui/FUi_Control.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include "FUi_Math.h" #include "FUi_Control.h" #include "FUi_ControlManager.h" #include "FUi_FocusManagerImpl.h" @@ -54,6 +56,9 @@ #include "FUiCtrl_Form.h" #include "FUiCtrl_Frame.h" #include "FUi_ContainerImpl.h" +#include "FUi_DragAndDropItem.h" +#include "FUi_UiEventManager.h" +#include "FUiAnim_MatrixUtil.h" using namespace std; using namespace Tizen::Base; @@ -349,7 +354,7 @@ public: if (pVisualElement) { FloatMatrix4 inverseMatrix(newTransform); - inverseMatrix.Invert(); + _MatrixUtilInvert(inverseMatrix); result r = pVisualElement->SetTransformMatrix(inverseMatrix); if (r != E_SUCCESS) @@ -407,7 +412,8 @@ public: result SetItemBounds(const FloatRectangle& rect) { SysAssert(__pControl->IsInSizeRange(FloatDimension(rect.width, rect.height))); - return __pControl->SetBoundsFinal(rect, false, true); + bool animating = __pControl->GetControlDelegate().IsAnimating(); + return __pControl->SetBoundsFinal(rect, false, true, animating); } FloatRectangle GetItemBounds(void) const @@ -424,7 +430,15 @@ public: FloatDimension GetItemContentSize(bool horizontalMode, bool verticalMode) const { - return __pControl->GetControlDelegate().GetContentSizeF(horizontalMode, verticalMode); + FloatRectangle rect = __pControl->GetContentAreaBoundsF(); + if (rect == FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + { + return __pControl->GetControlDelegate().GetContentSizeF(horizontalMode, verticalMode); + } + else + { + return FloatDimension(rect.width, rect.height); + } } FloatDimension GetItemMinimumSize(void) const @@ -618,6 +632,12 @@ _Control::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touch return _UI_TOUCH_EVENT_DELIVERY_YES; } +_UiTouchEventDelivery +_Control::OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + bool _Control::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { @@ -642,50 +662,8 @@ _Control::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) return false; } -_UiTouchEventDelivery -_Control::OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo) -{ - return _UI_TOUCH_EVENT_DELIVERY_YES; -} - -_UiTouchEventDelivery -_Control::OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo) -{ - return _UI_TOUCH_EVENT_DELIVERY_YES; -} - -_UiTouchEventDelivery -_Control::OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo) -{ - return _UI_TOUCH_EVENT_DELIVERY_YES; -} - -_UiTouchEventDelivery -_Control::OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo) -{ - return _UI_TOUCH_EVENT_DELIVERY_YES; -} - -bool -_Control::OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo) -{ - return false; -} - -bool -_Control::OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo) -{ - return false; -} - bool -_Control::OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo) -{ - return false; -} - -bool -_Control::OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo) +_Control::OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo) { return false; } @@ -711,7 +689,16 @@ _Control::OnFocusLost(const _Control& source) } return false; } - +bool +_Control::OnTraversalControlFocusGained(void) +{ + return false; +} +bool +_Control::OnTraversalControlFocusLost(void) +{ + return false; +} bool _Control::OnPreviewNotifiedN(const _Control& source, IList* pArgs) { @@ -894,6 +881,11 @@ _Control::OnChildAttached(const _Control& child) } void +_Control::OnChildAttaching(const _Control& child) +{ +} + +void _Control::OnChildDetaching(const _Control& child) { } @@ -947,7 +939,12 @@ _Control::OnAncestorVisibleStateChanged(const _Control& control) if(pTouchManager->GetTouchControlSource() == this) { SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled"); - pTouchManager->SetTouchCanceled(null); + + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + pUiEventManager->ClearEventQueue(); + } } } } @@ -1058,41 +1055,35 @@ _Control::Accept(Visitor& visitor) const } void -_Control::InvalidateHierarchyRootWindow(void) +_Control::InvalidateHierarchyRootWindow(_Control& control) { - struct _Visitor - : public Visitor + control.__needRecalcRootWindow = true; + control.__pRootWindow = null; + + for (int i = 0; i < control.GetChildCount(); ++i) { - virtual VisitType Visit(_Control& control) + _Control* pChild = control.GetChild(i); + if (pChild) { - control.__needRecalcRootWindow = true; - control.__pRootWindow = null; - - return VISIT_DOWNWARD; + pChild->InvalidateHierarchyRootWindow(*pChild); } - }; - - _Visitor visitor; - Accept(visitor); + } } void -_Control::InvalidateHierarchyAbsoluteBounds(void) +_Control::InvalidateHierarchyAbsoluteBounds(_Control& control) { - struct _Visitor - : public Visitor + control.__needRecalcAbsBounds = true; + control.__needRecalcAbsBoundsF = true; + + for (int i = 0; i < control.GetChildCount(); ++i) { - virtual VisitType Visit(_Control& control) + _Control* pChild = control.GetChild(i); + if (pChild) { - control.__needRecalcAbsBounds = true; - control.__needRecalcAbsBoundsF = true; - - return VISIT_DOWNWARD; + pChild->InvalidateHierarchyAbsoluteBounds(*pChild); } - }; - - _Visitor visitor; - Accept(visitor); + } } void @@ -1114,36 +1105,29 @@ _Control::Show(void) } void -_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation) +_Control::ChangeLayout(_Control& control, _ControlOrientation orientation) { - ClearLastResult(); - - struct _Visitor - : public Visitor + if (control.__orientation != orientation) { - _Visitor(_ControlOrientation orientation) - : __orientation(orientation){} + control.__orientation = orientation; + control.GetControlDelegate().OnChangeLayout(orientation); + } - virtual VisitType Visit(_Control& control) + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - if (control.__orientation != __orientation) - { - control.__orientation = __orientation; - control.GetControlDelegate().OnChangeLayout(__orientation); - ClearLastResult(); - } - - return VISIT_DOWNWARD; + ChangeLayout(*pChild, orientation); } + } +} -private: - _ControlOrientation __orientation; - }; - - _Visitor visitor(orientation); - Accept(visitor); - - SysAssert(GetLastResult() == E_SUCCESS); +void +_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation) +{ + ClearLastResult(); + ChangeLayout(*this, orientation); if (callRotation == true) { @@ -1157,36 +1141,30 @@ private: } void -_Control::ChangeLayout(_ControlRotation rotation) +_Control::ChangeLayout(_Control& control, _ControlRotation rotation) { - ClearLastResult(); - - struct _Visitor - : public Visitor + if (control.__rotation != rotation) { - _Visitor(_ControlRotation rotation) - : __rotation(rotation){} + control.__rotation = rotation; + control.GetControlDelegate().OnChangeLayout(rotation); + ClearLastResult(); + } - virtual VisitType Visit(_Control& control) + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - if (control.__rotation != __rotation) - { - control.__rotation = __rotation; - control.GetControlDelegate().OnChangeLayout(__rotation); - ClearLastResult(); - } - - return VISIT_DOWNWARD; + ChangeLayout(*pChild, rotation); } + } +} -private: - _ControlRotation __rotation; - }; - - _Visitor visitor(rotation); - Accept(visitor); - - SysAssert(GetLastResult() == E_SUCCESS); +void +_Control::ChangeLayout(_ControlRotation rotation) +{ + ClearLastResult(); + ChangeLayout(*this, rotation); } bool @@ -1213,33 +1191,6 @@ _Control::Invalidate(bool recursive) { ClearLastResult(); - struct _Visitor - : public Visitor - { - virtual VisitType Visit(_Control& control) - { - if (control.GetVisibleState() == false) - { - return VISIT_STOP; - } - - control.Invalidate(); - - // Ownee - int owneeCount = control.GetOwneeCount(); - for (int i = 0; i < owneeCount; ++i) - { - _Window* pOwnee = control.GetOwnee(i); - if (pOwnee) - { - pOwnee->Invalidate(true); - } - } - - return VISIT_DOWNWARD; - } - }; - // Update layout _Layout::Layout* pLayout = GetLayout(); if (pLayout) @@ -1253,8 +1204,38 @@ _Control::Invalidate(bool recursive) } else { - _Visitor visitor; - Accept(visitor); + Invalidate(*this); + } +} + +void +_Control::Invalidate(_Control& control) +{ + if (control.GetVisibleState() == false) + { + return; + } + + control.Invalidate(); + + // Ownee + int owneeCount = control.GetOwneeCount(); + for (int i = 0; i < owneeCount; ++i) + { + _Window* pOwnee = control.GetOwnee(i); + if (pOwnee) + { + pOwnee->Invalidate(true); + } + } + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + pChild->Invalidate(*pChild); + } } } @@ -1413,10 +1394,7 @@ _Control::AttachSystemChild(_Control& child) SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. r = EndAttaching(child); - if (IsFailed(r)) - { - return r; - } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); SysAssert(GetLastResult() == E_SUCCESS); @@ -1474,7 +1452,7 @@ _Control::GetChildList() } bool -_Control::IsCalledCallAttachingToMainTree(void) +_Control::IsCalledCallAttachingToMainTree(void) const { return __isCalledCallOnAttachingToMainTree; } @@ -1486,13 +1464,13 @@ _Control::SetCalledCallAttachingToMainTree(bool isAttaching) } bool -_Control::IsCalledCallPreAttachedToMainTree(void) +_Control::IsCalledCallPreAttachedToMainTree(void) const { return __isCalledCallOnPreAttachedToMainTree; } bool -_Control::IsCalledCallAttachedToMainTree(void) +_Control::IsCalledCallAttachedToMainTree(void) const { return __isCalledCallOnAttachedToMainTree; } @@ -1682,69 +1660,48 @@ _Control::CallOnDetachingFromMainTree(_Control& control) } void -_Control::CallOnAncestorVisibleStateChanged(void) +_Control::CallOnAncestorVisibleStateChanged(_Control& control) { - struct _Visitor - : public Visitor - { - _Visitor(_Control& parent) - : __parent(parent){} + control.GetControlDelegate().OnAncestorVisibleStateChanged(*this); - virtual VisitType Visit(_Control& control) + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - control.GetControlDelegate().OnAncestorVisibleStateChanged(__parent); - return VISIT_DOWNWARD; + CallOnAncestorVisibleStateChanged(*pChild); } - - _Control& __parent; - }; - - _Visitor visitor(*this); - Accept(visitor); + } } void -_Control::CallOnAncestorEnableStateChanged(void) +_Control::CallOnAncestorEnableStateChanged(_Control& control) { - struct _Visitor - : public Visitor - { - _Visitor(_Control& parent) - : __parent(parent){} + control.GetControlDelegate().OnAncestorEnableStateChanged(*this); - virtual VisitType Visit(_Control& control) + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - control.GetControlDelegate().OnAncestorEnableStateChanged(__parent); - return VISIT_DOWNWARD; + CallOnAncestorEnableStateChanged(*pChild); } - - _Control& __parent; - }; - - _Visitor visitor(*this); - Accept(visitor); + } } void -_Control::CallOnAncestorInputEnableStateChanged(void) +_Control::CallOnAncestorInputEnableStateChanged(_Control& control) { - struct _Visitor - : public Visitor - { - _Visitor(_Control& parent) - : __parent(parent){} + control.GetControlDelegate().OnAncestorInputEnableStateChanged(*this); - virtual VisitType Visit(_Control& control) + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - control.GetControlDelegate().OnAncestorInputEnableStateChanged(__parent); - return VISIT_DOWNWARD; + CallOnAncestorInputEnableStateChanged(*pChild); } - - _Control& __parent; - }; - - _Visitor visitor(*this); - Accept(visitor); + } } // E_INVALID_ARG @@ -1768,6 +1725,8 @@ _Control::StartAttaching(_Control& child, _ControlArea area) r = child.GetControlDelegate().OnAttaching(this); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + GetControlDelegate().OnChildAttaching(child); + if (IsAttachedToMainTree()) { r = CallOnAttachingToMainTree(child); @@ -1821,8 +1780,8 @@ result _Control::EndAttaching(_Control& child) { child.SetParent(this); - child.InvalidateHierarchyRootWindow(); - child.InvalidateHierarchyAbsoluteBounds(); + InvalidateHierarchyRootWindow(child); + InvalidateHierarchyAbsoluteBounds(child); FloatRectangle floatBounds(child.GetBoundsF().x, child.GetBoundsF().y, child.GetBoundsF().width, child.GetBoundsF().height); @@ -1866,6 +1825,11 @@ _Control::AttachChild(_Control& child) ClearLastResult(); result r = E_SUCCESS; + SysTryReturn(NID_UI, + IsChildAttachable(child), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] %ls cannot be a child of %ls.", + child.GetName().GetPointer(), GetName().GetPointer()); + r = StartAttaching(child, _CONTROL_AREA_CLIENT); if (IsFailed(r)) { @@ -1879,10 +1843,7 @@ _Control::AttachChild(_Control& child) r = GetVisualElement()->AttachChild(*child.GetVisualElement()); r = EndAttaching(child); - if (IsFailed(r)) - { - return r; - } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); SysAssert(GetLastResult() == E_SUCCESS); UpdateFocusList(); @@ -1900,11 +1861,18 @@ _Control::UpdateFocusList(void) } void -_Control::RemoveFocusRing(void) +_Control::RemoveFocusRing(bool needToDelete) { if (__pFocusVisualElement) { - __pFocusVisualElement->SetShowState(false); + if (needToDelete) + { + __pFocusVisualElement.reset(); + } + else + { + __pFocusVisualElement->SetShowState(false); + } } } @@ -1922,7 +1890,7 @@ _Control::HasFocusRing(void) void _Control::SetFocusNavigateEnabled(bool enable) { - __isNavigatable = enable; + __isNavigatable = enable; } bool @@ -1960,12 +1928,10 @@ _Control::InsertChildToBottom(_Control& child) SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. r = EndAttaching(child); - if (IsFailed(r)) - { - return r; - } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); return E_SUCCESS; } @@ -1999,12 +1965,10 @@ _Control::InsertChildAfter(const _Control& targetChild, _Control& child) SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. r = EndAttaching(child); - if (IsFailed(r)) - { - return r; - } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); return E_SUCCESS; } @@ -2038,12 +2002,10 @@ _Control::InsertChildBefore(const _Control& targetChild, _Control& child) SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. r = EndAttaching(child); - if (IsFailed(r)) - { - return r; - } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); return E_SUCCESS; } @@ -2102,7 +2064,7 @@ _Control::DetachChild(_Control& child) SysAssert(GetLastResult() == E_SUCCESS); UpdateFocusList(); - child.InvalidateHierarchyRootWindow(); + InvalidateHierarchyRootWindow(child); return E_SUCCESS; } @@ -2397,6 +2359,12 @@ int _Control::GetChildCount(void) const { ClearLastResult(); + + if (__pChildren == null) + { + return 0; + } + return GetChildList().GetCount(); } @@ -2524,45 +2492,23 @@ bool _Control::IsAncestorOf(const _Control& control) const { ClearLastResult(); + return IsAncestorOf(control, *this); +} +bool +_Control::IsAncestorOf(const _Control& control, const _Control& ancestor) const +{ const _Control* pParent = control.GetParent(); - if (!pParent) - { - return false; - } - - struct _Visitor - : public Visitor + if (pParent) { -private: - const _Control& __ancestor; - -public: - bool yes; - - _Visitor(const _Control& ancestor) - : __ancestor(ancestor) - , yes(false){} - - virtual VisitType Visit(_Control& control) + if (pParent == &ancestor) { - if (&__ancestor == &control) - { - yes = true; - return VISIT_STOP; - } - else - { - return VISIT_UPWARD; - } + return true; } - }; - - _Visitor visitor(*this); - pParent->Accept(visitor); + return IsAncestorOf(*pParent, ancestor); + } - SysAssert(GetLastResult() == E_SUCCESS); - return visitor.yes; + return false; } _Window* @@ -2575,35 +2521,23 @@ _Control::GetRootWindow(void) const return __pRootWindow; } - struct _Visitor - : public Visitor - { - _Window* pRoot; - - _Visitor(void) - : pRoot(null){} + _Window* pRoot = null; + _Control* pControl = const_cast<_Control*>(this); - virtual VisitType Visit(_Control& control) + while (pControl) + { + pRoot = dynamic_cast <_Window*>(pControl); + if (pRoot) { - pRoot = dynamic_cast <_Window*>(&control); - if (pRoot != null) - { - return VISIT_STOP; - } - - return VISIT_UPWARD; + break; } - }; - - _Visitor visitor; - Accept(visitor); - - SysAssert(GetLastResult() == E_SUCCESS); + pControl = pControl->GetParent(); + } - const_cast<_Control*>(this)->__pRootWindow = visitor.pRoot; + const_cast<_Control*>(this)->__pRootWindow = pRoot; const_cast<_Control*>(this)->__needRecalcRootWindow = false; - return visitor.pRoot; + return pRoot; } bool @@ -2685,7 +2619,7 @@ _Control::SetFocusWindowActivationChecked(bool isChecked) } bool -_Control::IsFocusWindowActivationChecked(void) +_Control::IsFocusWindowActivationChecked(void) const { return __isFocusWindowActivationChecked; } @@ -2714,6 +2648,11 @@ _Control::SetFocused(bool on) pTop->SetFocusControl(this, false); } + bool isFocusControlListControl = _FocusManagerImpl::GetInstance()->IsFocusControlListControl(this); + if (isFocusControlListControl) + { + pTop->SetFocusTraversalControl(this, true); + } return E_SUCCESS; } @@ -2866,29 +2805,20 @@ _Control::IsEnabled(void) const { ClearLastResult(); - struct _Visitor - : public Visitor - { - bool enabled; - - _Visitor(void) - : enabled(true){} + bool enabled = true; + const _Control* pControl = this; - virtual VisitType Visit(_Control& control) + while (pControl) + { + if (!pControl->GetEnableState()) { - if (!control.GetEnableState()) - { - enabled = false; - return VISIT_STOP; - } - - return VISIT_UPWARD; + enabled = false; + break; } - }; + pControl = pControl->GetParent(); + } - _Visitor visitor; - Accept(visitor); - return visitor.enabled; + return enabled; } bool @@ -2906,7 +2836,7 @@ _Control::SetEnableState(bool enabledState) if (changed) { __enabledState = enabledState; - CallOnAncestorEnableStateChanged(); + CallOnAncestorEnableStateChanged(*this); } __pAccessibilityContainer->SetEnableState(enabledState); } @@ -2916,29 +2846,20 @@ _Control::IsInputEventEnabled(void) const { ClearLastResult(); - struct _Visitor - : public Visitor - { - bool inputEnabled; - - _Visitor(void) - : inputEnabled(true){} + bool inputEnabled = true; + const _Control* pControl = this; - virtual VisitType Visit(_Control& control) + while (pControl) + { + if (!pControl->GetInputEnableState()) { - if (!control.GetInputEnableState()) - { - inputEnabled = false; - return VISIT_STOP; - } - - return VISIT_UPWARD; + inputEnabled = false; + break; } - }; + pControl = pControl->GetParent(); + } - _Visitor visitor; - Accept(visitor); - return visitor.inputEnabled; + return inputEnabled; } bool @@ -2960,7 +2881,7 @@ void _Control::LockInputEvent(void) { __inputLockRefCount++; - CallOnAncestorInputEnableStateChanged(); + CallOnAncestorInputEnableStateChanged(*this); } void @@ -2984,31 +2905,20 @@ _Control::IsVisible(void) const return false; } - struct _Visitor - : public Visitor - { - bool visible; - - _Visitor(void) - : visible(true){} + bool visible = true; + const _Control* pControl = this; - virtual VisitType Visit(_Control& control) + while (pControl) + { + if (!pControl->GetVisibleState()) { - if (!control.GetVisibleState()) - { - visible = false; - return VISIT_STOP; - } - - return VISIT_UPWARD; + visible = false; + break; } - }; - - _Visitor visitor; - Accept(visitor); + pControl = pControl->GetParent(); + } - SysAssert(GetLastResult() == E_SUCCESS); - return visitor.visible; + return visible; } bool @@ -3022,6 +2932,7 @@ void _Control::SetVisibleState(bool visibleState) { ClearLastResult(); + UpdateFocusList(); const bool changed = (__visibleState != visibleState) || !__initVisibleState; @@ -3049,7 +2960,7 @@ _Control::SetVisibleState(bool visibleState) if (changed) { GetControlDelegate().OnVisibleStateChanged(); - CallOnAncestorVisibleStateChanged(); + CallOnAncestorVisibleStateChanged(*this); _Control* pParent = GetParent(); if (pParent) { @@ -3164,54 +3075,89 @@ _Control::UpdateBoundsOfVisualElement(const FloatRectangle& controlBounds) } result -_Control::AdjustAbsoluteBounds(void) +_Control::AdjustAbsoluteBounds(_Control& control, bool update) { - struct _Visitor - : public Visitor + result r = E_SUCCESS; + + if (update && (&control != this)) { - _Visitor(_Control* pControl) - : __pControl(pControl){} + FloatRectangle fbounds = control.GetBoundsF(); - virtual VisitType Visit(_Control& control) + if (control.IsLayoutChangable() == false) + { + r = control.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + } + else + { + r = control.UpdateBoundsOfVisualElement(fbounds); + } + } + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) { - result r = E_SUCCESS; - if (__pControl == &control) + if (pChild == this) { - return VISIT_DOWNWARD; + r = AdjustAbsoluteBounds(*pChild, false); } - FloatRectangle fbounds = control.GetBoundsF(); - if (control.IsLayoutChangable() == false) + else { - r = control.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + r = AdjustAbsoluteBounds(*pChild); } - else + if (IsFailed(r)) { - r = control.UpdateBoundsOfVisualElement(fbounds); + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); } + } + } + + return r; +} + +result +_Control::AdjustAbsoluteBounds(void) +{ + result r = E_SUCCESS; + + FloatRectangle fbounds = GetBoundsF(); - ControlList& children = control.GetChildList(); + if (IsLayoutChangable() == false) + { + r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + } + else + { + r = UpdateBoundsOfVisualElement(fbounds); + } + + for (int i = 0; i < GetChildCount(); ++i) + { + _Control* pChild = GetChild(i); + if (pChild) + { - int childrenCount = children.GetCount(); - if (childrenCount <= 0) + if (pChild == this) { - return VISIT_STOP; + r = AdjustAbsoluteBounds(*pChild, false); } else { - return VISIT_DOWNWARD; + r = AdjustAbsoluteBounds(*pChild); + } + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); } } - private : - _Control* __pControl; - }; - - _Visitor visitor(this); - Accept(visitor); + } - return E_SUCCESS; + return r; } + bool _Control::IsInSizeRange(const Dimension& size) const { @@ -3222,13 +3168,13 @@ _Control::IsInSizeRange(const Dimension& size) const bool _Control::IsInSizeRange(const FloatDimension& size) const { - return (__minSize.width <= size.width) && (size.width <= __maxSize.width) && - (__minSize.height <= size.height) && (size.height <= __maxSize.height); + return (_FloatCompareLE(__minSize.width, size.width)) && (_FloatCompareLE(size.width, __maxSize.width)) && + (_FloatCompareLE(__minSize.height, size.height)) && (_FloatCompareLE(size.height, __maxSize.height)); } // Custom Exception: ex) Location::Map result -_Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks) +_Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool animating) { result r = E_SUCCESS; @@ -3260,11 +3206,52 @@ _Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseR const FloatRectangle fbounds(bounds.x, bounds.y, bounds.width, bounds.height); if (IsLayoutChangable() == false) { - r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + if (animating == false) + { + r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + } } else { - r = UpdateBoundsOfVisualElement(fbounds); + bool isAdjustPosition = false; + + _Window* pWindow = dynamic_cast<_Window*>(this); + _Window* pRootWindow = null; + if (pWindow) + { + _WindowType winType = pWindow->GetWindowType(); + if (winType == _WINDOW_TYPE_VE) + { + _Control* pOwner = pWindow->GetOwner(); + if (pOwner) + { + pRootWindow = pOwner->GetRootWindow(); + if (pRootWindow) + { + if (pRootWindow->IsLayoutChangable() == false) + { + isAdjustPosition = true; + } + } + } + } + } + + if (isAdjustPosition == true) + { + FloatPoint ownerPosition = pRootWindow->GetPositionF(); + if (animating == false) + { + r = UpdateBoundsOfVisualElement(FloatRectangle(fbounds.x - ownerPosition.x, fbounds.y - ownerPosition.y, fbounds.width, fbounds.height)); + } + } + else + { + if (animating == false) + { + r = UpdateBoundsOfVisualElement(fbounds); + } + } } } @@ -3311,7 +3298,7 @@ _Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseR if (moved || resized) { - InvalidateHierarchyAbsoluteBounds(); + InvalidateHierarchyAbsoluteBounds(*this); } ClearLastResult(); @@ -3350,9 +3337,9 @@ result _Control::SetBoundsInternal(const FloatRectangle& bounds, bool callBoundsChangeCallbacks) { SysTryReturn(NID_UI, - IsInSizeRange(Dimension(bounds.width, bounds.height)), E_INVALID_ARG, + IsInSizeRange(FloatDimension(bounds.width, bounds.height)), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified size(%f, %f) is out of range from min size(%d, %d) to max size(%d, %d).", + "[E_INVALID_ARG] The specified size(%f, %f) is out of range from min size(%f, %f) to max size(%f, %f).", bounds.width, bounds.height, __minSize.width, __minSize.height, __maxSize.width, __maxSize.height); SetUpdateLayoutState(true); @@ -3368,6 +3355,8 @@ _Control::SetBounds(const Rectangle& bounds, bool callBoundsChangeCallbacks) { ClearLastResult(); + __isChangedPositionByUser = true; + if (callBoundsChangeCallbacks) { SysTryReturn(NID_UI, @@ -3387,6 +3376,8 @@ _Control::SetBounds(const FloatRectangle& bounds, bool callBoundsChangeCallbacks { ClearLastResult(); + __isChangedPositionByUser = true; + if (callBoundsChangeCallbacks) { SysTryReturn(NID_UI, @@ -3405,6 +3396,8 @@ _Control::SetPosition(const Point& position) { ClearLastResult(); + __isChangedPositionByUser = true; + SysTryReturn(NID_UI, IsMovable(), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable."); @@ -3417,6 +3410,8 @@ _Control::SetPosition(const FloatPoint& position) { ClearLastResult(); + __isChangedPositionByUser = true; + SysTryReturn(NID_UI, IsMovable(), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable."); @@ -3451,6 +3446,18 @@ _Control::SetSize(const FloatDimension& size) return SetBoundsInternal(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height), true); } +bool +_Control::IsChangedPositionByUser(void) const +{ + return __isChangedPositionByUser; +} + +void +_Control::SetChangedPositionByUser(bool change) +{ + __isChangedPositionByUser = change; +} + Dimension _Control::GetMinimumSize(void) const { @@ -3718,30 +3725,52 @@ _Control::GetAbsoluteBounds(bool recalcAlways) const const _Control* pSelf = this; const _Control* pParent = GetParent(); + bool needRecalc = true; while (pParent) { - if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent) + if (pParent->__needRecalcAbsBounds) { - clientBounds = pParent->GetClientBounds(); - accumPoint += Point(clientBounds.x, clientBounds.y); - accumPoint.x -= pParent->GetHorizontalScrollPosition(); - accumPoint.y -= pParent->GetVerticalScrollPosition(); + if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT)) + { + clientBounds = pParent->GetClientBounds(); + accumPoint += Point(clientBounds.x, clientBounds.y); + accumPoint.x -= pParent->GetHorizontalScrollPosition(); + accumPoint.y -= pParent->GetVerticalScrollPosition(); + } + + accumPoint += pSelf->GetPosition(); + pSelf = pParent; + pParent = pParent->GetParent(); } + else + { + Rectangle parentAbsoluteBounds = pParent->GetAbsoluteBounds(false); + accumPoint += Point(parentAbsoluteBounds.x, parentAbsoluteBounds.y); - accumPoint += pSelf->GetPosition(); - pSelf = pParent; - pParent = pParent->GetParent(); - } + if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT)) + { + clientBounds = pParent->GetClientBounds(); + accumPoint += Point(clientBounds.x, clientBounds.y); + accumPoint.x -= pParent->GetHorizontalScrollPosition(); + accumPoint.y -= pParent->GetVerticalScrollPosition(); + } - _Window* pWindow = GetRootWindow(); + accumPoint += pSelf->GetPosition(); + needRecalc = false; + break; + } + } - if (pWindow) + if (needRecalc) { - Point winPoint = pWindow->GetPosition(); - - accumPoint.x += winPoint.x; - accumPoint.y += winPoint.y; + _Window* pWindow = GetRootWindow(); + if (pWindow) + { + Point winPoint = pWindow->GetPosition(); + accumPoint.x += winPoint.x; + accumPoint.y += winPoint.y; + } } absoluteBounds.x = accumPoint.x; @@ -3761,7 +3790,7 @@ _Control::GetAbsoluteBoundsF(bool recalcAlways) const if (!recalcAlways && !__needRecalcAbsBoundsF) { return __absoluteBoundsF; - } + } FloatPoint accumPoint; FloatRectangle absoluteBounds; @@ -3769,30 +3798,52 @@ _Control::GetAbsoluteBoundsF(bool recalcAlways) const const _Control* pSelf = this; const _Control* pParent = GetParent(); + bool needRecalc = true; while (pParent) { - if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent) + if (pParent->__needRecalcAbsBoundsF) { - clientBounds = pParent->GetClientBoundsF(); - accumPoint += FloatPoint(clientBounds.x, clientBounds.y); - accumPoint.x -= pParent->GetHorizontalScrollPosition(); - accumPoint.y -= pParent->GetVerticalScrollPosition(); + if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent) + { + clientBounds = pParent->GetClientBoundsF(); + accumPoint += FloatPoint(clientBounds.x, clientBounds.y); + accumPoint.x -= pParent->GetHorizontalScrollPosition(); + accumPoint.y -= pParent->GetVerticalScrollPosition(); + } + + accumPoint += pSelf->GetPositionF(); + pSelf = pParent; + pParent = pParent->GetParent(); } + else + { + FloatRectangle parentAbsoluteBounds = pParent->GetAbsoluteBoundsF(false); + accumPoint += FloatPoint(parentAbsoluteBounds.x, parentAbsoluteBounds.y); - accumPoint += pSelf->GetPositionF(); - pSelf = pParent; - pParent = pParent->GetParent(); - } + if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent) + { + clientBounds = pParent->GetClientBoundsF(); + accumPoint += FloatPoint(clientBounds.x, clientBounds.y); + accumPoint.x -= pParent->GetHorizontalScrollPosition(); + accumPoint.y -= pParent->GetVerticalScrollPosition(); + } - _Window* pWindow = GetRootWindow(); + accumPoint += pSelf->GetPositionF(); + needRecalc = false; + break; + } + } - if (pWindow) + if (needRecalc) { - FloatPoint winPoint = pWindow->GetPositionF(); - - accumPoint.x += winPoint.x; - accumPoint.y += winPoint.y; + _Window* pWindow = GetRootWindow(); + if (pWindow) + { + FloatPoint winPoint = pWindow->GetPositionF(); + accumPoint.x += winPoint.x; + accumPoint.y += winPoint.y; + } } absoluteBounds.x = accumPoint.x; @@ -3822,10 +3873,11 @@ _Control::SetClientBounds(const Rectangle& bounds) if (moved || resized) { - result r = AdjustAbsoluteBounds(); + result r = AdjustAbsoluteBounds(*this); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); SetUpdateLayoutState(true); + InvalidateHierarchyAbsoluteBounds(*this); } return E_SUCCESS; } @@ -3846,17 +3898,18 @@ _Control::SetClientBounds(const FloatRectangle& bounds) if (moved || resized) { - result r = AdjustAbsoluteBounds(); + result r = AdjustAbsoluteBounds(*this); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); SetUpdateLayoutState(true); + InvalidateHierarchyAbsoluteBounds(*this); } return E_SUCCESS; } bool -_Control::IsCalledSetClientBounds(void) +_Control::IsCalledSetClientBounds(void) const { return __isSetClientBounds; } @@ -3900,7 +3953,12 @@ _Control::SetBackgroundColor(const Color& color) _Control::~_Control(void) { - __destroying = true; + if (!__destroying) + { + __destroying = true; + } + + DoBacktrace(__pDeleteBacktrace.get()); DetachAllChildren(); DetachAllOwnees(); @@ -4010,6 +4068,7 @@ _Control::_Control(void) , __isFocusMode(false) , __isNavigatable(true) , __isFocusWindowActivationChecked(false) + , __isChangedPositionByUser(false) , __pVisualElementContentProvider(null) , __pVisualElement(null) , __pVisualElementEventListener(null) @@ -4049,9 +4108,29 @@ _Control::_Control(void) , __fontFileName(L"") , __pPreviousFocus(null) , __pNextFocus(null) + , __pDragWindow(null) + , __isDragAndDropSource(false) { ClearLastResult(); + std::unique_ptr > pNewBacktrace(new (std::nothrow) ArrayListT); + SysTryReturnVoidResult(NID_SHELL, pNewBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pNewBacktrace->Construct(); + SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pNewBacktrace = move(pNewBacktrace); + +// DoBacktrace(__pNewBacktrace.get()); + + std::unique_ptr > pDeleteBacktrace(new (std::nothrow) ArrayListT); + SysTryReturnVoidResult(NID_SHELL, pDeleteBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pDeleteBacktrace->Construct(); + SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDeleteBacktrace = move(pDeleteBacktrace); + SetControlDelegate(*this); __pAccessibilityContainer = new (std::nothrow) _AccessibilityContainer(*this); __pAccessibilityContainer->Activate(true); @@ -4162,7 +4241,7 @@ _Control::SetDrawWhenVisible(bool draw) } bool -_Control::IsDrawWhenVisible(void) +_Control::IsDrawWhenVisible(void) const { return __drawWhenVisible; } @@ -4174,7 +4253,7 @@ _Control::SetTerminatingOrder(bool postOrderTraversal) } bool -_Control::IsPostOrderTraversal(void) +_Control::IsPostOrderTraversal(void) const { return __isPostOrderTraversal; } @@ -4381,6 +4460,37 @@ _Control::SetDataBindingContext(_DataBindingContext* pDataBindingContext) __pDataBindingContext = pDataBindingContext; } +void +_Control::DoBacktrace(Tizen::Base::Collection::ArrayListT* pBacktraceList) +{ + SysTryReturnVoidResult(NID_SHELL, pBacktraceList, E_INVALID_ARG, "[E_INVALID_ARG]."); + + const static int ADDR_SIZE = 100; + int retSize = 0; + void* pBuffer[ADDR_SIZE]; + + retSize = backtrace(pBuffer, ADDR_SIZE); + for (int i = 0; i < retSize; i++) + { + if (pBuffer[i]) + { + pBacktraceList->Add(pBuffer[i]); + } + } +} + +void +_Control::SetDestroying(bool destroying) +{ + __destroying = destroying; +} + +bool +_Control::IsDestroying(void) const +{ + return __destroying; +} + Tizen::Base::String _Control::GetDescription(void) const { @@ -4456,6 +4566,31 @@ _Control::GetContentAreaBounds(void) const FloatRectangle _Control::GetContentAreaBoundsF(void) const { + if (__contentAreaBounds != FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + { + return __contentAreaBounds; + } + + _Layout::Layout* pLayout = GetLayout(); + SysTryReturn(NID_UI, pLayout, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Layout::LayoutMatchMode widthMatchMode = _Layout::NONE_MODE; + _Layout::LayoutMatchMode heightMatchMode = _Layout::NONE_MODE; + + _Layout::LayoutItem& layoutItem = GetLayoutContainer(); + + pLayout->GetItemWidthMatchMode(layoutItem, widthMatchMode); + pLayout->GetItemHeightMatchMode(layoutItem, heightMatchMode); + + bool widthWrapContent = widthMatchMode == _Layout::WRAP_CONTENT; + bool heightWrapContent = heightMatchMode == _Layout::WRAP_CONTENT; + + if (widthWrapContent || heightWrapContent) + { + FloatDimension contentSize = GetContentSizeF(widthWrapContent, heightWrapContent); + return FloatRectangle(__bounds.x, __bounds.y, contentSize.width, contentSize.height); + } + return __contentAreaBounds; } @@ -4482,7 +4617,7 @@ _Control::GetCapturedBitmapN(bool includeChildren) const SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); GetVisualElement()->Draw(); - ClearLastResult(); // [ToDo] Temp. + ClearLastResult(); rect.SetBounds(boundsInCanvas.x, boundsInCanvas.y, boundsInCanvas.width, boundsInCanvas.height); @@ -4493,11 +4628,7 @@ _Control::GetCapturedBitmapN(bool includeChildren) const SysTryCatch(NID_UI, pBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); r = pBitmap->Construct(*pCanvas, boundsInCanvas); - if (IsFailed(r)) - { - SysAssert(r == E_OUT_OF_MEMORY); - SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); - } + SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); SysLog(NID_UI, "Bitmap (width:%d, height:%d)", pBitmap->GetWidth(), pBitmap->GetHeight()); @@ -4533,7 +4664,7 @@ _Control::AddGestureDetector(const _TouchGestureDetector& gestureDetector) ClearLastResult(); bool exist = __pCoreGestureDetectors->Contains(const_cast<_TouchGestureDetector*>(&gestureDetector)); - SysTryReturnResult(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, "[E_OBJ_ALREADY_EXIST]__pCoreGestureDetectors has gesture already"); + SysTryReturnResult(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, "__pCoreGestureDetectors has gesture already"); result r = __pCoreGestureDetectors->Add(const_cast<_TouchGestureDetector*>(&gestureDetector)); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4939,9 +5070,12 @@ _Control::PrintDescription(bool printChildren, int depth, int level) } // Core - SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)", + SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) clip(%d) movable(%d) resizable(%d)", indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer(), IsEnabled(), GetEnableState(), IsVisible(), GetVisibleState(), - IsFocusable(), focused, IsClipToParent(), IsMovable(), IsResizable(), GetInputEnableState()); + IsClipToParent(), IsMovable(), IsResizable()); + + SysSecureLog(NID_UI, "%ls inputEnableState(%d) focusable(%d) focused(%d) prevFocus(0x%x) nextFocus(0x%x) font(0x%x) fontName(%ls) fontFileName(%ls)", + indent.GetPointer(), GetInputEnableState(), IsFocusable(), focused, __pPreviousFocus, __pNextFocus, __pFont, __fontName.GetPointer(), __fontFileName.GetPointer()); Rectangle bounds = GetBounds(); Dimension min = GetMinimumSize(); @@ -5030,7 +5164,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level) delete pEnumerator; // Print Started Gesture List - IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pStartedGestureEnumerator = GetStartedGestureDetectorEnumeratorN(); + unique_ptr > pStartedGestureEnumerator(GetStartedGestureDetectorEnumeratorN()); SysTryReturn(NID_UI, pStartedGestureEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); while (pStartedGestureEnumerator->MoveNext() == E_SUCCESS) @@ -5043,7 +5177,47 @@ _Control::PrintDescription(bool printChildren, int depth, int level) } } - delete pStartedGestureEnumerator; + // new backtrace + unique_ptr > pNewEnumerator(__pNewBacktrace->GetEnumeratorN()); + SysTryReturn(NID_SHELL, pNewEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String newBacktrace; + + while (pNewEnumerator->MoveNext() == E_SUCCESS) + { + void* pAddr = null; + pNewEnumerator->GetCurrent(pAddr); + + String addr(L""); + addr.Format(LOG_LEN_MAX, L"0x%x ", pAddr); + newBacktrace.Append(addr); + } + + if (!newBacktrace.IsEmpty()) + { + SysSecureLog(NID_UI, "%ls new [%ls]", indent.GetPointer(), newBacktrace.GetPointer()); + } + + // delete backtrace + unique_ptr > pDeleteEnumerator(__pDeleteBacktrace->GetEnumeratorN()); + SysTryReturn(NID_SHELL, pDeleteEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String deleteBacktrace; + + while (pDeleteEnumerator->MoveNext() == E_SUCCESS) + { + void* pAddr = null; + pDeleteEnumerator->GetCurrent(pAddr); + + String addr(L""); + addr.Format(LOG_LEN_MAX, L"0x%x ", pAddr); + deleteBacktrace.Append(addr); + } + + if (!deleteBacktrace.IsEmpty()) + { + SysSecureLog(NID_UI, "%ls delete [%ls]", indent.GetPointer(), deleteBacktrace.GetPointer()); + } // Print VE and Evas switch (level) @@ -5092,6 +5266,282 @@ _Control::PrintDescription(bool printChildren, int depth, int level) return totalCount; } +void +_Control::PrintBacktrace(bool printChildren, bool newBacktrace) +{ + int count = PrintBacktrace(printChildren, 0, newBacktrace); + + SysSecureLog(NID_UI, "%d controls were printed.", count); +} + +int +_Control::PrintBacktrace(bool printChildren, int depth, bool newBacktrace) +{ + String indent(L""); + String format(L""); + + format.Format(LOG_LEN_MAX, L"%d", depth); + + for (int i = 0; i < depth; i++) + { + indent.Append(L" "); + } + + indent.Append(format); + + String delimiter(L"-------------------------------------------------------------------------------------------"); + SysSecureLog(NID_UI, "%ls", delimiter.GetPointer()); + + SysSecureLog(NID_UI, "%ls 0x%x(%d %ls)", indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer()); + + Tizen::Base::Collection::ArrayListT* pBacktraceList = null; + + if (newBacktrace) + { + pBacktraceList = __pNewBacktrace.get(); + } + else + { + pBacktraceList = __pDeleteBacktrace.get(); + } + + SysTryReturn(NID_UI, pBacktraceList, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + int backtraceCount = pBacktraceList->GetCount(); + SysTryReturn(NID_UI, backtraceCount > 0, 0, E_INVALID_ARG, "[E_INVALID_ARG]."); + + unique_ptr pBacktrace(new (std::nothrow) void*[backtraceCount]); + SysTryReturn(NID_UI, pBacktrace, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + unique_ptr > pEnumerator(pBacktraceList->GetEnumeratorN()); + SysTryReturn(NID_UI, pEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + int i = 0; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + void* pAddr = null; + pEnumerator->GetCurrent(pAddr); + + pBacktrace[i++] = pAddr; + } + + char** pSymbols = backtrace_symbols(pBacktrace.get(), backtraceCount); + SysTryReturn(NID_UI, pSymbols, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + for (int j = 0; j < backtraceCount; j++) + { + SysSecureLog(NID_UI, "%ls [%s]", indent.GetPointer(), pSymbols[j]); + } + + free(pSymbols); + + static int totalCount = 0; + + if (depth == 0) + { + totalCount = 0; + } + + if (printChildren) + { + depth ++; + + int count = GetChildCount(); + totalCount += count; + + for (int i = count - 1; i >= 0; --i) + { + _Control* pChild = GetChild(i); + if (pChild) + { + pChild->PrintBacktrace(printChildren, depth, newBacktrace); + } + } + } + + return totalCount; +} + +void +_Control::DragAndDropBegin(const _DragAndDropItem& dragAndDropItem) +{ + _Window* pRootWindow = GetRootWindow(); + if (!pRootWindow) + { + return; + } + + __isDragAndDropSource = true; + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + pEcoreEvas->SetDragAndDropState(true); + pEcoreEvas->DragAndDropBegin(*pRootWindow, dragAndDropItem.GetData()); + + __pDragWindow = GetControlDelegate().OnDragAndDropBeginning(); +} + +void +_Control::DragAndDropDrop(void) +{ + _Window* pRootWindow = GetRootWindow(); + if (!pRootWindow) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + pEcoreEvas->DragAndDropDrop(*pRootWindow); + + GetControlDelegate().OnDragAndDropDropping(); + + // Check self drop. + Point dropPosition = pEcoreEvas->GetDropPosition(); + Rectangle bounds = GetRootWindow()->GetBounds(); + if (bounds.Contains(dropPosition)) + { + _Control* pDropControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(dropPosition, true); + if (pDropControl) + { +// Send dnd events to Source. +#if 0 + if (pDropControl->IsDragAndDropSource() == false) +#endif + { + int pid = pEcoreEvas->GetProcessId(pRootWindow->GetNativeHandle()); + String dropData = pEcoreEvas->GetDropData(); + SysLog(NID_UI, "[DND][S:%d][0x%x] DROPPED(%ls)", pid, pDropControl, dropData.GetPointer()); + _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, dropData); + pDropControl->GetControlDelegate().OnDragAndDropDropped(*pDragAndDropItem); + delete pDragAndDropItem; + } + } + } + + __isDragAndDropSource = false; +} + +void +_Control::DragAndDropCancel(void) +{ +} + +_Window* +_Control::GetDragWindow(void) const +{ + return __pDragWindow; +} + +_Control* +_Control::GetDragSourceControl(void) const +{ + return null; +} + +bool +_Control::IsDragAndDropSource(void) const +{ + return __isDragAndDropSource; +} + +_Window* +_Control::OnDragAndDropBeginning(void) +{ + FloatPoint dragPosition(0.0f, 0.0f); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_BEGINNING, dragPosition, null); + + return null; +} + +void +_Control::OnDragAndDropDropping(void) +{ + FloatPoint dragPosition(0.0f, 0.0f); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_DROPPING, dragPosition, null); +} + +void +_Control::OnDragAndDropEntered(void) +{ + FloatPoint dragPosition(0.0f, 0.0f); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_ENTERED, dragPosition, null); +} + +void +_Control::OnDragAndDropMoved(const FloatPoint& position) +{ + FloatPoint dragPosition(position.x, position.y); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_MOVED, dragPosition, null); +} + +void +_Control::OnDragAndDropLeft(void) +{ + FloatPoint dragPosition(0.0f, 0.0f); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_LEFT, dragPosition, null); +} + +void +_Control::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) +{ + FloatPoint dragPosition(0.0f, 0.0f); + FireDragAndDropEvent(_DRAG_AND_DROP_STATE_DROPPED, dragPosition, const_cast<_DragAndDropItem*>(&dragAndDropItem)); +} + +result +_Control::AddDragAndDropEventListener(const _IDragAndDropEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pDragAndDropEvent.get() == null) + { + unique_ptr<_DragAndDropEvent> pDragAndDropEvent(_DragAndDropEvent::CreateInstanceN(*this)); + SysTryReturnResult(NID_UI, pDragAndDropEvent, E_OUT_OF_MEMORY, "Memory is insufficient."); + + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDragAndDropEvent = move(pDragAndDropEvent); + } + + r = __pDragAndDropEvent->AddListener(listener); + + return r; +} + +result +_Control::RemoveDragAndDropEventListener(const _IDragAndDropEventListener& listener) +{ + SysTryReturnResult(NID_UI, __pDragAndDropEvent.get(), E_OBJ_NOT_FOUND, "The _IDragAndDropEventListener does not exist in the event listener list."); + + result r = __pDragAndDropEvent->RemoveListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_Control::FireDragAndDropEvent(_DragAndDropState dragState, FloatPoint& dragPosition, _DragAndDropItem* pDragItem) +{ + if (__pDragAndDropEvent.get() == null) + { + return; + } + + IEventArg* pArg = _DragAndDropEvent::CreateDragAndDropEventArgN(*this, dragState, dragPosition, pDragItem); + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, pArg, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDragAndDropEvent->Fire(*pArg); + + SetLastResult(E_SUCCESS); +} + _ITouchEventPreviewer* _Control::GetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>) const { @@ -5419,11 +5869,11 @@ Tizen::Base::Collection::IListT<_Control*>* _Control::GetFocusListN(void) const { unique_ptr > pControlFocusList (new (std::nothrow) ArrayListT<_Control*>); - SysTryReturn(NID_UI_CTRL, pControlFocusList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pControlFocusList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); MakeFocusList(this, pControlFocusList.get()); unique_ptr > pEnum(pControlFocusList->GetEnumeratorN()); - SysTryReturn(NID_UI_CTRL, pEnum, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pEnum, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); int i =0; int nextContainerIndex = -1; while (pEnum->MoveNext() == E_SUCCESS) @@ -5445,5 +5895,22 @@ _Control::GetFocusListN(void) const } return pControlFocusList.release(); } -}} // Tizen::Ui +bool +_Control::IsChildAttachable(_Control& child) const +{ + if (dynamic_cast <_Window*>(&child) != null) + { + return false; + } + + return true; +} + +bool +_Control::IsAnimating(void) const +{ + return false; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ControlImpl.cpp b/src/ui/FUi_ControlImpl.cpp index dad33b6..b9f6d9c 100644 --- a/src/ui/FUi_ControlImpl.cpp +++ b/src/ui/FUi_ControlImpl.cpp @@ -55,6 +55,7 @@ #include "FUiAnim_VisualElementImpl.h" #include "FUiCtrl_Popup.h" #include "FUi_Window.h" +#include "FUi_DragAndDropItem.h" //#define _TC_PASS @@ -445,7 +446,7 @@ private: { bool isPublicKey = false; - if (keyCode <= _KEY_HARDWARE_MAX) + if (keyCode <= _KEY_CLIPBOARD) { isPublicKey = true; } @@ -457,6 +458,11 @@ private: { result r = E_SUCCESS; + if (keyCode == KEY_INVALID) + { + return r; + } + switch (keyState) { case KEY_PRESSED: @@ -571,8 +577,8 @@ private: _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); - Point startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBounds().x, - __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBounds().y); + FloatPoint startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x, + __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y); pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y, touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); @@ -1103,6 +1109,12 @@ public: _TouchManager* pTouchManager = _TouchManager::GetInstance(); SysTryReturn(NID_UI, pTouchManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + _Control* pTouchedControl = pTouchManager->GetTouchControlSource(); + + if (&__impl.GetCore() != pTouchedControl) + { + return filterd; + } switch (gestureType) { @@ -1329,8 +1341,8 @@ public: _TouchManager* __pTouchManager = _TouchManager::GetInstance(); SysTryReturn(NID_UI, __pTouchManager, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null."); - Point startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBounds().x, - __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBounds().y); + FloatPoint startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x, + __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y); pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y, touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); @@ -1358,6 +1370,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1397,6 +1423,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1436,6 +1476,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1475,6 +1529,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1507,6 +1575,24 @@ public: return __impl.CallOnTouchCanceled(source, touchInfo); } + virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchInfo) + { + //SysLog(NID_UI, "OnWheelMoved, source = 0x%x", &source); + bool isFiltered = false; + + // 3. Impl + isFiltered = __impl.OnTouchWheeled(__impl, touchInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.OnTouchWheeled(source, touchInfo); + + return isFiltered; + } + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo) { _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; @@ -1514,6 +1600,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1562,6 +1662,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1610,6 +1724,20 @@ public: if (__impl.__pPublicPropagatedTouchEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1653,132 +1781,33 @@ public: virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) { - return _UI_TOUCH_EVENT_DELIVERY_YES; - } - - virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseInfo) - { - SysLog(NID_UI, "OnMousePressed, source = 0x%x", &source); - bool isFiltered = false; + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_YES; // 3. Impl - isFiltered = __impl.OnMousePressed(__impl, mouseInfo); - if (isFiltered) - { - return true; - } - - // 4. Core - isFiltered = __core.OnMousePressed(source, mouseInfo); - - return isFiltered; - } - - virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseInfo) - { - SysLog(NID_UI, "OnMouseReleased, source = 0x%x", &source); - bool isFiltered = false; - - // 3. Impl - isFiltered = __impl.OnMouseReleased(__impl, mouseInfo); - if (isFiltered) - { - return true; - } - - // 4. Core - isFiltered = __core.OnMouseReleased(source, mouseInfo); - - return isFiltered; - } - - virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseInfo) - { - return false; - } - - virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseInfo) - { - SysLog(NID_UI, "OnWheelMoved, source = 0x%x", &source); - bool isFiltered = false; - - // 3. Impl - isFiltered = __impl.OnMouseWheeled(__impl, mouseInfo); - if (isFiltered) - { - return true; - } - - // 4. Core - isFiltered = __core.OnMouseWheeled(source, mouseInfo); - - return isFiltered; - } - - virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseInfo) - { - _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; - - // 3. Impl - isFiltered = __impl.OnPreviewMousePressed(__impl, mouseInfo); - if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) - { - return _UI_TOUCH_EVENT_DELIVERY_NO; - } - - // 4. Core - isFiltered = __core.OnPreviewMousePressed(source, mouseInfo); - - return isFiltered; - } - - virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseInfo) - { - _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; - - // 3. Impl - isFiltered = __impl.OnPreviewMouseReleased(__impl, mouseInfo); + isFiltered = __impl.OnPreviewTouchCanceled(__impl, touchInfo); if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) { return _UI_TOUCH_EVENT_DELIVERY_NO; } // 4. Core - isFiltered = __core.OnPreviewMouseReleased(source, mouseInfo); - + isFiltered = __core.OnPreviewTouchCanceled(source, touchInfo); return isFiltered; } - virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseInfo) + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchInfo) { _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; // 3. Impl - isFiltered = __impl.OnPreviewMouseMoved(__impl, mouseInfo); + isFiltered = __impl.OnPreviewTouchWheeled(__impl, touchInfo); if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) { return _UI_TOUCH_EVENT_DELIVERY_NO; } // 4. Core - isFiltered = __core.OnPreviewMouseMoved(source, mouseInfo); - - return isFiltered; - } - - virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseInfo) - { - _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; - - // 3. Impl - isFiltered = __impl.OnPreviewMouseWheeled(__impl, mouseInfo); - if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) - { - return _UI_TOUCH_EVENT_DELIVERY_NO; - } - - // 4. Core - isFiltered = __core.OnPreviewMouseWheeled(source, mouseInfo); + isFiltered = __core.OnPreviewTouchWheeled(source, touchInfo); return isFiltered; } @@ -1841,7 +1870,16 @@ public: { SysTryReturnVoidResult(NID_UI, __impl.__pCoreKeyEvent, E_SYSTEM, "[E_SYSTEM] System error occurred."); - __impl.__pCoreKeyEvent->ProcessListener(KEY_LONGPRESSED, __keyInfo.GetKeyCode()); + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Control* pControl = pControlManager->GetFocusControl(); + SysTryReturnVoidResult(NID_UI, pControl, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControl == null."); + + if (pControl == &__impl.GetCore()) + { + __impl.__pCoreKeyEvent->ProcessListener(KEY_LONGPRESSED, __keyInfo.GetKeyCode()); + } } } @@ -1851,7 +1889,7 @@ public: bool isFiltered = false; - if (__impl.__pPublicPropagatedKeyEventListener != null) + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); @@ -1888,7 +1926,7 @@ public: bool isFiltered = false; - if (__impl.__pPublicPropagatedKeyEventListener != null) + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); if (pControlImpl == null) @@ -1962,7 +2000,7 @@ public: bool isFiltered = false; - if (__impl.__pPublicPropagatedKeyEventListener != null) + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); if (pControlImpl == null) @@ -2028,7 +2066,7 @@ public: { bool isFiltered = false; - if (__impl.__pPublicPropagatedKeyEventListener != null) + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); if (pControlImpl == null) @@ -2075,7 +2113,7 @@ public: { bool isFiltered = false; - if (__impl.__pPublicPropagatedKeyEventListener != null) + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); if (pControlImpl == null) @@ -2666,7 +2704,6 @@ _ControlImpl::OnPreAttachedToMainTree(void) result _ControlImpl::OnAttachedToMainTree(void) { - result r = E_SUCCESS; result returnResultPublic = E_SUCCESS; result returnResultCore = E_SUCCESS; @@ -2677,19 +2714,10 @@ _ControlImpl::OnAttachedToMainTree(void) } returnResultPublic = GetPublic().OnInitializing(); - returnResultCore = GetCore().OnAttachedToMainTree(); - - if (IsFailed(returnResultPublic) || IsFailed(returnResultCore)) - { - _ContainerImpl* pParent = GetParent(); - SysTryReturn(NID_UI, pParent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - r = pParent->RemoveChild(this, false); - SysAssert(r == E_SUCCESS); + SysTryReturn(NID_UI, returnResultPublic == E_SUCCESS, returnResultPublic, returnResultPublic, "[%s] propagated.", GetErrorMessage(returnResultPublic)); - SysTryReturn(NID_UI, returnResultPublic == E_SUCCESS, returnResultPublic, returnResultPublic, "[%s] propagated.", GetErrorMessage(returnResultPublic)); - SysTryReturn(NID_UI, returnResultCore == E_SUCCESS, returnResultCore, returnResultCore, "[%s] propagated.", GetErrorMessage(returnResultCore)); - } + returnResultCore = GetCore().OnAttachedToMainTree(); + SysTryReturn(NID_UI, returnResultCore == E_SUCCESS, returnResultCore, returnResultCore, "[%s] propagated.", GetErrorMessage(returnResultCore)); return returnResultPublic; } @@ -2760,6 +2788,12 @@ _ControlImpl::OnChildAttached(const _Control& child) } void +_ControlImpl::OnChildAttaching(const _Control& child) +{ + GetCore().OnChildAttaching(child); +} + +void _ControlImpl::OnChildDetaching(const _Control& child) { GetCore().OnChildDetaching(child); @@ -3200,6 +3234,12 @@ _ControlImpl::OnTouchMoved(const _ControlImpl& source, const _TouchInfo& touchin return false; } +bool +_ControlImpl::OnTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + _UiTouchEventDelivery _ControlImpl::OnPreviewTouchPressed(const _ControlImpl& source, const _TouchInfo& touchInfo) { @@ -3224,76 +3264,101 @@ _ControlImpl::OnPreviewTouchCanceled(const _ControlImpl& source, const _TouchInf return _UI_TOUCH_EVENT_DELIVERY_YES; } +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + bool -_ControlImpl::OnMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo) +_ControlImpl::OnFocusGained(const _ControlImpl& source) { return false; } bool -_ControlImpl::OnMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo) +_ControlImpl::OnFocusLost(const _ControlImpl& source) { return false; } bool -_ControlImpl::OnMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo) +_ControlImpl::OnTraversalControlFocusGained(void) +{ + return false; +} +bool +_ControlImpl::OnTraversalControlFocusLost(void) { return false; } - bool -_ControlImpl::OnMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo) +_ControlImpl::OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs) { return false; } -_UiTouchEventDelivery -_ControlImpl::OnPreviewMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo) +void +_ControlImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs) { - return _UI_TOUCH_EVENT_DELIVERY_YES; + GetPublic().OnUserEventReceivedN(requestId, pArgs); } -_UiTouchEventDelivery -_ControlImpl::OnPreviewMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo) +_Window* +_ControlImpl::OnDragAndDropBeginning(void) { - return _UI_TOUCH_EVENT_DELIVERY_YES; + return GetCore().OnDragAndDropBeginning(); } -_UiTouchEventDelivery -_ControlImpl::OnPreviewMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo) +void +_ControlImpl::OnDragAndDropDropping(void) { - return _UI_TOUCH_EVENT_DELIVERY_YES; + GetCore().OnDragAndDropDropping(); } -_UiTouchEventDelivery -_ControlImpl::OnPreviewMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo) +void +_ControlImpl::OnDragAndDropEntered(void) { - return _UI_TOUCH_EVENT_DELIVERY_YES; + GetCore().OnDragAndDropEntered(); } -bool -_ControlImpl::OnFocusGained(const _ControlImpl& source) +void +_ControlImpl::OnDragAndDropMoved(const FloatPoint& position) { - return false; + GetCore().OnDragAndDropMoved(position); } -bool -_ControlImpl::OnFocusLost(const _ControlImpl& source) +void +_ControlImpl::OnDragAndDropLeft(void) { - return false; + GetCore().OnDragAndDropLeft(); } -bool -_ControlImpl::OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs) +void +_ControlImpl::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) { - return false; + GetCore().OnDragAndDropDropped(dragAndDropItem); } -void -_ControlImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs) +bool +_ControlImpl::IsAnimating(void) const { - GetPublic().OnUserEventReceivedN(requestId, pArgs); + Animations::ControlAnimator* pControlAnimator = GetControlAnimator(); + if (pControlAnimator) + { + AnimatorStatus sizeAnimationStatus = pControlAnimator->GetStatus(ANIMATION_TARGET_SIZE); + AnimatorStatus positionAnimationStatus = pControlAnimator->GetStatus(ANIMATION_TARGET_POSITION); + + if ((sizeAnimationStatus == ANIMATOR_STATUS_PLAYING) || (positionAnimationStatus == ANIMATOR_STATUS_PLAYING)) + { + return true; + } + else + { + return false; + } + } + return false; } bool @@ -4004,7 +4069,7 @@ _ControlImpl::SetBoundsAndUpdateLayout(const Tizen::Graphics::Rectangle& bounds) } result -_ControlImpl::SetBoundsAndUpdateLayoutF(const Tizen::Graphics::FloatRectangle& bounds) +_ControlImpl::SetBoundsAndUpdateLayout(const Tizen::Graphics::FloatRectangle& bounds) { result r = E_SUCCESS; r = GetCore().SetBounds(bounds); @@ -4521,6 +4586,7 @@ _ControlImpl::_ControlImpl(Control* pPublic, _Control* pCore) , __fontSize(0) , __inputEventConsumed(false) , __focusableChangable(true) + , __destroying(false) , __pCoreEventListener(null) , __pCoreKeyEvent(null) , __pCoreTouchEvent(null) @@ -4954,6 +5020,18 @@ _ControlImpl::GetTouchPressThresholdPixel(void) const return GetCore().GetTouchPressThresholdPixel(); } +bool +_ControlImpl::IsDestroying(void) const +{ + return __destroying; +} + +void +_ControlImpl::SetDestroyingFlag(bool destroying) +{ + __destroying = destroying; +} + result _ControlImpl::SetFontFromFile(const String& fileName) { diff --git a/src/ui/FUi_ControlManager.cpp b/src/ui/FUi_ControlManager.cpp index 010ec24..6dce58b 100644 --- a/src/ui/FUi_ControlManager.cpp +++ b/src/ui/FUi_ControlManager.cpp @@ -64,6 +64,7 @@ #include "FUiCtrl_FormImpl.h" #include "FUiCtrl_Frame.h" #include "FUiCtrl_IndicatorManager.h" +#include "FUiAnim_ControlVisualElement.h" using namespace std; using namespace Tizen::App; @@ -114,9 +115,38 @@ int Convert(_ControlRotation rotation) extern "C" { _OSP_EXPORT_ void -_UiPrintControl(const _Control& control, bool printChildren, int level) +_UiPrintBacktrace(_Control* pControl, int printChildren, int newBacktrace) { - const_cast<_Control&>(control).PrintDescription(printChildren, level); + SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pControl->PrintBacktrace((bool)printChildren, (bool)newBacktrace); +} + +_OSP_EXPORT_ void +_UiPrintBacktraceAll(int newBacktrace) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (pControlManager->GetWindowCount() == 0) + { + return; + } + + int count = pControlManager->GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = pControlManager->GetWindow((count-1) - i); + _UiPrintBacktrace(pWindow, 1, newBacktrace); + } +} + +_OSP_EXPORT_ void +_UiPrintControl(_Control* pControl, int printChildren, int level) +{ + SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pControl->PrintDescription((bool)printChildren, level); } _OSP_EXPORT_ void @@ -134,7 +164,7 @@ _UiPrintTree(int level) for (int i = 0; i < count; i++) { _Window* pWindow = pControlManager->GetWindow((count-1) - i); - _UiPrintControl(*pWindow, true, level); + _UiPrintControl(pWindow, 1, level); } } @@ -151,7 +181,7 @@ _UiPrintControlList(int level) if (pControl != null) { SysSecureLog(NID_UI, "[Control Manager] pControl index %d", i); - _UiPrintControl(*pControl, true, level); + _UiPrintControl(pControl, true, level); } else { @@ -218,11 +248,6 @@ _ControlManager::InitInstance(void) _ControlHandle _ControlManager::Register(_Control* pObject) { - if (pObject) - { - SysLog(NID_UI, "A _Control Registered()"); - } - if (pObject == null) { return _ControlHandle(); @@ -233,6 +258,13 @@ _ControlManager::Register(_Control* pObject) __pAllControlList->Add(pObject); } + _HistoryInfo* pHistoryInfo = new (std::nothrow) _HistoryInfo(pObject); + SysTryReturn(NID_UI, pHistoryInfo, _ControlHandle(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + +// pHistoryInfo->SetBacktrace(*pObject->__pNewBacktrace.get()); + + AddHistory(__pNewHistory, pHistoryInfo); + return __objectManager.Register(*pObject); } @@ -240,9 +272,9 @@ _Control* _ControlManager::Release(const _ControlHandle& handle) { _Control* pObject = GetObject(handle); - if (pObject) + if (!pObject) { - SysLog(NID_UI, "A _Control Released()"); + return null; } if (__pAllControlList) @@ -250,6 +282,13 @@ _ControlManager::Release(const _ControlHandle& handle) __pAllControlList->Remove(pObject); } + _HistoryInfo* pHistoryInfo = new (std::nothrow) _HistoryInfo(pObject); + SysTryReturn(NID_UI, pHistoryInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pHistoryInfo->SetBacktrace(*pObject->__pDeleteBacktrace.get()); + + AddHistory(__pDeleteHistory, pHistoryInfo); + return __objectManager.Unregister(handle); } @@ -265,6 +304,20 @@ _ControlManager::GetObject(const _ControlHandle& handle) const return __objectManager.GetObject(handle); } +_Control* +_ControlManager::GetObject(int handle) +{ + _ControlHandle controlHandle = __objectManager.GetHandle(handle); + return __objectManager.GetObject(controlHandle); +} + +const _Control* +_ControlManager::GetObject(int handle) const +{ + _ControlHandle controlHandle = const_cast<_ControlManager*>(this)->__objectManager.GetHandle(handle); + return __objectManager.GetObject(controlHandle); +} + int _ControlManager::GetUsedHandleCount(void) const { @@ -311,6 +364,8 @@ _ControlManager::_ControlManager(void) // [ToDo] exception check. , __screenDpi(0) , __pClipboardOwner(null) , __pControlManagerEventListenerList(new (std::nothrow) LinkedListT<_IControlManagerEventListener*>) + , __pNewHistory(null) + , __pDeleteHistory(null) { result r = _CoordinateInfo::GetAppCoordinateSystem(__isCoordinateSystemLogical, __logicalCoordinateSystem, __logicalBaseScreenSize); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred."); @@ -329,6 +384,18 @@ _ControlManager::_ControlManager(void) // [ToDo] exception check. _EcoreEvas::CreateInstanceN(); + __pNewHistory = new (std::nothrow) ArrayListT<_HistoryInfo*>; + SysTryReturnVoidResult(NID_UI, __pNewHistory, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pNewHistory->Construct(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDeleteHistory = new (std::nothrow) ArrayListT<_HistoryInfo*>; + SysTryReturnVoidResult(NID_UI, __pDeleteHistory, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pDeleteHistory->Construct(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + __pWindowList = new (std::nothrow)LinkedListT<_Window*>; SysTryCatch(NID_UI, __pWindowList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -417,6 +484,42 @@ _ControlManager::~_ControlManager(void) __pGestureList = null; } + if (__pNewHistory) + { + unique_ptr > pEnumerator(__pNewHistory->GetEnumeratorN()); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _HistoryInfo* pHistoryInfo = null; + pEnumerator->GetCurrent(pHistoryInfo); + + delete pHistoryInfo; + } + } + + delete __pNewHistory; + __pNewHistory = null; + } + + if (__pDeleteHistory) + { + unique_ptr > pEnumerator(__pDeleteHistory->GetEnumeratorN()); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _HistoryInfo* pHistoryInfo = null; + pEnumerator->GetCurrent(pHistoryInfo); + + delete pHistoryInfo; + } + } + + delete __pDeleteHistory; + __pDeleteHistory = null; + } + DestroyEcoreEvasMgr(); _IndicatorManager::ReleaseInstance(); @@ -598,14 +701,14 @@ _ControlManager::ActivateWindow(_Window& window, bool invalidate) r = CallOnPreAttachedToMainTree(window); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = CallOnAttachedToMainTree(window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + if (invalidate) { window.Invalidate(true); } - r = CallOnAttachedToMainTree(window); - SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (window.IsDimmingEnabled()) { r = _DimmingManager::GetInstance()->ShowDimmingLayer(&window); @@ -758,7 +861,7 @@ _ControlManager::CallControlManagerEventListener(void) { _IControlManagerEventListener* pListener = null; pEnumerator->GetCurrent(pListener); - + if (pListener) { pListener->OnControlManagerTerminating(); @@ -778,7 +881,7 @@ _ControlManager::CloseWindow(_Window& window) // [ToDo] exception check. return E_SUCCESS; } - bool wasWindowOnTop = IsWindowOnTop(window); + _Window* pTopWindow = GetTopWindow(); r = CallOnDetachingFromMainTree(window); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -790,9 +893,10 @@ _ControlManager::CloseWindow(_Window& window) // [ToDo] exception check. r = DetachWindow(window); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if (wasWindowOnTop) + _Window* pNewTopWindow = GetTopWindow(); + + if (pNewTopWindow != pTopWindow) { - _Window* pNewTopWindow = GetTopWindow(); if (pNewTopWindow && pNewTopWindow->IsActivationEnabled()) { pNewTopWindow->Activate(); @@ -802,10 +906,31 @@ _ControlManager::CloseWindow(_Window& window) // [ToDo] exception check. SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); } } + } + + if (dynamic_cast <_Frame*>(pNewTopWindow) != null) + { + __pCurrentFrame = pNewTopWindow; + } + else + { + bool findFrame = false; + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + if (pFrame) + { + __pCurrentFrame = pFrame; + findFrame = true; + break; + } + } - if (dynamic_cast <_Frame*>(pNewTopWindow) != null) + if (!findFrame) { - __pCurrentFrame = pNewTopWindow; + __pCurrentFrame = null; } } @@ -824,7 +949,11 @@ _ControlManager::GetControl(int index) const int _ControlManager::GetControlCount(void) const { - return __pAllControlList->GetCount(); + if (__pAllControlList) + { + return __pAllControlList->GetCount(); + } + return -1; } _Window* @@ -839,7 +968,11 @@ _ControlManager::GetWindow(int index) const int _ControlManager::GetWindowCount(void) const { - return __pWindowList->GetCount(); + if (__pWindowList) + { + return __pWindowList->GetCount(); + } + return -1; } @@ -1383,7 +1516,7 @@ _ControlManager::RemoveControlManagerEventListener(_IControlManagerEventListener } _Control* -_ControlManager::GetTopmostTouchedControl(const Point& point) +_ControlManager::GetTopmostTouchedControl(const Point& point, bool activation) { _Control* pControl = null; _Window* pTopWindow = null; @@ -1393,58 +1526,6 @@ _ControlManager::GetTopmostTouchedControl(const Point& point) _Control* pCapturedControl = pTouchManager->GetCapturedControl(); - if (pCapturedControl) - { - if (pTouchManager->IsCaptureAllowedOwnerBounds()) - { - if (pTouchManager->IsCaptureAllowedOutOfBounds()) - { - pControl = pCapturedControl; - } - - _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl); - if (pWindow) - { - _Control* pOwner = pWindow->GetOwner(); - if (pOwner) - { - Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds()); - if ((point.x >= ownerRc.x) && (point.x <= (ownerRc.x + ownerRc.width)) && (point.y >= ownerRc.y) && (point.y <= (ownerRc.y + ownerRc.height))) - { - pControl = pOwner; - } - } - } - - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); - if ((point.x >= rc.x) && (point.x <= (rc.x + rc.width)) && (point.y >= rc.y) && (point.y <= (rc.y + rc.height))) - { - pControl = pCapturedControl; - } - } - else - { - if (pTouchManager->IsCaptureAllowedOutOfBounds()) - { - pControl = pCapturedControl; - } - else - { - Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); - - if ((point.x < rc.x) || (point.x > (rc.x + rc.width)) || (point.y < rc.y) || (point.y > (rc.y + rc.height))) - { - pControl = pCapturedControl; - } - } - } - - if (pControl != null) - { - return pControl; - } - } - int count = GetWindowCount(); if (count != 0) { @@ -1463,6 +1544,14 @@ _ControlManager::GetTopmostTouchedControl(const Point& point) continue; } + if (activation == true) + { + if (pWindow->IsActivationEnabled() == false) + { + continue; + } + } + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); @@ -1520,21 +1609,121 @@ _ControlManager::GetTopmostTouchedControl(const Point& point) if (pTopWindow != null) { - Point winPos(0, 0); - winPos = pTopWindow->GetPosition(); + _RootVisualElement* pRootVisualElement = pTopWindow->GetRootVisualElement(); + if (pRootVisualElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } - Point relPos(point.x - winPos.x, point.y - winPos.y); - pControl = pTopWindow->GetTopmostChildAt(relPos); - if (pControl != null) + Tizen::Graphics::Rectangle touchedWindowBounds = pTopWindow->GetBounds(); + + Tizen::Base::Collection::IList* pList = pRootVisualElement->GetChildrenN(); + if (!pList) + { + SetLastResult(E_SYSTEM); + return null; + } + + int count = pList->GetCount(); + for (int i = count-1; i>=0; i--) { - if (pControl->GetRootWindow() == pTopWindow) + _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i)); + if (pChildControlVisualElement) { - return pControl; + _Control* pChildControl = static_cast<_Control*>(pChildControlVisualElement->GetUserData()); + if (pChildControl == null) + { + continue; + } + + _Window* pChildWindow = dynamic_cast<_Window*>(pChildControl); + if (pChildWindow == null) + { + continue; + } + + Tizen::Graphics::FloatPoint tempPoint(point.x, point.y); + + if (pChildWindow && pChildWindow->GetWindowType() == _WINDOW_TYPE_VE) + { + Tizen::Graphics::Rectangle windowBounds = pChildWindow->GetBounds(); + tempPoint.x = static_cast(tempPoint.x - windowBounds.x); + tempPoint.y = static_cast(tempPoint.y - windowBounds.y); + } + else + { + tempPoint.x = static_cast(tempPoint.x - touchedWindowBounds.x); + tempPoint.y = static_cast(tempPoint.y - touchedWindowBounds.y); + } + + _ControlVisualElement* pControlVisualElement = pChildControlVisualElement->GetControlChildAtPoint(tempPoint); + if (pControlVisualElement) + { + pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); + if (pControl) + { + break; + } + } } } + delete pList; } - return null; + if (pCapturedControl) + { + if (pTouchManager->IsCaptureAllowedOwnerBounds()) + { + if (pTouchManager->IsCaptureAllowedOutOfBounds()) + { + pControl = pCapturedControl; + } + + _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl); + if (pWindow) + { + _Control* pOwner = pWindow->GetOwner(); + if (pOwner) + { + Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds()); + if ((point.x >= ownerRc.x) && (point.x <= (ownerRc.x + ownerRc.width)) && (point.y >= ownerRc.y) && (point.y <= (ownerRc.y + ownerRc.height))) + { + pControl = pOwner; + } + } + } + + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + if ((point.x >= rc.x) && (point.x <= (rc.x + rc.width)) && (point.y >= rc.y) && (point.y <= (rc.y + rc.height))) + { + pControl = pCapturedControl; + } + } + else + { + if (pTouchManager->IsCaptureAllowedOutOfBounds()) + { + pControl = pCapturedControl; + } + else + { + Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds()); + + if ((point.x < rc.x) || (point.x > (rc.x + rc.width)) || (point.y < rc.y) || (point.y > (rc.y + rc.height))) + { + pControl = pCapturedControl; + } + } + } + + if (pControl != null) + { + return pControl; + } + } + + return pControl; } // [review] rename __InvXformer @@ -1756,17 +1945,17 @@ void _ControlManager::OnSettingChanged(Tizen::Base::String& key) { const wchar_t* FONT_TYPE = L"http://tizen.org/setting/font.type"; - const wchar_t* LOCALE_COUNTRY = L"http://tizen.org/setting/locale.country"; - const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + const wchar_t* LOCALE_COUNTRY = L"http://tizen.org/setting/locale.country"; + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; - if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE) + if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE) { _FontImpl::UpdateDefaultFont(key); __isSystemFontChanged = true; struct _Visitor - : public _Control::Visitor + : public _Control::Visitor { - virtual _Control::VisitType Visit(_Control& control) + virtual _Control::VisitType Visit(_Control& control) { control.GetFallbackFont(); _IControlDelegate& delegate = control.GetControlDelegate(); @@ -1803,7 +1992,7 @@ _ControlManager::OnSettingChanged(Tizen::Base::String& key) IEnumeratorT<_TouchGestureDetector*>* pEnumerator = __pGestureList->GetEnumeratorN(); SysTryReturnVoidResult(NID_UI, pEnumerator, E_SYSTEM, "[E_SYSTEM] System error occurred.") - int duration = static_cast(elm_config_longpress_timeout_get() * 1000); + int duration = static_cast(elm_config_longpress_timeout_get() * 1000); if (duration == 0) { duration = 500; @@ -1823,7 +2012,7 @@ _ControlManager::OnSettingChanged(Tizen::Base::String& key) { _TouchLongPressGestureDetector* pGestureLongPress= dynamic_cast<_TouchLongPressGestureDetector*>(const_cast<_TouchGestureDetector*>(pGestureDetector)); SysTryReturnVoidResult(NID_UI, pGestureLongPress, E_SYSTEM, "[E_SYSTEM] System error occurred.") - pGestureLongPress->SetDuration(duration); + pGestureLongPress->SetDuration(duration); } } @@ -1831,4 +2020,63 @@ _ControlManager::OnSettingChanged(Tizen::Base::String& key) } } +void +_ControlManager::AddHistory(ArrayListT<_HistoryInfo*>* pHistoryList, _HistoryInfo* pHistoryInfo) +{ + SysTryReturnVoidResult(NID_UI, pHistoryList, E_INVALID_ARG, "[E_INVALID_ARG]."); + SysTryReturnVoidResult(NID_UI, pHistoryInfo, E_INVALID_ARG, "[E_INVALID_ARG]."); + + const int COUNT_MAX = 500; + + int count = pHistoryList->GetCount(); + if (count > COUNT_MAX) + { + _HistoryInfo* pInfo = null; + pHistoryList->GetAt(0, pInfo); + delete pInfo; + + pHistoryList->RemoveAt(0); + } + + pHistoryList->Add(pHistoryInfo); +} + +_ControlManager::_HistoryInfo::_HistoryInfo(_Control* pControl) + : __pControl(pControl) + , __backtraceCount(0) + , __pBacktrace(null) +{ +} + +_ControlManager::_HistoryInfo::~_HistoryInfo(void) +{ + if (__pBacktrace) + { + delete [] __pBacktrace; + __pBacktrace = null; + } +} + +void +_ControlManager::_HistoryInfo::SetBacktrace(Tizen::Base::Collection::ArrayListT& backtrace) +{ + __backtraceCount = backtrace.GetCount(); + SysTryReturnVoidResult(NID_UI, __backtraceCount > 0, E_INVALID_ARG, "[E_INVALID_ARG]."); + + __pBacktrace = new (std::nothrow) void*[__backtraceCount]; + SysTryReturnVoidResult(NID_UI, __pBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + unique_ptr > pEnumerator(backtrace.GetEnumeratorN()); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + int i = 0; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + void* pAddr = null; + pEnumerator->GetCurrent(pAddr); + + __pBacktrace[i++] = pAddr; + } +} + }} // Tizen::Ui diff --git a/src/ui/FUi_CustomControlBaseImpl.cpp b/src/ui/FUi_CustomControlBaseImpl.cpp index 6dd9eac..0679f35 100644 --- a/src/ui/FUi_CustomControlBaseImpl.cpp +++ b/src/ui/FUi_CustomControlBaseImpl.cpp @@ -121,6 +121,16 @@ _CustomControlBaseImpl::OnBoundsChanging(const Rectangle& bounds) void _CustomControlBaseImpl::OnBoundsChanged(void) { + bool isFocusMode = GetCore().IsFocusModeStateEnabled(); + bool isFocus = GetCore().IsFocused(); + if (isFocusMode) + { + GetCore().RemoveFocusRing(true); + if (isFocus) + { + GetCore().DrawFocus(); + } + } GetPublic().OnBoundsChanged(__oldBounds, GetBounds()); } diff --git a/src/ui/FUi_DataBinding.cpp b/src/ui/FUi_DataBinding.cpp index dfb96c2..7a71e1e 100644 --- a/src/ui/FUi_DataBinding.cpp +++ b/src/ui/FUi_DataBinding.cpp @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -148,7 +149,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base default: { return false; - } + } } break; case DATA_BINDING_DATA_TYPE_BOOLEAN: @@ -182,7 +183,7 @@ _DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base return false; } pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0.0f) == 0 ?false:true; - } + } break; case DATA_BINDING_DATA_TYPE_DOUBLE: { @@ -1388,71 +1389,6 @@ ConvertVariantTypeToDataBindingDataType(VariantType variantType) return dataType; } -VariantType -ConvertDataBindingDataTypeToVariantType(DataBindingDataType dataType) -{ - VariantType variantType = VARIANT_TYPE_NONE; - switch (dataType) - { - case DATA_BINDING_DATA_TYPE_BOOLEAN: - variantType = VARIANT_TYPE_BOOL; - break; - - case DATA_BINDING_DATA_TYPE_COLOR: - variantType = VARIANT_TYPE_COLOR; - break; - - case DATA_BINDING_DATA_TYPE_DIMENSION: - variantType = VARIANT_TYPE_DIMENSION; - break; - - case DATA_BINDING_DATA_TYPE_DOUBLE: - variantType = VARIANT_TYPE_DOUBLE; - break; - - case DATA_BINDING_DATA_TYPE_FLOAT: - variantType = VARIANT_TYPE_FLOAT; - break; - - case DATA_BINDING_DATA_TYPE_INTEGER: - variantType = VARIANT_TYPE_INT; - break; - - case DATA_BINDING_DATA_TYPE_LONG: - variantType = VARIANT_TYPE_LONG; - break; - - case DATA_BINDING_DATA_TYPE_POINT: - variantType = VARIANT_TYPE_POINT; - break; - - case DATA_BINDING_DATA_TYPE_RECTANGLE: - variantType = VARIANT_TYPE_RECTANGLE; - break; - - case DATA_BINDING_DATA_TYPE_STRING: - variantType = VARIANT_TYPE_STRING; - break; - - case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: - variantType = VARIANT_TYPE_FLOAT_DIMENSION; - break; - - case DATA_BINDING_DATA_TYPE_FLOAT_POINT: - variantType = VARIANT_TYPE_FLOAT_POINT; - break; - - case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: - variantType = VARIANT_TYPE_FLOAT_RECTANGLE; - break; - - default: - break; - } - return variantType; -} - - class _DataBindingPropertyChangeEventListner : public _IPropertyChangeEventListener , virtual public Tizen::Base::Runtime::IEventListener diff --git a/src/ui/FUi_DimmingLayer.cpp b/src/ui/FUi_DimmingLayer.cpp index bf82589..38697a6 100644 --- a/src/ui/FUi_DimmingLayer.cpp +++ b/src/ui/FUi_DimmingLayer.cpp @@ -32,7 +32,6 @@ #include "FUiAnim_ControlVisualElement.h" #include "FUiAnim_RootVisualElement.h" #include "FUiAnim_VisualElementImpl.h" -#include "FUiCtrl_Indicator.h" #include "FUiCtrl_Popup.h" using namespace Tizen::Graphics; @@ -155,13 +154,6 @@ _DimmingLayer::SetDimmingEnabled(bool enabled) FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF(); - _Popup* pPopup = dynamic_cast<_Popup*>(__pControl); - _Indicator* pIndicator = null; - if (pPopup) - { - pIndicator = pPopup->GetIndicator(); - } - _VisualElement* pControlVisualElement = __pControl->GetVisualElement(); SysTryReturnResult(NID_UI, pControlVisualElement, E_SYSTEM, "A system error has been occurred."); @@ -173,16 +165,10 @@ _DimmingLayer::SetDimmingEnabled(bool enabled) { pParent->InsertChild(*__pDimmingElement, pControlVisualElement, false); } - r = __pDimmingElement->AttachChild(*pIndicator); - _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pIndicator); - - r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4); - DrawBackground(); } else { - r = __pDimmingElement->DetachChild(*pIndicator); _Window* pWindow = __pControl->GetRootWindow(); _RootVisualElement* pParent = pWindow->GetRootVisualElement(); if (pParent) @@ -249,8 +235,12 @@ _DimmingLayer::DrawBackground(void) r = GetLastResult(); SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); Color bgColor(0x7F000000); - pCanvas->SetBackgroundColor(bgColor); - pCanvas->Clear(); + + if (pCanvas) + { + pCanvas->SetBackgroundColor(bgColor); + pCanvas->Clear(); + } delete pCanvas; } diff --git a/src/ui/FUi_DimmingManager.cpp b/src/ui/FUi_DimmingManager.cpp index c3fd4e7..f07c74e 100644 --- a/src/ui/FUi_DimmingManager.cpp +++ b/src/ui/FUi_DimmingManager.cpp @@ -99,7 +99,6 @@ _DimmingManager::RegisterWindow(_Window* pWindow) _Window* pOldWindow = null; r = __pWindowList->GetAt(count - 1, pOldWindow); SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - DeleteDimmingLayer(pOldWindow); } r = CreateDimmingLayer(pWindow); diff --git a/src/ui/FUi_DragAndDropEvent.cpp b/src/ui/FUi_DragAndDropEvent.cpp new file mode 100644 index 0000000..2f78cf4 --- /dev/null +++ b/src/ui/FUi_DragAndDropEvent.cpp @@ -0,0 +1,183 @@ +// +// 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_DragAndDropEvent.cpp + * @brief This is the implementation for the _DragAndDropEvent class. + * @version 1.0 + */ + +#include +#include +#include +#include +#include "FUi_DragAndDropEvent.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +class _DragAndDropEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _DragAndDropEventArg(const _Control& source, _DragAndDropState state, FloatPoint& point, _DragAndDropItem* pItem); + + virtual ~_DragAndDropEventArg(void); + + const _Control* GetSource(void) const; + + _DragAndDropState GetState(void) const; + FloatPoint GetPoint(void) const; + const _DragAndDropItem* GetItem(void) const; + +private: + _DragAndDropEventArg(const _DragAndDropEventArg& rhs); + _DragAndDropEventArg& operator =(const _DragAndDropEventArg& rhs); + +private: + _Control* __pSource; + _DragAndDropState __state; + FloatPoint __point; + _DragAndDropItem* __pItem; +}; // _DragAndDropEventArg + +_DragAndDropEventArg::_DragAndDropEventArg(const _Control& source, _DragAndDropState state, FloatPoint& point, _DragAndDropItem* pItem) + : __pSource(const_cast <_Control*>(&source)) + , __state(state) + , __point(point) + , __pItem(pItem) +{ +} + +_DragAndDropEventArg::~_DragAndDropEventArg(void) +{ +} + +const _Control* +_DragAndDropEventArg::GetSource(void) const +{ + return __pSource; +} + +_DragAndDropState +_DragAndDropEventArg::GetState(void) const +{ + return __state; +} + +FloatPoint +_DragAndDropEventArg::GetPoint(void) const +{ + return __point; +} + +const _DragAndDropItem* +_DragAndDropEventArg::GetItem(void) const +{ + return __pItem; +} + +_DragAndDropEvent* +_DragAndDropEvent::CreateInstanceN(const _Control& source) +{ + unique_ptr<_DragAndDropEvent> pDragAndDropEvent(new (std::nothrow) _DragAndDropEvent(source)); + SysTryReturn(NID_UI, pDragAndDropEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pDragAndDropEvent.release(); +} + +IEventArg* +_DragAndDropEvent::CreateDragAndDropEventArgN(const _Control& source, _DragAndDropState state, Tizen::Graphics::FloatPoint& point, _DragAndDropItem* pItem) +{ + _DragAndDropEventArg* pEventArg = new (std::nothrow) _DragAndDropEventArg(source, state, point, pItem); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + SetLastResult(E_SUCCESS); + + return pEventArg; +} + +_DragAndDropEvent::~_DragAndDropEvent(void) +{ +} + +const _Control* +_DragAndDropEvent::GetSource(void) const +{ + return __pSource; +} + +void +_DragAndDropEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IDragAndDropEventListener* pEventListener = dynamic_cast <_IDragAndDropEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + const _DragAndDropEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + _DragAndDropState dragState = pArg->GetState(); + SysLog(NID_UI, "[DND][0x%x] Fire %d.", pArg->GetSource(), dragState); + switch (dragState) + { + case _DRAG_AND_DROP_STATE_BEGINNING: + pEventListener->OnDragAndDropBeginning(*pArg->GetSource()); + break; + case _DRAG_AND_DROP_STATE_DROPPING: + pEventListener->OnDragAndDropDropping(*pArg->GetSource()); + break; + case _DRAG_AND_DROP_STATE_ENTERED: + pEventListener->OnDragAndDropEntered(*pArg->GetSource()); + break; + case _DRAG_AND_DROP_STATE_MOVED: + pEventListener->OnDragAndDropMoved(*pArg->GetSource(), pArg->GetPoint()); + break; + case _DRAG_AND_DROP_STATE_LEFT: + pEventListener->OnDragAndDropLeft(*pArg->GetSource()); + break; + case _DRAG_AND_DROP_STATE_DROPPED: + pEventListener->OnDragAndDropDropped(*pArg->GetSource(), *pArg->GetItem()); + break; + default: + break; + } + + SetLastResult(E_SUCCESS); +} + +_DragAndDropEvent::_DragAndDropEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSource = &source; + + SetLastResult(E_SUCCESS); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_DragAndDropItem.cpp b/src/ui/FUi_DragAndDropItem.cpp new file mode 100644 index 0000000..a715c72 --- /dev/null +++ b/src/ui/FUi_DragAndDropItem.cpp @@ -0,0 +1,82 @@ +// +// 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_DragAndDropItem.cpp + * @brief This is the implementation file for the _DragAndDropItem class. + */ + +#include +#include +#include +#include +#include +#include "FUi_DragAndDropItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_DragAndDropItem* +_DragAndDropItem::CreateInstanceN(_DragAndDropType type, const String& data) +{ + _DragAndDropItem* pItem = new (std::nothrow) _DragAndDropItem(type, data); + SysTryReturn(NID_UI, pItem, 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 pItem; + +CATCH: + delete pItem; + return null; +} + +_DragAndDropItem::~_DragAndDropItem(void) +{ +} + +_DragAndDropType +_DragAndDropItem::GetDataType(void) const +{ + return __type; +} + +String +_DragAndDropItem::GetData(void) const +{ + return __data; +} + +_DragAndDropItem::_DragAndDropItem(_DragAndDropType type, const String& data) + : __type(type) + , __data(data) +{ + SysTryReturnVoidResult(NID_UI, + (_DRAG_AND_DROP_TYPE_TEXT & type) + , E_INVALID_ARG, "[E_INVALID_ARG] The data type is invalid."); + + SetLastResult(E_SUCCESS); + + return; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp index 9917928..c85ffbd 100644 --- a/src/ui/FUi_EcoreEvas.cpp +++ b/src/ui/FUi_EcoreEvas.cpp @@ -20,6 +20,7 @@ * @brief This is the implementation file for the _EcoreEvas class. */ +#include #include #include #include @@ -58,11 +59,16 @@ #include "FUi_ControlManager.h" #include "FUi_ControlImplManager.h" #include "FUiCtrl_Popup.h" +#include "FUiCtrl_Keypad.h" #include "FUiCtrl_ContextMenu.h" #include "FUiAnim_DisplayContextImpl.h" #include "FUiAnimDisplayContext.h" #include "FUi_TouchManager.h" +#include "FUi_DragAndDropItem.h" +#include +using namespace std; +using namespace Tizen::App; using namespace Tizen::Base; using namespace Tizen::Base::Runtime; using namespace Tizen::App; @@ -333,77 +339,324 @@ CATCH: return EINA_FALSE; } -int frameX = 0; -int frameY = 0; -int frameW = 0; -int frameH = 0; - Eina_Bool OnWindowConfigured(void* pData, int type, void* pEvent) { - Ecore_X_Event_Window_Configure* pEv = (Ecore_X_Event_Window_Configure*)pEvent; - if (!pEv) + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return ECORE_CALLBACK_PASS_ON; + } + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (!pTouchManager) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (pTouchManager->GetPointCount() > 0) { return ECORE_CALLBACK_PASS_ON; } - if (pEv->from_wm == EINA_FALSE) + SysLog(NID_UI, "[WM ROTATION]"); + + Ecore_X_Event_Window_Configure* pE = (Ecore_X_Event_Window_Configure*)pEvent; + if (!pE) { return ECORE_CALLBACK_PASS_ON; } - Ecore_X_Window targetWin = pEv->win; - if (targetWin == 0) + if ((pE->from_wm == EINA_FALSE)) { return ECORE_CALLBACK_PASS_ON; } - if ((frameX == pEv->x) && (frameY == pEv->y) && (frameW == pEv->w) && (frameH == pEv->h)) + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pCurFrame || !pEcoreEvas) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (pCurFrame->IsOrientationRoot() == false) + { + return ECORE_CALLBACK_PASS_ON; + } + + Ecore_X_Window targetWin = pE->win; + _Frame* pFrame = static_cast<_Frame*>(pCurFrame); + Ecore_X_Window win = (Ecore_X_Window)pFrame->GetNativeHandle(); + Dimension screenSize = pControlManager->GetScreenSize(); + +#if defined(PARTIAL_SCREEN) + if (win != targetWin) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) + { + Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pE->w, pE->h)); + if (winSize == screenSize) + { + return ECORE_CALLBACK_PASS_ON; + } + else + { + pFrame->SetPartialScreenEnabled(true); + } + } + else if (pFrame->GetShowMode() == FRAME_SHOW_MODE_PARTIAL_SCREEN) + { + Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pE->w, pE->h)); + if (winSize == screenSize) + { + pFrame->SetPartialScreenEnabled(false); + } + } +#else + if ((pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) || (win != targetWin)) { return ECORE_CALLBACK_PASS_ON; } +#endif + + Rectangle winBounds = _CoordinateSystemUtils::InverseTransform(Rectangle(pE->x, pE->y, pE->w, pE->h)); + Rectangle newBounds(winBounds.x, winBounds.y, winBounds.width, winBounds.height); + int rotation = pEcoreEvas->GetWindowRotation(*pFrame); + if ((rotation == 270) || (rotation == 90)) + { + newBounds.width = winBounds.height; + newBounds.height = winBounds.width; + } + + switch (rotation) + { + case 270: + newBounds.x = winBounds.y; + newBounds.y = screenSize.width - winBounds.x - newBounds.height; + break; + case 180: + newBounds.x = screenSize.width - winBounds.x - newBounds.width; + newBounds.y = screenSize.height - winBounds.y - newBounds.height; + break; + case 90: + newBounds.x = screenSize.height - winBounds.y - newBounds.width; + newBounds.y = winBounds.x; + break; + default: + newBounds.x = winBounds.x; + newBounds.y = winBounds.y; + break; + } + + Rectangle prevBounds = pFrame->GetBounds(); + if (prevBounds != newBounds) + { + pFrame->SetChangingBoundsEnabled(false); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Frame bounds Updated by WM(%d, %d, %d, %d).", win, newBounds.x, newBounds.y, newBounds.width, newBounds.height); + bool isChanged = pFrame->IsChangedPositionByUser(); + pFrame->SetBounds(newBounds); + pFrame->SetChangedPositionByUser(isChanged); + pFrame->SetChangingBoundsEnabled(true); + +#if defined(PARTIAL_SCREEN) + Rectangle frameBounds = pFrame->GetBounds(); + Rectangle frameClientBounds = pFrame->GetClientBounds(); + Rectangle frameAbsoluteBounds = pFrame->GetAbsoluteBounds(); + + SysLog(NID_UI, "[WM ROTATION]

[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)", + win, frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height, + frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height, + frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height); + + int formCount = pFrame->GetChildCount(); + for (int i = 0 ; i < formCount ; i++) + { + _Control* pForm = pFrame->GetChild(i); + + Rectangle formBounds = pForm->GetBounds(); + Rectangle formClientBounds = pForm->GetClientBounds(); + Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds(); + + SysLog(NID_UI, "[WM ROTATION]

FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)", + formBounds.x, formBounds.y, formBounds.width, formBounds.height, + formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height, + formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height); + } +#endif + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnWindowShown(void* pData, int type, void* pEvent) +{ + return ECORE_CALLBACK_PASS_ON; +} + +// For DnD - frameX = pEv->x; - frameY = pEv->y; - frameW = pEv->w; - frameH = pEv->h; +int __dndTargetX = 0; // Logical value with rotation +int __dndTargetY = 0; // Logical value with rotation +bool __isEnteredTarget = false; +Eina_Bool OnWindowDragAndDropEntered(void* pData, int type, void* pEvent) +{ _ControlManager* pControlManager = _ControlManager::GetInstance(); if (!pControlManager) { return ECORE_CALLBACK_PASS_ON; } - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (!pTouchManager) + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) { return ECORE_CALLBACK_PASS_ON; } - if (pTouchManager->GetPointCount() > 0) + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) { return ECORE_CALLBACK_PASS_ON; } - _Window* pWindow = pControlManager->GetCurrentFrame(); - if (!pWindow) + Ecore_X_Window win = (Ecore_X_Window)pCurFrame->GetNativeHandle(); + + // Tell the acceptable action to the source + _RootVisualElement* pRootVE = pCurFrame->GetRootVisualElement(); + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + Evas_Object* pWinObj = pLayer->GetElmWin(); + Evas_Coord x = 0; + Evas_Coord y = 0; + Evas_Coord w = 0; + Evas_Coord h = 0; + evas_object_geometry_get(pWinObj, &x, &y, &w, &h); + Ecore_X_Rectangle rect; + rect.x = x; + rect.y = y; + rect.width = w; + rect.height = h; + ecore_x_dnd_send_status(EINA_TRUE, EINA_TRUE, rect, ECORE_X_ATOM_XDND_DROP); + + // Initiate the supporting action list and type list. + // <1> This is supporting the COPY & DROP actions + Ecore_X_Atom atoms[] = { ECORE_X_ATOM_XDND_ACTION_COPY, }; + ecore_x_dnd_actions_set(win, atoms, 1); + + // <2> Type is only support the UTF8_STRING + const char* types[] = { ECORE_X_SELECTION_TARGET_UTF8_STRING, }; + ecore_x_dnd_types_set(win, types, 1); + + __isEnteredTarget = true; + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropPosition(void* pData, int type, void* pEvent) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) { return ECORE_CALLBACK_PASS_ON; } - if (pWindow->IsOrientationRoot() == false) + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) { return ECORE_CALLBACK_PASS_ON; } - _Frame* pFrame = static_cast<_Frame*>(pWindow); - if (pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) { return ECORE_CALLBACK_PASS_ON; } - Ecore_X_Window win = (Ecore_X_Window)pFrame->GetNativeHandle(); - if (win != targetWin) + Ecore_X_Event_Xdnd_Position* pEv = (Ecore_X_Event_Xdnd_Position*)pEvent; + if (!pEv) + { + return ECORE_CALLBACK_PASS_ON; + } + + Point devicePos = _CoordinateSystemUtils::InverseTransform(Point(pEv->position.x, pEv->position.y)); + int rotation = pEcoreEvas->GetWindowRotation(*pCurFrame); + Dimension screenSize = pControlManager->GetScreenSize(); + + Point movePos(0, 0); + switch (rotation) + { + case 270: + movePos.x = devicePos.y; + movePos.y = screenSize.width - devicePos.x; + break; + case 180: + movePos.x = screenSize.width - devicePos.x; + movePos.y = screenSize.height - devicePos.y; + break; + case 90: + movePos.x = screenSize.height - devicePos.y; + movePos.y = devicePos.x; + break; + default: + movePos.x = devicePos.x; + movePos.y = devicePos.y; + break; + } + + __dndTargetX = movePos.x; + __dndTargetY = movePos.y; + + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + + _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true); + if (pNextControl) + { + _ControlHandle nextHandle = pNextControl->GetHandle(); + + if (__isEnteredTarget == true) + { + SysLog(NID_UI, "[DND][T:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + __isEnteredTarget = false; + pEcoreEvas->SetDragAndDropTargetHandle(nextHandle); + } + else + { + if (pEcoreEvas->GetDragAndDropTargetHandle() != nextHandle) + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropTargetHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][T:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + SysLog(NID_UI, "[DND][T:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + pEcoreEvas->SetDragAndDropTargetHandle(nextHandle); + } + else + { + Rectangle absBounds = pNextControl->GetAbsoluteBounds(); + int x = movePos.x - absBounds.x; + int y = movePos.y - absBounds.y; + FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y)); + SysLog(NID_UI, "[DND][T:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y); + pNextControl->GetControlDelegate().OnDragAndDropMoved(point); + } + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropLeft(void* pData, int type, void* pEvent) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) { return ECORE_CALLBACK_PASS_ON; } @@ -414,60 +667,360 @@ OnWindowConfigured(void* pData, int type, void* pEvent) return ECORE_CALLBACK_PASS_ON; } - Rectangle frameBounds = pFrame->GetBounds(); - int rotation = pEcoreEvas->GetWindowRotation(*pFrame); + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return ECORE_CALLBACK_PASS_ON; + } - Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pEv->w, pEv->h)); - Dimension newSize(winSize.width, winSize.height); - if ((rotation == 270) || (rotation == 90)) + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropTargetHandle()); + if (pPrevControl) { - newSize.width = winSize.height; - newSize.height = winSize.width; + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + SysLog(NID_UI, "[DND][T:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); } - if ((frameBounds.width != newSize.width) || (frameBounds.height != newSize.height)) + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropSelection(void* pData, int type, void* pEvent) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return ECORE_CALLBACK_PASS_ON; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return ECORE_CALLBACK_PASS_ON; + } + + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return ECORE_CALLBACK_PASS_ON; + } + + Ecore_X_Event_Selection_Notify* pEv = (Ecore_X_Event_Selection_Notify*)pEvent; + if (!pEv) + { + return ECORE_CALLBACK_PASS_ON; + } + + Ecore_X_Selection_Data* pSelection = (Ecore_X_Selection_Data*)pEv->data; + if (!pSelection) + { + return ECORE_CALLBACK_PASS_ON; + } + + // After the source handles the selection data request, + // This callback will be called. + // It mean we get the data successfully. + if (pSelection) + { + if (pSelection->length > 0) + { + Point dropPosition(__dndTargetX, __dndTargetY); + _Control* pDropControl = pControlManager->GetTopmostTouchedControl(dropPosition, true); + if (pDropControl) + { + String dropData((char*)pSelection->data); + _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, dropData); + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + SysLog(NID_UI, "[DND][T:%d][0x%x] DROPPED(%ls)", pid, pDropControl, dropData.GetPointer()); + pDropControl->GetControlDelegate().OnDragAndDropDropped(*pDragAndDropItem); + delete pDragAndDropItem; + } + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropDropped(void* pData, int type, void* pEvent) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return ECORE_CALLBACK_PASS_ON; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return ECORE_CALLBACK_PASS_ON; + } + + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return ECORE_CALLBACK_PASS_ON; + } + + Ecore_X_Event_Xdnd_Drop* pEv = (Ecore_X_Event_Xdnd_Drop*)pEvent; + if (!pEv) { return ECORE_CALLBACK_PASS_ON; } + // Send the selection request to the owner (source) + // Then the source will set the requested data to property of my target window. + ecore_x_selection_xdnd_request(pEv->win, ECORE_X_SELECTION_TARGET_UTF8_STRING); + + // User made drop action. + // So target window can catch the drop action. + ecore_x_dnd_send_finished(); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropFinished(void* pData, int type, void* pEvent) +{ + // After the target processed all its work, + // This callback will be called. + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool OnWindowDragAndDropStatus(void* pData, int type, void* pEvent) +{ + return ECORE_CALLBACK_PASS_ON; +} + +int __dndSourceX = 0; // Logical value with rotation +int __dndSourceY = 0; // Logical value with rotation +#if 1 // For sending DnD events to Source. +bool __isDndBegan = false; +#else +bool __isCalledFirst = false; +#endif +bool __isOutOfSource = false; + +void OnWindowDragAndDropUpdated(void* pData, Ecore_X_Xdnd_Position* pPosition) +{ + if (!pPosition) + { + return; + } + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return; + } + +#if 1 // For sending DnD events to Source. + if (pEcoreEvas->GetDragAndDropState() == true) + { + __isDndBegan = true; + __isOutOfSource = false; + pEcoreEvas->SetDragAndDropState(false); + } + + Point devicePos = _CoordinateSystemUtils::InverseTransform(Point(pPosition->position.x, pPosition->position.y)); + int rotation = pEcoreEvas->GetWindowRotation(*pCurFrame); Dimension screenSize = pControlManager->GetScreenSize(); - Point winPosition = _CoordinateSystemUtils::InverseTransform(Point(pEv->x, pEv->y)); - Point newPosition(0, 0); + Point movePos(0, 0); switch (rotation) { case 270: - newPosition.x = winPosition.y; - newPosition.y = screenSize.width - winPosition.x - frameBounds.height; + movePos.x = devicePos.y; + movePos.y = screenSize.width - devicePos.x; break; case 180: - newPosition.x = screenSize.width - winPosition.x - frameBounds.width; - newPosition.y = screenSize.height - winPosition.y - frameBounds.height; + movePos.x = screenSize.width - devicePos.x; + movePos.y = screenSize.height - devicePos.y; break; case 90: - newPosition.x = screenSize.height - winPosition.y - frameBounds.width; - newPosition.y = winPosition.x; + movePos.x = screenSize.height - devicePos.y; + movePos.y = devicePos.x; break; default: - newPosition.x = winPosition.x; - newPosition.y = winPosition.y; + movePos.x = devicePos.x; + movePos.y = devicePos.y; break; } - if ((frameBounds.x != newPosition.x) || (frameBounds.y != newPosition.y)) - { - pFrame->SetChangingBoundsEnabled(false); - pFrame->SetPosition(newPosition); - pFrame->SetChangingBoundsEnabled(true); + __dndSourceX = movePos.x; + __dndSourceY = movePos.y; + + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + + _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true); + if (pNextControl) + { + _ControlHandle nextHandle = pNextControl->GetHandle(); + + if (__isOutOfSource == true) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + __isOutOfSource = false; + + return; + } + + if (__isDndBegan == true) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + __isDndBegan = false; + } + else + { + if (pEcoreEvas->GetDragAndDropSourceHandle() == nextHandle) + { + Rectangle absBounds = pNextControl->GetAbsoluteBounds(); + int x = movePos.x - absBounds.x; + int y = movePos.y - absBounds.y; + FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y)); + SysLog(NID_UI, "[DND][S:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y); + pNextControl->GetControlDelegate().OnDragAndDropMoved(point); + } + else + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + } + + } + } + else + { + if (__isOutOfSource == false) + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + __isOutOfSource = true; + } + } +#else + if (pEcoreEvas->GetDragAndDropState() == true) + { + __isCalledFirst = false; + __isOutOfSource = false; + pEcoreEvas->SetDragAndDropState(false); + } + + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + Point movePos = _CoordinateSystemUtils::InverseTransform(Point(__dndSourceX, __dndSourceY)); + + _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true); + if (pNextControl) + { + _ControlHandle nextHandle = pNextControl->GetHandle(); + + if (__isOutOfSource == true) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + __isOutOfSource = false; + + return; + } + + __isOutOfSource = false; + + if (pNextControl->IsDragAndDropSource() == true) + { + if (__isCalledFirst == true) + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + __isCalledFirst = false; + } + } + else + { + if (__isCalledFirst == false) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + __isCalledFirst = true; + } + else + { + if (pEcoreEvas->GetDragAndDropSourceHandle() == nextHandle) + { + Rectangle absBounds = pNextControl->GetAbsoluteBounds(); + int x = movePos.x - absBounds.x; + int y = movePos.y - absBounds.y; + FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y)); + SysLog(NID_UI, "[DND][S:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y); + pNextControl->GetControlDelegate().OnDragAndDropMoved(point); + } + else + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl); + pNextControl->GetControlDelegate().OnDragAndDropEntered(); + + pEcoreEvas->SetDragAndDropSourceHandle(nextHandle); + } + } + } } + else + { + if (__isOutOfSource == false) + { + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle()); + if (pPrevControl) + { + SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } - return ECORE_CALLBACK_PASS_ON; -} - -Eina_Bool -OnWindowShown(void* pData, int type, void* pEvent) -{ - return ECORE_CALLBACK_PASS_ON; + __isOutOfSource = true; + } + } +#endif } Eina_Bool @@ -556,23 +1109,20 @@ OnClientMessageReceived(void* pData, int type, void* pEvent) SysLog(NID_UI, "Accessibility action : value increased"); _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED); } - else if ((unsigned int)pClientEvent->data.l[1] == ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_SCROLL_")) + else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_UNHIGHLIGHT) { - SysLog(NID_UI, "Accessibility action : scroll %d, %d, %d", pClientEvent->data.l[2], pClientEvent->data.l[3], pClientEvent->data.l[4]); - x = (Evas_Coord)pClientEvent->data.l[3]; - y = (Evas_Coord)pClientEvent->data.l[4]; - if (pClientEvent->data.l[2] == 0) - { - _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_STARTED, x, y); - } - else if (pClientEvent->data.l[2] == 1) - { - _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED, x, y); - } - else if (pClientEvent->data.l[2] == 2) - { - _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED, x, y); - } + SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_UNHIGHLIGHT"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT); + } + else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_HIGHLIGHT_PREV) + { + SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_HIGHLIGHT_PREV"); + return _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV); + } + else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_HIGHLIGHT_NEXT) + { + SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_HIGHLIGHT_NEXT"); + return _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT); } else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_SCROLL) { @@ -639,6 +1189,29 @@ OnClientMessageReceived(void* pData, int type, void* pEvent) return ECORE_CALLBACK_RENEW; } +void +OnDestroyingWindowRequested(void* pData, Evas_Object* pObj, void* pEventInfo) +{ + SysLog(NID_UI, "[WM ROTATION] OnDestroyingWindowRequested is called."); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return; + } + + App* pApp = App::GetInstance(); + if (pApp) + { + SysLog(NID_UI, "[WM ROTATION] Terminate App."); + pApp->Terminate(); + } + else + { + SysLog(NID_UI, "[WM ROTATION] pApp is null."); + } +} + } // Anonymous // For Clipboard @@ -723,7 +1296,6 @@ Eina_Bool ConvertClipIntoHtml(char* pTarget, void* pData, int size, void** outDa Eina_Bool ConvertClipIntoEdje(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); Eina_Bool ConvertClipIntoUri(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); Eina_Bool ConvertClipIntoImage(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); -Eina_Bool ConvertClipIntoVCard(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); int NotifyTarget(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); int NotifyText(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); @@ -870,12 +1442,6 @@ ConvertClipIntoImage(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, return EINA_TRUE; } -Eina_Bool -ConvertClipIntoVCard(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData __UNUSED__, int* outSize __UNUSED__, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__) -{ - return EINA_TRUE; -} - int RequestClip(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) { @@ -1197,6 +1763,15 @@ _EcoreEvas::_EcoreEvas(void) , __pFrame(null) , __changeBounds(true) , __openClipboard(false) + , __pDragAndDropEnter(null) + , __pDragAndDropPosition(null) + , __pDragAndDropLeave(null) + , __pDragAndDropDrop(null) + , __pDragAndDropSelection(null) + , __pDragAndDropFinish(null) + , __pDragAndDropStatus(null) + , __dropData(L"") + , __dragAndDropState(false) { int ret = appcore_unset_rotation_cb(); SysLog(NID_UI, "[WM ROTATION] appcore_unset_rotation_cb = %d", ret); @@ -1311,6 +1886,48 @@ _EcoreEvas::~_EcoreEvas(void) __pWindowPropertyChanged = null; } + if (__pDragAndDropEnter) + { + ecore_event_handler_del(__pDragAndDropEnter); + __pDragAndDropEnter = null; + } + + if (__pDragAndDropPosition) + { + ecore_event_handler_del(__pDragAndDropPosition); + __pDragAndDropPosition = null; + } + + if (__pDragAndDropLeave) + { + ecore_event_handler_del(__pDragAndDropLeave); + __pDragAndDropLeave = null; + } + + if (__pDragAndDropDrop) + { + ecore_event_handler_del(__pDragAndDropDrop); + __pDragAndDropDrop = null; + } + + if (__pDragAndDropSelection) + { + ecore_event_handler_del(__pDragAndDropSelection); + __pDragAndDropSelection = null; + } + + if (__pDragAndDropFinish) + { + ecore_event_handler_del(__pDragAndDropFinish); + __pDragAndDropFinish = null; + } + + if (__pDragAndDropStatus) + { + ecore_event_handler_del(__pDragAndDropStatus); + __pDragAndDropStatus = null; + } + //runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_ROTATION_LOCK_ENABLED); } @@ -1347,15 +1964,6 @@ _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) @@ -1375,13 +1983,29 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas { ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation); + pLayer->SetOrientationChanged(orientation); + if ((orientation == 0) || (orientation == 180)) { - pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH)); + if (pWindow->IsOrientationRoot()) + { + pLayer->SetSize(FloatDimension(rootW, rootH)); + } + else + { + pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH)); + } } else { - pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW)); + if (pWindow->IsOrientationRoot()) + { + pLayer->SetSize(FloatDimension(rootH, rootW)); + } + else + { + pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW)); + } } SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, FULL SCREEN] Rotate bounds(ROT %d).", win, orientation); @@ -1392,6 +2016,8 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas if (rotateEvas == true) { ecore_evas_rotation_set(pEcoreEvas, orientation); + + pLayer->SetOrientationChanged(orientation); } Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds()); @@ -1423,16 +2049,22 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas int w = 0; int h = 0; Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h); - - if (ret == EINA_FALSE) { - pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); - SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height); + if (pWindow->IsOrientationRoot() && (pWindow->IsChangedPositionByUser() == false)) + { + pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY RESIZE.", win, orientation, winBounds.width, winBounds.height); + } + else + { + pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height); + } } else { - pLayer->SetBounds(FloatRectangle(winX, winY, w, h)); + pLayer->SetPosition(FloatPoint(winX, winY)); SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY); } } @@ -1849,6 +2481,25 @@ _EcoreEvas::SetFocus(const _Control& control, bool focus) result _EcoreEvas::SetIndicatorShowState(const _Window& window, bool showState) { + // For indicator active window + if (window.IsLayoutChangable() == true) + { + _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + if (pWindow) + { + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + if (pFrame) + { + FrameShowMode showMode = pFrame->GetShowMode(false); + if (showMode != FRAME_SHOW_MODE_FULL_SCREEN) + { + SysLog(NID_UI, "[WM ROTATION]"); + return E_SUCCESS; + } + } + } + } + _EflLayer* pLayer = GetEflLayer(window); SysTryReturn(NID_UI, pLayer, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); @@ -2052,10 +2703,35 @@ _EcoreEvas::SetWindowName(const _Window& window, const Tizen::Base::String& name Evas_Object* pWinObj = pLayer->GetElmWin(); SysTryReturnVoidResult(NID_UI, pWinObj, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + const char* windowName = _StringConverter::CopyToCharArrayN(name); if (windowName) { - elm_win_title_set(pWinObj, windowName); + // For indicator active window + bool changeName = false; + if (window.IsLayoutChangable() == true) + { + _Keypad* pKeypad = dynamic_cast<_Keypad*>(&const_cast<_Window&>(window)); + if (pKeypad == null) + { + changeName = true; + } + } + + if (changeName == true) + { + SysLog(NID_UI, "[WM ROTATION]"); +// ecore_evas_name_class_set(pEcoreEvas, "APP_SELECTOR", "APP_SELECTOR"); + elm_win_title_set(pWinObj, "APP_POPUP"); + ecore_evas_name_class_set(pEcoreEvas, "APP_POPUP", "APP_POPUP"); + } + else + { + elm_win_title_set(pWinObj, windowName); + ecore_evas_name_class_set(pEcoreEvas, windowName, windowName); + } delete[] windowName; } @@ -2202,6 +2878,65 @@ _EcoreEvas::IsWindowVisible(const _Window& window) } } +Rectangle +_EcoreEvas::GetWindowBounds(const _Window& window) const +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, Rectangle(0, 0, 0, 0), E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, Rectangle(0, 0, 0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + int x = 0; + int y = 0; + int w = 0; + int h = 0; + ecore_evas_geometry_get(pEcoreEvas, &x, &y, &w, &h); + + Rectangle bounds = _CoordinateSystemUtils::InverseTransform(Rectangle(x, y, w, h)); + Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize(); + Rectangle winBounds(0, 0, bounds.width, bounds.height); + + int rotation = ecore_evas_rotation_get(pEcoreEvas); + switch (rotation) + { + case 270: + winBounds.x = bounds.y; + winBounds.y = screenSize.width - bounds.x - winBounds.height; + break; + case 180: + winBounds.x = screenSize.width - bounds.x - winBounds.width; + winBounds.y = screenSize.height - bounds.y - winBounds.height; + break; + case 90: + winBounds.x = screenSize.height - bounds.y - winBounds.width; + winBounds.y = bounds.x; + break; + default: + winBounds.x = bounds.x; + winBounds.y = bounds.y; + break; + } + + return winBounds; +} + +void +_EcoreEvas::SetPartialScreenEnabled(const _Window& window) +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + SysLog(NID_UI, "[WM ROTATION]

[WIN 0x%x] Enable PARTIAL SCREEN", win); + Ecore_X_Atom atomLayout = ecore_x_atom_get("_E_ATOM_WINDOW_DESKTOP_LAYOUT_SUPPORTED"); + unsigned int val = 1; + ecore_x_window_prop_card32_set(win, atomLayout, &val, 1); +} + // [ToDo] Remove API void _EcoreEvas::SetQuickPanelScrollEnabled(const _Window& window, bool enable) @@ -2335,7 +3070,7 @@ _EcoreEvas::GetWindowLevel(const _Window& window) const } void -_EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds) +_EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds, bool resizeOnly) { if (__changeBounds == false) { @@ -2406,23 +3141,30 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds) int h = 0; Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h); - if (ret == EINA_FALSE) { - pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); - SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height); + if (resizeOnly == true) + { + pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY RESIZE.", win, rotate, winBounds.width, winBounds.height); + } + else + { + pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height); + } } else { - pLayer->SetBounds(FloatRectangle(winX, winY, w, h)); - SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h); + pLayer->SetPosition(FloatPoint(winX, winY)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY); } SetLastResult(E_SUCCESS); } void -_EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds) +_EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds, bool resizeOnly) { if (__changeBounds == false) { @@ -2494,16 +3236,23 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds) int h = 0; Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h); - if (ret == EINA_FALSE) { - pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); - SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height); + if (resizeOnly == true) + { + pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY RESIZE.", win, rotate, winBounds.width, winBounds.height); + } + else + { + pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height); + } } else { - pLayer->SetBounds(FloatRectangle(winX, winY, w, h)); - SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h); + pLayer->SetPosition(FloatPoint(winX, winY)); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY); } SetLastResult(E_SUCCESS); @@ -2688,6 +3437,16 @@ _EcoreEvas::RegisterWindowStateCallback(const _Window& window) } ecore_evas_callback_state_change_set(pLayer->GetEcoreEvas(), OnWindowStateChanged); + + if (window.IsOrientationRoot()) + { + Evas_Object* pWinObject = pLayer->GetElmWin(); + if (pWinObject) + { + SysLog(NID_UI, "[WM ROTATION] Register OnDestroyingWindowRequested callback."); + evas_object_smart_callback_add(pWinObject, "delete,request", OnDestroyingWindowRequested, NULL); + } + } } void @@ -2791,38 +3550,111 @@ _EcoreEvas::IsAccessibilityScreenReaderActivated(void) return acc; } -void* _GetEcoreEvasHandle(void) +void +_EcoreEvas::SetDragAndDropEnabled(const _Window& window) { - _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); - if (pEcoreEvasMgr == null) - { - return null; - } + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); - _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas(); - if (pUiEcoreEvas == null) - { - return null; + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + SysLog(NID_UI, "[DND] 0x%x, aware_set(TRUE)", win); + ecore_x_dnd_aware_set(win, EINA_TRUE); + + if (!__pDragAndDropEnter) + { + // Register dnd handlers. + SysLog(NID_UI, "[DND] add handlers"); + // For Target + __pDragAndDropEnter = ecore_event_handler_add(ECORE_X_EVENT_XDND_ENTER, OnWindowDragAndDropEntered, NULL); + __pDragAndDropPosition = ecore_event_handler_add(ECORE_X_EVENT_XDND_POSITION, OnWindowDragAndDropPosition, NULL); + __pDragAndDropLeave = ecore_event_handler_add(ECORE_X_EVENT_XDND_LEAVE, OnWindowDragAndDropLeft, NULL); + __pDragAndDropDrop = ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, OnWindowDragAndDropDropped, NULL); + __pDragAndDropSelection = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, OnWindowDragAndDropSelection, NULL); + // For Source + __pDragAndDropFinish = ecore_event_handler_add(ECORE_X_EVENT_XDND_FINISHED, OnWindowDragAndDropFinished, NULL); + __pDragAndDropStatus = ecore_event_handler_add(ECORE_X_EVENT_XDND_STATUS, OnWindowDragAndDropStatus, NULL); + ecore_x_dnd_callback_pos_update_set(OnWindowDragAndDropUpdated, NULL); } +} + +result +_EcoreEvas::DragAndDropBegin(const _Window& window, const String& string) +{ + Ecore_X_Window win = (Ecore_X_Window)window.GetNativeHandle(); + unique_ptr pChar(_StringConverter::CopyToCharArrayN(string)); + __dropData = string; + + Eina_Bool ret = ecore_x_dnd_begin(win, (unsigned char*)pChar.get(), strlen(pChar.get()) + 1); + SysTryReturn(NID_UI, ret == EINA_TRUE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - return (void*)pUiEcoreEvas->GetEcoreEvas(); + ecore_x_dnd_type_set(win, ECORE_X_SELECTION_TARGET_UTF8_STRING, EINA_TRUE); + ecore_x_dnd_source_action_set(ECORE_X_ATOM_XDND_ACTION_COPY); + + return E_SUCCESS; } -void* _GetEvasHandle(void) +result +_EcoreEvas::DragAndDropDrop(const _Window& window) { - _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); - if (pEcoreEvasMgr == null) - { - return null; - } + Ecore_X_Window win = (Ecore_X_Window)window.GetNativeHandle(); - _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas(); - if (pUiEcoreEvas == null) - { - return null; - } + int ret = ecore_x_dnd_drop(); + SysTryReturn(NID_UI, ret, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + ecore_x_dnd_type_set(win, ECORE_X_SELECTION_TARGET_UTF8_STRING, EINA_FALSE); + + return E_SUCCESS; +} + +Point +_EcoreEvas::GetDropPosition(void) +{ + return Point(__dndSourceX, __dndSourceY); +} + +String +_EcoreEvas::GetDropData(void) +{ + return __dropData; +} + +void +_EcoreEvas::SetDragAndDropState(bool state) +{ + __dragAndDropState = state; +} + +bool +_EcoreEvas::GetDragAndDropState(void) const +{ + return __dragAndDropState; +} + +void +_EcoreEvas::SetDragAndDropSourceHandle(_ControlHandle handle) +{ + __dragAndDropSourceHandle = handle; +} + +_ControlHandle +_EcoreEvas::GetDragAndDropSourceHandle(void) const +{ + return __dragAndDropSourceHandle; +} + +void +_EcoreEvas::SetDragAndDropTargetHandle(_ControlHandle handle) +{ + __dragAndDropTargetHandle = handle; +} - return (void*)pUiEcoreEvas->GetEvas(); +_ControlHandle +_EcoreEvas::GetDragAndDropTargetHandle(void) const +{ + return __dragAndDropTargetHandle; } result @@ -3309,26 +4141,3 @@ _EcoreEvas::GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) cons }} // Tizen::Ui -#ifdef __cplusplus -extern "C" -{ -#endif - -// [ToDo] Remove API -_OSP_EXPORT_ unsigned int -_GetActiveWindow(void) -{ - return GetEcoreEvasMgr()->GetEcoreEvas()->GetActiveWindow(); -} - -// [ToDo] Remove API -_OSP_EXPORT_ int -_GetProcessId(unsigned int window) -{ - return GetEcoreEvasMgr()->GetEcoreEvas()->GetProcessId(window); -} - -#ifdef __cplusplus -} -#endif - diff --git a/src/ui/FUi_EflUiEventManager.cpp b/src/ui/FUi_EflUiEventManager.cpp index b6c0b38..bd9fa40 100644 --- a/src/ui/FUi_EflUiEventManager.cpp +++ b/src/ui/FUi_EflUiEventManager.cpp @@ -24,30 +24,31 @@ #ifdef KEY_CAMERA #undef KEY_CAMERA #endif -#if defined KEY_BACK +#ifdef KEY_BACK #undef KEY_BACK #endif -#if defined KEY_HOME +#ifdef KEY_HOME #undef KEY_HOME #endif -#if defined KEY_MAIL +#ifdef KEY_MAIL #undef KEY_MAIL #endif -#if defined KEY_MUTE +#ifdef KEY_MUTE #undef KEY_MUTE #endif -#if defined KEY_APPS +#ifdef KEY_APPS #undef KEY_APPS #endif -#if defined KEY_MENU +#ifdef KEY_MENU #undef KEY_MENU #endif -#if defined KEY_SEARCH +#ifdef KEY_SEARCH #undef KEY_SEARCH #endif -#if defined KEY_VOICE +#ifdef KEY_VOICE #undef KEY_VOICE #endif +#include #include #include #include @@ -84,13 +85,35 @@ namespace { #define __UNUSED__ -Ecore_X_Atom keyboardExist = 0; -const wchar_t* KEYBOARD_INSERTED_EVENT = L"KEYBOARD_INSERTED"; -const int DEVICE_COUNT = 999; -bool touchPressed[DEVICE_COUNT] = {false,}; -bool evasTouchPressed = false; +int __touchTailCount = 0; const int KEY_COUNT = 300; -bool keyPressed[KEY_COUNT] = {false,}; +const int DEVICE_COUNT = 999; +const wchar_t* KEYBOARD_INSERTED_EVENT = L"KEYBOARD_INSERTED"; +bool __keyPressed[KEY_COUNT] = {false,}; +bool __touchPressed[DEVICE_COUNT] = {false,}; +Ecore_X_Atom __keyboardExist = 0; +Ecore_Timer* __pVSyncTimer = null; + +struct RawTouchInfo{ + unsigned int window; + int x; + int y; + int type; + int buttons; + int device; + unsigned int timeStamp; +}; +std::list* __pRawTouchInfoList = null; + +bool QueueTouchPressEvent(void* pEventInfo); +bool QueueTouchReleaseEvent(void* pEventInfo); +bool QueueTouchMoveEvent(void* pEventInfo); +bool DequeueTouchPressEvent(unsigned int& window, int& x, int& y, int& device, unsigned int& timeStamp, int& buttons, int& type); + +Eina_Bool OnTouchPressedReal(Ecore_Event_Mouse_Button* pEventInfo); +Eina_Bool OnTouchReleasedReal(Ecore_Event_Mouse_Button* pEventInfo); +Eina_Bool OnTouchMovedReal(Ecore_Event_Mouse_Move* pEventInfo); +Eina_Bool TouchEventHandlerVSync(void* pData); Evas_Object* GetEvasObject(const _Control& control) @@ -104,6 +127,7 @@ GetEvasObject(const _Control& control) return (Evas_Object*)pEflNode->GetGroupContainer(); } +/* Evas* GetEvas(const _Control& control) { @@ -117,6 +141,7 @@ GetEvas(const _Control& control) return pEvas; } +*/ class _Event { @@ -446,7 +471,7 @@ public: if (__pInstance == null) { __pInstance = new (std::nothrow) _TouchEventManager; - SysTryReturn(NID_UI, __pInstance, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturn(NID_UI, __pInstance, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } SetLastResult(E_SUCCESS); @@ -464,11 +489,11 @@ public: if (exist) { r = __pTargetMap->Remove(pointId); - SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "A system error occurred."); } r = __pTargetMap->Add(pointId, controlHandle); - SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "A system error occurred."); return r; } @@ -493,7 +518,7 @@ private: { result r = E_SUCCESS; unique_ptr > pTargetMap(new (std::nothrow) HashMapT); - SysTryReturnVoidResult(NID_UI, pTargetMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pTargetMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTargetMap->Construct(); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -521,7 +546,7 @@ class _TouchEvent : public _Event { public: - _TouchEvent(int deviceId, _TouchStatus status, int x, int y, unsigned int timeStamp, const _Control* pRootControl) + _TouchEvent(int deviceId, _TouchStatus status, int x, int y, unsigned int timeStamp, const _Control* pRootControl, int z = 0, unsigned int buttons = _TOUCH_BUTTON_NONE) : __pTouchEventManager(null) { __pTouchEventManager = _TouchEventManager::GetInstance(); @@ -538,7 +563,7 @@ public: if (status == _TOUCH_PRESSED) { IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); const int count = pFingerInfoList->GetCount(); @@ -610,11 +635,12 @@ public: current = _CoordinateSystemUtils::InverseTransform(current); } - __touchInfo.SetTouchInfo(pointId, status, current, false, timeStamp); + __touchInfo.SetTouchInfo(pointId, status, current, false, timeStamp, z, buttons); if (status == _TOUCH_PRESSED) { - _Control* pControl = GetTarget(current.x, current.y, pRootControl); + pTouchManager->SetListenerOnly(pointId, false); + _Control* pControl = GetTarget(current.x, current.y, pRootControl, pointId); if (pControl == null) { @@ -689,64 +715,111 @@ private: _TouchEvent(const _TouchEvent& rhs); _TouchEvent& operator =(const _TouchEvent& rhs); - _Control* GetTarget(int x, int y, const _Control* pRootControl) const + _Control* GetTarget(int x, int y, const _Control* pRootControl, int pointId) const { ClearLastResult(); _TouchManager* pTouchManager = _TouchManager::GetInstance(); SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - _Control* pCapturedControl = pTouchManager->GetCapturedControl(); - _Control* pControl = null; - _ControlManager* pControlManager = _ControlManager::GetInstance(); SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + _Control* pControl = null; + Tizen::Graphics::FloatPoint ptf(static_cast(x), static_cast(y)); - _ControlVisualElement* pRootControlElement = null; if (pRootControl) { - pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement()); + _ControlVisualElement* pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement()); + if (pRootControlElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } + + _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf); + if (pControlVisualElement) + { + pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); + } } else { - _Window* pWindow = null; - pWindow = pControlManager->GetTouchedWindow(); - if (pWindow == null) + _Window* pTouchedWindow = pControlManager->GetTouchedWindow(); + if (pTouchedWindow == null) { SetLastResult(E_SYSTEM); return null; } - Rectangle winBounds = pWindow->GetBounds(); + _RootVisualElement* pRootVisualElement = pTouchedWindow->GetRootVisualElement(); + if (pRootVisualElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } - ptf.x = static_cast(x - winBounds.x); - ptf.y = static_cast(y - winBounds.y); + Tizen::Graphics::Rectangle touchedWindowBounds = pTouchedWindow->GetBounds(); + /*ptf.x = static_cast(x - touchedWindowBounds.x); + ptf.y = static_cast(y - touchedWindowBounds.y);*/ - pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement()); - } + Tizen::Base::Collection::IList* pList = pRootVisualElement->GetChildrenN(); + if (!pList) + { + SetLastResult(E_SYSTEM); + return null; + } - if (pRootControlElement == null) - { - SetLastResult(E_SYSTEM); - return null; - } + int count = pList->GetCount(); + for (int i = count-1; i>=0; i--) + { + _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i)); + if (pChildControlVisualElement) + { + _Control* pChildControl = static_cast<_Control*>(pChildControlVisualElement->GetUserData()); + if (pChildControl == null) + { + continue; + } - _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf); - if (pControlVisualElement == null) - { - SetLastResult(E_SYSTEM); - return null; - } + _Window* pChildWindow = dynamic_cast<_Window*>(pChildControl); + if (pChildWindow == null) + { + continue; + } - pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); - if (pControl == null) - { - SetLastResult(E_SYSTEM); - return null; + Tizen::Graphics::FloatPoint tempPoint(ptf); + + if (pChildWindow && pChildWindow->GetWindowType() == _WINDOW_TYPE_VE) + { + Tizen::Graphics::Rectangle windowBounds = pChildWindow->GetBounds(); + tempPoint.x = static_cast(tempPoint.x - windowBounds.x); + tempPoint.y = static_cast(tempPoint.y - windowBounds.y); + } + else + { + tempPoint.x = static_cast(tempPoint.x - touchedWindowBounds.x); + tempPoint.y = static_cast(tempPoint.y - touchedWindowBounds.y); + } + + _ControlVisualElement* pControlVisualElement = pChildControlVisualElement->GetControlChildAtPoint(tempPoint); + if (pControlVisualElement) + { + pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); + if (pControl == null) + { + pControl = dynamic_cast<_Control*>(pTouchedWindow); + pTouchManager->SetListenerOnly(pointId, true); + } + break; + } + } + } + delete pList; } + _Control* pCapturedControl = pTouchManager->GetCapturedControl(); if (pCapturedControl) { if (pTouchManager->IsCaptureAllowedOwnerBounds()) @@ -875,452 +948,414 @@ private: _TouchEventManager* __pTouchEventManager; }; // _TouchEvent -class _MouseEvent - : public _Event +Eina_Bool +OnNotified(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) { -public: - _MouseEvent(int deviceId, _TouchStatus status, int x, int y, int z, unsigned int buttons, unsigned int timeStamp, const _Control* pRootControl) - : __pTouchEventManager(null) + if (pEventInfo) { - __pTouchEventManager = _TouchEventManager::GetInstance(); - SysTryReturnVoidResult(NID_UI, __pTouchEventManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - result r = E_SUCCESS; - Tizen::Graphics::Point current(x, y); + _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo); + SysTryReturn(NID_UI, pUiEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - unsigned int pointId = 0; + result r = pEventManager->SendEvent(*pUiEvent); + SysTryReturn(NID_UI, r == E_SUCCESS, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + } - if (status == _TOUCH_PRESSED) - { - IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SetLastResult(E_SUCCESS); - const int count = pFingerInfoList->GetCount(); + return ECORE_CALLBACK_PASS_ON; +} - for (int i = 0; i < count; i++) - { - _FingerInfo* pFingerInfo = null; - pFingerInfoList->GetAt(i, pFingerInfo); - if (pFingerInfo == null) - { - continue; - } +void +FreeEvent(void* pData __UNUSED__, void* pEventInfo) +{ + _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo); + if (pUiEvent) + { + delete pUiEvent; + } +} - if (static_cast(pFingerInfo->GetDeviceId()) == deviceId && pFingerInfo->GetStatus() == _TOUCH_PRESSED) - { - pTouchManager->ResetTouchInfo(); - SysSecureLog(NID_UI, "ResetTouchInfo x(%d), y(%d), deviceID(%d), pointID(%d)", current.x, current.y, deviceId, pFingerInfo->GetPointId()); - break; - } - } - delete pFingerInfoList; +Eina_Bool +OnKeyPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + Ecore_Event_Key* pEv = static_cast (pEventInfo); + SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - pointId = pTouchManager->GeneratePointId(deviceId); - } - else - { - pointId = pTouchManager->GetPointId(deviceId); - } + _KeyEvent event(KEY_PRESSED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv); + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; + } + SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers)); + event.Send(); - if (pointId == INVALID_POINT_ID) - { - if (status == _TOUCH_RELEASED) - { - _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + __keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = true; - _Window* pWindow = pControlManager->GetTouchedWindow(); - if (pWindow == null) - { - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (pTouchManager) - { - pTouchManager->ResetTouchInfo(); - SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); - } - } - } - SetLastResult(E_INVALID_CONDITION); - return; - } + SetLastResult(E_SUCCESS); - if (!pRootControl) - { - 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."); - } - else - { - current = _CoordinateSystemUtils::InverseTransform(current); - } + return ECORE_CALLBACK_PASS_ON; +} - __mouseInfo.SetTouchInfo(pointId, status, current, z, buttons, false, timeStamp); +Eina_Bool +OnKeyReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + Ecore_Event_Key* pEv = static_cast (pEventInfo); + SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - if (status == _TOUCH_PRESSED) - { - _Control* pControl = GetTarget(current.x, current.y, pRootControl); + if (__keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] != true) + { + SysLog(NID_UI, "KeyCode %s is not pressed", pEv->keyname); + return ECORE_CALLBACK_PASS_ON; + } - if (pControl == null) - { - 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."); - } - else - { - r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle()); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - } - } - else - { - _Control* pControl = pTouchManager->GetChangedTouchableTarget(); - if (pControl == null) - { - ClearLastResult(); - } - else - { - 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."); - } - } - } + _KeyEvent event(KEY_RELEASED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv); + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; } + SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers)); + event.Send(); + + __keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = false; + + SetLastResult(E_SUCCESS); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnClipboardMessageReceived(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + Ecore_X_Event_Client_Message *pEv = static_cast(pEventInfo); - virtual ~_MouseEvent(void) + if (pEv->message_type != ecore_x_atom_get("CBHM_MSG")) { + return ECORE_CALLBACK_PASS_ON; } -private: - virtual result SendImpl(void) + if (!strcmp("SET_OWNER", pEv->data.b)) { - _Control* pTarget = __pTouchEventManager->GetControl(__mouseInfo.GetPointId()); - if (pTarget == null) - { - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - pTouchManager->ResetTouchInfo(); + _KeyEvent event(KEY_PRESSED, _KEY_CLIPBOARD, 0, pEv); + SysSecureLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_CLIPBOARD, KeyModifier = 0"); + event.Send(); - SysLog(NID_UI, "ResetTouchInfo"); - return E_SUCCESS; - } + SetLastResult(E_SUCCESS); + } + + return ECORE_CALLBACK_PASS_ON; +} - _UiMouseEvent event(pTarget->GetHandle(), __mouseInfo); - return _pEventManager->SendEvent(event); +void +ResetTouchQueueStatus(void) +{ + __touchTailCount = 20; + if (!__pVSyncTimer) + { + __pVSyncTimer = ecore_timer_add(1.0 / 60.0, TouchEventHandlerVSync, null); } +} -private: - _MouseEvent(const _MouseEvent& rhs); - _MouseEvent& operator =(const _MouseEvent& rhs); +bool +QueueTouchPressEvent(Ecore_Event_Mouse_Button* pEv) +{ + SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + RawTouchInfo rawInfo; + rawInfo.window = pEv->window; + rawInfo.device = pEv->multi.device; + rawInfo.buttons = pEv->buttons; + rawInfo.x = pEv->root.x; + rawInfo.y = pEv->root.y; + rawInfo.type = Tizen::Ui::_TOUCH_PRESSED; + rawInfo.timeStamp = pEv->timestamp; + + __pRawTouchInfoList->push_back(rawInfo); + ResetTouchQueueStatus(); + + return true; +} + +bool +QueueTouchReleaseEvent(Ecore_Event_Mouse_Button* pEv) +{ + SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + RawTouchInfo rawInfo; + rawInfo.window = pEv->window; + rawInfo.device = pEv->multi.device; + rawInfo.buttons = pEv->buttons; + rawInfo.x = pEv->root.x; + rawInfo.y = pEv->root.y; + rawInfo.type = Tizen::Ui::_TOUCH_RELEASED; + rawInfo.timeStamp = pEv->timestamp; + + __pRawTouchInfoList->push_back(rawInfo); + ResetTouchQueueStatus(); + + return true; +} + +bool +QueueTouchMoveEvent(Ecore_Event_Mouse_Move* pEv) +{ + SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + RawTouchInfo rawInfo; + rawInfo.window = pEv->window; + rawInfo.device = pEv->multi.device; + rawInfo.buttons = 0; + rawInfo.x = pEv->root.x; + rawInfo.y = pEv->root.y; + rawInfo.type = Tizen::Ui::_TOUCH_MOVED; + rawInfo.timeStamp = pEv->timestamp; + + __pRawTouchInfoList->push_back(rawInfo); + ResetTouchQueueStatus(); + + return true; +} - _Control* GetTarget(int x, int y, const _Control* pRootControl) const +bool +FindTouchEventAtTime(RawTouchInfo* pRawInfo, unsigned int timeStamp) +{ + SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int count = __pRawTouchInfoList->size(); + + if (count == 0) { - ClearLastResult(); + return false; + } - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + std::list::iterator pos = __pRawTouchInfoList->begin(); + RawTouchInfo cur = *pos; + if (cur.timeStamp >= timeStamp) + { + return false; + } - _Control* pCapturedControl = pTouchManager->GetCapturedControl(); - _Control* pControl = null; + std::list::iterator iter = __pRawTouchInfoList->erase(pos); + int devId = cur.device; - if (pCapturedControl) + for (; iter != __pRawTouchInfoList->end(); iter++) + { + if (cur.timeStamp >= timeStamp) { - if (pTouchManager->IsCaptureAllowedOwnerBounds()) - { - if (pTouchManager->IsCaptureAllowedOutOfBounds()) - { - pControl = pCapturedControl; - } + *pRawInfo = cur; + return true; + } - _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl); - if (pWindow) - { - _Control* pOwner = pWindow->GetOwner(); - if (pOwner) - { - 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; - } - } - } + switch (cur.type) + { + case Tizen::Ui::_TOUCH_PRESSED: + case Tizen::Ui::_TOUCH_RELEASED: + *pRawInfo = cur; + return true; + break; - 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; - } - } - else + case Tizen::Ui::_TOUCH_MOVED: + if ((*iter).device != devId) { - if (pTouchManager->IsCaptureAllowedOutOfBounds()) - { - pControl = pCapturedControl; - } - else - { - 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; - } - } + continue; } - if (pControl != null) + if (cur.type != (*iter).type || cur.window != (*iter).window || cur.buttons != (*iter).buttons) { - return pControl; + *pRawInfo = cur; + return true; } - } - - _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - Tizen::Graphics::FloatPoint ptf(static_cast(x), static_cast(y)); - - _ControlVisualElement* pRootControlElement = null; - if (pRootControl) - { - pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement()); - } - else - { - _Window* pWindow = null; - pWindow = pControlManager->GetTouchedWindow(); - SysTryReturn(NID_UI, pWindow, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - Rectangle winBounds = pWindow->GetBounds(); - - ptf.x = static_cast(x - winBounds.x); - ptf.y = static_cast(y - winBounds.y); - - pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement()); - } - SysTryReturn(NID_UI, pRootControlElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf); - SysTryReturn(NID_UI, pControlVisualElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); - SysTryReturn(NID_UI, pControl, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - return pControl; - } - - result GetPosition(_TouchStatus status, int x, int y, Point& point) const - { - result r = E_SUCCESS; + if ((*iter).timeStamp >= timeStamp) + { + float ratio = (float)(timeStamp - cur.timeStamp) / (float)((*iter).timeStamp - cur.timeStamp); + if (ratio < 0.0f) + { + // suspicious error + *pRawInfo = cur; + return true; + } - _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + pRawInfo->x = cur.x + ((*iter).x - cur.x) * ratio; + pRawInfo->y = cur.y + ((*iter).y - cur.y) * ratio; + pRawInfo->timeStamp = cur.timeStamp; + pRawInfo->buttons = cur.buttons; // 0 ? + pRawInfo->type = cur.type; // Tizen::Ui::_TOUCH_MOVED ? + pRawInfo->window = cur.window; + pRawInfo->device = cur.device; - _Window* pWindow = pControlManager->GetTouchedWindow(); - if (pWindow == null) - { - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (pTouchManager) + return true; + } + else { - pTouchManager->ResetTouchInfo(); - SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); + cur = *iter; + iter = __pRawTouchInfoList->erase(iter); } - } - SysTryReturn(NID_UI, pWindow, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] A system error occurred."); - - _RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); - SysTryReturn(NID_UI, pRootVE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); - SysTryReturn(NID_UI, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - Ecore_Evas* pEE = pLayer->GetEcoreEvas(); - SysTryReturn(NID_UI, pEE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - const int PORTRAIT = 0; - const int LANDSCAPE = 270; - const int PORTRAIT_REVERSE = 180; - const int LANDSCAPE_REVERSE = 90; - - Dimension dimension = pControlManager->GetScreenSize(); - Point output(_CoordinateSystemUtils::InverseTransform(point)); - int rotation = ecore_evas_rotation_get(pEE); - - switch (rotation) - { - case PORTRAIT: - point.x = output.x; - point.y = output.y; - break; - - case LANDSCAPE: - point.x = output.y; - point.y = dimension.width - output.x; - break; - - case PORTRAIT_REVERSE: - point.x = dimension.width - output.x; - point.y = dimension.height - output.y; - break; - - case LANDSCAPE_REVERSE: - point.x = dimension.height - output.y; - point.y = output.x; break; default: - SysAssertf(0, "[E_SYSTEM][%d]", rotation); - r = E_SYSTEM; break; } - - return r; } -private: - _MouseInfo __mouseInfo; - _TouchEventManager* __pTouchEventManager; -}; - -Eina_Bool -OnNotified(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) -{ - if (pEventInfo) - { - _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo); - SysTryReturn(NID_UI, pUiEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + *pRawInfo = cur; - _UiEventManager* pEventManager = _UiEventManager::GetInstance(); - SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - result r = pEventManager->SendEvent(*pUiEvent); - SysTryReturn(NID_UI, r == E_SUCCESS, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - } - - SetLastResult(E_SUCCESS); - - return ECORE_CALLBACK_PASS_ON; + return true; } -void -FreeEvent(void* pData __UNUSED__, void* pEventInfo) -{ - _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo); - if (pUiEvent) - { - delete pUiEvent; - } -} -Eina_Bool -OnKeyPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +bool +DequeueTouchPressEvent(unsigned int& window, int& x, int& y, int& device, unsigned int& timeStamp, int& buttons, int& type, bool forceNow) { - Ecore_Event_Key* pEv = static_cast (pEventInfo); - SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - - if (_KeyEvent::GetKeyCode(pEv->keyname) == _KEY_INVALID) - { - SysLog(NID_UI, "KeyCode %s is invalid", pEv->keyname); - return ECORE_CALLBACK_PASS_ON; - } - - _KeyEvent event(KEY_PRESSED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv); - result r = GetLastResult(); - if (r != E_SUCCESS) - { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; - } - SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers)); - event.Send(); + RawTouchInfo cur; - keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = true; + cur.window = 0; + cur.x = -1; + cur.y = -1; + cur.type = -1; + cur.buttons = -1; + cur.device = -1; + cur.timeStamp = 0; - SetLastResult(E_SUCCESS); - - return ECORE_CALLBACK_PASS_ON; -} - -Eina_Bool -OnKeyReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) -{ - Ecore_Event_Key* pEv = static_cast (pEventInfo); - SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + double checkTime = 0.0; - if (_KeyEvent::GetKeyCode(pEv->keyname) == _KEY_INVALID) + if (forceNow) { - SysLog(NID_UI, "KeyCode %s is invalid", pEv->keyname); - return ECORE_CALLBACK_PASS_ON; + checkTime = ecore_time_get() * 1000.0; } - - if (keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] != true) + else { - SysLog(NID_UI, "KeyCode %s is not pressed", pEv->keyname); - return ECORE_CALLBACK_PASS_ON; + checkTime = ecore_time_get() * 1000.0 - 8.0; } - _KeyEvent event(KEY_RELEASED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv); - result r = GetLastResult(); - if (r != E_SUCCESS) + if (!FindTouchEventAtTime(&cur, (unsigned int)checkTime)) { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; + return false; } - SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers)); - event.Send(); - keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = false; + window = cur.window; + x = cur.x; + y = cur.y; + device = cur.device; + timeStamp = cur.timeStamp; + buttons = cur.buttons; + type = cur.type; - SetLastResult(E_SUCCESS); - - return ECORE_CALLBACK_PASS_ON; + return true; } Eina_Bool -OnClipboardMessageReceived(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +TouchEventHandlerVSync(void* pData) { - Ecore_X_Event_Client_Message *pEv = static_cast(pEventInfo); + SysTryReturn(NID_UI, __pRawTouchInfoList, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - if (pEv->message_type != ecore_x_atom_get("CBHM_MSG")) + if (__pRawTouchInfoList->size() <= 0) { - return ECORE_CALLBACK_PASS_ON; + if (--__touchTailCount <= 0) + { + __pVSyncTimer = null; + return EINA_FALSE; + } } - if (!strcmp("SET_OWNER", pEv->data.b)) + unsigned int window = 0; + int x = -1; + int y = -1; + int device = -1; + unsigned int timeStamp = 0; + int buttons = -1; + int type = -1; + + Ecore_Event_Mouse_Button evTouch; + evTouch.window = window; + evTouch.root.x = x; + evTouch.root.y = y; + evTouch.multi.device = device; + evTouch.buttons = buttons; + evTouch.timestamp = timeStamp; + + Ecore_Event_Mouse_Move evMove; + evMove.window = window; + evMove.root.x = x; + evMove.root.y = y; + evMove.multi.device = device; + evMove.timestamp = timeStamp; + + if (DequeueTouchPressEvent(window, x, y, device, timeStamp, buttons, type, false)) { - _KeyEvent event(KEY_PRESSED, _KEY_OEM_1, 0, pEv); - SysSecureLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_OEM_1, KeyModifier = 0"); - event.Send(); + switch (type) + { + case Tizen::Ui::_TOUCH_PRESSED: + evTouch.window = window; + evTouch.root.x = x; + evTouch.root.y = y; + evTouch.multi.device = device; + evTouch.buttons = buttons; + evTouch.timestamp = timeStamp; + OnTouchPressedReal(&evTouch); + break; - SetLastResult(E_SUCCESS); + case Tizen::Ui::_TOUCH_RELEASED: + evTouch.window = window; + evTouch.root.x = x; + evTouch.root.y = y; + evTouch.multi.device = device; + evTouch.buttons = buttons; + evTouch.timestamp = timeStamp; + OnTouchReleasedReal(&evTouch); + break; + + case Tizen::Ui::_TOUCH_MOVED: + evMove.window = window; + evMove.root.x = x; + evMove.root.y = y; + evMove.multi.device = device; + evMove.timestamp = timeStamp; + OnTouchMovedReal(&evMove); + break; + } } - return ECORE_CALLBACK_PASS_ON; + return EINA_TRUE; } - Eina_Bool OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) { Ecore_Event_Mouse_Button* pEv = static_cast (pEventInfo); SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - SysSecureLog(NID_UI, "OnTouchPressed - x(%d), y(%d), deviceId(%d), buttons(%d)", pEv->root.x, pEv->root.y, pEv->multi.device, pEv->buttons); + if (pEv->multi.device != 0) + { + bool touchableApp = false; + for (int deviceCount = 0; deviceCountSetTouchedWindow((unsigned int)pEv->window); + SysSecureLog(NID_UI, "OnTouchPressed - x(%d), y(%d), deviceId(%d), buttons(%d)", pEv->root.x, pEv->root.y, pEv->multi.device, pEv->buttons); - if (touchPressed[pEv->multi.device] == true) + if (__touchPressed[pEv->multi.device] == true) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); if (pTouchManager) @@ -1330,7 +1365,7 @@ OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) for(int i=0; iResetTouchInfo(); @@ -1338,11 +1373,30 @@ OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } } - touchPressed[pEv->multi.device] = true; + __touchPressed[pEv->multi.device] = true; - if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE) + if (!QueueTouchPressEvent(pEv)) { - _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null); + return OnTouchPressedReal(pEv); + } + + SetLastResult(E_SUCCESS); + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnTouchPressedReal(Ecore_Event_Mouse_Button* pEv) +{ + SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pControlManager->SetTouchedWindow((unsigned int)pEv->window); + + if (pEv->buttons == _TOUCH_BUTTON_LEFT || pEv->buttons == _TOUCH_BUTTON_NONE) + { + _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, pEv->buttons); result r = GetLastResult(); if (r != E_SUCCESS) @@ -1355,24 +1409,22 @@ OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } 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) + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "Mouse right/wheel button is pressed, ResetTouchInfo"); } - event.Send(); - _UiEventManager* pEventManager = _UiEventManager::GetInstance(); SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred."); + if (pEv->buttons == _TOUCH_BUTTON_RIGHT) + { pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_BACK, _KEY_MODIFIER_NONE, false); pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_BACK, _KEY_MODIFIER_NONE, false); } + } SetLastResult(E_SUCCESS); @@ -1385,16 +1437,50 @@ OnTouchReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) Ecore_Event_Mouse_Button* pEv = static_cast (pEventInfo); SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + if (pEv->multi.device != 0) + { + bool touchableApp = false; + for (int deviceCount = 0; deviceCountroot.x, pEv->root.y, pEv->multi.device, pEv->buttons); + __touchPressed[pEv->multi.device] = false; + + if (!QueueTouchReleaseEvent(pEv)) + { + return OnTouchReleasedReal(pEv); + } + + SetLastResult(E_SUCCESS); + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnTouchReleasedReal(Ecore_Event_Mouse_Button* pEv) +{ + SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + _TouchManager* pTouchManager = _TouchManager::GetInstance(); SysTryReturn(NID_UI, pTouchManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); - touchPressed[pEv->multi.device] = false; + int pointId = pTouchManager->GetPointId(pEv->multi.device); - if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE) + if (pEv->buttons == _TOUCH_BUTTON_LEFT || pEv->buttons == _TOUCH_BUTTON_NONE) { - _TouchEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, pEv->timestamp, null); + _TouchEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, pEv->buttons); result r = GetLastResult(); if (r!= E_SUCCESS) @@ -1407,28 +1493,18 @@ OnTouchReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } else { - //_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) - { - SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); - return ECORE_CALLBACK_PASS_ON; - } - - event.Send(); - _TouchManager* pTouchManager = _TouchManager::GetInstance(); if (pTouchManager) { pTouchManager->ResetTouchInfo(); - SysLog(NID_UI, "ResetTouchInfo"); + SysLog(NID_UI, "Mouse right/wheel button is released, ResetTouchInfo"); } } + pTouchManager->SetListenerOnly(pointId,false); + IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturn(NID_UI, pFingerInfoList, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfoList, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); int count = pFingerInfoList->GetCount(); @@ -1461,8 +1537,46 @@ OnTouchMoved(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) Ecore_Event_Mouse_Move* pEv = static_cast (pEventInfo); SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + if (pEv->multi.device != 0) + { + bool touchableApp = false; + for (int deviceCount = 0; deviceCountroot.x, pEv->root.y, pEv->multi.device); - _TouchEvent event(pEv->multi.device, _TOUCH_MOVED, pEv->root.x, pEv->root.y, pEv->timestamp, null); + + if (__touchPressed[pEv->multi.device] != true) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (!QueueTouchMoveEvent(pEv)) + { + return OnTouchMovedReal(pEv); + } + + SetLastResult(E_SUCCESS); + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnTouchMovedReal(Ecore_Event_Mouse_Move* pEv) +{ + SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _TouchEvent event(pEv->multi.device, _TOUCH_MOVED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, _TOUCH_BUTTON_NONE); result r = GetLastResult(); if (r != E_SUCCESS) @@ -1478,13 +1592,13 @@ OnTouchMoved(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } Eina_Bool -OnMouseWheeled(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +OnTouchWheeled(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) { _Ecore_Event_Mouse_Wheel* pEv = static_cast <_Ecore_Event_Mouse_Wheel*>(pEventInfo); SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - SysSecureLog(NID_UI, "OnMouseWheeled - x(%d), y(%d), z(%d)", pEv->root.x, pEv->root.y, pEv->z); - _MouseEvent event(0, _WHEEL_MOVED, pEv->root.x, pEv->root.y, pEv->z, _MOUSE_BUTTON_NONE, pEv->timestamp, null); + SysSecureLog(NID_UI, "OnTouchWheeled - x(%d), y(%d), z(%d)", pEv->root.x, pEv->root.y, pEv->z); + _TouchEvent event(0, _TOUCH_WHEELED, pEv->root.x, pEv->root.y, pEv->timestamp, null, pEv->z, _TOUCH_BUTTON_NONE); result r = GetLastResult(); if (r != E_SUCCESS) @@ -1503,9 +1617,9 @@ Eina_Bool OnKeyboardInserted(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) { Ecore_X_Event_Window_Property *pEv = static_cast (pEventInfo); - if ( pEv->atom != keyboardExist) + if ( pEv->atom != __keyboardExist) { -// SysLog(NID_UI, "OnKeyboardInserted - atom of event(%d), keyboardExist(%d)", pEv->atom, keyboardExist); +// SysLog(NID_UI, "OnKeyboardInserted - atom of event(%d), __keyboardExist(%d)", pEv->atom, __keyboardExist); return ECORE_CALLBACK_PASS_ON; } @@ -1522,7 +1636,7 @@ OnKeyboardInserted(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo unsigned int value = 0; int returnResult = -1; - returnResult = ecore_x_window_prop_card32_get(pEv->win, keyboardExist, &value, 1); + returnResult = ecore_x_window_prop_card32_get(pEv->win, __keyboardExist, &value, 1); if (returnResult) { if (value > 0) @@ -1531,7 +1645,7 @@ OnKeyboardInserted(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo } pArgs = new (std::nothrow) ArrayList; - SysTryReturn(NID_UI, pArgs, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pArgs, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pArgs->Construct(); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1659,7 +1773,7 @@ OnEvasTouchPressed(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEv _Control* pControl = static_cast<_Control*>(pData); SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - if (evasTouchPressed == true) + if (__touchPressed[0] == true) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); if (pTouchManager) @@ -1667,13 +1781,13 @@ OnEvasTouchPressed(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEv pTouchManager->SetTouchCanceled(null); SysLog(NID_UI, "pWindow is null, CancelTouch"); - evasTouchPressed = false; + __touchPressed[0] = false; pTouchManager->ResetTouchInfo(); SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); } } - evasTouchPressed = true; + __touchPressed[0] = true; SysSecureLog(NID_UI, "OnEvasTouchPressed - x(%d), y(%d)", pEv->canvas.x, pEv->canvas.y); _TouchEvent event(0, _TOUCH_PRESSED, pEv->canvas.x, pEv->canvas.y, pEv->timestamp, pControl); @@ -1699,7 +1813,7 @@ OnEvasTouchReleased(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pE _Control* pControl = static_cast<_Control*>(pData); SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); - evasTouchPressed = false; + __touchPressed[0] = false; SysSecureLog(NID_UI, "OnEvasTouchReleased - x(%d), y(%d)", pEv->canvas.x, pEv->canvas.y); _TouchEvent event(0, _TOUCH_RELEASED, pEv->canvas.x, pEv->canvas.y, pEv->timestamp, pControl); @@ -1776,7 +1890,7 @@ _EflUiEventManager::_EflUiEventManager(void) : __notificaitonEventType(-1) { unique_ptr > pEventHandlers(new (std::nothrow) LinkedListT); - SysTryReturnVoidResult(NID_UI, pEventHandlers, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI, pEventHandlers, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); // Noti __notificaitonEventType = ecore_event_type_new(); @@ -1820,6 +1934,11 @@ _EflUiEventManager::_EflUiEventManager(void) pEventHandlers->Add(pEventHandler); + pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, OnTouchWheeled, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + // WIndow property pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, OnKeyboardInserted, null); SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); @@ -1839,7 +1958,10 @@ _EflUiEventManager::_EflUiEventManager(void) __pEventHandlers = move(pEventHandlers); - keyboardExist = XInternAtom(static_cast(ecore_x_display_get()), "X External Keyboard Exist", 0); + __keyboardExist = XInternAtom(static_cast(ecore_x_display_get()), "X External Keyboard Exist", 0); + + __pRawTouchInfoList = new std::list; + SysTryReturnVoidResult(NID_UI, __pRawTouchInfoList, E_SYSTEM, "[E_SYSTEM] A system error occurred."); SetLastResult(E_SUCCESS); } @@ -1847,7 +1969,13 @@ _EflUiEventManager::_EflUiEventManager(void) _EflUiEventManager::~_EflUiEventManager(void) { Tizen::Base::Collection::IEnumeratorT* pEnumerator = __pEventHandlers->GetEnumeratorN(); - SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (__pRawTouchInfoList) + { + delete __pRawTouchInfoList; + __pRawTouchInfoList = null; + } while (pEnumerator->MoveNext() == E_SUCCESS) { @@ -1862,6 +1990,27 @@ _EflUiEventManager::~_EflUiEventManager(void) delete pEnumerator; } +void +_EflUiEventManager::ClearEventQueue(void) +{ + int count = __pRawTouchInfoList->size(); + if (count > 0) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->SetTouchCanceled(null); + } + __pVSyncTimer = null; + + for(std::list::iterator iter =__pRawTouchInfoList->begin(); iter != __pRawTouchInfoList->end();) + { + __pRawTouchInfoList->erase(iter++); + } + __pRawTouchInfoList->clear(); + } +} + result _EflUiEventManager::RegisterKeyEventHandler(const _Control& control) { diff --git a/src/ui/FUi_EflUiEventManager.h b/src/ui/FUi_EflUiEventManager.h index a8701ee..8f4f1f8 100644 --- a/src/ui/FUi_EflUiEventManager.h +++ b/src/ui/FUi_EflUiEventManager.h @@ -63,6 +63,7 @@ private: virtual result UnregisterKeyEventHandler(const _Control& control); virtual result UnregisterTouchEventHandler(const _Control& control); virtual result PostEvent(const _UiEvent& event); + virtual void ClearEventQueue(void); private: int __notificaitonEventType; diff --git a/src/ui/FUi_FocusManagerImpl.cpp b/src/ui/FUi_FocusManagerImpl.cpp index ab548c5d..2cda225 100644 --- a/src/ui/FUi_FocusManagerImpl.cpp +++ b/src/ui/FUi_FocusManagerImpl.cpp @@ -33,6 +33,7 @@ #include "FUi_UiKeyEvent.h" #include "FUi_Window.h" #include "FUiCtrl_Frame.h" +#include "FUi_TouchManager.h" using namespace std; using namespace Tizen::Base::Collection; @@ -138,10 +139,17 @@ _FocusManagerImpl::GetCurrentFocusedWindow(void) const return null; } _Window* pWindow = pFocus->GetRootWindow(); - SysAssert(pWindow); - + if (pWindow == null) + { + return null; + } + _WindowImpl* pWindowImpl = static_cast <_WindowImpl*>(static_cast <_ControlImpl*>(pWindow->GetUserData())); - SysAssert(pWindowImpl); + if (pWindowImpl == null) + { + return null; + } + return pWindowImpl; } @@ -151,7 +159,11 @@ _FocusManagerImpl::IsFocusModeStateEnabled(void) const { return __isFocusMode; } - +void +_FocusManagerImpl::SetFocusModeStateEnabled(bool enabled) +{ + __isFocusMode = enabled; +} int _FocusManagerImpl::GetNextIndex(int currentIndex, FocusDirection focusDirection, const IListT<_Control*>* pFocusControlList) const { @@ -280,6 +292,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD if (pFocusTraversalControl) { pControl = pFocusTraversalControl; + pControl->SetFocused(); } else { @@ -289,9 +302,14 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD bool focusMode = pControl->IsFocusModeStateEnabled(); - if (__isFocusMode == false) + if (IsFocusModeStateEnabled() == false) { - __isFocusMode = true; + SetFocusModeStateEnabled(true); + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager && IsFocusModeStateEnabled()) + { + pTouchManager ->SetTouchCanceled(null); + } if (pOriginalControl) { pOriginalControl->OnFocusModeStateChanged(); @@ -306,6 +324,16 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD { pTop->SetFocusTraversalControl(pControl, true); } + _Control* pParentControl = pControl->GetParent(); + if (pParentControl) + { + pParentControl->OnChildControlFocusMoved(*pControl); + while(pParentControl) + { + pParentControl->OnDescendantControlFocusMoved(*pControl); + pParentControl = pParentControl->GetParent(); + } + } pControl->DrawFocus(); return; } @@ -360,7 +388,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD count ++; while (pFocusControlList->GetAt(index, pNextFocusControl) == E_SUCCESS) { - + if (IsFocusable(pNextFocusControl)) { if (pNextFocusControl != pControl) @@ -377,7 +405,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD else { count ++; - if (loopCount == count) + if (loopCount == count) { return; } @@ -435,7 +463,7 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT) { __focusDirection = FOCUS_DIRECTION_UPWARD; - } + } break; } case _KEY_UP : @@ -451,9 +479,9 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) default : { return false; - } + } } - StartFocusTraversal(pControl, __focusDirection); + StartFocusTraversal(pControl, __focusDirection); return false; } @@ -475,17 +503,35 @@ _FocusManagerImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo bool _FocusManagerImpl::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { + if (!IsFocusModeStateEnabled()) + { + return false; + } + _Control* pSourceControl = const_cast<_Control*>(&source); - __isFocusMode = false; + SetFocusModeStateEnabled(false); _Window* pTop = source.GetRootWindow(); + bool isFocusListControl = IsFocusControlListControl(pSourceControl); if (pTop) { - _Control* pControl = pTop->GetFocusControl(pSourceControl); - if (pControl) + _Control* pControl = null; + if (isFocusListControl) + { + pControl = pTop->GetFocusControl(pSourceControl); + } + else { - pControl->OnFocusModeStateChanged(); - pControl->RemoveFocusRing(); + pControl = pTop->GetCurrentFocusControl(); + } + while(pControl) + { + if (pControl) + { + pControl->OnFocusModeStateChanged(); + pControl->RemoveFocusRing(); + } + pControl = pControl->GetParent(); } } diff --git a/src/ui/FUi_InputConnectionImpl.cpp b/src/ui/FUi_InputConnectionImpl.cpp index ba5eacf..728bbc3 100644 --- a/src/ui/FUi_InputConnectionImpl.cpp +++ b/src/ui/FUi_InputConnectionImpl.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include "FUi_BidiUtils.h" @@ -33,6 +34,7 @@ #include "FUi_EcoreEvas.h" #include "FUi_EcoreEvasMgr.h" #include "FUi_InputConnectionImpl.h" +#include "FUi_InputConnectionUtils.h" #include "FUi_UiEventManager.h" #include "FUiAnim_EflNode.h" #include "FUiAnim_VisualElement.h" @@ -246,7 +248,7 @@ OnRetrieveSurrounding(void* pData, Ecore_IMF_Context* pContext, char** pText, in } //This memory will be released by ECORE IMF pSurroundingText = (char*)malloc(len+1); - SysTryReturn(NID_UI, pSurroundingText, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] OnRetrieveSurrounding pSurroundingText == null."); + SysTryReturn(NID_UI, pSurroundingText, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); len = wcstombs(pSurroundingText, static_cast(string.GetPointer()), len); pSurroundingText[len] = null; @@ -391,7 +393,7 @@ _InputConnectionImpl::CreateInputConnectionImplN(InputConnection* pInputConnecti ClearLastResult(); _InputConnectionImpl* pImpl = new (std::nothrow) _InputConnectionImpl(pInputConnection); - SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pImpl; @@ -909,13 +911,20 @@ _InputConnectionImpl::GetInputPanelBounds(void) const SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); - int x = 0; - int y = 0; - int w = 0; - int h = 0; + Rectangle inputPanelPhysicalRect; + Rectangle inputPanelLogicalRect; - ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h); - return Rectangle(x, y, w, h); + ecore_imf_context_input_panel_geometry_get(__pContext, &inputPanelPhysicalRect.x, &inputPanelPhysicalRect.y, &inputPanelPhysicalRect.width, &inputPanelPhysicalRect.height); + + _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); + SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer(); + SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed."); + + inputPanelLogicalRect = pXformer->Transform(inputPanelPhysicalRect); + + return inputPanelLogicalRect; } FloatRectangle @@ -931,13 +940,24 @@ _InputConnectionImpl::GetInputPanelBoundsF(void) const int h = 0; ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h); - FloatRectangle inputPanelFloatRect; - inputPanelFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x); - inputPanelFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y); - inputPanelFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w); - inputPanelFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h); - return inputPanelFloatRect; + FloatRectangle inputPanelPhysicalFloatRect; + FloatRectangle inputPanelLogicalFloatRect; + + inputPanelPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x); + inputPanelPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y); + inputPanelPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w); + inputPanelPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h); + + _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); + SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer(); + SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed."); + + inputPanelLogicalFloatRect = pXformer->Transform(inputPanelPhysicalFloatRect); + + return inputPanelLogicalFloatRect; } Rectangle @@ -947,13 +967,20 @@ _InputConnectionImpl::GetPredictionBounds(void) const SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); - int x = 0; - int y = 0; - int w = 0; - int h = 0; + Rectangle predictionPhysicalRect; + Rectangle predictionLogicalRect; - ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h); - return Rectangle(x, y, w, h); + ecore_imf_context_candidate_panel_geometry_get(__pContext, &predictionPhysicalRect.x, &predictionPhysicalRect.y, &predictionPhysicalRect.width, &predictionPhysicalRect.height); + + _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); + SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer(); + SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed."); + + predictionLogicalRect = pXformer->Transform(predictionPhysicalRect); + + return predictionLogicalRect; } FloatRectangle @@ -969,13 +996,24 @@ _InputConnectionImpl::GetPredictionBoundsF(void) const int h = 0; ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h); - FloatRectangle inputPredictionFloatRect; - inputPredictionFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x); - inputPredictionFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y); - inputPredictionFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w); - inputPredictionFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h); - return inputPredictionFloatRect; + FloatRectangle predictionPhysicalFloatRect; + FloatRectangle predictionLogicalFloatRect; + + predictionPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x); + predictionPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y); + predictionPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w); + predictionPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h); + + _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); + SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer(); + SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed."); + + predictionLogicalFloatRect = pXformer->Transform(predictionPhysicalFloatRect); + + return predictionLogicalFloatRect; } result @@ -1065,7 +1103,7 @@ _InputConnectionImpl::SetInputPanelLanguage(LanguageCode languageCode) char* pLanguage = null; int len = wcstombs(0, static_cast(language.GetPointer()), 0); pLanguage = (char*)malloc(len+1); - SysTryReturn(NID_UI, pLanguage, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pLanguage is null."); + SysTryReturn(NID_UI, pLanguage, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); len = wcstombs(pLanguage, static_cast(language.GetPointer()), len); pLanguage[len] = null; @@ -1109,10 +1147,10 @@ _InputConnectionImpl::SendOpaqueCommand(const String& command) int length = 0; length = wcstombs(0, static_cast(command.GetPointer()), 0); - SysTryReturnVoidResult(NID_UI, length != -1, E_OUT_OF_MEMORY, "A system error occurred."); + SysTryReturnVoidResult(NID_UI, length != -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pCommand = (char*)malloc(length+1); - SysTryReturnVoidResult(NID_UI, pCommand, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pCommand, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); length = wcstombs(pCommand, static_cast(command.GetPointer()), length); pCommand[length] = null; @@ -1185,7 +1223,7 @@ _InputConnectionImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyIn } _KeyCode keyCode = keyInfo.GetKeyCode(); - if (keyCode == _KEY_OEM_1) + if (keyCode == _KEY_CLIPBOARD) { return false; } @@ -1194,7 +1232,7 @@ _InputConnectionImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyIn SysTryReturn(NID_UI, pEvent, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); Ecore_IMF_Event_Key_Down* pKeyDown = (Ecore_IMF_Event_Key_Down*)malloc(sizeof(Ecore_IMF_Event_Key_Down)); - SysTryReturn(NID_UI, pKeyDown, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturn(NID_UI, pKeyDown, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pKeyDown->keyname = pEvent->keyname; @@ -1263,11 +1301,13 @@ _InputConnectionImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyIn { if ((pEvent->modifiers & ECORE_EVENT_MODIFIER_CTRL) || (pEvent->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) || (pEvent->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_WIN)) { + free(pKeyDown); return false; } if (!pEvent->compose) { + free(pKeyDown); return false; } @@ -1345,7 +1385,7 @@ _InputConnectionImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyI } _KeyCode keyCode = keyInfo.GetKeyCode(); - if (keyCode == _KEY_OEM_1) + if (keyCode == _KEY_CLIPBOARD) { return false; } @@ -1354,7 +1394,7 @@ _InputConnectionImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyI SysTryReturn(NID_UI, pEvent, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); Ecore_IMF_Event_Key_Up* pKeyUp = (Ecore_IMF_Event_Key_Up*)malloc(sizeof(Ecore_IMF_Event_Key_Up)); - SysTryReturn(NID_UI, pKeyUp, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturn(NID_UI, pKeyUp, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pKeyUp->keyname = pEvent->keyname; @@ -1519,18 +1559,7 @@ _InputConnectionImpl::GetInstance(const InputConnection& inputConnection) int _InputConnectionImpl::CheckUSBKeyboardStatus(void) { - Ecore_X_Window rootWindow = ecore_x_window_root_first_get(); - Ecore_X_Atom keyboardExist = 0; - unsigned int keyboardNumber = 0; - int ret = 0; - - if (!keyboardExist) - { - keyboardExist = ecore_x_atom_get("X External Keyboard Exist"); - } - ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1); - - return keyboardNumber; + return _InputConnectionUtils::CheckUSBKeyboardStatus(); } result @@ -1545,8 +1574,8 @@ _InputConnectionImpl::FilterKeyOnUSBMode(InputPanelStyle style, const char* key, char TempKey[20] = {0,}; const char keyOnNumOnlyStyle[10] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/}; - const char keyOnPhoneNumStyle[13] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, - 0x2a/***/, 0x2b/*+*/, 0x23/*#*/}; + const char keyOnPhoneNumStyle[14] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, + 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0x70/*p*/}; const char keyOnIPStyle[18] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, 0x3a/*:*/, 0x2e/*.*/, 0x61/*a*/, 0x62/*b*/, 0x63/*c*/, 0x64/*d*/, 0x65/*e*/, 0x66/*f*/}; bool isExist = false; diff --git a/src/ui/FUi_InputConnectionUtils.cpp b/src/ui/FUi_InputConnectionUtils.cpp new file mode 100644 index 0000000..ec96dc5 --- /dev/null +++ b/src/ui/FUi_InputConnectionUtils.cpp @@ -0,0 +1,55 @@ +// +// 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_InputConnectionUtils.cpp + * @brief This is the implementation file for the _InputConnectionUtils class. + */ +#include +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_InputConnectionUtils.h" + +namespace Tizen { namespace Ui +{ + +_InputConnectionUtils::_InputConnectionUtils(void) +{ +} + +_InputConnectionUtils::~_InputConnectionUtils(void) +{ +} + +int +_InputConnectionUtils::CheckUSBKeyboardStatus(void) +{ + Ecore_X_Window rootWindow = ecore_x_window_root_first_get(); + Ecore_X_Atom keyboardExist = 0; + unsigned int keyboardNumber = 0; + int ret = 0; + + if (!keyboardExist) + { + keyboardExist = ecore_x_atom_get("X External Keyboard Exist"); + } + ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1); + + return keyboardNumber; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_InputConnectionUtils.h b/src/ui/FUi_InputConnectionUtils.h new file mode 100644 index 0000000..2bc054d --- /dev/null +++ b/src/ui/FUi_InputConnectionUtils.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 FUi_InputConnectionUtils.h + * @brief This is the header file for the _InputConnectionUtils class. + * + * This header file contains the declarations of the _InputConnectionUtils class. + */ + +#ifndef _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_ +#define _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_ + +namespace Tizen { namespace Ui +{ + +class _InputConnectionUtils +{ +public: + static int CheckUSBKeyboardStatus(void); + +private: + _InputConnectionUtils(void); + ~_InputConnectionUtils(void); + + _InputConnectionUtils(const _InputConnectionUtils& rhs); + _InputConnectionUtils& operator =(const _InputConnectionUtils& rhs); +}; //_InputConnectionUtils + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_INPUTCONNECTION_UTILS_H_ \ No newline at end of file diff --git a/src/ui/FUi_KeyEventInfoImpl.cpp b/src/ui/FUi_KeyEventInfoImpl.cpp index 59a0a7c..8befcb2 100644 --- a/src/ui/FUi_KeyEventInfoImpl.cpp +++ b/src/ui/FUi_KeyEventInfoImpl.cpp @@ -38,7 +38,7 @@ _KeyEventInfoImpl::CreateInstanceN(KeyEventInfo* pPublic) ClearLastResult(); _KeyEventInfoImpl* pImpl = new (std::nothrow) _KeyEventInfoImpl(pPublic); - SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; } diff --git a/src/ui/FUi_KeyEventManager.cpp b/src/ui/FUi_KeyEventManager.cpp index 633eba2..f1cb730 100644 --- a/src/ui/FUi_KeyEventManager.cpp +++ b/src/ui/FUi_KeyEventManager.cpp @@ -152,14 +152,14 @@ _KeyEventManager::_KeyEventManager(void) SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); __pKeyEventListener = new (std::nothrow)_KeyEventListener; - SysTryReturnVoidResult(NID_UI, __pKeyEventListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pKeyEventListener, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pKeyCapturingMap = new (std::nothrow) HashMapT<_KeyCode, _ControlHandle>; - SysTryCatch(NID_UI, __pKeyCapturingMap, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pKeyCapturingMap, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); SysTryCatch(NID_UI, __pKeyCapturingMap->Construct() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); __pKeyEventListeners = new (std::nothrow) LinkedListT; - SysTryCatch(NID_UI, __pKeyEventListeners, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pKeyEventListeners, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pEventManager->AddKeyEventListener(*__pKeyEventListener); @@ -231,7 +231,7 @@ _KeyEventManager::InitializeInstance(void) if (__pInstance == null) { __pInstance = new (std::nothrow) _KeyEventManager; - SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } } diff --git a/src/ui/FUi_KeyEventManagerImpl.cpp b/src/ui/FUi_KeyEventManagerImpl.cpp index c291e00..410356f 100644 --- a/src/ui/FUi_KeyEventManagerImpl.cpp +++ b/src/ui/FUi_KeyEventManagerImpl.cpp @@ -56,11 +56,6 @@ public: virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { - if (keyInfo.GetKeyCode() > _KEY_HARDWARE_MAX) - { - return false; - } - Tizen::Base::Collection::IEnumeratorT* pEnum = __keyMgrImpl.__pPublicKeyEventListeners->GetEnumeratorN(); _ControlImpl* pImpl = static_cast<_ControlImpl*>(source.GetUserData()); SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. "); @@ -89,11 +84,6 @@ CATCH: virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { - if (keyInfo.GetKeyCode() > _KEY_HARDWARE_MAX) - { - return false; - } - Tizen::Base::Collection::IEnumeratorT* pEnum = __keyMgrImpl.__pPublicKeyEventListeners->GetEnumeratorN(); _ControlImpl* pImpl = static_cast<_ControlImpl*>(source.GetUserData()); SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. "); @@ -134,12 +124,10 @@ _KeyEventManagerImpl* _KeyEventManagerImpl::__pInstance = null; _KeyEventManagerImpl::_KeyEventManagerImpl(void) { __pPublicKeyEventListeners = new (std::nothrow) Tizen::Base::Collection::LinkedListT ; - SysTryReturnVoidResult(NID_UI, __pPublicKeyEventListeners, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pPublicKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pKeyEventListeners = new (std::nothrow) PublicEventListener(*this); - SysTryReturnVoidResult(NID_UI, __pKeyEventListeners, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _KeyEventManager* pKeyMgr = _KeyEventManager::GetInstance(); if (pKeyMgr != null) @@ -188,7 +176,7 @@ _KeyEventManagerImpl::InitializeInstance(void) if (__pInstance == null) { __pInstance = new (std::nothrow) _KeyEventManagerImpl; - SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } } diff --git a/src/ui/FUi_LayoutImpl.cpp b/src/ui/FUi_LayoutImpl.cpp index e775831..6ce5050 100644 --- a/src/ui/FUi_LayoutImpl.cpp +++ b/src/ui/FUi_LayoutImpl.cpp @@ -171,7 +171,7 @@ _LayoutImpl::CheckConstruction(_Layout::Layout* pCoreLayout, _LayoutImpl* pImplL if (pImplLayout == null) { delete pCoreLayout; - SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return E_OUT_OF_MEMORY; } @@ -523,7 +523,7 @@ _LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) case LAYOUT_RELATIVE: { RelativeLayout* pPublicLayout = new (std::nothrow) RelativeLayout; - SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); @@ -533,7 +533,7 @@ _LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) case LAYOUT_VERTICAL_BOX: { VerticalBoxLayout* pPublicLayout = new (std::nothrow) VerticalBoxLayout; - SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); @@ -543,7 +543,7 @@ _LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) case LAYOUT_HORIZONTAL_BOX: { HorizontalBoxLayout* pPublicLayout = new (std::nothrow) HorizontalBoxLayout; - SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); @@ -553,7 +553,7 @@ _LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) case LAYOUT_GRID: { GridLayout* pPublicLayout = new (std::nothrow) GridLayout; - SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); @@ -563,7 +563,7 @@ _LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) case LAYOUT_CARD: { CardLayout* pPublicLayout = new (std::nothrow) CardLayout; - SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); diff --git a/src/ui/FUi_ModalLoopManager.cpp b/src/ui/FUi_ModalLoopManager.cpp index e1d351d..a1b3290 100644 --- a/src/ui/FUi_ModalLoopManager.cpp +++ b/src/ui/FUi_ModalLoopManager.cpp @@ -161,6 +161,12 @@ _ModalLoopManager::GetLastExitCode(void) } void +_ModalLoopManager::SetLastExitCode(int lastExitCode) +{ + __lastExitCode = lastExitCode; +} + +void _ModalLoopManager::OnTimerExpired(Timer& timer) { const int count = __pTimerInfoList->GetCount(); diff --git a/src/ui/FUi_OrientationAgent.cpp b/src/ui/FUi_OrientationAgent.cpp index 33bff2a..6ee058f 100644 --- a/src/ui/FUi_OrientationAgent.cpp +++ b/src/ui/FUi_OrientationAgent.cpp @@ -285,6 +285,7 @@ _OrientationAgent::UpdateOrientation(void) { return; } + pRootWindow->ResetFocusList(); int rotation = pEcoreEvas->GetWindowRotation(*pRootWindow); OrientationStatus status = ORIENTATION_STATUS_NONE; @@ -319,7 +320,23 @@ _OrientationAgent::UpdateOrientation(void) __status = status; pEcoreEvas->AllowSetWindowBounds(false); + // depend on WM. + // <1> Update Frame(not Full Screen) bounds by WM. + if (pRootWindow->IsOrientationRoot() == true) + { + _Frame* pFrame = static_cast<_Frame*>(pRootWindow); + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + Rectangle winBounds = pEcoreEvas->GetWindowBounds(*pRootWindow); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Frame bounds Updated by WM(%d, %d, %d, %d).", pRootWindow->GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height); + pRootWindow->SetBounds(winBounds); + } + } + + // <2> Skip RotateWindow if Frame bounds is not changed by APP. + FloatRectangle preBounds = pRootWindow->GetBoundsF(); FireEvent(status, true); + FloatRectangle nextBounds = pRootWindow->GetBoundsF(); pEcoreEvas->AllowSetWindowBounds(true); // For the form to be made by Ui-Builder @@ -337,14 +354,24 @@ _OrientationAgent::UpdateOrientation(void) } } - pEcoreEvas->RotateWindow(*pRootWindow, rotation, false); + if (preBounds != nextBounds) + { + pEcoreEvas->RotateWindow(*pRootWindow, rotation, false); + } if (__statusChanged == true) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); if (pTouchManager) { - pTouchManager->SetTouchCanceled(null); + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "ResetTouchInfo"); + } + + _UiEventManager* pUiEventManger = _UiEventManager::GetInstance(); + if (pUiEventManger) + { + pUiEventManger->ClearEventQueue(); } } diff --git a/src/ui/FUi_ResourceManager.cpp b/src/ui/FUi_ResourceManager.cpp old mode 100755 new mode 100644 index 061eeaf..912a194 --- a/src/ui/FUi_ResourceManager.cpp +++ b/src/ui/FUi_ResourceManager.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -46,10 +47,12 @@ #include "FUi_ResourceConfigLoader.h" #include "FUi_ResourceConfigParser.h" #include "FUi_ResourceMapContainer.h" +#include "FUi_ResourceConfigTypes.h" using namespace Tizen::App; using namespace Tizen::Base; using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; using namespace Tizen::Io; using namespace Tizen::Graphics; using namespace Tizen::Media; @@ -92,6 +95,58 @@ public: } }; +class _ResourceConfigInitiator +{ +public: + _ResourceConfigInitiator(void) + { + } + ~_ResourceConfigInitiator(void) + { + } +private: + Tizen::Ui::_Resource::_ACCESSIBILITY __ACESSIBILITY; + Tizen::Ui::_Resource::_BASIC __BASIC; + Tizen::Ui::_Resource::_BUTTON __BUTTON; + Tizen::Ui::_Resource::_CHECKBUTTON __CHECKBUTTON; + Tizen::Ui::_Resource::_COLORPICKER __COLORPICKER; + Tizen::Ui::_Resource::_CONTEXTMENU __CONTEXTMENU; + Tizen::Ui::_Resource::_DATETIMEBAR __DATETIMEBAR; + Tizen::Ui::_Resource::_DATETIMEPICKER __DATETIMEPICKER; + Tizen::Ui::_Resource::_DIMMINGLAYER __DIMMINGLAYER; + Tizen::Ui::_Resource::_EDIT __EDIT; + Tizen::Ui::_Resource::_EDITDATE __EDITDATE; + Tizen::Ui::_Resource::_EDITTIME __EDITTIME; + Tizen::Ui::_Resource::_FASTSCROLL __FASTSCROLL; + Tizen::Ui::_Resource::_FOCUSUI __FOCUSUI; + Tizen::Ui::_Resource::_FOOTER __FOOTER; + Tizen::Ui::_Resource::_FORM __FORM; + Tizen::Ui::_Resource::_GALLERY __GALLERY; + Tizen::Ui::_Resource::_GROUPCONTAINER __GROUPCONTAINER; + Tizen::Ui::_Resource::_HEADER __HEADER; + Tizen::Ui::_Resource::_ICONLIST __ICONLIST; + Tizen::Ui::_Resource::_INPUTPAD __INPUTPAD; + Tizen::Ui::_Resource::_LABEL __LABEL; + Tizen::Ui::_Resource::_LIST __LIST; + Tizen::Ui::_Resource::_LISTVIEW __LISTVIEW; + Tizen::Ui::_Resource::_APPWIDGET __APPWIDGET; + Tizen::Ui::_Resource::_MESSAGEBOX __MESSAGEBOX; + Tizen::Ui::_Resource::_OPTIONMENU __OPTIONMENU; + Tizen::Ui::_Resource::_OVERLAYPANEL __OVERLAYPANEL; + Tizen::Ui::_Resource::_PANEL __PANEL; + Tizen::Ui::_Resource::_POPUP __POPUP; + Tizen::Ui::_Resource::_PROGRESS __PROGRESS; + Tizen::Ui::_Resource::_RADIOGROUP __RADIOGROUP; + Tizen::Ui::_Resource::_SCROLL __SCROLL; + Tizen::Ui::_Resource::_SEARCHBAR __SEARCHBAR; + Tizen::Ui::_Resource::_SLIDER __SLIDER; + Tizen::Ui::_Resource::_SPLITPANEL __SPLITPANEL; + Tizen::Ui::_Resource::_TABBAR __TABBAR; + Tizen::Ui::_Resource::_TAB __TAB; + Tizen::Ui::_Resource::_TABLEVIEW __TABLEVIEW; + Tizen::Ui::_Resource::_TOKENEDIT __TOKENEDIT; +}; + MediaPixelFormat ConvertBitmapPixelFormatToMediaPixelFormat(BitmapPixelFormat format) { MediaPixelFormat out = MEDIA_PIXEL_FORMAT_NONE; @@ -269,8 +324,15 @@ feedback_pattern_e Convert_ResourceFeedbackPatternTofeedback_pattern_e(Tizen::Ui } return outPattern; } -} +extern "C" +{ + __attribute__((constructor)) void _OSP_EXPORT_ _ResourceManager_PreInitialize(void) + { + Tizen::Ui::_ResourceManager::PreInitialize(); + } +} +} namespace Tizen { namespace Graphics { result @@ -300,12 +362,13 @@ _ResourceManager* pRsrcMgr = null; _ResourceManager* _ResourceManager::GetInstance(void) { - static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; - - if (pRsrcMgr == null) + if(unlikely(pRsrcMgr == null)) { - pthread_once(&onceBlock, CreateInstance); - pRsrcMgr->DoPostInitialization(); + PreInitialize(); + } + if(unlikely(!(pRsrcMgr->__postInitialize))) + { + pRsrcMgr->PostInitialize(); } return pRsrcMgr; } @@ -313,13 +376,14 @@ _ResourceManager::GetInstance(void) void _ResourceManager::CreateInstance(void) { + static _ResourceConfigInitiator initiator; static _ResourceManager pManager; pRsrcMgr = &pManager; - _CanvasImpl::SetThemeInfoCallback(_GetDefaultForegroundColor, _GetDefaultBackgroundColor); } _ResourceManager::_ResourceManager(void) : __pStringLoader(null) + , __pParser(null) , __pTransformer(null) , __appBasePortraitMode("") , __appBaseLandscapeMode("") @@ -331,38 +395,70 @@ _ResourceManager::_ResourceManager(void) , __userTheme(L"") , __appliedUserTheme(false) , __initializeFeedback(false) + , __preInitialize(false) + , __postInitialize(false) , __appBaseWidth(-1) , __appBaseHeight(-1) - , __targetWidth(0) - , __targetHeight(0) - , __deviceDPI(0) + , __targetWidth(-1) + , __targetHeight(-1) + , __deviceDPI(-1) , __feedbackStatus(_RESOURCE_FEEDBACK_STATUS_INIT) , __feedbackAcquireCount(0) , __pFallbackList(null) { - __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = null; - __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = null; - __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = null; - __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null; + if(__preInitialize == false) + { + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = null; + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = null; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = null; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null; + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = new (std::nothrow) MapContainer(); + SysTryReturnVoidResult(NID_UI, __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT], E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + if (!(InitializeTheme(*__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]))) + { + SysAssert(0); + } + __pStringLoader = new (std::nothrow) StringLoader(); + SysTryReturnVoidResult(NID_UI, __pStringLoader, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pParser = new _Resource::ConfigParser(); + __preInitialize = true; + } + result r = E_SUCCESS; - int appBaseWidth = DEFAULT_SCREEN_WIDTH; - int appBaseHeight = DEFAULT_SCREEN_HEIGHT; + r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __deviceDPI); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); + r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", __targetWidth); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); + r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", __targetHeight); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); - result r = E_SUCCESS; + __targetPortraitMode.Append(__targetWidth); + __targetPortraitMode.Append(L"x"); + __targetPortraitMode.Append(__targetHeight); - int appLogicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + __targetLandscapeMode.Append(__targetHeight); + __targetLandscapeMode.Append(L"x"); + __targetLandscapeMode.Append(__targetWidth); + ClearLastResult(); +} - if (_CreateCoordinateTransformer(__pTransformer,DEFAULT_SCREEN_WIDTH, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(), - Dimension(appLogicalResolution, appLogicalResolution), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()) != E_SUCCESS) +void +_ResourceManager::PreInitialize(void) +{ + static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; + if (pRsrcMgr == null) { - - SysAssert(0); + pthread_once(&onceBlock, CreateInstance); } - r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __deviceDPI); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); - - _ControlManager::GetInstance()->SetScreenDpi(__deviceDPI); +} +void +_ResourceManager::PostInitialize(void) +{ + int appLogicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + int appBaseWidth = 0; + int appBaseHeight = 0; + result r = E_FAILURE; switch(appLogicalResolution) { case 240: @@ -382,10 +478,8 @@ _ResourceManager::_ResourceManager(void) appBaseHeight = 1280; break; default: - r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", appBaseWidth); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); - r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", appBaseHeight); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); + appBaseWidth = __targetWidth; + appBaseHeight = __targetHeight; break; } __appBaseWidth = appBaseWidth; @@ -398,38 +492,36 @@ _ResourceManager::_ResourceManager(void) __appBaseLandscapeMode.Append(appBaseHeight); __appBaseLandscapeMode.Append(L"x"); __appBaseLandscapeMode.Append(appBaseWidth); - int _width = 0; - int _height = 0; - r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", _width); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); - r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", _height); - SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred"); - - __targetWidth = _width; - __targetHeight = _height; - __targetPortraitMode.Append(_width); - __targetPortraitMode.Append(L"x"); - __targetPortraitMode.Append(_height); - - __targetLandscapeMode.Append(_height); - __targetLandscapeMode.Append(L"x"); - __targetLandscapeMode.Append(_width); - + _ControlManager::GetInstance()->SetScreenDpi(__deviceDPI); + if (_CreateCoordinateTransformer(__pTransformer,DEFAULT_SCREEN_WIDTH, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(), + Dimension(appLogicalResolution, appLogicalResolution), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()) != E_SUCCESS) + { + SysAssert(0); + } Dimension dim = _CoordinateSystemUtils::InverseTransform(Dimension(_Screen::GetWidth(), _Screen::GetHeight())); __logicalWidth = dim.width; __logicalHeight = dim.height; _ThemeInfo::LoadThemeInformation(__systemTheme, __userTheme); - - // theme 2.0 - __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = new (std::nothrow) MapContainer(); - SysTryReturnVoidResult(NID_UI, __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT], E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetResolution(__appBasePortraitMode); - if (!(InitializeTheme(*__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]))) + SelectConfigTable(); + if (__userTheme.GetLength() > 0) { - SysAssert(0); + String themeFile = String(_AppInfo::GetAppRootPath()+L"res/themes/" +__userTheme + L"/" +__userTheme + ".xml"); + if(File::IsFileExist(themeFile)) + { + r = __pParser->Parse(themeFile, *(__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT])); + } } - __pStringLoader = new (std::nothrow) StringLoader(); - SysTryReturnVoidResult(NID_UI, __pStringLoader, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + _CanvasImpl::SetThemeInfoCallback(_GetDefaultForegroundColor, _GetDefaultBackgroundColor); + __postInitialize = true; + DoPostInitialization(); + ClearLastResult(); +} + +void +_ResourceManager::SelectConfigTable(void) +{ + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetPalette(__systemTheme); } bool @@ -437,42 +529,29 @@ _ResourceManager::InitializeTheme(MapContainer& mapContainer) { bool r = true; String themeFile(L""); - mapContainer.CreateMap(RESOURCE_TYPE_SHAPE); - mapContainer.CreateMap(RESOURCE_TYPE_FIXED_VALUE); - mapContainer.CreateMap(RESOURCE_TYPE_DIMENSION); mapContainer.CreateMap(RESOURCE_TYPE_IMAGE); mapContainer.CreateMap(RESOURCE_TYPE_COLOR); mapContainer.CreateMap(RESOURCE_TYPE_ANIMATION); - mapContainer.SetResolution(__appBasePortraitMode); - - themeFile = String(L"/usr/share/osp/themes/"+__systemTheme + ".xml"); - - LoadPaletteInformation(__systemTheme); - LoadConfig(__appBasePortraitMode, mapContainer, __appBaseWidth, __appBaseHeight); - if (__userTheme.GetLength() > 0) - { - themeFile = String(_AppInfo::GetAppRootPath()+L"res/themes/" +__userTheme + L"/" +__userTheme + ".xml"); - if(File::IsFileExist(themeFile)) - { - ConfigParser* pParser = new (std::nothrow) ConfigParser(); - SysTryReturn(NID_UI, pParser, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); - r = pParser->Parse(themeFile, mapContainer); - delete pParser; - } - } - + LoadPaletteInformation("black"); + LoadPaletteInformation("white"); + LoadPaletteInformation("default"); + LoadConfig(L"", mapContainer, 0, 0, true); return r; } void -_ResourceManager::LoadConfig(const String& resolution, MapContainer& mapContainer, int width, int height) +_ResourceManager::LoadConfig(const String& resolution, MapContainer& mapContainer, int width, int height, bool preInit) { - _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetTransformerN(__appBaseWidth, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(), - Dimension(width, height), BASE_SCREEN_SIZE_NORMAL); + _ICoordinateSystemTransformer* pTransformer = null; + if(!preInit) + { + pTransformer = _CoordinateSystem::GetTransformerN(__appBaseWidth, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(),Dimension(width, height), BASE_SCREEN_SIZE_NORMAL); + } if (pTransformer) { _SCREEN_HEIGHT_ = pTransformer->Transform(__logicalHeight); + delete pTransformer; } else { @@ -487,10 +566,9 @@ _ResourceManager::LoadConfig(const String& resolution, MapContainer& mapContaine ConfigLoader::GetInstance()->GetInitFunc(i, func); if (func) { - func(mapContainer, resolution); + func(mapContainer, resolution, preInit); } } - delete pTransformer; } void @@ -507,10 +585,21 @@ MapContainer* _ResourceManager::GetMapContainer(MapContainerType type) { MapContainer* pContainer = null; + static bool preinit = false; switch (type) { case MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT: pContainer = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]; + if(preinit) + { + break; + } + pContainer->CreateMap(RESOURCE_TYPE_SHAPE); + pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE); + pContainer->CreateMap(RESOURCE_TYPE_DIMENSION); + pContainer->SetResolution(__appBasePortraitMode); + LoadConfig(__appBasePortraitMode, *pContainer, __appBaseWidth, __appBaseHeight, false); + preinit = true; break; case MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE: if (__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE]) @@ -525,7 +614,7 @@ _ResourceManager::GetMapContainer(MapContainerType type) pContainer->CreateMap(RESOURCE_TYPE_SHAPE); pContainer->CreateMap(RESOURCE_TYPE_DIMENSION); pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE); - LoadConfig(__appBaseLandscapeMode, *pContainer, __appBaseWidth, __appBaseHeight); + LoadConfig(__appBaseLandscapeMode, *pContainer, __appBaseWidth, __appBaseHeight, false); __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = pContainer; } break; @@ -550,7 +639,7 @@ _ResourceManager::GetMapContainer(MapContainerType type) pContainer->CreateMap(RESOURCE_TYPE_SHAPE); pContainer->CreateMap(RESOURCE_TYPE_DIMENSION); pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE); - LoadConfig(__defaultPortraitMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT); + LoadConfig(__defaultPortraitMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, false); __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = pContainer; } } @@ -576,7 +665,7 @@ _ResourceManager::GetMapContainer(MapContainerType type) pContainer->CreateMap(RESOURCE_TYPE_SHAPE); pContainer->CreateMap(RESOURCE_TYPE_DIMENSION); pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE); - LoadConfig(__defaultLandscapeMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT); + LoadConfig(__defaultLandscapeMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, false); __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = pContainer; } } @@ -625,7 +714,8 @@ _ResourceManager::~_ResourceManager(void) delete __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE]; __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null; } - + delete __pParser; + __pParser = null; feedback_deinitialize(); } void @@ -642,24 +732,38 @@ _ResourceManager::ReloadTheme(Tizen::Base::String& themeName, bool userdefine) } result -_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, int color, Bitmap*& pBitmap) +_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, const Color& color, Bitmap*& pBitmap) { - result r = E_SYSTEM; + result r = E_SUCCESS; Bitmap* pTempBitmap = null; int foundFolderWidth = 0; String fullName = FindImagePath(fileName, foundFolderWidth, isCustom); if(foundFolderWidth == __targetWidth) { - pTempBitmap = new (std::nothrow) Bitmap; - SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r)); - r = _BitmapImpl::GetInstance(*pTempBitmap)->Construct(fullName, pixelFormat); - SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - pBitmap = pTempBitmap; - return r; - } - else - { - if (_BitmapImpl::HasNinePatchedBitmapTag(fileName)) + if (replacementColor) + { + ByteBuffer* pImageBuffer = null; + int imageWidth = 0; + int imageHeight = 0; + MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat); + pImageBuffer = _ImageDecoder::DecodeToBufferN(fullName, format, imageWidth, imageHeight); + if (pImageBuffer) + { + pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat); + delete pImageBuffer; + } + if( pTempBitmap) + { + Bitmap* pReplacementBitmap = null; + pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + if(pReplacementBitmap) + { + delete pTempBitmap; + pBitmap = pReplacementBitmap; + } + } + } + else { pTempBitmap = new (std::nothrow) Bitmap; SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r)); @@ -668,7 +772,45 @@ _ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat p pBitmap = pTempBitmap; return r; } - else + } + else + { + if (_BitmapImpl::HasNinePatchedBitmapTag(fileName)) + { + if (replacementColor) + { + ByteBuffer* pImageBuffer = null; + int imageWidth = 0; + int imageHeight = 0; + MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat); + pImageBuffer = _ImageDecoder::DecodeToBufferN(fullName, format, imageWidth, imageHeight); + if (pImageBuffer) + { + pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat); + delete pImageBuffer; + } + if( pTempBitmap) + { + Bitmap* pReplacementBitmap = null; + pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + if(pReplacementBitmap) + { + delete pTempBitmap; + pBitmap = pReplacementBitmap; + } + } + } + else // no replacementColor + { + pTempBitmap = new (std::nothrow) Bitmap; + SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r)); + r = _BitmapImpl::GetInstance(*pTempBitmap)->Construct(fullName, pixelFormat); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + pBitmap = pTempBitmap; + return r; + } + } + else // no ninepatched { ByteBuffer* pImageBuffer = null; int imageWidth = 0; @@ -680,6 +822,10 @@ _ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat p pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat); delete pImageBuffer; } + else + { + r = E_SYSTEM; + } if(pTempBitmap != null) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTempBitmap)) @@ -698,7 +844,11 @@ _ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat p delete pTempBitmap; pTempBitmap = pReplacementBitmap; } + } + + pTempBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + float scaleFactor = (float)((float)__targetWidth/(float)foundFolderWidth); r = pTempBitmap->Scale(Dimension(pTempBitmap->GetWidth()*scaleFactor, pTempBitmap->GetHeight()*scaleFactor)); if (r == E_SUCCESS) @@ -720,7 +870,7 @@ CATCH: } result -_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Bitmap*& pBitmap) +_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, const Color& color, Bitmap*& pBitmap) { result r = E_SYSTEM; ResourceItem* pItem = null; @@ -905,7 +1055,7 @@ _ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, int& va if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { - r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem); + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); if (r != E_SUCCESS) { r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); @@ -916,7 +1066,7 @@ _ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, int& va r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); if (r != E_SUCCESS) { - r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem); + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); } } @@ -939,7 +1089,7 @@ _ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, float& if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { - r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem); + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); if (r != E_SUCCESS) { r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); @@ -950,7 +1100,7 @@ _ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, float& r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); if (r != E_SUCCESS) { - r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem); + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); } } @@ -1093,6 +1243,7 @@ _ResourceManager::PlayFeedback(_ResourceFeedbackPattern pattern, const _Control* } __initializeFeedback = true; } + if (__feedbackStatus == _RESOURCE_FEEDBACK_STATUS_PLAYED) { SysLog(NID_UI, "feedback is already played."); @@ -1279,660 +1430,978 @@ _ResourceManager::GetDefaultShapeWithScaling(int shapeId, _ControlOrientation or return r; } -#define ADD_PALETTE(id, value)\ +#define ADD_PALETTE(id, value, theme)\ {\ ResourceKey resourceKey(#id);\ ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_COLOR); \ pItem->SetRawDataColor(value);\ - __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetPalette()->Add(resourceKey, pItem);\ + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetPalette(theme)->Add(resourceKey, pItem);\ } void _ResourceManager::LoadBlackPalette(void) { - ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF); - ADD_PALETTE(BASIC::background, 0xFF000000); - ADD_PALETTE(BASIC::B011, 0xFF000000); - ADD_PALETTE(BASIC::B012, 0xFF000000); - ADD_PALETTE(BASIC::B013, 0xFF000000); - ADD_PALETTE(BASIC::B014, 0xFFFFFFFF); - ADD_PALETTE(BASIC::B015, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B016, 0xFF000000); - ADD_PALETTE(BASIC::B017, 0xFF000000); - ADD_PALETTE(BASIC::B018, 0xFF6590FF); - ADD_PALETTE(BASIC::B0211, 0xFF000000); - ADD_PALETTE(BASIC::B0211D, 0xFF000000); - ADD_PALETTE(BASIC::B0212, 0xFF1C1E28); - ADD_PALETTE(BASIC::B0213, 0xFF404040); - ADD_PALETTE(BASIC::B0214, 0xFF222C47); - ADD_PALETTE(BASIC::B0215, 0xFF1D263C); - ADD_PALETTE(BASIC::B0216, 0xFF222C47); - ADD_PALETTE(BASIC::B0217, 0xFF11131B); - ADD_PALETTE(BASIC::B0217D, 0x7F11131B); - ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF); - ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3); - ADD_PALETTE(BASIC::B0221L2, 0xFF697082); - ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E); - ADD_PALETTE(BASIC::B0221L4, 0xFF525252); - ADD_PALETTE(BASIC::B0222, 0xFF404040); - ADD_PALETTE(BASIC::B0223, 0x00000000); - ADD_PALETTE(BASIC::B0224, 0xFF27282B); - ADD_PALETTE(BASIC::B0225, 0xFF2A5181); - ADD_PALETTE(BASIC::B0226, 0xFF4B73A3); - ADD_PALETTE(BASIC::B0227, 0xFF000000); - ADD_PALETTE(BASIC::B0228, 0xFF1A5274); - ADD_PALETTE(BASIC::B0232, 0x00000000); - ADD_PALETTE(BASIC::B0233, 0x00000000); - ADD_PALETTE(BASIC::B031, 0x00000000); - ADD_PALETTE(BASIC::B041, 0xFF2B3AAF); - ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B042, 0xFF2A39AC); - ADD_PALETTE(BASIC::B043, 0x00001BEA); - ADD_PALETTE(BASIC::B044, 0xFF2B3AAF); - ADD_PALETTE(BASIC::B0511, 0xFF313F66); - ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC); - ADD_PALETTE(BASIC::B0512, 0x00000000); - ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B0514, 0xFF313F66); - ADD_PALETTE(BASIC::B0514P1, 0xFF303FB2); - ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9); - ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF); - ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E); - ADD_PALETTE(BASIC::B0515L2, 0x7F454442); - ADD_PALETTE(BASIC::B0516, 0x00000000); - ADD_PALETTE(BASIC::B0517, 0x00000000); - ADD_PALETTE(BASIC::B0517P1, 0x00000000); - ADD_PALETTE(BASIC::B0517P2, 0x00000000); - ADD_PALETTE(BASIC::B0518, 0xFF2E4468); - ADD_PALETTE(BASIC::B0518P, 0x00000000); - ADD_PALETTE(BASIC::B0519, 0xFFF25D28); - ADD_PALETTE(BASIC::B0520, 0xFF2E4468); - ADD_PALETTE(BASIC::B0520P, 0xFF3C649B); - ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF); - ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L2, 0x00000000); - ADD_PALETTE(BASIC::B052L2P, 0x005787B8); - ADD_PALETTE(BASIC::B052L3, 0x00000000); - ADD_PALETTE(BASIC::B052L3P, 0x00000000); - ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA); - ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA); - ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF); - ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA); - ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF); - ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA); - ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA); - ADD_PALETTE(BASIC::B052L10, 0x00000000); - ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B0532, 0x00000000); - ADD_PALETTE(BASIC::B0533, 0x00000000); - ADD_PALETTE(BASIC::B0534, 0x00000000); - ADD_PALETTE(BASIC::B0535, 0x00000000); - ADD_PALETTE(BASIC::B0536, 0x00000000); - ADD_PALETTE(BASIC::B0537, 0x00000000); - ADD_PALETTE(BASIC::B0541, 0xFF6B728A); - ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96); - ADD_PALETTE(BASIC::B0541D, 0x996B728A); - ADD_PALETTE(BASIC::B0542, 0x00000000); - ADD_PALETTE(BASIC::B0542P, 0x00000000); - ADD_PALETTE(BASIC::B0543, 0x00000000); - ADD_PALETTE(BASIC::B0544, 0x00000000); - ADD_PALETTE(BASIC::B0545, 0x00000000); - ADD_PALETTE(BASIC::B0551, 0x00000000); - ADD_PALETTE(BASIC::B0552, 0x00000000); - ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5); - ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF); - ADD_PALETTE(BASIC::B0555, 0x00000000); - ADD_PALETTE(BASIC::B0556, 0x00000000); - ADD_PALETTE(BASIC::B0557, 0x00000000); - ADD_PALETTE(BASIC::B0558, 0x00000000); - ADD_PALETTE(BASIC::B061L1, 0xFF1D263C); - ADD_PALETTE(BASIC::B061L2, 0xFF49577B); - ADD_PALETTE(BASIC::B061L3, 0xFF969A9C); - ADD_PALETTE(BASIC::B061L4, 0xFF1D263C); - ADD_PALETTE(BASIC::B061L5, 0xFF000000); - ADD_PALETTE(BASIC::B061L6, 0xFF333537); - ADD_PALETTE(BASIC::B0621L1, 0x00000000); - ADD_PALETTE(BASIC::B0621L2, 0x00000000); - ADD_PALETTE(BASIC::B0622L1, 0x001D263C); - ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF); - ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C); - ADD_PALETTE(BASIC::B0623L2, 0xFF626675); - ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C); - ADD_PALETTE(BASIC::B0624L2, 0xFF626675); - ADD_PALETTE(BASIC::B0624L3, 0xFF313F66); - ADD_PALETTE(BASIC::B0624L4, 0xFF000000); - ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF); - ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF); - ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA); - ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76); - ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA); - ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA); - ADD_PALETTE(BASIC::B063L7, 0xFF656565); - ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76); - ADD_PALETTE(BASIC::B063L8P, 0x00000000); - ADD_PALETTE(BASIC::B063L8D, 0x996E6F76); - ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B064L1, 0xFF6890FF); - ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7); - ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7); - ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7); - ADD_PALETTE(BASIC::B064L3, 0xFF000000); - ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B064L3D, 0x7F000000); - ADD_PALETTE(BASIC::B065L1, 0x00000000); - ADD_PALETTE(BASIC::B065L2, 0x00000000); - ADD_PALETTE(BASIC::B065L3, 0x00000000); - ADD_PALETTE(BASIC::B065L3P, 0x00000000); - ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE); - ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE); - ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC); - ADD_PALETTE(BASIC::B065L5, 0x00000000); - ADD_PALETTE(BASIC::B071, 0xFF393B41); - ADD_PALETTE(BASIC::B0721, 0xFFA09F9A); - ADD_PALETTE(BASIC::B0722, 0xFF5D83FF); - ADD_PALETTE(BASIC::B0723, 0xFF212428); - ADD_PALETTE(BASIC::B0724, 0xFF404040); - ADD_PALETTE(BASIC::B0725, 0xFF4F66A7); - ADD_PALETTE(BASIC::B0726, 0xFF404040); - ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF); - ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B0741, 0xFFA09F9A); - ADD_PALETTE(BASIC::B0742, 0xFF5D83FF); - ADD_PALETTE(BASIC::B0743, 0xFF212428); - ADD_PALETTE(BASIC::B0744, 0xFF404040); - ADD_PALETTE(BASIC::B0745, 0x00000000); - ADD_PALETTE(BASIC::B0751, 0xFF3B73B6); - ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::F011L2, 0xFF6890FF); - ADD_PALETTE(BASIC::F011L2D, 0x996890FF); - ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L3D, 0x996E6F76); - ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L4D, 0x996E6F76); - ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF); - ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L7D, 0x996E6F76); - ADD_PALETTE(BASIC::F011L8, 0xFFD10000); - ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF); - ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9); - ADD_PALETTE(BASIC::F011L11, 0xFF808080); - ADD_PALETTE(BASIC::F011L12, 0xFF4093F7); - ADD_PALETTE(BASIC::F011L13, 0x00000000); - ADD_PALETTE(BASIC::F011L14, 0x00000000); - ADD_PALETTE(BASIC::F011L15, 0xFFD10000); - ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B); - ADD_PALETTE(BASIC::F011L18, 0xFF686868); - ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L20, 0x00000000); - ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76); - ADD_PALETTE(BASIC::F011L23, 0xFF1382FF); - ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA); - ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77); - ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF); - ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF); - ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA); - ADD_PALETTE(BASIC::F031L2, 0x00000000); - ADD_PALETTE(BASIC::F031L2P, 0x00000000); - ADD_PALETTE(BASIC::F031L2D, 0x00000000); - ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA); - ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA); - ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA); - ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9); - ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9); - ADD_PALETTE(BASIC::F041i, 0xFF5D6176); - ADD_PALETTE(BASIC::F041iD, 0x995D6176); - ADD_PALETTE(BASIC::F051, 0xFF485D93); - ADD_PALETTE(BASIC::F052, 0xFF3A72FF); - ADD_PALETTE(BASIC::F053, 0xFF485D93); - ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F053D, 0x99485D93); - ADD_PALETTE(BASIC::F054, 0xFF202432); - ADD_PALETTE(BASIC::F055, 0xFF3A72FF); - ADD_PALETTE(BASIC::W011, 0xFF4B4D56); - ADD_PALETTE(BASIC::W011D, 0x994B4D56); - ADD_PALETTE(BASIC::W012, 0xFF095FD4); - ADD_PALETTE(BASIC::W012D, 0x99095FD4); - ADD_PALETTE(BASIC::W012P, 0xFF232F91); - ADD_PALETTE(BASIC::W013, 0x00000000); - ADD_PALETTE(BASIC::W0141, 0xFFDB0000); - ADD_PALETTE(BASIC::W0141P, 0xFFA10808); - ADD_PALETTE(BASIC::W0141D, 0x99DB0000); - ADD_PALETTE(BASIC::W015, 0xFF343432); - ADD_PALETTE(BASIC::W021L1, 0xFF000000); - ADD_PALETTE(BASIC::W021L1P, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W021L2, 0xFF425790); - ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W021L3, 0xFF425790); - ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0); - ADD_PALETTE(BASIC::W031L1, 0xFF000000); - ADD_PALETTE(BASIC::W031L1D, 0x99000000); - ADD_PALETTE(BASIC::W031L2, 0xFF000000); - ADD_PALETTE(BASIC::W031L2D, 0x99000000); - ADD_PALETTE(BASIC::W032, 0xFF5D6176); - ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W032D, 0x99FAFAFA); - ADD_PALETTE(BASIC::W041, 0xFFE1DDD1); - ADD_PALETTE(BASIC::W051, 0xFF000000); - ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA); - ADD_PALETTE(BASIC::W062L1, 0xFF555861); - ADD_PALETTE(BASIC::W062L1D, 0x99555861); - ADD_PALETTE(BASIC::W062L2, 0xFF415BFE); - ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE); - ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2); - ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2); - ADD_PALETTE(BASIC::W062L4, 0xFF3677C3); - ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3); - ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3); - ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE); - ADD_PALETTE(BASIC::W0632, 0xFF4C5158); - ADD_PALETTE(BASIC::W0641, 0xFF6B6D79); - ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC); - ADD_PALETTE(BASIC::W0641D, 0x996B6D79); - ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A); - ADD_PALETTE(BASIC::W0711, 0xFF525767); - ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W0711D, 0xFF3E414E); - ADD_PALETTE(BASIC::W0712, 0xFF4267A9); - ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W0714, 0xFF263E5F); - ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA); - ADD_PALETTE(BASIC::W0811, 0xFF253296); - ADD_PALETTE(BASIC::W0812, 0x00000000); - ADD_PALETTE(BASIC::W0813, 0xFF595959); - ADD_PALETTE(BASIC::W082, 0x00000000); - ADD_PALETTE(BASIC::W083, 0x00000000); - ADD_PALETTE(BASIC::W084, 0xB2FAFAFA); - ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W085, 0x00000000); - ADD_PALETTE(BASIC::W091, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W092, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W101, 0xFF4884D6); - ADD_PALETTE(BASIC::W111, 0xFFC8CEDB); - ADD_PALETTE(BASIC::W112L1, 0xFF8995AE); - ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W1123, 0x4C000000); - ADD_PALETTE(BASIC::W1211, 0x00000000); - ADD_PALETTE(BASIC::W1212, 0x00000000); - ADD_PALETTE(BASIC::W1221, 0xFF000000); - ADD_PALETTE(BASIC::W1222, 0xFF878580); - ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF); - ADD_PALETTE(BASIC::W131, 0xFF343739); - ADD_PALETTE(BASIC::W132, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W141, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W151, 0x66000000); - ADD_PALETTE(BASIC::W152, 0xFF42434B); - ADD_PALETTE(BASIC::W153, 0xFF2B3AAF); - ADD_PALETTE(BASIC::W154, 0xFF1C1E28); - ADD_PALETTE(BASIC::W161, 0xFF001BEA); + String theme = L"black"; + ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::background, 0xFF000000, theme); + ADD_PALETTE(BASIC::B011, 0xFF000000, theme); + ADD_PALETTE(BASIC::B012, 0xFF000000, theme); + ADD_PALETTE(BASIC::B013, 0xFF000000, theme); + ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B015, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B016, 0xFF000000, theme); + ADD_PALETTE(BASIC::B017, 0xFF000000, theme); + ADD_PALETTE(BASIC::B018, 0xFF6590FF, theme); + ADD_PALETTE(BASIC::B0211, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0211D, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0212, 0xFF1C1E28, theme); + ADD_PALETTE(BASIC::B0213, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0214, 0xFF222C47, theme); + ADD_PALETTE(BASIC::B0215, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0216, 0xFF222C47, theme); + ADD_PALETTE(BASIC::B0217, 0xFF11131B, theme); + ADD_PALETTE(BASIC::B0217D, 0x7F11131B, theme); + ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3, theme); + ADD_PALETTE(BASIC::B0221L2, 0xFF697082, theme); + ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E, theme); + ADD_PALETTE(BASIC::B0221L4, 0xFF525252, theme); + ADD_PALETTE(BASIC::B0222, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0223, 0x00000000, theme); + ADD_PALETTE(BASIC::B0224, 0xFF27282B, theme); + ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme); + ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme); + ADD_PALETTE(BASIC::B0227, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme); + ADD_PALETTE(BASIC::B0232, 0x00000000, theme); + ADD_PALETTE(BASIC::B0233, 0x00000000, theme); + ADD_PALETTE(BASIC::B031, 0x00000000, theme); + ADD_PALETTE(BASIC::B041, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B042, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B043, 0x00001BEA, theme); + ADD_PALETTE(BASIC::B044, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::B0511, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B0512, 0x00000000, theme); + ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0514, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0514P1, 0xFF303FB2, theme); + ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9, theme); + ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme); + ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E, theme); + ADD_PALETTE(BASIC::B0515L2, 0x7F454442, theme); + ADD_PALETTE(BASIC::B0516, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0518, 0xFF2E4468, theme); + ADD_PALETTE(BASIC::B0518P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme); + ADD_PALETTE(BASIC::B0520, 0xFF2E4468, theme); + ADD_PALETTE(BASIC::B0520P, 0xFF3C649B, theme); + ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L2P, 0x005787B8, theme); + ADD_PALETTE(BASIC::B052L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L10, 0x00000000, theme); + ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0532, 0x00000000, theme); + ADD_PALETTE(BASIC::B0533, 0x00000000, theme); + ADD_PALETTE(BASIC::B0534, 0x00000000, theme); + ADD_PALETTE(BASIC::B0535, 0x00000000, theme); + ADD_PALETTE(BASIC::B0536, 0x00000000, theme); + ADD_PALETTE(BASIC::B0537, 0x00000000, theme); + ADD_PALETTE(BASIC::B0541, 0xFF6B728A, theme); + ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96, theme); + ADD_PALETTE(BASIC::B0541D, 0x996B728A, theme); + ADD_PALETTE(BASIC::B0542, 0x00000000, theme); + ADD_PALETTE(BASIC::B0542P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0543, 0x00000000, theme); + ADD_PALETTE(BASIC::B0544, 0x00000000, theme); + ADD_PALETTE(BASIC::B0545, 0x00000000, theme); + ADD_PALETTE(BASIC::B0551, 0x00000000, theme); + ADD_PALETTE(BASIC::B0552, 0x00000000, theme); + ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5, theme); + ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B0555, 0x00000000, theme); + ADD_PALETTE(BASIC::B0556, 0x00000000, theme); + ADD_PALETTE(BASIC::B0557, 0x00000000, theme); + ADD_PALETTE(BASIC::B0558, 0x00000000, theme); + ADD_PALETTE(BASIC::B061L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B061L2, 0xFF49577B, theme); + ADD_PALETTE(BASIC::B061L3, 0xFF969A9C, theme); + ADD_PALETTE(BASIC::B061L4, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme); + ADD_PALETTE(BASIC::B061L6, 0xFF333537, theme); + ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0622L1, 0x001D263C, theme); + ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme); + ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0623L2, 0xFF626675, theme); + ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0624L2, 0xFF626675, theme); + ADD_PALETTE(BASIC::B0624L3, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF, theme); + ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF, theme); + ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L7, 0xFF656565, theme); + ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme); + ADD_PALETTE(BASIC::B063L8D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B064L1, 0xFF6890FF, theme); + ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L3, 0xFF000000, theme); + ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B064L3D, 0x7F000000, theme); + ADD_PALETTE(BASIC::B065L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE, theme); + ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE, theme); + ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B065L5, 0x00000000, theme); + ADD_PALETTE(BASIC::B071, 0xFF393B41, theme); + ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0722, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B0723, 0xFF212428, theme); + ADD_PALETTE(BASIC::B0724, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0725, 0xFF4F66A7, theme); + ADD_PALETTE(BASIC::B0726, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0742, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B0743, 0xFF212428, theme); + ADD_PALETTE(BASIC::B0744, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0745, 0x00000000, theme); + ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::F011L2, 0xFF6890FF, theme); + ADD_PALETTE(BASIC::F011L2D, 0x996890FF, theme); + ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L3D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L4D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L7D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L8, 0xFFD10000, theme); + ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme); + ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::F011L13, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L14, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L15, 0xFFD10000, theme); + ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme); + ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme); + ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L20, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme); + ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77, theme); + ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF, theme); + ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F031L2, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F041i, 0xFF5D6176, theme); + ADD_PALETTE(BASIC::F041iD, 0x995D6176, theme); + ADD_PALETTE(BASIC::F051, 0xFF485D93, theme); + ADD_PALETTE(BASIC::F052, 0xFF3A72FF, theme); + ADD_PALETTE(BASIC::F053, 0xFF485D93, theme); + ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F053D, 0x99485D93, theme); + ADD_PALETTE(BASIC::F054, 0xFF202432, theme); + ADD_PALETTE(BASIC::F055, 0xFF3A72FF, theme); + ADD_PALETTE(BASIC::W011, 0xFF4B4D56, theme); + ADD_PALETTE(BASIC::W011D, 0x994B4D56, theme); + ADD_PALETTE(BASIC::W012, 0xFF095FD4, theme); + ADD_PALETTE(BASIC::W012D, 0x99095FD4, theme); + ADD_PALETTE(BASIC::W012P, 0xFF232F91, theme); + ADD_PALETTE(BASIC::W013, 0x00000000, theme); + ADD_PALETTE(BASIC::W0141, 0xFFDB0000, theme); + ADD_PALETTE(BASIC::W0141P, 0xFFA10808, theme); + ADD_PALETTE(BASIC::W0141D, 0x99DB0000, theme); + ADD_PALETTE(BASIC::W015, 0xFF343432, theme); + ADD_PALETTE(BASIC::W021L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::W021L1P, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W021L2, 0xFF425790, theme); + ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L3, 0xFF425790, theme); + ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0, theme); + ADD_PALETTE(BASIC::W031L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::W031L1D, 0x99000000, theme); + ADD_PALETTE(BASIC::W031L2, 0xFF000000, theme); + ADD_PALETTE(BASIC::W031L2D, 0x99000000, theme); + ADD_PALETTE(BASIC::W032, 0xFF5D6176, theme); + ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W032D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W041, 0xFFE1DDD1, theme); + ADD_PALETTE(BASIC::W051, 0xFF000000, theme); + ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W062L1, 0xFF555861, theme); + ADD_PALETTE(BASIC::W062L1D, 0x99555861, theme); + ADD_PALETTE(BASIC::W062L2, 0xFF415BFE, theme); + ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE, theme); + ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2, theme); + ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2, theme); + ADD_PALETTE(BASIC::W062L4, 0xFF3677C3, theme); + ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3, theme); + ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3, theme); + ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE, theme); + ADD_PALETTE(BASIC::W0632, 0xFF4C5158, theme); + ADD_PALETTE(BASIC::W0641, 0xFF6B6D79, theme); + ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::W0641D, 0x996B6D79, theme); + ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A, theme); + ADD_PALETTE(BASIC::W0711, 0xFF525767, theme); + ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0711D, 0xFF3E414E, theme); + ADD_PALETTE(BASIC::W0712, 0xFF4267A9, theme); + ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0714, 0xFF263E5F, theme); + ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W0811, 0xFF253296, theme); + ADD_PALETTE(BASIC::W0812, 0x00000000, theme); + ADD_PALETTE(BASIC::W0813, 0xFF595959, theme); + ADD_PALETTE(BASIC::W082, 0x00000000, theme); + ADD_PALETTE(BASIC::W083, 0x00000000, theme); + ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme); + ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W085, 0x00000000, theme); + ADD_PALETTE(BASIC::W091, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W092, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W101, 0xFF4884D6, theme); + ADD_PALETTE(BASIC::W111, 0xFFC8CEDB, theme); + ADD_PALETTE(BASIC::W112L1, 0xFF8995AE, theme); + ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1123, 0x4C000000, theme); + ADD_PALETTE(BASIC::W1211, 0x00000000, theme); + ADD_PALETTE(BASIC::W1212, 0x00000000, theme); + ADD_PALETTE(BASIC::W1221, 0xFF000000, theme); + ADD_PALETTE(BASIC::W1222, 0xFF878580, theme); + ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::W131, 0xFF343739, theme); + ADD_PALETTE(BASIC::W132, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W141, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W151, 0x66000000, theme); + ADD_PALETTE(BASIC::W152, 0xFF42434B, theme); + ADD_PALETTE(BASIC::W153, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W154, 0xFF1C1E28, theme); + ADD_PALETTE(BASIC::W161, 0xFF001BEA, theme); } void _ResourceManager::LoadWhitePalette(void) { - ADD_PALETTE(BASIC::foreground, 0xFF000000); - ADD_PALETTE(BASIC::background, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B011, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B012, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B013, 0xFF000000); - ADD_PALETTE(BASIC::B014, 0xFFFFFFFF); - ADD_PALETTE(BASIC::B015, 0xFF202327); - ADD_PALETTE(BASIC::B016, 0xFF000000); - ADD_PALETTE(BASIC::B017, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B018, 0xFF6590FF); - ADD_PALETTE(BASIC::B0211, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B0211D, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B0212, 0xFFEDEBE4); - ADD_PALETTE(BASIC::B0213, 0xFF5B5656); - ADD_PALETTE(BASIC::B0214, 0xFFDCDAD3); - ADD_PALETTE(BASIC::B0215, 0xFFDEDCD5); - ADD_PALETTE(BASIC::B0216, 0xFFBDBBB5); - ADD_PALETTE(BASIC::B0217, 0xFFEFEDE5); - ADD_PALETTE(BASIC::B0217D, 0x7FEFEDE5); - ADD_PALETTE(BASIC::B0221, 0xFF8A8A8A); - ADD_PALETTE(BASIC::B0221L1, 0xFF8A8A8A); - ADD_PALETTE(BASIC::B0221L2, 0xFF808080); - ADD_PALETTE(BASIC::B0221L3, 0xFF8C8C8C); - ADD_PALETTE(BASIC::B0221L4, 0xFFCCCBC7); - ADD_PALETTE(BASIC::B0222, 0xFFFFFFFF); - ADD_PALETTE(BASIC::B0223, 0xFFD3D1CB); - ADD_PALETTE(BASIC::B0224, 0xFFB9B8B2); - ADD_PALETTE(BASIC::B0225, 0xFF2A5181); - ADD_PALETTE(BASIC::B0226, 0xFF4B73A3); - ADD_PALETTE(BASIC::B0227, 0xFF000000); - ADD_PALETTE(BASIC::B0228, 0xFF1A5274); - ADD_PALETTE(BASIC::B0232, 0x00000000); - ADD_PALETTE(BASIC::B0233, 0x00000000); - ADD_PALETTE(BASIC::B031, 0x00000000); - ADD_PALETTE(BASIC::B041, 0xFF5787C2); - ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B042, 0xFF0079D4); - ADD_PALETTE(BASIC::B043, 0xFF5787C2); - ADD_PALETTE(BASIC::B044, 0xFF2A89C2); - ADD_PALETTE(BASIC::B0511, 0xFFEDEBE4); - ADD_PALETTE(BASIC::B0511P, 0xFF0E66AA); - ADD_PALETTE(BASIC::B0512, 0x00000000); - ADD_PALETTE(BASIC::B0513, 0xFF202327); - ADD_PALETTE(BASIC::B0514, 0xFFEDEBE4); - ADD_PALETTE(BASIC::B0514P1, 0xFF0E66AA); - ADD_PALETTE(BASIC::B0514P2, 0xFF007BDA); - ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF); - ADD_PALETTE(BASIC::B0515L1, 0xFFDEDCD5); - ADD_PALETTE(BASIC::B0515L2, 0x7F626262); - ADD_PALETTE(BASIC::B0516, 0x00000000); - ADD_PALETTE(BASIC::B0517, 0x00000000); - ADD_PALETTE(BASIC::B0517P1, 0x00000000); - ADD_PALETTE(BASIC::B0517P2, 0x00000000); - ADD_PALETTE(BASIC::B0518, 0x003567A3); - ADD_PALETTE(BASIC::B0518P, 0x00000000); - ADD_PALETTE(BASIC::B0519, 0xFFF25D28); - ADD_PALETTE(BASIC::B0520, 0xFF3567A3); - ADD_PALETTE(BASIC::B0520P, 0xFF2A89C2); - ADD_PALETTE(BASIC::B052L1, 0xFF656565); - ADD_PALETTE(BASIC::B052L1P, 0xFF007BDA); - ADD_PALETTE(BASIC::B052L1D, 0x7F656565); - ADD_PALETTE(BASIC::B052L2, 0xFF525252); - ADD_PALETTE(BASIC::B052L2P, 0xFF4093F7); - ADD_PALETTE(BASIC::B052L3, 0x00000000); - ADD_PALETTE(BASIC::B052L3P, 0x00000000); - ADD_PALETTE(BASIC::B052L4, 0xFF282828); - ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L4D, 0x7F282828); - ADD_PALETTE(BASIC::B052L5, 0xFF282828); - ADD_PALETTE(BASIC::B052L5D, 0x7F282828); - ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA); - ADD_PALETTE(BASIC::B052L6, 0xFF282828); - ADD_PALETTE(BASIC::B052L6D, 0x7F282828); - ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD); - ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L8P, 0xFF4093F7); - ADD_PALETTE(BASIC::B052L8D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B052L9D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::B052L10, 0x00000000); - ADD_PALETTE(BASIC::B0531, 0xFF202327); - ADD_PALETTE(BASIC::B0532, 0x00000000); - ADD_PALETTE(BASIC::B0533, 0x00000000); - ADD_PALETTE(BASIC::B0534, 0x00000000); - ADD_PALETTE(BASIC::B0535, 0x00000000); - ADD_PALETTE(BASIC::B0536, 0x00000000); - ADD_PALETTE(BASIC::B0537, 0x00000000); - ADD_PALETTE(BASIC::B0541, 0xFFF7F5ED); - ADD_PALETTE(BASIC::B0541P, 0xFF007AD8); - ADD_PALETTE(BASIC::B0541D, 0x7FF7F5ED); - ADD_PALETTE(BASIC::B0542, 0x00000000); - ADD_PALETTE(BASIC::B0542P, 0x00000000); - ADD_PALETTE(BASIC::B0543, 0x00000000); - ADD_PALETTE(BASIC::B0544, 0x00000000); - ADD_PALETTE(BASIC::B0545, 0x00000000); - ADD_PALETTE(BASIC::B0551, 0x00000000); - ADD_PALETTE(BASIC::B0552, 0x00000000); - ADD_PALETTE(BASIC::B0553, 0xFF0C0F14); - ADD_PALETTE(BASIC::B0554, 0xFF414447); - ADD_PALETTE(BASIC::B0555, 0x00000000); - ADD_PALETTE(BASIC::B0556, 0x00000000); - ADD_PALETTE(BASIC::B0557, 0x00000000); - ADD_PALETTE(BASIC::B0558, 0x00000000); - ADD_PALETTE(BASIC::B061L1, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE); - ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9); - ADD_PALETTE(BASIC::B061L4, 0xFF444444); - ADD_PALETTE(BASIC::B061L5, 0xFF000000); - ADD_PALETTE(BASIC::B061L6, 0xFF17191C); - ADD_PALETTE(BASIC::B0621L1, 0x00000000); - ADD_PALETTE(BASIC::B0621L2, 0x00000000); - ADD_PALETTE(BASIC::B0622L1, 0x00444444); - ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF); - ADD_PALETTE(BASIC::B0623L1, 0xFF2D2D2D); - ADD_PALETTE(BASIC::B0623L2, 0xFF5B5B5B); - ADD_PALETTE(BASIC::B0624L1, 0xFFCDCDCD); - ADD_PALETTE(BASIC::B0624L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B0624L3, 0xFF303337); - ADD_PALETTE(BASIC::B0624L4, 0xFF000000); - ADD_PALETTE(BASIC::B0624L5, 0xFF007BDA); - ADD_PALETTE(BASIC::B0624L6, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L1, 0xFF000000); - ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L1D, 0x7F000000); - ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L3, 0xFF808080); - ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B063L5D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::B063L6, 0xFF454545); - ADD_PALETTE(BASIC::B063L6P, 0xFF454545); - ADD_PALETTE(BASIC::B063L6D, 0x7F454545); - ADD_PALETTE(BASIC::B063L7, 0xFFBABABA); - ADD_PALETTE(BASIC::B063L8, 0xFF808080); - ADD_PALETTE(BASIC::B063L8P, 0x00000000); - ADD_PALETTE(BASIC::B063L8D, 0x7F808080); - ADD_PALETTE(BASIC::B063L9, 0xFF252525); - ADD_PALETTE(BASIC::B064L1, 0xFF3B73B6); - ADD_PALETTE(BASIC::B064L2, 0xFF808080); - ADD_PALETTE(BASIC::B064L2P, 0xFF808080); - ADD_PALETTE(BASIC::B064L2D, 0xFF808080); - ADD_PALETTE(BASIC::B064L3, 0xFF3A3A3A); - ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B064L3D, 0x7F3A3A3A); - ADD_PALETTE(BASIC::B065L1, 0x00000000); - ADD_PALETTE(BASIC::B065L2, 0x00000000); - ADD_PALETTE(BASIC::B065L3, 0x00000000); - ADD_PALETTE(BASIC::B065L3P, 0x00000000); - ADD_PALETTE(BASIC::B065L4, 0xFFF7F5ED); - ADD_PALETTE(BASIC::B065L4D, 0x7FF7F5ED); - ADD_PALETTE(BASIC::B065L4P, 0xFF007AD8); - ADD_PALETTE(BASIC::B065L5, 0x00000000); - ADD_PALETTE(BASIC::B071, 0xFFC6C4BE); - ADD_PALETTE(BASIC::B0721, 0xFFA09F9A); - ADD_PALETTE(BASIC::B0722, 0xFF3B73B6); - ADD_PALETTE(BASIC::B0723, 0xFFF8F6EF); - ADD_PALETTE(BASIC::B0724, 0xFFD1CFC9); - ADD_PALETTE(BASIC::B0725, 0xFF3B73B6); - ADD_PALETTE(BASIC::B0726, 0xFFE2DFD5); - ADD_PALETTE(BASIC::B0731, 0xFF3B73B6); - ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA); - ADD_PALETTE(BASIC::B0741, 0xFFA09F9A); - ADD_PALETTE(BASIC::B0742, 0xFF3B73B6); - ADD_PALETTE(BASIC::B0743, 0xFFE6E3D8); - ADD_PALETTE(BASIC::B0744, 0xFFC5C2B7); - ADD_PALETTE(BASIC::B0745, 0x00000000); - ADD_PALETTE(BASIC::B0751, 0xFF3B73B6); - ADD_PALETTE(BASIC::F011L1, 0xFF000000); - ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F011L1D, 0x7F000000); - ADD_PALETTE(BASIC::F011L2, 0xFF3B73B6); - ADD_PALETTE(BASIC::F011L2D, 0x7F3B73B6); - ADD_PALETTE(BASIC::F011L3, 0xFF4F4F4F); - ADD_PALETTE(BASIC::F011L3D, 0xFF4F4F4F); - ADD_PALETTE(BASIC::F011L4, 0xFF4F4F4F); - ADD_PALETTE(BASIC::F011L4D, 0x7F4F4F4F); - ADD_PALETTE(BASIC::F011L5, 0xFF3B73B6); - ADD_PALETTE(BASIC::F011L6, 0xFF808080); - ADD_PALETTE(BASIC::F011L7, 0xFF686866); - ADD_PALETTE(BASIC::F011L7D, 0xCC686866); - ADD_PALETTE(BASIC::F011L8, 0xFFC24747); - ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF); - ADD_PALETTE(BASIC::F011L10, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F011L11, 0xFF808080); - ADD_PALETTE(BASIC::F011L12, 0xFF4093F7); - ADD_PALETTE(BASIC::F011L13, 0x00000000); - ADD_PALETTE(BASIC::F011L14, 0x00000000); - ADD_PALETTE(BASIC::F011L15, 0xFFE94949); - ADD_PALETTE(BASIC::F011L16, 0xFF8B8B8B); - ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B); - ADD_PALETTE(BASIC::F011L18, 0xFF686868); - ADD_PALETTE(BASIC::F011L19, 0xFF8B8B8B); - ADD_PALETTE(BASIC::F011L20, 0x00000000); - ADD_PALETTE(BASIC::F011L21, 0xFF808080); - ADD_PALETTE(BASIC::F011L22, 0xFF9A9A9A); - ADD_PALETTE(BASIC::F011L23, 0xFF1382FF); - ADD_PALETTE(BASIC::F021L1i, 0xFF808080); - ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F021L1iD, 0x7F808080); - ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8); - ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9); - ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9); - ADD_PALETTE(BASIC::F031L1, 0xFF282828); - ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L1D, 0x7F282828); - ADD_PALETTE(BASIC::F031L2, 0x00000000); - ADD_PALETTE(BASIC::F031L2P, 0x00000000); - ADD_PALETTE(BASIC::F031L2D, 0x00000000); - ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::F032L1, 0xFF282828); - ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L1D, 0x7F282828); - ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9); - ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9); - ADD_PALETTE(BASIC::F041i, 0xFF808080); - ADD_PALETTE(BASIC::F041iD, 0x7F808080); - ADD_PALETTE(BASIC::F051, 0xFF90A9C7); - ADD_PALETTE(BASIC::F052, 0xFF007BDB); - ADD_PALETTE(BASIC::F053, 0xFF808080); - ADD_PALETTE(BASIC::F053P, 0xFF000000); - ADD_PALETTE(BASIC::F053D, 0x7F808080); - ADD_PALETTE(BASIC::F054, 0xFFE3E1D9); - ADD_PALETTE(BASIC::F055, 0xFF007BDA); - ADD_PALETTE(BASIC::W011, 0xFFF7F5ED); - ADD_PALETTE(BASIC::W011D, 0x7FF7F5ED); - ADD_PALETTE(BASIC::W012, 0xFF0058D0); - ADD_PALETTE(BASIC::W012D, 0x7F0058D0); - ADD_PALETTE(BASIC::W012P, 0xFF0051BF); - ADD_PALETTE(BASIC::W013, 0x00000000); - ADD_PALETTE(BASIC::W0141, 0xFFC12C21); - ADD_PALETTE(BASIC::W0141P, 0xFFC12C21); - ADD_PALETTE(BASIC::W0141D, 0x7FC12C21); - ADD_PALETTE(BASIC::W015, 0xFF343432); - ADD_PALETTE(BASIC::W021L1, 0xFFF8F6EF); - ADD_PALETTE(BASIC::W021L1P, 0xFF5787C2); - ADD_PALETTE(BASIC::W021L2, 0xFF0E68AD); - ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W021L3, 0xFF0E68AD); - ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W021L4, 0xFF000000); - ADD_PALETTE(BASIC::W031L1, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W031L1D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::W031L2, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W031L2D, 0x7FFAFAFA); - ADD_PALETTE(BASIC::W032, 0xFF878580); - ADD_PALETTE(BASIC::W032P, 0xFF000000); - ADD_PALETTE(BASIC::W032D, 0x7F878580); - ADD_PALETTE(BASIC::W041, 0xFF17191C); - ADD_PALETTE(BASIC::W051, 0xFF000000); - ADD_PALETTE(BASIC::W0611, 0xFF3B73B6); - ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0611D, 0x7F3B73B6); - ADD_PALETTE(BASIC::W062L1, 0xFFC5C5C5); - ADD_PALETTE(BASIC::W062L1D, 0x4CC5C5C5); - ADD_PALETTE(BASIC::W062L2, 0xFF007DDE); - ADD_PALETTE(BASIC::W062L2D, 0x7F007DDE); - ADD_PALETTE(BASIC::W062L3, 0xFF615F5B); - ADD_PALETTE(BASIC::W062L3D, 0x4C615F5B); - ADD_PALETTE(BASIC::W062L4, 0xFF70A9EE); - ADD_PALETTE(BASIC::W062L4D, 0x4C70A9EE); - ADD_PALETTE(BASIC::W062L5, 0xFF223148); - ADD_PALETTE(BASIC::W0631, 0xFF656565); - ADD_PALETTE(BASIC::W0632, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0641, 0xFFF7F5ED); - ADD_PALETTE(BASIC::W0641P, 0xFF0079D4); - ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED); - ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF); - ADD_PALETTE(BASIC::W0711, 0xFF6C90BC); - ADD_PALETTE(BASIC::W0711P, 0xFF4093F7); - ADD_PALETTE(BASIC::W0711D, 0xFF607DA1); - ADD_PALETTE(BASIC::W0712, 0x00000000); - ADD_PALETTE(BASIC::W0713, 0xFF4093F7); - ADD_PALETTE(BASIC::W0714, 0x00000000); - ADD_PALETTE(BASIC::W0715, 0xFF2889FF); - ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA); - ADD_PALETTE(BASIC::W0811, 0xFF5787C2); - ADD_PALETTE(BASIC::W0812, 0x00000000); - ADD_PALETTE(BASIC::W0813, 0xFF494949); - ADD_PALETTE(BASIC::W082, 0x00000000); - ADD_PALETTE(BASIC::W083, 0x00000000); - ADD_PALETTE(BASIC::W084, 0xB2FAFAFA); - ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA); - ADD_PALETTE(BASIC::W085, 0x00000000); - ADD_PALETTE(BASIC::W091, 0xFF444444); - ADD_PALETTE(BASIC::W092, 0xFFFFFFFF); - ADD_PALETTE(BASIC::W101, 0xFF5893E4); - ADD_PALETTE(BASIC::W111, 0xFFE7E5DE); - ADD_PALETTE(BASIC::W112L1, 0xFFB4B4B4); - ADD_PALETTE(BASIC::W112L2, 0xFFFFFFFF); - ADD_PALETTE(BASIC::W1121, 0xFF000000); - ADD_PALETTE(BASIC::W1122, 0xFF000000); - ADD_PALETTE(BASIC::W1123, 0x4C000000); - ADD_PALETTE(BASIC::W1211, 0x00000000); - ADD_PALETTE(BASIC::W1212, 0x00000000); - ADD_PALETTE(BASIC::W1221, 0x00000000); - ADD_PALETTE(BASIC::W1222, 0x00000000); - ADD_PALETTE(BASIC::W1223, 0x00000000); - ADD_PALETTE(BASIC::W131, 0xFF959595); - ADD_PALETTE(BASIC::W132, 0xFF5787C2); - ADD_PALETTE(BASIC::W141, 0xFF808080); - ADD_PALETTE(BASIC::W151, 0xFF95948F); - ADD_PALETTE(BASIC::W152, 0xFF878787); - ADD_PALETTE(BASIC::W153, 0xFF5787C2); - ADD_PALETTE(BASIC::W154, 0xFFEFECE0); - ADD_PALETTE(BASIC::W161, 0xFF007BDA); + String theme = L"white"; + ADD_PALETTE(BASIC::foreground, 0xFF000000, theme); + ADD_PALETTE(BASIC::background, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B011, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B012, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B013, 0xFF000000, theme); + ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B015, 0xFF202327, theme); + ADD_PALETTE(BASIC::B016, 0xFF000000, theme); + ADD_PALETTE(BASIC::B017, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B018, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0211, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0211D, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0212, 0xFFEDEBE4, theme); + ADD_PALETTE(BASIC::B0213, 0xFF5B5656, theme); + ADD_PALETTE(BASIC::B0214, 0xFFDCDAD3, theme); + ADD_PALETTE(BASIC::B0215, 0xFFDEDCD5, theme); + ADD_PALETTE(BASIC::B0216, 0xFFBDBBB5, theme); + ADD_PALETTE(BASIC::B0217, 0xFFEFEDE5, theme); + ADD_PALETTE(BASIC::B0217D, 0x7FEFEDE5, theme); + ADD_PALETTE(BASIC::B0221, 0xFF8A8A8A, theme); + ADD_PALETTE(BASIC::B0221L1, 0xFF8A8A8A, theme); + ADD_PALETTE(BASIC::B0221L2, 0xFF808080, theme); + ADD_PALETTE(BASIC::B0221L3, 0xFF8C8C8C, theme); + ADD_PALETTE(BASIC::B0221L4, 0xFFCCCBC7, theme); + ADD_PALETTE(BASIC::B0222, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B0223, 0xFFD3D1CB, theme); + ADD_PALETTE(BASIC::B0224, 0xFFB9B8B2, theme); + ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme); + ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme); + ADD_PALETTE(BASIC::B0227, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme); + ADD_PALETTE(BASIC::B0232, 0x00000000, theme); + ADD_PALETTE(BASIC::B0233, 0x00000000, theme); + ADD_PALETTE(BASIC::B031, 0x00000000, theme); + ADD_PALETTE(BASIC::B041, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B042, 0xFF0079D4, theme); + ADD_PALETTE(BASIC::B043, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::B044, 0xFF2A89C2, theme); + ADD_PALETTE(BASIC::B0511, 0xFFEDEBE4, theme); + ADD_PALETTE(BASIC::B0511P, 0xFF0E66AA, theme); + ADD_PALETTE(BASIC::B0512, 0x00000000, theme); + ADD_PALETTE(BASIC::B0513, 0xFF202327, theme); + ADD_PALETTE(BASIC::B0514, 0xFFEDEBE4, theme); + ADD_PALETTE(BASIC::B0514P1, 0xFF0E66AA, theme); + ADD_PALETTE(BASIC::B0514P2, 0xFF007BDA, theme); + ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme); + ADD_PALETTE(BASIC::B0515L1, 0xFFDEDCD5, theme); + ADD_PALETTE(BASIC::B0515L2, 0x7F626262, theme); + ADD_PALETTE(BASIC::B0516, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0518, 0x003567A3, theme); + ADD_PALETTE(BASIC::B0518P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme); + ADD_PALETTE(BASIC::B0520, 0xFF3567A3, theme); + ADD_PALETTE(BASIC::B0520P, 0xFF2A89C2, theme); + ADD_PALETTE(BASIC::B052L1, 0xFF656565, theme); + ADD_PALETTE(BASIC::B052L1P, 0xFF007BDA, theme); + ADD_PALETTE(BASIC::B052L1D, 0x7F656565, theme); + ADD_PALETTE(BASIC::B052L2, 0xFF525252, theme); + ADD_PALETTE(BASIC::B052L2P, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::B052L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L4, 0xFF282828, theme); + ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L4D, 0x7F282828, theme); + ADD_PALETTE(BASIC::B052L5, 0xFF282828, theme); + ADD_PALETTE(BASIC::B052L5D, 0x7F282828, theme); + ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA, theme); + ADD_PALETTE(BASIC::B052L6, 0xFF282828, theme); + ADD_PALETTE(BASIC::B052L6D, 0x7F282828, theme); + ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD, theme); + ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8P, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::B052L8D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::B052L10, 0x00000000, theme); + ADD_PALETTE(BASIC::B0531, 0xFF202327, theme); + ADD_PALETTE(BASIC::B0532, 0x00000000, theme); + ADD_PALETTE(BASIC::B0533, 0x00000000, theme); + ADD_PALETTE(BASIC::B0534, 0x00000000, theme); + ADD_PALETTE(BASIC::B0535, 0x00000000, theme); + ADD_PALETTE(BASIC::B0536, 0x00000000, theme); + ADD_PALETTE(BASIC::B0537, 0x00000000, theme); + ADD_PALETTE(BASIC::B0541, 0xFFF7F5ED, theme); + ADD_PALETTE(BASIC::B0541P, 0xFF007AD8, theme); + ADD_PALETTE(BASIC::B0541D, 0x7FF7F5ED, theme); + ADD_PALETTE(BASIC::B0542, 0x00000000, theme); + ADD_PALETTE(BASIC::B0542P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0543, 0x00000000, theme); + ADD_PALETTE(BASIC::B0544, 0x00000000, theme); + ADD_PALETTE(BASIC::B0545, 0x00000000, theme); + ADD_PALETTE(BASIC::B0551, 0x00000000, theme); + ADD_PALETTE(BASIC::B0552, 0x00000000, theme); + ADD_PALETTE(BASIC::B0553, 0xFF0C0F14, theme); + ADD_PALETTE(BASIC::B0554, 0xFF414447, theme); + ADD_PALETTE(BASIC::B0555, 0x00000000, theme); + ADD_PALETTE(BASIC::B0556, 0x00000000, theme); + ADD_PALETTE(BASIC::B0557, 0x00000000, theme); + ADD_PALETTE(BASIC::B0558, 0x00000000, theme); + ADD_PALETTE(BASIC::B061L1, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE, theme); + ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9, theme); + ADD_PALETTE(BASIC::B061L4, 0xFF444444, theme); + ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme); + ADD_PALETTE(BASIC::B061L6, 0xFF17191C, theme); + ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0622L1, 0x00444444, theme); + ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme); + ADD_PALETTE(BASIC::B0623L1, 0xFF2D2D2D, theme); + ADD_PALETTE(BASIC::B0623L2, 0xFF5B5B5B, theme); + ADD_PALETTE(BASIC::B0624L1, 0xFFCDCDCD, theme); + ADD_PALETTE(BASIC::B0624L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B0624L3, 0xFF303337, theme); + ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0624L5, 0xFF007BDA, theme); + ADD_PALETTE(BASIC::B0624L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1D, 0x7F000000, theme); + ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L3, 0xFF808080, theme); + ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::B063L6, 0xFF454545, theme); + ADD_PALETTE(BASIC::B063L6P, 0xFF454545, theme); + ADD_PALETTE(BASIC::B063L6D, 0x7F454545, theme); + ADD_PALETTE(BASIC::B063L7, 0xFFBABABA, theme); + ADD_PALETTE(BASIC::B063L8, 0xFF808080, theme); + ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme); + ADD_PALETTE(BASIC::B063L8D, 0x7F808080, theme); + ADD_PALETTE(BASIC::B063L9, 0xFF252525, theme); + ADD_PALETTE(BASIC::B064L1, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::B064L2, 0xFF808080, theme); + ADD_PALETTE(BASIC::B064L2P, 0xFF808080, theme); + ADD_PALETTE(BASIC::B064L2D, 0xFF808080, theme); + ADD_PALETTE(BASIC::B064L3, 0xFF3A3A3A, theme); + ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B064L3D, 0x7F3A3A3A, theme); + ADD_PALETTE(BASIC::B065L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L4, 0xFFF7F5ED, theme); + ADD_PALETTE(BASIC::B065L4D, 0x7FF7F5ED, theme); + ADD_PALETTE(BASIC::B065L4P, 0xFF007AD8, theme); + ADD_PALETTE(BASIC::B065L5, 0x00000000, theme); + ADD_PALETTE(BASIC::B071, 0xFFC6C4BE, theme); + ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0722, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::B0723, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0724, 0xFFD1CFC9, theme); + ADD_PALETTE(BASIC::B0725, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::B0726, 0xFFE2DFD5, theme); + ADD_PALETTE(BASIC::B0731, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0742, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::B0743, 0xFFE6E3D8, theme); + ADD_PALETTE(BASIC::B0744, 0xFFC5C2B7, theme); + ADD_PALETTE(BASIC::B0745, 0x00000000, theme); + ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::F011L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L1D, 0x7F000000, theme); + ADD_PALETTE(BASIC::F011L2, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::F011L2D, 0x7F3B73B6, theme); + ADD_PALETTE(BASIC::F011L3, 0xFF4F4F4F, theme); + ADD_PALETTE(BASIC::F011L3D, 0xFF4F4F4F, theme); + ADD_PALETTE(BASIC::F011L4, 0xFF4F4F4F, theme); + ADD_PALETTE(BASIC::F011L4D, 0x7F4F4F4F, theme); + ADD_PALETTE(BASIC::F011L5, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::F011L6, 0xFF808080, theme); + ADD_PALETTE(BASIC::F011L7, 0xFF686866, theme); + ADD_PALETTE(BASIC::F011L7D, 0xCC686866, theme); + ADD_PALETTE(BASIC::F011L8, 0xFFC24747, theme); + ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::F011L10, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme); + ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::F011L13, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L14, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L15, 0xFFE94949, theme); + ADD_PALETTE(BASIC::F011L16, 0xFF8B8B8B, theme); + ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme); + ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme); + ADD_PALETTE(BASIC::F011L19, 0xFF8B8B8B, theme); + ADD_PALETTE(BASIC::F011L20, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L21, 0xFF808080, theme); + ADD_PALETTE(BASIC::F011L22, 0xFF9A9A9A, theme); + ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme); + ADD_PALETTE(BASIC::F021L1i, 0xFF808080, theme); + ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F021L1iD, 0x7F808080, theme); + ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8, theme); + ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9, theme); + ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9, theme); + ADD_PALETTE(BASIC::F031L1, 0xFF282828, theme); + ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L1D, 0x7F282828, theme); + ADD_PALETTE(BASIC::F031L2, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1, 0xFF282828, theme); + ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1D, 0x7F282828, theme); + ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F041i, 0xFF808080, theme); + ADD_PALETTE(BASIC::F041iD, 0x7F808080, theme); + ADD_PALETTE(BASIC::F051, 0xFF90A9C7, theme); + ADD_PALETTE(BASIC::F052, 0xFF007BDB, theme); + ADD_PALETTE(BASIC::F053, 0xFF808080, theme); + ADD_PALETTE(BASIC::F053P, 0xFF000000, theme); + ADD_PALETTE(BASIC::F053D, 0x7F808080, theme); + ADD_PALETTE(BASIC::F054, 0xFFE3E1D9, theme); + ADD_PALETTE(BASIC::F055, 0xFF007BDA, theme); + ADD_PALETTE(BASIC::W011, 0xFFF7F5ED, theme); + ADD_PALETTE(BASIC::W011D, 0x7FF7F5ED, theme); + ADD_PALETTE(BASIC::W012, 0xFF0058D0, theme); + ADD_PALETTE(BASIC::W012D, 0x7F0058D0, theme); + ADD_PALETTE(BASIC::W012P, 0xFF0051BF, theme); + ADD_PALETTE(BASIC::W013, 0x00000000, theme); + ADD_PALETTE(BASIC::W0141, 0xFFC12C21, theme); + ADD_PALETTE(BASIC::W0141P, 0xFFC12C21, theme); + ADD_PALETTE(BASIC::W0141D, 0x7FC12C21, theme); + ADD_PALETTE(BASIC::W015, 0xFF343432, theme); + ADD_PALETTE(BASIC::W021L1, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::W021L1P, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::W021L2, 0xFF0E68AD, theme); + ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L3, 0xFF0E68AD, theme); + ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L4, 0xFF000000, theme); + ADD_PALETTE(BASIC::W031L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W031L1D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::W031L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W031L2D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::W032, 0xFF878580, theme); + ADD_PALETTE(BASIC::W032P, 0xFF000000, theme); + ADD_PALETTE(BASIC::W032D, 0x7F878580, theme); + ADD_PALETTE(BASIC::W041, 0xFF17191C, theme); + ADD_PALETTE(BASIC::W051, 0xFF000000, theme); + ADD_PALETTE(BASIC::W0611, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0611D, 0x7F3B73B6, theme); + ADD_PALETTE(BASIC::W062L1, 0xFFC5C5C5, theme); + ADD_PALETTE(BASIC::W062L1D, 0x4CC5C5C5, theme); + ADD_PALETTE(BASIC::W062L2, 0xFF007DDE, theme); + ADD_PALETTE(BASIC::W062L2D, 0x7F007DDE, theme); + ADD_PALETTE(BASIC::W062L3, 0xFF615F5B, theme); + ADD_PALETTE(BASIC::W062L3D, 0x4C615F5B, theme); + ADD_PALETTE(BASIC::W062L4, 0xFF70A9EE, theme); + ADD_PALETTE(BASIC::W062L4D, 0x4C70A9EE, theme); + ADD_PALETTE(BASIC::W062L5, 0xFF223148, theme); + ADD_PALETTE(BASIC::W0631, 0xFF656565, theme); + ADD_PALETTE(BASIC::W0632, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0641, 0xFFF7F5ED, theme); + ADD_PALETTE(BASIC::W0641P, 0xFF0079D4, theme); + ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED, theme); + ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF, theme); + ADD_PALETTE(BASIC::W0711, 0xFF6C90BC, theme); + ADD_PALETTE(BASIC::W0711P, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::W0711D, 0xFF607DA1, theme); + ADD_PALETTE(BASIC::W0712, 0x00000000, theme); + ADD_PALETTE(BASIC::W0713, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::W0714, 0x00000000, theme); + ADD_PALETTE(BASIC::W0715, 0xFF2889FF, theme); + ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W0811, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::W0812, 0x00000000, theme); + ADD_PALETTE(BASIC::W0813, 0xFF494949, theme); + ADD_PALETTE(BASIC::W082, 0x00000000, theme); + ADD_PALETTE(BASIC::W083, 0x00000000, theme); + ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme); + ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W085, 0x00000000, theme); + ADD_PALETTE(BASIC::W091, 0xFF444444, theme); + ADD_PALETTE(BASIC::W092, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::W101, 0xFF5893E4, theme); + ADD_PALETTE(BASIC::W111, 0xFFE7E5DE, theme); + ADD_PALETTE(BASIC::W112L1, 0xFFB4B4B4, theme); + ADD_PALETTE(BASIC::W112L2, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::W1121, 0xFF000000, theme); + ADD_PALETTE(BASIC::W1122, 0xFF000000, theme); + ADD_PALETTE(BASIC::W1123, 0x4C000000, theme); + ADD_PALETTE(BASIC::W1211, 0x00000000, theme); + ADD_PALETTE(BASIC::W1212, 0x00000000, theme); + ADD_PALETTE(BASIC::W1221, 0x00000000, theme); + ADD_PALETTE(BASIC::W1222, 0x00000000, theme); + ADD_PALETTE(BASIC::W1223, 0x00000000, theme); + ADD_PALETTE(BASIC::W131, 0xFF959595, theme); + ADD_PALETTE(BASIC::W132, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::W141, 0xFF808080, theme); + ADD_PALETTE(BASIC::W151, 0xFF95948F, theme); + ADD_PALETTE(BASIC::W152, 0xFF878787, theme); + ADD_PALETTE(BASIC::W153, 0xFF5787C2, theme); + ADD_PALETTE(BASIC::W154, 0xFFEFECE0, theme); + ADD_PALETTE(BASIC::W161, 0xFF007BDA, theme); } -#undef ADD_PALETTE - void _ResourceManager::LoadDefaultPalette(void) { + String theme = L"default"; + ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::background, 0xFF000000, theme); + ADD_PALETTE(BASIC::B011, 0xFF080808, theme); + ADD_PALETTE(BASIC::B012, 0xFF080808, theme); + ADD_PALETTE(BASIC::B013, 0xFF000000, theme); + ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B015, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B016, 0xFF000000, theme); + ADD_PALETTE(BASIC::B017, 0xFF000000, theme); + ADD_PALETTE(BASIC::B018, 0xFF6590FF, theme); + ADD_PALETTE(BASIC::B0211, 0xFF080808, theme); + ADD_PALETTE(BASIC::B0211D, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0212, 0xFF1C1E28, theme); + ADD_PALETTE(BASIC::B0213, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0214, 0xFF222C47, theme); + ADD_PALETTE(BASIC::B0215, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0216, 0xFF222C47, theme); + ADD_PALETTE(BASIC::B0217, 0xFF11131B, theme); + ADD_PALETTE(BASIC::B0217D, 0x7F11131B, theme); + ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3, theme); + ADD_PALETTE(BASIC::B0221L2, 0xFF697082, theme); + ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E, theme); + ADD_PALETTE(BASIC::B0221L4, 0xFF525252, theme); + ADD_PALETTE(BASIC::B0222, 0xFF080808, theme); + ADD_PALETTE(BASIC::B0223, 0x00000000, theme); + ADD_PALETTE(BASIC::B0224, 0xFF27282B, theme); + ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme); + ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme); + ADD_PALETTE(BASIC::B0227, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme); + ADD_PALETTE(BASIC::B0232, 0x00000000, theme); + ADD_PALETTE(BASIC::B0233, 0x00000000, theme); + ADD_PALETTE(BASIC::B031, 0x00000000, theme); + ADD_PALETTE(BASIC::B041, 0xFF213163, theme); + ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B042, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B043, 0x00001BEA, theme); + ADD_PALETTE(BASIC::B044, 0xFF162758, theme); + ADD_PALETTE(BASIC::B0511, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B0512, 0x00000000, theme); + ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0514, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0514P1, 0xFF162758, theme); + ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9, theme); + ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme); + ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E, theme); + ADD_PALETTE(BASIC::B0515L2, 0x7F454442, theme); + ADD_PALETTE(BASIC::B0516, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0518, 0xFF2E4468, theme); + ADD_PALETTE(BASIC::B0518P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme); + ADD_PALETTE(BASIC::B0520, 0xFF2E4468, theme); + ADD_PALETTE(BASIC::B0520P, 0xFF3C649B, theme); + ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L2P, 0x005787B8, theme); + ADD_PALETTE(BASIC::B052L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA, theme); + ADD_PALETTE(BASIC::B052L10, 0x00000000, theme); + ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF, theme); + ADD_PALETTE(BASIC::B0532, 0x00000000, theme); + ADD_PALETTE(BASIC::B0533, 0x00000000, theme); + ADD_PALETTE(BASIC::B0534, 0x00000000, theme); + ADD_PALETTE(BASIC::B0535, 0x00000000, theme); + ADD_PALETTE(BASIC::B0536, 0x00000000, theme); + ADD_PALETTE(BASIC::B0537, 0x00000000, theme); + ADD_PALETTE(BASIC::B0541, 0xFF6B728A, theme); + ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96, theme); + ADD_PALETTE(BASIC::B0541D, 0x996B728A, theme); + ADD_PALETTE(BASIC::B0542, 0x00000000, theme); + ADD_PALETTE(BASIC::B0542P, 0x00000000, theme); + ADD_PALETTE(BASIC::B0543, 0x00000000, theme); + ADD_PALETTE(BASIC::B0544, 0x00000000, theme); + ADD_PALETTE(BASIC::B0545, 0x00000000, theme); + ADD_PALETTE(BASIC::B0551, 0x00000000, theme); + ADD_PALETTE(BASIC::B0552, 0x00000000, theme); + ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5, theme); + ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::B0555, 0x00000000, theme); + ADD_PALETTE(BASIC::B0556, 0x00000000, theme); + ADD_PALETTE(BASIC::B0557, 0x00000000, theme); + ADD_PALETTE(BASIC::B0558, 0x00000000, theme); + ADD_PALETTE(BASIC::B061L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B061L2, 0xFF49577B, theme); + ADD_PALETTE(BASIC::B061L3, 0xFF969A9C, theme); + ADD_PALETTE(BASIC::B061L4, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme); + ADD_PALETTE(BASIC::B061L6, 0xFF333537, theme); + ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B0622L1, 0x001D263C, theme); + ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme); + ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0623L2, 0xFF626675, theme); + ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C, theme); + ADD_PALETTE(BASIC::B0624L2, 0xFF626675, theme); + ADD_PALETTE(BASIC::B0624L3, 0xFF313F66, theme); + ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme); + ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF, theme); + ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF, theme); + ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::B063L7, 0xFF656565, theme); + ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme); + ADD_PALETTE(BASIC::B063L8D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B064L1, 0xFF6890FF, theme); + ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7, theme); + ADD_PALETTE(BASIC::B064L3, 0xFF000000, theme); + ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B064L3D, 0x7F000000, theme); + ADD_PALETTE(BASIC::B065L1, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L2, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme); + ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE, theme); + ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE, theme); + ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::B065L5, 0x00000000, theme); + ADD_PALETTE(BASIC::B071, 0xFF393B41, theme); + ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0722, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B0723, 0xFF212428, theme); + ADD_PALETTE(BASIC::B0724, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0725, 0xFF4F66A7, theme); + ADD_PALETTE(BASIC::B0726, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme); + ADD_PALETTE(BASIC::B0742, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::B0743, 0xFF212428, theme); + ADD_PALETTE(BASIC::B0744, 0xFF404040, theme); + ADD_PALETTE(BASIC::B0745, 0x00000000, theme); + ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme); + ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA, theme); + ADD_PALETTE(BASIC::F011L2, 0xFF6890FF, theme); + ADD_PALETTE(BASIC::F011L2D, 0x996890FF, theme); + ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L3D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L4D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF, theme); + ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L7D, 0x996E6F76, theme); + ADD_PALETTE(BASIC::F011L8, 0xFFD10000, theme); + ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme); + ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme); + ADD_PALETTE(BASIC::F011L13, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L14, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L15, 0xFFD10000, theme); + ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme); + ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme); + ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L20, 0x00000000, theme); + ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76, theme); + ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme); + ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77, theme); + ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF, theme); + ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F031L2, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme); + ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme); + ADD_PALETTE(BASIC::F041i, 0xFF5D6176, theme); + ADD_PALETTE(BASIC::F041iD, 0x995D6176, theme); + ADD_PALETTE(BASIC::F051, 0xFF485D93, theme); + ADD_PALETTE(BASIC::F052, 0xFF3A72FF, theme); + ADD_PALETTE(BASIC::F053, 0xFF485D93, theme); + ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::F053D, 0x99485D93, theme); + ADD_PALETTE(BASIC::F054, 0xFF202432, theme); + ADD_PALETTE(BASIC::F055, 0xFF3A72FF, theme); + ADD_PALETTE(BASIC::W011, 0xFF4B4D56, theme); + ADD_PALETTE(BASIC::W011D, 0x994B4D56, theme); + ADD_PALETTE(BASIC::W012, 0xFF095FD4, theme); + ADD_PALETTE(BASIC::W012D, 0x99095FD4, theme); + ADD_PALETTE(BASIC::W012P, 0xFF232F91, theme); + ADD_PALETTE(BASIC::W013, 0x00000000, theme); + ADD_PALETTE(BASIC::W0141, 0xFFDB0000, theme); + ADD_PALETTE(BASIC::W0141P, 0xFFA10808, theme); + ADD_PALETTE(BASIC::W0141D, 0x99DB0000, theme); + ADD_PALETTE(BASIC::W015, 0xFF343432, theme); + ADD_PALETTE(BASIC::W021L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::W021L1P, 0xFF213163, theme); + ADD_PALETTE(BASIC::W021L2, 0xFF425790, theme); + ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L3, 0xFF425790, theme); + ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0, theme); + ADD_PALETTE(BASIC::W031L1, 0xFF000000, theme); + ADD_PALETTE(BASIC::W031L1D, 0x99000000, theme); + ADD_PALETTE(BASIC::W031L2, 0xFF000000, theme); + ADD_PALETTE(BASIC::W031L2D, 0x99000000, theme); + ADD_PALETTE(BASIC::W032, 0xFF5D6176, theme); + ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W032D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W041, 0xFFE1DDD1, theme); + ADD_PALETTE(BASIC::W051, 0xFF000000, theme); + ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W062L1, 0xFF555861, theme); + ADD_PALETTE(BASIC::W062L1D, 0x99555861, theme); + ADD_PALETTE(BASIC::W062L2, 0xFF415BFE, theme); + ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE, theme); + ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2, theme); + ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2, theme); + ADD_PALETTE(BASIC::W062L4, 0xFF3677C3, theme); + ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3, theme); + ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3, theme); + ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE, theme); + ADD_PALETTE(BASIC::W0632, 0xFF4C5158, theme); + ADD_PALETTE(BASIC::W0641, 0xFF6B6D79, theme); + ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC, theme); + ADD_PALETTE(BASIC::W0641D, 0x996B6D79, theme); + ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A, theme); + ADD_PALETTE(BASIC::W0711, 0xFF525767, theme); + ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0711D, 0xFF3E414E, theme); + ADD_PALETTE(BASIC::W0712, 0xFF4267A9, theme); + ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0714, 0xFF263E5F, theme); + ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme); + ADD_PALETTE(BASIC::W0811, 0xFF253296, theme); + ADD_PALETTE(BASIC::W0812, 0x00000000, theme); + ADD_PALETTE(BASIC::W0813, 0xFF595959, theme); + ADD_PALETTE(BASIC::W082, 0x00000000, theme); + ADD_PALETTE(BASIC::W083, 0x00000000, theme); + ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme); + ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W085, 0x00000000, theme); + ADD_PALETTE(BASIC::W091, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W092, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W101, 0xFF4884D6, theme); + ADD_PALETTE(BASIC::W111, 0xFFC8CEDB, theme); + ADD_PALETTE(BASIC::W112L1, 0xFF8995AE, theme); + ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W1123, 0x4C000000, theme); + ADD_PALETTE(BASIC::W1211, 0x00000000, theme); + ADD_PALETTE(BASIC::W1212, 0x00000000, theme); + ADD_PALETTE(BASIC::W1221, 0xFF000000, theme); + ADD_PALETTE(BASIC::W1222, 0xFF878580, theme); + ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF, theme); + ADD_PALETTE(BASIC::W131, 0xFF343739, theme); + ADD_PALETTE(BASIC::W132, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W141, 0xFFFAFAFA, theme); + ADD_PALETTE(BASIC::W151, 0x66000000, theme); + ADD_PALETTE(BASIC::W152, 0xFF42434B, theme); + ADD_PALETTE(BASIC::W153, 0xFF2B3AAF, theme); + ADD_PALETTE(BASIC::W154, 0xFF1C1E28, theme); + ADD_PALETTE(BASIC::W161, 0xFF001BEA, theme); } +#undef ADD_PALETTE + void _ResourceManager::LoadPaletteInformation(const Tizen::Base::String& systemTheme) { @@ -1946,7 +2415,7 @@ _ResourceManager::LoadPaletteInformation(const Tizen::Base::String& systemTheme) } else if (systemTheme == L"default") { - LoadBlackPalette(); + LoadDefaultPalette(); } else { diff --git a/src/ui/FUi_SystemUtilImpl.cpp b/src/ui/FUi_SystemUtilImpl.cpp index 8945ee1..aabaf20 100644 --- a/src/ui/FUi_SystemUtilImpl.cpp +++ b/src/ui/FUi_SystemUtilImpl.cpp @@ -219,10 +219,10 @@ _SystemUtilImpl::GenerateKeyEvent(Tizen::Ui::KeyEventType keyEvent, Tizen::Ui::_ result r = E_SUCCESS; Display* pDisplay = (Display*)ecore_x_display_get(); - SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDisplay is invalid. something wrong!"); + SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "pDisplay is invalid. something wrong!"); std::unique_ptr pDpy(XOpenDisplay(NULL)); - SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDpy is invalid. something wrong!"); + SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "pDpy is invalid. something wrong!"); int key = -1; @@ -273,10 +273,10 @@ _SystemUtilImpl::GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Grap result r = E_SUCCESS; Display* pDisplay = (Display*)ecore_x_display_get(); - SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDisplay is invalid. something wrong!"); + SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "pDisplay is invalid. something wrong!"); std::unique_ptr pDpy(XOpenDisplay(NULL)); - SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDpy is invalid. something wrong!"); + SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "pDpy is invalid. something wrong!"); int width = DisplayWidth(pDpy.get(), DefaultScreen(pDpy.get())); int height = DisplayHeight(pDpy.get(), DefaultScreen(pDpy.get())); diff --git a/src/ui/FUi_TouchEventInfoImpl.cpp b/src/ui/FUi_TouchEventInfoImpl.cpp index 39a2ca5..7e05492 100644 --- a/src/ui/FUi_TouchEventInfoImpl.cpp +++ b/src/ui/FUi_TouchEventInfoImpl.cpp @@ -39,7 +39,7 @@ _TouchEventInfoImpl::CreateInstanceN(TouchEventInfo* pPublic) ClearLastResult(); _TouchEventInfoImpl* pImpl = new (std::nothrow) _TouchEventInfoImpl(pPublic); - SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; } diff --git a/src/ui/FUi_TouchEventManagerImpl.cpp b/src/ui/FUi_TouchEventManagerImpl.cpp index 2af7616..89cf756 100644 --- a/src/ui/FUi_TouchEventManagerImpl.cpp +++ b/src/ui/FUi_TouchEventManagerImpl.cpp @@ -49,10 +49,10 @@ _TouchEventManagerImpl::GetTouchInfoListN(void) const SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred."); LinkedListT* pTouchEventInfoList = new (std::nothrow) LinkedListT; - SysTryReturn(NID_UI, pTouchEventInfoList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pTouchEventInfoList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); Tizen::Base::Collection::IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryCatch(NID_UI, pFingerInfoList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pFingerInfoList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for (int i = 0; i < pFingerInfoList->GetCount(); i++) { @@ -67,12 +67,13 @@ _TouchEventManagerImpl::GetTouchInfoListN(void) const if (pFingerInfo->GetStatus() == _TOUCH_PRESSED || pFingerInfo->GetStatus() == _TOUCH_MOVED || pFingerInfo->GetStatus() == _TOUCH_CANCELED) { TouchEventInfo* pTouchEventInfo = new (std::nothrow) TouchEventInfo; - SysTryCatch(NID_UI, pTouchEventInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pTouchEventInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _Control* pControl = pTouchManager->GetTouchControlSource(); if (pControl) { _ControlImpl* pImpl = static_cast<_ControlImpl*>(pControl->GetUserData()); + SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. "); _TouchStatus touchStatus = pFingerInfo->GetStatus(); if (pFingerInfo->GetStatus() != _TOUCH_CANCELED) diff --git a/src/ui/FUi_TouchFlickGestureDetector.cpp b/src/ui/FUi_TouchFlickGestureDetector.cpp index 7c46d4f..ff1638a 100644 --- a/src/ui/FUi_TouchFlickGestureDetector.cpp +++ b/src/ui/FUi_TouchFlickGestureDetector.cpp @@ -74,12 +74,12 @@ _TouchFlickGestureDetector::_TouchFlickGestureDetector(void) , __pFlickInfoList(null) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_FLICK); __pFlickInfoList = new (std::nothrow) ArrayListT<_FlickInfo*>; - SysTryReturnVoidResult(NID_UI, __pFlickInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pFlickInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return; } @@ -378,7 +378,7 @@ result _TouchFlickGestureDetector::OnTouchDown(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo) { result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo)); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); @@ -389,7 +389,7 @@ result _TouchFlickGestureDetector::OnTouchMove(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo) { result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo)); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); @@ -400,7 +400,7 @@ result _TouchFlickGestureDetector::OnTouchUp(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, _FlickInfo* pReturnFlick, bool& isFlicked) { result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo)); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); @@ -426,13 +426,15 @@ _TouchFlickGestureDetector::OnTouchUp(ArrayListT<_FlickInfo*>* pList, const _Fl bool _TouchFlickGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { + ClearVariables(); + if (touchinfo.GetPointId() != FIRST_POINT_ID) { return false; } _FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo; - SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pFlickInfo->time = touchinfo.GetTimeStamp(); pFlickInfo->x = touchinfo.GetCurrentPosition().x; @@ -465,7 +467,7 @@ _TouchFlickGestureDetector::OnTouchMoved(const _Control& source, const _TouchInf } _FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo; - SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pFlickInfo->time = touchinfo.GetTimeStamp(); pFlickInfo->x = touchinfo.GetCurrentPosition().x; @@ -495,7 +497,7 @@ _TouchFlickGestureDetector::OnTouchReleased(const _Control& source, const _Touch _FlickInfo returnedFlickInfo = {0, }; _FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo; - SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pFlickInfo->time = touchinfo.GetTimeStamp(); pFlickInfo->x = touchinfo.GetCurrentPosition().x; diff --git a/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp b/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp index 74411b4..cbb4740 100644 --- a/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp @@ -48,10 +48,10 @@ _TouchFlickGestureDetectorImpl::CreateInstanceN(TouchFlickGestureDetector* pPubl _TouchFlickGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchFlickGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchFlickGestureDetectorImpl* pImpl = new (std::nothrow) _TouchFlickGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; diff --git a/src/ui/FUi_TouchGestureDetector.cpp b/src/ui/FUi_TouchGestureDetector.cpp index 07a6739..7712241 100644 --- a/src/ui/FUi_TouchGestureDetector.cpp +++ b/src/ui/FUi_TouchGestureDetector.cpp @@ -70,16 +70,13 @@ _TouchGestureDetector::_TouchGestureDetector(void) ClearLastResult(); __pEventListenerList = new (std::nothrow) LinkedListT<_ITouchGestureEventListener*>; - SysTryReturnVoidResult(NID_UI, __pEventListenerList, - E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pEventListenerList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pWantToFailList = new (std::nothrow) LinkedListT<_TouchGestureDetector*>; - SysTryCatch(NID_UI, __pWantToFailList, , - E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pWantToFailList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pCurrentWantToFailList = new (std::nothrow) LinkedListT<_TouchGestureDetector*>; - SysTryCatch(NID_UI, __pCurrentWantToFailList, , - E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pCurrentWantToFailList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pDelegator = this; @@ -127,7 +124,7 @@ _TouchGestureDetector::AddGestureListener(const _ITouchGestureEventListener& lis { SysTryReturnResult(NID_UI, __pEventListenerList->Add(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] System error occurred."); + "System error occurred."); } return E_SUCCESS; @@ -143,7 +140,7 @@ _TouchGestureDetector::RemoveGestureListener(const _ITouchGestureEventListener& SysTryReturnResult(NID_UI, __pEventListenerList->Remove(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] System error occurred."); + "System error occurred."); return E_SUCCESS; } @@ -253,14 +250,14 @@ _TouchGestureDetector::ExistWaitingList(void) const result _TouchGestureDetector::StartOnFailureOf(const _TouchGestureDetector& gesture) { - SysTryReturnResult(NID_UI, IsPossibleToAddFailList(gesture), E_SYSTEM, "[E_SYSTEM] param gesture also waits you to fail."); + SysTryReturnResult(NID_UI, IsPossibleToAddFailList(gesture), E_SYSTEM, "param gesture also waits you to fail."); _TouchGestureDetector* pGesture = const_cast < _TouchGestureDetector* >(&gesture); bool exist = __pWantToFailList->Contains(pGesture); if (!exist) { SysTryReturnResult(NID_UI, __pWantToFailList->Add(pGesture) == E_SUCCESS, - E_SYSTEM, "[E_SYSTEM] System error occurred."); + E_SYSTEM, "System error occurred."); } return E_SUCCESS; @@ -509,7 +506,7 @@ _TouchGestureDetector::ProcessPublicListener(_TouchGestureDetector& gesture) } IEnumeratorT* pEnumerator = pPublicList->GetEnumeratorN(); - SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); while(pEnumerator->MoveNext() == E_SUCCESS) { @@ -729,7 +726,7 @@ _TouchGestureDetector::ProcessCoreListener(_TouchGestureDetector& gesture) } IEnumeratorT<_ITouchGestureEventListener*>* pEnumerator = pList->GetEnumeratorN(); - SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); while(pEnumerator->MoveNext() == E_SUCCESS) { diff --git a/src/ui/FUi_TouchGestureDetectorImpl.cpp b/src/ui/FUi_TouchGestureDetectorImpl.cpp index 2205742..9e03c3c 100644 --- a/src/ui/FUi_TouchGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchGestureDetectorImpl.cpp @@ -42,7 +42,7 @@ _TouchGestureDetectorImpl::_TouchGestureDetectorImpl(TouchGestureDetector* pPubl __pCoreGestureDetector = pCore; __pPublicGestureEventListenerList = new (std::nothrow) LinkedListT; - SysTryReturnVoidResult(NID_UI, __pPublicGestureEventListenerList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pPublicGestureEventListenerList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCore->SetUserData(this); pCore->SetDelegate(*this); @@ -57,10 +57,10 @@ _TouchGestureDetectorImpl::CreateInstanceN(TouchGestureDetector* pPublic) _TouchGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchGestureDetectorImpl* pImpl = new (std::nothrow) _TouchGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); ClearLastResult(); @@ -129,7 +129,7 @@ _TouchGestureDetectorImpl::AddGestureEventListener(ITouchGestureEventListener& l } result r = __pPublicGestureEventListenerList->Add(&listener); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); return E_SUCCESS; } @@ -138,7 +138,7 @@ result _TouchGestureDetectorImpl::RemoveGestureEventListener(ITouchGestureEventListener& listener) { result r = __pPublicGestureEventListenerList->Remove(&listener); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); return E_SUCCESS; } @@ -213,7 +213,7 @@ result _TouchGestureDetectorImpl::StartOnFailureOf(const TouchGestureDetector& gesture) { const _TouchGestureDetectorImpl* pImpl = GetInstance(gesture); - SysTryReturnResult(NID_UI, pImpl, E_INVALID_ARG, "[E_INVALID_ARG] This instance is invalid."); + SysTryReturnResult(NID_UI, pImpl, E_INVALID_ARG, "This instance is invalid."); result r = GetCore().StartOnFailureOf(pImpl->GetCore()); SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); @@ -234,7 +234,7 @@ _TouchGestureDetectorImpl::OnTouchPressed(const _Control& source, const _TouchIn TouchEventInfo publicTouchInfo; pEventArg = GetTouchEventArgN(*pControl, touchinfo); - SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); publicTouchInfo.Construct(*pEventArg); @@ -263,7 +263,7 @@ _TouchGestureDetectorImpl::OnTouchMoved(const _Control& source, const _TouchInfo TouchEventInfo publicTouchInfo; pEventArg = GetTouchEventArgN(*pControl, touchinfo); - SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); publicTouchInfo.Construct(*pEventArg); @@ -292,7 +292,7 @@ _TouchGestureDetectorImpl::OnTouchReleased(const _Control& source, const _TouchI TouchEventInfo publicTouchInfo; pEventArg = GetTouchEventArgN(*pControl, touchinfo); - SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); publicTouchInfo.Construct(*pEventArg); @@ -321,7 +321,7 @@ _TouchGestureDetectorImpl::OnTouchCanceled(const _Control& source, const _TouchI TouchEventInfo publicTouchInfo; pEventArg = GetTouchEventArgN(*pControl, touchinfo); - SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); publicTouchInfo.Construct(*pEventArg); @@ -346,7 +346,7 @@ _TouchGestureDetectorImpl::GetTouchEventArgN(const Control& source, const _Touch SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(source, touchInfo.GetTouchStatus()); - SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pEventArg->SetTouchPosition(touchInfo.GetPointId(), pTouchManager->GetStartPoint(touchInfo.GetPointId()).x, pTouchManager->GetStartPoint(touchInfo.GetPointId()).y, diff --git a/src/ui/FUi_TouchGestureTimerManager.cpp b/src/ui/FUi_TouchGestureTimerManager.cpp index 812603e..e22a27d 100644 --- a/src/ui/FUi_TouchGestureTimerManager.cpp +++ b/src/ui/FUi_TouchGestureTimerManager.cpp @@ -53,6 +53,7 @@ public: } __pManager->SetTimerState(false); _TouchLongPressGestureDetector* pLongPressGesture = null; + _TouchTapGestureDetector* pTapGesture = null; _TouchGestureDetector* pGestureDetector = __pManager->GetGestureDetector(); if (pGestureDetector) @@ -93,7 +94,7 @@ public: { case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: { - _TouchTapGestureDetector* pTapGesture = dynamic_cast<_TouchTapGestureDetector*>(pGestureDetector); + pTapGesture = dynamic_cast<_TouchTapGestureDetector*>(pGestureDetector); if (pTapGesture && pTapGesture->IsGestureStarted()) { @@ -151,6 +152,11 @@ public: { pLongPressGesture->ResetGestureTimerManager(); } + + if (pTapGesture) + { + pTapGesture->ResetGestureTimerManager(); + } } void SetTouchGestureTimerManager(_TouchGestureTimerManager* pManager) @@ -174,10 +180,10 @@ _TouchGestureTimerManager::_TouchGestureTimerManager(const _TouchGestureDetector __pGestureDetector = const_cast<_TouchGestureDetector*>(&gestureDetector); __pTimerListener = new (std::nothrow) _TouchGestureTimerListener(*this); - SysTryReturnVoidResult(NID_UI, __pTimerListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. "); + SysTryReturnVoidResult(NID_UI, __pTimerListener, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTimer = new (std::nothrow) Timer; - SysTryCatch(NID_UI, __pTimer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pTimer, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTimer->Construct(*__pTimerListener); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -244,10 +250,10 @@ _TouchGestureTimerManager::SetTimerExpiredState(bool expired) result _TouchGestureTimerManager::StartTimer(int time) { - SysTryReturnResult(NID_UI, __pTimer != null, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + SysTryReturnResult(NID_UI, __pTimer != null, E_SYSTEM, "System error occurred. "); result r = __pTimer->Start(time); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); __isTimerStarted = true; __isTimerExpired = false; @@ -265,7 +271,7 @@ result _TouchGestureTimerManager::CancelTimer(void) { result r = __pTimer->Cancel(); - SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); __isTimerStarted = false; __isTimerExpired = true; diff --git a/src/ui/FUi_TouchLongPressGestureDetector.cpp b/src/ui/FUi_TouchLongPressGestureDetector.cpp index 376b42b..43f6a1e 100644 --- a/src/ui/FUi_TouchLongPressGestureDetector.cpp +++ b/src/ui/FUi_TouchLongPressGestureDetector.cpp @@ -62,10 +62,10 @@ _TouchLongPressGestureDetector::_TouchLongPressGestureDetector(void) , __pLongPressInfoList(null) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pLongPressInfoList = new (std::nothrow) ArrayListT<_LongPressInfo*>; - SysTryReturnVoidResult(NID_UI, __pLongPressInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pLongPressInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); int __duration = static_cast(elm_config_longpress_timeout_get() * 1000); if (__duration == 0) @@ -76,7 +76,7 @@ _TouchLongPressGestureDetector::_TouchLongPressGestureDetector(void) for(int i=0; i < MAX_TOUCH_COUNT; i++) { _LongPressInfo* pLongPressInfo = new (std::nothrow) _LongPressInfo; - SysTryCatch(NID_UI, pLongPressInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pLongPressInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pLongPressInfo->__isPressed = false; pLongPressInfo->__isInBounds = false; @@ -139,7 +139,7 @@ _TouchLongPressGestureDetector::RemoveLongPressInfoList(void) result _TouchLongPressGestureDetector::SetDuration(int duration) { - SysTryReturnResult(NID_UI, duration > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, duration > 0, E_INVALID_ARG, "Argument is less than 0"); __duration = duration; return E_SUCCESS; @@ -154,7 +154,7 @@ _TouchLongPressGestureDetector::GetDuration(void) const result _TouchLongPressGestureDetector::SetMoveAllowance(int allowance) { - SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0"); __moveAllowance = allowance; return E_SUCCESS; @@ -163,7 +163,7 @@ _TouchLongPressGestureDetector::SetMoveAllowance(int allowance) result _TouchLongPressGestureDetector::SetMoveAllowance(float allowance) { - SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0"); __moveAllowance = allowance; return E_SUCCESS; @@ -184,7 +184,7 @@ _TouchLongPressGestureDetector::GetMoveAllowanceF(void) const result _TouchLongPressGestureDetector::SetTouchCount(int count) { - SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); __touchCount = count; __maxPointId = __touchCount-1; diff --git a/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp b/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp index 49fdc34..18133dc 100644 --- a/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp @@ -46,10 +46,10 @@ _TouchLongPressGestureDetectorImpl::CreateInstanceN(TouchLongPressGestureDetecto _TouchLongPressGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchLongPressGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchLongPressGestureDetectorImpl* pImpl = new (std::nothrow) _TouchLongPressGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; diff --git a/src/ui/FUi_TouchManager.cpp b/src/ui/FUi_TouchManager.cpp index 838cdf4..4638c53 100644 --- a/src/ui/FUi_TouchManager.cpp +++ b/src/ui/FUi_TouchManager.cpp @@ -210,7 +210,7 @@ _MultiFingerInfo::_MultiFingerInfo(void) , __pFingerInfoMap(null) { __pFingerInfoMap = new (std::nothrow) HashMapT; - SysTryReturnVoidResult(NID_UI, __pFingerInfoMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pFingerInfoMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); SysTryCatch(NID_UI, __pFingerInfoMap->Construct() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred."); return; @@ -267,7 +267,7 @@ _MultiFingerInfo::GeneratePointId(unsigned long deviceId) if (pFingerInfo == null) { pFingerInfo = new (std::nothrow) _FingerInfo; - SysTryReturn(NID_UI, pFingerInfo, INVALID_POINT_ID, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] GeneratePointId - Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfo, INVALID_POINT_ID, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pFingerInfo->SetDeviceId(deviceId); pFingerInfo->SetPointId(pointId); @@ -457,7 +457,7 @@ IListT<_FingerInfo*>* _MultiFingerInfo::GetMultiFingerListN(void) const { IListT<_FingerInfo*>* pFingerInfoMapList = __pFingerInfoMap->GetValuesN(); - SysTryReturn(NID_UI, pFingerInfoMapList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfoMapList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pFingerInfoMapList; } @@ -607,16 +607,21 @@ _TouchManager::_TouchManager(void) _UiEventManager* pEventManager = null; __pMultiFingerInfo = new (std::nothrow) _MultiFingerInfo; - SysTryReturnVoidResult(NID_UI, __pMultiFingerInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pMultiFingerInfo, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTouchEventListener = new (std::nothrow) _TouchEventListener; - SysTryCatch(NID_UI, __pTouchEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, __pTouchEventListener, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pEventManager = _UiEventManager::GetInstance(); SysTryCatch(NID_UI, pEventManager, , E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist."); r = pEventManager->AddTouchEventListener(*__pTouchEventListener); - SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; iGetAbsoluteBounds().x; - controlPos.y = pControl->GetAbsoluteBounds().y; + controlPos.x = pControl->GetAbsoluteBoundsF().x; + controlPos.y = pControl->GetAbsoluteBoundsF().y; screenPos.x += controlPos.x; screenPos.y += controlPos.y; @@ -786,7 +791,7 @@ _TouchManager::GetFocusedControlSource(void) const result _TouchManager::SendEvent(_Control* pControl, const _TouchInfo& touchInfo) { - SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] pControl is null."); + SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "pControl is null."); _UiTouchEvent event(pControl->GetHandle(), touchInfo, _UI_EVENT_ROUTE_DIRECT); @@ -797,7 +802,7 @@ _TouchManager::SendEvent(_Control* pControl, const _TouchInfo& touchInfo) } _UiEventManager* pEventManager = _UiEventManager::GetInstance(); - SysTryReturnResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist."); + SysTryReturnResult(NID_UI, pEventManager, E_SYSTEM, "_UiEventManager does not exist."); __isSendingDelayedEvent = false; result r = pEventManager->SendEvent(event); @@ -861,7 +866,7 @@ _TouchManager::SetTouchCanceled(_Control* pControl) pEventManager->SendEvent(event); IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); int count = pFingerInfoList->GetCount(); @@ -922,7 +927,7 @@ _TouchManager::SetTouchReleased(void) SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); int count = pFingerInfoList->GetCount(); @@ -971,11 +976,23 @@ _TouchManager::IsTouchAllowed(void) return __touchAllowed; } +void +_TouchManager::SetListenerOnly(int pointId, bool listenerOnly) +{ + __listenerOnly[pointId] = listenerOnly; +} + +bool +_TouchManager::IsListenerOnly(int pointId) const +{ + return __listenerOnly[pointId]; +} + bool _TouchManager::IsInTouchMoveAllowanceBounds(const _Control& source, const _TouchInfo& touchInfo) { IListT<_FingerInfo*>* pFingerInfoList = GetMultiFingerInfoListN(); - SysTryReturn(NID_UI, pFingerInfoList, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfoList, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); const int count = pFingerInfoList->GetCount(); @@ -998,7 +1015,7 @@ _TouchManager::IsInTouchMoveAllowanceBounds(const _Control& source, const _Touch } FloatPoint tmpPoint = GetStartPoint(touchInfo.GetPointId()); - Rectangle absBounds = source.GetAbsoluteBounds(); + FloatRectangle absBounds = source.GetAbsoluteBoundsF(); FloatPoint startPoint(tmpPoint.x - absBounds.x, tmpPoint.y - absBounds.y); FloatPoint currentPoint = touchInfo.GetCurrentPosition(); diff --git a/src/ui/FUi_TouchPanningGestureDetector.cpp b/src/ui/FUi_TouchPanningGestureDetector.cpp index 2709afe..9e97e01 100644 --- a/src/ui/FUi_TouchPanningGestureDetector.cpp +++ b/src/ui/FUi_TouchPanningGestureDetector.cpp @@ -51,10 +51,10 @@ _TouchPanningGestureDetector::_TouchPanningGestureDetector(void) , __pTimer(null) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pTimer = new (std::nothrow)Timer; - SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTimer->Construct(*this); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -76,7 +76,7 @@ _TouchPanningGestureDetector::~_TouchPanningGestureDetector(void) result _TouchPanningGestureDetector::SetTouchCount(int count) { - SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); __touchCount = count; __maxPointId = __touchCount-1; @@ -120,10 +120,10 @@ _TouchPanningGestureDetector::GetTouchInfoListN(const _Control* pControl) const SysTryReturn(NID_UI, pTouchManager != null, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); LinkedListT<_TouchInfo*>* pReturnList = new (std::nothrow) LinkedListT<_TouchInfo*>; - SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for (int i = 0; i < pFingerInfoList->GetCount(); i++) { @@ -138,7 +138,7 @@ _TouchPanningGestureDetector::GetTouchInfoListN(const _Control* pControl) const if (pFingerInfo->GetStatus() != _TOUCH_FOCUS_OUT) { _TouchInfo* pTouchInfo = new (std::nothrow) _TouchInfo; - SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.\n"); + SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); Point point(pFingerInfo->GetScreenPoint().x - controlPos.x, pFingerInfo->GetScreenPoint().y - controlPos.y); pTouchInfo->SetTouchInfo(pFingerInfo->GetPointId(), pFingerInfo->GetStatus(), point, false, 0); diff --git a/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp b/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp index b59f519..5f0a813 100644 --- a/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp @@ -49,10 +49,10 @@ _TouchPanningGestureDetectorImpl::CreateInstanceN(TouchPanningGestureDetector* p _TouchPanningGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchPanningGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchPanningGestureDetectorImpl* pImpl = new (std::nothrow) _TouchPanningGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; @@ -104,11 +104,11 @@ IList* _TouchPanningGestureDetectorImpl::GetTouchInfoListN(void) const { IListT<_TouchInfo*>* pTouchInfoList = GetCore().GetTouchInfoListN(GetCore().GetControl()); - SysTryReturn(NID_UI, pTouchInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pTouchInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); IEnumeratorT<_TouchInfo*>* pEnumerator = null; LinkedList* pReturnList = new (std::nothrow) LinkedList; - SysTryCatch(NID_UI, pReturnList,, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for (int i = 0; i < pTouchInfoList->GetCount(); i++) { @@ -121,7 +121,7 @@ _TouchPanningGestureDetectorImpl::GetTouchInfoListN(void) const } TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo; - SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (pFingerInfo->GetTouchStatus() == _TOUCH_PRESSED ||pFingerInfo->GetTouchStatus() == _TOUCH_MOVED ) { diff --git a/src/ui/FUi_TouchPinchGestureDetector.cpp b/src/ui/FUi_TouchPinchGestureDetector.cpp index 98c5361..c90c3c2 100644 --- a/src/ui/FUi_TouchPinchGestureDetector.cpp +++ b/src/ui/FUi_TouchPinchGestureDetector.cpp @@ -38,7 +38,6 @@ using namespace Tizen::Base::Runtime; namespace { -const int DEFAULT_TOUCH_COUNT = 2; const int POLLING_PINCH = 16; const int PINCH_THRESHOLD = 10; } @@ -54,10 +53,10 @@ _TouchPinchGestureDetector::_TouchPinchGestureDetector(void) , __scale(0) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pTimer = new (std::nothrow)Timer; - SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTimer->Construct(*this); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -206,7 +205,7 @@ _TouchPinchGestureDetector::MeasureArea(void) SysTryReturn(NID_UI, pTouchManager != null, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); - SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); //SysLog(NID_UI, "GetCount = %d, minX = %d, minY = %d, maxX = %d, maxY = %d", pFingerInfoList->GetCount(), __MinimumPoint.x, __MinimumPoint.y, __MaximumPoint.x, __MaximumPoint.y); @@ -228,6 +227,22 @@ _TouchPinchGestureDetector::MeasureArea(void) continue; } + _Control* pTouchedControl = GetControl(); + if (pTouchedControl) + { + FloatPoint startPoint = pFingerInfo->GetStartPoint(); + FloatRectangle absBounds = pTouchedControl->GetAbsoluteBoundsF(); + + if (startPoint.x < absBounds.x || startPoint.x > absBounds.x+absBounds.width) + { + continue; + } + if (startPoint.y < absBounds.y || startPoint.y > absBounds.y+absBounds.height) + { + continue; + } + } + //SysLog(NID_UI, "pointId = %d, x = %d, y = %d", pFingerInfo->GetPointId(), pFingerInfo->GetPoint().x, pFingerInfo->GetPoint().y); Tizen::Graphics::FloatPoint point = pFingerInfo->GetPoint(); diff --git a/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp b/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp index 2e3e2e1..8513135 100644 --- a/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp @@ -48,10 +48,10 @@ _TouchPinchGestureDetectorImpl::CreateInstanceN(TouchPinchGestureDetector* pPubl _TouchPinchGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchPinchGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchPinchGestureDetectorImpl* pImpl = new (std::nothrow) _TouchPinchGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; diff --git a/src/ui/FUi_TouchRotationGestureDetector.cpp b/src/ui/FUi_TouchRotationGestureDetector.cpp index b06425f..bbedaed 100644 --- a/src/ui/FUi_TouchRotationGestureDetector.cpp +++ b/src/ui/FUi_TouchRotationGestureDetector.cpp @@ -39,18 +39,12 @@ using namespace Tizen::Base::Utility; namespace { const float PI = 3.14159265; -const float RAD_90DEGREE = PI / 2; -const float RAD_180DEGREE = PI; -const float RAD_270DEGREE = RAD_90DEGREE * 3; -const float RAD_360DEGREE = RAD_180DEGREE * 2; -const int DEFAULT_TOUCH_COUNT = 2; const int MIN_ANGLE = 15; const float DEGREE_360 = 360.0; const int DEGREE_180 = 180; const int DEGREE_90 = 90; const float MIN_MOVEALLOWANCE = 20; const int POLLING_ROTATION = 16; -const unsigned int SECOND_POINT_ID = 1; } namespace Tizen { namespace Ui @@ -70,10 +64,10 @@ _TouchRotationGestureDetector::_TouchRotationGestureDetector(void) , __secondPointId(INVALID_POINT_ID) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pTimer = new (std::nothrow) Timer; - SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTimer->Construct(*this); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp b/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp index b6ab6ff..9b4fcb8 100644 --- a/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp @@ -47,10 +47,10 @@ _TouchRotationGestureDetectorImpl::CreateInstanceN(TouchRotationGestureDetector* _TouchRotationGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchRotationGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchRotationGestureDetectorImpl* pImpl = new (std::nothrow) _TouchRotationGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; diff --git a/src/ui/FUi_TouchTapGestureDetector.cpp b/src/ui/FUi_TouchTapGestureDetector.cpp index 9fae3ac..3f1a6b7 100644 --- a/src/ui/FUi_TouchTapGestureDetector.cpp +++ b/src/ui/FUi_TouchTapGestureDetector.cpp @@ -44,8 +44,6 @@ const int DEFAULT_TAP_COUNT = 2; const int DEFAULT_MOVE_ALLOWANCE = 10; const int DEFAULT_TOUCH_COUNT = 1; const int MAX_TOUCH_COUNT = 10; -const int INIT_TAP_COUNT = 1; -const int INVALID_POINT_ID = 9999; } namespace Tizen { namespace Ui @@ -56,35 +54,38 @@ class _TouchTapGestureDetector::_TapInfo public: bool __isPressed; int __tappedCount; + float __tapMoveAllowance; + bool __tapIsInBounds; + FloatPoint __tapStartPoint; }; _TouchTapGestureDetector::_TouchTapGestureDetector(void) : __tapCount(DEFAULT_TAP_COUNT) , __interval(DEFAULT_INTERNAL) , __touchCount(DEFAULT_TOUCH_COUNT) - , __oneTapMoveAllowance(DEFAULT_MOVE_ALLOWANCE) - , __oneTapIsInBounds(true) , __maxPointId(DEFAULT_TOUCH_COUNT-1) - , __oneTapStartPoint(0, 0) , __pGestureTimerManager(null) , __pTapInfoList(null) + , __touchCanceled(false) + , __deleteTimer(true) { result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r)); - - __pGestureTimerManager = new (std::nothrow) _TouchGestureTimerManager(*this); - SysTryReturnVoidResult(NID_UI, __pGestureTimerManager, E_SYSTEM, "[E_SYSTEM] System error occurred.."); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __pTapInfoList = new (std::nothrow) ArrayListT<_TapInfo*>; - SysTryReturnVoidResult(NID_UI, __pTapInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI, __pTapInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for(int i=0; i < MAX_TOUCH_COUNT; i++) { _TapInfo* pTapInfo = new (std::nothrow) _TapInfo; - SysTryCatch(NID_UI, pTapInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pTapInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pTapInfo->__isPressed = false; pTapInfo->__tappedCount = 0; + pTapInfo->__tapMoveAllowance = DEFAULT_MOVE_ALLOWANCE; + pTapInfo->__tapIsInBounds = false; + pTapInfo->__tapStartPoint.x = 0; + pTapInfo->__tapStartPoint.y = 0; __pTapInfoList->Add(pTapInfo); } @@ -93,12 +94,6 @@ _TouchTapGestureDetector::_TouchTapGestureDetector(void) return; CATCH: - if (__pGestureTimerManager) - { - delete __pGestureTimerManager; - __pGestureTimerManager = null; - } - if (__pTapInfoList) { RemoveTapInfoList(); @@ -115,8 +110,18 @@ _TouchTapGestureDetector::~_TouchTapGestureDetector(void) delete __pTapInfoList; __pTapInfoList = null; - delete __pGestureTimerManager; - __pGestureTimerManager = null; + if (__pGestureTimerManager) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } } void @@ -142,7 +147,7 @@ _TouchTapGestureDetector::RemoveTapInfoList(void) result _TouchTapGestureDetector::SetTapCount(int count) { - SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); __tapCount = count; return E_SUCCESS; @@ -157,7 +162,7 @@ _TouchTapGestureDetector::GetTapCount(void) const result _TouchTapGestureDetector::SetTapInterval(long intarval) { - SysTryReturnResult(NID_UI, intarval > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, intarval > 0, E_INVALID_ARG, "Argument is less than 0"); __interval = intarval; return E_SUCCESS; @@ -172,7 +177,7 @@ _TouchTapGestureDetector::GetTapInterval(void) const result _TouchTapGestureDetector::SetTouchCount(int count) { - SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); __touchCount = count; __maxPointId = __touchCount - 1; @@ -197,10 +202,20 @@ _TouchTapGestureDetector::GetTouchCount(void) const result _TouchTapGestureDetector::SetMoveAllowance(int allowance) { - SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); + SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "Argument is less than 0"); SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "[E_INVALID_CONDITION] move allowance applies only for default(1) touch count."); - __oneTapMoveAllowance = allowance; + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + pTapInfo->__tapMoveAllowance = allowance; + } return E_SUCCESS; } @@ -208,16 +223,26 @@ _TouchTapGestureDetector::SetMoveAllowance(int allowance) int _TouchTapGestureDetector::GetMoveAllowance(void) const { - return __oneTapMoveAllowance; + return GetMoveAllowanceF(); } result _TouchTapGestureDetector::SetMoveAllowance(float allowance) { - SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0"); - SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "[E_INVALID_CONDITION] move allowance applies only for default(1) touch count."); + SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "Argument is less than 0"); + SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "move allowance applies only for default(1) touch count."); - __oneTapMoveAllowance = allowance; + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + pTapInfo->__tapMoveAllowance = allowance; + } return E_SUCCESS; } @@ -225,13 +250,33 @@ _TouchTapGestureDetector::SetMoveAllowance(float allowance) float _TouchTapGestureDetector::GetMoveAllowanceF(void) const { - return __oneTapMoveAllowance; + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(0, pTapInfo); + + return pTapInfo->__tapMoveAllowance; } bool _TouchTapGestureDetector::IsInBounds(void) { - return __oneTapIsInBounds; + bool isInBounds = true; + + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + if (pTapInfo->__isPressed) + { + if (pTapInfo->__tapIsInBounds == false) + { + isInBounds = false; + break; + } + } + } + return isInBounds; } bool @@ -273,29 +318,9 @@ _TouchTapGestureDetector::OnTouchPressed(const _Control& source, const _TouchInf __pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo); SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); - if (__touchCount == DEFAULT_TOUCH_COUNT) - { - if (pTapInfo->__tappedCount == 0) - { - __oneTapStartPoint.x = touchinfo.GetCurrentPosition().x; - __oneTapStartPoint.y = touchinfo.GetCurrentPosition().y; - } - - if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance - || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance) - { - __oneTapIsInBounds = false; - } - else - { - __oneTapIsInBounds = true; - } - } - else - { - __oneTapIsInBounds = true; - } - + pTapInfo->__tapStartPoint.x = touchinfo.GetCurrentPosition().x; + pTapInfo->__tapStartPoint.y = touchinfo.GetCurrentPosition().y; + pTapInfo->__tapIsInBounds = true; pTapInfo->__isPressed = true; SysTryReturn(NID_UI, __pTapInfoList->SetAt(pTapInfo, touchinfo.GetPointId()) == E_SUCCESS, @@ -325,7 +350,10 @@ _TouchTapGestureDetector::OnTouchPressed(const _Control& source, const _TouchInf SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); SetGestureStart(true); - if (__pGestureTimerManager->IsTimerStarted() == false) + __pGestureTimerManager = new (std::nothrow) _TouchGestureTimerManager(*this); + SysTryReturn(NID_UI, __pGestureTimerManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerStarted() == false) { _Control* pControl = GetControl(); if (!pControl) @@ -351,16 +379,25 @@ _TouchTapGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& return false; } - if (__touchCount == DEFAULT_TOUCH_COUNT) + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo); + SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + if (Math::Abs(touchinfo.GetCurrentPosition().x - pTapInfo->__tapStartPoint.x) > pTapInfo->__tapMoveAllowance + || Math::Abs(touchinfo.GetCurrentPosition().y - pTapInfo->__tapStartPoint.y) > pTapInfo->__tapMoveAllowance) { - if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance - || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance) + pTapInfo->__tapIsInBounds = false; + + if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerStarted() == false) { - __oneTapIsInBounds = false; - __pGestureTimerManager->CancelTimer(); - SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); - ClearTapInfoList(); + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + __touchCanceled = true; + } } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearTapInfoList(); } return false; @@ -384,13 +421,24 @@ _TouchTapGestureDetector::OnTouchReleased(const _Control& source, const _TouchIn SysTryReturn(NID_UI, __pTapInfoList->SetAt(pTapInfo, touchinfo.GetPointId()) == E_SUCCESS, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); - if (__touchCount == DEFAULT_TOUCH_COUNT) + if (Math::Abs(touchinfo.GetCurrentPosition().x - pTapInfo->__tapStartPoint.x) > pTapInfo->__tapMoveAllowance + || Math::Abs(touchinfo.GetCurrentPosition().y - pTapInfo->__tapStartPoint.y) > pTapInfo->__tapMoveAllowance) { - if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance - || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance) + if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) { - __oneTapIsInBounds = false; + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearTapInfoList(); + return false; } } @@ -398,7 +446,18 @@ _TouchTapGestureDetector::OnTouchReleased(const _Control& source, const _TouchIn { if (IsAllTapped() && IsInBounds()) { - __pGestureTimerManager->CancelTimer(); + if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); ClearTapInfoList(); } @@ -407,9 +466,17 @@ _TouchTapGestureDetector::OnTouchReleased(const _Control& source, const _TouchIn { if (!IsAllTapped() && !IsGestureStarted()) { - if (!__pGestureTimerManager->IsTimerExpired()) + if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) { - __pGestureTimerManager->CancelTimer(); + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; } SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); ClearTapInfoList(); @@ -424,15 +491,52 @@ _TouchTapGestureDetector::OnTouchCanceled(const _Control& source, const _TouchIn { ClearTapInfoList(); - if (__pGestureTimerManager->IsTimerExpired() == false) + if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerExpired() == false) { __pGestureTimerManager->CancelTimer(); + + if (__deleteTimer) + { + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } + else + { + __touchCanceled = true; + } } return false; } void +_TouchTapGestureDetector::ResetGestureTimerManager(void) +{ + if (__pGestureTimerManager) + { + delete __pGestureTimerManager; + __pGestureTimerManager = null; + } + __touchCanceled = false; + __deleteTimer = true; +} + +bool +_TouchTapGestureDetector::IsTouchCanceled(void) const +{ + return __touchCanceled; +} + + +void +_TouchTapGestureDetector::EnableToDeleteTimer(bool deleteTimer) +{ + __deleteTimer = deleteTimer; +} + +void _TouchTapGestureDetector::ClearTapInfoList(void) { for(int i=0; i < MAX_TOUCH_COUNT; i++) diff --git a/src/ui/FUi_TouchTapGestureDetectorImpl.cpp b/src/ui/FUi_TouchTapGestureDetectorImpl.cpp index fc41da9..04a5e4c 100644 --- a/src/ui/FUi_TouchTapGestureDetectorImpl.cpp +++ b/src/ui/FUi_TouchTapGestureDetectorImpl.cpp @@ -44,10 +44,10 @@ _TouchTapGestureDetectorImpl::CreateInstanceN(TouchTapGestureDetector* pPublic) _TouchTapGestureDetector* pCore = null; pCore = new (std::nothrow) _TouchTapGestureDetector; - SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TouchTapGestureDetectorImpl* pImpl = new (std::nothrow) _TouchTapGestureDetectorImpl(pPublic, pCore); - SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pImpl; diff --git a/src/ui/FUi_UiBuilder.cpp b/src/ui/FUi_UiBuilder.cpp index 7c79eee..d52ff0a 100644 --- a/src/ui/FUi_UiBuilder.cpp +++ b/src/ui/FUi_UiBuilder.cpp @@ -62,7 +62,10 @@ _UiBuilder::~_UiBuilder(void) for (int i = 0; i < controlCount; i++) { __pUiBuilderControlList->GetAt(i, pUiBuilderControl); - delete pUiBuilderControl; + if (pUiBuilderControl) + { + delete pUiBuilderControl; + } } __pUiBuilderControlList->RemoveAll(); delete __pUiBuilderControlList; @@ -344,17 +347,9 @@ _UiBuilder::Parse(void) { r = MakeUI(pUiBuilderControl); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[UiBuilder] Failed to create control %ls", pUiBuilderControl->GetType().GetPointer()); - delete pUiBuilderControl; } } - if (__pUiBuilderControlList) - { - __pUiBuilderControlList->RemoveAll(); - delete __pUiBuilderControlList; - __pUiBuilderControlList = null; - } - if (__pTransform) { delete __pTransform; diff --git a/src/ui/FUi_UiBuilderControlMaker.cpp b/src/ui/FUi_UiBuilderControlMaker.cpp index c75ad92..1e3f645 100644 --- a/src/ui/FUi_UiBuilderControlMaker.cpp +++ b/src/ui/FUi_UiBuilderControlMaker.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -33,6 +34,10 @@ #include "FUi_UiBuilderControlMaker.h" #include "FUi_UiBuilder.h" #include "FUi_LayoutLayoutMaker.h" +#include "FUi_Window.h" +#include "FUi_ControlManager.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" using namespace Tizen::Base; using namespace Tizen::Ui; @@ -46,7 +51,7 @@ _UiBuilderControlMaker::_UiBuilderControlMaker(_UiBuilder* pUibuilder) : __pLayoutMaker(new(std::nothrow)_LayoutMaker(pUibuilder)) , __pUiBuilder(pUibuilder) { - SysTryReturnVoidResult(NID_UI, __pLayoutMaker != null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnVoidResult(NID_UI, __pLayoutMaker != null, E_OUT_OF_MEMORY, "Memory allocation failed."); } _UiBuilderControlMaker::_UiBuilderControlMaker(void) : __pUiBuilder(null) @@ -303,6 +308,26 @@ _UiBuilderControlMaker::GetProperty(_UiBuilderControl* pControl, _UiBuilderContr app_device_orientation_e deviceOrientation = app_get_device_orientation(); bool isHorizontal = (deviceOrientation == APP_DEVICE_ORIENTATION_90) || (deviceOrientation == APP_DEVICE_ORIENTATION_270); + if (deviceOrientation == APP_DEVICE_ORIENTATION_0) + { + unsigned long rotationState = 0; + int ret = sf_check_rotation(&rotationState); + int device_rotation = 0; + if (rotationState == ROTATION_UNKNOWN) + { + _Window* pCurrentFrame = _ControlManager::GetInstance()->GetCurrentFrame(); + if (pCurrentFrame) + { + _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + device_rotation = pEcoreEvas->GetWindowRotation(*pCurrentFrame); + } + } + } + isHorizontal = (device_rotation == 90 ) || (device_rotation == 270); + } + if (isHorizontal && autoRotateLock == true) { __pUiBuilder->SetUiBuilderRotateState(UIBUIDER_SCREEN_HORIZONTAL); diff --git a/src/ui/FUi_UiEventManager.cpp b/src/ui/FUi_UiEventManager.cpp index 70ab006..b4973bf 100644 --- a/src/ui/FUi_UiEventManager.cpp +++ b/src/ui/FUi_UiEventManager.cpp @@ -271,7 +271,12 @@ _UiEventManager::AddEventListener(_UiEventType eventType, _UiListenerType listen { result r = E_SUCCESS; - SysTryReturn(NID_UI, !IsListenerRegistered(eventType, listenerType, listener), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + if (IsListenerRegistered(eventType, listenerType, listener)) + { + SysLog(NID_UI, "[E_SYSTEM] System error occurred."); + SetLastResult(E_SYSTEM); + return E_SYSTEM; + } LinkedListT <_IUiEventListener*>* pEventListeners = GetEventListeners(eventType, listenerType); if (pEventListeners) @@ -447,7 +452,10 @@ result _UiEventManager::ProcessEvent(const _UiEvent& event, bool& isFiltered) { result r = E_SUCCESS; - _ResourceManager::GetInstance()->AcquireFeedback(); + if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY) + { + _ResourceManager::GetInstance()->AcquireFeedback(); + } switch (event.GetRouteType()) { case _UI_EVENT_ROUTE_TUNNEL_BUBBLE: @@ -494,7 +502,10 @@ _UiEventManager::ProcessEvent(const _UiEvent& event, bool& isFiltered) default: break; } - _ResourceManager::GetInstance()->ReleaseFeedback(); + if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY) + { + _ResourceManager::GetInstance()->ReleaseFeedback(); + } return r; } @@ -706,10 +717,18 @@ _UiEventManager::GetTarget(int x, int y) const } void +_UiEventManager::ClearEventQueue(void) +{ + SysLog(NID_UI, "ClearTouchEventQueue"); + + __pEventManager->ClearEventQueue(); +} + +void _UiEventManager::RemoveAllEventListenerList(Tizen::Base::Collection::HashMapT<_UiEventType, Tizen::Base::Collection::LinkedListT<_IUiEventListener*>*>* pMap) { Tizen::Base::Collection::IMapEnumeratorT<_UiEventType, Tizen::Base::Collection::LinkedListT<_IUiEventListener*>*>* pMapEnumerator = pMap->GetMapEnumeratorN(); - SysTryReturnVoidResult(NID_UI, pMapEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pMapEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); while (pMapEnumerator->MoveNext() == E_SUCCESS) { @@ -731,63 +750,63 @@ _UiEventManager::_UiEventManager(void) : __pEventManager(new (std::nothrow) _EflUiEventManager) { unique_ptr*> > pEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>); - SysTryReturnVoidResult(NID_UI, pEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pEventListenerMap->Construct(); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // Touch LinkedListT<_IUiEventListener*>* pTouchEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pTouchEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pTouchEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pEventListenerMap->Add(_UI_EVENT_TOUCH, pTouchEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // Key LinkedListT<_IUiEventListener*>* pKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pEventListenerMap->Add(_UI_EVENT_KEY, pKeyEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // Focus LinkedListT<_IUiEventListener*>* pFocusEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pFocusEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pFocusEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pEventListenerMap->Add(_UI_EVENT_FOCUS, pFocusEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // Notification LinkedListT <_IUiEventListener*>* pNotificationEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pNotificationEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pNotificationEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pEventListenerMap->Add(_UI_EVENT_NOTIFICAITON, pNotificationEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // post unique_ptr*> > pPostEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>); - SysTryReturnVoidResult(NID_UI, pPostEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pPostEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPostEventListenerMap->Construct(); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // Key LinkedListT<_IUiEventListener*>* pPostKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pPostKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pPostKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPostEventListenerMap->Add(_UI_EVENT_KEY, pPostKeyEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // target post unique_ptr*> > pTargetPostEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>); - SysTryReturnVoidResult(NID_UI, pTargetPostEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pTargetPostEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTargetPostEventListenerMap->Construct(); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); // target Key LinkedListT<_IUiEventListener*>* pTargetPostKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>; - SysTryReturnVoidResult(NID_UI, pTargetPostKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pTargetPostKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTargetPostEventListenerMap->Add(_UI_EVENT_KEY, pTargetPostKeyEventListeners); SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/FUi_UiFocusEvent.cpp b/src/ui/FUi_UiFocusEvent.cpp index 479743d..1bb799b 100644 --- a/src/ui/FUi_UiFocusEvent.cpp +++ b/src/ui/FUi_UiFocusEvent.cpp @@ -112,7 +112,7 @@ _UiFocusEvent::IsEventEnabled(const _Control& control) const { return _UiEvent::IsEventEnabled(control); } - + return true; } diff --git a/src/ui/FUi_UiKeyEvent.cpp b/src/ui/FUi_UiKeyEvent.cpp index 4dfbe01..b3d206a 100644 --- a/src/ui/FUi_UiKeyEvent.cpp +++ b/src/ui/FUi_UiKeyEvent.cpp @@ -236,12 +236,20 @@ _UiKeyEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) case KEY_PRESSED: { isFiltered = pKeyEventPreviewer->OnPreviewKeyPressed(*pTarget, __keyInfo); + if (isFiltered == true) + { + SysLog(NID_UI, "[PreviewEvent] KEY_PRESSED Consumed : target = 0x%x", pTarget); + } } break; case KEY_RELEASED: { isFiltered = pKeyEventPreviewer->OnPreviewKeyReleased(*pTarget, __keyInfo); + if (isFiltered == true) + { + SysLog(NID_UI, "[PreviewEvent] KEY_RELEASED Consumed : target = 0x%x", pTarget); + } } break; @@ -293,10 +301,18 @@ _UiKeyEvent::FireListener(const _IKeyEventListener* pListener, bool& isFiltered) { case KEY_PRESSED: isFiltered = pKeyEventListener->OnKeyPressed(*pTarget, __keyInfo); + if (isFiltered == true) + { + SysLog(NID_UI, "[Event] KEY_PRESSED Consumed : target = 0x%x", pTarget); + } break; case KEY_RELEASED: isFiltered = pKeyEventListener->OnKeyReleased(*pTarget, __keyInfo); + if (isFiltered == true) + { + SysLog(NID_UI, "[Event] KEY_RELEASED Consumed : target = 0x%x", pTarget); + } break; // 2.0 compatibility for key simulate diff --git a/src/ui/FUi_UiTouchEvent.cpp b/src/ui/FUi_UiTouchEvent.cpp index 0afef27..35b1056 100644 --- a/src/ui/FUi_UiTouchEvent.cpp +++ b/src/ui/FUi_UiTouchEvent.cpp @@ -34,6 +34,8 @@ #include "FUi_TouchEventArg.h" #include "FUi_ControlManager.h" #include "FUi_CoordinateSystemUtils.h" +#include "FUi_TouchFlickGestureDetector.h" +#include "FUi_TouchFlickGestureDetectorImpl.h" extern "C" { extern void _UiPrintControl(const Tizen::Ui::_Control& control, bool printChildren); @@ -52,24 +54,30 @@ _TouchInfo::_TouchInfo(void) , __currentPosition(0, 0) , __isFlicked(false) , __timeStamp(0) + , __zAxis(0) + , __buttons(_TOUCH_BUTTON_NONE) { } -_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp) +_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp, int zAxis, unsigned int buttons) : __pointId(pointId) , __touchStatus(status) , __isFlicked(isFlick) , __timeStamp(timeStamp) + , __zAxis(zAxis) + , __buttons(buttons) { __currentPosition = _CoordinateSystemUtils::ConvertToFloat(current); } -_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp) +_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp, int zAxis, unsigned int buttons) : __pointId(pointId) , __touchStatus(status) , __currentPosition(current) , __isFlicked(isFlick) , __timeStamp(timeStamp) + , __zAxis(zAxis) + , __buttons(buttons) { } @@ -79,6 +87,8 @@ _TouchInfo::_TouchInfo(const _TouchInfo& rhs) , __currentPosition(rhs.__currentPosition) , __isFlicked(rhs.__isFlicked) , __timeStamp(rhs.__timeStamp) + , __zAxis(rhs.__zAxis) + , __buttons(rhs.__buttons) { } @@ -92,6 +102,8 @@ _TouchInfo::operator =(const _TouchInfo& rhs) __currentPosition = rhs.__currentPosition; __isFlicked = rhs.__isFlicked; __timeStamp = rhs.__timeStamp; + __zAxis = rhs.__zAxis; + __buttons = rhs.__buttons; } return *this; @@ -131,144 +143,40 @@ _TouchInfo::GetTimeStamp(void) const return __timeStamp; } -void -_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp) -{ - __pointId = pointId; - __touchStatus = status; - __currentPosition = _CoordinateSystemUtils::ConvertToFloat(current); - __isFlicked = isFlick; - __timeStamp = timeStamp; -} - -void -_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp) -{ - __pointId = pointId; - __touchStatus = status; - __currentPosition = current; - __isFlicked = isFlick; - __timeStamp = timeStamp; -} - -_MouseInfo::_MouseInfo(void) - : __pointId(0) - , __touchStatus(_TOUCH_PRESSED) - , __currentPosition(0, 0) - , __zAxis(0) - , __buttons(0) - , __isFlicked(false) - , __timeStamp(0) -{ -} - -_MouseInfo::_MouseInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, const bool isFlick, long long timeStamp) - : __pointId(pointId) - , __touchStatus(status) - , __currentPosition(current) - , __zAxis(zAxis) - , __buttons(buttons) - , __isFlicked(isFlick) - , __timeStamp(timeStamp) -{ -} - -_MouseInfo::_MouseInfo(const _MouseInfo& rhs) - : __pointId(rhs.__pointId) - , __touchStatus(rhs.__touchStatus) - , __currentPosition(rhs.__currentPosition) - , __zAxis(rhs.__zAxis) - , __buttons(rhs.__buttons) - , __isFlicked(rhs.__isFlicked) - , __timeStamp(rhs.__timeStamp) -{ -} - -_MouseInfo& -_MouseInfo::operator =(const _MouseInfo& rhs) -{ - if (this != &rhs) - { - __pointId = rhs.__pointId; - __touchStatus = rhs.__touchStatus; - __currentPosition = rhs.__currentPosition; - __zAxis = rhs.__zAxis; - __buttons = rhs.__buttons; - __isFlicked = rhs.__isFlicked; - __timeStamp = rhs.__timeStamp; - } - - return *this; -} - -_MouseInfo::~_MouseInfo(void) -{ -} - -_TouchStatus -_MouseInfo::GetTouchStatus(void) const -{ - return __touchStatus; -} - -Tizen::Graphics::FloatPoint -_MouseInfo::GetCurrentPosition(void) const -{ - return __currentPosition; -} - -unsigned long -_MouseInfo::GetPointId(void) const -{ - return __pointId; -} - int -_MouseInfo::GetZAxis(void) const +_TouchInfo::GetZAxis(void) const { return __zAxis; } -int -_MouseInfo::GetButtons(void) const +unsigned int +_TouchInfo::GetButtons(void) const { return __buttons; } -bool -_MouseInfo::IsFlicked(void) const -{ - return __isFlicked; -} - -long long -_MouseInfo::GetTimeStamp(void) const -{ - return __timeStamp; -} - void -_MouseInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, int zAxis, int buttons, bool isFlick, long long timeStamp) +_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp, int zAxis, unsigned int buttons) { __pointId = pointId; __touchStatus = status; __currentPosition = _CoordinateSystemUtils::ConvertToFloat(current); - __zAxis = zAxis; - __buttons = buttons; __isFlicked = isFlick; __timeStamp = timeStamp; + __zAxis = zAxis; + __buttons = buttons; } void -_MouseInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, bool isFlick, long long timeStamp) +_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp, int zAxis, unsigned int buttons) { __pointId = pointId; __touchStatus = status; __currentPosition = current; - __zAxis = zAxis; - __buttons = buttons; __isFlicked = isFlick; __timeStamp = timeStamp; + __zAxis = zAxis; + __buttons = buttons; } _UiTouchEvent::_UiTouchEvent(const _UiObjectHandle& destination, const _TouchInfo& touchInfo, _UiEventRouteType routeType, const _UiObjectHandle& source) @@ -324,17 +232,19 @@ _UiTouchEvent::GetEventType(void) const bool _UiTouchEvent::IsEventEnabled(const _Control& control) const { + if (GetTouchInfo()->GetTouchStatus() == _TOUCH_CANCELED) + { + return true; + } + if (!_UiEvent::IsEventEnabled(control)) { return false; } - if (GetTouchInfo()->GetTouchStatus() != _TOUCH_CANCELED) + if (!control.IsInputEventEnabled()) { - if (!control.IsInputEventEnabled()) - { - return false; - } + return false; } return true; @@ -452,6 +362,7 @@ _UiTouchEvent::OnEventHandled(const _Control& control) result _UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered) { + bool isInputFiltered = isFiltered; _ITouchEventListener* pTouchEventListener = const_cast <_ITouchEventListener*>(pListener); SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); @@ -465,6 +376,8 @@ _UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Contro { SysLog(NID_UI, "pTarget == null, Call ResetTouchInfo."); _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); + pTouchManager->ResetTouchInfo(); return E_SUCCESS; @@ -481,7 +394,7 @@ _UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Contro if (pControl) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysAssert(pTouchManager != null) + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); point = GetRelativePoint(*pControl, pTouchInfo->GetCurrentPosition()); @@ -500,16 +413,51 @@ _UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Contro point = GetRelativePoint(*pTarget, pTouchInfo->GetCurrentPosition()); } - _TouchInfo touchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), point, false, pTouchInfo->GetTimeStamp()); + _TouchInfo touchInfo; + + _TouchFlickGestureDetector* pTouchFlickGestureDetector = dynamic_cast<_TouchFlickGestureDetector*>(pTouchEventListener); + _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = dynamic_cast<_TouchFlickGestureDetectorImpl*>(pTouchEventListener); + if (pTouchFlickGestureDetector || pTouchFlickGestureDetectorImpl) + { + _TouchInfo tempTouchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), pTouchInfo->GetCurrentPosition(), false, pTouchInfo->GetTimeStamp()); + touchInfo = tempTouchInfo; + } + else + { + _TouchInfo tempTouchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), point, false, pTouchInfo->GetTimeStamp()); + touchInfo = tempTouchInfo; + } switch (touchInfo.GetTouchStatus()) { case _TOUCH_PRESSED: isFiltered = pTouchEventListener->OnTouchPressed(*pTarget, touchInfo); + if (!isInputFiltered && isFiltered == true) + { + if (pControl) + { + SysLog(NID_UI, "[Event] TOUCH_PRESSED Consumed : control = 0x%x", pControl); + } + else + { + SysLog(NID_UI, "[Listener] TOUCH_PRESSED Consumed : listener = 0x%x", pTouchEventListener); + } + } break; case _TOUCH_RELEASED: isFiltered = pTouchEventListener->OnTouchReleased(*pTarget, touchInfo); + if (!isInputFiltered && isFiltered == true) + { + if (pControl) + { + SysLog(NID_UI, "[Event] TOUCH_RELEASED Consumed : control = 0x%x", pControl); + } + else + { + SysLog(NID_UI, "[Listener] TOUCH_RELEASED Consumed : listener = 0x%x", pTouchEventListener); + } + } break; case _TOUCH_MOVED: @@ -535,22 +483,23 @@ _UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Contro case _TOUCH_CANCELED: isFiltered = pTouchEventListener->OnTouchCanceled(*pTarget, touchInfo); + if (!isInputFiltered && isFiltered == true) + { + if (pControl) + { + SysLog(NID_UI, "[Event] TOUCH_CANCELED Consumed : control = 0x%x", pControl); + } + else + { + SysLog(NID_UI, "[Listener] TOUCH_CANCELED Consumed : listener = 0x%x", pTouchEventListener); + } + } break; default: r = E_SYSTEM; } - if (isFiltered) - { - if (pControl) - { - SysLog(NID_UI, "Event Consumed : isFiltered is True : pControl %x", pControl); - //_UiPrintControl(*pControl, false); - } - //SysLog(NID_UI, "Event Consumed : isFiltered is True : pTarget %x", pTarget); - } - return r; } @@ -620,6 +569,20 @@ _UiTouchEvent::FirePreviewListener(const _ITouchEventPreviewer* pListener, const else { isFiltered = true; + switch (touchInfo.GetTouchStatus()) + { + case _TOUCH_PRESSED: + SysLog(NID_UI, "[PreviewEvent] TOUCH_PRESSED Consumed : target = 0x%x", pTarget); + break; + case _TOUCH_RELEASED: + SysLog(NID_UI, "[PreviewEvent] TOUCH_RELEASED Consumed : target = 0x%x", pTarget); + break; + case _TOUCH_CANCELED: + SysLog(NID_UI, "[PreviewEvent] TOUCH_CANCELED Consumed : target = 0x%x", pTarget); + break; + default: + break; + } } return r; @@ -679,7 +642,7 @@ result _UiTouchEvent::ResetTouchInfo(const _Control* pControl, const _TouchInfo& touchInfo) { _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); if (pControl == null) { @@ -710,415 +673,4 @@ _UiTouchEvent::ExistGlobalGesture(void) return exist; } - -_UiMouseEvent::_UiMouseEvent(const _UiObjectHandle& destination, const _MouseInfo& mouseInfo, _UiEventRouteType routeType, const _UiObjectHandle& source) - : _UiEvent(destination, source, routeType) - , __mouseInfo(mouseInfo) - , __pForcedControlList(new (std::nothrow) LinkedListT<_Control*>) -{ -} - -_UiMouseEvent::~_UiMouseEvent(void) -{ -} - -_UiMouseEvent::_UiMouseEvent(const _UiMouseEvent& rhs) - : _UiEvent(rhs) - , __mouseInfo(rhs.__mouseInfo) - , __pForcedControlList(rhs.__pForcedControlList) -{ -} - -_UiMouseEvent& -_UiMouseEvent::operator =(const _UiMouseEvent& rhs) -{ - _UiEvent::operator =(rhs); - - if (this != &rhs) - { - __mouseInfo = rhs.__mouseInfo; - __pForcedControlList = rhs.__pForcedControlList; - } - - return *this; -} - -const _MouseInfo* -_UiMouseEvent::GetTouchInfo(void) const -{ - return &__mouseInfo; -} - -_UiMouseEvent* -_UiMouseEvent::CloneN(void) const -{ - return new (std::nothrow) _UiMouseEvent(*this); -} - -_UiEventType -_UiMouseEvent::GetEventType(void) const -{ - return _UI_EVENT_TOUCH; -} - -bool -_UiMouseEvent::IsEventEnabled(const _Control& control) const -{ - if (!_UiEvent::IsEventEnabled(control)) - { - return false; - } - - if (GetTouchInfo()->GetTouchStatus() != _TOUCH_CANCELED) - { - if (!control.IsInputEventEnabled()) - { - return false; - } - } - - return true; -} - -result -_UiMouseEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) -{ - result r = E_SUCCESS; - - const _MouseInfo* pMouseInfo = GetTouchInfo(); - SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - if ((!ExistGlobalGesture() || GetAccessibilityEvent()) && !isFiltered) - { - _ITouchEventPreviewer* pTouchEventPreviewer = control.GetPropagatedTouchEventListener(); - SysTryReturn(NID_UI, pTouchEventPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - r = FirePreviewListener(pTouchEventPreviewer, &control, isFiltered); - } - - return r; -} - -result -_UiMouseEvent::OnEventProcessing(const _Control& control, bool& isFiltered) -{ - result r = E_SUCCESS; - - bool doesControlExist = false; - - const _MouseInfo* pMouseInfo = GetTouchInfo(); - SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - if ((!ExistGlobalGesture() || GetAccessibilityEvent()) && !isFiltered) - { - ProcessGesture(control, isFiltered); - } - else if (isFiltered) - { - doesControlExist = __pForcedControlList->Contains(const_cast<_Control*>(&control)); - - if (doesControlExist) - { - bool isForcedFiltered = false; - ProcessGesture(control, isForcedFiltered); - - if (isForcedFiltered) - { - isFiltered = true; - } - } - } - - if (!ExistGlobalGesture() || GetAccessibilityEvent()) - { - if(!isFiltered || doesControlExist) - { - _ITouchEventListener* pTouchEventListener = control.GetPropagatedTouchEventListener(); - SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - r = FireListener(pTouchEventListener, &control, true, isFiltered); - } - } - - return r; -} - -result -_UiMouseEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) -{ - _ITouchEventListener* pTouchEventListener = dynamic_cast <_ITouchEventListener*>(const_cast <_IUiEventListener*>(&listener)); - SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - return FireListener(pTouchEventListener, null, true, isFiltered); -} - -result -_UiMouseEvent::OnEventHandled(const _Control& control) -{ - _Control* pTarget = const_cast<_Control*>(GetControl(GetDestination())); - SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - const _MouseInfo* pMouseInfo = GetTouchInfo(); - SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - result r = E_SUCCESS; - - switch (pMouseInfo->GetTouchStatus()) - { - case _TOUCH_PRESSED: - pTarget->GetPropagatedTouchEventListener()->OnTouchPressHandled(control); - break; - - case _TOUCH_MOVED: - pTarget->GetPropagatedTouchEventListener()->OnTouchMoveHandled(control); - break; - - case _TOUCH_RELEASED: - pTarget->GetPropagatedTouchEventListener()->OnTouchReleaseHandled(control); - break; - - case _TOUCH_CANCELED: - pTarget->GetPropagatedTouchEventListener()->OnTouchCancelHandled(control); - break; - - default: - r = E_SYSTEM; - break; - } - - return r; -} - -result -_UiMouseEvent::FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered) -{ - _ITouchEventListener* pTouchEventListener = const_cast <_ITouchEventListener*>(pListener); - SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - result r = E_SUCCESS; - - const _MouseInfo* pMouseInfo = GetTouchInfo(); - SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - const _Control* pTarget = GetControl(GetOriginalDestination()); - if (pTarget == null) - { - SysLog(NID_UI, "pTarget == null, Call ResetTouchInfo."); - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - pTouchManager->ResetTouchInfo(); - - return E_SUCCESS; -} - - if (ResetTouchInfo(pTarget, *pMouseInfo) == E_SUCCESS) - { - isFiltered = true; - return E_SYSTEM; - } - - FloatPoint point(0, 0); - - if (pControl) - { - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysAssert(pTouchManager != null) - - point = GetRelativePoint(*pControl, pMouseInfo->GetCurrentPosition()); - } - else - { - point = GetRelativePoint(*pTarget, pMouseInfo->GetCurrentPosition()); - } - - _MouseInfo mouseInfo(pMouseInfo->GetPointId(), pMouseInfo->GetTouchStatus(), point, pMouseInfo->GetZAxis(), pMouseInfo->GetButtons(), false, pMouseInfo->GetTimeStamp()); - - switch (mouseInfo.GetTouchStatus()) - { - case _TOUCH_PRESSED: - isFiltered = pTouchEventListener->OnMousePressed(*pTarget, mouseInfo); - break; - - case _TOUCH_RELEASED: - isFiltered = pTouchEventListener->OnMouseReleased(*pTarget, mouseInfo); - break; - - case _TOUCH_MOVED: - isFiltered = pTouchEventListener->OnMouseMoved(*pTarget, mouseInfo); - break; - - case _WHEEL_MOVED: - isFiltered = pTouchEventListener->OnMouseWheeled(*pTarget, mouseInfo); - break; - - default: - r = E_SYSTEM; - } - - if (isFiltered) - { - if (pControl) - { - SysLog(NID_UI, "Event Consumed : isFiltered is True : pControl %x", pControl); - //_UiPrintControl(*pControl, false); - } - SysLog(NID_UI, "Event Consumed : isFiltered is True : pTarget %x", pTarget); - } - - return r; -} - -result -_UiMouseEvent::FirePreviewListener(const _ITouchEventPreviewer* pListener, const _Control* pControl, bool& isFiltered) -{ - _ITouchEventPreviewer* pTouchEventPreviewer = const_cast <_ITouchEventPreviewer*>(pListener); - SysTryReturn(NID_UI, pTouchEventPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - result r = E_SUCCESS; - - const _MouseInfo* pMouseInfo = GetTouchInfo(); - SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - const _Control* pTarget = GetControl(GetDestination()); - - FloatPoint point = GetRelativePoint(*pControl, pMouseInfo->GetCurrentPosition()); - - if (!pControl->IsMultiTouchEnabled() && pMouseInfo->GetPointId() > 0) - { - isFiltered = false; - return E_SUCCESS; - } - - _MouseInfo mouseInfo(pMouseInfo->GetPointId(), pMouseInfo->GetTouchStatus(), point, pMouseInfo->GetZAxis(), pMouseInfo->GetButtons(), false, pMouseInfo->GetTimeStamp()); - - _UiTouchEventDelivery eventDelivery = _UI_TOUCH_EVENT_DELIVERY_NO; - - //condition 1) if target is not enabled multi touch, point id should be 0 - //2) target is enabled multi touch - switch (mouseInfo.GetTouchStatus()) - { - case _TOUCH_PRESSED: - eventDelivery = pTouchEventPreviewer->OnPreviewMousePressed(*pTarget, mouseInfo); - break; - - case _TOUCH_RELEASED: - eventDelivery = pTouchEventPreviewer->OnPreviewMouseReleased(*pTarget, mouseInfo); - break; - - case _TOUCH_MOVED: - eventDelivery = pTouchEventPreviewer->OnPreviewMouseMoved(*pTarget, mouseInfo); - break; - - case _WHEEL_MOVED: - eventDelivery = pTouchEventPreviewer->OnPreviewMouseWheeled(*pTarget, mouseInfo); - break; - - default: - r = E_SYSTEM; - break; - } - - if (eventDelivery != _UI_TOUCH_EVENT_DELIVERY_NO) - { - // isFiltered = (eventDelivery == _UI_TOUCH_EVENT_DELIVERY_FORCED_YES); - - // if (isFiltered) - if (eventDelivery == _UI_TOUCH_EVENT_DELIVERY_FORCED_YES) - { - __pForcedControlList->Add(const_cast<_Control*>(pControl)); - } - } - else - { - isFiltered = true; - } - - return r; -} - -result -_UiMouseEvent::ProcessGesture(const _Control& control, bool& isFiltered) -{ - if (control.IsSendingDelayedEvent()) - { - return E_SUCCESS; - } - - IListT<_TouchGestureDetector*>* pGestureList = control.GetGestureDetectorList(); - if (!pGestureList || (pGestureList && (pGestureList->GetCount() <= 0))) - { - return E_SUCCESS; - } - - IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); - SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - while (pEnumerator->MoveNext() == E_SUCCESS) - { - _TouchGestureDetector* pGestureDetector = null; - pEnumerator->GetCurrent(pGestureDetector); - - if (!pGestureDetector) - { - continue; - } - - _ITouchGestureDelegate* pDelegator = pGestureDetector->GetDelegate(); - if (pDelegator) - { - FireListener(pDelegator, &control, false, isFiltered); - } - } - - delete pEnumerator; - return E_SUCCESS; -} - -FloatPoint -_UiMouseEvent::GetRelativePoint(const _Control& control, const FloatPoint& point) const -{ - FloatPoint relativePoint(point); - FloatRectangle absRect = control.GetAbsoluteBoundsF(true); - - relativePoint.x -= absRect.x; - relativePoint.y -= absRect.y; - - return relativePoint; -} - -result -_UiMouseEvent::ResetTouchInfo(const _Control* pControl, const _MouseInfo& mouseInfo) -{ - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred. "); - - if (pControl == null) - { - if (mouseInfo.GetTouchStatus() == _TOUCH_RELEASED) - { - pTouchManager->ResetTouchInfo(); - } - - return E_SUCCESS; - } - - return E_INVALID_CONDITION; -} - -bool -_UiMouseEvent::ExistGlobalGesture(void) -{ - _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturn(NID_UI, pControlManager, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); - - bool exist = false; - - IListT<_TouchGestureDetector*>* pGestureList = pControlManager->GetGestureDetectorList(); - if (pGestureList && (pGestureList->GetCount() > 0)) - { - exist = true; - } - - return exist; -} - }} // Tizen::Ui diff --git a/src/ui/FUi_Window.cpp b/src/ui/FUi_Window.cpp index 636c02a..e1ae363 100644 --- a/src/ui/FUi_Window.cpp +++ b/src/ui/FUi_Window.cpp @@ -78,7 +78,7 @@ CATCH: _Window::~_Window(void) { - __destroying = true; + SetDestroying(true); Close(); SetOwner(null); @@ -116,7 +116,7 @@ _Window::~_Window(void) _IWindowDelegate& _Window::GetWindowDelegate(void) const { - if (__destroying) + if (IsDestroying()) { return const_cast<_Window&>(*this); } @@ -132,7 +132,7 @@ _Window::GetDescription(void) const String descriptionTemp(L""); descriptionTemp.Format(LOG_LEN_MAX, L"_Window: xid(0x%x) owner(0x%x) delegate(0x%x) activated(%d) destroying(%d) displayContext(0x%x)", - GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, __destroying, __pDisplayContext); + GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, IsDestroying(), __pDisplayContext); description.Append(descriptionTemp); @@ -372,7 +372,15 @@ _Window::CreateLayer(void) int rootWindowH = 0; ecore_x_window_size_get(ecore_x_window_root_get((Ecore_X_Window)ecore_evas_window_get(pLayer->GetEcoreEvas())), &rootWindowW, &rootWindowH); - pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH)); + if (IsOrientationRoot()) + { + pLayer->SetSize(FloatDimension((float)rootWindowW, (float)rootWindowH)); + } + else + { + pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH)); + } + pLayer->SetOpacity(0); __pRootVisualElement->SetName(L"Root"); @@ -380,11 +388,9 @@ _Window::CreateLayer(void) _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); if (pEcoreEvas) { - String osp(L"OSP_"); String appName = _AppInfo::GetAppExecutableName(); - osp.Append(appName); - pEcoreEvas->SetWindowName(*this, osp); + pEcoreEvas->SetWindowName(*this, appName); } return E_SUCCESS; @@ -672,6 +678,15 @@ _Window::OnWindowStateChanged(void) } __rotation = rotation; + if(__pLayer) + { + _EflLayer* pLayer = dynamic_cast<_EflLayer*>(__pLayer); + if (pLayer) + { + pLayer->SetOrientationChanged(__rotation); + } + } + // <1> int childCount = GetChildCount(); @@ -691,6 +706,33 @@ _Window::OnWindowStateChanged(void) pFormImpl->UpdateOrientation(); } +#if defined(PARTIAL_SCREEN) + Rectangle frameBounds = GetBounds(); + Rectangle frameClientBounds = GetClientBounds(); + Rectangle frameAbsoluteBounds = GetAbsoluteBounds(); + + SysLog(NID_UI, "[WM ROTATION]

[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)", + GetNativeHandle(), + frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height, + frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height, + frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height); + + int formCount = GetChildCount(); + for (int i = 0 ; i < formCount ; i++) + { + _Control* pForm = GetChild(i); + + Rectangle formBounds = pForm->GetBounds(); + Rectangle formClientBounds = pForm->GetClientBounds(); + Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds(); + + SysLog(NID_UI, "[WM ROTATION]

FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)", + formBounds.x, formBounds.y, formBounds.width, formBounds.height, + formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height, + formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height); + } +#endif + return; } } @@ -879,7 +921,6 @@ _Window::_Window() , __pOwner(null) , __pWindowDelegate(null) , __activated(false) - , __destroying(false) , __pRootVisualElement(null) , __pLayer(null) , __pDimmingLayer(null) @@ -918,7 +959,7 @@ _Window::Deactivate(void) { __activated = false; - if (__destroying == false) + if (IsDestroying() == false) { GetWindowDelegate().OnDeactivated(); } diff --git a/src/ui/FUi_WindowImpl.cpp b/src/ui/FUi_WindowImpl.cpp index 3e873a5..a3edec0 100644 --- a/src/ui/FUi_WindowImpl.cpp +++ b/src/ui/FUi_WindowImpl.cpp @@ -377,6 +377,8 @@ _WindowImpl::Destroy(void) { result r = E_SUCCESS; + SetDestroyingFlag(true); + Control* pOwner = GetOwner(); if (pOwner) { diff --git a/src/ui/animations/FUiAnimFloatAnimation.cpp b/src/ui/animations/FUiAnimFloatAnimation.cpp index b2c0d69..9f8e283 100644 --- a/src/ui/animations/FUiAnimFloatAnimation.cpp +++ b/src/ui/animations/FUiAnimFloatAnimation.cpp @@ -300,7 +300,7 @@ result FloatAnimation::GetKeyFrameAt(int index, long& time, float& value) const { SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationBaseImpl->keyFrameList.GetCount()), - E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + E_OUT_OF_RANGE, "Index (%d) is out of range.", index); result r = E_SUCCESS; Object* pObjValue = null; diff --git a/src/ui/animations/FUiAnimVisualElementSurface.cpp b/src/ui/animations/FUiAnimVisualElementSurface.cpp index 01d1e1b..ebbea18 100644 --- a/src/ui/animations/FUiAnimVisualElementSurface.cpp +++ b/src/ui/animations/FUiAnimVisualElementSurface.cpp @@ -80,9 +80,7 @@ VisualElementSurface::operator =(const VisualElementSurface& rhs) VisualElementSurface::~VisualElementSurface(void) { - CHECK_CONSTRUCTED; - - if (__pVisualElementSurfaceImpl->Release()) + if (__pVisualElementSurfaceImpl && __pVisualElementSurfaceImpl->Release()) { __pVisualElementSurfaceImpl = null; } diff --git a/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp b/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp index 7587fed..c9e1589 100644 --- a/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp +++ b/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp @@ -159,7 +159,7 @@ _ControlAnimatorImpl::Construct(const Control& source) __pControl = const_cast< Control* >(&source); __pActiveAnimationList = new (std::nothrow) ArrayListT< ActiveAnimation >(); - SysTryReturnResult(NID_UI_ANIM, __pActiveAnimationList != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_ANIM, __pActiveAnimationList != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pActiveAnimationList->Construct(); if (r != E_SUCCESS) @@ -171,6 +171,12 @@ _ControlAnimatorImpl::Construct(const Control& source) } __pControlImpl = _ControlImpl::GetInstance(*__pControl); + if (__pControlImpl == null) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] Failed to get _ControlImpl instance."); + Dispose(); + return E_SYSTEM; + } __pVisualElement = __pControlImpl->GetCore().GetVisualElement(); return E_SUCCESS; @@ -380,7 +386,7 @@ _ControlAnimatorImpl::SetAnimation(AnimationTargetType animTarget, AnimationBase FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); FloatRectangle modelBounds = __pVisualElement->GetBounds(); - __presentationBounds = presentationBounds; + __presentationBounds = modelBounds; float currentAnchorX = presentationBounds.width * anchorX; float currentAnchorY = presentationBounds.height * anchorY; @@ -391,8 +397,8 @@ _ControlAnimatorImpl::SetAnimation(AnimationTargetType animTarget, AnimationBase float endAnchorX = endWidth * anchorX; float endAnchorY = endHeight * anchorY; - float startX = presentationBounds.x + (currentAnchorX - startAnchorX); - float startY = presentationBounds.y + (currentAnchorY - startAnchorY); + float startX = modelBounds.x + (currentAnchorX - startAnchorX); + float startY = modelBounds.y + (currentAnchorY - startAnchorY); float endX = modelBounds.x + (currentAnchorX - endAnchorX); float endY = modelBounds.y + (currentAnchorY - endAnchorY); @@ -879,7 +885,8 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) ANIMATION_TARGET_POSITION, ANIMATION_TARGET_ALPHA }; - bool setLogicalBnds = false; + bool setLogicalPos = false; + bool setLogicalSize = false; bool setShowStateInternal = false; long delay = 0; long duration = 0; @@ -937,10 +944,21 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) else { if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_POSITION) || - pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE)) + pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE)) { - __logicalBoundsHolder = __pControl->GetBounds(); - setLogicalBnds = true; + Rectangle controlRect = __pControl->GetBounds(); + if(animTarget == ANIMATION_TARGET_POSITION) + { + setLogicalPos = true; + __logicalBoundsHolder.x = controlRect.x; + __logicalBoundsHolder.y = controlRect.y; + } + else if(animTarget == ANIMATION_TARGET_SIZE) + { + setLogicalSize = true; + __logicalBoundsHolder.width = controlRect.width; + __logicalBoundsHolder.height = controlRect.height; + } } else if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_ALPHA)) { @@ -996,7 +1014,8 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_SIZE)) { __logicalBoundsHolder = __pControl->GetBounds(); - setLogicalBnds = true; + setLogicalPos = true; + setLogicalSize = true; } if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_ALPHA) @@ -1059,7 +1078,7 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) } } - if (setLogicalBnds) + if (setLogicalPos || setLogicalSize) { bool disable = false; bool propagation = false; @@ -1071,7 +1090,21 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) r = DisableVisualElementPropagation(propagation); SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable visual element propagation."); } - r = __pControl->SetBounds(__logicalBoundsHolder); + if (setLogicalPos && setLogicalSize) + { + r = __pControl->SetBounds(__logicalBoundsHolder); + } + else + { + if (setLogicalPos) + { + r = __pControl->SetPosition(__logicalBoundsHolder.x, __logicalBoundsHolder.y); + } + else if(setLogicalSize) + { + r = __pControl->SetSize(__logicalBoundsHolder.width, __logicalBoundsHolder.height); + } + } if (propagation) { @@ -1110,9 +1143,6 @@ _ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); } - // for layout - __pControlImpl->SetBoundsAndUpdateLayout(__pControlImpl->GetBounds()); - pAnimationGroup->SetDuration(groupDuration); r = __pVisualElement->AddAnimation(animIdentifier, *pAnimationGroup); SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start group animation."); @@ -1722,9 +1752,6 @@ _ControlAnimatorImpl::StartCustomImplicitAnimation(ControlAnimatorTriggerType tr SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); } - // for layout - __pControlImpl->SetBoundsAndUpdateLayout(__pControlImpl->GetBounds()); - pAnimationGroup->SetDuration(groupDuration); __pVisualElement->AddAnimation(animIdentifier, *pAnimationGroup); @@ -2999,7 +3026,7 @@ _ControlAnimatorImpl::OnVisualElementAnimationFinished(const VisualElementAnimat if ((propName.IndexOf(VeSubPropBoundsPosition, startIndex, indexOf)) == E_SUCCESS) { - r = pPresentationImpl->SetProperty(VePropBounds, __pVisualElement->GetBounds()); + r = pPresentationImpl->SetProperty(VeSubPropBoundsPosition, FloatPoint(__pVisualElement->GetBounds().x, __pVisualElement->GetBounds().y)); } else if ((propName.IndexOf(VePropBounds, startIndex, indexOf)) == E_SUCCESS) { @@ -3050,6 +3077,11 @@ _ControlAnimatorImpl::OnVisualElementAnimationFinished(const VisualElementAnimat __isAnimationTargetAnimating[activeAnim.animTarget] = false; + if (GetActiveAnimationListCount() == 1) + { + __pControlImpl->GetCore().AdjustAbsoluteBounds(); + } + if ((animName.IndexOf(TRANSACTION, startIndex, indexOf)) != E_SUCCESS) { if (__pAnimStatusEventListener) @@ -3111,15 +3143,15 @@ _ControlAnimatorImpl::OnTickOccurred(const VisualElementAnimation& animation, co float diffX = 0.0f; float diffY = 0.0f; - if (!pAnimation->IsEndValueApplied() && (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION])) + if (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION]) { diffX = pPresentation->GetBounds().x + currentValue.ToFloatRectangle().x - __presentationBounds.x; diffY = pPresentation->GetBounds().y + currentValue.ToFloatRectangle().y - __presentationBounds.y; } else { - diffX = pPresentation->GetBounds().x; - diffY = pPresentation->GetBounds().y; + diffX = currentValue.ToFloatRectangle().x; + diffY = currentValue.ToFloatRectangle().y; } Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height)); @@ -3213,7 +3245,7 @@ _ControlAnimatorImpl::SetSize(float width, float height, int duration, Animation DisableImplicitAnimation(disable); } - SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds."); r = SetAnimationF(ANIMATION_TARGET_SIZE, ANIMATION_TRIGGER_SIZE_CHANGE, duration, animInterpolator, currentSize, newSize); SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -3301,7 +3333,7 @@ _ControlAnimatorImpl::SetPosition(float x, float y, int duration, AnimationInter DisableImplicitAnimation(disable); } - SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds."); r = SetAnimationF(ANIMATION_TARGET_POSITION, ANIMATION_TRIGGER_POSITION_CHANGE, duration, animInterpolator, currentPosition, newPosition); SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -3455,7 +3487,7 @@ _ControlAnimatorImpl::SetBounds(FloatRectangle bounds, int duration, AnimationIn DisableImplicitAnimation(disable); } - SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds."); r = SetAnimationF(ANIMATION_TARGET_POSITION, ANIMATION_TRIGGER_POSITION_CHANGE, duration, animInterpolator, currentPosition, newPosition); SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -3568,7 +3600,7 @@ _ControlAnimatorImpl::SetAnimationF(AnimationTargetType animTarget, ControlAnima FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); FloatRectangle modelBounds = __pVisualElement->GetBounds(); - __presentationBounds = presentationBounds; + __presentationBounds = modelBounds; float startX = presentationBounds.x; float startY = presentationBounds.y; diff --git a/src/ui/animations/FUiAnim_Debug.cpp b/src/ui/animations/FUiAnim_Debug.cpp index 27b68ee..1eef537 100644 --- a/src/ui/animations/FUiAnim_Debug.cpp +++ b/src/ui/animations/FUiAnim_Debug.cpp @@ -269,7 +269,7 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) evas_object_geometry_get(pEvasObject, &absolute.x, &absolute.y, &absolute.width, &absolute.height); FloatRectangle realBounds = pElement->__bounds; - _Window* pWindow = dynamic_cast< Tizen::Ui::_Window* >(static_cast< Tizen::Ui::_Window* >(pElement->GetUserData())); +// _Window* pWindow = dynamic_cast< Tizen::Ui::_Window* >(static_cast< Tizen::Ui::_Window* >(pElement->GetUserData())); // if (pWindow) // { // Rectangle windowRect = pWindow->GetBounds(); @@ -305,11 +305,11 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) if (name.GetLength() > 0) { - sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); } else { - sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); } // save the image file @@ -410,11 +410,11 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) if (name.GetLength() > 0) { - sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); } else { - sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); } // save the image file @@ -1390,7 +1390,7 @@ _VeDebug::DumpAllEvasImages(Evas *pEvas) if (pEvasObject) { - sprintf(filename, "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject); + snprintf(filename, sizeof(filename), "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject); VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE START %#08x]---------------------------", (unsigned int)pEvasObject); if (evas_object_image_save(pEvasObject, filename, NULL, "quality=100 compress=9")) @@ -1550,11 +1550,11 @@ _VeDebug::DumpVeImage(_VisualElementImpl* pElement, const char* pathPrefix) Tizen::Base::String name = pElement->GetName(); if (name.GetLength() > 0) { - sprintf(filename, "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); } else { - sprintf(filename, "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation()); + snprintf(filename, sizeof(filename), "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation()); } VisualElementSurface* pSurface = pElement->__pSharedData->pNativeNode->GetSurface(); diff --git a/src/ui/animations/FUiAnim_EflLayer.cpp b/src/ui/animations/FUiAnim_EflLayer.cpp index 82857be..1dbe25e 100644 --- a/src/ui/animations/FUiAnim_EflLayer.cpp +++ b/src/ui/animations/FUiAnim_EflLayer.cpp @@ -58,15 +58,15 @@ namespace Ecore_Idle_Enterer* __pOnIdleLoopIterator = null; -#ifdef USE_WORKAROUND +#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG) 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); + int orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas()); + PRINT("[%#x] OnRenderFlushPost size(%d,%d) orientation(%d)\n", (unsigned int)pData, w, h, orientation); } Eina_Bool @@ -80,12 +80,14 @@ OnXWindowDamaged(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) { - PRINT("[%#x] OnXWindowDamaged[%d,%d,%d,%d]------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h); + PRINT("[%#x | %#x] OnXWindowDamaged[%d,%d,%d,%d]\n", (unsigned int)pLayer, pEvent->win, pEvent->x, pEvent->y, pEvent->w, pEvent->h); } } return EINA_TRUE; } +#endif // USE_WORKAROUND || XWINDOW_DEBUG + Eina_Bool OnXWindowConfigured(void* pData, int type, void* pEventInfo) { @@ -97,18 +99,35 @@ OnXWindowConfigured(void* pData, int type, void* pEventInfo) if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) { - int w, h; + int w, h, rw, rh; + FloatRectangle bounds = pLayer->GetBounds(); + int orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas()); + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, orientation, null, null, &rw, &rh); + evas_output_size_get(pLayer->GetEvas(), &w, &h); - PRINT("[%#x] OnXWindowConfigured[%d,%d,%d,%d] evas(%d,%d)------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h); + if ( ((orientation % 180) == 0 && pEvent->w == (int)bounds.width && pEvent->h == (int)bounds.height) + || ((orientation % 180) == 90 && pEvent->h == (int)bounds.width && pEvent->w == (int)bounds.height) + || (ret && rw == pEvent->w && rh == pEvent->h) + ) + { + pLayer->SetConfigured(true); + evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, w, h); + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->AddWakeUpEvent(); + } + } + + PRINT("[%#x | %#x] OnXWindowConfigured[%d,%d,%d,%d] evas(%d,%d) layer(%.2f,%.2f,%.2f,%.2f)\n", (unsigned int)pLayer, pEvent->win, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h, bounds.x, bounds.y, bounds.width, bounds.height); } } return EINA_TRUE; } -#endif // USE_WORKAROUND - Eina_Bool OnXWindowHidden(void* pData, int type, void* pEventInfo) { @@ -123,7 +142,8 @@ OnXWindowHidden(void* pData, int type, void* pEventInfo) if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) { pLayer->SetMapped(false); - PRINT("[%#x | %#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData , pEvent->win); + pLayer->SetConfigured(false); + PRINT("[%#x | %#x] ############ Hidden -> EventDone()\n", (unsigned int)pData, pEvent->win); } return EINA_TRUE; @@ -144,15 +164,15 @@ OnXWindowShown(void* pData, int type, void* pEventInfo) { 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 | %#x] ############ Shown -> EventDone() \n" , (unsigned int)pData, pEvent->win); - _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); - if (pDisplayManager) - { - pDisplayManager->AddWakeUpEvent(); - } +// 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 | %#x] ############ Shown -> EventDone()\n", (unsigned int)pData, pEvent->win); +// _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); +// if (pDisplayManager) +// { +// pDisplayManager->AddWakeUpEvent(); +// } } return EINA_TRUE; @@ -270,6 +290,7 @@ _EflLayer::_EflLayer(void) , _isMainType(true) , _needRender(true) , _isMapped(false) + , _isConfigured(false) , _needForceManualRender(false) , _pOnWindowDamagedHandler(null) , _pOnWindowConfiguredHandler(null) @@ -278,6 +299,7 @@ _EflLayer::_EflLayer(void) , __isWinObject(true) , __bounds() , _pConfiguration(null) + , __orientation(0) { _countOfLayer++; _pConfiguration = _EflLayerConfiguration::GetInstance(); @@ -295,6 +317,7 @@ _EflLayer::_EflLayer(bool isMainType) , _isMainType(isMainType) , _needRender(true) , _isMapped(false) + , _isConfigured(false) , _needForceManualRender(false) , _pOnWindowDamagedHandler(null) , _pOnWindowConfiguredHandler(null) @@ -303,6 +326,7 @@ _EflLayer::_EflLayer(bool isMainType) , __isWinObject(true) , __bounds() , _pConfiguration(null) + , __orientation(0) { _countOfLayer++; _pConfiguration = _EflLayerConfiguration::GetInstance(); @@ -329,25 +353,25 @@ _EflLayer::~_EflLayer(void) } -#ifdef USE_WORKAROUND +#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG) if (_pOnWindowDamagedHandler) { ecore_event_handler_del(_pOnWindowDamagedHandler); _pOnWindowDamagedHandler = null; } - if (_pOnWindowConfiguredHandler) - { - ecore_event_handler_del(_pOnWindowConfiguredHandler); - _pOnWindowConfiguredHandler = null; - } - if (_pEvas) { evas_event_callback_del(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost); } -#endif // USE_WORKAROUND +#endif // USE_WORKAROUND || XWINDOW_DEBUG + + if (_pOnWindowConfiguredHandler) + { + ecore_event_handler_del(_pOnWindowConfiguredHandler); + _pOnWindowConfiguredHandler = null; + } if (_pOnWindowHideHandler) { @@ -451,20 +475,20 @@ _EflLayer::Initialize(Evas_Object* pWindow) // CHECK ME: Is this needed for GL mode? -#ifdef USE_WORKAROUND +#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG) if(_pOnWindowDamagedHandler == null) { _pOnWindowDamagedHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, OnXWindowDamaged, this); } + evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this); +#endif // USE_WORKAROUND || XWINDOW_DEBUG + if (_pOnWindowConfiguredHandler == null) { _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); @@ -500,10 +524,39 @@ CATCH: } result -_EflLayer::SetOrientationChanged(void) +_EflLayer::SetOrientationChanged(int orientation) { - _needForceManualRender = true; - PRINT("[%#x | %#x] Called SetOrientationChanged(%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), _needForceManualRender); + PRINT("[%#x | %#x] Bounds : (%lf, %lf) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas) , __bounds.width, __bounds.height); + if (__orientation == orientation) + return E_SUCCESS; + + if (!_isMapped) + { + _needForceManualRender = true; + _isConfigured = true; + } + PRINT("[%#x | %#x] Called SetOrientationChanged(%d->%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __orientation, orientation); + + bool isMiniApp = false; + isMiniApp = elm_win_floating_mode_get(_pWindow); + + if (__orientation % 180 != orientation % 180) + { + if(!isMiniApp) + { + PRINT("[%#x | %#x] Swap __bounds. (Not MiniApp) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas)); + float temp = __bounds.width; + __bounds.width = __bounds.height; + __bounds.height = temp; + } + else + { + PRINT("[%#x | %#x] Not Swap __bounds. (MiniApp)!!!!!!!!!!!!!!! \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas)); + } + } + PRINT("[%#x | %#x] Updated Bounds : (%lf, %lf) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas) , __bounds.width, __bounds.height); + + __orientation = orientation; return E_SUCCESS; } @@ -514,7 +567,6 @@ _EflLayer::Configure(_RootVisualElement& rootElement) if (pNode) { _pRootVisualElement = &rootElement; - return pNode->ReConstruct(*this); } @@ -524,19 +576,49 @@ _EflLayer::Configure(_RootVisualElement& rootElement) result _EflLayer::SetBounds(const FloatRectangle& bounds) { - // 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; + SetSize(FloatDimension(bounds.width, bounds.height)); + SetPosition(FloatPoint(bounds.x, bounds.y)); + + return E_SUCCESS; +} + +result +_EflLayer::SetPosition(const FloatPoint& point) +{ + evas_object_move(_pWindow, point.x, point.y); + PRINT("[%#x | %#x] evas_object_move(%f, %f) old (%f, %f)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), point.x, point.y, __bounds.x, __bounds.y); - __bounds = bounds; - evas_object_move(_pWindow, __bounds.x, __bounds.y); - evas_object_resize(_pWindow, __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); + __bounds.SetPosition(point); return E_SUCCESS; } +result +_EflLayer::SetSize(const FloatDimension& size) +{ + if((__bounds.width != size.width) || (__bounds.height != size.height)) + { + _isConfigured = false; + evas_object_resize(_pWindow, size.width, size.height); + PRINT("[%#x | %#x] evas_object_resize(%0.2f, %0.2f) old(%0.2f, %0.2f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), size.width, size.height, __bounds.width, __bounds.height); + } + else + { + PRINT("[%#x | %#x] !!!!!!!!!!!!! SKIP evas_object_resize(%0.2f, %0.2f) old(%0.2f, %0.2f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), size.width, size.height, __bounds.width, __bounds.height); + } + + __bounds.SetSize(size); + + return E_SUCCESS; +} + +void +_EflLayer::HasUpdatedWindowSize(const Tizen::Graphics::FloatDimension& size) +{ + _isConfigured = false; + __bounds.SetSize(size); +} + FloatRectangle _EflLayer::GetBounds(void) const { @@ -694,7 +776,6 @@ _EflLayer::Flush(void) _needShowStateChangeRequest = false; } - FloatRectangle rect = GetBounds(); if(!_needRender) { 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); @@ -703,40 +784,42 @@ _EflLayer::Flush(void) if(__isWinObject) { - if (_isMapped) + if (_isMapped && _isConfigured) { - PRINT("[%#x | %#x] ecore_evas_manual_render -- mapped (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement)); + //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 = true; + + // For restoring GL context _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)); + 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; + + // For restoring GL context _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)); + PRINT("[%#x | %#x] ecore_evas_manual_render -- unmapped(map:%d configure:%d) - not called(child:%d)\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas), _isMapped, _isConfigured, __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)); + 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; + + // For restoring GL context _DisplayManager::RestoreContext(); } } diff --git a/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp index 59aa675..ccc9805 100644 --- a/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp +++ b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp @@ -42,6 +42,10 @@ using namespace std; using namespace Tizen::Base; using namespace Tizen::Graphics; +#define EVAS_IMAGE_SIZE_LIMIT 32768 // !!warning 32768 is declared in the EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h) + + + namespace Tizen { namespace Ui { namespace Animations { @@ -79,6 +83,15 @@ _EflVisualElementSurfaceImpl::_EflVisualElementSurfaceImpl(const Handle layer, c int maxH = 0; evas_image_max_size_get(pLayer->GetEvas(), &maxW, &maxH); + if(maxW > EVAS_IMAGE_SIZE_LIMIT) + { + maxW = EVAS_IMAGE_SIZE_LIMIT; + } + if(maxH > EVAS_IMAGE_SIZE_LIMIT) + { + maxH = EVAS_IMAGE_SIZE_LIMIT; + } + SysTryCatch(NID_UI_ANIM, outputSize.width >= 0 && outputSize.height >= 0, , E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. size(%d,%d)", outputSize.width, outputSize.height); diff --git a/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp index eddea40..8ec500a 100644 --- a/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp +++ b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp @@ -302,7 +302,7 @@ _FrameAnimatorImpl::ChangeCurrentForm(Form* pCurrentForm, Form& nextForm) __pNextFormVisualElement = pControlImpl->GetCore().GetVisualElement(); // for Layout - pControlImpl->SetBoundsAndUpdateLayout(pControlImpl->GetBounds()); + pControlImpl->SetBoundsAndUpdateLayout(pControlImpl->GetBoundsF()); __veDefaultMatrix = __pCurrentFormVisualElement->GetTransformMatrix(); __veDefaultBounds = _VisualElementImpl::GetInstance(*__pCurrentFormVisualElement)->GetBoundingBox(); @@ -349,11 +349,45 @@ _FrameAnimatorImpl::ChangeCurrentForm(Form* pCurrentForm, Form& nextForm) } r = AnimationTransaction::Commit(); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to commit transaction."); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to commit transaction."); __frameAnimatorStatus = ANIMATOR_STATUS_PLAYING; return E_SUCCESS; } +float +_FrameAnimatorImpl::CalculateChangedAngle() +{ + float angle = 0.0f; + int diff = __pNextForm->GetOrientationStatus() - __pCurrentForm->GetOrientationStatus() ; + + switch(diff) + { + case 1: + case -1: + { + angle = 90.0f; + break; + } + case 2: + case -2: + { + angle = 180.0f; + break; + } + case 3: + case -3: + { + angle = 270.0f; + break; + } + } + + if(diff > 0) + { + angle *= -1; + } + return angle; +} result _FrameAnimatorImpl::SetAnimations(void) @@ -363,157 +397,286 @@ _FrameAnimatorImpl::SetAnimations(void) String transId = ""; transId.Append(__transactionId); + float angle = 0.0f; + switch (__animationEffectType) { case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT: { + angle = CalculateChangedAngle(); + Dimension currentSize = __pCurrentForm->GetSize(); Dimension nextSize = __pNextForm->GetSize(); Point currFormStartPoint = Point(0, 0); - Point currFormEndPoint = Point((-1 * (currentSize.width)), 0); + Point currFormEndPoint = Point((-1 * (nextSize.width)), 0); - Point nextFormStartPoint = Point((currentSize.width), 0); + Point nextFormStartPoint = Point((nextSize.width), 0); Point nextFormEndPoint = Point(0, 0); - if (currentSize.width > nextSize.width) + if (unlikely(angle != 0.0f)) { - currFormStartPoint = Point((-1 * (currentSize.width - nextSize.width)), 0); - nextFormStartPoint = Point((nextSize.width), 0); + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + currFormStartPoint = Point((currentSize.height - currentSize.width)/2,-(currentSize.height - currentSize.width)/2); + currFormEndPoint = Point((currentSize.height - currentSize.width)/2 -nextSize.width, -(currentSize.height - currentSize.width)/2); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2); + currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 -nextSize.width, (currentSize.width - currentSize.height)/2); + } } - r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT: { + angle = CalculateChangedAngle(); + Dimension currentSize = __pCurrentForm->GetSize(); Dimension nextSize = __pNextForm->GetSize(); Point currFormStartPoint = Point(0, 0); - Point currFormEndPoint = Point((nextSize.width), 0); + Point currFormEndPoint = Point(nextSize.width, 0); - Point nextFormStartPoint = Point((-1 * (nextSize.width)), 0); + Point nextFormStartPoint = Point(-1 * (nextSize.width), 0); Point nextFormEndPoint = Point(0, 0); - if (currentSize.width < nextSize.width) + if (unlikely(angle != 0.0f)) { - currFormStartPoint = Point((nextSize.width - currentSize.width), 0); - nextFormStartPoint = Point((-1 * (currentSize.width)), 0); + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + currFormStartPoint = Point((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2); + currFormEndPoint = Point((currentSize.height - currentSize.width)/2 + nextSize.width, -(currentSize.height - currentSize.width)/2); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2);// + currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 + nextSize.width, (currentSize.width - currentSize.height)/2); + } } - r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list"); + r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list"); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list"); + r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list"); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_FADE_IN_OUT: { + angle = CalculateChangedAngle(); + r = PrepareCapture(); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture."); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture."); + + Dimension currentSize = __pCurrentForm->GetSize(); + Dimension nextSize = __pNextForm->GetSize(); + + FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds(); + + if (unlikely(angle != 0.0f)) + { + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);// + } + __pCurrentCaptureVisualElement->SetBounds(tempBounds); + + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + pAnimation->SetPropertyName(L"transform.rotation.z"); + pAnimation->SetStartValue(Variant(angle)); + pAnimation->SetEndValue(Variant(angle)); + pAnimation->SetDuration(__duration); + pAnimation->SetEndValueApplied(false); + __pCurrentCaptureVisualElement->AddAnimation(L"transform", *pAnimation); + delete pAnimation; + } -// r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha")); -// SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); +// r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha"), angle); +// SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_IN: { + angle = CalculateChangedAngle(); + + r = PrepareCapture(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture."); + Dimension currentSize = __pCurrentForm->GetSize(); + Dimension nextSize = __pNextForm->GetSize(); + + FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds(); Dimension startSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100); Dimension endSize = currentSize; - r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + if (unlikely(angle != 0.0f)) + { + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);// + } + __pCurrentCaptureVisualElement->SetBounds(tempBounds); + } + + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_OUT: { + angle = CalculateChangedAngle(); + r = PrepareCapture(); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture."); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture."); Dimension currentSize = __pCurrentForm->GetSize(); + Dimension nextSize = __pNextForm->GetSize(); + + FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds(); Dimension startSize = currentSize; Dimension endSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100); - r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + if (unlikely(angle != 0.0f)) + { + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);// + } + __pCurrentCaptureVisualElement->SetBounds(tempBounds); + } + + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_IN: { + angle = CalculateChangedAngle(); + r = PrepareCapture(); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture."); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture."); Dimension currentSize = __pCurrentForm->GetSize(); + Dimension nextSize = __pNextForm->GetSize(); + + FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds(); Dimension currFormStartSize = currentSize; Dimension currFormEndSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100); Dimension nextFormStartSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100); Dimension nextFormEndSize = currentSize; - r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + if (unlikely(angle != 0.0f)) + { + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);// + } + __pCurrentCaptureVisualElement->SetBounds(tempBounds); + } + + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_OUT: { + angle = CalculateChangedAngle(); + + r = PrepareCapture(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture."); + Dimension currentSize = __pCurrentForm->GetSize(); + Dimension nextSize = __pNextForm->GetSize(); + + FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds(); Dimension currFormStartSize = currentSize; Dimension currFormEndSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100); Dimension nextFormStartSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100); Dimension nextFormEndSize = currentSize; - r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + if (unlikely(angle != 0.0f)) + { + if(unlikely(currentSize.width < nextSize.width)) // to goward. + { + tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height); + } + else if(unlikely(currentSize.width > nextSize.width)) // to backward. + { + tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);// + } + __pCurrentCaptureVisualElement->SetBounds(tempBounds); + } + + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize"), angle); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); - r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize")); - SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list."); + r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize"), 0.0f); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list."); } break; @@ -528,10 +691,20 @@ _FrameAnimatorImpl::SetAnimations(void) result _FrameAnimatorImpl::PrepareCapture(void) { + float bgsize = 0.0f; VisualElement* pParentVisualElement = __pNextFormVisualElement->GetParent(); SysTryReturnResult(NID_UI_ANIM, (pParentVisualElement), E_SYSTEM, "A system error has been occurred. Failed to get visual element's parent."); pParentVisualElement->InsertChild(*__pBgElement, __pNextFormVisualElement, true); + if(__pCurrentFormVisualElement->GetBounds().width > __pCurrentFormVisualElement->GetBounds().height) + { + bgsize = __pCurrentFormVisualElement->GetBounds().width; + } + else + { + bgsize = __pCurrentFormVisualElement->GetBounds().height; + } + __pBgElement->SetBounds(FloatRectangle(0.0f, 0.0f, bgsize, bgsize)); // remove dummy surface __pCurrentCaptureVisualElement->SetSurface(null); @@ -576,14 +749,15 @@ _FrameAnimatorImpl::PrepareCapture(void) return E_SUCCESS; } - result -_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName) +_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName, float angle) { result r = E_SUCCESS; Dimension startSize, endSize; Point startPoint, endPoint; + FloatRectangle tempBounds; + _VisualElementImpl* pImpl = null; VisualElementPropertyAnimation* propAnimation = null; propAnimation = new (std::nothrow) VisualElementPropertyAnimation(); @@ -620,7 +794,7 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy case ANIMATION_INTERPOLATOR_BEZIER: { pTimingFunction = new (std::nothrow) BezierTimingFunction(); - SysTryCatch(NID_UI_ANIM, (pTimingFunction), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to get TimingFunction."); + SysTryCatch(NID_UI_ANIM, (pTimingFunction), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); ((BezierTimingFunction*) pTimingFunction)->SetControlPoints(__firstBezierControlPointsTime, __firstBezierControlPointsValue, __secondBezierControlPointsTime, __secondBezierControlPointsValue); } @@ -668,15 +842,20 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy scaleY = (float) startSize.height / (float) rect.height; Tizen::Graphics::FloatMatrix4 startMatrix = Tizen::Graphics::FloatMatrix4(); - //startMatrix.SetAsIdentity(); // default value is identity matrix + Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4(); + + if(unlikely(angle != 0.0f)) // There is a defferece between currentform and nextform. + { + _MatrixUtilRotate(startMatrix, angle, 0.0f, 0.0f, 1.0f); + _MatrixUtilRotate(endMatrix, angle, 0.0f, 0.0f, 1.0f); + } + _MatrixUtilScale(startMatrix, scaleX, scaleY, scaleZ); _MatrixUtilAtAnchor(startMatrix, anchorX, anchorY, anchorZ); scaleX = (float) endSize.width / (float) rect.width; scaleY = (float) endSize.height / (float) rect.height; - Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4(); - //endMatrix.SetAsIdentity(); // default value is identity matrix _MatrixUtilScale(endMatrix, scaleX, scaleY, scaleZ); _MatrixUtilAtAnchor(endMatrix, anchorX, anchorY, anchorZ); @@ -687,6 +866,18 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy case ANIMATION_TARGET_POSITION: { + if(angle != 0.0f) + { + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + pAnimation->SetPropertyName(L"transform.rotation.z"); + pAnimation->SetStartValue(Variant(angle)); + pAnimation->SetEndValue(Variant(angle)); + pAnimation->SetDuration(__duration); + pAnimation->SetEndValueApplied(false); + pLayer->AddAnimation(L"transform", *pAnimation); + delete pAnimation; + } + pVePropType = VePropBounds; FloatRectangle rect; @@ -704,6 +895,17 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy case ANIMATION_TARGET_ALPHA: { + if(angle != 0.0f) + { + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + pAnimation->SetPropertyName(L"transform.rotation.z"); + pAnimation->SetStartValue(Variant(angle)); + pAnimation->SetEndValue(Variant(angle)); + pAnimation->SetDuration(__duration); + pAnimation->SetEndValueApplied(false); + pLayer->AddAnimation(L"transform", *pAnimation); + delete pAnimation; + } pVePropType = VePropOpacity; propAnimation->SetStartValue(startValue); propAnimation->SetEndValue(endValue); @@ -732,6 +934,9 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy SysTryCatch(NID_UI_ANIM, (pVePropType), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Animation property type is invalid."); propAnimation->SetPropertyName(pVePropType); + pImpl = _VisualElementImpl::GetInstance(*pLayer)->GetPresentation(); + r = pImpl->SetPropertyI(propAnimation->GetPropertyName(), propAnimation->GetStartValue()); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, r, "[E_SYSTEM] A system error has been occurred. Failed to set property to visual element."); r = pLayer->AddAnimation(animName, *propAnimation); SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, r, "[E_SYSTEM] A system error has been occurred. Failed to add animation to visual element."); @@ -884,6 +1089,10 @@ _FrameAnimatorImpl::OnAnimationTransactionStarted(int transactionId) void _FrameAnimatorImpl::OnAnimationTransactionStopped(int transactionId) { + __pNextFormVisualElement->SetTransformMatrix(__pNextFormVisualElement->GetTransformMatrix()); + __pNextFormVisualElement->SetBounds(__pNextFormVisualElement->GetBounds()); + __pNextFormVisualElement->SetOpacity(__pNextFormVisualElement->GetOpacity()); + OnFrameAnimationStopped(false); } diff --git a/src/ui/animations/FUiAnim_FrameAnimatorImpl.h b/src/ui/animations/FUiAnim_FrameAnimatorImpl.h index 43f156f..5909cbd 100644 --- a/src/ui/animations/FUiAnim_FrameAnimatorImpl.h +++ b/src/ui/animations/FUiAnim_FrameAnimatorImpl.h @@ -132,7 +132,7 @@ private: result Dispose(void); - result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName); + result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName, float angle); result AddFrameActiveAnimation(VisualElement* _pVisualElement, FrameAnimatorFormTransitionAnimation _formAnimation, VisualElementPropertyAnimation* _pPropertyAnimation, IVisualElementAnimationTimingFunction* _pTimingFunction, Tizen::Base::String _animName); @@ -144,6 +144,7 @@ private: result ChangeCurrentForm(Tizen::Ui::Controls::Form* pCurrentForm, Tizen::Ui::Controls::Form& nextForm); + float CalculateChangedAngle(void); result SetAnimations(void); result PrepareCapture(void); diff --git a/src/ui/animations/FUiAnim_MatrixUtil.cpp b/src/ui/animations/FUiAnim_MatrixUtil.cpp index d014250..5435a8f 100644 --- a/src/ui/animations/FUiAnim_MatrixUtil.cpp +++ b/src/ui/animations/FUiAnim_MatrixUtil.cpp @@ -145,13 +145,14 @@ _MatrixUtilTranslate(Tizen::Graphics::FloatMatrix4& m, float tx, float ty, float bool _MatrixUtilIsTranslation(const Tizen::Graphics::FloatMatrix4& m) { - //isTranslate && isDiagonal - if( (m.matrix[3][0] != 0.0f || m.matrix[3][1] != 0.0f || m.matrix[3][2] != 0.0f) && - (m.matrix[0][0] == 1.0f && m.matrix[1][1] == 1.0f && m.matrix[2][2] == 1.0f)) + if(_GetMatrix4Type(m) == MATRIX4_Translation) { return true; } - return false; + else + { + return false; + } } void @@ -304,84 +305,27 @@ _MatrixUtilRotate(Tizen::Graphics::FloatMatrix4& m, float angle, float x, float bool _MatrixUtilInvert(Tizen::Graphics::FloatMatrix4& m) { - float a0; - float a1; - float a2; - float a3; - float a4; - float a5; - float b0; - float b1; - float b2; - float b3; - float b4; - float b5; - float det; - - if (m.IsIdentity()) - { - return true; - } - - if(_MatrixUtilIsTranslation(m)) + Matrix4Type matrixType = _GetMatrix4Type(m) ; + if(matrixType == MATRIX4_Translation) { m.matrix[3][0] = -m.matrix[3][0]; m.matrix[3][1] = -m.matrix[3][1]; m.matrix[3][2] = -m.matrix[3][2]; return true; } - - a0 = m.matrix[0][0] * m.matrix[1][1] - m.matrix[0][1] * m.matrix[1][0]; - a1 = m.matrix[0][0] * m.matrix[1][2] - m.matrix[0][2] * m.matrix[1][0]; - a2 = m.matrix[0][0] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][0]; - a3 = m.matrix[0][1] * m.matrix[1][2] - m.matrix[0][2] * m.matrix[1][1]; - a4 = m.matrix[0][1] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][1]; - a5 = m.matrix[0][2] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][2]; - - b0 = m.matrix[2][0] * m.matrix[3][1] - m.matrix[2][1] * m.matrix[3][0]; - b1 = m.matrix[2][0] * m.matrix[3][2] - m.matrix[2][2] * m.matrix[3][0]; - b2 = m.matrix[2][0] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][0]; - b3 = m.matrix[2][1] * m.matrix[3][2] - m.matrix[2][2] * m.matrix[3][1]; - b4 = m.matrix[2][1] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][1]; - b5 = m.matrix[2][2] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][2]; - - det = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; - if (det == 0.0f) + else if(matrixType == MATRIX4_Identity) { - return false; + return true; } - - float inverse_m[4][4]; - - inverse_m[0][0] = +m.matrix[1][1] * b5 - m.matrix[1][2] * b4 + m.matrix[1][3] * b3; - inverse_m[1][0] = -m.matrix[1][0] * b5 + m.matrix[1][2] * b2 + m.matrix[1][3] * b1; - inverse_m[2][0] = +m.matrix[1][0] * b4 - m.matrix[1][1] * b2 + m.matrix[1][3] * b0; - inverse_m[3][0] = -m.matrix[1][0] * b3 + m.matrix[1][1] * b1 - m.matrix[1][2] * b0; - inverse_m[0][1] = -m.matrix[0][1] * b5 + m.matrix[0][2] * b4 - m.matrix[0][3] * b3; - inverse_m[1][1] = +m.matrix[0][0] * b5 - m.matrix[0][2] * b2 + m.matrix[0][3] * b1; - inverse_m[2][1] = -m.matrix[0][0] * b4 + m.matrix[0][1] * b2 - m.matrix[0][3] * b0; - inverse_m[3][1] = +m.matrix[0][0] * b3 - m.matrix[0][1] * b1 + m.matrix[0][2] * b0; - inverse_m[0][2] = +m.matrix[3][1] * a5 - m.matrix[3][2] * a4 + m.matrix[3][3] * a3; - inverse_m[1][2] = -m.matrix[3][0] * a5 + m.matrix[3][2] * a2 - m.matrix[3][3] * a1; - inverse_m[2][2] = +m.matrix[3][0] * a4 - m.matrix[3][1] * a2 + m.matrix[3][3] * a0; - inverse_m[3][2] = -m.matrix[3][0] * a3 + m.matrix[3][1] * a1 - m.matrix[3][2] * a0; - inverse_m[0][3] = -m.matrix[2][1] * a5 + m.matrix[2][2] * a4 - m.matrix[2][3] * a3; - inverse_m[1][3] = +m.matrix[2][0] * a5 - m.matrix[2][2] * a2 + m.matrix[2][3] * a1; - inverse_m[2][3] = -m.matrix[2][0] * a4 + m.matrix[2][1] * a2 - m.matrix[2][3] * a0; - inverse_m[3][3] = +m.matrix[2][0] * a3 - m.matrix[2][1] * a1 + m.matrix[2][2] * a0; - - for (int i = 0; i < 4; i++) + if(m.Invert() == E_SUCCESS) { - for (int j = 0; j < 4; j++) - { - inverse_m[j][i] /= det; - } + return true; + } + else + { + return false; } - - memcpy(m.matrix, inverse_m, sizeof(m.matrix)); - - return true; } void diff --git a/src/ui/animations/FUiAnim_TransactionNode.cpp b/src/ui/animations/FUiAnim_TransactionNode.cpp index 2331406..9333314 100644 --- a/src/ui/animations/FUiAnim_TransactionNode.cpp +++ b/src/ui/animations/FUiAnim_TransactionNode.cpp @@ -1684,6 +1684,11 @@ _TransactionNode::OnAnimationTick(unsigned int tick) // Send start, repeat notification pAnimationData->NotifyAnimationStarted(); + if(pAnimationData->IsRemoved()) + { + continue; + } + pAnimationData->OnTickOccurred(*pTarget, currentValue); if (__status == _STATUS_REPEAT || __status == _STATUS_FINISH || pAnimationData->GetStatus() == _AnimationData::_STATUS_FINISH) diff --git a/src/ui/animations/FUiAnim_VisualElement.cpp b/src/ui/animations/FUiAnim_VisualElement.cpp index 5f927f9..0fa4344 100644 --- a/src/ui/animations/FUiAnim_VisualElement.cpp +++ b/src/ui/animations/FUiAnim_VisualElement.cpp @@ -163,6 +163,19 @@ _VisualElement::OnPrepareDraw(void) return false; } + +result +_VisualElement::SetPosition(const Tizen::Graphics::FloatPoint& point) +{ + return _pVisualElementImpl->SetBoundsPositionSubProperty(Variant(point)); +} + +result +_VisualElement::SetSize(const Tizen::Graphics::FloatDimension& size) +{ + return _pVisualElementImpl->SetBoundsSizeSubProperty(Variant(size)); +} + result _VisualElement::SetClipToParent(bool clipToParent) { diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp index 963523c..0c6d946 100644 --- a/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp +++ b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp @@ -34,6 +34,7 @@ namespace Tizen { namespace Ui { namespace Animations _VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(void) + : __animationList(Tizen::Base::Collection::SingleObjectDeleter) { result r = __animationList.Construct(); @@ -41,6 +42,7 @@ _VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(void) } _VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(const _VisualElementAnimationGroupImpl& animationGroupImpl) + : __animationList(Tizen::Base::Collection::SingleObjectDeleter) { __animationList.Construct(); diff --git a/src/ui/animations/FUiAnim_VisualElementImpl.cpp b/src/ui/animations/FUiAnim_VisualElementImpl.cpp index 8577d11..5464fb7 100644 --- a/src/ui/animations/FUiAnim_VisualElementImpl.cpp +++ b/src/ui/animations/FUiAnim_VisualElementImpl.cpp @@ -535,13 +535,13 @@ _VisualElementImpl::CreateImplicitAnimationIfNeeded( const String& property, { // remove sub property for(int i = 0 ; pSubProperties[i] != NULL ; i++) { - pAnimationManager->RemoveAnimationByProperty(*__pPublicInstance, *pSubProperties[i]); + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pSubProperties[i]); } } if (unlikely(pAnimation)) { /// WARNING: - // Adding property animation causes previous animation for same property to be removed in Animation Manager. + // Adding animation causes previous animation for same property to be removed in Animation Manager. if (unlikely(IsFailed(AddAnimation(null, *pAnimation)))) { pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property); @@ -560,6 +560,15 @@ _VisualElementImpl::CreateImplicitAnimationIfNeeded( const String& property, } else { + + if(pSubProperties) + { // remove sub property + for(int i = 0 ; pSubProperties[i] != NULL ; i++) + { + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pSubProperties[i]); + } + } + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property); r = false; } @@ -1181,13 +1190,12 @@ _VisualElementImpl::GetBounds(void) const } result -_VisualElementImpl::SetBoundsI(const FloatRectangle& bounds) +_VisualElementImpl::SetBoundsI(const FloatRectangle& bounds, bool& sizeChanged) { _Rectanglef boundsAdjusted(bounds); - FloatRectangle oldValue(__bounds); result r = E_SUCCESS; - bool sizeChanged = false; + sizeChanged = false; if (unlikely(GetSharedData().pEventListener != null)) { @@ -1289,39 +1297,39 @@ _VisualElementImpl::SetBoundsI(const FloatRectangle& bounds) } } - // observer - if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) - { - FloatRectangle currentValue = __pPresentation->__bounds; - - static const String* subProperties[] = { pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL }; - if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties ) == false) - { - __pPresentation->SetBoundsProperty(__bounds); - } - - VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue); - - if(__pBoundsChangedCallback && sizeChanged == true) - { - (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData); - } - - } - return r; } - result _VisualElementImpl::SetBounds(const FloatRectangle& bounds) { SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); result r = E_SUCCESS; + bool sizeChanged = false; + FloatRectangle oldValue(__bounds); + + static const String* subProperties[] = {pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL }; if (IS_INTERNAL_CLASS(__pPublicInstance)) { - r = SetBoundsI(bounds); + r = SetBoundsI(bounds, sizeChanged); + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatRectangle currentValue = __pPresentation->__bounds; + + if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties) == false) + { + __pPresentation->SetBoundsProperty(__bounds); + } + + VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue); + + if(__pBoundsChangedCallback && sizeChanged == true) + { + (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData); + } + } } else { @@ -1345,7 +1353,29 @@ _VisualElementImpl::SetBoundsProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_RECTANGLE, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); - return SetBoundsI(v.ToFloatRectangle()); + bool sizeChanged = false; + FloatRectangle oldValue(__bounds); + static const String* subProperties[] = {pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL }; + + result r = SetBoundsI(v.ToFloatRectangle(), sizeChanged); + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatRectangle currentValue = __pPresentation->__bounds; + + if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties) == false) + { + __pPresentation->SetBoundsProperty(__bounds); + } + + VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue); + + if(__pBoundsChangedCallback && sizeChanged == true) + { + (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData); + } + } + return r; } Variant @@ -1361,8 +1391,30 @@ _VisualElementImpl::SetBoundsPositionSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + bool sizeChanged = false; + FloatRectangle oldValue(__bounds); const FloatPoint& position = v.ToFloatPoint(); - return SetBoundsProperty(Variant(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height))); + result r = SetBoundsI(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height), sizeChanged); + static const String* Properties[] = {pVePropBounds, NULL }; + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatPoint currentValue(__pPresentation->__bounds.x, __pPresentation->__bounds.y); + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropBoundsPosition, Variant(FloatPoint(__bounds.x, __bounds.y)) , currentValue, Properties) == false) + { + __pPresentation->SetBoundsPositionSubProperty(Variant(FloatPoint(__bounds.x, __bounds.y))); + } + + VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue); + + if(__pBoundsChangedCallback && sizeChanged == true) + { + (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData); + } + } + + return r; } Variant @@ -1378,8 +1430,29 @@ _VisualElementImpl::SetBoundsSizeSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_DIMENSION, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatRectangle oldValue(__bounds); + bool sizeChanged = false; const FloatDimension& size = v.ToFloatDimension(); - return SetBoundsProperty(Variant(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height))); + result r = SetBoundsI(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height), sizeChanged); + static const String* Properties[] = {pVePropBounds, NULL }; + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatDimension currentValue(__pPresentation->__bounds.width, __pPresentation->__bounds.height); + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropBoundsSize, Variant(FloatDimension(__bounds.width, __bounds.height)), currentValue, Properties) == false) + { + __pPresentation->SetBoundsSizeSubProperty(Variant(FloatDimension(__bounds .width, __bounds.height))); + } + + VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue); + + if(__pBoundsChangedCallback && sizeChanged == true) + { + (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData); + } + } + return r; } float @@ -2050,8 +2123,6 @@ _VisualElementImpl::SetTransformMatrixI(const FloatMatrix4& xform, bool updateDe result r = E_SUCCESS; - FloatMatrix4 oldValue(__transform); - FloatMatrix4 matrixAdjusted(xform); if (unlikely(GetSharedData().pEventListener != null)) @@ -2087,34 +2158,6 @@ _VisualElementImpl::SetTransformMatrixI(const FloatMatrix4& xform, bool updateDe } } - if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) - { - FloatMatrix4 currentValue = __pPresentation->__transform; - - static const String* subProperties[] = { pVeSubPropTransformRotationX, - pVeSubPropTransformRotationY, - pVeSubPropTransformRotationZ, - pVeSubPropTransformScaleX, - pVeSubPropTransformScaleY, - pVeSubPropTransformScaleZ, - pVeSubPropTransformTranslationX, - pVeSubPropTransformTranslationY, - pVeSubPropTransformTranslationZ, - pVeSubPropTransformRotationAnchorX, - pVeSubPropTransformRotationAnchorY, - pVeSubPropTransformRotationAnchorZ, - pVeSubPropTransformScaleAnchorX, - pVeSubPropTransformScaleAnchorY, - pVeSubPropTransformScaleAnchorZ, - NULL}; - - if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false) - { - __pPresentation->SetTransformMatrixProperty(__transform); - } - - VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); - } return E_SUCCESS; } @@ -2123,11 +2166,48 @@ _VisualElementImpl::SetTransformMatrix(const FloatMatrix4& xform) { SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); result r = E_SUCCESS; + FloatMatrix4 oldValue(__transform); // PROPERTY_PROCESS(SetTransformMatrixI, GetTransformMatrixProperty, SetTransformMatrixProperty, pVePropTransform, __transform, xform); if (IS_INTERNAL_CLASS(__pPublicInstance)) { r = SetTransformMatrixI(xform); + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatMatrix4 currentValue = __pPresentation->__transform; + + static const String* subProperties[] = { + pVeSubPropTransformRotationX, + pVeSubPropTransformRotationY, + pVeSubPropTransformRotationZ, + pVeSubPropTransformScaleX, + pVeSubPropTransformScaleY, + pVeSubPropTransformScaleZ, + pVeSubPropTransformTranslationX, + pVeSubPropTransformTranslationY, + pVeSubPropTransformTranslationZ, + pVeSubPropTransformRotationAnchorX, + pVeSubPropTransformRotationAnchorY, + pVeSubPropTransformRotationAnchorZ, + pVeSubPropTransformScaleAnchorX, + pVeSubPropTransformScaleAnchorY, + pVeSubPropTransformScaleAnchorZ, + + pVeSubPropTransformRotationXY, + pVeSubPropTransformScaleXY, + pVeSubPropTransformTranslationXY, + pVeSubPropTransformRotationAnchorXY, + pVeSubPropTransformScaleAnchorXY, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformMatrixProperty(__transform); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } } else { @@ -2155,7 +2235,45 @@ _VisualElementImpl::SetTransformMatrixProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_MATRIX4, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); - return SetTransformMatrixI(v.ToFloatMatrix4(), true); + FloatMatrix4 oldValue(__transform); + result r = SetTransformMatrixI(v.ToFloatMatrix4(), true); + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatMatrix4 currentValue = __pPresentation->__transform; + + static const String* subProperties[] = { + pVeSubPropTransformRotationX, + pVeSubPropTransformRotationY, + pVeSubPropTransformRotationZ, + pVeSubPropTransformScaleX, + pVeSubPropTransformScaleY, + pVeSubPropTransformScaleZ, + pVeSubPropTransformTranslationX, + pVeSubPropTransformTranslationY, + pVeSubPropTransformTranslationZ, + pVeSubPropTransformRotationAnchorX, + pVeSubPropTransformRotationAnchorY, + pVeSubPropTransformRotationAnchorZ, + pVeSubPropTransformScaleAnchorX, + pVeSubPropTransformScaleAnchorY, + pVeSubPropTransformScaleAnchorZ, + + pVeSubPropTransformRotationXY, + pVeSubPropTransformScaleXY, + pVeSubPropTransformTranslationXY, + pVeSubPropTransformRotationAnchorXY, + pVeSubPropTransformScaleAnchorXY, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformMatrixProperty(__transform); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2176,13 +2294,31 @@ _VisualElementImpl::SetTransformRotationXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedTransform.UpdateRotationFromEulerAngles(v.ToFloat(), angleY, angleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationX); + static const String* subProperties[] = { + pVeSubPropTransformRotationXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + + return r; } Variant @@ -2203,13 +2339,32 @@ _VisualElementImpl::SetTransformRotationYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedTransform.UpdateRotationFromEulerAngles(angleX, v.ToFloat(), angleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationY); + static const String* subProperties[] = { + pVeSubPropTransformRotationXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + + return r; } Variant @@ -2230,13 +2385,30 @@ _VisualElementImpl::SetTransformRotationZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedTransform.UpdateRotationFromEulerAngles(angleX, angleY, v.ToFloat()); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationZ); + static const String* subProperties[] = { + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2257,6 +2429,8 @@ _VisualElementImpl::SetTransformRotationXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + const FloatPoint& point = v.ToFloatPoint(); float angleX = 0.0f; @@ -2265,7 +2439,24 @@ _VisualElementImpl::SetTransformRotationXYSubProperty(const Variant& v) __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationXY); + static const String* subProperties[] = { + pVeSubPropTransformRotationX, + pVeSubPropTransformRotationY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2286,13 +2477,31 @@ _VisualElementImpl::SetTransformRotationAnchorXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetRotationAnchor(v.ToFloat(), anchorY, anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorX); + static const String* subProperties[] = { + pVeSubPropTransformRotationAnchorXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationAnchorXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2313,13 +2522,31 @@ _VisualElementImpl::SetTransformRotationAnchorYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetRotationAnchor(anchorX, v.ToFloat(), anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorY); + static const String* subProperties[] = { + pVeSubPropTransformRotationAnchorXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationAnchorYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2340,13 +2567,30 @@ _VisualElementImpl::SetTransformRotationAnchorZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetRotationAnchor(anchorX, anchorY, v.ToFloat()); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorZ); + static const String* subProperties[] = { + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationAnchorZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2367,6 +2611,8 @@ _VisualElementImpl::SetTransformRotationAnchorXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + const FloatPoint& point = v.ToFloatPoint(); float anchorX = 0.0f; @@ -2375,7 +2621,24 @@ _VisualElementImpl::SetTransformRotationAnchorXYSubProperty(const Variant& v) __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetRotationAnchor(point.x, point.y, anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorXY); + static const String* subProperties[] = { + pVeSubPropTransformRotationAnchorX, + pVeSubPropTransformRotationAnchorY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformRotationAnchorXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2396,13 +2659,31 @@ _VisualElementImpl::SetTransformScaleXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedTransform.SetScaleFactors(v.ToFloat(), scaleY, scaleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleX); + static const String* subProperties[] = { + pVeSubPropTransformScaleXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2423,13 +2704,31 @@ _VisualElementImpl::SetTransformScaleYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedTransform.SetScaleFactors(scaleX, v.ToFloat(), scaleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleY); + static const String* subProperties[] = { + pVeSubPropTransformScaleXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2450,13 +2749,30 @@ _VisualElementImpl::SetTransformScaleZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); + float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedTransform.SetScaleFactors(scaleX, scaleY, v.ToFloat()); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleZ); + static const String* subProperties[] = { + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2477,8 +2793,9 @@ _VisualElementImpl::SetTransformScaleXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); - const FloatPoint& point = v.ToFloatPoint(); + FloatMatrix4 oldValue(__transform); + const FloatPoint& point = v.ToFloatPoint(); float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; @@ -2490,7 +2807,24 @@ _VisualElementImpl::SetTransformScaleXYSubProperty(const Variant& v) __decomposedTransform.SetScaleFactors(point.x, point.y, scaleZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleXY); + static const String* subProperties[] = { + pVeSubPropTransformScaleX, + pVeSubPropTransformScaleY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2511,13 +2845,30 @@ _VisualElementImpl::SetTransformScaleAnchorXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetScaleAnchor(v.ToFloat(), anchorY, anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorX); + static const String* subProperties[] = { + pVeSubPropTransformScaleAnchorXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleAnchorXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2538,13 +2889,30 @@ _VisualElementImpl::SetTransformScaleAnchorYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetScaleAnchor(anchorX, v.ToFloat(), anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorY); + static const String* subProperties[] = { + pVeSubPropTransformScaleAnchorXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleAnchorYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2565,13 +2933,29 @@ _VisualElementImpl::SetTransformScaleAnchorZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetScaleAnchor(anchorX, anchorY, v.ToFloat()); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorZ); + static const String* subProperties[] = { + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleAnchorZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2592,15 +2976,32 @@ _VisualElementImpl::SetTransformScaleAnchorXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); const FloatPoint& point = v.ToFloatPoint(); - float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedTransform.SetScaleAnchor(point.x, point.y, anchorZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorXY); + static const String* subProperties[] = { + pVeSubPropTransformScaleAnchorX, + pVeSubPropTransformScaleAnchorY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformScaleAnchorXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2621,13 +3022,30 @@ _VisualElementImpl::SetTransformTranslationXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedTransform.SetTranslationFactors(v.ToFloat(), translateY, translateZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationX); + static const String* subProperties[] = { + pVeSubPropTransformTranslationXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformTranslationXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2648,13 +3066,30 @@ _VisualElementImpl::SetTransformTranslationYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedTransform.SetTranslationFactors(translateX, v.ToFloat(), translateZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationY); + static const String* subProperties[] = { + pVeSubPropTransformTranslationXY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformTranslationYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2675,13 +3110,29 @@ _VisualElementImpl::SetTransformTranslationZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedTransform.SetTranslationFactors(translateX, translateY, v.ToFloat()); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationZ); + static const String* subProperties[] = { + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformTranslationZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2702,15 +3153,32 @@ _VisualElementImpl::SetTransformTranslationXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__transform); const FloatPoint& point = v.ToFloatPoint(); - float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedTransform.SetTranslationFactors(point.x, point.y, translateZ); - return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationXY); + static const String* subProperties[] = { + pVeSubPropTransformTranslationX, + pVeSubPropTransformTranslationY, + pVePropTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetTransformTranslationXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue); + } + return r; } FloatMatrix4 @@ -2726,7 +3194,6 @@ result _VisualElementImpl::SetChildrenTransformMatrixI(const FloatMatrix4& xform, bool updateDecomposed) { FloatMatrix4 matrixAdjusted(xform); - FloatMatrix4 oldValue(__childrenTransform); result r = E_SUCCESS; if (unlikely(GetSharedData().pEventListener != null)) @@ -2769,34 +3236,6 @@ _VisualElementImpl::SetChildrenTransformMatrixI(const FloatMatrix4& xform, bool InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); } - if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) - { - FloatMatrix4 currentValue = __pPresentation->__childrenTransform; - static const String* subProperties[] = { - pVeSubPropChildrenTransformRotationX, - pVeSubPropChildrenTransformRotationY, - pVeSubPropChildrenTransformRotationZ, - pVeSubPropChildrenTransformScaleX, - pVeSubPropChildrenTransformScaleY, - pVeSubPropChildrenTransformScaleZ, - pVeSubPropChildrenTransformTranslationX, - pVeSubPropChildrenTransformTranslationY, - pVeSubPropChildrenTransformTranslationZ, - pVeSubPropChildrenTransformRotationAnchorX, - pVeSubPropChildrenTransformRotationAnchorY, - pVeSubPropChildrenTransformRotationAnchorZ, - pVeSubPropChildrenTransformScaleAnchorX, - pVeSubPropChildrenTransformScaleAnchorY, - pVeSubPropChildrenTransformScaleAnchorZ, - NULL}; - - if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false) - { - __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform); - } - - VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); - } return E_SUCCESS; } @@ -2805,12 +3244,47 @@ result _VisualElementImpl::SetChildrenTransformMatrix(const FloatMatrix4& xform) { SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + FloatMatrix4 oldValue(__childrenTransform); result r = E_SUCCESS; //PROPERTY_PROCESS(SetChildrenTransformMatrixI, GetChildrenTransformMatrixProperty, SetChildrenTransformMatrixProperty, pVePropChildrenTransform, __childrenTransform, xform); if (IS_INTERNAL_CLASS(__pPublicInstance)) { r = SetChildrenTransformMatrixI(xform); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatMatrix4 currentValue = __pPresentation->__childrenTransform; + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationX, + pVeSubPropChildrenTransformRotationY, + pVeSubPropChildrenTransformRotationZ, + pVeSubPropChildrenTransformScaleX, + pVeSubPropChildrenTransformScaleY, + pVeSubPropChildrenTransformScaleZ, + pVeSubPropChildrenTransformTranslationX, + pVeSubPropChildrenTransformTranslationY, + pVeSubPropChildrenTransformTranslationZ, + pVeSubPropChildrenTransformRotationAnchorX, + pVeSubPropChildrenTransformRotationAnchorY, + pVeSubPropChildrenTransformRotationAnchorZ, + pVeSubPropChildrenTransformScaleAnchorX, + pVeSubPropChildrenTransformScaleAnchorY, + pVeSubPropChildrenTransformScaleAnchorZ, + + pVeSubPropChildrenTransformRotationXY, + pVeSubPropChildrenTransformScaleXY, + pVeSubPropChildrenTransformTranslationXY, + pVeSubPropChildrenTransformRotationAnchorXY, + pVeSubPropChildrenTransformScaleAnchorXY, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } } else { @@ -2818,7 +3292,6 @@ _VisualElementImpl::SetChildrenTransformMatrix(const FloatMatrix4& xform) } SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); - return r; } @@ -2835,8 +3308,44 @@ result _VisualElementImpl::SetChildrenTransformMatrixProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_MATRIX4, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); + + result r = SetChildrenTransformMatrixI(v.ToFloatMatrix4(), true); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatMatrix4 currentValue = __pPresentation->__childrenTransform; + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationX, + pVeSubPropChildrenTransformRotationY, + pVeSubPropChildrenTransformRotationZ, + pVeSubPropChildrenTransformScaleX, + pVeSubPropChildrenTransformScaleY, + pVeSubPropChildrenTransformScaleZ, + pVeSubPropChildrenTransformTranslationX, + pVeSubPropChildrenTransformTranslationY, + pVeSubPropChildrenTransformTranslationZ, + pVeSubPropChildrenTransformRotationAnchorX, + pVeSubPropChildrenTransformRotationAnchorY, + pVeSubPropChildrenTransformRotationAnchorZ, + pVeSubPropChildrenTransformScaleAnchorX, + pVeSubPropChildrenTransformScaleAnchorY, + pVeSubPropChildrenTransformScaleAnchorZ, + + pVeSubPropChildrenTransformRotationXY, + pVeSubPropChildrenTransformScaleXY, + pVeSubPropChildrenTransformTranslationXY, + pVeSubPropChildrenTransformRotationAnchorXY, + pVeSubPropChildrenTransformScaleAnchorXY, + NULL}; - return SetChildrenTransformMatrixI(v.ToFloatMatrix4(), true); + if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2857,13 +3366,30 @@ _VisualElementImpl::SetChildrenTransformRotationXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedChildrenTransform.UpdateRotationFromEulerAngles(v.ToFloat(), angleY, angleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationX); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2884,13 +3410,30 @@ _VisualElementImpl::SetChildrenTransformRotationYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedChildrenTransform.UpdateRotationFromEulerAngles(angleX, v.ToFloat(), angleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2911,13 +3454,29 @@ _VisualElementImpl::SetChildrenTransformRotationZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float angleX = 0.0f; float angleY = 0.0f; float angleZ = 0.0f; __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedChildrenTransform.UpdateRotationFromEulerAngles(angleX, angleY, v.ToFloat()); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationZ); + static const String* subProperties[] = { + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2938,6 +3497,7 @@ _VisualElementImpl::SetChildrenTransformRotationXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); const FloatPoint& point = v.ToFloatPoint(); float angleX = 0.0f; @@ -2946,7 +3506,24 @@ _VisualElementImpl::SetChildrenTransformRotationXYSubProperty(const Variant& v) __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); __decomposedChildrenTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationXY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationX, + pVeSubPropChildrenTransformRotationY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2967,13 +3544,30 @@ _VisualElementImpl::SetChildrenTransformRotationAnchorXSubProperty(const Variant { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetRotationAnchor(v.ToFloat(), anchorY, anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorX); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationAnchorXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationAnchorXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -2994,13 +3588,30 @@ _VisualElementImpl::SetChildrenTransformRotationAnchorYSubProperty(const Variant { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetRotationAnchor(anchorX, v.ToFloat(), anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationAnchorYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3021,13 +3632,29 @@ _VisualElementImpl::SetChildrenTransformRotationAnchorZSubProperty(const Variant { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetRotationAnchor(anchorX, anchorY, v.ToFloat()); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorZ); + static const String* subProperties[] = { + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationAnchorZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3048,6 +3675,7 @@ _VisualElementImpl::SetChildrenTransformRotationAnchorXYSubProperty(const Varian { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); const FloatPoint& point = v.ToFloatPoint(); float anchorX = 0.0f; @@ -3056,7 +3684,24 @@ _VisualElementImpl::SetChildrenTransformRotationAnchorXYSubProperty(const Varian __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetRotationAnchor(point.x, point.y, anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorXY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformRotationAnchorX, + pVeSubPropChildrenTransformRotationAnchorY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformRotationAnchorXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3077,13 +3722,30 @@ _VisualElementImpl::SetChildrenTransformScaleXSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedChildrenTransform.SetScaleFactors(v.ToFloat(), scaleY, scaleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleX); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3104,13 +3766,30 @@ _VisualElementImpl::SetChildrenTransformScaleYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedChildrenTransform.SetScaleFactors(scaleX, v.ToFloat(), scaleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3131,13 +3810,28 @@ _VisualElementImpl::SetChildrenTransformScaleZSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float scaleX = 1.0f; float scaleY = 1.0f; float scaleZ = 1.0f; __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedChildrenTransform.SetScaleFactors(scaleX, scaleY, v.ToFloat()); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleZ); + static const String* subProperties[] = { + pVePropChildrenTransform, + NULL}; + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3158,6 +3852,7 @@ _VisualElementImpl::SetChildrenTransformScaleXYSubProperty(const Variant& v) { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); const FloatPoint& point = v.ToFloatPoint(); float scaleX = 1.0f; @@ -3166,7 +3861,24 @@ _VisualElementImpl::SetChildrenTransformScaleXYSubProperty(const Variant& v) __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); __decomposedChildrenTransform.SetScaleFactors(point.x, point.y, scaleZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleXY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleX, + pVeSubPropChildrenTransformScaleY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3187,13 +3899,30 @@ _VisualElementImpl::SetChildrenTransformScaleAnchorXSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetScaleAnchor(v.ToFloat(), anchorY, anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorX); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleAnchorXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleAnchorXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3214,13 +3943,30 @@ _VisualElementImpl::SetChildrenTransformScaleAnchorYSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetScaleAnchor(anchorX, v.ToFloat(), anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleAnchorXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleAnchorYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3241,13 +3987,28 @@ _VisualElementImpl::SetChildrenTransformScaleAnchorZSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetScaleAnchor(anchorX, anchorY, v.ToFloat()); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorZ); + static const String* subProperties[] = { + pVePropChildrenTransform, + NULL}; + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleAnchorZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3270,13 +4031,31 @@ _VisualElementImpl::SetChildrenTransformScaleAnchorXYSubProperty(const Variant& const FloatPoint& point = v.ToFloatPoint(); + FloatMatrix4 oldValue(__childrenTransform); float anchorX = 0.0f; float anchorY = 0.0f; float anchorZ = 0.0f; __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); __decomposedChildrenTransform.SetScaleAnchor(point.x, point.y, anchorZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorXY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformScaleAnchorX, + pVeSubPropChildrenTransformScaleAnchorY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformScaleAnchorXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3297,13 +4076,30 @@ _VisualElementImpl::SetChildrenTransformTranslationXSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedChildrenTransform.SetTranslationFactors(v.ToFloat(), translateY, translateZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationX); + static const String* subProperties[] = { + pVeSubPropChildrenTransformTranslationXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationX, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformTranslationXSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3324,13 +4120,30 @@ _VisualElementImpl::SetChildrenTransformTranslationYSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedChildrenTransform.SetTranslationFactors(translateX, v.ToFloat(), translateZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformTranslationXY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformTranslationYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3351,13 +4164,28 @@ _VisualElementImpl::SetChildrenTransformTranslationZSubProperty(const Variant& v { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); float translateX = 0.0f; float translateY = 0.0f; float translateZ = 0.0f; __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedChildrenTransform.SetTranslationFactors(translateX, translateY, v.ToFloat()); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationZ); + static const String* subProperties[] = { + pVePropChildrenTransform, + NULL}; + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationZ, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformTranslationZSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } Variant @@ -3378,6 +4206,7 @@ _VisualElementImpl::SetChildrenTransformTranslationXYSubProperty(const Variant& { SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + FloatMatrix4 oldValue(__childrenTransform); const FloatPoint& point = v.ToFloatPoint(); float translateX = 0.0f; @@ -3386,7 +4215,24 @@ _VisualElementImpl::SetChildrenTransformTranslationXYSubProperty(const Variant& __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); __decomposedChildrenTransform.SetTranslationFactors(point.x, point.y, translateZ); - return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false); + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationXY); + static const String* subProperties[] = { + pVeSubPropChildrenTransformTranslationX, + pVeSubPropChildrenTransformTranslationY, + pVePropChildrenTransform, + NULL}; + + if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationXY, v, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformTranslationXYSubProperty(v); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; } bool @@ -3581,22 +4427,6 @@ _VisualElementImpl::GetCanvasN(const FloatRectangle& bounds) SysTryReturn(NID_UI_ANIM, pRenderTarget, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not available."); SysTryReturn(NID_UI_ANIM, pRenderTarget->__pSharedData, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not constructed."); - // WARNING: - // Forcefully create surface if GetCanvasN is called. - // Without followings, surface may not be created if size of bounds == 0 (the initial size) - if (!HAVE_SURFACE(this)) - { - __needRecreateSurface = true; - } - - pRenderTarget->RebuildHierarchyProps(0, true, true); - -#if 1 - SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pNativeNode->GetSurface(), null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed."); -#else - SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pSurface, null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed."); -#endif - FloatRectangle canvasBounds; FloatRectangle clipBounds; @@ -3642,6 +4472,22 @@ _VisualElementImpl::GetCanvasN(const FloatRectangle& bounds) } // WARNING: + // Forcefully create surface if GetCanvasN is called. + // Without followings, surface may not be created if size of bounds == 0 (the initial size) + if (!HAVE_SURFACE(this)) + { + __needRecreateSurface = true; + } + + pRenderTarget->RebuildHierarchyProps(0, true, true); + +#if 1 + SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pNativeNode->GetSurface(), null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed."); +#else + SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pSurface, null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed."); +#endif + + // WARNING: // From now, canvasBounds contains the clipping area, not subcanvas area. // (0, 0) of the canvas should be placed on the left-top of the VE ! @@ -6125,7 +6971,7 @@ _VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDes bounds = tempRect; - if (!tempRect.IsEmpty() && drawRect.x>=0.0f && drawRect.y>=0.0f) + 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,12 +7150,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)) || clipBounds.IsEmpty() || - (!__childrenTransform.IsIdentity() && !_MatrixUtilIsTranslation(__childrenTransform)) || - (!pChild->__transform.IsIdentity() && !_MatrixUtilIsTranslation(pChild->__transform)) ) + 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/FUiCtrlButtonItem.cpp b/src/ui/controls/FUiCtrlButtonItem.cpp index 31cb61a..2caeba4 100644 --- a/src/ui/controls/FUiCtrlButtonItem.cpp +++ b/src/ui/controls/FUiCtrlButtonItem.cpp @@ -46,7 +46,7 @@ ButtonItem::Construct(ButtonItemStyle style, int actionId) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (actionId >= BUTTON_ITEM_ACTION_ID_MIN && actionId <= BUTTON_ITEM_ACTION_ID_MAX), E_INVALID_ARG, + SysTryReturnResult(NID_UI_CTRL, actionId >= BUTTON_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); _ButtonItemImpl* pImpl = _ButtonItemImpl::GetInstance(*this); diff --git a/src/ui/controls/FUiCtrlColorPicker.cpp b/src/ui/controls/FUiCtrlColorPicker.cpp index bc3cf7b..5eb685f 100644 --- a/src/ui/controls/FUiCtrlColorPicker.cpp +++ b/src/ui/controls/FUiCtrlColorPicker.cpp @@ -25,6 +25,7 @@ #include "FUiCtrl_ColorPickerImpl.h" using namespace Tizen::Graphics; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -45,13 +46,13 @@ ColorPicker::Construct(const Point& point) _ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pImpl != null, r, "Propagating."); _pControlImpl = pImpl; r = SetPosition(point); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; CATCH: delete pImpl; @@ -68,13 +69,13 @@ ColorPicker::Construct(const FloatPoint& point) _ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pImpl != null, r, "Propagating."); _pControlImpl = pImpl; r = SetPosition(point); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; CATCH: delete pImpl; @@ -91,7 +92,7 @@ ColorPicker::GetColor(void) const Color color = pImpl->GetColor(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), color, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, color, r, "[%s] Propagating.", GetErrorMessage(r)); return color; } @@ -104,7 +105,7 @@ ColorPicker::GetHue(void) const int hue = pImpl->GetHue(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), hue, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, hue, r, "[%s] Propagating.", GetErrorMessage(r)); return hue; } @@ -117,7 +118,7 @@ ColorPicker::GetSaturation(void) const int sat = pImpl->GetSaturation(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), sat, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, sat, r, "[%s] Propagating.", GetErrorMessage(r)); return sat; } @@ -130,19 +131,19 @@ ColorPicker::GetLuminance(void) const int lum = pImpl->GetLuminance(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), lum, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, lum, r, "[%s] Propagating.", GetErrorMessage(r)); return lum; } void -ColorPicker::SetColor(const Tizen::Graphics::Color& color) +ColorPicker::SetColor(const Color& color) { _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->SetColor(color); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void @@ -152,7 +153,7 @@ ColorPicker::SetHue(int hue) SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->SetHue(hue); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void @@ -162,7 +163,7 @@ ColorPicker::SetSaturation(int saturation) SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->SetSaturation(saturation); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void @@ -172,27 +173,27 @@ ColorPicker::SetLuminance(int luminance) SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->SetLuminance(luminance); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void -ColorPicker::AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener) +ColorPicker::AddColorChangeEventListener(IColorChangeEventListener& listener) { _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->AddColorChangeEventListener(listener); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void -ColorPicker::RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener) +ColorPicker::RemoveColorChangeEventListener(IColorChangeEventListener& listener) { _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pImpl->RemoveColorChangeEventListener(listener); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlContextMenu.cpp b/src/ui/controls/FUiCtrlContextMenu.cpp index 133ebf7..3a9c9e2 100644 --- a/src/ui/controls/FUiCtrlContextMenu.cpp +++ b/src/ui/controls/FUiCtrlContextMenu.cpp @@ -30,6 +30,7 @@ using namespace Tizen::App; using namespace Tizen::Base; using namespace Tizen::Base::Runtime; using namespace Tizen::Graphics; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -43,7 +44,7 @@ ContextMenu::~ContextMenu(void) } result -ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style) +ContextMenu::Construct(const Point& point, ContextMenuStyle style) { result r = E_SUCCESS; @@ -53,7 +54,7 @@ ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle sty } result -ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style) +ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style) { result r = E_SUCCESS; @@ -63,7 +64,7 @@ ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyl } result -ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) +ContextMenu::Construct(const Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl == null, @@ -75,7 +76,7 @@ ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle sty FloatPoint floatPoint = _CoordinateSystemUtils::ConvertToFloat(point); pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, floatPoint, style, direction); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); _pControlImpl = pImpl; @@ -83,7 +84,7 @@ ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle sty } result -ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) +ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl == null, @@ -94,7 +95,7 @@ ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyl // Create a ContextMenu Impl pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, point, style, direction); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); _pControlImpl = pImpl; @@ -102,7 +103,7 @@ ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyl } void -ContextMenu::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) +ContextMenu::AddActionEventListener(IActionEventListener& listener) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -114,7 +115,7 @@ ContextMenu::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) } void -ContextMenu::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener) +ContextMenu::RemoveActionEventListener(IActionEventListener& listener) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -126,7 +127,7 @@ ContextMenu::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener } result -ContextMenu::AddItem(const Tizen::Base::String& text, int actionId) +ContextMenu::AddItem(const String& text, int actionId) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -134,15 +135,15 @@ ContextMenu::AddItem(const Tizen::Base::String& text, int actionId) result r = E_SUCCESS; r = pImpl->AddItem(text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +ContextMenu::AddItem(const String& text, int actionId, const Bitmap& normalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -151,20 +152,16 @@ ContextMenu::AddItem(const Tizen::Base::String& text, int actionId, const Tizen: result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style != CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument at style."); - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST."); r = pImpl->AddItem(text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId) +ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, int actionId) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -173,21 +170,17 @@ ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::G result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); - r = pImpl->AddItem(Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap, +ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, int actionId) { // check whether the ContextMenu was created. @@ -197,20 +190,16 @@ ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::G result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); - r = pImpl->AddItem(Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int actionId) +ContextMenu::InsertItemAt(int index, const String& text, int actionId) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -218,22 +207,18 @@ ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int action result r = E_SUCCESS; - if (index > GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index is not valid(index = %d).", index); r = pImpl->InsertItem(index, text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +ContextMenu::InsertItemAt(int index, const String& text, int actionId, const Bitmap& normalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -242,26 +227,18 @@ ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int action result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style != CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST."); - if (index > GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); r = pImpl->InsertItem(index, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, +ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, int actionId) { // check whether the ContextMenu was created. @@ -271,27 +248,19 @@ ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); - if (index > GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); - r = pImpl->InsertItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->InsertItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap, +ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, int actionId) { // check whether the ContextMenu was created. @@ -301,26 +270,18 @@ ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); - if (index > GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); - r = pImpl->InsertItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->InsertItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId) +ContextMenu::SetItemAt(int index, const String& text, int actionId) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -328,22 +289,18 @@ ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId) result r = E_SUCCESS; - if (index >= GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); r = pImpl->SetItem(index, text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +ContextMenu::SetItemAt(int index, const String& text, int actionId, const Bitmap& normalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -352,26 +309,18 @@ ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId, result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style != CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST."); - if (index >= GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); r = pImpl->SetItem(index, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, +ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, int actionId) { // check whether the ContextMenu was created. @@ -381,27 +330,19 @@ ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, c result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); - if (index >= GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); - r = pImpl->SetItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->SetItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap, +ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, int actionId) { // check whether the ContextMenu was created. @@ -411,21 +352,12 @@ ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, c result r = E_SUCCESS; ContextMenuStyle style = pImpl->GetPublicStyle(); - if (style == CONTEXT_MENU_STYLE_LIST) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST."); -// if (index >= MAX_ITEM_COUNT || index < 0) - if (index >= GetItemCount() || index < 0) - { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - return E_OUT_OF_RANGE; - } + SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); - r = pImpl->SetItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->SetItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -440,7 +372,7 @@ ContextMenu::RemoveItemAt(int index) result r = E_SUCCESS; r = pImpl->RemoveItemAt(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -455,7 +387,7 @@ ContextMenu::RemoveAllItems(void) result r = E_SUCCESS; r = pImpl->RemoveAllItems(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -487,32 +419,27 @@ ContextMenu::GetItemActionIdAt(int index) const const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); -// if (index > MAX_ITEM_COUNT || index < 0) - if (index >= GetItemCount() || index < 0) - { - SysTryReturn(NID_UI_CTRL, false, -1, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); - } + SysTryReturn(NID_UI_CTRL, index < GetItemCount() && index >= 0, -1, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index); return pImpl->GetItemActionIdAt(index); } -Tizen::Graphics::Color +Color ContextMenu::GetItemTextColor(ContextMenuItemStatus status) const { // check whether the ContextMenu was created. const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::Color color = pImpl->GetItemTextColor(status); + Color color = pImpl->GetItemTextColor(status); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } result -ContextMenu::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color) +ContextMenu::SetItemTextColor(ContextMenuItemStatus status, const Color& color) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -521,13 +448,13 @@ ContextMenu::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphic result r = E_SUCCESS; r = pImpl->SetItemTextColor(status, color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetAnchorPosition(const Tizen::Graphics::Point& position) +ContextMenu::SetAnchorPosition(const Point& position) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -535,66 +462,66 @@ ContextMenu::SetAnchorPosition(const Tizen::Graphics::Point& position) result r = E_SUCCESS; FloatPoint floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); r = pImpl->SetAnchorPosition(floatPosition.x, floatPosition.y); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } result -ContextMenu::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position) +ContextMenu::SetAnchorPosition(const FloatPoint& position) { _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); result r = E_SUCCESS; r = pImpl->SetAnchorPosition(position.x, position.y); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } -Tizen::Graphics::Point +Point ContextMenu::GetAnchorPosition(void) const { const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::FloatPoint position = pImpl->GetAnchorPosition(); + FloatPoint position = pImpl->GetAnchorPosition(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Point(0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Point(0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return _CoordinateSystemUtils::ConvertToInteger(position); } -Tizen::Graphics::FloatPoint +FloatPoint ContextMenu::GetAnchorPositionF(void) const { const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::FloatPoint position = pImpl->GetAnchorPosition(); + FloatPoint position = pImpl->GetAnchorPosition(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::FloatPoint(0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatPoint(0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r)); return position; } -Tizen::Graphics::Color +Color ContextMenu::GetColor(void) const { // check whether the ContextMenu was created. const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::Color color = pImpl->GetColor(); + Color color = pImpl->GetColor(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } result -ContextMenu::SetColor(const Tizen::Graphics::Color& color) +ContextMenu::SetColor(const Color& color) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); @@ -603,12 +530,12 @@ ContextMenu::SetColor(const Tizen::Graphics::Color& color) result r = E_SUCCESS; r = pImpl->SetColor(color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } -Tizen::Graphics::Color +Color ContextMenu::GetItemColor(ContextMenuItemStatus status) const { // check whether the ContextMenu was created. @@ -616,29 +543,29 @@ ContextMenu::GetItemColor(ContextMenuItemStatus status) const SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), Color(0, 0, 0, 0), E_INVALID_STATE, - "[E_INVALID_ARG] CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported."); + "[%s] Invalid argument is used. CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.", GetErrorMessage(E_INVALID_ARG)); - Tizen::Graphics::Color color = pImpl->GetItemColor(status); + Color color = pImpl->GetItemColor(status); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } result -ContextMenu::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color) +ContextMenu::SetItemColor(ContextMenuItemStatus status, const Color& color) { // check whether the ContextMenu was created. _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported."); + SysTryReturnResult(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), E_INVALID_ARG, + "Invalid argument is used. CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported."); result r = E_SUCCESS; r = pImpl->SetItemColor(status, color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -667,7 +594,7 @@ ContextMenu::SetMaxVisibleItemsCount(int maxItemsCount) result r = E_SUCCESS; r = pImpl->SetMaxVisibleItemsCount(maxItemsCount); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } diff --git a/src/ui/controls/FUiCtrlEditField.cpp b/src/ui/controls/FUiCtrlEditField.cpp old mode 100755 new mode 100644 diff --git a/src/ui/controls/FUiCtrlExpandableEditArea.cpp b/src/ui/controls/FUiCtrlExpandableEditArea.cpp index b2a1387..c743c08 100644 --- a/src/ui/controls/FUiCtrlExpandableEditArea.cpp +++ b/src/ui/controls/FUiCtrlExpandableEditArea.cpp @@ -106,7 +106,7 @@ ExpandableEditArea::Construct(const FloatRectangle& rect, ExpandableEditAreaStyl E_UNSUPPORTED_OPTION, "The input option EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP is unsupported. The token style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support the title style EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP"); SysTryReturnResult(NID_UI_CTRL, (rect.width >= MINIMUM_SIZE_VALUE && rect.width <= MAXIMUM_SIZE_VALUE && rect.height >= MINIMUM_SIZE_VALUE && rect.height <= MAXIMUM_SIZE_VALUE), E_INVALID_ARG, - "Invalid argument is used. The specified size(%d, %d) is outside range of min size(%d, %d) and max size(%d, %d) of ExpandableEditArea." + "Invalid argument(s) is used. The specified size(%d, %d) is outside the range of min size(%d, %d) and max size(%d, %d) of ExpandableEditArea." , rect.width, rect.height, MINIMUM_SIZE_VALUE, MINIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE); pImpl = _ExpandableEditAreaImpl::CreateExpandableEditAreaImplFN(this, rect, style, titleStyle); diff --git a/src/ui/controls/FUiCtrlFooterItem.cpp b/src/ui/controls/FUiCtrlFooterItem.cpp index a8ba704..c5d54cf 100644 --- a/src/ui/controls/FUiCtrlFooterItem.cpp +++ b/src/ui/controls/FUiCtrlFooterItem.cpp @@ -49,7 +49,7 @@ FooterItem::Construct(int actionId) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX), E_INVALID_ARG, + SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); _FooterItemImpl* pImpl = _FooterItemImpl::GetInstance(*this); diff --git a/src/ui/controls/FUiCtrlGroupContainer.cpp b/src/ui/controls/FUiCtrlGroupContainer.cpp index a24d697..e3c6999 100644 --- a/src/ui/controls/FUiCtrlGroupContainer.cpp +++ b/src/ui/controls/FUiCtrlGroupContainer.cpp @@ -25,8 +25,8 @@ #include #include "FUiCtrl_GroupContainerImpl.h" - using namespace Tizen::Graphics; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -51,13 +51,12 @@ GroupContainer::Construct(const Rectangle& rect, int rowCount, int columnCount, pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplN(this, rect, rowCount, columnCount, lineWidth); r = GetLastResult(); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating."); pGroupContainerImpl->Initialize(); - r = GetLastResult(); _pControlImpl = pGroupContainerImpl; - return r; + return E_SUCCESS; } result @@ -70,13 +69,12 @@ GroupContainer::Construct(const FloatRectangle& rect, int rowCount, int columnCo pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplFN(this, rect, rowCount, columnCount, lineWidth); r = GetLastResult(); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating."); pGroupContainerImpl->Initialize(); - r = GetLastResult(); _pControlImpl = pGroupContainerImpl; - return r; + return E_SUCCESS; } result @@ -286,7 +284,6 @@ GroupContainer::IsRowStretchable(int rowIndex) const return pGroupContainerImpl->IsRowStretchable(rowIndex); } - Color GroupContainer::GetBackgroundColor(void) const { @@ -304,7 +301,7 @@ GroupContainer::SetBackgroundColor(const Color& color) pGroupContainerImpl->SetBackgroundColor(color); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set the background color."); } Color diff --git a/src/ui/controls/FUiCtrlGroupedListView.cpp b/src/ui/controls/FUiCtrlGroupedListView.cpp index 67f5a69..e9f2722 100644 --- a/src/ui/controls/FUiCtrlGroupedListView.cpp +++ b/src/ui/controls/FUiCtrlGroupedListView.cpp @@ -58,7 +58,7 @@ GroupedListView::Construct(const Rectangle& rect, GroupedListViewStyle style, bo { pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, SCROLL_STYLE_FADE_OUT); } - SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _pControlImpl = pImpl; diff --git a/src/ui/controls/FUiCtrlHeaderItem.cpp b/src/ui/controls/FUiCtrlHeaderItem.cpp index a5cae55..3219955 100644 --- a/src/ui/controls/FUiCtrlHeaderItem.cpp +++ b/src/ui/controls/FUiCtrlHeaderItem.cpp @@ -49,7 +49,7 @@ HeaderItem::Construct(int actionId) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX), E_INVALID_ARG, + SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); _HeaderItemImpl* pImpl = _HeaderItemImpl::GetInstance(*this); diff --git a/src/ui/controls/FUiCtrlListView.cpp b/src/ui/controls/FUiCtrlListView.cpp index ec6aa72..6d8ad2e 100644 --- a/src/ui/controls/FUiCtrlListView.cpp +++ b/src/ui/controls/FUiCtrlListView.cpp @@ -58,7 +58,7 @@ ListView::Construct(const Rectangle& rect, bool itemDivider, bool fastScroll) { pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, SCROLL_STYLE_FADE_OUT); } - SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _pControlImpl = pImpl; r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); @@ -82,7 +82,7 @@ ListView::Construct(const Rectangle& rect, bool itemDivider, ListScrollStyle scr "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, scrollStyle); - SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _pControlImpl = pImpl; r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); @@ -106,7 +106,7 @@ ListView::Construct(const FloatRectangle& rect, bool itemDivider, ListScrollStyl "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, scrollStyle); - SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _pControlImpl = pImpl; r = Control::SetBounds(rect); diff --git a/src/ui/controls/FUiCtrlOptionMenu.cpp b/src/ui/controls/FUiCtrlOptionMenu.cpp index 26048a5..4b39689 100644 --- a/src/ui/controls/FUiCtrlOptionMenu.cpp +++ b/src/ui/controls/FUiCtrlOptionMenu.cpp @@ -49,7 +49,7 @@ OptionMenu::Construct(void) // Create _OptionMenuImpl _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::CreateOptionMenuImplN(*this); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pOptionMenuImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pOptionMenuImpl != null, r, "Propagating."); // Set _OptionMenuImpl _pControlImpl = pOptionMenuImpl; @@ -63,10 +63,10 @@ OptionMenu::AddActionEventListener(IActionEventListener& listener) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->AddActionEventListener(listener); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } void @@ -75,10 +75,10 @@ OptionMenu::RemoveActionEventListener(IActionEventListener& listener) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->RemoveActionEventListener(listener); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } result @@ -87,10 +87,10 @@ OptionMenu::AddItem(const String& text, int actionId) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->AddItem(text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -101,10 +101,10 @@ OptionMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, co ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -115,10 +115,10 @@ OptionMenu::AddItem(const String& text, int actionId, const Bitmap& normalBitmap ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->AddItem(text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -129,10 +129,10 @@ OptionMenu::InsertItemAt(int mainIndex, const String& text, int actionId) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -143,10 +143,10 @@ OptionMenu::InsertItemAt(int mainIndex, const Bitmap& normalBitmap, const Bitmap ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->InsertItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -157,10 +157,10 @@ OptionMenu::InsertItemAt(int mainIndex, const String& text, int actionId, const ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -171,10 +171,10 @@ OptionMenu::SetItemAt(int mainIndex, const String& text, int actionId) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, null, null, null); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -185,10 +185,10 @@ OptionMenu::SetItemAt(int mainIndex, const Bitmap& normalBitmap, const Bitmap* p ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -199,10 +199,10 @@ OptionMenu::SetItemAt(int mainIndex, const String &text, int actionId, const Bit ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -213,10 +213,10 @@ OptionMenu::RemoveItemAt(int mainIndex) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->RemoveItemAt(mainIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating."); return r; } @@ -227,11 +227,11 @@ OptionMenu::RemoveAllItems(void) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); pOptionMenuImpl->RemoveAllItems(); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); return; } @@ -242,7 +242,7 @@ OptionMenu::GetItemCount(void) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int count = pOptionMenuImpl->GetItemCount(); result r = GetLastResult(); @@ -257,7 +257,7 @@ OptionMenu::GetItemIndexFromActionId(int actionId) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int index = pOptionMenuImpl->GetItemIndexFromActionId(actionId); result r = GetLastResult(); @@ -272,11 +272,11 @@ OptionMenu::GetItemActionIdAt(int mainIndex) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int actionId = pOptionMenuImpl->GetItemActionIdAt(mainIndex); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); return actionId; } @@ -287,10 +287,10 @@ OptionMenu::AddSubItem(int mainIndex, const String& text, int actionId) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->AddSubItem(mainIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -301,10 +301,10 @@ OptionMenu::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->InsertSubItemAt(mainIndex, subIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -315,10 +315,10 @@ OptionMenu::SetSubItemAt(int mainIndex, int subIndex, const String& text, int ac ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetSubItemAt(mainIndex, subIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -329,10 +329,10 @@ OptionMenu::RemoveSubItemAt(int mainIndex, int subIndex) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->RemoveSubItemAt(mainIndex, subIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -343,11 +343,11 @@ OptionMenu::GetSubItemCount(int mainIndex) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int count = pOptionMenuImpl->GetSubItemCount(mainIndex); - result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (count >= 0), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + SysTryReturn(NID_UI_CTRL, (count >= 0), -1, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); return count; } @@ -358,7 +358,7 @@ OptionMenu::GetSubItemIndexFromActionId(int actionId) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int index = pOptionMenuImpl->GetSubItemIndexFromActionId(actionId); result r = GetLastResult(); @@ -373,11 +373,11 @@ OptionMenu::GetSubItemActionIdAt(int mainIndex, int subIndex) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int actionId = pOptionMenuImpl->GetSubItemActionIdAt(mainIndex, subIndex); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); return actionId; } @@ -388,10 +388,10 @@ OptionMenu::SetItemTextColor(OptionMenuItemStatus status, const Color& color) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetItemTextColor(status, color); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -402,11 +402,11 @@ OptionMenu::GetItemTextColor(OptionMenuItemStatus status) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); Color color = pOptionMenuImpl->GetItemTextColor(status); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } @@ -417,10 +417,10 @@ OptionMenu::SetItemColor(OptionMenuItemStatus status, const Color& color) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetItemColor(status, color); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -431,14 +431,14 @@ OptionMenu::GetItemColor(OptionMenuItemStatus status) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); SysTryReturn(NID_UI_CTRL, (status != OPTION_MENU_ITEM_STATUS_NORMAL), Color(0, 0, 0, 0), E_INVALID_ARG, - "[E_INVALID_ARG] OPTION_MENU_ITEM_STATUS_NORMAL is not supported."); + "[%s] Invalid argument is used. OPTION_MENU_ITEM_STATUS_NORMAL is not supported.", GetErrorMessage(E_INVALID_ARG)); Color color = pOptionMenuImpl->GetItemColor(status); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } @@ -449,10 +449,10 @@ OptionMenu::SetColor(const Color& color) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetColor(color); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -463,11 +463,11 @@ OptionMenu::GetColor(void) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); Color color = pOptionMenuImpl->GetColor(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); return color; } @@ -478,10 +478,10 @@ OptionMenu::SetMaxVisibleItemsCount(int maxItemsCount) ClearLastResult(); _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pOptionMenuImpl->SetMaxVisibleItemsCount(maxItemsCount); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -492,11 +492,11 @@ OptionMenu::GetMaxVisibleItemsCount(void) const ClearLastResult(); const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); - SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use."); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); int count = pOptionMenuImpl->GetMaxVisibleItemsCount(); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); return count; } diff --git a/src/ui/controls/FUiCtrlPanel.cpp b/src/ui/controls/FUiCtrlPanel.cpp index baff6d6..b40890f 100644 --- a/src/ui/controls/FUiCtrlPanel.cpp +++ b/src/ui/controls/FUiCtrlPanel.cpp @@ -32,6 +32,7 @@ using namespace std; using namespace Tizen::Graphics; +using namespace Tizen::Base; namespace Tizen { namespace Ui { namespace Controls { @@ -56,18 +57,17 @@ Panel::Construct(const Rectangle& rect, GroupStyle groupStyle) FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); pImpl = _PanelImpl::CreatePanelImplN(this, floatRect, groupStyle); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } @@ -80,36 +80,35 @@ Panel::Construct(const FloatRectangle& rect, GroupStyle groupStyle) pImpl = _PanelImpl::CreatePanelImplN(this, rect, groupStyle); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } result -Panel::Construct(const Tizen::Base::String& resourceId) +Panel::Construct(const String& resourceId) { ClearLastResult(); // Parse UiBuilder XML file - unique_ptr<_UiBuilder> pBuilder(new _UiBuilder()); - SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder()); + SysTryReturnResult(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = pBuilder->Construct(resourceId, this); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = pBuilder->Parse(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - return r; + return E_SUCCESS; } result @@ -127,18 +126,17 @@ Panel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, co FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); pImpl = _PanelImpl::CreatePanelImplN(this, floatRect, groupStyle, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } @@ -156,18 +154,17 @@ Panel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, co pImpl = _PanelImpl::CreatePanelImplN(this, rect, groupStyle, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } @@ -202,9 +199,9 @@ Panel::SetCompositeEnabled(bool composite) SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); result r = pImpl->SetCompositeEnabled(composite); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); - return r; + return E_SUCCESS; } bool diff --git a/src/ui/controls/FUiCtrlPopup.cpp b/src/ui/controls/FUiCtrlPopup.cpp index 2ebe64f..824169e 100644 --- a/src/ui/controls/FUiCtrlPopup.cpp +++ b/src/ui/controls/FUiCtrlPopup.cpp @@ -105,7 +105,7 @@ Popup::Construct(const Tizen::Base::String& resourceId) ClearLastResult(); // Parse UiBuilder XML file - unique_ptr<_UiBuilder> pBuilder(new _UiBuilder()); + unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder()); SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); result r = pBuilder->Construct(resourceId, this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrlProgress.cpp b/src/ui/controls/FUiCtrlProgress.cpp index e200290..97d16bd 100644 --- a/src/ui/controls/FUiCtrlProgress.cpp +++ b/src/ui/controls/FUiCtrlProgress.cpp @@ -47,7 +47,7 @@ Progress::Construct(const Rectangle& rect, int minValue, int maxValue) pProgressImpl = _ProgressImpl::CreateProgressImplN(this, rect); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pProgressImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating."); _pControlImpl = pProgressImpl; @@ -78,7 +78,7 @@ Progress::Construct(const FloatRectangle& rect, int minValue, int maxValue) pProgressImpl = _ProgressImpl::CreateProgressImplFN(this, rect); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pProgressImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating."); _pControlImpl = pProgressImpl; diff --git a/src/ui/controls/FUiCtrlScrollPanel.cpp b/src/ui/controls/FUiCtrlScrollPanel.cpp index 49e31e1..9110790 100644 --- a/src/ui/controls/FUiCtrlScrollPanel.cpp +++ b/src/ui/controls/FUiCtrlScrollPanel.cpp @@ -30,6 +30,8 @@ using namespace std; using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -54,7 +56,7 @@ ScrollPanel::Construct(const Rectangle& rect) } result -ScrollPanel::Construct(const Tizen::Graphics::FloatRectangle& rect) +ScrollPanel::Construct(const FloatRectangle& rect) { result r = Construct(rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); @@ -62,20 +64,21 @@ ScrollPanel::Construct(const Tizen::Graphics::FloatRectangle& rect) } result -ScrollPanel::Construct(const Tizen::Base::String& resourceId) +ScrollPanel::Construct(const String& resourceId) { ClearLastResult(); // Parse UiBuilder XML file - unique_ptr<_UiBuilder> pBuilder(new _UiBuilder()); - SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder()); + SysTryReturnResult(NID_UI_CTRL, pBuilder != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + result r = pBuilder->Construct(resourceId, this); - SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_MEMORY, r, r, "[%s] The memory is insufficient.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + r = pBuilder->Parse(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - return r; + return E_SUCCESS; } result @@ -87,41 +90,39 @@ ScrollPanel::Construct(const Rectangle& rect, ScrollPanelScrollDirection scrollD FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, floatRect, scrollDirection, autoResizingEnable); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] The given width or height is less than 0.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[E_INVALID_ARG] Invalid argument is used. The given width or height is less than 0."); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Memory allocation failed.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } result -ScrollPanel::Construct(const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) +ScrollPanel::Construct(const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) { _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, rect, scrollDirection, autoResizingEnable); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] The given width or height is less than 0.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } @@ -134,7 +135,7 @@ ScrollPanel::Construct(const Layout& layout, const Rectangle& rect) } result -ScrollPanel::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect) +ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect) { result r = Construct(layout, layout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); @@ -150,7 +151,7 @@ ScrollPanel::Construct(const Layout& layout, const Rectangle& rect, ScrollPanelS } result -ScrollPanel::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) +ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) { result r = Construct(layout, layout, rect, scrollDirection, autoResizingEnable); @@ -166,7 +167,7 @@ ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayo } result -ScrollPanel::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect) +ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect) { result r = Construct(portraitLayout, landscapeLayout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); @@ -183,41 +184,39 @@ ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayo FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, floatRect, scrollDirection, autoResizingEnable, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] portraitLayout or landscapeLayout is already bound to another container, or the given width or height is less than 0.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } result -ScrollPanel::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) +ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) { _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, rect, scrollDirection, autoResizingEnable, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] portraitLayout or landscapeLayout is already bound to another container, or the given width or height is less than 0.", GetErrorMessage(r)); - SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); _pControlImpl = pImpl; - return r; + return E_SUCCESS; CATCH: delete pImpl; - SetLastResult(r); return r; } @@ -332,7 +331,7 @@ ScrollPanel::CloseOverlayWindow(void) result r = pImpl->CloseOverlayWindow(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); - return r; + return E_SUCCESS; } Rectangle @@ -362,11 +361,11 @@ ScrollPanel::SetClientAreaWidth(int width) float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); result r = pImpl->SetClientAreaWidth(floatWidth); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] width is less than the width of ScrollPanel.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The width of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is vertical.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); - return r; + return E_SUCCESS; } result @@ -376,11 +375,11 @@ ScrollPanel::SetClientAreaWidth(float width) SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); result r = pImpl->SetClientAreaWidth(width); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] width is less than the width of ScrollPanel.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The width of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is vertical.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); - return r; + return E_SUCCESS; } result @@ -391,11 +390,11 @@ ScrollPanel::SetClientAreaHeight(int height) float floatHeight = _CoordinateSystemUtils::ConvertToFloat(height); result r = pImpl->SetClientAreaHeight(floatHeight); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] height is less than the height of ScrollPanel.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The height of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is horizontal.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); - return r; + return E_SUCCESS; } result @@ -405,11 +404,11 @@ ScrollPanel::SetClientAreaHeight(float height) SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); result r = pImpl->SetClientAreaHeight(height); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] height is less than the height of ScrollPanel.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The height of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is horizontal.", GetErrorMessage(r)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); - return r; + return E_SUCCESS; } ScrollPanelScrollDirection diff --git a/src/ui/controls/FUiCtrlSlider.cpp b/src/ui/controls/FUiCtrlSlider.cpp index 26037e6..3110c3a 100644 --- a/src/ui/controls/FUiCtrlSlider.cpp +++ b/src/ui/controls/FUiCtrlSlider.cpp @@ -56,7 +56,7 @@ Slider::Construct(const Rectangle& rect, BackgroundStyle backgroundStyle, bool s pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating."); r = pSliderImpl->Initialize(minValue, maxValue, backgroundStyle, sliderStyle, groupStyle); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -89,7 +89,7 @@ Slider::Construct(const FloatRectangle& rect, BackgroundStyle backgroundStyle, b pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating."); r = pSliderImpl->Initialize(minValue, maxValue, backgroundStyle, sliderStyle, groupStyle); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -115,7 +115,7 @@ Slider::Construct(const Rectangle& rect, unsigned long sliderStyle, int minValue pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating."); r = pSliderImpl->Initialize(minValue, maxValue, BACKGROUND_STYLE_DEFAULT, sliderStyle, GROUP_STYLE_NONE); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -141,7 +141,7 @@ Slider::Construct(const FloatRectangle& rect, unsigned long sliderStyle, int min pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating."); r = pSliderImpl->Initialize(minValue, maxValue, BACKGROUND_STYLE_DEFAULT, sliderStyle, GROUP_STYLE_NONE); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -164,7 +164,7 @@ Slider::SetRange(int minValue, int maxValue) SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pSliderImpl->SetRange(minValue, maxValue); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -249,7 +249,7 @@ Slider::SetTitleText(const String& title) SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pSliderImpl->SetTitleText(title); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -323,7 +323,7 @@ Slider::SetBarColor(const Color& color) SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pSliderImpl->SetBarColor(color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -373,7 +373,7 @@ Slider::SetColor(const Color& color) SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pSliderImpl->SetColor(color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -398,7 +398,7 @@ Slider::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap) SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); result r = pSliderImpl->SetThumbBitmap(status, bitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } diff --git a/src/ui/controls/FUiCtrlTabBar.cpp b/src/ui/controls/FUiCtrlTabBar.cpp index e4e4443..e4da941 100644 --- a/src/ui/controls/FUiCtrlTabBar.cpp +++ b/src/ui/controls/FUiCtrlTabBar.cpp @@ -28,6 +28,7 @@ using namespace Tizen::Graphics; using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -54,7 +55,7 @@ TabBar::Construct(int x, int y, int width) float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(floatX, floatY, floatWidth, 0.0f)); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating."); _pControlImpl = pImpl; @@ -70,7 +71,7 @@ TabBar::Construct(float x, float y, float width) pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(x, y, width, 0.0f)); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating."); _pControlImpl = pImpl; @@ -82,8 +83,8 @@ TabBar::AddItem(const TabBarItem& item) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Input TabBarItem is not constructed.\n"); + SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, + "Invalid argument is used. Input TabBarItem is not constructed.\n"); return pImpl->AddItem(item.GetText(), item.GetActionId()); } @@ -93,13 +94,13 @@ TabBar::InsertItemAt(int index, const TabBarItem& item) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Input TabBarItem is not constructed.\n"); + SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, + "Invalid argument is used. Input TabBarItem is not constructed.\n"); return pImpl->InsertItemAt(index, item.GetText(), item.GetActionId()); } -Tizen::Graphics::Color +Color TabBar::GetColor(void) const { const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); @@ -117,7 +118,7 @@ TabBar::GetItemCount(void) const return pImpl->GetItemCount(); } -Tizen::Graphics::Color +Color TabBar::GetSelectedItemColor(void) const { const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); @@ -126,7 +127,7 @@ TabBar::GetSelectedItemColor(void) const return pImpl->GetSelectedItemColor(); } -Tizen::Graphics::Color +Color TabBar::GetItemTextColor(TabBarItemStatus status) const { const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); @@ -163,7 +164,7 @@ TabBar::RemoveAllItems(void) } result -TabBar::SetColor(const Tizen::Graphics::Color& color) +TabBar::SetColor(const Color& color) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -176,8 +177,8 @@ TabBar::SetItemAt(int index, const TabBarItem& item) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); - SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Input TabBarItem is not constructed.\n"); + SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, + "Invalid argument is used. Input TabBarItem is not constructed.\n"); return pImpl->SetItemAt(index, item.GetText(), item.GetActionId()); } @@ -192,7 +193,7 @@ TabBar::SetItemSelected(int index) } result -TabBar::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color) +TabBar::SetItemTextColor(TabBarItemStatus status, const Color& color) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -201,7 +202,7 @@ TabBar::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& } result -TabBar::SetSelectedItemColor(const Tizen::Graphics::Color& color) +TabBar::SetSelectedItemColor(const Color& color) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -228,7 +229,7 @@ TabBar::SetWidth(float width) } void -TabBar::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) +TabBar::AddActionEventListener(IActionEventListener& listener) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); @@ -238,7 +239,7 @@ TabBar::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) void -TabBar::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener) +TabBar::RemoveActionEventListener(IActionEventListener& listener) { _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); diff --git a/src/ui/controls/FUiCtrlTabBarItem.cpp b/src/ui/controls/FUiCtrlTabBarItem.cpp index 695f016..7ee91f2 100644 --- a/src/ui/controls/FUiCtrlTabBarItem.cpp +++ b/src/ui/controls/FUiCtrlTabBarItem.cpp @@ -26,6 +26,7 @@ #include "FUiCtrl_TabBarItemImpl.h" using namespace Tizen::Ui::Controls; +using namespace Tizen::Base; namespace Tizen { namespace Ui { namespace Controls { @@ -35,37 +36,22 @@ TabBarItem::TabBarItem(void) { } - TabBarItem::~TabBarItem(void) { delete __pTabBarItemImpl; __pTabBarItemImpl = null; } - result -TabBarItem::Construct(const Tizen::Base::String& text, int actionId) +TabBarItem::Construct(const String& text, int actionId) { - if (__pTabBarItemImpl != null) - { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance is already allocated."); - return E_INVALID_STATE; - } - - if (actionId < 0) - { - SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The action ID of the item must be a positive integer."); - return E_INVALID_ARG; - } + SysAssertf(__pTabBarItemImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + SysTryReturnResult(NID_UI_CTRL, actionId >= 0, E_INVALID_ARG, "The action ID of the item must be a positive integer."); __pTabBarItemImpl = new (std::nothrow) _TabBarItemImpl(); - if (__pTabBarItemImpl == null) - { - SysLog(NID_UI_CTRL, "[E_OUT_OF_MEMORY] SeedItem of TabBarItem can not be allocated due to the memory shortage."); - delete __pTabBarItemImpl; - __pTabBarItemImpl = null; - return E_OUT_OF_MEMORY; - } + SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); __pTabBarItemImpl->SetText(text); __pTabBarItemImpl->SetActionId(actionId); @@ -76,17 +62,9 @@ TabBarItem::Construct(const Tizen::Base::String& text, int actionId) result TabBarItem::SetActionId(int actionId) { - if (__pTabBarItemImpl == null) - { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed."); - return E_INVALID_STATE; - } - - if (actionId < 0) - { - SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The action ID of the item must be a positive integer."); - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_INVALID_STATE, "__pTabBarItemImpl must not be null"); + + SysTryReturnResult(NID_UI_CTRL, actionId >= 0, E_INVALID_ARG, "The action ID of the item must be a positive integer."); __pTabBarItemImpl->SetActionId(actionId); return E_SUCCESS; @@ -95,43 +73,27 @@ TabBarItem::SetActionId(int actionId) int TabBarItem::GetActionId(void) const { - ClearLastResult(); - - if (__pTabBarItemImpl == null) - { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed."); - SetLastResult(E_INVALID_STATE); - return -1; - } + SysTryReturn(NID_UI_CTRL, __pTabBarItemImpl != null, -1, E_INVALID_STATE, "[%s] __pTabBarItemImpl must not be null", GetErrorMessage(E_INVALID_STATE)); SetLastResult(E_SUCCESS); return __pTabBarItemImpl->GetActionId(); } -Tizen::Base::String +String TabBarItem::GetText(void) const { ClearLastResult(); - if (__pTabBarItemImpl == null) - { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed."); - SetLastResult(E_INVALID_STATE); - return Tizen::Base::String(); - } + SysTryReturn(NID_UI_CTRL, __pTabBarItemImpl != null, String(), E_INVALID_STATE, "[%s] __pTabBarItemImpl must not be null", GetErrorMessage(E_INVALID_STATE)); SetLastResult(E_SUCCESS); return __pTabBarItemImpl->GetText(); } result -TabBarItem::SetText(const Tizen::Base::String& text) +TabBarItem::SetText(const String& text) { - if (__pTabBarItemImpl == null) - { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_INVALID_STATE, "__pTabBarItemImpl must not be null"); __pTabBarItemImpl->SetText(text); diff --git a/src/ui/controls/FUiCtrlTableView.cpp b/src/ui/controls/FUiCtrlTableView.cpp index 9056e44..1693fa2 100644 --- a/src/ui/controls/FUiCtrlTableView.cpp +++ b/src/ui/controls/FUiCtrlTableView.cpp @@ -201,12 +201,14 @@ TableView::SetFastScrollIndex(const String& text, bool useSearchIcon) int TableView::GetTopDrawnItemIndex(void) const { + result r = E_SUCCESS; const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); int itemIndex = -1; int groupIndex = -1; - pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); return itemIndex; } @@ -214,12 +216,14 @@ TableView::GetTopDrawnItemIndex(void) const int TableView::GetBottomDrawnItemIndex(void) const { + result r = E_SUCCESS; const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); int itemIndex = -1; int groupIndex = -1; - pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); return itemIndex; } diff --git a/src/ui/controls/FUiCtrl_Animation.cpp b/src/ui/controls/FUiCtrl_Animation.cpp index 8358b17..df10fd9 100644 --- a/src/ui/controls/FUiCtrl_Animation.cpp +++ b/src/ui/controls/FUiCtrl_Animation.cpp @@ -38,12 +38,15 @@ namespace Tizen { namespace Ui { namespace Controls IMPLEMENT_PROPERTY(_Animation); +bool _Animation::__isInternalAnimation = false; + _Animation::_Animation(void) : __pAnimationPresenter(null) , __pControlAnimation(null) , __pAnimationEvent(null) , __pAnimationFrames(null) , __pAccessibilityElement(null) + , __isAttachedToMainTree(false) { _VisualElement* pBase = GetVisualElement(); @@ -82,7 +85,7 @@ _Animation::~_Animation(void) } _Animation* -_Animation::CreateAnimationN(void) +_Animation::CreateAnimationN(bool isFramework) { result r = E_SUCCESS; @@ -100,6 +103,8 @@ _Animation::CreateAnimationN(void) pAnimation->AcquireHandle(); pAnimation->SetFocusable(false); + _Animation::__isInternalAnimation = isFramework; + SetLastResult(E_SUCCESS); return pAnimation; @@ -126,6 +131,12 @@ _Animation::OnTimerExpired(Timer& timer) return; } +bool +_Animation::IsAttachedToMainTree(void) +{ + return __isAttachedToMainTree; +} + result _Animation::OnAttachedToMainTree(void) { @@ -149,6 +160,7 @@ _Animation::OnAttachedToMainTree(void) } } + __isAttachedToMainTree = true; return E_SUCCESS; } @@ -315,6 +327,12 @@ _Animation::GetStatus(void) const return __pAnimationPresenter->GetStatus(); } +bool +_Animation::IsInternalAnimation() +{ + return _Animation::__isInternalAnimation; +} + void _Animation::OnDraw(void) { diff --git a/src/ui/controls/FUiCtrl_AnimationPresenter.cpp b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp index 7e04fd4..e3db9be 100644 --- a/src/ui/controls/FUiCtrl_AnimationPresenter.cpp +++ b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp @@ -43,6 +43,7 @@ _AnimationPresenter::_AnimationPresenter(void) , __isTimerRunning(false) , __pVisualElement(null) , __lazyDecode(false) + , __isPlayCalledBeforeAttach(false) { } @@ -189,6 +190,13 @@ _AnimationPresenter::Play(void) { result r = E_SUCCESS; + if(!__pAnimation->IsAttachedToMainTree()) + { + __isPlayCalledBeforeAttach = true; + } + + SysTryReturnResult(NID_UI_CTRL, __pAnimation->IsAttachedToMainTree(), E_SYSTEM, "A system error has occurred. The control is not attached to main tree."); + if (__isTimerRunning) { return E_SUCCESS; @@ -376,6 +384,12 @@ _AnimationPresenter::Draw(void) { result r = E_SUCCESS; + if (__isPlayCalledBeforeAttach) + { + Play(); + __isPlayCalledBeforeAttach = false; + } + FloatRectangle bounds = __pAnimation->GetBoundsF(); Color bgColor = __pAnimation->GetBackgroundColor(); Canvas* pCanvas = null; @@ -418,7 +432,18 @@ _AnimationPresenter::Draw(void) } else { - r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap); + if (__pAnimation->IsInternalAnimation()) + { + FloatDimension bitmapDimension; + bitmapDimension.width = pBitmap->GetHeightF(); + bitmapDimension.height = pBitmap->GetHeightF(); + + r = pCanvas->DrawBitmap(FloatPoint((bounds.width - bitmapDimension.width)/2.0f, (bounds.height - bitmapDimension.height)/2.0f), *pBitmap); + } + else + { + r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap); + } } SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw the bitmap", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_Button.cpp b/src/ui/controls/FUiCtrl_Button.cpp index ce38af0..1a1daec 100644 --- a/src/ui/controls/FUiCtrl_Button.cpp +++ b/src/ui/controls/FUiCtrl_Button.cpp @@ -332,12 +332,20 @@ _Button::OnTouchMoveHandled(const _Control& control) bool _Button::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsVisible()) + { + return false; + } return __pButtonPresenter->OnKeyPressed(source, keyInfo); } bool _Button::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsVisible()) + { + return false; + } return __pButtonPresenter->OnKeyReleased(source, keyInfo); } @@ -1527,8 +1535,8 @@ _Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const FloatRectangle previousRect = pTextObject->GetBoundsF(); TextObjectActionType previousActionType = pTextObject->GetAction(); - dimension.width = GetBoundsF().width - __leftMargin * 2; - dimension.height = GetBoundsF().height - __topMargin * 2; + dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin); + dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin); _ControlOrientation orientation = GetOrientation(); if (orientation == _CONTROL_ORIENTATION_PORTRAIT) @@ -1544,13 +1552,23 @@ _Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const if (horizontalMode == true) { - FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - __leftMargin, dimension.height); + FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - (__leftMargin + __rightMargin), dimension.height); pTextObject->SetBounds(bounds); pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); pTextObject->Compose(); - textSize = pTextObject->GetTextExtentF(); + int displayLineCount = pTextObject->GetDisplayLineCount(); + int offSet = pTextObject->GetFirstTextIndexAt(displayLineCount - 1); + + if (displayLineCount == 1) + { + textSize = pTextObject->GetTextExtentF(offSet, pTextObject->GetTextLength() - offSet); + } + else + { + textSize = pTextObject->GetTextExtentF(); + } dimension.width = (textSize.width < bounds.width) ? textSize.width : bounds.width; } @@ -1571,8 +1589,8 @@ _Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const pTextObject->SetBounds(previousRect); pTextObject->SetAction(previousActionType); - dimension.width += __leftMargin * 4; - dimension.height += __topMargin * 4; + dimension.width += (__leftMargin + __rightMargin); + dimension.height += (__topMargin + __bottomMargin); for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) { @@ -1649,4 +1667,11 @@ _Button::IsMultilineFontSizeSet(void) const { return __isSettingMultilineFontSize; } + +bool +_Button::IsButtonStatusSelected(void) const +{ + + return (_BUTTON_STATUS_SELECTED == __buttonStatus) ? true : false; +} }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp b/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp index b415296..2c05c76 100644 --- a/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp @@ -62,7 +62,7 @@ _ButtonItemImpl::GetInstance(ButtonItem& buttonItem) result _ButtonItemImpl::Construct(ButtonItemStyle style, int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId >= BUTTON_ITEM_ACTION_ID_MIN && actionId <= BUTTON_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId >= BUTTON_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; @@ -120,7 +120,7 @@ _ButtonItemImpl::GetText(void) const result _ButtonItemImpl::SetActionId(int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId > BUTTON_ITEM_ACTION_ID_MIN && actionId < BUTTON_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId > BUTTON_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; diff --git a/src/ui/controls/FUiCtrl_ButtonPresenter.cpp b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp index 2a54959..808b634 100644 --- a/src/ui/controls/FUiCtrl_ButtonPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp @@ -46,6 +46,7 @@ _ButtonPresenter::_ButtonPresenter(void) , __touchMoveHandled(false) , __lazyDecode(false) , __showUnderlineBitmap(false) + , __isKeyPressed(false) , __pFont(null) , __pTextObject(null) , __pBase(null) @@ -160,6 +161,9 @@ _ButtonPresenter::InitTextObject(void) pSimpleText = new (std::nothrow) TextSimple(const_cast(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength()); SysTryReturn(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f)); + __pTextObject->AppendElement(*pSimpleText); __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); @@ -862,6 +866,20 @@ _ButtonPresenter::DrawText(void) __pTextObject->Compose(); } + _Text::TextElement* pTextElement = __pTextObject->GetElementAtElementIndex(0); + TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText) + { + if (__pButton->GetButtonStatus() == _BUTTON_STATUS_PRESSED) + { + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -2.0f)); + } + else + { + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f)); + } + } + __pTextObject->SetForegroundColor(__pButton->GetTextColor(__pButton->GetButtonStatus()), 0, __pTextObject->GetTextLength()); if (__pTextObject->IsActionOn() == true) @@ -1128,10 +1146,14 @@ _ButtonPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { __pButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); } + if (!__isKeyPressed) + { + __isKeyPressed = true; + __pButton->Draw(); + __pButton->Show(); + } } - __pButton->Draw(); - __pButton->Show(); return false; } @@ -1140,7 +1162,7 @@ bool _ButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { _KeyCode keyCode = keyInfo.GetKeyCode(); - + __isKeyPressed = false; if (__pButton->IsFocused() && __pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) { if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) @@ -1158,19 +1180,27 @@ _ButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) void _ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control) { - if (__pButton->GetButtonStatus() == _BUTTON_STATUS_SELECTED) + if (__pButton->IsButtonStatusSelected()) { return; } if (__pButton->GetEnableState()) { - __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_HIGHLIGHTED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + else + { + __pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } } else { __pButton->SetButtonStatus(_BUTTON_STATUS_DISABLED); } + __pButton->Invalidate(true); return; } diff --git a/src/ui/controls/FUiCtrl_CheckButton.cpp b/src/ui/controls/FUiCtrl_CheckButton.cpp index b3c05e8..ea9171c 100644 --- a/src/ui/controls/FUiCtrl_CheckButton.cpp +++ b/src/ui/controls/FUiCtrl_CheckButton.cpp @@ -175,9 +175,9 @@ _CheckButton::_CheckButton(void) for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++) { - __pMarkBgNormalBitmap[i] = null; + __pMarkBgBitmap[i] = null; __pMarkBitmap[i] = null; - __pOnOffBgNormalBitmap[i] = null; + __pOnOffBgBitmap[i] = null; __pOnOffBitmap[i] = null; __pOnOffSlidingBgBitmap[i] = null; __pOnOffSlidingOnHandlerBitmap[i] = null; @@ -236,8 +236,6 @@ _CheckButton::CreateCheckButtonN(void) pCheckButton->AcquireHandle(); - pCheckButton->LoadDefaultBackgroundBitmap(); - pCheckButton->SetTouchPressThreshold(SENSITIVE); return pCheckButton; @@ -263,10 +261,10 @@ _CheckButton::~_CheckButton(void) for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++) { - if (__pMarkBgNormalBitmap[i]) + if (__pMarkBgBitmap[i]) { - delete __pMarkBgNormalBitmap[i]; - __pMarkBgNormalBitmap[i] = null; + delete __pMarkBgBitmap[i]; + __pMarkBgBitmap[i] = null; } if (__pMarkBitmap[i]) @@ -275,10 +273,10 @@ _CheckButton::~_CheckButton(void) __pMarkBitmap[i] = null; } - if (__pOnOffBgNormalBitmap[i]) + if (__pOnOffBgBitmap[i]) { - delete __pOnOffBgNormalBitmap[i]; - __pOnOffBgNormalBitmap[i] = null; + delete __pOnOffBgBitmap[i]; + __pOnOffBgBitmap[i] = null; } if (__pOnOffBitmap[i]) @@ -592,12 +590,20 @@ _CheckButton::OnTouchMoveHandled(const _Control& control) bool _CheckButton::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsVisible()) + { + return false; + } return __pCheckButtonPresenter->OnKeyPressed(source, keyInfo); } bool _CheckButton::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsVisible()) + { + return false; + } return __pCheckButtonPresenter->OnKeyReleased(source, keyInfo); } @@ -901,105 +907,164 @@ _CheckButton::GetPropertySelectedActionId(void) const } result -_CheckButton::LoadDefaultBackgroundBitmap(void) +_CheckButton::LoadDefaultBitmap(void) { result r = E_SUCCESS; - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundNormalEffectBitmap); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundPressedEffectBitmap); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopNormalEffectBitmap); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopPressedEffectBitmap); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleNormalEffectBitmap); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddlePressedEffectBitmap); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomNormalEffectBitmap); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomPressedEffectBitmap); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_SELECTED]); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleNormalEffectBitmap); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCirclePressedEffectBitmap); - - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_NORMAL]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_DISABLED]); - r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_PRESSED]); - 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); + if (__groupStyle == GROUP_STYLE_NONE || __groupStyle == GROUP_STYLE_SINGLE) + { + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundPressedEffectBitmap); + } + else if (__groupStyle == GROUP_STYLE_TOP) + { + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopPressedEffectBitmap); + } + else if (__groupStyle == GROUP_STYLE_MIDDLE) + { + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddlePressedEffectBitmap); + } + else if (__groupStyle == GROUP_STYLE_BOTTOM) + { + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomPressedEffectBitmap); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER + || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Color markIconBgHighlighted; + GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, markIconBgHighlighted); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, markIconBgHighlighted, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON + || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER) + { + Color onOffIconBgHighlighted; + GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, onOffIconBgHighlighted); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffIconBgHighlighted, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + Color onOffSlidingHandlerHighlighted; + GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, onOffSlidingHandlerHighlighted); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffSlidingHandlerHighlighted, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffSlidingHandlerHighlighted, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Color detailedNormalBgColor; + Color detailedDisabledBgColor; + Color detailedPressedBgColor; + Color detailedHighlightedBgColor; + Color detailedSelectedBgColor; + + Color detailedRightNormalColor; + Color detailedRightDisabledColor; + Color detailedRightPressedColor; + Color detailedRightHighlightedColor; + Color detailedRightSelectedColor; + + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_NORMAL, detailedNormalBgColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_DISABLED, detailedDisabledBgColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_PRESSED, detailedPressedBgColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED, detailedHighlightedBgColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_SELECTED, detailedSelectedBgColor); + + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_NORMAL, detailedRightNormalColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_DISABLED, detailedRightDisabledColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_PRESSED, detailedRightPressedColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED, detailedRightHighlightedColor); + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED, detailedRightSelectedColor); + + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, detailedNormalBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedDisabledBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedPressedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedHighlightedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedSelectedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_SELECTED]); + + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleNormalEffectBitmap); + r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCirclePressedEffectBitmap); + + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightNormalColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_NORMAL]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightDisabledColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_DISABLED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightPressedColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_PRESSED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightHighlightedColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]); + r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightSelectedColor, __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; } @@ -1149,7 +1214,6 @@ _CheckButton::SetHighlightedTextColor(const Color& color) Color _CheckButton::GetHighlightedTextColor(void) const { - Variant color = GetProperty(L"highlightedTextColor"); return color.ToColor(); @@ -1164,7 +1228,6 @@ _CheckButton::SetSelectedTextColor(const Color& color) Color _CheckButton::GetSelectedTextColor(void) const { - Variant color = GetProperty(L"selectedTextColor"); return color.ToColor(); @@ -1599,7 +1662,7 @@ _CheckButton::GetCheckButtonStatus(void) const Bitmap* _CheckButton::GetMarkBgBitmap(_CheckButtonStatus checkButtonStatus) const { - return __pMarkBgNormalBitmap[checkButtonStatus]; + return __pMarkBgBitmap[checkButtonStatus]; } Bitmap* @@ -1611,7 +1674,7 @@ _CheckButton::GetMarkBitmap(_CheckButtonStatus checkButtonStatus) const Bitmap* _CheckButton::GetOnOffBgBitmap(_CheckButtonStatus checkButtonStatus) const { - return __pOnOffBgNormalBitmap[checkButtonStatus]; + return __pOnOffBgBitmap[checkButtonStatus]; } Bitmap* diff --git a/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp b/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp index 6f7d5ff..e95d734 100644 --- a/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp +++ b/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp @@ -545,6 +545,9 @@ _CheckButtonImpl::SetStyle(const CheckButtonStyle& checkButtonStyle, const Backg r = GetCore().SetGroupStyle(groupStyle); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + r = GetCore().LoadDefaultBitmap(); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + return r; } @@ -802,7 +805,6 @@ protected: if (r != E_SUCCESS) { - // SysLogExceptionxception( "[E_SYSTEM] UiBuilder::__MakeCheck: Failed to create Group(%s)",buffer); delete pCheck; delete pGroup; return null; diff --git a/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp index ddad176..c14c2bd 100644 --- a/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp +++ b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp @@ -242,24 +242,24 @@ _CheckButtonPresenter::DrawBackground(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF || checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) { - if (bounds.width < minDimension.width ) + if (bounds.width < minDimension.width) { bounds.width = minDimension.width; } - if (bounds.height < minDimension.height ) + if (bounds.height < minDimension.height) { bounds.height = minDimension.height; } } else { - if (bounds.width < minDimensionWithAnnex.width ) + if (bounds.width < minDimensionWithAnnex.width) { bounds.width = minDimensionWithAnnex.width; } - if (bounds.height < minDimensionWithAnnex.height ) + if (bounds.height < minDimensionWithAnnex.height) { bounds.height = minDimensionWithAnnex.height; } @@ -637,14 +637,14 @@ _CheckButtonPresenter::DrawCheckBitmap(void) GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED, detailedRightHighlightedColor); GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED, detailedRightSelectedColor); - Bitmap* pReColorCircleBitmap = null; - Bitmap* pReColorRightBitmap = null; - _CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus(); CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); CalculateButtonBounds(); + Canvas* pCircleCanvas = __pCheckButton->GetCanvasN(__detailedButtonBounds); + SysTryReturnVoidResult(NID_UI_CTRL, pCircleCanvas, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) @@ -658,45 +658,31 @@ _CheckButtonPresenter::DrawCheckBitmap(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { - Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); - Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightNormalBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightNormalBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); @@ -709,13 +695,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); @@ -744,24 +730,14 @@ _CheckButtonPresenter::DrawCheckBitmap(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { - Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED); - Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED); + Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); - if (pCircleDisabledBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedDisabledBgColor); - } - - if (pDetailedRightDisabledBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightDisabledColor); - } - - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); @@ -774,13 +750,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); @@ -809,45 +785,31 @@ _CheckButtonPresenter::DrawCheckBitmap(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { - Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); - Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCirclePressedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightPressedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCirclePressedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightPressedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); @@ -860,13 +822,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); @@ -894,63 +856,40 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgNormalBitmap); } - Bitmap* pReColorMarkBgHighlightedBitmap = null; - - if (pMarkBgHighlightedBitmap) - { - pReColorMarkBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pMarkBgHighlightedBitmap, - Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor); - } - - if (pReColorMarkBgHighlightedBitmap && __highlightedIndex == 1) + if (pMarkBgHighlightedBitmap && __highlightedIndex == 1) { - pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorMarkBgHighlightedBitmap); + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgHighlightedBitmap); } - delete pReColorMarkBgHighlightedBitmap; - if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { - 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* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightHighlightedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightHighlightedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); @@ -963,13 +902,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); @@ -986,19 +925,10 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - Bitmap* pReColorCircleHighlightedBitmap = null; - - if (pCircleHighlightedBitmap) - { - pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor); - } - - if (pReColorCircleHighlightedBitmap && __highlightedIndex == 2) + if (pCircleHighlightedBitmap && __highlightedIndex == 2) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap); + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap); } - - delete pReColorCircleHighlightedBitmap; } } else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) @@ -1012,45 +942,31 @@ _CheckButtonPresenter::DrawCheckBitmap(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) { - Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED); - Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleSelectedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightSelectedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleSelectedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor); - } - - if (pDetailedRightSelectedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); @@ -1063,13 +979,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); @@ -1096,45 +1012,31 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { - Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); - Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightNormalBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightNormalBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL); @@ -1147,13 +1049,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); @@ -1175,24 +1077,14 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { - Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED); - Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED); + Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); - if (pCircleDisabledBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedDisabledBgColor); - } - - if (pDetailedRightDisabledBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightDisabledColor); - } - - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED); @@ -1205,13 +1097,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); @@ -1233,45 +1125,31 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { - Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); - Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCirclePressedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightPressedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCirclePressedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightPressedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED); @@ -1284,13 +1162,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); @@ -1312,46 +1190,33 @@ _CheckButtonPresenter::DrawCheckBitmap(void) { if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { - 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* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightHighlightedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleNormalBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor); - } - - if (pDetailedRightHighlightedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED); @@ -1364,13 +1229,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); @@ -1387,64 +1252,41 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - Bitmap* pReColorCircleHighlightedBitmap = null; - - if (pCircleHighlightedBitmap) - { - pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor); - } - - if (pReColorCircleHighlightedBitmap && __highlightedIndex == 1) + if (pCircleHighlightedBitmap && __highlightedIndex == 1) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap); + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap); } - - delete pReColorCircleHighlightedBitmap; } } else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) { if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) { - Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED); - Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED); + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; Bitmap* pCircleEffectBitmap = null; Bitmap* pDetailedRightEffectBitmap = null; if (__detailedPressed == true) { - if (pCircleSelectedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor); - } - - if (pDetailedRightSelectedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); } else { - if (pCircleSelectedBitmap) - { - pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor); - } - - if (pDetailedRightSelectedBitmap) - { - pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor); - } + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); } - if (pReColorCircleBitmap) + if (pCircleBitmap) { - pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap); + pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap); } bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED); @@ -1457,13 +1299,13 @@ _CheckButtonPresenter::DrawCheckBitmap(void) } } - if (pReColorRightBitmap) + if (pDetailedRightBitmap) { - float arrowWidth = pReColorRightBitmap->GetWidthF(); - float arrowHeight = pReColorRightBitmap->GetHeightF(); + float arrowWidth = pDetailedRightBitmap->GetWidthF(); + float arrowHeight = pDetailedRightBitmap->GetHeightF(); pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f - , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap); + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap); } themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); @@ -1551,19 +1393,10 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffHighlightedBitmap); } - Bitmap* pReColorOnOffBgHighlightedBitmap = null; - - if (pOnOffBgHighlightedBitmap) - { - pReColorOnOffBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffBgHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor); - } - - if (pReColorOnOffBgHighlightedBitmap && __highlightedIndex == 1) + if (pOnOffBgHighlightedBitmap && __highlightedIndex == 1) { - pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorOnOffBgHighlightedBitmap); + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgHighlightedBitmap); } - - delete pReColorOnOffBgHighlightedBitmap; } else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) { @@ -1606,7 +1439,7 @@ _CheckButtonPresenter::DrawCheckBitmap(void) FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); - if (bounds.height < minDimension.height ) + if (bounds.height < minDimension.height) { bounds.height = minDimension.height; } @@ -1617,17 +1450,11 @@ _CheckButtonPresenter::DrawCheckBitmap(void) pCanvas->SetLineWidth(dividerWidth); pCanvas->DrawLine(FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin), FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin + bounds.height - dividerTopMargin * 2)); - - //pCanvas->SetForegroundColor(dividerRightColor); - //pCanvas->SetLineWidth(dividerWidth/2); - //pCanvas->DrawLine(FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin), - // FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin + bounds.height - dividerTopMargin * 2)); } } delete pCanvas; - delete pReColorCircleBitmap; - delete pReColorRightBitmap; + delete pCircleCanvas; return; } @@ -2062,7 +1889,7 @@ _CheckButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to } else { - if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false ) + if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false) { __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); } @@ -2084,7 +1911,7 @@ _CheckButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to { __detailedPressed = false; - if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false ) + if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false) { __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); } @@ -2139,8 +1966,6 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition) return; } - Bitmap* pReColorBgBitmap = null; - Color detailedHighlightedBgColor; GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED, detailedHighlightedBgColor); @@ -2230,15 +2055,9 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition) Bitmap* pOnOffSlidingOffHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); - if (pOnOffSlidingOffHandlerHighlightedBitmap) + if (pOnOffSlidingOffHandlerHighlightedBitmap && __highlightedIndex == 1) { - pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffSlidingOffHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), - detailedHighlightedBgColor); - } - - if (pReColorBgBitmap && __highlightedIndex == 1) - { - pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap); + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerHighlightedBitmap); } } else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) @@ -2326,15 +2145,9 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition) Bitmap* pOnOffSlidingOnHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); - if (pOnOffSlidingOnHandlerHighlightedBitmap) + if (pOnOffSlidingOnHandlerHighlightedBitmap && __highlightedIndex == 1) { - pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffSlidingOnHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), - detailedHighlightedBgColor); - } - - if (pReColorBgBitmap && __highlightedIndex == 1) - { - pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap); + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerHighlightedBitmap); } } else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) @@ -2356,7 +2169,6 @@ _CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition) } delete pCanvas; - delete pReColorBgBitmap; return; } @@ -2656,24 +2468,24 @@ _CheckButtonPresenter::CalculateTitleTextBounds(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF || checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) { - if (bounds.width < minDimension.width ) + if (bounds.width < minDimension.width) { bounds.width = minDimension.width; } - if (bounds.height < minDimension.height ) + if (bounds.height < minDimension.height) { bounds.height = minDimension.height; } } else { - if (bounds.width < minDimensionWithAnnex.width ) + if (bounds.width < minDimensionWithAnnex.width) { bounds.width = minDimensionWithAnnex.width; } - if (bounds.height < minDimensionWithAnnex.height ) + if (bounds.height < minDimensionWithAnnex.height) { bounds.height = minDimensionWithAnnex.height; } @@ -2740,24 +2552,24 @@ _CheckButtonPresenter::CalculateTextBounds(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF || checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) { - if (bounds.width < minDimension.width ) + if (bounds.width < minDimension.width) { bounds.width = minDimension.width; } - if (bounds.height < minDimension.height ) + if (bounds.height < minDimension.height) { bounds.height = minDimension.height; } } else { - if (bounds.width < minDimensionWithAnnex.width ) + if (bounds.width < minDimensionWithAnnex.width) { bounds.width = minDimensionWithAnnex.width; } - if (bounds.height < minDimensionWithAnnex.height ) + if (bounds.height < minDimensionWithAnnex.height) { bounds.height = minDimensionWithAnnex.height; } @@ -2853,24 +2665,24 @@ _CheckButtonPresenter::CalculateButtonBounds(void) if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF || checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) { - if (bounds.width < minDimension.width ) + if (bounds.width < minDimension.width) { bounds.width = minDimension.width; } - if (bounds.height < minDimension.height ) + if (bounds.height < minDimension.height) { bounds.height = minDimension.height; } } else { - if (bounds.width < minDimensionWithAnnex.width ) + if (bounds.width < minDimensionWithAnnex.width) { bounds.width = minDimensionWithAnnex.width; } - if (bounds.height < minDimensionWithAnnex.height ) + if (bounds.height < minDimensionWithAnnex.height) { bounds.height = minDimensionWithAnnex.height; } @@ -2930,7 +2742,7 @@ _CheckButtonPresenter::StartCheckAnimationTimer(void) result r = E_SUCCESS; if (__pCheckAnimationTimer == null) { - __pCheckAnimationTimer = new (std::nothrow) Timer; + __pCheckAnimationTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pCheckAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memroy allocation failed."); r = __pCheckAnimationTimer->Construct(*this); diff --git a/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp index 4b89d7f..5609be7 100644 --- a/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp +++ b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp @@ -90,12 +90,12 @@ void _ColorChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _IColorChangeEventListener* pColorChangeListener = dynamic_cast <_IColorChangeEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, (pColorChangeListener != null), E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The _IColorChangeEventListener instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pColorChangeListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _IColorChangeEventListener instance is null."); const _ColorChangeEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The _ColorChangeEventArg instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _ColorChangeEventArg instance is null."); pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor())); @@ -106,8 +106,8 @@ _ColorChangeEvent* _ColorChangeEvent::CreateInstanceN(const _Control& source) { _ColorChangeEvent* pColorChangeEvent = new (std::nothrow) _ColorChangeEvent(source); - SysTryReturn(NID_UI_CTRL, (pColorChangeEvent != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pColorChangeEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { @@ -122,8 +122,8 @@ IEventArg* _ColorChangeEvent::CreateColorChangeEventArgN(const Color& color) { _ColorChangeEventArg* pEventArg = new (std::nothrow) _ColorChangeEventArg(color); - SysTryReturn(NID_UI_CTRL, (pEventArg != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[$s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_ColorPicker.cpp b/src/ui/controls/FUiCtrl_ColorPicker.cpp index f4454c5..25ff65e 100644 --- a/src/ui/controls/FUiCtrl_ColorPicker.cpp +++ b/src/ui/controls/FUiCtrl_ColorPicker.cpp @@ -109,30 +109,45 @@ _ColorPicker::CreateColorPickerN(void) result r = E_SUCCESS; Dimension colorPickerSize; _VisualElement* pBase = null; + int leftRightMargin = 0; - r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, _ControlManager::GetInstance()->GetOrientation(), colorPickerSize); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the default ColorPicker size from config file."); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerSize.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the default ColorPicker height from config file."); + + r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the ColorPicker margin from config file."); + + if (_ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin; + } + else + { + colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin; + } - _ColorPicker* pColorPicker = new (std::nothrow) _ColorPicker; - SysTryReturn(NID_UI_CTRL, (pColorPicker != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _ColorPicker* pColorPicker = new (std::nothrow) _ColorPicker(); + SysTryReturn(NID_UI_CTRL, pColorPicker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pColorPicker->AcquireHandle(); pColorPicker->__pColorPickerPresenter = _ColorPickerPresenter::CreateInstanceN(*pColorPicker); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pColorPicker->__pColorPickerPresenter != null), , r, + SysTryCatch(NID_UI_CTRL, pColorPicker->__pColorPickerPresenter != null, , r, "[%s] Propagating.", GetErrorMessage(r)); pColorPicker->__pColorChangeEvent = _ColorChangeEvent::CreateInstanceN(*pColorPicker); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pColorPicker->__pColorChangeEvent != null), , r, + SysTryCatch(NID_UI_CTRL, pColorPicker->__pColorChangeEvent != null, , r, "[%s] Propagating.", GetErrorMessage(r)); pBase = pColorPicker->GetVisualElement(); - SysTryCatch(NID_UI_CTRL, (pBase != null), r = E_SYSTEM, E_SYSTEM, + SysTryCatch(NID_UI_CTRL, pBase != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the ColorPicker visual element."); // Set alpha merge to VisualElement @@ -140,7 +155,7 @@ _ColorPicker::CreateColorPickerN(void) pColorPicker->SetBackgroundColor(Color()); r = pColorPicker->SetSize(colorPickerSize); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pColorPicker->SetResizable(false); @@ -331,7 +346,7 @@ _ColorPicker::OnAttachedToMainTree(void) __pHueHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); } - SysTryReturnResult(NID_UI_CTRL, (__pHueHandler != null), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, __pHueHandler != null, E_SYSTEM, "A system error has occurred. Failed to create hue handler."); handlerType = SAT_HANDLER; @@ -341,7 +356,7 @@ _ColorPicker::OnAttachedToMainTree(void) __pSaturationHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); } - SysTryReturnResult(NID_UI_CTRL, (__pSaturationHandler != null), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, __pSaturationHandler != null, E_SYSTEM, "A system error has occurred. Failed to create saturation handler."); handlerType = LUM_HANDLER; @@ -351,7 +366,7 @@ _ColorPicker::OnAttachedToMainTree(void) __pLuminanceHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); } - SysTryReturnResult(NID_UI_CTRL, (__pLuminanceHandler != null), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, __pLuminanceHandler != null, E_SYSTEM, "A system error has occurred. Failed to create luminance handler."); return E_SUCCESS; @@ -370,7 +385,7 @@ _ColorPicker::InitializeAccessibilityElement(void) if (pContainer != null) { __pHueBarElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pHueBarElement->SetName(L"ColorPickerColorSlider"); __pHueBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_COLOUR_CONTROL_SLIDER_T_TALKBACK"); @@ -384,10 +399,10 @@ _ColorPicker::InitializeAccessibilityElement(void) __pHueBarElement->SetValue(hueValue); __pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pSaturationBarElement->SetName(L"ColorPickerSaturationSlider"); - __pSaturationBarElement->SetTrait(L"Saturation Slider"); + __pSaturationBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_SATURATION_CONTROL_SLIDER_T_TALKBACK"); __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)); @@ -398,10 +413,10 @@ _ColorPicker::InitializeAccessibilityElement(void) __pSaturationBarElement->SetValue(saturationValue); __pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pLuminanceBarElement->SetName(L"ColorPickerBrightnessSlider"); - __pLuminanceBarElement->SetTrait(L"Luminance Slider"); + __pLuminanceBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BRIGHTNESS_CONTROL_SLIDER_T_TALKBACK"); __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)); @@ -442,7 +457,7 @@ _ColorPicker::AddColorChangeEventListener(const _IColorChangeEventListener& list { result r = __pColorChangeEvent->AddListener(listener); - SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_ALREADY_EXIST), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The _IColorChangeEventListener instance already exists in the event listener list."); return r; @@ -453,7 +468,7 @@ _ColorPicker::RemoveColorChangeEventListener(const _IColorChangeEventListener& l { result r = __pColorChangeEvent->RemoveListener(listener); - SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_NOT_FOUND), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The _IColorChangeEventListener instance does not exist in the event listener list."); return r; @@ -464,7 +479,7 @@ _ColorPicker::FireColorChangeEvent(const Color& color) { IEventArg* pEventArg = _ColorChangeEvent::CreateColorChangeEventArgN(color); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pEventArg != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pColorChangeEvent->Fire(*pEventArg); diff --git a/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp index 46839cc..3525025 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp @@ -30,6 +30,8 @@ #include "FUiCtrl_PublicColorChangeEvent.h" using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -39,10 +41,23 @@ _ColorPickerImpl::ColorPickerSizeInfo::GetDefaultMaximumSize(_ControlOrientation { result r = E_SUCCESS; Dimension colorPickerMaxSize; + int leftRightMargin = 0; - r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerMaxSize); + r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerMaxSize.height); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMaxSize, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMaxSize, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + colorPickerMaxSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin; + } + else + { + colorPickerMaxSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin; + } + return colorPickerMaxSize; } @@ -51,10 +66,23 @@ _ColorPickerImpl::ColorPickerSizeInfo::GetDefaultMinimumSize(_ControlOrientation { result r = E_SUCCESS; Dimension colorPickerMinSize; + int leftRightMargin = 0; + + r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerMinSize.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMinSize, r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerMinSize); + r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMinSize, r, "[%s] Propagating.", GetErrorMessage(r)); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + colorPickerMinSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin; + } + else + { + colorPickerMinSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin; + } + return colorPickerMinSize; } @@ -88,39 +116,42 @@ _ColorPickerImpl* _ColorPickerImpl::CreateColorPickerImplN(ColorPicker& control) { ClearLastResult(); + int leftRightMargin = 0; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + _ColorPicker* pCore = _ColorPicker::CreateColorPickerN(); - if (pCore == null) - { - return null; - } + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); _ColorPickerImpl* pImpl = new (std::nothrow) _ColorPickerImpl(control, *pCore); result r = CheckConstruction(pCore, pImpl); - if (r != E_SUCCESS) - { - return null; - } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); Dimension defaultSize; - r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, pCore->GetOrientation(), defaultSize); - if (r != E_SUCCESS) + r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, defaultSize.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { - goto CATCH; + defaultSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin; } - - r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(ColorPicker), defaultSize, pCore->GetOrientation()); - if (r != E_SUCCESS) + else { - goto CATCH; + defaultSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin; } + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(ColorPicker), defaultSize, orientation); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + return pImpl; CATCH: delete pImpl; return null; } -const Tizen::Graphics::Color +const Color _ColorPickerImpl::GetColor(void) const { ClearLastResult(); @@ -153,7 +184,7 @@ _ColorPickerImpl::GetLuminance(void) const } result -_ColorPickerImpl::SetColor(const Tizen::Graphics::Color& color) +_ColorPickerImpl::SetColor(const Color& color) { ClearLastResult(); Variant varColor(color); @@ -189,23 +220,23 @@ _ColorPickerImpl::SetLuminance(int luminance) } result -_ColorPickerImpl::AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener) +_ColorPickerImpl::AddColorChangeEventListener(IColorChangeEventListener& listener) { ClearLastResult(); result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (__pPublicColorChangeEvent != null), E_SYSTEM, "A system error has occurred. The _PublicColorChangeEvent instance is null."); + SysTryReturnResult(NID_UI_CTRL, __pPublicColorChangeEvent != null, E_SYSTEM, "A system error has occurred. The _PublicColorChangeEvent instance is null."); r = __pPublicColorChangeEvent->AddListener(listener); - SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_ALREADY_EXIST), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The IColorChangeEventListener instance already exists in the event listener list."); return r; } result -_ColorPickerImpl::RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener) +_ColorPickerImpl::RemoveColorChangeEventListener(IColorChangeEventListener& listener) { ClearLastResult(); result r = E_SUCCESS; @@ -214,7 +245,7 @@ _ColorPickerImpl::RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventLis r = __pPublicColorChangeEvent->RemoveListener(listener); - SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_NOT_FOUND), E_SYSTEM, + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The IColorChangeEventListener instance does not exist in the event listener list."); return r; @@ -251,9 +282,9 @@ _ColorPickerImpl::GetPublicClassName(void) const } void -_ColorPickerImpl::OnColorChanged(const Tizen::Ui::_Control& source, const Tizen::Graphics::Color& color) +_ColorPickerImpl::OnColorChanged(const _Control& source, const Color& color) { - Tizen::Base::Runtime::IEventArg * pColorChangeEventArg = _PublicColorChangeEvent::CreateColorChangeEventArgN(color); + IEventArg* pColorChangeEventArg = _PublicColorChangeEvent::CreateColorChangeEventArgN(color); if (pColorChangeEventArg == null) { return; @@ -295,12 +326,12 @@ protected: FloatRectangle rect; GetProperty(pControl, &pControlProperty); - SysTryReturn(NID_UI_CTRL, (pControlProperty != null), null, E_SYSTEM, + SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to read the attributes."); - pColorPicker = new (std::nothrow) ColorPicker; - SysTryReturn(NID_UI_CTRL, (pColorPicker != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + pColorPicker = new (std::nothrow) ColorPicker(); + SysTryReturn(NID_UI_CTRL, pColorPicker != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); rect = pControlProperty->GetRectF(); diff --git a/src/ui/controls/FUiCtrl_ColorPickerModel.cpp b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp index fc71abb..224088c 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerModel.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp @@ -54,9 +54,9 @@ _ColorPickerModel::~_ColorPickerModel() _ColorPickerModel* _ColorPickerModel::CreateInstanceN(void) { - _ColorPickerModel* pColorPickerModel = new (std::nothrow) _ColorPickerModel; - SysTryReturn(NID_UI_CTRL, (pColorPickerModel != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + _ColorPickerModel* pColorPickerModel = new (std::nothrow) _ColorPickerModel(); + SysTryReturn(NID_UI_CTRL, pColorPickerModel != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { diff --git a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp index 73881ca..d0b57ae 100644 --- a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp @@ -184,15 +184,15 @@ _ColorPickerPresenter* _ColorPickerPresenter::CreateInstanceN(_ColorPicker& colorPicker) { _ColorPickerPresenter* pColorPickerPresenter = new (std::nothrow) _ColorPickerPresenter(colorPicker); - SysTryReturn(NID_UI_CTRL, (pColorPickerPresenter != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pColorPickerPresenter != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pColorPickerPresenter->__pColorPickerModel = _ColorPickerModel::CreateInstanceN(); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pColorPickerPresenter->__pColorPickerModel != null), , r, + SysTryCatch(NID_UI_CTRL, pColorPickerPresenter->__pColorPickerModel != null, , r, "[%s] Propagating.", GetErrorMessage(r)); // Set initial value. @@ -215,16 +215,17 @@ _ColorPickerPresenter::CreateHandlerN(_VisualElement& rootElement, _ColorPickerC Canvas* pCanvas = null; float handlerWidth = 0.0f; float handlerHeight = 0.0f; + bool isCustomBitmap = false; result r = E_SUCCESS; FloatRectangle handlerBounds = __componentBounds[handlerType]; FloatRectangle bounds = __pColorPicker->GetClientBoundsF(); - _VisualElement* pHandler = new (std::nothrow) _VisualElement; - SysTryReturn(NID_UI_CTRL, (pHandler != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + _VisualElement* pHandler = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, pHandler != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pHandler->Construct(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); GET_SHAPE_CONFIG(COLORPICKER::HANDLER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, handlerWidth); GET_SHAPE_CONFIG(COLORPICKER::HANDLER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, handlerHeight); @@ -239,15 +240,16 @@ _ColorPickerPresenter::CreateHandlerN(_VisualElement& rootElement, _ColorPickerC pHandler->SetSurfaceOpaque(false); r = rootElement.AttachChild(*pHandler); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pCanvas = pHandler->GetCanvasN(); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); pCanvas->SetBackgroundColor(Color()); pCanvas->Clear(); - DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, handlerWidth, handlerHeight), __pHandlerBitmap); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_NORMAL); + DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, handlerWidth, handlerHeight), __pHandlerBitmap, isCustomBitmap, true); delete pCanvas; @@ -329,8 +331,8 @@ _ColorPickerPresenter::SetColor(const Color& color) result _ColorPickerPresenter::SetHue(int hue) { - SysTryReturn(NID_UI_CTRL, (hue <= MAX_VALUE_DEGREE && hue >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. Hue value is invalid."); + SysTryReturnResult(NID_UI_CTRL, (hue <= MAX_VALUE_DEGREE && hue >= 0), E_INVALID_ARG, + "Invalid argument is used. Hue value (%d) is invalid.", hue); __pColorPickerModel->SetHue((double)hue / MAX_VALUE_DEGREE); SetHandlerPositionByRatio(HUE_HANDLER, __pColorPickerModel->GetHue()); @@ -341,8 +343,8 @@ _ColorPickerPresenter::SetHue(int hue) result _ColorPickerPresenter::SetSaturation(int saturation) { - SysTryReturn(NID_UI_CTRL, (saturation <= MAX_VALUE_DEGREE && saturation >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. Saturation value is invalid."); + SysTryReturnResult(NID_UI_CTRL, (saturation <= MAX_VALUE_DEGREE && saturation >= 0), E_INVALID_ARG, + "Invalid argument is used. Saturation value (%d) is invalid.", saturation); __pColorPickerModel->SetSaturation((double)saturation / MAX_VALUE_DEGREE); SetHandlerPositionByRatio(SAT_HANDLER, __pColorPickerModel->GetSaturation()); @@ -353,8 +355,8 @@ _ColorPickerPresenter::SetSaturation(int saturation) result _ColorPickerPresenter::SetLuminance(int luminance) { - SysTryReturn(NID_UI_CTRL, (luminance <= MAX_VALUE_DEGREE && luminance >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. Luminance value is invalid."); + SysTryReturnResult(NID_UI_CTRL, (luminance <= MAX_VALUE_DEGREE && luminance >= 0), E_INVALID_ARG, + "Invalid argument is used. Luminance value (%d) is invalid.", luminance); __pColorPickerModel->SetLuminance((double)luminance / MAX_VALUE_DEGREE); SetHandlerPositionByRatio(LUM_HANDLER, __pColorPickerModel->GetLuminance()); @@ -366,7 +368,6 @@ void _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds) { const int _BLOCK_COUNT = 3; - float arrowButtonLeftMargin = 0.0f; float arrowButtonTopMargin = 0.0f; float barTopMargin = 0.0f; float barLeftRightMargin = 0.0f; @@ -375,7 +376,6 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTTON_LEFT_MARGIN, orientation, arrowButtonLeftMargin); GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTON_TOP_MARGIN, orientation, arrowButtonTopMargin); GET_SHAPE_CONFIG(COLORPICKER::BAR_TOP_MARGIN, orientation, barTopMargin); GET_SHAPE_CONFIG(COLORPICKER::BAR_LEFT_RIGHT_MARGIN, orientation, barLeftRightMargin); @@ -383,11 +383,8 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds GET_FIXED_VALUE_CONFIG(COLORPICKER::BLOCK_MARGIN, orientation, __blockMargin); GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, __blockHeight); GET_SHAPE_CONFIG(COLORPICKER::DIVIDER_MARGIN, orientation, __dividerMargin); - GET_SHAPE_CONFIG(COLORPICKER::DIVIDER_WIDTH, orientation, __dividerWidth); - - __blockMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(__blockMargin); - __dividerMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(__dividerMargin); + __blockMargin = CoordinateSystem::ConvertToLogicalY(__blockMargin); __topMargin = (controlBounds.height - __blockHeight * _BLOCK_COUNT) / 2.0f; if (__topMargin < 0) @@ -412,29 +409,33 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds GET_SHAPE_CONFIG(COLORPICKER::BAR_WIDTH, orientation, sliderWidth); + float colorpickerWidth = __pColorPicker->GetBoundsF().width; + __dividerWidth = colorpickerWidth - 2 * __dividerMargin; + //Set contents position - __componentBounds[HUE_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); + __componentBounds[HUE_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY, sliderWidth, sliderHeight); - __componentBounds[HUE_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY, sliderWidth, sliderHeight); + __componentBounds[HUE_ARROWLEFT].SetBounds(__componentBounds[HUE_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight); __componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barLeftRightMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); btnStartY += __blockHeight; - __componentBounds[SAT_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); - __componentBounds[SAT_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight, - sliderWidth, sliderHeight); + __componentBounds[SAT_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY + __blockHeight, sliderWidth, sliderHeight); + + __componentBounds[SAT_ARROWLEFT].SetBounds(__componentBounds[SAT_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight); __componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barLeftRightMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); btnStartY += __blockHeight; - __componentBounds[LUM_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); - __componentBounds[LUM_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight * 2, + __componentBounds[LUM_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY + __blockHeight * 2, sliderWidth, sliderHeight); + __componentBounds[LUM_ARROWLEFT].SetBounds(__componentBounds[LUM_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight); + __componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barLeftRightMargin, btnStartY, arrowButtonWidth, arrowButtonHeight); @@ -465,7 +466,22 @@ void _ColorPickerPresenter::OnChangeLayout(_ControlOrientation orientation) { FloatDimension colorPickerSize; - result r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerSize); + int margin = 0; + result r = E_SUCCESS; + + r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, margin); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r)); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * margin; + } + else + { + colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * margin; + } + + r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerSize.height); if (r == E_SUCCESS && colorPickerSize != __pColorPicker->GetSizeF()) { @@ -485,11 +501,9 @@ _ColorPickerPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& if (__eventType >= HUE_ARROWLEFT && __eventType <= LUM_ARROWRIGHT) { FloatRectangle buttonBounds = __componentBounds[__eventType]; - Canvas* pCanvas = __pColorPicker->GetCanvasN(buttonBounds); + Canvas* pCanvas = __pColorPicker->GetCanvasN(); if (pCanvas != null) { - buttonBounds.x = 0; - buttonBounds.y = 0; DrawArrowButton(*pCanvas, buttonBounds, true, IsLeftButton(__eventType)); delete pCanvas; __pColorPicker->UpdateView(); @@ -498,7 +512,7 @@ _ColorPickerPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& if (__pSlideTimer == null) { - __pSlideTimer = new (std::nothrow) Timer; + __pSlideTimer = new (std::nothrow) Timer(); if (__pSlideTimer == null) { return false; @@ -589,16 +603,6 @@ _ColorPickerPresenter::LoadResource(void) Color buttonBgPressedColor; Color buttonBgDisabledColor; Color handlerHighlightedColor; - Bitmap* pBgNormalBitmap = null; - Bitmap* pBgPressedBitmap = null; - Bitmap* pBgDisabledBitmap = null; - Bitmap* pLeftArrowNormalBitmap = null; - Bitmap* pLeftArrowPressedBitmap = null; - Bitmap* pLeftArrowDisabledBitmap = null; - Bitmap* pRightArrowNormalBitmap = null; - Bitmap* pRightArrowPressedBitmap = null; - Bitmap* pRightArrowDisabledBitmap = null; - Bitmap* pHandlerHighlightedBitmap = null; r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_BG_NORMAL, buttonBgNormalColor); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -622,140 +626,71 @@ _ColorPickerPresenter::LoadResource(void) SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::HUE_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHueSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::BAR_BG_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCustomBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::LUMINANCE_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLuminanceSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::SATURATION_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSaturationSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::HUE_BAR_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeHueSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::BAR_BG_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeCustomBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::LUMINANCE_BAR_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeLuminanceSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::SATURATION_BAR__LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeSaturationSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBgNormalBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBgPressedBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pBgDisabledBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pNormalEffectBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pPressedEffectBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisabledEffectBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowNormalBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgNormalColor, __pColorNormalReplacementBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowPressedBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgPressedColor, __pColorPressedReplacementBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowDisabledBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgDisabledColor, __pColorDisabledReplacementBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowNormalBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalColor, __pLeftArrowNormalBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowPressedBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pLeftArrowPressedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowDisabledBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledColor, __pLeftArrowDisabledBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(COLORPICKER::HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHandlerHighlightedBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalColor, __pRightArrowNormalBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pColorNormalReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgNormalColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pColorNormalReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pRightArrowPressedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pColorPressedReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgPressedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pColorPressedReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pColorDisabledReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgDisabledColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pColorDisabledReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pLeftArrowNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pLeftArrowNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledColor, __pRightArrowDisabledBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pLeftArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pLeftArrowPressedBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pLeftArrowDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pLeftArrowDisabledBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pRightArrowNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pRightArrowNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pRightArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pRightArrowPressedBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pRightArrowDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pRightArrowDisabledBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handlerHighlightedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pFocusBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, handlerHighlightedColor, __pFocusBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(COLORPICKER::HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - delete pBgNormalBitmap; - pBgNormalBitmap = null; - - delete pBgPressedBitmap; - pBgPressedBitmap = null; - - delete pBgDisabledBitmap; - pBgDisabledBitmap = null; + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pLeftArrowNormalBitmap; - pLeftArrowNormalBitmap = null; - - delete pLeftArrowPressedBitmap; - pLeftArrowPressedBitmap = null; - - delete pLeftArrowDisabledBitmap; - pLeftArrowDisabledBitmap = null; - - delete pRightArrowNormalBitmap; - pRightArrowNormalBitmap = null; - - delete pRightArrowPressedBitmap; - pRightArrowPressedBitmap = null; - - delete pRightArrowDisabledBitmap; - pRightArrowDisabledBitmap = null; - - delete pHandlerHighlightedBitmap; - pHandlerHighlightedBitmap = null; return r; @@ -772,33 +707,6 @@ CATCH: delete __pSaturationSliderBgBitmap; __pSaturationSliderBgBitmap = null; - delete pBgNormalBitmap; - pBgNormalBitmap = null; - - delete pBgPressedBitmap; - pBgPressedBitmap = null; - - delete pBgDisabledBitmap; - pBgDisabledBitmap = null; - - delete pLeftArrowNormalBitmap; - pLeftArrowNormalBitmap = null; - - delete pLeftArrowPressedBitmap; - pLeftArrowPressedBitmap = null; - - delete pLeftArrowDisabledBitmap; - pLeftArrowDisabledBitmap = null; - - delete pRightArrowNormalBitmap; - pRightArrowNormalBitmap = null; - - delete pRightArrowPressedBitmap; - pRightArrowPressedBitmap = null; - - delete pRightArrowDisabledBitmap; - pRightArrowDisabledBitmap = null; - delete __pColorNormalReplacementBgBitmap; __pColorNormalReplacementBgBitmap = null; @@ -838,9 +746,6 @@ CATCH: delete __pFocusBitmap; __pFocusBitmap = null; - delete pHandlerHighlightedBitmap; - pHandlerHighlightedBitmap = null; - return r; } @@ -864,6 +769,7 @@ result _ColorPickerPresenter::DrawFocus(_ColorPickerComponentType currentFocusedIndex, _ColorPickerComponentType prevFocusIndex) { result r = E_SUCCESS; + bool isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_HIGHLIGHTED); if (prevFocusIndex != HSL_NOT) { @@ -874,28 +780,28 @@ _ColorPickerPresenter::DrawFocus(_ColorPickerComponentType currentFocusedIndex, { case HUE_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN(); r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pFocusBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pFocusBitmap, isCustomBitmap, true); delete pCanvas; } break; case SAT_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN(); r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pFocusBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pFocusBitmap, isCustomBitmap, true); delete pCanvas; } break; case LUM_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN(); r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pFocusBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pFocusBitmap, isCustomBitmap, true); delete pCanvas; } break; @@ -910,39 +816,40 @@ result _ColorPickerPresenter::ClearFocus(_ColorPickerComponentType index) { result r = E_SUCCESS; + bool isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_NORMAL); switch (index) { case HUE_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN(); r = GetLastResult(); - SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating."); pCanvas->SetBackgroundColor(Color()); pCanvas->Clear(); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pHandlerBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true); delete pCanvas; } break; case SAT_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN(); r = GetLastResult(); - SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating."); pCanvas->SetBackgroundColor(Color()); pCanvas->Clear(); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pHandlerBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true); delete pCanvas; } break; case LUM_HANDLER: { - Canvas *pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN(); + Canvas* pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN(); r = GetLastResult(); - SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating."); pCanvas->SetBackgroundColor(Color()); pCanvas->Clear(); - r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pHandlerBitmap); + r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true); delete pCanvas; } break; @@ -963,12 +870,12 @@ _ColorPickerPresenter::DrawHueSlider(Canvas& canvas) if (__pHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_PORTRAIT) { r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pHueSliderBgBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else if (__pLandscapeHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE) { r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pLandscapeHueSliderBgBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } return r; @@ -988,25 +895,25 @@ _ColorPickerPresenter::DrawLuminanceSlider(Canvas& canvas) { pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetSaturationColor()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating."); r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], pColorReplacementBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLuminanceSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } else if (__pLandscapeCustomBitmap != null && __pLandscapeLuminanceSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE) { pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pLandscapeCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetSaturationColor()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating."); r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], pColorReplacementBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLandscapeLuminanceSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } __saturationColor = __pColorPickerModel->GetSaturationColor(); @@ -1038,25 +945,25 @@ _ColorPickerPresenter::DrawSaturationSlider(Canvas& canvas) { pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetHueColor()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating."); r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], pColorReplacementBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pSaturationSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } else if (__pLandscapeCustomBitmap != null && __pLandscapeSaturationSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE) { pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pLandscapeCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetHueColor()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating."); r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], pColorReplacementBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pLandscapeSaturationSliderBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } __hueColor = __pColorPickerModel->GetHueColor(); @@ -1088,39 +995,39 @@ _ColorPickerPresenter::DrawLine(Canvas& canvas) Color dividerBottomHalfColor; r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_TOP_HALF, dividerTopHalfColor); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_BOTTOM_HALF, dividerBottomHalfColor); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); canvas.SetForegroundColor(dividerTopHalfColor); canvas.SetLineStyle(LINE_STYLE_SOLID); - FloatPoint startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight - __blockMargin)); - FloatPoint endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight - __blockMargin)); + FloatPoint startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight - __blockMargin)); + FloatPoint endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight - __blockMargin)); r = canvas.DrawLine(startPoint, endPoint); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f) - __blockMargin)); - endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f) - __blockMargin)); + startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f) - __blockMargin)); + endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f) - __blockMargin)); r = canvas.DrawLine(startPoint, endPoint); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); canvas.SetForegroundColor(dividerBottomHalfColor); - startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight)); - endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight)); + startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight)); + endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight)); r = canvas.DrawLine(startPoint, endPoint); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f))); - endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f))); + startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f))); + endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f))); r = canvas.DrawLine(startPoint, endPoint); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); canvas.SetForegroundColor(foregroundColor); @@ -1148,72 +1055,78 @@ _ColorPickerPresenter::DrawArrowButton(Canvas& canvas, const FloatRectangle& rcB { 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)); + r = DrawResourceBitmap(canvas, rcButton, __pColorDisabledReplacementBgBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pDisabledEffectBgBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } if (drawLeftButton) { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowDisabledBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowDisabledBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowDisabledBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowDisabledBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } } else if (isSelected) { isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_PRESSED); - r = DrawResourceBitmap(canvas, rcButton, __pColorPressedReplacementBgBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = DrawResourceBitmap(canvas, rcButton, __pColorPressedReplacementBgBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pPressedEffectBgBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } if (drawLeftButton) { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowPressedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowPressedBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowPressedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowPressedBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } } else { isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_NORMAL); - r = DrawResourceBitmap(canvas, rcButton, __pColorNormalReplacementBgBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = DrawResourceBitmap(canvas, rcButton, __pColorNormalReplacementBgBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (!isCustomBitmap) { r = DrawResourceBitmap(canvas, rcButton, __pNormalEffectBgBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } if (drawLeftButton) { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowNormalBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowNormalBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { - r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } } @@ -1261,7 +1174,7 @@ _ColorPickerPresenter::MoveHandler(_ColorPickerComponentType handlerType) FloatRectangle bounds = __pColorPicker->GetClientBoundsF(); FloatRectangle& handlerBounds = __componentBounds[handlerType]; - pHandler->SetBounds(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerBounds.width, handlerBounds.height)); + pHandler->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerBounds.width, handlerBounds.height))); return r; } @@ -1519,23 +1432,53 @@ _ColorPickerPresenter::GetTouchActionType(const FloatPoint& position) const } result -_ColorPickerPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +_ColorPickerPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap, bool isHandlerBitmap) { result r = E_SUCCESS; + Canvas *pCanvas = null; - SysTryReturn(NID_UI_CTRL, pBitmap != null, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument is used. Provided bitmap is null."); + SysTryReturnResult(NID_UI_CTRL, pBitmap != null, E_INVALID_ARG, "Invalid argument is used. Provided bitmap is null."); if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) { r = canvas.DrawNinePatchedBitmap(CoordinateSystem::AlignToDevice(bounds), *pBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { - r = canvas.DrawBitmap(CoordinateSystem::AlignToDevice(bounds), *pBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + FloatPoint position; + position.x = bounds.x; + position.y = bounds.y; + + if (isCustomBitmap) + { + position.x = (bounds.width - pBitmap->GetWidthF()) / 2; + position.y = (bounds.height - pBitmap->GetHeightF()) / 2; + } + + if (!isHandlerBitmap && isCustomBitmap) + { + pCanvas = __pColorPicker->GetCanvasN(bounds); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(position), *pBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pCanvas; + pCanvas = null; + } + else + { + r = canvas.DrawBitmap(CoordinateSystem::AlignToDevice(position), *pBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } } return r; +CATCH: + delete pCanvas; + pCanvas = null; + + return r; } }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ContextMenu.cpp b/src/ui/controls/FUiCtrl_ContextMenu.cpp index 4b78b3b..2e6f1d8 100644 --- a/src/ui/controls/FUiCtrl_ContextMenu.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenu.cpp @@ -39,6 +39,7 @@ using namespace Tizen::Graphics; using namespace Tizen::Media; using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui; namespace { static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; @@ -65,6 +66,7 @@ _ContextMenu::_ContextMenu(const FloatPoint& point, enum ContextMenuCoreStyle st , __pActionEvent(null) , __pBackgroundNormalBitmap(null) , __pBackgroundEffectBitmap(null) + , __pPressedBitmap(null) , __dropPosition(CONTEXT_MENU_CORE_DROP_POSITION_INVALID) , __pCurrentFrame(null) , __layout(_CONTROL_ORIENTATION_PORTRAIT) @@ -122,6 +124,12 @@ _ContextMenu::~_ContextMenu(void) __pBackgroundEffectBitmap = null; } + if (__pPressedBitmap != null) + { + delete __pPressedBitmap; + __pPressedBitmap = null; + } + if (__pActionEvent) { delete __pActionEvent; @@ -146,7 +154,7 @@ _ContextMenu* _ContextMenu::CreateContextMenuN(const FloatPoint& point, enum ContextMenuCoreStyle style, enum ContextMenuCoreAlign contextMenuAlign) { _ContextMenu* pContextMenu = new (std::nothrow) _ContextMenu(point, style, contextMenuAlign); - SysTryReturn(NID_UI_CTRL, pContextMenu != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pContextMenu != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = E_SUCCESS; @@ -180,7 +188,8 @@ _ContextMenu::CreateContextMenuN(const FloatPoint& point, enum ContextMenuCoreSt pContextMenu->__pScrollPanel->SetFocusable(false); _Scroll* pScroll = pContextMenu->__pScrollPanel->GetScrollBar(); - SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[E_INVALID_STATE] _Scroll isn't constructed"); + SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, + "[%s] pScroll is in invalid state. _Scroll is not constructed.", GetErrorMessage(E_INVALID_STATE)); pScroll->SetContextMenuScrollType(true); pContextMenu->AttachChild(*(pContextMenu->__pScrollPanel)); @@ -207,15 +216,15 @@ _ContextMenu::Install(void) // load bitmap of a background and arrow r = LoadBitmap(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to load bitmap."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); r = __actionId.Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct arraylist."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct arraylist."); if (__style == CONTEXT_MENU_CORE_STYLE_LIST) { _IContextMenuPresenter* pPresenter = new (std::nothrow) _ContextMenuListPresenter(this); - SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed."); SetPresenter(*pPresenter); @@ -224,7 +233,7 @@ _ContextMenu::Install(void) else { _IContextMenuPresenter* pPresenter = new (std::nothrow) _ContextMenuGridPresenter(this); - SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed."); SetPresenter(*pPresenter); @@ -246,7 +255,7 @@ _ContextMenu::Initialize(void) Color itemTextSelectedColor; r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "SetBounds failed."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); SetMovable(false); SetResizable(false); @@ -301,7 +310,7 @@ _ContextMenu::OnAttachedToMainTree(void) if (pOwner == null) { __pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); - SysTryReturn(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Current frame instance is not available."); + SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Failed to get current frame instance."); _Form* pForm = __pCurrentFrame->GetCurrentForm(); pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame); @@ -358,8 +367,9 @@ _ContextMenu::OnAttachedToMainTree(void) __pContextMenuPresenter->CalculateShowItemCount(); } + __pContextMenuPresenter->CalculateItemMaximumWidth(); r = __pContextMenuPresenter->CalculateWindowRect(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); if (__pScrollPanel != null) { @@ -381,8 +391,6 @@ _ContextMenu::OnAttachedToMainTree(void) GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); - SetAllAccessibilityElement(); - _VisualElement* pVisualElement = GetVisualElement(); FloatRectangle pBounds = pVisualElement->GetBounds(); float oldBoundsX = pBounds.x; @@ -482,12 +490,15 @@ _ContextMenu::AddItem(const Base::String& text, int actionId, const Bitmap* pNor result r = E_SUCCESS; r = __pContextMenuPresenter->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); __actionId.Add(actionId); - __pContextMenuPresenter->CalculateShowItemCount(); - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } return r; } @@ -500,12 +511,15 @@ _ContextMenu::InsertItem(int index, const Base::String& text, int actionId, cons result r = E_SUCCESS; r = __pContextMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to insert a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item."); __actionId.InsertAt(actionId, index); - __pContextMenuPresenter->CalculateShowItemCount(); - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } return r; } @@ -517,11 +531,14 @@ _ContextMenu::SetItem(int index, const Base::String& text, int actionId, const B result r = E_SUCCESS; r = __pContextMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); __actionId.SetAt(actionId, index); - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateWindowRect(); + } return r; } @@ -532,12 +549,15 @@ _ContextMenu::RemoveItemAt(int index) result r = E_SUCCESS; r = __pContextMenuPresenter->DeleteItem(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item."); __actionId.RemoveAt(index); - __pContextMenuPresenter->CalculateShowItemCount(); - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } return r; } @@ -548,12 +568,15 @@ _ContextMenu::RemoveAllItems(void) result r = E_SUCCESS; r = __pContextMenuPresenter->DeleteItemAll(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove all items."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove all items."); __actionId.RemoveAll(); - __pContextMenuPresenter->CalculateShowItemCount(); - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } return r; } @@ -587,6 +610,7 @@ _ContextMenu::GetItemActionIdAt(int index) const { int count = __actionId.GetCount(); int actionId = -1; + result r = E_SUCCESS; if (count <= 0 || index >= count) @@ -611,7 +635,10 @@ _ContextMenu::SetAnchorPosition(float x, float y) AdjustDropPosition(); } - __pContextMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateWindowRect(); + } return E_SUCCESS; } @@ -682,12 +709,7 @@ _ContextMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) { int showCount = count.ToInt(); - if (showCount < 1) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Count is invalid."); - return E_INVALID_ARG; - } - + SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid."); __showItemCount = showCount; @@ -697,7 +719,7 @@ _ContextMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) Variant _ContextMenu::GetPropertyMaxVisibleItemsCount(void) const { - return Tizen::Ui::Variant(__showItemCount); + return Variant(__showItemCount); } int @@ -720,12 +742,12 @@ _ContextMenu::SetShowItemCount(int count) result r; r = SetProperty("maxVisibleItemsCount", Variant(count)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set property."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set show item count."); - if (__style == CONTEXT_MENU_CORE_STYLE_LIST) + if (__style == CONTEXT_MENU_CORE_STYLE_LIST && __isAttachedToMainTree) { r = __pContextMenuPresenter->CalculateWindowRect(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to calculate window."); } return E_SUCCESS; @@ -744,7 +766,7 @@ _ContextMenu::SetPropertyColor(const Variant& color) Variant _ContextMenu::GetPropertyColor(void) const { - return Tizen::Ui::Variant(__backgroundColor); + return Variant(__backgroundColor); } result @@ -772,7 +794,7 @@ _ContextMenu::SetPropertyNormalItemColor(const Variant& color) Variant _ContextMenu::GetPropertyNormalItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); } result @@ -786,7 +808,7 @@ _ContextMenu::SetPropertyPressedItemColor(const Variant& color) Variant _ContextMenu::GetPropertyPressedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); } result @@ -800,7 +822,7 @@ _ContextMenu::SetPropertyHighlightedItemColor(const Variant & color) Variant _ContextMenu::GetPropertyHighlightedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); } result @@ -862,7 +884,7 @@ _ContextMenu::SetPropertyNormalItemTextColor(const Variant& color) Variant _ContextMenu::GetPropertyNormalItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); } result @@ -876,7 +898,7 @@ _ContextMenu::SetPropertyPressedItemTextColor(const Variant& color) Variant _ContextMenu::GetPropertyPressedItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); } result @@ -890,7 +912,7 @@ _ContextMenu::SetPropertyHighlightedItemTextColor(const Variant & color) Variant _ContextMenu::GetPropertyHighlightedItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); } result @@ -942,18 +964,17 @@ _ContextMenu::GetTextColor(enum ContextMenuCoreItemStatus status) const } result -_ContextMenu::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener) +_ContextMenu::AddActionEventListener(const _IActionEventListener& listener) { result r = E_SUCCESS; if (__pActionEvent == null) { __pActionEvent = _ActionEvent::CreateInstanceN(*this); - SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient.") + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating.") r = __pActionEvent->AddListener(listener); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove an action event listener.") + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener.") } return r; @@ -965,20 +986,20 @@ CATCH: } result -_ContextMenu::RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener) +_ContextMenu::RemoveActionEventListener(const _IActionEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, E_INVALID_STATE, - "[E_INVALID_STATE] The action event instance isn't constructed.") + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, + "__pActionEvent must not be null.") result r = E_SUCCESS; r = __pActionEvent->RemoveListener(listener); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener") + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener.") return r; } -Tizen::Ui::Controls::_ActionEvent* +_ActionEvent* _ContextMenu::GetActionEvent(void) const { return __pActionEvent; @@ -1048,10 +1069,8 @@ CATCH: } result -_ContextMenu::LoadColorReplacedBitmap(const Tizen::Graphics::Color& color) +_ContextMenu::LoadColorReplacedBitmap(const Color& color) { - Bitmap* ptempNormalBitmap = null; - // Delete old bitmap if (__pBackgroundNormalBitmap != null) { @@ -1069,54 +1088,30 @@ _ContextMenu::LoadColorReplacedBitmap(const Tizen::Graphics::Color& color) } result r; - r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP] != null, , GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; - ptempNormalBitmap = null; - - r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN] != null, , GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; - ptempNormalBitmap = null; - - r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); + + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_UP, BITMAP_PIXEL_FORMAT_ARGB8888,color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP]); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); + + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN]); + r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT] != null, , GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; - ptempNormalBitmap = null; - - r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); + + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT]); + r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT] != null, , GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; - ptempNormalBitmap = null; - - r = GET_BITMAP_CONFIG_N(CONTEXTMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); + + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT]); + r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - __pBackgroundNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pBackgroundNormalBitmap != null, , GetLastResult(), "[%s] Propagating.", - GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; + + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBackgroundNormalBitmap); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); return r; CATCH: - delete ptempNormalBitmap; - delete __pBackgroundNormalBitmap; __pBackgroundNormalBitmap = null; @@ -1151,6 +1146,16 @@ _ContextMenu::GetArrowEffectBitmap(ContextMenuCoreDropPosition dropPosition) con return __pArrowEffectBitmap[dropPosition]; } +Bitmap* +_ContextMenu::GetPressedBitmap(void) +{ + result r; + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED], __pPressedBitmap); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + return __pPressedBitmap; +} + const Bitmap* _ContextMenu::GetBackgroundNormalBitmap(void) const { @@ -1275,7 +1280,7 @@ _ContextMenu::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinf } void -_ContextMenu::OnFontChanged(Tizen::Graphics::Font* pFont) +_ContextMenu::OnFontChanged(Font* pFont) { return __pContextMenuPresenter->OnFontChanged(pFont); } @@ -1381,6 +1386,21 @@ _ContextMenu::OnFocusModeStateChanged(void) __pContextMenuPresenter->OnFocusModeStateChanged(); } +bool +_ContextMenu::OnFocusGained(const _Control& source) +{ + __pContextMenuPresenter->OnFocusGained(source); + + return true; +} + +bool +_ContextMenu::OnFocusLost(const _Control& source) +{ + __pContextMenuPresenter->OnFocusLost(source); + + return true; +} _AccessibilityElement* _ContextMenu::GetAccessibilityElement(const int mainIndex) const { diff --git a/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp index 0fd3fdb..991d43d 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp @@ -31,7 +31,6 @@ #include "FUi_ResourceManager.h" #include "FUiCtrl_ActionEvent.h" #include "FUiCtrl_IActionEventListener.h" - #include "FUiCtrl_ContextMenuGridPresenter.h" using namespace Tizen::Graphics; @@ -85,6 +84,7 @@ _ContextMenuGridPresenter::_ContextMenuGridPresenter(_ContextMenu* pContextMenu) , __enterKeyPressed(false) , __backKeyPressed(false) , __focusedIndex(-1) + , __focusLost(false) { } @@ -114,22 +114,23 @@ _ContextMenuGridPresenter::Install(void) LoadShape(); - __pModel = new (std::nothrow) _ContextMenuModel; - SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + __pModel = new (std::nothrow) _ContextMenuModel(); + SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pModel->Construct(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pFont = __pContextMenu->GetFallbackFont(); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, (__pFont != null), , r, "[%s] Propagating.", GetErrorMessage(r)); __pTextObject = new (std::nothrow) TextObject(); - SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance."); + SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTextObject->Construct(); __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); return r; @@ -181,10 +182,10 @@ _ContextMenuGridPresenter::LoadShape(void) } _ContextMenuItem* -_ContextMenuGridPresenter::CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuGridPresenter::CreateItemN(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { _ContextMenuItem* pItem = _ContextMenuItem::CreateContextMenuItemN(); - SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult())); ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_NONE; result r = E_SUCCESS; @@ -241,12 +242,12 @@ _ContextMenuGridPresenter::CreateItem(const Base::String& text, int actionId, co } result -_ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { - _ContextMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + _ContextMenuItem* pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->AddItem(pItem); @@ -260,76 +261,74 @@ _ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const if (r != E_SUCCESS) { result rt = __pModel->RemoveItem(__pModel->GetItemCount() - 1); - SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); } return r; } result -_ContextMenuGridPresenter::InsertItem(int index, const Tizen::Base::String& text, int actionId, - const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuGridPresenter::InsertItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { - if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG, + "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null."); _ContextMenuItem* pItem = null; - pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = __pModel->InsertItem(pItem, index); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to insert item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to insert item."); } r = AdjustItemLayout(); if (r != E_SUCCESS) { result rt = __pModel->RemoveItem(index); - SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to insert item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); } return E_SUCCESS; } result -_ContextMenuGridPresenter::SetItem(int index, const Tizen::Base::String& text, int actionId, - const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuGridPresenter::SetItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { - if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG, + "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null."); _ContextMenuItem* pItem = null; - pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + + pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); + result r = __pModel->SetItem(pItem, index); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to set item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to set item."); } r = AdjustItemLayout(); if (r != E_SUCCESS) { result rt = __pModel->RemoveItem(index); - SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to set item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); } return E_SUCCESS; @@ -340,14 +339,11 @@ _ContextMenuGridPresenter::DeleteItem(int index) { int itemCount = __pContextMenu->GetItemCount(); - if (itemCount <= 0 || index >= itemCount || index < 0) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, itemCount > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Itemcount must be > 0."); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < itemCount , E_INVALID_ARG, "Invalid argument is used. Index (%d) is not valid", index); result r = __pModel->RemoveItem(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); return r; } @@ -357,14 +353,10 @@ _ContextMenuGridPresenter::DeleteItemAll(void) { int itemCount = __pContextMenu->GetItemCount(); - if (itemCount <= 0) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, itemCount > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Itemcount must be > 0."); result r = __pModel->RemoveAllItem(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete all items."); return r; } @@ -428,12 +420,13 @@ _ContextMenuGridPresenter::CalculateWindowRect(void) result r = E_SUCCESS; r = AdjustItemLayout(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = CalculateRect(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); AdjustItemPosition(); + SetAllAccessibilityElement(); return r; } @@ -447,10 +440,10 @@ _ContextMenuGridPresenter::ApplyColorProperty(void) result _ContextMenuGridPresenter::CalculateRect(void) { - Tizen::Graphics::FloatRectangle windowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself - Tizen::Graphics::FloatRectangle bodyRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window - Tizen::Graphics::FloatRectangle arrowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window - Tizen::Graphics::FloatRectangle itemRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window + FloatRectangle windowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself + FloatRectangle bodyRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window + FloatRectangle arrowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window + FloatRectangle itemRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window float bodyTopMargin = __topMargin; float bodyBottomMargin = __bottomMargin; @@ -465,6 +458,7 @@ _ContextMenuGridPresenter::CalculateRect(void) FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition(); FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) { screen.SetSize(screen.height, screen.width); @@ -823,7 +817,7 @@ _ContextMenuGridPresenter::AdjustItemLayout(void) return GetLastResult(); } -Tizen::Graphics::FloatDimension +FloatDimension _ContextMenuGridPresenter::AdjustItemLayoutIconStyle(void) { ClearLastResult(); @@ -834,11 +828,8 @@ _ContextMenuGridPresenter::AdjustItemLayoutIconStyle(void) float itemHeight = __itemHeight + __itemGap; FloatDimension layoutSize(0.0f, 0.0f); - if (itemCount > MAX_ITEM_COUNT) - { - SetLastResult(E_MAX_EXCEEDED); - return layoutSize; - } + SysTryReturn(NID_UI_CTRL, itemCount <= MAX_ITEM_COUNT, layoutSize, E_MAX_EXCEEDED, + "[%s] ItemCount exceeds the maximum limit.", GetErrorMessage(E_MAX_EXCEEDED)); countPerLine = GetCountPerLine(itemCount); @@ -931,7 +922,7 @@ _ContextMenuGridPresenter::AdjustItemLayoutIconStyle(void) } -Tizen::Graphics::FloatDimension +FloatDimension _ContextMenuGridPresenter::AdjustItemLayoutTabStyle(void) { ClearLastResult(); @@ -1157,7 +1148,7 @@ _ContextMenuGridPresenter::GetCountPerLine(int count) const } int -_ContextMenuGridPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const +_ContextMenuGridPresenter::GetItemIndexFromPosition(const FloatPoint& point) const { int index = -1; int itemCount = __pModel->GetItemCount(); @@ -1197,34 +1188,35 @@ _ContextMenuGridPresenter::Draw(void) result r = E_SUCCESS; Canvas* pCanvas = __pContextMenu->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); // Clear canvas for drawing area of the ContextMenu. pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); - Tizen::Graphics::FloatRectangle bounds(__pContextMenu->GetWindowRect()); - pCanvas->Clear(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + FloatRectangle bounds(__pContextMenu->GetWindowRect()); + pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); r = DrawBackground(pCanvas); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw background."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r)); r = DrawArrow(pCanvas); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw arrow."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw arrow.", GetErrorMessage(r)); r = DrawItem(pCanvas); +CATCH: delete pCanvas; - return r; } result _ContextMenuGridPresenter::DrawBackground(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); result r = E_SUCCESS; - Tizen::Graphics::FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); + FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap(); const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap(); @@ -1253,10 +1245,10 @@ _ContextMenuGridPresenter::DrawBackground(Canvas* pCanvas) result _ContextMenuGridPresenter::DrawArrow(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); result r = E_SUCCESS; - Tizen::Graphics::FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); + FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition); @@ -1276,9 +1268,9 @@ _ContextMenuGridPresenter::DrawArrow(Canvas* pCanvas) } result -_ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) +_ContextMenuGridPresenter::DrawItem(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); result r = E_SUCCESS; TextSimple* pSimpleText = null; @@ -1353,11 +1345,14 @@ _ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) { FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED; - Bitmap* bgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pItem->GetMagentaBgBitmap()), Color::GetColor(COLOR_ID_MAGENTA), pressedColor); - SysTryReturn(NID_UI_CTRL, bgBitmap, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap); - delete bgBitmap; + Bitmap* bgBitmap = __pContextMenu->GetPressedBitmap(); + + if (bgBitmap != null) + { + DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap); + } + bgBitmap = null; } @@ -1365,7 +1360,7 @@ _ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) __pTextObject->RemoveAll(); pSimpleText = new (std::nothrow)TextSimple(const_cast (text.GetPointer()), text.GetLength()); - SysTryReturn(NID_UI_CTRL, pSimpleText != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "Memory allocation failed."); __pTextObject->AppendElement(*pSimpleText); __pTextObject->SetForegroundColor(__pContextMenu->GetTextColor(itemStatus), 0, __pTextObject->GetTextLength()); @@ -1389,18 +1384,21 @@ _ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) { FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); itemStatus = CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED; - Bitmap* bgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pItem->GetMagentaBgBitmap()), Color::GetColor(COLOR_ID_MAGENTA), pressedColor); - SysTryReturn(NID_UI_CTRL, bgBitmap, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap); - delete bgBitmap; + Bitmap* bgBitmap = __pContextMenu->GetPressedBitmap(); + + if (bgBitmap != null) + { + DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap); + } + bgBitmap = null; } const Bitmap* pBitmap = pItem->GetBitmap(itemStatus); if (pBitmap != null) { - DrawBitmap(*pCanvas, drawRect, *pBitmap); + DrawBitmap(*pCanvas, drawRect, *pBitmap, true); } } @@ -1410,22 +1408,15 @@ _ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) 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); - SysTryReturn(NID_UI_CTRL, pTempBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - if (r == E_SUCCESS) + result r = GET_REPLACED_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, pBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); + if (pBitmap != null) { - pBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); - if (pBitmap != null) - { - DrawBitmap(*pCanvas, pressedDrawRect, *pBitmap); - } + DrawBitmap(*pCanvas, pressedDrawRect, *pBitmap); } - delete pTempBitmap; - pTempBitmap = null; - delete pBitmap; pBitmap = null; } @@ -1436,9 +1427,9 @@ _ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) } result -_ContextMenuGridPresenter::DrawLine(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatPoint point1, Tizen::Graphics::FloatPoint point2, bool drawVLine) +_ContextMenuGridPresenter::DrawLine(Canvas* pCanvas, FloatPoint point1, FloatPoint point2, bool drawVLine) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); result r = E_SUCCESS; @@ -1516,8 +1507,20 @@ _ContextMenuGridPresenter::OnTouchReleased(const _Control& source, const _TouchI if (__touchOutRect == true) { - __pContextMenu->SetFocused(false); - __pContextMenu->SetVisibleState(false); + FloatRectangle itemRect = __pContextMenu->GetItemRect(); + if (!itemRect.Contains(touchPosition) || __focusLost) + { + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + return true; + } + else + { + __pContextMenu->SetFocused(true); + } } int currentSelectedIndex = GetItemIndexFromPosition(touchPosition); @@ -1565,6 +1568,11 @@ _ContextMenuGridPresenter::OnTouchReleased(const _Control& source, const _TouchI __pContextMenu->SetVisibleState(false); pActionEvent->Fire(*pEventArg); } + else + { + __selectedIndex = -1; + Draw(); + } return true; } @@ -1863,6 +1871,20 @@ _ContextMenuGridPresenter::OnFocusModeStateChanged(void) Draw(); } +bool +_ContextMenuGridPresenter::OnFocusGained(const _Control& source) +{ + __focusLost = false; + return true; +} + +bool +_ContextMenuGridPresenter::OnFocusLost(const _Control& source) +{ + __focusLost = true; + return true; +} + void _ContextMenuGridPresenter::OnFontChanged(Font* pFont) { @@ -1883,12 +1905,14 @@ _ContextMenuGridPresenter::SetAllAccessibilityElement(void) if (pContainer != null) { _AccessibilityElement* pElementContextMenu = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pElementContextMenu->SetSupportOperatingGesture(false); + pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); - pElementContextMenu->SetHint(L"double tap to close"); - pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height)); + pElementContextMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS"); + + pElementContextMenu->SetBounds(FloatRectangle(__pContextMenu->GetItemRect().x, __pContextMenu->GetItemRect().y, __pContextMenu->GetItemRect().width, __pContextMenu->GetItemRect().height)); pContainer->AddElement(*pElementContextMenu); __pContextMenu->AddAccessibilityElement(*pElementContextMenu); @@ -1902,14 +1926,14 @@ _ContextMenuGridPresenter::SetAllAccessibilityElement(void) pElement->SetName(L"ContextMenuItem" + Integer::ToString(i)); if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) { - pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON"); + pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON."); } else { pElement->SetLabel(pItem->GetText()); } - pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS."); pElement->SetBounds(pItem->GetDrawRect()); pContainer->AddElement(*pElement); __pContextMenu->AddAccessibilityElement(*pElement); @@ -1952,18 +1976,23 @@ _ContextMenuGridPresenter::SetTopDrawnItemIndex(int index) } result -_ContextMenuGridPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap) +_ContextMenuGridPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap, bool isAppBitmap) { result r = E_SUCCESS; if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) { r = canvas.DrawNinePatchedBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap.") + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepatched bitmap."); } - else + else if (isAppBitmap) { r = canvas.DrawBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.") + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap."); + } + else + { + r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap."); } return r; diff --git a/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp b/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp index 0c51a08..595414b 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp @@ -30,6 +30,7 @@ using namespace Tizen::App; using namespace Tizen::Base; using namespace Tizen::Graphics; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -107,7 +108,7 @@ _ContextMenuImpl::CreateContextMenuImplN(ContextMenu* pPublic, const FloatPoint& } _ContextMenu* pCore = _ContextMenu::CreateContextMenuN(point, coreStyle, contextMenuAlign); - SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Propogating.", GetErrorMessage(GetLastResult())); _ContextMenuImpl* pImpl = new (std::nothrow) _ContextMenuImpl(pPublic, pCore, style); r = CheckConstruction(pCore, pImpl); @@ -137,35 +138,29 @@ _ContextMenuImpl::_Dispose(void) } result -_ContextMenuImpl::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuImpl::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); } result -_ContextMenuImpl::InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuImpl::InsertItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); } result -_ContextMenuImpl::SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuImpl::SetItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); } @@ -174,11 +169,9 @@ _ContextMenuImpl::RemoveItemAt(int index) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - if (index >= GetItemCount() || index < 0) { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index); + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] The specified index is not valid(index = %d).", GetErrorMessage(E_OUT_OF_RANGE), index); // E_OUT_OF_RANGE is for API version 2.0 over return (_AppInfo::GetApiVersion() <= _API_VERSION_2_0 && _AppInfo::IsOspCompat())?E_SYSTEM:E_OUT_OF_RANGE; @@ -192,8 +185,6 @@ _ContextMenuImpl::RemoveAllItems(void) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->RemoveAllItems(); } @@ -202,19 +193,15 @@ _ContextMenuImpl::SetAnchorPosition(float x, float y) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->SetAnchorPosition(x, y); } -Tizen::Graphics::FloatPoint +FloatPoint _ContextMenuImpl::GetAnchorPosition(void) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - - Tizen::Graphics::FloatPoint point; + FloatPoint point; point = __pContextMenu->GetAnchorPosition(); return point; @@ -225,8 +212,6 @@ _ContextMenuImpl::GetItemCount(void) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->GetItemCount(); } @@ -235,8 +220,6 @@ _ContextMenuImpl::SetMaxVisibleItemsCount(int maxItemsCount) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->SetShowItemCount(maxItemsCount); } @@ -245,8 +228,6 @@ _ContextMenuImpl::GetMaxVisibleItemsCount(void) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->GetShowItemCount(); } @@ -255,8 +236,6 @@ _ContextMenuImpl::GetItemIndexFromActionId(int actionId) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->GetItemIndexAt(actionId); } @@ -265,8 +244,6 @@ _ContextMenuImpl::GetItemActionIdAt(int index) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->GetItemActionIdAt(index); } @@ -275,34 +252,28 @@ _ContextMenuImpl::SetColor(const Graphics::Color& color) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - result r = E_SUCCESS; r = __pContextMenu->SetColor(color); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set color."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set color."); return r; } -Tizen::Graphics::Color +Color _ContextMenuImpl::GetColor(void) const { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - return __pContextMenu->GetColor(); } result -_ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color) +_ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Color& color) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - result r = E_SUCCESS; switch (status) @@ -320,7 +291,7 @@ _ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Gr break; default: - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at ContextMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); r = E_INVALID_ARG; break; } @@ -329,14 +300,14 @@ _ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Gr } -Tizen::Graphics::Color +Color _ContextMenuImpl::GetItemTextColor(ContextMenuItemStatus status) const { ClearLastResult(); SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::Color color(0, 0, 0, 0); + Color color(0, 0, 0, 0); switch (status) { @@ -353,7 +324,7 @@ _ContextMenuImpl::GetItemTextColor(ContextMenuItemStatus status) const break; default: - SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at ContextMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); break; } return color; @@ -361,7 +332,7 @@ _ContextMenuImpl::GetItemTextColor(ContextMenuItemStatus status) const } result -_ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color) +_ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Color& color) { ClearLastResult(); @@ -384,7 +355,7 @@ _ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphi break; default: - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at ContextMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); r = E_INVALID_ARG; break; } @@ -393,14 +364,14 @@ _ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphi } -Tizen::Graphics::Color +Color _ContextMenuImpl::GetItemColor(ContextMenuItemStatus status) const { ClearLastResult(); SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - Tizen::Graphics::Color color(0, 0, 0, 0); + Color color(0, 0, 0, 0); switch (status) { @@ -417,7 +388,7 @@ _ContextMenuImpl::GetItemColor(ContextMenuItemStatus status) const break; default: - SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at ContextMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); break; } @@ -433,52 +404,48 @@ _ContextMenuImpl::GetPublicStyle(void) const } result -_ContextMenuImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) +_ContextMenuImpl::AddActionEventListener(IActionEventListener& listener) { ClearLastResult(); - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); - result r = E_SUCCESS; if (__pPublicActionEvent == null) { __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, GetLastResult(),"Propagating."); } r = __pPublicActionEvent->AddListener(listener); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add an action event listener."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener."); r = __pContextMenu->AddActionEventListener(*this); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add an action event listener."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener."); return r; } result -_ContextMenuImpl::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener) +_ContextMenuImpl::RemoveActionEventListener(IActionEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_INVALID_STATE, E_INVALID_STATE, - "[E_INVALID_STATE] This instance isn't constructed.") - SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); + SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, E_INVALID_STATE, + "__pPublicActionEvent must not be null.") result r = E_SUCCESS; r = __pPublicActionEvent->RemoveListener(listener); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener."); r = __pContextMenu->RemoveActionEventListener(*this); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener."); return r; } void -_ContextMenuImpl::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId) +_ContextMenuImpl::OnActionPerformed(const _Control& source, int actionId) { ClearLastResult(); diff --git a/src/ui/controls/FUiCtrl_ContextMenuItem.cpp b/src/ui/controls/FUiCtrl_ContextMenuItem.cpp index c8a878d..0b16123 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuItem.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuItem.cpp @@ -54,7 +54,8 @@ _ContextMenuItem::_ContextMenuItem(void) , __bgPressedMargin(0.0f) , __textSize(0.0f) , __text(L"") - , __pMagentaBgBitmap(null) + , __pNormalBgBitmap(null) + , __pSelectedBgBitmap(null) , __size(FloatDimension(0.0f, 0.0f)) , __drawRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __pBitmapLabel(null) @@ -75,7 +76,7 @@ _ContextMenuItem::_ContextMenuItem(void) GET_COLOR_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED, __selectedBgColor); GET_COLOR_CONFIG(CONTEXTMENU::LIST_ITEM_DIVIDER_01_NORMAL, __lowerDividerLineColor); // lower divider of item n and GET_COLOR_CONFIG(CONTEXTMENU::LIST_ITEM_DIVIDER_02_NORMAL, __upperDividerLineColor); // upper divider of item n+1 are bonded together. - GET_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagentaBgBitmap); + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap); InitializeAccessibilityElement(); } @@ -114,8 +115,11 @@ _ContextMenuItem::~_ContextMenuItem(void) __pBackgroundLabel = null; } - delete __pMagentaBgBitmap; - __pMagentaBgBitmap = null; + delete __pNormalBgBitmap; + __pNormalBgBitmap = null; + + delete __pSelectedBgBitmap; + __pSelectedBgBitmap = null; if (__pLowerDividerLineLabel != null) { @@ -153,11 +157,7 @@ _ContextMenuItem::CreateContextMenuItemN(void) _ContextMenuItem* pItem = null; pItem = new (std::nothrow) _ContextMenuItem(); - if (pItem == null) - { - SetLastResult(E_OUT_OF_MEMORY); - return null; - } + SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pItem->AcquireHandle(); @@ -173,7 +173,7 @@ _ContextMenuItem::InitializeAccessibilityElement(void) { pContainer->Activate(true); _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); @@ -251,35 +251,29 @@ _ContextMenuItem::SetTextSize(float size) } result -_ContextMenuItem::SetText(const Tizen::Base::String& text) +_ContextMenuItem::SetText(const String& text) { - if (text.GetLength() <= 0) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, text.GetLength() > 0, E_INVALID_ARG, "Invalid argument is used. Length of text must be greater than 0"); __text = text; return E_SUCCESS; } -const Tizen::Base::String& +const String& _ContextMenuItem::GetText(void) const { return __text; } result -_ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap) +_ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Bitmap* pBitmap) { - if (status < CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || status > CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, (status >= CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL && status <= CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED), + E_INVALID_ARG, "Invalid argument is used. The status is not valid."); - SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), E_INVALID_ARG, - E_INVALID_ARG, - "[E_INVALID_ARG] The normal bitmap must not be null."); + SysTryReturnResult(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), + E_INVALID_ARG, "Invalid argument is used. The normal bitmap must not be null."); Bitmap* pClonedBitmap = _BitmapImpl::CloneN(*pBitmap); @@ -295,7 +289,7 @@ _ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Tizen::Gr return E_SUCCESS; } -const Tizen::Graphics::Bitmap* +const Bitmap* _ContextMenuItem::GetBitmap(ContextMenuItemDrawingStatus status) const { if (status < CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || status > CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED) @@ -307,43 +301,49 @@ _ContextMenuItem::GetBitmap(ContextMenuItemDrawingStatus status) const } void -_ContextMenuItem::SetSize(Tizen::Graphics::FloatDimension size) +_ContextMenuItem::SetSize(FloatDimension size) { __size = size; } -Tizen::Graphics::FloatDimension +FloatDimension _ContextMenuItem::GetSize(void) const { return __size; } void -_ContextMenuItem::SetDrawRect(Tizen::Graphics::FloatRectangle rect) +_ContextMenuItem::SetDrawRect(FloatRectangle rect) { __drawRect = rect; } -Tizen::Graphics::FloatRectangle +FloatRectangle _ContextMenuItem::GetDrawRect(void) const { return __drawRect; } void -_ContextMenuItem::SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect) +_ContextMenuItem::SetPressedDrawRect(FloatRectangle rect) { __pressedDrawRect = rect; } -Tizen::Graphics::FloatRectangle +FloatRectangle _ContextMenuItem::GetPressedDrawRect(void) const { return __pressedDrawRect; } +void +_ContextMenuItem::SetPressedItemColor(Color color) +{ + __selectedBgColor = color; +} + int _ContextMenuItem::Release(void) { @@ -397,7 +397,7 @@ _ContextMenuItem::DrawItemUpperDivider(void) if (__pUpperDividerLineLabel == null) { __pUpperDividerLineLabel = _Label::CreateLabelN(); - SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); AttachChild(*__pUpperDividerLineLabel); @@ -427,7 +427,7 @@ _ContextMenuItem::DrawItemBackground(void) if (__pBackgroundLabel == null) { __pBackgroundLabel = _Label::CreateLabelN(); - SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); __pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); AttachChild(*__pBackgroundLabel); @@ -440,12 +440,6 @@ _ContextMenuItem::DrawItemBackground(void) } } - Color color= Color(0, 0, 0, 0); - if (__selected == true) - { - color = __selectedBgColor; - } - FloatRectangle bounds = GetBoundsF(); _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent()); FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF(); @@ -472,12 +466,15 @@ _ContextMenuItem::DrawItemBackground(void) __pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedMargin, topMargin, bounds.width - __bgPressedMargin * 2.0f, bounds.height - topMargin - bottomMargin)); - Bitmap* BgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagentaBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryReturnVoidResult(NID_UI_CTRL, BgBitmap, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - __pBackgroundLabel->SetBackgroundBitmap(*BgBitmap); - delete BgBitmap; - BgBitmap = null; + if (__selected) + { + GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedBgColor, __pSelectedBgBitmap); + __pBackgroundLabel->SetBackgroundBitmap(*__pSelectedBgBitmap); + } + else + { + __pBackgroundLabel->SetBackgroundBitmap(*__pNormalBgBitmap); + } __pBackgroundLabel->Invalidate(); } @@ -491,7 +488,7 @@ _ContextMenuItem::DrawItemLowerDivider(void) if (__pLowerDividerLineLabel == null) { __pLowerDividerLineLabel = _Label::CreateLabelN(); - SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); AttachChild(*__pLowerDividerLineLabel); @@ -611,7 +608,7 @@ _ContextMenuItem::TouchMoved(const _Control& source, const _TouchInfo& touchinfo } void -_ContextMenuItem::OnFontChanged(Tizen::Graphics::Font* pFont) +_ContextMenuItem::OnFontChanged(Font* pFont) { String fontName = _Control::GetFont(); @@ -654,10 +651,4 @@ _ContextMenuItem::SetAndInvalidate(bool flag) Invalidate(); } -const Tizen::Graphics::Bitmap* -_ContextMenuItem::GetMagentaBgBitmap() const -{ - return __pMagentaBgBitmap; -} - }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp index 21a608f..539fe01 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp @@ -42,8 +42,6 @@ using namespace Tizen::Graphics::_Text; namespace { static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; -static const int CONTEXT_MENU_LIST_ELEMENT_TEXT = 0; -static const int CONTEXT_MENU_LIST_ELEMENT_BITMAP = 1; } namespace Tizen { namespace Ui { namespace Controls @@ -86,6 +84,7 @@ _ContextMenuListPresenter::_ContextMenuListPresenter(_ContextMenu* pContextMenu) , __enterKeyPressed(false) , __backKeyPressed(false) , __focusedIndex(-1) + , __focusLost(false) { } @@ -108,11 +107,11 @@ _ContextMenuListPresenter::Install(void) LoadShape(); - __pModel = new (std::nothrow) _ContextMenuModel; - SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + __pModel = new (std::nothrow) _ContextMenuModel(); + SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pModel->Construct(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = GetLastResult(), GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); __pFont = __pContextMenu->GetFallbackFont(); r = GetLastResult(); @@ -164,10 +163,10 @@ _ContextMenuListPresenter::LoadShape(void) } _ContextMenuItem* -_ContextMenuListPresenter::CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuListPresenter::CreateItemN(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { _ContextMenuItem* pItem = _ContextMenuItem::CreateContextMenuItemN(); - SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult())); ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT; _Label* pLabel = null; @@ -187,7 +186,7 @@ _ContextMenuListPresenter::CreateItem(const Base::String& text, int actionId, co pLabel->SetBackgroundBitmap(*pNormalBitmap); pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); - int bitmapY = (__itemHeight - __itemBitmapHeight ) / 2; + int bitmapY = (__itemHeight - __itemBitmapHeight) / 2; pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight)); pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); pItem->AttachChild(*pLabel); @@ -302,77 +301,77 @@ _ContextMenuListPresenter::CalculateItemSize(const String &text, ContextMenuItem } result -_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, - const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { - _ContextMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + _ContextMenuItem* pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->AddItem(pItem); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } return r; } result -_ContextMenuListPresenter::InsertItem(int index, const Tizen::Base::String& text, int actionId, - const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuListPresenter::InsertItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { - if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null) - { - return E_INVALID_ARG; - } + + SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG, + "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null."); _ContextMenuItem* pItem = null; - pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->InsertItem(pItem, index); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } return E_SUCCESS; } result -_ContextMenuListPresenter::SetItem(int index, const Tizen::Base::String& text, int actionId, - const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, - const Tizen::Graphics::Bitmap* pHighlightedBitmap) +_ContextMenuListPresenter::SetItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) { _ContextMenuItem* pItem = null; result r = E_SUCCESS; - if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG, + "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null."); pItem = __pModel->GetItem(index); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "Failed to get the item."); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the item."); - r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item."); + if (pItem->HasParent()) + { + r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item."); + } - pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); r = __pModel->SetItem(pItem, index); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } CalculateItemMaximumWidth(); @@ -386,21 +385,20 @@ _ContextMenuListPresenter::DeleteItem(int index) _ContextMenuItem* pItem = null; result r = E_SUCCESS; - if (__pContextMenu->GetItemCount() <= 0) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, __pContextMenu->GetItemCount() > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Item count is less than or equal to zero."); pItem = __pModel->GetItem(index); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "Failed to get the item."); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the item."); - r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item."); + if (pItem->HasParent()) + { + r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item."); + } r = __pModel->RemoveItem(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); CalculateItemMaximumWidth(); @@ -410,16 +408,12 @@ _ContextMenuListPresenter::DeleteItem(int index) result _ContextMenuListPresenter::DeleteItemAll(void) { - if (__pContextMenu->GetItemCount() <= 0) - { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument."); - return E_INVALID_STATE; - } + SysTryReturnResult(NID_UI_CTRL, __pContextMenu->GetItemCount() > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Item count is less than or equal to zero."); __pContextMenu->GetScrollPanel()->DetachAllChildren(); result r = __pModel->RemoveAllItem(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item all."); return r; } @@ -441,6 +435,7 @@ _ContextMenuListPresenter::CalculateWindowRect(void) { result r = CalculateRect(); AdjustItemPosition(); + SetAllAccessibilityElement(); return r; } @@ -448,6 +443,19 @@ _ContextMenuListPresenter::CalculateWindowRect(void) result _ContextMenuListPresenter::ApplyColorProperty(void) { + int count; + count = __pContextMenu->GetItemCount(); + + for (int i = 0; i < count; i++) + { + _ContextMenuItem* pItem = null; + Color color = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED); + + pItem = __pModel->GetItem(i); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "A system error has occured. pItem must not be null."); + + pItem->SetPressedItemColor(color); + } return E_SUCCESS; } @@ -455,10 +463,10 @@ _ContextMenuListPresenter::ApplyColorProperty(void) result _ContextMenuListPresenter::CalculateRect(void) { - Tizen::Graphics::FloatRectangle windowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself - Tizen::Graphics::FloatRectangle bodyRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window - Tizen::Graphics::FloatRectangle arrowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window - Tizen::Graphics::FloatRectangle itemRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window + FloatRectangle windowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself + FloatRectangle bodyRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window + FloatRectangle arrowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window + FloatRectangle itemRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window float bodyTopMargin = __topMargin; float bodyBottomMargin = __bottomMargin; @@ -814,7 +822,7 @@ _ContextMenuListPresenter::AdjustItemLayout(void) } -Tizen::Graphics::FloatDimension +FloatDimension _ContextMenuListPresenter::AdjustItemLayoutStyle(void) { int itemMaxCount = CalculateShowItemCount(); @@ -888,14 +896,14 @@ _ContextMenuListPresenter::CalculateItemMaximumWidth(void) { FloatDimension itemSize(0.0f, 0.0f); FloatDimension textArea(0.0f, 0.0f); - float maxItemWidth = 0.0f; + float maxItemWidth = __itemMinWidth; - for (int i = 0; i < __pModel->GetItemCount() - 1; i++) + for (int i = 0; i < __pModel->GetItemCount(); i++) { _ContextMenuItem* pItem = null; pItem = __pModel->GetItem(i); - SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item."); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system error occurred. Unable to get the item.", GetErrorMessage(E_SYSTEM)); CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize); @@ -903,12 +911,12 @@ _ContextMenuListPresenter::CalculateItemMaximumWidth(void) { maxItemWidth = itemSize.width; } - __itemWidth = maxItemWidth; } + __itemWidth = maxItemWidth; } int -_ContextMenuListPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const +_ContextMenuListPresenter::GetItemIndexFromPosition(const FloatPoint& point) const { int index = -1; int itemCount = __pModel->GetItemCount(); @@ -951,32 +959,32 @@ _ContextMenuListPresenter::Draw(void) result r = E_SUCCESS; Canvas* pCanvas = __pContextMenu->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); // Clear canvas for drawing area of the ContextMenu. pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); - Tizen::Graphics::FloatRectangle bounds(__pContextMenu->GetWindowRect()); - pCanvas->Clear(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + FloatRectangle bounds(__pContextMenu->GetWindowRect()); + pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); r = DrawBackground(pCanvas); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw background."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r)); r = DrawArrow(pCanvas); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw arrow."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw arrow.", GetErrorMessage(r)); +CATCH: delete pCanvas; - return r; } result _ContextMenuListPresenter::DrawBackground(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null."); result r = E_SUCCESS; - Tizen::Graphics::FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); + FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap(); const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap(); @@ -1006,10 +1014,10 @@ _ContextMenuListPresenter::DrawBackground(Canvas* pCanvas) result _ContextMenuListPresenter::DrawArrow(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null."); result r = E_SUCCESS; - Tizen::Graphics::FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); + FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition); @@ -1037,6 +1045,10 @@ _ContextMenuListPresenter::OnPreviewTouchPressed(const _Control& source, const _ bool _ContextMenuListPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { + if (__focusedIndex != -1) + { + ResetFocus(); + } FloatPoint touchPosition = touchinfo.GetCurrentPosition(); FloatRectangle itemRect = __pContextMenu->GetItemRect(); @@ -1066,7 +1078,7 @@ _ContextMenuListPresenter::OnTouchReleased(const _Control& source, const _TouchI if (__touchOutRect) { FloatRectangle itemRect = __pContextMenu->GetItemRect(); - if (!itemRect.Contains(touchPosition)) + if (!itemRect.Contains(touchPosition) || __focusLost) { __selectedIndex = -1; __focusedIndex = -1; @@ -1075,6 +1087,10 @@ _ContextMenuListPresenter::OnTouchReleased(const _Control& source, const _TouchI return true; } + else + { + __pContextMenu->SetFocused(true); + } } int currentSelectedIndex = GetItemIndexFromPosition(touchPosition); @@ -1387,7 +1403,7 @@ _ContextMenuListPresenter::IsChildControlFocusManage(void) const } void -_ContextMenuListPresenter::OnFocusModeStateChanged(void) +_ContextMenuListPresenter::ResetFocus(void) { _Control* pFocusedControl = null; _Window* pTop = __pContextMenu->GetRootWindow(); @@ -1402,8 +1418,22 @@ _ContextMenuListPresenter::OnFocusModeStateChanged(void) } } +bool +_ContextMenuListPresenter::OnFocusGained(const _Control& source) +{ + __focusLost = false; + return true; +} + +bool +_ContextMenuListPresenter::OnFocusLost(const _Control& source) +{ + __focusLost = true; + return true; +} + void -_ContextMenuListPresenter::OnFontChanged(Tizen::Graphics::Font* pFont) +_ContextMenuListPresenter::OnFontChanged(Font* pFont) { __pFont = pFont; String fontName = __pContextMenu->GetFont(); @@ -1429,16 +1459,19 @@ _ContextMenuListPresenter::OnFontInfoRequested(unsigned long& style, float& size void _ContextMenuListPresenter::SetAllAccessibilityElement(void) { + int scrollPanelMargin; + GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + _AccessibilityContainer* pContainerContextMenu = __pContextMenu->GetAccessibilityContainer(); if (pContainerContextMenu != null) { _AccessibilityElement* pElementContextMenu = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pElementContextMenu->SetSupportOperatingGesture(false); pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); - pElementContextMenu->SetHint(L"double tap to close"); - pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height)); + pElementContextMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS"); + pElementContextMenu->SetBounds(FloatRectangle(__pContextMenu->GetItemRect().x, __pContextMenu->GetItemRect().y - scrollPanelMargin, __pContextMenu->GetItemRect().width, __pContextMenu->GetItemRect().height + 2 * scrollPanelMargin)); pContainerContextMenu->AddElement(*pElementContextMenu); __pContextMenu->AddAccessibilityElement(*pElementContextMenu); @@ -1460,7 +1493,9 @@ _ContextMenuListPresenter::SetAllAccessibilityElement(void) pElement->SetName(L"ContextMenuItem" + Integer::ToString(i)); if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) { - pElement->SetLabel(L"icon " + pItem->GetText()); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string); + pElement->SetLabel(string + pItem->GetText()); } else { @@ -1505,18 +1540,23 @@ _ContextMenuListPresenter::SetTopDrawnItemIndex(int index) } result -_ContextMenuListPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap) +_ContextMenuListPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap, bool isAppBitmap) { result r = E_SUCCESS; if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) { r = canvas.DrawNinePatchedBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap.") + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepatched bitmap."); } - else + else if (isAppBitmap) { r = canvas.DrawBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.") + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap."); + } + else + { + r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap."); } return r; diff --git a/src/ui/controls/FUiCtrl_ContextMenuModel.cpp b/src/ui/controls/FUiCtrl_ContextMenuModel.cpp index e4f2166..9145baf 100644 --- a/src/ui/controls/FUiCtrl_ContextMenuModel.cpp +++ b/src/ui/controls/FUiCtrl_ContextMenuModel.cpp @@ -46,7 +46,7 @@ _ContextMenuModel::Construct(void) { result r = __items.Construct(DEFAULT_ITEM_COUNT); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct ArrayList."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList."); return r; } @@ -86,21 +86,15 @@ _ContextMenuModel::GetItemCount(void) const result _ContextMenuModel::AddItem(_ContextMenuItem* pItem) { - if (IsValidItem(pItem) == false) - { - return E_SYSTEM; - } + SysTryReturnResult(NID_UI_CTRL, IsValidItem(pItem), E_SYSTEM, "A system error has occurred. pItem is not valid."); return __items.Add(*pItem); } result -_ContextMenuModel::InsertItem( _ContextMenuItem* pItem, int index) +_ContextMenuModel::InsertItem(_ContextMenuItem* pItem, int index) { - if (IsValidItem(pItem) == false) - { - return E_SYSTEM; - } + SysTryReturnResult(NID_UI_CTRL, IsValidItem(pItem), E_SYSTEM, "A system error has occurred. pItem is not valid."); return __items.InsertAt(*pItem, index); } @@ -112,10 +106,10 @@ _ContextMenuModel::SetItem(_ContextMenuItem* pItem, int index) if (IsValidItem(pItem) == false) { _ContextMenuItem* pTargetItem = GetItem(index); - if (pItem == null || pTargetItem == null || pItem->GetActionId() != pTargetItem->GetActionId()) - { - return E_SYSTEM; - } + + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "A system error has occurred. pItem must not be null."); + SysTryReturnResult(NID_UI_CTRL, pTargetItem != null, E_SYSTEM, "A system error has occurred. pTargetItem must not be null."); + SysTryReturnResult(NID_UI_CTRL, pItem->GetActionId() == pTargetItem->GetActionId(), E_SYSTEM, "A system error has occurred. ActionId of pItem and pTargetItem does not match."); } return __items.SetAt(*pItem, index, true); diff --git a/src/ui/controls/FUiCtrl_CustomItemImpl.cpp b/src/ui/controls/FUiCtrl_CustomItemImpl.cpp index 3ab3b6f..3dd3831 100644 --- a/src/ui/controls/FUiCtrl_CustomItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_CustomItemImpl.cpp @@ -70,7 +70,7 @@ _CustomItemImpl::CreateCustomItemImplN(CustomItem* pPublic, const FloatDimension result r = E_SUCCESS; _CustomItemImpl* pImpl = new (std::nothrow) _CustomItemImpl(pPublic); - SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pImpl->Construct(itemSize, style); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[E_SYSTEM] Unable to construct _CustomItemImpl."); @@ -103,8 +103,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const Enr SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.0f.")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); FloatRectangle bounds = rect; ListAnnexStyle style = GetListItemAnnexStyle(); @@ -133,8 +133,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const Str SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); FloatRectangle bounds = rect; ListAnnexStyle style = GetListItemAnnexStyle(); @@ -167,8 +167,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const Str SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.0f.")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); FloatRectangle bounds = rect; ListAnnexStyle style = GetListItemAnnexStyle(); @@ -223,8 +223,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const Bit SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.0f.")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); FloatRectangle bounds = rect; ListAnnexStyle style = GetListItemAnnexStyle(); @@ -251,8 +251,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICu SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.0f")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); _CustomElement* pCustomElement = null; FloatRectangle bounds = rect; @@ -267,7 +267,7 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICu } pCustomElement = new (std::nothrow) _CustomElement(elementId); - SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pCustomElement->SetElement(element); result r = pItem->AddElement(bounds, elementId, pCustomElement); @@ -290,8 +290,8 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICu SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The width and height should be greater than 0.0f")); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); _CustomElement* pCustomElement = null; FloatRectangle bounds = rect; @@ -306,7 +306,7 @@ _CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICu } pCustomElement = new (std::nothrow) _CustomElement(elementId); - SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pCustomElement->SetElement(element); result r = pItem->AddElement(bounds, elementId, pCustomElement); @@ -332,8 +332,8 @@ _CustomItemImpl::RemoveAllElements(void) result _CustomItemImpl::RemoveElement(int elementId) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (GetListViewItem()->DeleteElement(elementId) == true), E_SYSTEM, E_SYSTEM, ("[E_SYSTEM] Unable to remove element.")); @@ -346,8 +346,8 @@ _CustomItemImpl::SetElementSelectionEnabled(int elementId, bool enable) { _ListViewItem* pItem = GetListViewItem(); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (pItem->HasElement(elementId) == true), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] This elementId does not exist.")); @@ -363,8 +363,8 @@ _CustomItemImpl::SetElementTextHorizontalAlignment(int elementId, HorizontalAlig { _ListViewItem* pItem = GetListViewItem(); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION, ("[E_INVALID_OPERATION] This element is not text.")); @@ -399,8 +399,8 @@ _CustomItemImpl::SetElementTextVerticalAlignment(int elementId, VerticalAlignmen { _ListViewItem* pItem = GetListViewItem(); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION, ("[E_INVALID_OPERATION] This element is not text.")); @@ -435,8 +435,8 @@ _CustomItemImpl::SetElementAutoLinkMask(int elementId, unsigned long mask) { _ListViewItem* pItem = GetListViewItem(); - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, - ("E_INVALID_ARG] The element ID should not be less than 0.")); + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION, ("[E_INVALID_OPERATION] This element is not text.")); diff --git a/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp b/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp index ef6f495..73c1d21 100644 --- a/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp +++ b/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp @@ -80,7 +80,7 @@ _ElementFormatData* _CustomListItemFormatImpl::CreateElementN(int elementId) { _ElementFormatData* pElementFormatData = new (std::nothrow) _ElementFormatData(); - SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_OUT_OF_MEMORY, "The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_OUT_OF_MEMORY, "Memory allocation failed."); pElementFormatData->elementId = elementId; diff --git a/src/ui/controls/FUiCtrl_DateTimeBar.cpp b/src/ui/controls/FUiCtrl_DateTimeBar.cpp index aed1bc2..d9ed1a5 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBar.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBar.cpp @@ -88,11 +88,11 @@ _DateTimeBar::CreateDateTimeBarN(_Control& owner) result r = E_SUCCESS; ClearLastResult(); - _DateTimeBar* pDateTimeBar = new (std::nothrow) _DateTimeBar; + _DateTimeBar* pDateTimeBar = new (std::nothrow) _DateTimeBar(); SysTryReturn(NID_UI_CTRL, pDateTimeBar != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - r = pDateTimeBar->CreateRootVisualElement(); + r = pDateTimeBar->CreateRootVisualElement(_WINDOW_TYPE_VE); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pDateTimeBar->__pOwner = &owner; @@ -425,8 +425,6 @@ _DateTimeBar::OnTouchMoveHandled(const Tizen::Ui::_Control& control) result _DateTimeBar::OnAttachedToMainTree(void) { - SetOwner(__pOwner); - return _Window::OnAttachedToMainTree(); } @@ -440,8 +438,12 @@ void _DateTimeBar::OnActivated(void) { VisualElement* pVisualElement = null; - VisualElementAnimation *pAnimation = null; + VisualElementAnimation* pAnimation = null; + if (GetOwner() == null) + { + SetOwner(__pOwner); + } 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, true); @@ -449,9 +451,11 @@ _DateTimeBar::OnActivated(void) pVisualElement->AddAnimation(L"BarOpenAnimation", *pAnimation); delete pAnimation; + _Window::OnActivated(); + SetTouchCapture(true, true); - return _Window::OnActivated(); + return; } void @@ -680,7 +684,7 @@ _DateTimeBar::RefreshItems(void) void _DateTimeBar::RemoveAllAnimations(void) { - VisualElement *pDateTimeBarElement = GetVisualElement(); + VisualElement* pDateTimeBarElement = GetVisualElement(); if (pDateTimeBarElement != null) { @@ -740,6 +744,9 @@ _DateTimeBar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); } + __isAnimating = false; + SetVisibleState(false); + __pDateTimeBarPresenter->ClearPreviousText(); Close(); return true; } @@ -920,7 +927,15 @@ _DateTimeBar::CreateAnimationN(VisualElement& source, bool open) SysTryCatch(NID_UI_CTRL, (pBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pBoundsAnimation->SetPropertyName(L"bounds.position"); - startValue.y = startValue.y - POSITION_ANIMATION_VALUE; + + if (GetAlignment() == DATETIME_BAR_ALIGN_DOWN) + { + startValue.y = startValue.y - POSITION_ANIMATION_VALUE; + } + else + { + startValue.y = startValue.y + POSITION_ANIMATION_VALUE; + } if (open) { @@ -954,7 +969,7 @@ void _DateTimeBar::CloseDateTimeBar() { VisualElement* pVisualElement = null; - VisualElementAnimation *pAnimation = null; + VisualElementAnimation* pAnimation = null; pVisualElement = GetVisualElement(); SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element."); @@ -977,8 +992,17 @@ _DateTimeBar::OnVisualElementAnimationFinished (const VisualElementAnimation &an else if ((pUserData != null) && (*pUserData == String(L"BarCloseAnimation"))) { FloatRectangle bounds = target.GetBounds(); - bounds.y = bounds.y + POSITION_ANIMATION_VALUE; + + if (GetAlignment() == DATETIME_BAR_ALIGN_DOWN) + { + bounds.y = bounds.y + POSITION_ANIMATION_VALUE; + } + else + { + bounds.y = bounds.y - POSITION_ANIMATION_VALUE; + } SetVisibleState(false); + __pDateTimeBarPresenter->ClearPreviousText(); Close(); target.SetBounds(bounds); } @@ -987,4 +1011,16 @@ _DateTimeBar::OnVisualElementAnimationFinished (const VisualElementAnimation &an delete pUserData; } +void +_DateTimeBar::ChangeLayout(void) +{ + __pDateTimeBarPresenter->ChangeLayout(); +} + +void +_DateTimeBar::ClearPreviousText(void) +{ + __pDateTimeBarPresenter->ClearPreviousText(); +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp index 4a59e68..449b687 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp @@ -53,6 +53,8 @@ _DateTimeBarPresenter::_DateTimeBarPresenter(_DateTimeBar* pDateTimeBar) , __flickAnimation() , __selectedText(L"") , __focusedText(L"") + , __prevFocusedText(L"") + , __prevSelectedText(L"") , __bodyAreaBounds(FloatRectangle()) , __arrowAreaBounds(FloatRectangle()) , __windowAreaBounds(FloatRectangle()) @@ -66,6 +68,7 @@ _DateTimeBarPresenter::_DateTimeBarPresenter(_DateTimeBar* pDateTimeBar) , __focusedIndex(-1) , __focusBounds(FloatRectangle()) , __isFlickCanceled(false) + , __isChangeLayout(false) { } @@ -133,16 +136,11 @@ _DateTimeBarPresenter::LoadResource(void) { result r = E_SUCCESS; Color bgBitmapColor; - Bitmap* pBackgroundNormalBitmap = null; - - r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TIMEPICKERBAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBackgroundNormalBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, bgBitmapColor); - __pBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), bgBitmapColor); - SysTryCatch(NID_UI_CTRL, __pBgColorReplacementBitmap != null, r = GetLastResult(), GetLastResult(), "[%s] Propagating.", - GetErrorMessage(GetLastResult())); + + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TIMEPICKERBAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgBitmapColor, __pBgColorReplacementBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, __pFocusBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -150,18 +148,12 @@ _DateTimeBarPresenter::LoadResource(void) r = LoadArrowBitmap(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load resources.", GetErrorMessage(r)); - delete pBackgroundNormalBitmap; - pBackgroundNormalBitmap = null; - AddFlickAnimationInfo(); return r; CATCH: - delete pBackgroundNormalBitmap; - pBackgroundNormalBitmap = null; - delete __pBgColorReplacementBitmap; __pBgColorReplacementBitmap = null; @@ -176,45 +168,26 @@ _DateTimeBarPresenter::LoadArrowBitmap(void) { result r = E_SUCCESS; Color arrowColor; - Bitmap* pArrowNormalBitmap = null; GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, arrowColor); + if (__pArrowColorReplacementBitmap != null) + { + delete __pArrowColorReplacementBitmap; + __pArrowColorReplacementBitmap = null; + } + if (__pDateTimeBar->GetAlignment() == DATETIME_BAR_ALIGN_DOWN) { - r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowNormalBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowColorReplacementBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } else { - r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowNormalBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowColorReplacementBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } - if (__pArrowColorReplacementBitmap != null) - { - delete __pArrowColorReplacementBitmap; - __pArrowColorReplacementBitmap = null; - } - - __pArrowColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowNormalBitmap, - Color::GetColor(COLOR_ID_MAGENTA), arrowColor); - SysTryCatch(NID_UI_CTRL, __pArrowColorReplacementBitmap != null, r = GetLastResult(), GetLastResult(), "[%s] Propagating.", - GetErrorMessage(GetLastResult())); - - delete pArrowNormalBitmap; - pArrowNormalBitmap = null; - - return r; - -CATCH: - - delete pArrowNormalBitmap; - pArrowNormalBitmap = null; - - delete __pArrowColorReplacementBitmap; - __pArrowColorReplacementBitmap = null; - return r; } @@ -234,7 +207,7 @@ _DateTimeBarPresenter::Draw(void) r = DrawBackground(*pCanvas); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (__isFocused) + if (__isFocused && !__isChangeLayout) { ChangeFocusStatus(); } @@ -289,7 +262,7 @@ _DateTimeBarPresenter::SetFocusedItemBounds() if (__focusedIndex > 0) { pItem = GetItemAt(__focusedIndex); - SysTryReturnVoidResult(NID_UI, pItem != NULL, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI, pItem != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); __focusBounds = pItem->GetBounds(); } } @@ -324,7 +297,7 @@ _DateTimeBarPresenter::DrawItem(Canvas& canvas) int itemCount = GetItemCount(); - for (int i = __pDateTimeBarModel->GetFirstDrawnItemIndex(); i < itemCount; i++) + for (int i = 0; i < itemCount; i++) { pDrawItem = __pDateTimeBarModel->GetItemAt(i); if (pDrawItem == null) @@ -345,6 +318,7 @@ _DateTimeBarPresenter::DrawItem(Canvas& canvas) if (drawText.CompareTo(__focusedText) == 0) { pDrawItem->SetStatus(DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED); + __prevFocusedText = __focusedText; } else { @@ -364,7 +338,7 @@ _DateTimeBarPresenter::DrawItem(Canvas& canvas) float fontSize = GetFontSize(); TextSimple* pSimpleText = null; - TextObject* pTextObject = new (std::nothrow) TextObject; + TextObject* pTextObject = new (std::nothrow) TextObject(); SysTryReturn(NID_UI_CTRL, (pTextObject != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextObject->Construct(); @@ -830,6 +804,10 @@ _DateTimeBarPresenter::AddItems(int actionId) { __selectedText.Clear(); __selectedText.Append(pItem->GetText().GetPointer()); + if (__prevSelectedText.IsEmpty()) + { + __prevSelectedText.Append(__selectedText); + } __focusedIndex = (firstDrawItemIndex - 1); __focusedValue = pItem->GetActionId(); } @@ -965,8 +943,6 @@ _DateTimeBarPresenter::CalculateWindowBounds(void) arrowAreaBounds = GetArrowBounds(); - Point arrowPosition; - GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, orientation, arrowAreaBounds.height); GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_WIDTH, orientation, arrowAreaBounds.width); GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, orientation, bodyAreaBounds.height); @@ -1054,7 +1030,7 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI return true; } - if (!__isFocused) + if (!__isFocused && (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT)) { ResetFlickAnimationTimer(); RemoveAllItems(); @@ -1067,6 +1043,11 @@ _DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyI __isFocused = true; } + if (__isChangeLayout) + { + __isChangeLayout = false; + } + switch (keyCode) { case KEY_UP: @@ -1214,6 +1195,31 @@ _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& if (__isFocused) { FocusModeChanged(); + + if (!__prevSelectedText.IsEmpty()) + { + __selectedText = __prevSelectedText; + __prevFocusedText.Clear(); + } + + int itemCount = GetItemCount(); + _DateTimeBarItem *pItem = null; + + for (int i = 0;i < itemCount;i++) + { + pItem = GetItemAt(i); + if (pItem->GetText().CompareTo(__selectedText) == 0) + { + __focusedIndex = i; + __focusedValue = pItem->GetActionId(); + break; + } + } + } + + if (__isChangeLayout) + { + __isChangeLayout = false; } if (&source != __pDateTimeBar) @@ -1233,6 +1239,7 @@ _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& { ResetFlickAnimationTimer(); __isFlickCanceled = true; + __isInitialAnimation = false; } __touchMoveHandled = false; @@ -1259,9 +1266,13 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& return false; } + if (__isTouchMoved) + { + __pDateTimeBar->SetFocused(true); + } + if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved) { - __isTouchMoved = false; PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pDateTimeBar); __pDateTimeBar->CloseDateTimeBar(); ResetFlickAnimationTimer(); @@ -1516,7 +1527,6 @@ _DateTimeBarPresenter::LoadItems() return true; } - while (updateItemCount > 0) { pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex()); @@ -1664,7 +1674,7 @@ _DateTimeBarPresenter::StartFlickAnimationTimer(void) if (__pFlickAnimationTimer == null) { - __pFlickAnimationTimer = new (std::nothrow) Timer; + __pFlickAnimationTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pFlickAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create timer."); r = __pFlickAnimationTimer->Construct(*this); @@ -1872,4 +1882,40 @@ _DateTimeBarPresenter::MovePrevious(void) return; } +void +_DateTimeBarPresenter::ChangeLayout(void) +{ + int itemCount = GetItemCount(); + _DateTimeBarItem *pItem = null; + + for (int i = 0;i < itemCount;i++) + { + pItem = GetItemAt(i); + if (pItem->GetText().CompareTo(__prevFocusedText) == 0) + { + __focusedIndex = i; + __focusedValue = pItem->GetActionId(); + break; + } + } + + __isChangeLayout = true; + RemoveAllItems(); + __pDateTimeBar->SetInitialValue(GetMinimumValue(), GetMaximumValue(), __focusedValue, __pDateTimeBar->GetSelectedBoxId()); + __distance = (GetItemWidth() * (-1.0f)); + LoadItems(); + AdjustItemPosition(__distance); + ValidateAndAdjustStartPosition(); + SetFocusedItemBounds(); +} + +void +_DateTimeBarPresenter::ClearPreviousText(void) +{ + __prevSelectedText.Clear(); + __prevFocusedText.Clear(); + __isChangeLayout = false; +} + + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp index ecf5030..fe6552d 100644 --- a/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp @@ -88,7 +88,7 @@ _DateTimeDisplayBox::SetText(const String& text) result r = E_SUCCESS; TextSimple* pSimpleText = null; - TextObject * pTextObject = new (std::nothrow) TextObject; + TextObject* pTextObject = new (std::nothrow) TextObject(); SysTryReturn(NID_UI_CTRL, (pTextObject != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __text.Clear(); @@ -98,9 +98,12 @@ _DateTimeDisplayBox::SetText(const String& text) r = pTextObject->Construct(); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - pSimpleText = new (std::nothrow)TextSimple(pString, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + pSimpleText = new (std::nothrow) TextSimple(pString, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, (pSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + r = pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -173,18 +176,18 @@ _DateTimeDisplayBox::DrawBackground(Canvas& canvas, DateTimePickerStatus status) isCustomBitmap[i] = false; } - if (__pBackgroundNormalBitmap[status] != null) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status])) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status])) - { - r = canvas.DrawNinePatchedBitmap(__windowBounds, *__pBackgroundNormalBitmap[status]); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - } - else - { - r = canvas.DrawBitmap(__windowBounds, *__pBackgroundNormalBitmap[status]); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - } + r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundNormalBitmap[status]); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + FloatPoint position(0.0f, 0.0f); + position.x = (__windowBounds.width - __pBackgroundNormalBitmap[status]->GetWidthF()) / 2; + position.y = (__windowBounds.height - __pBackgroundNormalBitmap[status]->GetHeightF()) / 2; + r = canvas.DrawBitmap(position, *__pBackgroundNormalBitmap[status]); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); } if (__boxId == DATETIME_ID_AMPM) @@ -206,12 +209,12 @@ _DateTimeDisplayBox::DrawBackground(Canvas& canvas, DateTimePickerStatus status) { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundEffectBitmap[status])) { - r = canvas.DrawNinePatchedBitmap(__windowBounds, *__pBackgroundEffectBitmap[status]); + r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundEffectBitmap[status]); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); } else { - r = canvas.DrawBitmap(__windowBounds, *__pBackgroundEffectBitmap[status]); + r = canvas.DrawBitmap(FloatPoint(0.0f, 0.0f), *__pBackgroundEffectBitmap[status]); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); } } @@ -230,7 +233,7 @@ _DateTimeDisplayBox::DrawText(Canvas& canvas, DateTimePickerStatus status) r = __pTextObject->SetForegroundColor(__textColor[status], 0, __pTextObject->GetTextLength()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - r = __pTextObject->SetBounds(__windowBounds); + r = __pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height)); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); r = __pTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); diff --git a/src/ui/controls/FUiCtrl_DateTimePicker.cpp b/src/ui/controls/FUiCtrl_DateTimePicker.cpp index d2abbf5..2631674 100644 --- a/src/ui/controls/FUiCtrl_DateTimePicker.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePicker.cpp @@ -674,7 +674,7 @@ _DateTimePicker::SetYearRange(int minYear, int maxYear) "Invalid argument(s) is used. The maxYear (%d) must be greater than or equal to minYear (%d).", maxYear, minYear); r = SetProperty("minYearRange", Variant(minYear)); - if (r != E_SUCCESS ) + if (r != E_SUCCESS) { return r; } @@ -1105,29 +1105,27 @@ _DateTimePicker::CreateAllAccessibilityElements(void) FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds(); int displayBoxId = pBox->GetDisplayBoxId(); - String hintText(L"Double tap to edit"); - switch (displayBoxId) { case DATETIME_ID_DAY: pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC"); - pElement->SetHint(hintText); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); break; case DATETIME_ID_MONTH: pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC"); - pElement->SetHint(hintText); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); break; case DATETIME_ID_YEAR: pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC"); - pElement->SetHint(hintText); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); break; case DATETIME_ID_HOUR: pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC"); - pElement->SetHint(hintText); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); break; case DATETIME_ID_MINUTE: pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC"); - pElement->SetHint(hintText); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); break; } diff --git a/src/ui/controls/FUiCtrl_DateTimePresenter.cpp b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp index 8f1fbbe..f577e16 100644 --- a/src/ui/controls/FUiCtrl_DateTimePresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp @@ -188,7 +188,7 @@ _DateTimePresenter::Construct(_DateTimePicker& view) if (__inputPadEnabled) { - __pInputPad = new (std::nothrow) _InputPad; + __pInputPad = new (std::nothrow) _InputPad(); SysTryCatch(NID_UI_CTRL, (__pInputPad != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pInputPad->Construct(inputPadBounds); @@ -457,21 +457,34 @@ _DateTimePresenter::Draw(void) for (int i = 0; i < __outputBoxMaxCount; i++) { - DrawDateTimeDisplayBox(*pCanvas, i); + Canvas *pBoxCanvas = pVisualElement->GetCanvasN(__pDisplayBox[i]->GetDisplayBoxBounds()); + SysTryReturnResult(NID_UI_CTRL, (pBoxCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + DrawDateTimeDisplayBox(*pBoxCanvas, i); + delete pBoxCanvas; + } + + Canvas *pAmPmCanvas = null; + if (__pPmBox != null) + { + pAmPmCanvas = pVisualElement->GetCanvasN(__pPmBox->GetDisplayBoxBounds()); + SysTryReturnResult(NID_UI_CTRL, (pAmPmCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); } if ((__pickerStyle & DATETIME_OUTPUT_STYLE_DATE) && (__pickerStyle & DATETIME_OUTPUT_STYLE_TIME)) { DrawDividers(*pCanvas); DrawColon(*pCanvas); - DrawPm(*pCanvas); + DrawPm(*pAmPmCanvas); } else if (__pickerStyle & DATETIME_OUTPUT_STYLE_TIME) { DrawColon(*pCanvas); - DrawPm(*pCanvas); + DrawPm(*pAmPmCanvas); } + delete pAmPmCanvas; + if (unlikely(_AccessibilityManager::IsActivated())) { SetAccessibilityElementText(); @@ -613,6 +626,9 @@ bool _DateTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { result r = E_SUCCESS; + String text; + _DateTimeUtils dateTimeUtils; + if (__pView != &source) { @@ -627,6 +643,19 @@ _DateTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to { __isPm = (!__isPm); PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pView); + if (!__isPm) + { + dateTimeUtils.GetAmPm(text, AM_TYPE); + } + else + { + dateTimeUtils.GetAmPm(text, PM_TYPE); + } + if (__pPmBox) + { + __pView->SetAccessibilityElementText(__outputBoxMaxCount, text, true); + } + } __inputComposing = DATETIME_INPUT_END; @@ -878,7 +907,15 @@ _DateTimePresenter::ReleaseFocus(void) } __focusedBoxIndex = 0; + if (__isPmButtonPressed) + { + __isPmButtonPressed = false; + } + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + AdjustDisplayValue(__selectedBoxIndex); __pView->Invalidate(true); + return r; } @@ -946,6 +983,8 @@ _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) newNumber = 1; } + SetNumberInBox(boxId, newNumber); + ChangeFocusBox(); } else @@ -957,13 +996,13 @@ _DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) newNumber = inputPadReturnValue; __inputComposing = DATETIME_INPUT_BEGIN; + SetNumberInBox(boxId, newNumber); + if (!__keypadEnabled || newNumber > 1) { ChangeFocusBox(); } } - - SetNumberInBox(boxId, newNumber); } else { @@ -1003,7 +1042,7 @@ _DateTimePresenter::HandleSaveCancelAction(int actionId) return; } - if (actionId != DATETIME_EVENT_ID_SAVE && actionId != DATETIME_EVENT_ID_CANCEL ) + if (actionId != DATETIME_EVENT_ID_SAVE && actionId != DATETIME_EVENT_ID_CANCEL) { return; } @@ -1380,15 +1419,10 @@ _DateTimePresenter::LoadResource(void) bool isDisplayBoxCustomBitmap[DATETIME_STATUS_MAX]; bool isAmPmCustomBitmap[DATETIME_STATUS_MAX]; - Bitmap* pDisplayBoxNormalBitmap[DATETIME_STATUS_MAX]; - Bitmap* pAmPmNormalBitmap[DATETIME_STATUS_MAX]; - Bitmap* pBgBitmap = null; Bitmap* pColonBitmap = null; for (int i = 0; i < DATETIME_STATUS_MAX; i++) { - pDisplayBoxNormalBitmap[i] = null; - pAmPmNormalBitmap[i] = null; backgroundColor[i] = Color(); isDisplayBoxCustomBitmap[i] = false; isAmPmCustomBitmap[i] = false; @@ -1400,13 +1434,10 @@ _DateTimePresenter::LoadResource(void) GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_DISABLED, backgroundColor[DATETIME_STATUS_DISABLED]); //display area bg - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - GET_COLOR_CONFIG(DATETIMEPICKER::DISPLAY_BG_NORMAL, color); - __pBgNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, replacementColor, color); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pBgNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBgNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pColonBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1428,32 +1459,6 @@ _DateTimePresenter::LoadResource(void) SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - //display box - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - //ampm - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_NORMAL); isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_PRESSED); isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED); @@ -1464,100 +1469,118 @@ _DateTimePresenter::LoadResource(void) isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED); isAmPmCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_DISABLED); - //displaybox - for (int i = 0; i < DATETIME_STATUS_MAX; i++) - { - if (isDisplayBoxCustomBitmap[i]) - { - __pDisplayBoxNormalBitmap[i] = pDisplayBoxNormalBitmap[i]; - } - else - { - __pDisplayBoxNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pDisplayBoxNormalBitmap[i], replacementColor, backgroundColor[i]); - SysTryCatch(NID_UI_CTRL, (__pDisplayBoxNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - } - } + //display box - if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL]) + if (isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL]) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); +} + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_NORMAL], __pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_NORMAL]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED]) + if (isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED]) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_SELECTED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_SELECTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) + if (isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) { - Bitmap* pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + if (isDisplayBoxCustomBitmap[DATETIME_STATUS_DISABLED]) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), backgroundColor[DATETIME_STATUS_HIGHLIGHTED]); - SysTryCatch(NID_UI_CTRL, (__pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED] != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; } - - if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_DISABLED]) + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_DISABLED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_DISABLED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - //ampm - for (int i = 0; i < DATETIME_STATUS_MAX; i++) + + if (isAmPmCustomBitmap[DATETIME_STATUS_NORMAL]) { - if (isAmPmCustomBitmap[i]) - { - __pAmPmNormalBitmap[i] = pAmPmNormalBitmap[i]; - } - else - { - __pAmPmNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pAmPmNormalBitmap[i], replacementColor, backgroundColor[i]); - SysTryCatch(NID_UI_CTRL, (__pAmPmNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - } + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - if (!isAmPmCustomBitmap[DATETIME_STATUS_NORMAL]) + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_NORMAL], __pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_NORMAL]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - if (!isAmPmCustomBitmap[DATETIME_STATUS_SELECTED]) + if (isAmPmCustomBitmap[DATETIME_STATUS_SELECTED]) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_SELECTED], __pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_SELECTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - if (!isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) + if (isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + } + else + { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - if (!isAmPmCustomBitmap[DATETIME_STATUS_DISABLED]) + if (isAmPmCustomBitmap[DATETIME_STATUS_DISABLED]) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else { + r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_DISABLED], __pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_DISABLED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } delete pColonBitmap; - delete pBgBitmap; - for (int i = 0; i < DATETIME_STATUS_MAX; i++) - { - delete pDisplayBoxNormalBitmap[i]; - delete pAmPmNormalBitmap[i]; - } return; @@ -1570,8 +1593,6 @@ CATCH: delete __pColonDisabledBitmap; __pColonDisabledBitmap = null; - delete pBgBitmap; - delete __pBgNormalBitmap; __pBgNormalBitmap = null; @@ -1580,7 +1601,6 @@ CATCH: for (int i = 0; i < DATETIME_STATUS_MAX; i++) { - delete pDisplayBoxNormalBitmap[i]; delete __pDisplayBoxNormalBitmap[i]; __pDisplayBoxNormalBitmap[i] = null; @@ -1588,7 +1608,6 @@ CATCH: delete __pDisplayBoxEffectBitmap[i]; __pDisplayBoxEffectBitmap[i] = null; - delete pAmPmNormalBitmap[i]; delete __pAmPmNormalBitmap[i]; __pAmPmNormalBitmap[i] = null; @@ -1668,6 +1687,11 @@ _DateTimePresenter::DrawDateTimeDisplayBox(Canvas& canvas, int index) { status = DATETIME_STATUS_HIGHLIGHTED; } + + if ((__focusedBoxIndex == __outputBoxMaxCount) && ((index + 1) == __focusedBoxIndex)) + { + status = DATETIME_STATUS_SELECTED; + } } else { @@ -1685,7 +1709,7 @@ _DateTimePresenter::DrawDateTimeDisplayBox(Canvas& canvas, int index) { String length = L"%0d"; - r = length.Insert(__changeFocusCounter,2); + r = length.Insert(__changeFocusCounter, 2); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, length.GetPointer(), number); @@ -1796,7 +1820,7 @@ _DateTimePresenter::DrawBackground(Canvas& canvas) } else { - canvas.DrawBitmap(bounds, *__pBgNormalBitmap); + canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgNormalBitmap); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); } } @@ -1810,7 +1834,7 @@ _DateTimePresenter::DrawBackground(Canvas& canvas) } else { - canvas.DrawBitmap(bounds, *__pBgEffectBitmap); + canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgEffectBitmap); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); } } @@ -2076,6 +2100,7 @@ _DateTimePresenter::CalculateTouchArea(float posX, float posY) { //am pm area FloatRectangle boxBounds = __pPmBox->GetDisplayBoxBounds(); + boxBounds.x = boxBounds.x + outputArea.x; if ((posX >= boxBounds.x) && (posX < boxBounds.x + boxBounds.width)) { @@ -2103,6 +2128,8 @@ _DateTimePresenter::CalculateTouchOutputArea(float posX, float posY) { FloatRectangle boxBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + boxBounds.x = outputArea.x + boxBounds.x; + if (__title.IsEmpty()) { boxBounds.y = outputArea.y + ((outputArea.height - boxBounds.height) / 2.0f); @@ -2331,6 +2358,7 @@ _DateTimePresenter::LoadPickerData(void) } __minute = GetMinute(); + } void @@ -2540,6 +2568,7 @@ _DateTimePresenter::ChangeFocusBox(void) void _DateTimePresenter::SetAccessibilityElementText(void) { + for (int index = 0; index < __outputBoxMaxCount; ++index) { if (__pDisplayBox[index]->GetDisplayBoxId() == DATETIME_ID_MONTH) diff --git a/src/ui/controls/FUiCtrl_DateTimeUtils.cpp b/src/ui/controls/FUiCtrl_DateTimeUtils.cpp index 31fad89..838bdb6 100644 --- a/src/ui/controls/FUiCtrl_DateTimeUtils.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeUtils.cpp @@ -67,6 +67,49 @@ _DateTimeUtils::GetMonthString(int month) const String* pObj = null; pObj = static_cast(const_cast(pListOfShortMonths->GetAt(month - 1))); + // To remove the special keyword from month string for the regions having single 'm' in its DateFormat pattern. + LocaleManager localeManager; + r = localeManager.Construct(); + + if (r == E_SUCCESS && pObj != null) + { + Locale systemLocale = localeManager.GetSystemLocale(); + + DateTimeFormatter* pDateFormatter = null; + pDateFormatter = DateTimeFormatter::CreateDateFormatterN(systemLocale, DATE_TIME_STYLE_LONG); + + if (pDateFormatter != null) + { + String formatString = pDateFormatter->GetPattern(); + formatString.ToLowerCase(); + int stringLength = formatString.GetLength(); + int count = 0; + + for (int i = 0; i < stringLength; i++) + { + wchar_t ch = '\0'; + r = formatString.GetCharAt(i, ch); + + if (r == E_SUCCESS && (ch == 'm')) + { + count++; + } + + if (count > 1) + { + break; + } + } + + if (count == 1) + { + pObj->Remove(pObj->GetLength() - 1, 1); + } + } + + delete pDateFormatter; + } + if (pObj) { text.Append(*pObj); @@ -236,7 +279,6 @@ _DateTimeUtils::GetFullMonthString(int month) const { text.Append(*pObj); } - return text; } diff --git a/src/ui/controls/FUiCtrl_Edit.cpp b/src/ui/controls/FUiCtrl_Edit.cpp old mode 100755 new mode 100644 index 839a22e..130a54f --- a/src/ui/controls/FUiCtrl_Edit.cpp +++ b/src/ui/controls/FUiCtrl_Edit.cpp @@ -32,6 +32,7 @@ #include "FUi_IAccessibilityListener.h" #include "FUi_UiEventManager.h" #include "FUiAnim_VisualElement.h" +#include "FUi_DragAndDropItem.h" #include "FUiCtrl_Edit.h" #include "FUiCtrl_EditPresenter.h" #include "FUiCtrl_ScrollPanel.h" @@ -131,10 +132,6 @@ _EditInternalTouchEventListener::OnTouchPressed(const _Control& source, const _T { return true; } - else - { - return false; - } } return false; } @@ -153,15 +150,6 @@ _EditInternalTouchEventListener::OnTouchMoved(const _Control& source, const _Tou { return true; } - else if (__pEdit == &source) - { - return false; - } - else - { - pEditPresenter->InitializeCopyPasteManager(); - return false; - } } } return false; @@ -181,7 +169,14 @@ _EditInternalTouchEventListener::OnTouchReleased(const _Control& source, const _ { if (pEditPresenter->IsCopyPasteHandleExist()) { - pEditPresenter->ReleaseCopyPastePopup(); + if (pEditPresenter->IsViewModeEnabled(true) && !pEditPresenter->IsBlocked()) + { + pEditPresenter->InitializeCopyPasteManager(); + } + else + { + pEditPresenter->ReleaseCopyPastePopup(); + } return true; } else @@ -190,15 +185,6 @@ _EditInternalTouchEventListener::OnTouchReleased(const _Control& source, const _ return false; } } - else if (__pEdit == &source) - { - return false; - } - else if (pEditPresenter->IsCopyPasteHandleExist()) - { - pEditPresenter->InitializeCopyPasteManager(); - return false; - } } } @@ -224,7 +210,6 @@ _Edit::_Edit(void) , __pressedGuideTextColor(Color()) , __isSettingGuideTextColor(false) , __pDefaultBackgroundEffectBitmap(null) - , __pDefaultFocusBitmap(null) , __pGestureFlick(null) , __pGestureLongPress(null) , __pGestureTap(null) @@ -242,11 +227,11 @@ _Edit::_Edit(void) , __isAccessibilityCreated(false) , __isFullScreenKeypadEdit(false) , __internalFocus(false) + , __pCurrentFrame(null) , __isDestroyed(false) , __pTextFilter(null) , __previousBounds() , __isTouchMoving(false) - , __isSearchFieldFocused(false) , __isTextEventEnabled(true) { for (int status = 0; status < EDIT_COLOR_MAX; status++) @@ -289,12 +274,6 @@ _Edit::~_Edit(void) __pDefaultBackgroundEffectBitmap = null; } - if (__pDefaultFocusBitmap) - { - delete __pDefaultFocusBitmap; - __pDefaultFocusBitmap = null; - } - if (__pTextBlockEvent) { delete __pTextBlockEvent; @@ -315,6 +294,8 @@ _Edit::~_Edit(void) if (__pScrollPanelEvent) { + DetachScrollPanelEvent(); + delete __pScrollPanelEvent; __pScrollPanelEvent = null; } @@ -403,8 +384,8 @@ _Edit::CreateEditN(void) result r = E_SUCCESS; _VisualElement* pBaseVisualElement = null; - _Edit* pEdit = new (std::nothrow) _Edit; - SysTryCatch(NID_UI_CTRL, pEdit, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + _Edit* pEdit = new (std::nothrow) _Edit(); + SysTryCatch(NID_UI_CTRL, pEdit, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pBaseVisualElement = pEdit->GetVisualElement(); if (pBaseVisualElement) @@ -459,22 +440,22 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt __textSize = _pEditPresenter->GetTextSize(); - __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector; - SysTryReturn(NID_UI_CTRL, __pGestureFlick, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch flick gesture."); + __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector(); + SysTryReturn(NID_UI_CTRL, __pGestureFlick, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = AddGestureDetector(*__pGestureFlick); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); r = __pGestureFlick->AddGestureListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); - __pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector; - SysTryReturn(NID_UI_CTRL, __pGestureLongPress, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch long press gesture."); + __pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector(); + SysTryReturn(NID_UI_CTRL, __pGestureLongPress, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = AddGestureDetector(*__pGestureLongPress); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r)); r = __pGestureLongPress->AddGestureListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); - __pGestureTap = new (std::nothrow) _TouchTapGestureDetector; - SysTryReturn(NID_UI_CTRL, __pGestureTap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch tap gesture."); + __pGestureTap = new (std::nothrow) _TouchTapGestureDetector(); + SysTryReturn(NID_UI_CTRL, __pGestureTap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pGestureTap->SetTapInterval(EDIT_GESTURE_TAP_INTERVAL); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapInterval", GetErrorMessage(r)); @@ -488,7 +469,7 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); __pEditInternalTouchEventListener = new (std::nothrow) _EditInternalTouchEventListener(*this); - SysTryReturn(NID_UI_CTRL, __pEditInternalTouchEventListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create internal touch listener."); + SysTryReturn(NID_UI_CTRL, __pEditInternalTouchEventListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = _UiEventManager::GetInstance()->AddTouchEventListener(*__pEditInternalTouchEventListener); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Unable to add internal event listener", GetErrorMessage(r)); @@ -513,7 +494,7 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText()); } - __pTextAccessibilityElement->SetTrait(L"Edit Field"); + __pTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS"); __pTextAccessibilityElement->SetName(L"EditText"); pEditAccessibilityContainer->AddElement(*__pTextAccessibilityElement); @@ -521,7 +502,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"clear all"); __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); @@ -618,7 +599,7 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const bool fitToHorizontal = horizontalMode; bool fitToVertical = verticalMode; - + bool checkExtent = false; if (fitToHorizontal) { if (orientation == _CONTROL_ORIENTATION_PORTRAIT) @@ -655,6 +636,7 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const if (dimension.width > newRect.width) { dimension.width = newRect.width; + checkExtent = true; } float height = pTextObject->GetTotalHeightF(); if (height <= newRect.height) @@ -672,6 +654,7 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const if (dimension.width > newRect.width) { dimension.width = newRect.width; + checkExtent = true; } dimension.height = GetBoundsF().height; } @@ -695,6 +678,25 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const pTextObject->SetWrap(previousWrapType); pTextObject->Compose(); + if (checkExtent) + { + int maxWidth = -1; + int tempWidth = -1; + int totalLine = pTextObject->GetTotalLineCount(); + if (totalLine >= 2) + { + for (int i = 0; i < totalLine; i++) + { + tempWidth = pTextObject->GetLineWidthAtF(i); + if (maxWidth < tempWidth) + { + maxWidth = tempWidth; + } + } + dimension.width = maxWidth; + } + } + if (fitToHorizontal) { dimension.width += textLeftMargin + textRightMargin; @@ -1083,7 +1085,7 @@ _Edit::UpdateAccessibilityElement(EditAccessibilityElementType type) { __pClearButtonTextAccessibilityElement = new _AccessibilityElement(true); __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); -// __pClearButtonTextAccessibilityElement->SetLabel(L"all clear"); + __pClearButtonTextAccessibilityElement->SetLabel(L"clear all"); __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); @@ -1274,7 +1276,7 @@ _Edit::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) result r = E_SUCCESS; Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap); - SysTryReturn(NID_UI_CTRL, pNewBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pNewBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); delete __pBackgroundBitmap[status]; __pBackgroundBitmap[status] = pNewBitmap; @@ -1365,6 +1367,52 @@ _Edit::GetText(int start, int end) const } result +_Edit::AddClipboardShowTriggerEventListener(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + _Window* pWindow = null; + + pWindow = pControlManager->GetCurrentFrame(); + + if (pWindow) + { + if (__pCurrentFrame == null) + { + __pCurrentFrame = dynamic_cast<_Frame*>(pWindow); + + if (__pCurrentFrame) + { + SysLog(NID_UI_CTRL, "[ClipboardShow] FormActivation event is added."); + return __pCurrentFrame->AddFormActivationChangeEventListener(*this); + } + } + + SysLog(NID_UI_CTRL, "[ClipboardShow] Already FormActivation event is added!!!!!!!"); + return E_SUCCESS; + } + else + { + SysLog(NID_UI_CTRL, "[ClipboardShow] Current Frame is not exist!!!!!!"); + return E_SYSTEM; + } +} + +result +_Edit::RemoveClipboardShowTriggerEventListener(void) +{ + result r = E_SUCCESS; + + if (__pCurrentFrame) + { + r = __pCurrentFrame->RemoveFormActivationChangeEventListener(*this); + SysLog(NID_UI_CTRL, "[ClipboardShow] FormActivation event is deleted."); + __pCurrentFrame = null; + } + + return r; +} + +result _Edit::AddExpandableEditAreaEventListener(const _IExpandableEditAreaEventListener& listener) { if (__pExpandableEditAreaEvent == null) @@ -1499,6 +1547,52 @@ _Edit::RemoveScrollPanelEventListener(const _IScrollPanelEventListener& listener return E_SUCCESS; } +void +_Edit::OnScrollStopped(Tizen::Ui::_Control& source) +{ + _pEditPresenter->OnScrollStopped(source); + + return; +} + +void +_Edit::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition) +{ + _pEditPresenter->OnScrollPositionChanged(source, scrollPosition); + + return; +} + +void +_Edit::OnFormActivated(const Tizen::Ui::Controls::_Form& source) +{ +} + +void +_Edit::OnFormDeactivated(const Tizen::Ui::Controls::_Form& source) +{ +} + +void +_Edit::OnFormActivating(const Tizen::Ui::Controls::_Form& source) +{ +} + +void +_Edit::OnFormDeactivating(const Tizen::Ui::Controls::_Form& source) +{ + SysLog(NID_UI_CTRL, "[ClipboardShow] OnFormDeactivating is called!!!!!!!"); + + if (_pEditPresenter) + { + if (_pEditPresenter->GetParentForm() == &source) + { + SysLog(NID_UI_CTRL, "[ClipboardShow] OnFormDeactivating- ChangeToUnbindState is called!!!!!!!"); + _pEditPresenter->ChangeToUnbindState(false); + } + } +} + result _Edit::AddActionEventListener(const _IActionEventListener& listener) { @@ -1731,7 +1825,7 @@ _Edit::ShowKeypad(void) SysTryReturn(NID_UI_CTRL, (HasParent() && GetParent()), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The keypad couldn't be shown."); SysTryReturn(NID_UI_CTRL, (IsKeypadEnabled() && (__inputStyle == INPUT_STYLE_OVERLAY)), E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The keypad couldn't be shown."); - if (IsInternalFocused()) + if (_pEditPresenter->IsCurrentFocused()) { return _pEditPresenter->ShowKeypad(false); } @@ -1881,12 +1975,7 @@ _Edit::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorRect) void _Edit::OnDraw(void) { - Canvas* pCanvas = GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); - - _pEditPresenter->Draw(*pCanvas); - - delete pCanvas; + _pEditPresenter->Draw(); return; } @@ -1900,6 +1989,8 @@ _Edit::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) bool _Edit::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) { + __isTouchMoving = false; + return _pEditPresenter->OnTouchCanceled(source, touchinfo); } @@ -1910,9 +2001,12 @@ _Edit::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); } + + bool result = _pEditPresenter->OnTouchReleased(source, touchinfo); + __isTouchMoving = false; - return _pEditPresenter->OnTouchReleased(source, touchinfo); + return result; } bool @@ -1947,12 +2041,19 @@ _Edit::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) { float xDistance = 0.0f; float yDistance = 0.0f; - gesture.GetDistance(xDistance, yDistance); - FloatPoint flickPoint(xDistance, yDistance); + if (gesture.GetDirection() == _FLICK_DIRECTION_UP || gesture.GetDirection() == _FLICK_DIRECTION_DOWN) + { + gesture.GetDistance(xDistance, yDistance); + FloatPoint flickPoint(xDistance, yDistance); - _pEditPresenter->InitializeCopyPasteManager(); + _pEditPresenter->InitializeCopyPasteManager(); - _pEditPresenter->StartFlickAnimation(flickPoint, gesture.GetDuration()); + _pEditPresenter->StartFlickAnimation(flickPoint, gesture.GetDuration()); + } + else + { + return false; + } return true; } @@ -2009,6 +2110,7 @@ _Edit::OnFocusGained(const _Control& source) bool _Edit::OnFocusLost(const _Control& source) { + __isTouchMoving = false; __internalFocus = false; _pEditPresenter->OnFocusLost(); _Control::OnFocusLost(source); @@ -2169,13 +2271,11 @@ _Edit::OnAncestorEnableStateChanged(const _Control& control) } } - if (this == dynamic_cast< const _Edit* >(&control)) + _pEditPresenter->SetKeypadEventSkipped(!enableState); + + if (__inputStyle != INPUT_STYLE_FULLSCREEN && !IsViewModeEnabled()) { - _pEditPresenter->SetKeypadEventSkipped(!enableState); - if (__inputStyle != INPUT_STYLE_FULLSCREEN) - { - _pEditPresenter->SetCursorDisabled(!enableState); - } + _pEditPresenter->SetCursorDisabled(!enableState); } Invalidate(); @@ -2442,8 +2542,6 @@ _Edit::ReplaceDefaultBackgroundBitmapForSearchBar(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); - r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultFocusBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); _pEditPresenter->SetSearchBarFlag(true); @@ -2465,19 +2563,6 @@ CATCH: return r; } -void -_Edit::SetSearchFieldFocus(bool state) -{ - __isSearchFieldFocused = state; - return; -} - -bool -_Edit::IsSearchFieldFocused(void) const -{ - return __isSearchFieldFocused; -} - Bitmap* _Edit::GetDefaultBackgroundBitmap(EditStatus status) const { @@ -2521,12 +2606,6 @@ _Edit::GetDefaultBackgroundEffectBitmap(void) const return __pDefaultBackgroundEffectBitmap; } -Bitmap* -_Edit::GetDefaultFocusBitmap(void) const -{ - return __pDefaultFocusBitmap; -} - bool _Edit::IsSettingGuideTextColor(void) const { @@ -2691,7 +2770,7 @@ _Edit::SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int ne if (__pExpandableEditAreaEvent) { IEventArg* pEventArg = _ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(status, newLineCount); - SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pExpandableEditAreaEvent->Fire(*pEventArg); } @@ -2705,7 +2784,7 @@ _Edit::SendScrollPanelEvent(CoreScrollPanelStatus eventstatus) if (__pScrollPanelEvent) { IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(eventstatus); - SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _CoreScrollPanelEventArg."); + SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pScrollPanelEvent->Fire(*pEventArg); } @@ -2719,7 +2798,7 @@ _Edit::SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus even if (__pKeypadEvent) { 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."); + SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _pEditPresenter->SetSentKeypadEvent(eventstatus); @@ -2740,7 +2819,7 @@ _Edit::SendTextEvent(CoreTextEventStatus textEventStatus) if (__pTextEvent && IsTextEventEnabled()) { IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(textEventStatus); - SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextEvent->Fire(*pEventArg); } @@ -2754,7 +2833,7 @@ _Edit::SendTextBlockEvent(int start, int end) if (__pTextBlockEvent) { IEventArg* pTextBlockEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end); - SysTryReturn(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg."); + SysTryReturn(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextBlockEvent->Fire(*pTextBlockEventArg); } @@ -2768,7 +2847,7 @@ _Edit::SendLinkEvent(const String& text, LinkType linkType, const String& link) if (__pLinkEvent) { IEventArg* pLinkEventArg = _LinkEvent::CreateLinkEventArgN(text, linkType, link); - SysTryReturn(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturn(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pLinkEvent->Fire(*pLinkEventArg); } @@ -2782,7 +2861,7 @@ _Edit::SendLanguageEvent(LanguageCode prevLanguageCode, LanguageCode currentLang if (__pLanguageEvent) { IEventArg* pLanguageEventArg = _LanguageEvent::CreateLanguageEventArgN(prevLanguageCode, currentLanguageCode); - SysTryReturn(NID_UI_CTRL, pLanguageEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pLanguageEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pLanguageEvent->Fire(*pLanguageEventArg); } @@ -3399,14 +3478,44 @@ _Edit::OnSettingChanged(String& key) void _Edit::OnDrawFocus(void) { - Canvas* pCanvas = GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + Invalidate(); - _pEditPresenter->DrawFocusRing(*pCanvas); + return; +} - delete pCanvas; +_Window* +_Edit::OnDragAndDropBeginning(void) +{ + return _pEditPresenter->OnDragAndDropBeginning(); +} +void +_Edit::OnDragAndDropDropping(void) +{ + return _pEditPresenter->OnDragAndDropDropping(); +} - return; +void +_Edit::OnDragAndDropEntered(void) +{ + return _pEditPresenter->OnDragAndDropEntered(); +} + +void +_Edit::OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position) +{ + return _pEditPresenter->OnDragAndDropMoved(position); +} + +void +_Edit::OnDragAndDropLeft(void) +{ + return _pEditPresenter->OnDragAndDropLeft(); +} + +void +_Edit::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) +{ + return _pEditPresenter->OnDragAndDropDropped(dragAndDropItem); } _AccessibilityElement* @@ -3446,4 +3555,10 @@ _Edit::IsTextEventEnabled(void) const return __isTextEventEnabled; } +bool +_Edit::IsTouchMoving(void) const +{ + return __isTouchMoving; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditAreaImpl.cpp b/src/ui/controls/FUiCtrl_EditAreaImpl.cpp index ee49d46..c0f1d31 100644 --- a/src/ui/controls/FUiCtrl_EditAreaImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditAreaImpl.cpp @@ -226,7 +226,7 @@ _EditAreaImpl::GetCore(void) result _EditAreaImpl::Initialize(InputStyle inputStyle, int limitLength) { - SysTryReturnResult(NID_UI_CTRL, (limitLength > 0), E_INVALID_ARG, "[E_INVALID_ARG] The limit length must be more than 0."); + SysTryReturnResult(NID_UI_CTRL, (limitLength > 0), E_INVALID_ARG, "The limit length must be more than 0."); result r = __pEdit->Initialize(EDIT_STYLE_NORMAL, inputStyle, limitLength); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -237,37 +237,37 @@ _EditAreaImpl::Initialize(InputStyle inputStyle, int limitLength) } __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddActionEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddLanguageEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddKeypadEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddTextBlockEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddTextEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicScrollPanelEvent = _PublicScrollPanelEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (inputStyle == INPUT_STYLE_OVERLAY) { @@ -276,7 +276,7 @@ _EditAreaImpl::Initialize(InputStyle inputStyle, int limitLength) } __pPublicLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddUiLinkEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -929,7 +929,7 @@ _EditAreaImpl::SetInputModeCategory(unsigned long categories, bool enable) EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA; for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++) { - if ( (categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) + if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) { newInputMode = tempInputMode; break; @@ -1260,7 +1260,7 @@ _EditAreaImpl::OnTextValueChanged(const _Control& source) if (__pPublicTextEvent != null) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextEvent->Fire(*pEventArg); } @@ -1276,7 +1276,7 @@ _EditAreaImpl::OnTextValueChangeCanceled(const _Control& source) if (__pPublicTextEvent != null) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextEvent->Fire(*pEventArg); } @@ -1292,7 +1292,7 @@ _EditAreaImpl::OnActionPerformed(const _Control& source, int actionId) if (__pPublicActionEvent != null) { IEventArg* pActionEventArg = _PublicActionEvent::CreateActionEventArgN(actionId); - SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicActionEvent->Fire(*pActionEventArg); } @@ -1308,7 +1308,7 @@ _EditAreaImpl::OnLinkClicked(_Control& source, const String& text, Utility::Link if (__pPublicLinkEvent != null) { IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicLinkEvent->Fire(*pLinkEventArg); } @@ -1324,7 +1324,7 @@ _EditAreaImpl::OnTextBlockSelected(_Control& source, int start, int end) if (__pPublicTextBlockEvent != null) { IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); } @@ -1341,7 +1341,7 @@ _EditAreaImpl::OnKeypadWillOpen(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1358,7 +1358,7 @@ _EditAreaImpl::OnKeypadOpened(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1375,7 +1375,7 @@ _EditAreaImpl::OnKeypadClosed(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1392,7 +1392,7 @@ _EditAreaImpl::OnKeypadBoundsChanged(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1452,7 +1452,7 @@ _EditAreaImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1468,7 +1468,7 @@ _EditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLangu if (__pPublicLanguageEvent) { IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); - SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicLanguageEvent->Fire(*pKLanguageEventArg); } @@ -1484,7 +1484,7 @@ _EditAreaImpl::OnOverlayControlCreated(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CREATED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1500,7 +1500,7 @@ _EditAreaImpl::OnOverlayControlOpened(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_OPENED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1516,7 +1516,7 @@ _EditAreaImpl::OnOverlayControlClosed(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CLOSED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1532,7 +1532,7 @@ _EditAreaImpl::OnOtherControlSelected(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OTHER_CONTROL_SELECTED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp index 59ad4e7..19a111d 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp @@ -120,7 +120,7 @@ _EditCopyPasteEvent* _EditCopyPasteEvent::CreateInstanceN(const _EditCopyPasteManager& source) { _EditCopyPasteEvent* pCoreCopyPasteEvent = new (std::nothrow) _EditCopyPasteEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreCopyPasteEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreCopyPasteEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -144,10 +144,10 @@ void _EditCopyPasteEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _IEditCopyPasteEventListener* pCopyPasteEventListener = dynamic_cast <_IEditCopyPasteEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given."); _EditCopyPasteEventArg* pCopyPasteEventArg = dynamic_cast <_EditCopyPasteEventArg*>(const_cast(&arg)); - SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given."); CoreCopyPasteStatus status = pCopyPasteEventArg->GetStatus(); CoreCopyPasteAction action = pCopyPasteEventArg->GetAction(); @@ -163,7 +163,7 @@ IEventArg* _EditCopyPasteEvent::CreateCopyPasteEventArgN(CoreCopyPasteStatus status, CoreCopyPasteAction action) { _EditCopyPasteEventArg* pEventArg = new (std::nothrow) _EditCopyPasteEventArg(status, action); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index 867aa61..0595b99 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -19,6 +19,7 @@ * @file FUiCtrl_EditCopyPasteManager.cpp * @brief This is the implementation file for the _EditCopyPasteManager class. */ + #include "FUiAnim_ControlVisualElement.h" #include "FUiAnim_VisualElementImpl.h" #include @@ -62,16 +63,17 @@ const int COPY_PASTE_CLIPBOARD_ID = 236; const int COPY_PASTE_SEARCH_ID = 237; class _EditCopyPasteMagnifier - : public _Control + : public _Window { public: - _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos); + _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos); virtual ~_EditCopyPasteMagnifier(void); - static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow); + static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager); virtual void OnDraw(void); void CaptureTextArea(Canvas& canvas); void MoveMagnifier(const FloatPoint& point, int handlerCursorPos); Bitmap* GetMagnifierBitmap(void) const; + virtual result OnAttachedToMainTree(void); void SetRowColumnIndex(int rowIndex, int columnIndex); private: @@ -84,43 +86,29 @@ private: Bitmap* __pMagnifierMaskBitmap; _VisualElement* __pRoot; int __handlerCursorPos; - FloatRectangle __windowBounds; int __rowIndex; int __columnIndex; - _Window* __pParentWindow; }; -_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos) +_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos) : __pCopyPasteManager(pCopyPasteManager) , __pMagnifierBitmap(null) , __pMagnifierMaskBitmap(null) , __pRoot(null) , __handlerCursorPos(handlerCursorPos) - , __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; @@ -140,10 +128,10 @@ _EditCopyPasteMagnifier::GetMagnifierBitmap(void) const } _EditCopyPasteMagnifier* -_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow) +_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager) { - _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, pParentWindow, handlerCursorPos); - SysTryReturn(NID_UI_CTRL, pCopyPasteMagnifier != null, null, E_OUT_OF_MEMORY, "pCopyPasteMagnifier is null"); + _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, handlerCursorPos); + SysTryReturn(NID_UI_CTRL, pCopyPasteMagnifier != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FloatPoint cursorPoint(point); FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -153,7 +141,12 @@ _EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCur _ControlOrientation orientation = pEdit->GetOrientation(); Bitmap* pMagnifierBitmap = pCopyPasteMagnifier->GetMagnifierBitmap(); - SysTryReturn(NID_UI_CTRL, pMagnifierBitmap != null, null, E_OUT_OF_MEMORY, "pMagnifierBitmap is null"); + SysTryReturn(NID_UI_CTRL, pMagnifierBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pCopyPasteMagnifier->CreateRootVisualElement(_WINDOW_TYPE_VE); + 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); @@ -163,11 +156,74 @@ _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->Open(); pCopyPasteMagnifier->SetBounds(bounds); 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."); + + _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) + { + SetOwner(pWindow); + return r; + } + } + + _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 @@ -248,15 +304,22 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) _VisualElementImpl* pEditVisualElementImpl = null; _Edit* pEdit = __pCopyPasteManager->GetEdit(); - SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "pEdit is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null."); _VisualElement* pEditVisualElement = pEdit->GetVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement, E_INVALID_STATE, "pEditVisualElement is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement, E_INVALID_STATE, "[E_INVALID_STATE] pEditVisualElement is null."); _EditPresenter* pEditPresenter = pEdit->GetPresenter(); - SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null."); - pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds,__handlerCursorPos); + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds, __rowIndex, __columnIndex); + } + else + { + 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); @@ -264,11 +327,17 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, pEdit->GetOrientation(), capturePosY); FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF(); - captureBounds.x = cursorBounds.x - captureWidth/2.0f; + + // 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.y = cursorBounds.y + cursorBounds.height/2.0f - captureHeight/2.0f; captureBounds.width = captureWidth; captureBounds.height = captureHeight; - captureBounds = textObjectBounds.GetIntersection(captureBounds); if ((cursorBounds.x + cursorBounds.width/2.0f) - captureBounds.x < captureWidth/2.0f) { @@ -281,18 +350,26 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) } Bitmap* pOriginalBitmp = null; - Canvas* pCanvas = new (std::nothrow) Canvas; - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "pCanvas is null."); + Canvas* pCanvas = new (std::nothrow) Canvas(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pCanvas->Construct(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)); SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); pEditVisualElementImpl = _VisualElementImpl::GetInstance(*pEditVisualElement); - pEditVisualElementImpl->Capture(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)), CoordinateSystem::AlignToDevice(captureBounds), true); + if (!(pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) + { + pEditVisualElementImpl->Capture(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)), CoordinateSystem::AlignToDevice(captureBounds), true); + } + else + { + //cursor not getting copied due to AlignToDevice of captureBounds in case of token. + pEditVisualElementImpl->Capture(*pCanvas, FloatRectangle(0, 0, captureBounds.width, captureBounds.height), captureBounds, true); + } - pOriginalBitmp = new (std::nothrow) Bitmap; - SysTryCatch(NID_UI, pOriginalBitmp != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pOriginalBitmp = new (std::nothrow) Bitmap(); + SysTryCatch(NID_UI, pOriginalBitmp != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pOriginalBitmp->Construct(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height))); @@ -325,8 +402,6 @@ _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(); } @@ -344,7 +419,7 @@ _EditCopyPasteMagnifier::SetRowColumnIndex(int rowIndex, int columnIndex) * */ class _EditCopyPasteHandler - : public _Control + : public _Window , virtual public IEventListener , virtual public _IUiEventListener , virtual public _IUiEventPreviewer @@ -356,8 +431,8 @@ public: * This is the default class constructor. * */ - _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); + _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); + _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); /** * This is the default class destructor. @@ -375,9 +450,10 @@ public: HANDLER_DIRECTION_REVERSE_3,//horizontal vertical reverse }; - 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); + 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); int GetHandlerCursorPosition(void) const; + void SetHandlerRowColumnIndex(int rowIndex, int columnIndex); void GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const; void SetHandlerCursorPosition(int handlerCursorPos); void AdjustBounds(void); @@ -396,6 +472,8 @@ public: virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); virtual bool IsActivatedOnOpen(void) const; virtual void OnChangeLayout(_ControlOrientation orientation); + virtual result OnAttachedToMainTree(void); + private: _EditCopyPasteHandler(const _EditCopyPasteHandler& value); @@ -412,14 +490,12 @@ private: bool __reverseCheck; int __handlerCursorPos; bool __isTouchPressed; - FloatRectangle __windowBounds; HandlerDirection __handlerDirection; bool __singleHandler; _EditCopyPasteMagnifier* __pCopyPasteMagnifier; bool __isTouchMoving; int __rowIndex; int __columnIndex; - _Window* __pParentWindow; }; // _EditCopyPasteHandler Bitmap* @@ -440,15 +516,15 @@ _EditCopyPasteHandler::CreateCopyPasteMagnifier(void) SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n"); FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f); - if (__rowIndex == -1 && __columnIndex == -1) + if (__rowIndex >= 0 && __columnIndex >= 0) { - pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); } else { - pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); } - __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager, __pParentWindow); + __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager); SysTryReturn(NID_UI_CTRL, __pCopyPasteMagnifier, false, E_INVALID_STATE, "[E_INVALID_STATE] __pCopyPasteMagnifier is null.\n"); __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex); @@ -461,6 +537,7 @@ _EditCopyPasteHandler::DestroyCopyPasteMagnifier(void) { if (__pCopyPasteMagnifier) { + __pCopyPasteMagnifier->Close(); delete __pCopyPasteMagnifier; __pCopyPasteMagnifier = null; } @@ -472,21 +549,21 @@ _EditCopyPasteHandler::MoveCopyPasteMagnifier(void) if (__pCopyPasteMagnifier) { _Edit* pEdit = __pCopyPasteManager->GetEdit(); - SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "pEdit is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null."); _EditPresenter* pEditPresenter = pEdit->GetPresenter(); - SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null."); FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f); - if (__rowIndex == -1 && __columnIndex == -1) + if (__rowIndex >= 0 && __columnIndex >= 0) { - pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); } else { - pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); - __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); } + __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex); __pCopyPasteMagnifier->MoveMagnifier(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos); } } @@ -562,7 +639,7 @@ _EditCopyPasteHandler::ChangeHandlerBitmap(void) } } -_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) : __pRoot(null) , __pHandlerBitmap(null) , __touchPressedPoint(0.0f, 0.0f) @@ -572,15 +649,18 @@ _EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCurs , __reverseCheck(false) , __handlerCursorPos(handlerCursorPos) , __isTouchPressed(false) - , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f) , __handlerDirection(HANDLER_DIRECTION_NONE) , __singleHandler(false) , __pCopyPasteMagnifier(null) , __isTouchMoving(false) , __rowIndex(-1) , __columnIndex(-1) - , __pParentWindow(pParentWindow) { + AcquireHandle(); + + __pRoot = GetVisualElement(); + __pRoot->SetSurfaceOpaque(false); + Point handlerPoint(point); if (singleHandler) @@ -605,7 +685,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, _Window* pParentWindow, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) : __pRoot(null) , __pHandlerBitmap(null) , __touchPressedPoint(0.0f, 0.0f) @@ -615,15 +695,15 @@ _EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handle , __reverseCheck(false) , __handlerCursorPos(handlerCursorPos) , __isTouchPressed(false) - , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f) , __handlerDirection(HANDLER_DIRECTION_NONE) , __singleHandler(false) , __pCopyPasteMagnifier(null) , __isTouchMoving(false) , __rowIndex(-1) , __columnIndex(-1) - , __pParentWindow(pParentWindow) { + AcquireHandle(); + //To do ..... //Point handlerPoint(_CoordinateSystemUtils::ConvertToInteger(point)); @@ -662,15 +742,20 @@ _EditCopyPasteHandler::~_EditCopyPasteHandler(void) } _EditCopyPasteHandler* -_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool 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"); + _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler); + SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Point handlerPoint(point); Rectangle bounds(0, 0, 0, 0); Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap(); + result r = pCopyPasteHandler->CreateRootVisualElement(_WINDOW_TYPE_VE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCopyPasteHandler->SetActivationEnabled(false); + if (singleHandler) { handlerPoint.x = handlerPoint.x - (pHandlerBitmap->GetWidth() / 2); @@ -688,26 +773,35 @@ _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->Open(false); pCopyPasteHandler->SetBounds(bounds); pCopyPasteHandler->CheckReverseStatus(); - pCopyPasteHandler->AcquireHandle(); + pCopyPasteHandler->AdjustBounds(); return pCopyPasteHandler; + +CATCH: + pCopyPasteHandler->Close(); + delete pCopyPasteHandler; + + return null; } _EditCopyPasteHandler* -_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler) +_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool 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"); + _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler); + SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); FloatPoint handlerPoint(point); FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap(); + result r = pCopyPasteHandler->CreateRootVisualElement(_WINDOW_TYPE_VE); + 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); @@ -725,13 +819,18 @@ _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->Open(false); pCopyPasteHandler->SetBounds(bounds); pCopyPasteHandler->CheckReverseStatus(); - pCopyPasteHandler->AcquireHandle(); + pCopyPasteHandler->AdjustBounds(); return pCopyPasteHandler; + +CATCH: + pCopyPasteHandler->Close(); + delete pCopyPasteHandler; + + return null; } int @@ -741,6 +840,13 @@ _EditCopyPasteHandler::GetHandlerCursorPosition(void) const } void +_EditCopyPasteHandler::SetHandlerRowColumnIndex(int rowIndex, int columnIndex) +{ + __rowIndex = rowIndex; + __columnIndex = columnIndex; +} + +void _EditCopyPasteHandler::GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const { rowIndex = __rowIndex; @@ -751,30 +857,34 @@ void _EditCopyPasteHandler::SetHandlerCursorPosition(int handlerCursorPos) { __handlerCursorPos = handlerCursorPos; + __rowIndex = -1; + __columnIndex = -1; } void _EditCopyPasteHandler::AdjustBounds(void) { FloatRectangle cursorRect; - FloatRectangle rect = GetAbsoluteBoundsF(true); + FloatRectangle rect = GetBoundsF(); FloatPoint checkPoint(0.0f, 0.0f); _Edit* pEdit = __pCopyPasteManager->GetEdit(); _EditPresenter* pEditPresenter = pEdit->GetPresenter(); if (__singleHandler) { - if (__rowIndex == -1 && __columnIndex == -1) + if (__rowIndex >= 0 && __columnIndex >= 0) { - pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false); } else { - pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect, false); } rect.x = cursorRect.x - __pHandlerBitmap->GetWidthF()/2.0f; rect.y = cursorRect.y + cursorRect.height; - checkPoint = FloatPoint(cursorRect.x , cursorRect.y + cursorRect.height); + + checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height); + if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) { rect.y -= (cursorRect.height + __pHandlerBitmap->GetHeightF()); @@ -782,13 +892,13 @@ _EditCopyPasteHandler::AdjustBounds(void) } else { - if (__rowIndex == -1 && __columnIndex == -1) + if (__rowIndex >= 0 && __columnIndex >= 0) { - pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false); } else { - pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect, false); } rect.x = cursorRect.x; @@ -836,16 +946,21 @@ _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); + + if (__singleHandler && pEditPresenter->IsViewModeEnabled()) + { + SetVisibleState(false); + } + SetBounds(rect); - Invalidate(); return; } @@ -889,7 +1004,7 @@ _EditCopyPasteHandler::OnTouchPressed(const _Control& source, const _TouchInfo& else { __pCopyPasteMagnifier->SetVisibleState(true); - __pCopyPasteMagnifier->Invalidate(); + __pCopyPasteMagnifier->Open(); } #endif __touchPressedPoint = touchinfo.GetCurrentPosition(); @@ -906,14 +1021,14 @@ _EditCopyPasteHandler::CheckReverseStatus(void) _ControlManager* pControlManager = _ControlManager::GetInstance(); _Edit* pEdit = __pCopyPasteManager->GetEdit(); _ControlOrientation orientation = pEdit->GetOrientation(); - FloatRectangle rect = GetAbsoluteBoundsF(true); + FloatRectangle rect = GetBoundsF(); FloatRectangle cursorAbsBounds = __pCopyPasteManager->GetCursorBoundsF(true); float clipboardHeight = 0.0f; FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f); float adjustHeight = 0.0f; _EditPresenter* pEditPresenter = pEdit->GetPresenter(); - SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n"); clipboardHeight = pEditPresenter->GetClipboardHeight(); pEditPresenter->GetKeypadBoundsEx(keypadBounds); @@ -948,8 +1063,6 @@ _EditCopyPasteHandler::CheckReverseStatus(void) 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)) @@ -958,8 +1071,6 @@ _EditCopyPasteHandler::CheckReverseStatus(void) 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); } return; @@ -1163,8 +1274,6 @@ _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); } @@ -1178,6 +1287,7 @@ _EditCopyPasteHandler::OnTouchReleased(const _Control& source, const _TouchInfo& if (__pCopyPasteMagnifier) { __pCopyPasteMagnifier->SetVisibleState(false); + __pCopyPasteMagnifier->Close(); } _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); if (pCopyPastePopup && !__isTouchMoving) @@ -1193,6 +1303,41 @@ _EditCopyPasteHandler::OnTouchReleased(const _Control& source, const _TouchInfo& __pCopyPasteManager->SendTextBlockEvent(); Invalidate(); __isTouchMoving = false; + + if (!__singleHandler) + { + int leftRowIndex = -1; + int leftColumnIndex = -1; + int rightRowIndex = -1; + int rightColumnIndex = -1; + int leftHandlerCursorPos = -1; + int rightHandlerCursorPos = -1; + + __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, leftRowIndex, leftColumnIndex); + __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rightRowIndex, rightColumnIndex); + leftHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT); + rightHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT); + + _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); + + if(__leftHandler && __handlerCursorPos > rightHandlerCursorPos) + { + __pCopyPasteManager->CreateHandle(rightHandlerCursorPos, leftHandlerCursorPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex); + + if (pCopyPastePopup) + { + pCopyPastePopup->ReleaseTouchCapture(); + } + } + else if (!__leftHandler && __handlerCursorPos < leftHandlerCursorPos) + { + __pCopyPasteManager->CreateHandle(rightHandlerCursorPos, leftHandlerCursorPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex); + if (pCopyPastePopup) + { + pCopyPastePopup->ReleaseTouchCapture(); + } + } + } return true; } @@ -1234,15 +1379,15 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to return true; } - if (__rowIndex == -1 && __columnIndex == -1) + if (__rowIndex >= 0 && __columnIndex >= 0) { - pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos); - pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, absCursorRect); + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect, __rowIndex, __columnIndex); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect); } else { - pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect, __rowIndex, __columnIndex); - pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect); + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, absCursorRect); } FloatPoint absoluteTouchMovedPoint = FloatPoint(GetBoundsF().x + point.x, GetBoundsF().y + point.y); @@ -1276,7 +1421,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) { touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f; - touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; } else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3) { @@ -1339,31 +1484,6 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to } } - if (!__singleHandler) - { - int nextHandlerLine = -1; - if (__leftHandler) - { - nextHandlerLine = pTextObject->GetLineIndexAtTextIndex(__pCopyPasteManager->GetHandlerCursorPosition(Tizen::Ui::Controls::_EditCopyPasteManager::HANDLER_TYPE_RIGHT)); - } - else - { - nextHandlerLine = pTextObject->GetLineIndexAtTextIndex(__pCopyPasteManager->GetHandlerCursorPosition(Tizen::Ui::Controls::_EditCopyPasteManager::HANDLER_TYPE_LEFT)); - } - - if (curCursorLine == nextHandlerLine) - { - if (__leftHandler && absoluteTouchMovedPoint.y >= absCursorRect.y + absCursorRect.height) - { - touchPoint.y = absCursorRect.y + absCursorRect.height/2.0f; - } - else if (!__leftHandler && absoluteTouchMovedPoint.y <= absCursorRect.y + absCursorRect.height) - { - touchPoint.y = absCursorRect.y + absCursorRect.height/2.0f; - } - } - } - touchPoint.x = touchPoint.x - absEditBounds.x - textObjectBounds.x; touchPoint.y = touchPoint.y - absEditBounds.y - textObjectBounds.y; @@ -1429,27 +1549,28 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to { return true; } + if (!__singleHandler) { - if (!__pCopyPasteManager->CheckHandlePosition(__leftHandler, cursorPos)) + _EditCopyPasteManager::HandlerType nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_MAX; + if (__leftHandler) + { + nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_RIGHT; + } + else + { + nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_LEFT; + } + int nextHandler = __pCopyPasteManager->GetHandlerCursorPosition(nextHandlerType); + if (totalLine == 1 && (nextHandler == 0 || nextHandler == pEditPresenter->GetTextLength())) { - if (totalLine == 1) + if (Math::Abs(nextHandler - cursorPos) == 1) { - _EditCopyPasteManager::HandlerType nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_MAX; - if (__leftHandler) - { - nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_RIGHT; - } - else - { - nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_LEFT; - } - int nextHandler = __pCopyPasteManager->GetHandlerCursorPosition(nextHandlerType); - if (Math::Abs(nextHandler - __handlerCursorPos) <= 1) - { - pTextObject->SetFirstDisplayLineIndexFromTextIndex(nextHandler); - } + pTextObject->SetFirstDisplayLineIndexFromTextIndex(nextHandler); } + } + if (nextHandler == cursorPos) + { return true; } } @@ -1468,28 +1589,29 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos); __handlerCursorPos = cursorPos; - __pCopyPasteManager->SetCursorPosition(__handlerCursorPos); + + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->SetCursorPosition(cursorPos, __rowIndex, __columnIndex); + } + else + { + __pCopyPasteManager->SetCursorPosition(cursorPos); + } + pEditPresenter->ScrollPanelToCursorPosition(true); if (!__singleHandler) { __pCopyPasteManager->RefreshBlock(__leftHandler); - CheckReverseStatus(); } else { - if (__rowIndex == -1 && __columnIndex == -1) - { - __pCopyPasteManager->SetCursorPosition(cursorPos); - } - else - { - pEditPresenter->SetCursorPosition(cursorPos, __rowIndex, __columnIndex); - } pEditPresenter->DrawText(); AdjustBounds(); - CheckReverseStatus(); } + CheckReverseStatus(); + Invalidate(); MoveCopyPasteMagnifier(); return true; @@ -1508,6 +1630,64 @@ _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."); + + _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) + { + SetOwner(pWindow); + return r; + } + } + + _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; +} + _EditCopyPasteManager::_EditCopyPasteManager(_Edit& parenEdit) : __pCopyPastePopup(null) , __contextMenuAlign(CONTEXT_MENU_CORE_ALIGN_UP) @@ -1518,57 +1698,19 @@ _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; - _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(); + CreateHandle(); } _EditCopyPasteManager::~_EditCopyPasteManager(void) { - if (__parentWindowClipFlagChanged && __pParentWindow) - { - _VisualElement* pVisualElement = __pParentWindow->GetVisualElement(); - if (pVisualElement) - { - pVisualElement->SetClipChildrenEnabled(true); - } - } - - Release(); + ReleaseCopyPastePopup(); + ReleaseHandle(); if (__pCoreCopyPasteEvent) { @@ -1578,41 +1720,25 @@ _EditCopyPasteManager::~_EditCopyPasteManager(void) } void -_EditCopyPasteManager::Release(void) +_EditCopyPasteManager::ReleaseHandle(void) { - if (__pCopyPastePopup) - { - __pCopyPastePopup->Close(); - delete __pCopyPastePopup; - __pCopyPastePopup = null; - } - if (__pHandle[HANDLER_TYPE_CENTER]) { - if (__pParentWindow) - { - __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_CENTER]); - } + __pHandle[HANDLER_TYPE_CENTER]->Close(); delete __pHandle[HANDLER_TYPE_CENTER]; __pHandle[HANDLER_TYPE_CENTER] = null; } if (__pHandle[HANDLER_TYPE_LEFT]) { - if (__pParentWindow) - { - __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_LEFT]); - } + __pHandle[HANDLER_TYPE_LEFT]->Close(); delete __pHandle[HANDLER_TYPE_LEFT]; __pHandle[HANDLER_TYPE_LEFT] = null; } if (__pHandle[HANDLER_TYPE_RIGHT]) { - if (__pParentWindow) - { - __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_RIGHT]); - } + __pHandle[HANDLER_TYPE_RIGHT]->Close(); delete __pHandle[HANDLER_TYPE_RIGHT]; __pHandle[HANDLER_TYPE_RIGHT] = null; } @@ -1681,7 +1807,7 @@ _EditCopyPasteManager::SendCopyPasteEvent(CoreCopyPasteStatus status, CoreCopyPa if (__pCoreCopyPasteEvent) { IEventArg* pCopyPasteEventArg = _EditCopyPasteEvent::CreateCopyPasteEventArgN(status, action); - SysTryReturn(NID_UI_CTRL, pCopyPasteEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturn(NID_UI_CTRL, pCopyPasteEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pCoreCopyPasteEvent->Fire(*pCopyPasteEventArg); } @@ -1712,6 +1838,8 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f); bool commandButtonExist = false; + bool formExist = false; + bool panelExist = false; FloatRectangle cursorRect = GetCursorBoundsF(true); float contextMenuHeight = 0.0f; @@ -1741,7 +1869,6 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) } GET_SHAPE_CONFIG(EDIT::COPYPASTE_HANDLER_HEIGHT, orientation, handlerHeight); - GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_HEIGHT, orientation, contextMenuHeight); GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TOP_MARGIN, orientation, contextMenuTopMargin); GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, orientation, contextMenuBottomMargin); @@ -1776,11 +1903,13 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) if (pForm) { formClientBounds = pForm->GetClientBoundsF(); + formExist = true; } _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel(); if (pPanel) { panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true); + panelExist = true; } __pEdit->GetKeypadBounds(keypadBounds); @@ -1800,6 +1929,11 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) editShowAreaAbsRect.height = textObjectBounds.height; } } + if (editShowAreaAbsRect.y < 0.0f) + { + editShowAreaAbsRect.height += editShowAreaAbsRect.y; + editShowAreaAbsRect.y = 0.0f; + } if (commandButtonExist) { @@ -1815,15 +1949,21 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - keypadBounds.y); } } - if (editShowAreaAbsRect.y < formClientBounds.y) + if (formExist) { - editShowAreaAbsRect.y = formClientBounds.y; - editShowAreaAbsRect.height -= formClientBounds.y; + if (editShowAreaAbsRect.y < formClientBounds.y) + { + editShowAreaAbsRect.y = formClientBounds.y; + editShowAreaAbsRect.height -= formClientBounds.y; + } } - if (editShowAreaAbsRect.y < panelAbsoulteBounds.y) + if (panelExist) { - editShowAreaAbsRect.y = panelAbsoulteBounds.y; - editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y); + if (editShowAreaAbsRect.y < panelAbsoulteBounds.y) + { + editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y); + editShowAreaAbsRect.y = panelAbsoulteBounds.y; + } } __editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect); } @@ -1866,19 +2006,19 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) } //Both of handlers are located on the top of the Editor. - if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) < editShowAreaAbsRect.y)) + if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) < editShowAreaAbsRect.y)) { SysLog(NID_UI_CTRL, "Both of handlers are located on the top of the Editor.\n"); return; } //Both of handlers are located on the bottom of the Editor. - else if( ((startRect.y + startRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height ) && ((endRect.y + endRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height)) + else if(((startRect.y + startRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height) && ((endRect.y + endRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height)) { SysLog(NID_UI_CTRL, "Both of handlers are located on the bottom of the Editor.\n"); return; } // Left handler is located on the top of the Editor and Right handler is located on the bottom of the Editor. - else if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height))) + else if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height))) { copyPastePoint.y = editShowAreaAbsRect.y + editShowAreaAbsRect.height/2; @@ -1889,9 +2029,9 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) } // Left handler is located on the top of the Editor and Right handler is located on the Editor - else if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) <= (editShowAreaAbsRect.y + editShowAreaAbsRect.height)) ) + else if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) <= (editShowAreaAbsRect.y + editShowAreaAbsRect.height))) { - if ( (endRect.y + endRect.height + handlerHeight + __contextMenuHeight) < keypadBounds.y) + if ((endRect.y + endRect.height + handlerHeight + __contextMenuHeight) < keypadBounds.y) { __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; copyPastePoint.y = endRect.y + endRect.height + handlerHeight; @@ -1911,7 +2051,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) } } // Left handler is located on the Editor and Right handler is located on the bottom of the Editor - else if ( ((startRect.y + startRect.height) >= editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height)) ) + else if (((startRect.y + startRect.height) >= editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height))) { if (__contextMenuHeight < startRect.y) { @@ -1928,7 +2068,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) copyPastePoint.y = startRect.y; } // There is a space on the bottom of the Editor. - else if ( screenSize.height > (endRect.y + endRect.height + handlerHeight + __contextMenuHeight)) + else if (screenSize.height > (endRect.y + endRect.height + handlerHeight + __contextMenuHeight)) { __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; @@ -1953,17 +2093,30 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) return; } FloatRectangle cursorRect; + bool reverseHandler = false; int cursorPosition = GetCursorPosition(); __pEdit->CalculateAbsoluteCursorBounds(cursorPosition, cursorRect); copyPastePoint.x = cursorRect.x; copyPastePoint.y = cursorRect.y; - if (__editVisibleArea.y > copyPastePoint.y || __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y) + if (!_FloatCompare(__editVisibleArea.y + __editVisibleArea.height, copyPastePoint.y) && __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y) { return; } - if (copyPastePoint.y < __contextMenuHeight) + if (!_FloatCompare(__editVisibleArea.y, copyPastePoint.y) && __editVisibleArea.y > copyPastePoint.y) + { + if (!_FloatCompare(__editVisibleArea.y + __editVisibleArea.height, copyPastePoint.y + cursorRect.height) && (__editVisibleArea.y + __editVisibleArea.height > copyPastePoint.y + cursorRect.height)) + { + reverseHandler = true; + } + else + { + return; + } + } + + if (copyPastePoint.y < __contextMenuHeight || reverseHandler) { FloatRectangle cursorRect = GetCursorBoundsF(true); @@ -1980,7 +2133,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) __pCopyPastePopup = _ContextMenu::CreateContextMenuN(copyPastePoint, CONTEXT_MENU_CORE_STYLE_GRID, __contextMenuAlign); SysTryReturnVoidResult(NID_UI_CTRL, __pCopyPastePopup, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - if ( __pEdit->GetTextLength() != 0 && !isPasswordStyle) + if (__pEdit->GetTextLength() != 0 && !isPasswordStyle) { if (__pEdit->IsBlocked()) { @@ -2030,56 +2183,47 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) __pCopyPastePopup->AddActionEventListener(*this); return; /* - Bitmap* pSearchBitmap = null; - Bitmap* pReplacedSearchBitmap = null; - Bitmap* pReplacedSearchPressedBitmap = null; + Bitmap* pSearchNormalBitmap = null; + Bitmap* pSearchPressedBitmap = null; + Color searchColor; Color searchPressedColor; result r = E_SUCCESS; if (__pEdit->IsBlocked() && !isPasswordStyle) { - r = GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchBitmap); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_NORMAL, searchColor); GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_PRESSED, searchPressedColor); - pReplacedSearchBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchColor); - SysTryCatch(NID_UI_CTRL, pReplacedSearchBitmap, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", GetErrorMessage(GetLastResult())); + r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, searchColor, pSearchNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r, r,"[%s] Propagating.", GetErrorMessage(r)); - pReplacedSearchPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchPressedColor); - SysTryCatch(NID_UI_CTRL, pReplacedSearchPressedBitmap, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", GetErrorMessage(GetLastResult())); + r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, searchPressedColor, pSearchPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r, r,"[%s] Propagating.", GetErrorMessage(r)); - __pCopyPastePopup->AddItem(null, COPY_PASTE_SEARCH_ID, pReplacedSearchBitmap, pReplacedSearchPressedBitmap, null); + __pCopyPastePopup->AddItem(null, COPY_PASTE_SEARCH_ID, pSearchNormalBitmap, pSearchPressedBitmap, null); } - if (pSearchBitmap) + if (pSearchNormalBitmap) { - delete pSearchBitmap; - pSearchBitmap = null; + delete pSearchNormalBitmap; + pSearchNormalBitmap = null; } - if (pReplacedSearchBitmap) + if (pSearchPressedBitmap) { - delete pReplacedSearchBitmap; - pReplacedSearchBitmap = null; - } - - if (pReplacedSearchPressedBitmap) - { - delete pReplacedSearchPressedBitmap; - pReplacedSearchPressedBitmap = null; + delete pSearchPressedBitmap; + pSearchPressedBitmap = null; } __pCopyPastePopup->AddActionEventListener(*this); return; CATCH: - delete pSearchBitmap; - pSearchBitmap = null; + delete pSearchNormalBitmap; + pSearchNormalBitmap = null; - delete pReplacedSearchBitmap; - pReplacedSearchBitmap = null; + delete pSearchPressedBitmap; + pSearchPressedBitmap = null; return; */ @@ -2088,7 +2232,7 @@ CATCH: void _EditCopyPasteManager::CreateHandle(void) { - Release(); + ReleaseHandle(); if (__pEdit->IsBlocked()) { @@ -2104,16 +2248,9 @@ _EditCopyPasteManager::CreateHandle(void) FloatPoint leftHandler(startRect.x, startRect.y + startRect.height); FloatPoint rightHandler(endRect.x, endRect.y + endRect.height); - 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]); - } + + __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, false, true); + __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, false, false); } else { @@ -2121,18 +2258,59 @@ _EditCopyPasteManager::CreateHandle(void) __pEdit->CalculateAbsoluteCursorBounds(__pEdit->GetCursorPosition(), centerRect); FloatPoint centerHandler(centerRect.x, centerRect.y + centerRect.height); - if (__pParentWindow) - { - __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, __pParentWindow, true, true); - __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_CENTER]); - } + __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, true, true); #if EDIT_COPY_PASTE_MAGNIFIER -// __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier(); + __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier(); #endif } } void +_EditCopyPasteManager::CreateHandle(int start, int end, int startRowIndex, int startColumnIndex, int endRowIndex, int endColumnIndex) +{ + ReleaseHandle(); + + if (__pEdit->IsBlocked()) + { + FloatRectangle startRect; + FloatRectangle endRect; + + if (startRowIndex > -1 && startColumnIndex > -1) + { + __pEditPresenter->CalculateAbsoluteCursorBounds(startRowIndex, startColumnIndex, startRect); + } + else + { + __pEditPresenter->CalculateAbsoluteCursorBounds(start, startRect); + } + if (endRowIndex > -1 && endColumnIndex > -1) + { + __pEditPresenter->CalculateAbsoluteCursorBounds(endRowIndex, endColumnIndex, endRect); + } + else + { + __pEditPresenter->CalculateAbsoluteCursorBounds(end, endRect); + } + + 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 (startRowIndex > -1 && startColumnIndex > -1) + { + __pHandle[HANDLER_TYPE_LEFT]->SetHandlerRowColumnIndex(startRowIndex, startColumnIndex); + } + if (endRowIndex > -1 && endColumnIndex > -1) + { + __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerRowColumnIndex(endRowIndex, endColumnIndex); + } + AdjustBounds(); + } +} + +void _EditCopyPasteManager::Show(void) { if (__pHandle[HANDLER_TYPE_CENTER]) @@ -2144,6 +2322,8 @@ _EditCopyPasteManager::Show(void) __pHandle[HANDLER_TYPE_CENTER]->AdjustBounds(); __pHandle[HANDLER_TYPE_CENTER]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_CENTER]->Invalidate(); + __pEditPresenter->DrawText(); + __pHandle[HANDLER_TYPE_CENTER]->MoveCopyPasteMagnifier(); } if (__pHandle[HANDLER_TYPE_LEFT] && __pHandle[HANDLER_TYPE_RIGHT]) @@ -2153,31 +2333,14 @@ _EditCopyPasteManager::Show(void) __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_LEFT]->Invalidate(); __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); + __pHandle[HANDLER_TYPE_LEFT]->MoveCopyPasteMagnifier(); + __pHandle[HANDLER_TYPE_RIGHT]->MoveCopyPasteMagnifier(); __pEditPresenter->DrawText(); } 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(); @@ -2257,52 +2420,43 @@ _EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point) return showCheck; } -bool -_EditCopyPasteManager::CheckHandlePosition(bool leftHandle, int cursorPosition) +void +_EditCopyPasteManager::RefreshBlock(bool isLeftHandle) { - int leftHandlerPosition = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition(); - int rightHandlerPosition = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition(); + int leftRowIndex = -1; + int leftColumnIndex = -1; + int rightRowIndex = -1; + int rightColumnIndex = -1; - if (leftHandle) + int leftHandlerPos = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition(); + int rightHandlerPos = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition(); + __pHandle[HANDLER_TYPE_LEFT]->GetHandlerRowColumnIndex(leftRowIndex, leftColumnIndex); + __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(rightRowIndex, rightColumnIndex); + + if (leftHandlerPos <= rightHandlerPos) { - if (cursorPosition + 1 <= rightHandlerPosition) + if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1) { - return true; + __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos, leftRowIndex, leftColumnIndex, rightRowIndex, rightColumnIndex); } else { - return false; + __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos); } + __pEditPresenter->SetCursorChangedFlag(!isLeftHandle); } else { - if (cursorPosition >= leftHandlerPosition + 1) + if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1) { - return true; + __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex); } else { - return false; + __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos); } + __pEditPresenter->SetCursorChangedFlag(isLeftHandle); } -} - -void -_EditCopyPasteManager::RefreshBlock(bool isLeftHandle) -{ - int leftRowIndex = -1; - int leftColumnIndex = -1; - int rightRowIndex = -1; - int rightColumnIndex = -1; - - int leftHandlerPos = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition(); - int rightHandlerPos = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition(); - __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(leftRowIndex, leftColumnIndex); - __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(rightRowIndex, rightColumnIndex); - - __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos, leftColumnIndex, leftColumnIndex, rightRowIndex, rightColumnIndex); - - __pEditPresenter->SetCursorChangedFlag(!isLeftHandle); __pEditPresenter->DrawText(); AdjustBounds(); } @@ -2338,7 +2492,14 @@ _EditCopyPasteManager::GetCursorPosition(void) const int _EditCopyPasteManager::GetHandlerCursorPosition(HandlerType handlerType) const { - return __pHandle[handlerType]->GetHandlerCursorPosition(); + if (__pHandle[handlerType]) + { + return __pHandle[handlerType]->GetHandlerCursorPosition(); + } + else + { + return -1; + } } void @@ -2374,8 +2535,7 @@ _EditCopyPasteManager::OnActionPerformed(const _Control& source, int actionId) __pEdit->GetWordPosition(cursorPos, start, end); __pEdit->SetBlockRange(start, end); SendTextBlockEvent(); - - Release(); + __pEditPresenter->UpdateComponentInformation(); CreateHandle(); CreateCopyPastePopup(); Show(); @@ -2390,8 +2550,6 @@ _EditCopyPasteManager::OnActionPerformed(const _Control& source, int actionId) __pEdit->SetBlockRange(0, textLength); SendTextBlockEvent(); __pEditPresenter->UpdateComponentInformation(); - - Release(); CreateHandle(); CreateCopyPastePopup(); Show(); @@ -2414,9 +2572,16 @@ _EditCopyPasteManager::OnActionPerformed(const _Control& source, int actionId) break; case COPY_PASTE_CLIPBOARD_ID: - pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); - ReleaseCopyPastePopup(); - SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD); + if (!pClipBoard->IsPopupVisible()) + { + pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); + ReleaseCopyPastePopup(); + SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD); + } + else + { + ReleaseCopyPastePopup(); + } break; case COPY_PASTE_SEARCH_ID: LaunchSearch(); @@ -2520,7 +2685,7 @@ _EditCopyPasteManager::GetEdit(void) const void _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) { - if (!__pHandle[HANDLER_TYPE_RIGHT] || ! __pHandle[HANDLER_TYPE_LEFT]) + if (!__pHandle[HANDLER_TYPE_RIGHT] || !__pHandle[HANDLER_TYPE_LEFT]) { return; } @@ -2528,37 +2693,45 @@ _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) int leftHandlerPosition = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition(); int rightHandlerPosition = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition(); int textLength = __pEdit->GetTextLength(); - FloatRectangle cursorBounds; + FloatRectangle rightHandlerCursorBounds; int newCursorPosition; - __pEdit->GetCursorBounds(false, cursorBounds); - FloatPoint cursorPoint(cursorBounds.x, cursorBounds.y); + __pEditPresenter->CalculateCursorBounds(__pEditPresenter->GetTextBoundsF(), rightHandlerCursorBounds, rightHandlerPosition); + FloatPoint cursorPoint(rightHandlerCursorBounds.x, rightHandlerCursorBounds.y); TextObject* pTextObject = __pEditPresenter->GetTextObject(); switch(moveType) { case HANDLER_MOVE_TYPE_LEFT: - if (leftHandlerPosition < rightHandlerPosition-1) + if (leftHandlerPosition == rightHandlerPosition-1) { - __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(--rightHandlerPosition); - RefreshBlock(); - __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); - __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); + if (leftHandlerPosition == 0) + { + return; + } + --rightHandlerPosition; } - else + if (rightHandlerPosition - 1 < 0) { return; } + newCursorPosition = --rightHandlerPosition; + __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition); + pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition); + __pEditPresenter->ScrollPanelToCursorPosition(true); + RefreshBlock(); + __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); + __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); break; case HANDLER_MOVE_TYPE_UP: - cursorPoint.y -= cursorBounds.height/2.0f; + cursorPoint.y -= rightHandlerCursorBounds.height/2.0f; newCursorPosition = GetCursorPositionAt(cursorPoint); if (newCursorPosition <= 0) { int curCursorLine = pTextObject->GetLineIndexAtTextIndex(pTextObject->GetCursorIndex()); - if (curCursorLine !=0 ) + if (curCursorLine !=0) { int offset = rightHandlerPosition - pTextObject->GetFirstTextIndexAt(curCursorLine); int firstTextIndex = pTextObject->GetFirstTextIndexAt(curCursorLine-1); @@ -2568,17 +2741,18 @@ _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) { newCursorPosition = firstTextIndex+textLength; } - - if (leftHandlerPosition >= newCursorPosition) - { - newCursorPosition = leftHandlerPosition + 1; - } } } - if (newCursorPosition >= 0 && leftHandlerPosition < newCursorPosition) + if (newCursorPosition >= 0) { + if (leftHandlerPosition == newCursorPosition) + { + ++newCursorPosition; + } __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition); + pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition); + __pEditPresenter->ScrollPanelToCursorPosition(true); RefreshBlock(); __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); @@ -2589,7 +2763,7 @@ _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) } break; case HANDLER_MOVE_TYPE_DOWN: - cursorPoint.y += cursorBounds.height + cursorBounds.height/2.0f; + cursorPoint.y += rightHandlerCursorBounds.height + rightHandlerCursorBounds.height/2.0f; newCursorPosition = GetCursorPositionAt(cursorPoint); if (newCursorPosition < 0) @@ -2618,7 +2792,13 @@ _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) if (newCursorPosition >= 0) { + if (leftHandlerPosition == newCursorPosition) + { + ++newCursorPosition; + } __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition); + pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition); + __pEditPresenter->ScrollPanelToCursorPosition(true); RefreshBlock(); __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); @@ -2631,7 +2811,14 @@ _EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) case HANDLER_MOVE_TYPE_RIGHT: if (textLength >= rightHandlerPosition+1) { - __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(++rightHandlerPosition); + if (leftHandlerPosition == rightHandlerPosition+1) + { + ++rightHandlerPosition; + } + newCursorPosition = ++rightHandlerPosition; + __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition); + pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition); + __pEditPresenter->ScrollPanelToCursorPosition(true); RefreshBlock(); __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus(); __pHandle[HANDLER_TYPE_RIGHT]->Invalidate(); @@ -2710,4 +2897,24 @@ _EditCopyPasteManager::GetHandlerRowColumnIndex(bool singleHandler, bool leftHan return; } +void +_EditCopyPasteManager::DestroyCopyPasteMagnifier(void) +{ + //only single case. + if (__pHandle[HANDLER_TYPE_CENTER]) + { + __pHandle[HANDLER_TYPE_CENTER]->DestroyCopyPasteMagnifier(); + } +} + +void +_EditCopyPasteManager::CreateCopyPasteMagnifier(void) +{ + //only single case. + if (__pHandle[HANDLER_TYPE_CENTER]) + { + __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier(); + } +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditDate.cpp b/src/ui/controls/FUiCtrl_EditDate.cpp index 125a140..02f4807 100644 --- a/src/ui/controls/FUiCtrl_EditDate.cpp +++ b/src/ui/controls/FUiCtrl_EditDate.cpp @@ -56,6 +56,8 @@ _EditDate::_EditDate(void) , __pAccessibilityDayElement(null) , __isCalledBoundsChanged(false) , __isXmlBoundsExist(false) + , __pParentPanel(null) + , __isEnterKeyPressed(false) { } @@ -92,6 +94,10 @@ _EditDate::~_EditDate(void) __pAccessibilityDayElement->Activate(false); __pAccessibilityDayElement = null; } + if (__pParentPanel != null) + { + __pParentPanel->RemoveScrollEventListener(*this); + } } _EditDate* @@ -101,7 +107,7 @@ _EditDate::CreateEditDateN(const String& title) _AccessibilityContainer* pContainer = null; - _EditDate* pEditDate = new (std::nothrow) _EditDate; + _EditDate* pEditDate = new (std::nothrow) _EditDate(); SysTryReturn(NID_UI_CTRL, pEditDate, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pEditDate->GetVisualElement()->SetSurfaceOpaque(false); @@ -149,6 +155,8 @@ _EditDate::CreateDateTimeBar(void) r = GetLastResult(); SysTryReturn(NID_UI_CTRL, (__pDateTimeBar != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pDateTimeBar->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE); + r = __pDateTimeBar->AddActionEventListener(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -376,7 +384,6 @@ _EditDate::SetPropertyYear(const Variant& year) int day; int maxValue = -1; - _DateTimeUtils dateTimeUtils; maxValue = dateTimeUtils.CalculateMaxDay(year.ToInt(), GetMonth()); @@ -617,8 +624,8 @@ _EditDate::CalculateDateTimeBarPosition(void) SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get frame instance."); - absoluteBounds = GetAbsoluteBoundsF(); - frameBounds = pFrame->GetAbsoluteBoundsF(); + absoluteBounds = GetAbsoluteBoundsF(true); + frameBounds = pFrame->GetAbsoluteBoundsF(true); parentWindowBounds = GetParentWindowBounds(); titleBounds = __pEditDatePresenter->GetTitleBounds(); @@ -663,7 +670,7 @@ _EditDate::OnDraw(void) { if (GetDateTimeBar() != null) { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { @@ -684,9 +691,15 @@ _EditDate::CreateAccessibilityElement(void) FloatRectangle monthBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH); FloatRectangle yearBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR); + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + if (__pAccessibilityEditDateElement == null) { - __pAccessibilityEditDateElement = new _AccessibilityElement(true); + __pAccessibilityEditDateElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityEditDateElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pAccessibilityEditDateElement->SetBounds(GetClientBoundsF()); __pAccessibilityEditDateElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pAccessibilityEditDateElement->SetName("EditDateText"); @@ -695,25 +708,29 @@ _EditDate::CreateAccessibilityElement(void) if (__pAccessibilityYearElement == null && __pAccessibilityMonthElement == null && __pAccessibilityDayElement == null) { - String hintText(L"Double tap to edit"); + __pAccessibilityYearElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityYearElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - __pAccessibilityYearElement = new _AccessibilityElement(true); __pAccessibilityYearElement->SetBounds(yearBounds); __pAccessibilityYearElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC"); - __pAccessibilityYearElement->SetHint(hintText); + __pAccessibilityYearElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + + __pAccessibilityMonthElement = new (std::nothrow) _AccessibilityElement(true); + SysTryCatch(NID_UI_CTRL, __pAccessibilityMonthElement != null, , E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - __pAccessibilityMonthElement = new _AccessibilityElement(true); __pAccessibilityMonthElement->SetBounds(monthBounds); __pAccessibilityMonthElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC"); - __pAccessibilityMonthElement->SetHint(hintText); + __pAccessibilityMonthElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + + __pAccessibilityDayElement = new (std::nothrow) _AccessibilityElement(true); + SysTryCatch(NID_UI_CTRL, __pAccessibilityDayElement != null, , E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - __pAccessibilityDayElement = new _AccessibilityElement(true); __pAccessibilityDayElement->SetBounds(dayBounds); __pAccessibilityDayElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC"); - __pAccessibilityDayElement->SetHint(hintText); - - _DateTimeUtils dateTimeUtils; - int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + __pAccessibilityDayElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); switch (localeDateFormat) { @@ -742,6 +759,17 @@ _EditDate::CreateAccessibilityElement(void) } UpdateAccessibilityElement(); } + + return; + +CATCH: + delete __pAccessibilityYearElement; + __pAccessibilityYearElement = null; + + delete __pAccessibilityMonthElement; + __pAccessibilityMonthElement = null; + + return; } void @@ -773,6 +801,20 @@ _EditDate::OnBoundsChanged(void) __pAccessibilityDayElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY)); } + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + CalculateDateTimeBarPosition(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + bounds = __pEditDatePresenter->GetDateAreaBounds(__pEditDatePresenter->GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + GetDateTimeBar()->CalculateArrowBounds(bounds); + GetDateTimeBar()->ChangeLayout(); + } + return; } @@ -790,12 +832,19 @@ _EditDate::OnChangeLayout(_ControlRotation rotation) } __pEditDatePresenter->Initialize(); - __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); - if (GetDateTimeBar() != null) + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { - GetDateTimeBar()->SetVisibleState(false); - GetDateTimeBar()->Close(); + CalculateDateTimeBarPosition(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + bounds = __pEditDatePresenter->GetDateAreaBounds(__pEditDatePresenter->GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + GetDateTimeBar()->CalculateArrowBounds(bounds); + GetDateTimeBar()->ChangeLayout(); } return; @@ -804,7 +853,7 @@ _EditDate::OnChangeLayout(_ControlRotation rotation) bool _EditDate::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { @@ -946,6 +995,7 @@ _EditDate::OnSettingChanged(String& key) if (GetDateTimeBar() != null) { GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); } @@ -972,7 +1022,13 @@ _EditDate::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) { case _KEY_ENTER: { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __isEnterKeyPressed = true; + return true; + } if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { @@ -986,7 +1042,7 @@ _EditDate::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) } } - return __pEditDatePresenter->OnKeyReleased(source, keyInfo); + return __pEditDatePresenter->OnKeyReleased(source, keyCode); } bool @@ -1159,6 +1215,7 @@ _EditDate::OnAncestorVisibleStateChanged(const _Control& control) { if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); Invalidate(); @@ -1172,6 +1229,7 @@ _EditDate::OnAncestorEnableStateChanged(const _Control& control) { if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); Invalidate(); @@ -1179,4 +1237,76 @@ _EditDate::OnAncestorEnableStateChanged(const _Control& control) } } +// Tizen::Ui::Animations::IAnimationTransactionEventListener +void +_EditDate::OnAnimationTransactionStarted(int transactionId) +{ + return; +} + +void +_EditDate::OnAnimationTransactionStopped(int transactionId) +{ + __pEditDatePresenter->EndTransaction(); + return; +} + +void +_EditDate::OnAnimationTransactionFinished(int transactionId) +{ + __pEditDatePresenter->EndTransaction(); + return; +} + +void +_EditDate::InitializeParentPanel(void) +{ + if (__pParentPanel == null) + { + _ScrollPanel* pScrollPanel = null; + _Control* pControlCore = null; + + for (pControlCore = GetParent(); pScrollPanel == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + return; + } + + pScrollPanel = dynamic_cast<_ScrollPanel*>(pControlCore); + if (pScrollPanel) + { + __pParentPanel = pScrollPanel; + __pParentPanel->AddScrollEventListener(*this); + break; + } + } + } + + return; +} + +void +_EditDate::OnScrollStopped(Tizen::Ui::_Control& source) +{ + if (__isEnterKeyPressed) + { + CalculateDateTimeBarPosition(); + __pEditDatePresenter->OnKeyReleased(source, _KEY_ENTER); + __isEnterKeyPressed = false; + } +} + +void +_EditDate::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition) +{ + if (GetDateTimeBar()->IsActivated() && __pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + } +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditDateImpl.cpp b/src/ui/controls/FUiCtrl_EditDateImpl.cpp index eb10b5b..63ed018 100644 --- a/src/ui/controls/FUiCtrl_EditDateImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditDateImpl.cpp @@ -136,6 +136,7 @@ _EditDateImpl::GetCore(void) result _EditDateImpl::OnAttachedToMainTree(void) { + GetCore().InitializeParentPanel(); return _ControlImpl::OnAttachedToMainTree(); } @@ -501,11 +502,9 @@ protected: { titleEnable = true; } - pEditDate = new (std::nothrow) EditDate; - if (pEditDate == null) - { - return null; - } + + pEditDate = new (std::nothrow) EditDate(); + SysTryReturn(NID_UI_CTRL, pEditDate, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (titleEnable) { @@ -523,6 +522,8 @@ protected: return null; } + pEditDate->SetBounds(rect); + if (pControl->GetElement(L"minYearRange", elementStringOne) && pControl->GetElement(L"maxYearRange", elementStringTwo)) { Base::Integer::Parse(elementStringOne, tempMin); diff --git a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp index 57df0b5..6b5cab8 100644 --- a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp @@ -21,21 +21,22 @@ */ #include +#include +#include +#include +#include #include #include #include #include #include #include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_VisualElement.h" #include "FUiCtrl_EditDatePresenter.h" #include "FUiCtrl_EditDate.h" #include "FUiCtrl_DateTimeModel.h" #include "FUiCtrl_DateTimeUtils.h" -#include "FUiControl.h" -#include "FUiAnim_VisualElement.h" -#include "FUiAnimVisualElementPropertyAnimation.h" -#include "FGrpColor.h" -#include "FUi_CoordinateSystemUtils.h" using namespace Tizen::Graphics; using namespace Tizen::Base; @@ -80,6 +81,7 @@ _EditDatePresenter::_EditDatePresenter(void) , __elementWidth(0.0f) , __isEnterKeyPressed(false) , __isFocused(false) + , __transactionId(0) { } @@ -112,8 +114,14 @@ _EditDatePresenter::~_EditDatePresenter(void) delete __pContentBgEffectDisabledBitmap; __pContentBgEffectDisabledBitmap = null; + if (__transactionId != 0) + { + AnimationTransaction::Stop(__transactionId); + } + if (__pContentProvider != null) { + __pEditDate->GetVisualElement()->DetachChild(__pContentProvider); __pContentProvider->Destroy(); __pContentProvider = null; } @@ -122,12 +130,12 @@ _EditDatePresenter::~_EditDatePresenter(void) _EditDatePresenter* _EditDatePresenter::CreateInstanceN(const _EditDate& editDate, const String& title) { - _EditDatePresenter* pEditDatePresenter = new (std::nothrow) _EditDatePresenter; + _EditDatePresenter* pEditDatePresenter = new (std::nothrow) _EditDatePresenter(); SysTryReturn(NID_UI_CTRL, pEditDatePresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pEditDatePresenter->__pEditDate = const_cast <_EditDate*>(&editDate); - pEditDatePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel; + pEditDatePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel(); SysTryCatch(NID_UI_CTRL, pEditDatePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pEditDatePresenter->SetTitle(title); @@ -237,7 +245,6 @@ _EditDatePresenter::Initialize(void) __isEditDateInitialized = true; CalculateAreaBounds(); - return r; } @@ -283,6 +290,9 @@ _EditDatePresenter::InitializeTextObject(void) pSimpleText = new (std::nothrow)TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + __textObject.AppendElement(*pSimpleText); __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); @@ -334,50 +344,23 @@ _EditDatePresenter::LoadResource(void) Color contentPressedColor; Color contentHighlightedColor; - Bitmap* pTempBitmap = null; - GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_NORMAL, contentNormalBgColor); GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_DISABLED, contentDisabledBgColor); GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_PRESSED, contentPressedColor); GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); - r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, contentNormalBgColor, __pContentBgNormalColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentNormalBgColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, contentPressedColor, __pContentBgPressedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentPressedColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, contentDisabledBgColor, __pContentBgDisabledColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentDisabledBgColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, __pContentBgHighlightedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectNormalBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -387,15 +370,9 @@ _EditDatePresenter::LoadResource(void) r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectDisabledBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - delete pTempBitmap; - pTempBitmap = null; - return r; CATCH: - delete pTempBitmap; - pTempBitmap = null; delete __pContentBgNormalColorReplacementBitmap; __pContentBgNormalColorReplacementBitmap = null; @@ -595,8 +572,9 @@ _EditDatePresenter::DrawFocus(void) { FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Canvas* pContentCanvas = null; Canvas* pCanvas = __pEditDate->GetCanvasN(); - SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas."); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); if (__focusId == DATETIME_ID_DAY) { @@ -620,9 +598,16 @@ _EditDatePresenter::DrawFocus(void) } else { - r = pCanvas->DrawBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap); + pContentCanvas = __pEditDate->GetCanvasN(bounds); + SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , GetLastResult(), "[%s]Propagating.", GetErrorMessage(GetLastResult())); + + bounds.x = (bounds.width - __pContentBgHighlightedColorReplacementBitmap->GetWidthF()) / 2; + bounds.y = (bounds.height - __pContentBgHighlightedColorReplacementBitmap->GetHeightF()) / 2; + + r = pContentCanvas->DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pContentBgHighlightedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pContentCanvas; } delete pCanvas; @@ -630,6 +615,7 @@ _EditDatePresenter::DrawFocus(void) CATCH: delete pCanvas; + delete pContentCanvas; return r; } @@ -757,6 +743,9 @@ _EditDatePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const pSimpleText = new (std::nothrow)TextSimple((const_cast (text.GetPointer())), text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + __textObject.RemoveAll(); if (__isFocused && __focusId == boxId) { @@ -786,24 +775,24 @@ _EditDatePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& boun if (!__pEditDate->IsEnabled()) { - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_DISABLED); + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_DISABLED); pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap; pEffectBitmap = __pContentBgEffectDisabledBitmap; } else if (GetLastSelectedId() != boxId) { - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL); + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_NORMAL); pReplacementBitmap = __pContentBgNormalColorReplacementBitmap; pEffectBitmap = __pContentBgEffectNormalBitmap; } else { - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED); pReplacementBitmap = __pContentBgPressedColorReplacementBitmap; pEffectBitmap = __pContentBgEffectPressedBitmap; } - r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap); + r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); if (!isCustomBitmap) @@ -816,7 +805,7 @@ _EditDatePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& boun } result -_EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +_EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap) { result r = E_SUCCESS; @@ -832,7 +821,23 @@ _EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bou } else { - r = canvas.DrawBitmap(bounds, *pBitmap); + if (isCustomBitmap) + { + Canvas *pContentCanvas = __pEditDate->GetCanvasN(bounds); + SysTryReturnResult(NID_UI_CTRL, (pContentCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatPoint position; + + position.x = (bounds.width - pBitmap->GetWidthF()) / 2; + position.y = (bounds.height - pBitmap->GetHeightF()) / 2; + r = pContentCanvas->DrawBitmap(position, *pBitmap); + delete pContentCanvas; + } + else + { + r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *pBitmap); + } + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -940,8 +945,13 @@ _EditDatePresenter::SetFocusedElement(void) if (__isEnterKeyPressed) { __isEnterKeyPressed = false; - __isFocused = true; + + if (__pEditDate->IsFocusModeStateEnabled()) + { + __isFocused = true; + } } + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); if (__focusId == DATETIME_ID_NONE) { @@ -981,6 +991,7 @@ void _EditDatePresenter::OnFocusModeStateChanged(void) { __isFocused = false; + __isEnterKeyPressed = false; __focusId = DATETIME_ID_NONE; __pEditDate->Invalidate(); return; @@ -1109,7 +1120,7 @@ _EditDatePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo } bool -_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode) { if (!__isFocused) { @@ -1129,7 +1140,6 @@ _EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInf int displayValue = -1; _DateTimeId boxId = DATETIME_ID_NONE; - _KeyCode keyCode = keyInfo.GetKeyCode(); switch (keyCode) { @@ -1312,6 +1322,7 @@ _EditDatePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to if (__pEditDate->GetDateTimeBar()->IsActivated()) { + __pEditDate->GetDateTimeBar()->ClearPreviousText(); __pEditDate->GetDateTimeBar()->RemoveAllAnimations(); __pEditDate->GetDateTimeBar()->Close(); __pEditDate->GetDateTimeBar()->SetVisibleState(true); @@ -1337,6 +1348,7 @@ _EditDatePresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& to } __selectedId = DATETIME_ID_NONE; + __pEditDate->Invalidate(); return true; } @@ -1508,8 +1520,8 @@ _EditDatePresenter::Animate(void) pCanvas->Clear(); rect.x = 0.0f; rect.y = 0.0f; - r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap); - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED); + r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap); if (!isCustomBitmap) { @@ -1544,7 +1556,6 @@ _EditDatePresenter::Animate(void) pNewBoundsAnimation->SetPropertyName("bounds.position"); pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height))); pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f))); - pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1553,11 +1564,13 @@ _EditDatePresenter::Animate(void) pOldBoundsAnimation->SetPropertyName("bounds.position"); pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f))); pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f))); - pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); pOldSimpleText = new (std::nothrow)TextSimple((const_cast (__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pOldSimpleText->SetTextShadowEnabled(true); + pOldSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + pCanvas = pOldVisualElement->GetCanvasN(); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1582,6 +1595,9 @@ _EditDatePresenter::Animate(void) pNewSimpleText = new (std::nothrow)TextSimple((const_cast (newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pNewSimpleText->SetTextShadowEnabled(true); + pNewSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + pCanvas = pNewVisualElement->GetCanvasN(); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1604,10 +1620,13 @@ _EditDatePresenter::Animate(void) pCanvas = null; pOldVisualElement->SetImplicitAnimationEnabled(false); - pOldVisualElement->AddAnimation(*pOldBoundsAnimation); - pNewVisualElement->SetImplicitAnimationEnabled(false); + + AnimationTransaction::Begin(__transactionId); + pOldVisualElement->AddAnimation(*pOldBoundsAnimation); pNewVisualElement->AddAnimation(*pNewBoundsAnimation); + AnimationTransaction::SetCurrentTransactionEventListener(__pEditDate); + AnimationTransaction::Commit(); delete pOldBoundsAnimation; delete pNewBoundsAnimation; @@ -1638,11 +1657,11 @@ CATCH: } void -_EditDatePresenter::OnVisualElementAnimationFinished (const VisualElementAnimation &animation, const String &keyName, VisualElement &target, bool completedNormally) +_EditDatePresenter::EndTransaction(void) { result r = E_SUCCESS; - __isAnimating = false; + __isAnimating = false; VisualElement* pEditDateElement = __pEditDate->GetVisualElement(); r = GetLastResult(); SysTryReturnVoidResult(NID_UI_CTRL, (pEditDateElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1653,10 +1672,10 @@ _EditDatePresenter::OnVisualElementAnimationFinished (const VisualElementAnimati pEditDateElement->DetachChild(*__pContentProvider); __pContentProvider->Destroy(); __pContentProvider = null; - Draw(); } + Draw(); + __transactionId = 0; return; } - }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditFieldImpl.cpp b/src/ui/controls/FUiCtrl_EditFieldImpl.cpp old mode 100755 new mode 100644 index 5074148..3e214ce --- a/src/ui/controls/FUiCtrl_EditFieldImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditFieldImpl.cpp @@ -432,37 +432,37 @@ _EditFieldImpl::Initialize(EditFieldStyle style, InputStyle inputStyle, __pEdit->SetPropertyKeypadStyle(variantKeypadStyle); __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddActionEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddUiLinkEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddTextBlockEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddKeypadEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddTextEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicScrollPanelEvent = _PublicScrollPanelEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (inputStyle == INPUT_STYLE_OVERLAY) { @@ -471,7 +471,7 @@ _EditFieldImpl::Initialize(EditFieldStyle style, InputStyle inputStyle, } __pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize."); + SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pEdit->AddLanguageEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1120,7 +1120,7 @@ _EditFieldImpl::SetInputModeCategory(unsigned long categories, bool enable) EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA; for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++) { - if ( (categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) + if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) { newInputMode = tempInputMode; break; @@ -1395,7 +1395,7 @@ _EditFieldImpl::SetTitleText(const String& title) { SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_LEFT), E_SYSTEM, - "The EditField has no title style.\n"); + "The EditField has no title style."); Variant variantTitle(title); @@ -1504,7 +1504,7 @@ result _EditFieldImpl::SetPasswordVisible(bool visible) { SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), E_INVALID_OPERATION, - "Edit Style is not EDIT_STYLE_PASSWORD.\n"); + "Edit Style is not EDIT_STYLE_PASSWORD."); return __pEdit->SetPasswordVisible(visible); } @@ -1531,7 +1531,7 @@ _EditFieldImpl::OnTextValueChanged(const _Control& source) if (__pPublicTextEvent != null) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextEvent->Fire(*pEventArg); } @@ -1547,7 +1547,7 @@ _EditFieldImpl::OnTextValueChangeCanceled(const _Control& source) if (__pPublicTextEvent != null) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextEvent->Fire(*pEventArg); } @@ -1563,7 +1563,7 @@ _EditFieldImpl::OnActionPerformed(const _Control& source, int actionId) if (__pPublicActionEvent != null) { IEventArg* pActionEventArg = _PublicActionEvent::CreateActionEventArgN(actionId); - SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicActionEvent->Fire(*pActionEventArg); } @@ -1580,7 +1580,7 @@ _EditFieldImpl::OnLinkClicked(_Control& source, const String& text, Utility::Lin if (__pPublicLinkEvent != null) { IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicLinkEvent->Fire(*pLinkEventArg); } @@ -1596,7 +1596,7 @@ _EditFieldImpl::OnTextBlockSelected(_Control& source, int start, int end) if (__pPublicTextBlockEvent != null) { IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); } @@ -1613,7 +1613,7 @@ _EditFieldImpl::OnKeypadWillOpen(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1630,7 +1630,7 @@ _EditFieldImpl::OnKeypadOpened(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1647,7 +1647,7 @@ _EditFieldImpl::OnKeypadClosed(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1664,7 +1664,7 @@ _EditFieldImpl::OnKeypadBoundsChanged(void) { IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1724,7 +1724,7 @@ _EditFieldImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); - SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicKeypadEvent->Fire(*pKeypadEventArg); } @@ -1740,7 +1740,7 @@ _EditFieldImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLang if (__pPublicLanguageEvent) { IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); - SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicLanguageEvent->Fire(*pKLanguageEventArg); } @@ -1756,7 +1756,7 @@ _EditFieldImpl::OnOverlayControlCreated(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CREATED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1772,7 +1772,7 @@ _EditFieldImpl::OnOverlayControlOpened(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_OPENED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1788,7 +1788,7 @@ _EditFieldImpl::OnOverlayControlClosed(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CLOSED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } @@ -1804,7 +1804,7 @@ _EditFieldImpl::OnOtherControlSelected(const _Control& source) if (__pPublicScrollPanelEvent != null) { IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OTHER_CONTROL_SELECTED); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicScrollPanelEvent->Fire(*pEventArg); } diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp old mode 100755 new mode 100644 index f6afed7..154527f --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -56,6 +56,7 @@ #include "FUiAnim_EflNode.h" #include "FUiCtrl_Button.h" #include "FUiCtrl_ContextMenu.h" +#include "FUi_DragAndDropItem.h" #include "FUiCtrl_Edit.h" #include "FUiCtrl_EditCopyPasteManager.h" #include "FUiCtrl_EditPresenter.h" @@ -69,6 +70,7 @@ #include "FUiCtrl_TableView.h" #include "FUi_Window.h" +#define EDIT_DRAG_AND_DROP_ENABLED 0 using namespace Tizen::Base::Runtime; using namespace Tizen::Base::Utility; @@ -88,18 +90,14 @@ namespace Tizen { namespace Ui { namespace Controls const int EDIT_PASSWORD_TIMER_PERIOD = 1000; const int EDIT_CURSOR_TIMER_PERIOD = 600; const int MAX_LINE_NUMBER = 100; -const int MAX_FLEXIBLE_HEIGHT_VERTICAL_MODE = 4000; -const int MAX_FLEXIBLE_HEIGHT_HORIZONTAL_MODE = 2500; +const float EDIT_MAXIMUM_WIDTH = 30000.0f; +const float EDIT_MAXIMUM_HEIGHT = 30000.0f; const int EDIT_FLICK_SCROLL_TIMER_INTERVAL = 10; const int EDIT_FLICK_SCROLL_MOVE_AMOUNT_MULTIPLIER = 2; const float DIRECTION_DECISION_RATIO = 1.3f; -const float HORIZONTAL_DECISION_RATIO = 1.5f; const float MOVE_SKIP_DECISION_RANGE = 5.0f; const int TITLE_SLIDING_TIME = 800; -const int LANGUAGE_CODE_START = 0; -const int LANGUAGE_CODE_MAX = 2; - bool _EditPresenter::__isKeypadExist = false; bool _EditPresenter::__isClipboardExist = false; float _EditPresenter::__initialParentHeight = 0.0f; @@ -110,25 +108,47 @@ unsigned int _EditPresenter::__latestBoundedContext = null; const float _EditPresenter::TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA = 0.04f; _ScrollPanel* _EditPresenter::__pResizedPanel = null; -_EditAnimationProvider::_EditAnimationProvider(void) + +class _EditDragAndDropWindow + : public Tizen::Ui::_Window { -} +public: + _EditDragAndDropWindow(void); + virtual ~_EditDragAndDropWindow(void); + + virtual result OnAttachedToMainTree(void); + void SetLabel(_Label* pLabel); +private: + _Label* __pLabel; +}; // _EditDragAndDropWindow -_EditAnimationProvider::~_EditAnimationProvider(void) +_EditDragAndDropWindow::_EditDragAndDropWindow(void) +: __pLabel(null) { } -VisualElementAnimation* -_EditAnimationProvider::CreateAnimationForProperty(VisualElement& source, const String& property) +_EditDragAndDropWindow::~_EditDragAndDropWindow(void) { - VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(source, property); - if (pAnimation != null) + if (__pLabel) { - pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); - pAnimation->SetDuration(ANIMATION_DURATION); + DetachChild(*__pLabel); + delete __pLabel; + __pLabel = null; } +} + +result +_EditDragAndDropWindow::OnAttachedToMainTree(void) +{ + AcquireHandle(); - return pAnimation; + return E_SUCCESS; +} + +void +_EditDragAndDropWindow::SetLabel(_Label* pLabel) +{ + __pLabel = pLabel; } _EditPresenter::_EditPresenter(void) @@ -153,6 +173,7 @@ _EditPresenter::_EditPresenter(void) , __pPasswordTimer(null) , __pFont(null) , __pCursorVisualElement(null) + , __pDragAndDropCueVisualElement(null) , __pTextVisualElement(null) , __pTitleTextVisualElement(null) , __pCopyPasteManager(null) @@ -196,6 +217,7 @@ _EditPresenter::_EditPresenter(void) , __isTouchMoving(false) , __isTouchPressed(false) , __isClearIconPressed(false) + , __isClearIconVisible(false) , __isCursorOpaque(false) , __isTouchReleaseSkipped(false) , __isViewerModeEnabled(false) @@ -217,7 +239,6 @@ _EditPresenter::_EditPresenter(void) , __isCutLinkParserEnabled(false) , __echoChar('*') , __ContentTextStatus(EDIT_TEXT_STATUS_COMPOSE_NON) - , __pEditVEDelegator(null) , __isAutoShrinkEnabled(false) , __groupStyle(GROUP_STYLE_NONE) , __isFontInitialized(false) @@ -240,6 +261,9 @@ _EditPresenter::_EditPresenter(void) , __isPasswordVisible(false) , __needToCreateCopyPastePopup(false) , __calculatedCursorBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __dragAndDropStarted(false) + , __dragAndDropString("") + , __isTouchLongPressed(false) { } @@ -532,6 +556,7 @@ void _EditPresenter::OnTextCommitted(const String& commitText) { bool isTextComposingFinished = false; + bool isDeletedBlockTextByEnter = false; char enterText1[2] = {'\n', }; char enterText2[2] = {'\r', }; @@ -549,7 +574,10 @@ _EditPresenter::OnTextCommitted(const String& commitText) int end = 0; GetBlockRange(start, end); __isFlexibleHeightFrozen = true; - DeleteText(start, end); + if (DeleteText(start, end) == E_SUCCESS) + { + isDeletedBlockTextByEnter = true; + } __isFlexibleHeightFrozen = false; ReleaseTextBlock(); } @@ -598,6 +626,11 @@ _EditPresenter::OnTextCommitted(const String& commitText) if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) { + DrawText(); + if (isDeletedBlockTextByEnter) + { + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + } return; } } @@ -837,7 +870,7 @@ _EditPresenter::OnSurroundingTextDeleted(int offset, int charCount) ReleaseTextBlock(); } - DrawText(); + DrawText(); __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); @@ -847,44 +880,32 @@ _EditPresenter::OnSurroundingTextDeleted(int offset, int charCount) void _EditPresenter::GetPreviousText(InputConnection& source, String& text, int& cursorPosition) { - const int SURRONDING_TEXT_SIZE = 5; - int stringLength = 0; - String tempString; + const int SURROUNDING_PREVIOUS_TEXT_SIZE = 128; + const int SURROUNDING_NEXT_TEXT_SIZE = 32; + int inputTextLength = GetTextLength(); - if (__cursorPos == 0) + if (inputTextLength < 1) { text = null; cursorPosition = 0; } else { - if (__cursorPos < SURRONDING_TEXT_SIZE) + int start = __cursorPos - SURROUNDING_PREVIOUS_TEXT_SIZE; + int end = __cursorPos + SURROUNDING_NEXT_TEXT_SIZE -1; + + if (start < 0) { - text = GetText(0, __cursorPos - 1); + start = 0; } - else - { - int previousTextSize = 0; - - for( int index = 0; index < __cursorPos; index++) - { - previousTextSize++; - if ( __pTextBuffer[__cursorPos-index-1] != 0x20) - { - break; - } - } - if (previousTextSize < SURRONDING_TEXT_SIZE) - { - previousTextSize = SURRONDING_TEXT_SIZE; - } - - text = GetText(__cursorPos - previousTextSize, __cursorPos - 1); + if (end > inputTextLength -1) + { + end = inputTextLength -1; } - stringLength = text.GetLength(); - cursorPosition = stringLength; + text = GetText(start, end); + cursorPosition = __cursorPos - start; } return; @@ -906,6 +927,8 @@ _EditPresenter::OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopu SysLog(NID_UI_CTRL, "clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height); + __pEdit->AddClipboardShowTriggerEventListener(); + if (__isKeypadExist) //resize as difference between clipboard height vs keypad height { if (floatClipboardPopupSize.height > absKeypadBounds.height) @@ -955,7 +978,8 @@ _EditPresenter::OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopu } if (__isCopyPasteManagerExist) { - __pCopyPasteManager->AdjustBounds(); + UpdateComponentInformation(); + __pCopyPasteManager->Show(); } } @@ -1049,11 +1073,6 @@ _EditPresenter::OnClipboardPopupClosed(void) __isTextBlocked = false; } - if (__pClipboard) - { - __pClipboard->HidePopup(); - } - __isClipboardExist = false; FloatRectangle absKeypadBounds; GetKeypadBounds(absKeypadBounds); @@ -1063,21 +1082,27 @@ _EditPresenter::OnClipboardPopupClosed(void) SysLog(NID_UI_CTRL, "clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height); - if (__isInputConnectionBound) - { - ChangeLayoutInternal(__pEdit->GetOrientation()); - } + ChangeLayoutInternal(__pEdit->GetOrientation()); + + __pEdit->RemoveClipboardShowTriggerEventListener(); if (__isKeypadExist) { AdjustParentPanelHeight(false); + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + if (__pParentForm) { __pParentForm->Draw(); + + if (__pParentForm->GetVisibleState()) + { + SysLog(NID_UI_CTRL, "[ClipboardShow] Show is called!!!!!!"); + __pParentForm->Show(); + } } - __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); } else { @@ -1091,7 +1116,6 @@ _EditPresenter::OnClipboardPopupClosed(void) { SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0.0f); - __pParentForm->Draw(); } if (!__isKeypadCommandButtonVisible) @@ -1102,6 +1126,17 @@ _EditPresenter::OnClipboardPopupClosed(void) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); } + + if (__pParentForm) + { + __pParentForm->Draw(); + + if (__pParentForm->GetVisibleState()) + { + SysLog(NID_UI_CTRL, "[ClipboardShow] Show is called!!!!!!"); + __pParentForm->Show(); + } + } } __clipboardConnected = false; @@ -1135,6 +1170,7 @@ _EditPresenter::Dispose(void) { if (__clipboardConnected) //Edit control removed after FocusLost or without FocusLost callback. { + __pEdit->RemoveClipboardShowTriggerEventListener(); __pClipboard->HidePopup(); __isClipboardExist = false; } @@ -1160,11 +1196,17 @@ _EditPresenter::Dispose(void) __isKeypadExist = false; __latestBoundedContext = null; + + __pEdit->DetachScrollPanelEvent(); } __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; __footerVisibleChanged = false; + if (__pParentPanel) + { + __pParentPanel->RemoveScrollEventListener(*__pEdit); + } if (__pClipboard) { @@ -1264,16 +1306,16 @@ _EditPresenter::Dispose(void) __pCursorVisualElement = null; } - if (__pTitleTextVisualElement) + if (__pDragAndDropCueVisualElement) { - __pTitleTextVisualElement->Destroy(); - __pTitleTextVisualElement = null; + __pDragAndDropCueVisualElement->Destroy(); + __pDragAndDropCueVisualElement = null; } - if (__pEditVEDelegator) + if (__pTitleTextVisualElement) { - delete __pEditVEDelegator; - __pEditVEDelegator = null; + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; } return E_SUCCESS; @@ -1359,7 +1401,7 @@ _EditPresenter::InitializeFocusedCondition(void) { result r = E_SUCCESS; __pTextVisualElement = new (std::nothrow) _VisualElement; - SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Unable to create __pTextVisualElement instance."); + SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pTextVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); @@ -1426,20 +1468,20 @@ _EditPresenter::Initialize(const _Control& control) __pEdit = dynamic_cast<_Edit*>(const_cast<_Control*>(&control)); SysAssertf(__pEdit != null, "__pEdit is null"); - __pTextObject = new (std::nothrow) TextObject; - if (__pTextObject == null) - { - r = E_OUT_OF_MEMORY; - goto CATCH; - } + __pTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI_CTRL, __pTextObject, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTextObject->Construct(); - pSimpleText = new (std::nothrow)TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + pSimpleText = new (std::nothrow) TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryCatch(NID_UI_CTRL, pSimpleText, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTextObject->AppendElement(*pSimpleText); if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) { - __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + } if (__pEdit->IsFullScreenKeypadEdit()) { __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); @@ -1457,8 +1499,8 @@ _EditPresenter::Initialize(const _Control& control) __pTextObject->SetWrap(__textObjectWrap); } - __pTextString = new (std::nothrow) String; - SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer."); + __pTextString = new (std::nothrow) String(); + SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); __limitLength = 0; if (__pFont == null) @@ -1482,8 +1524,8 @@ _EditPresenter::Initialize(const _Control& control) __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; } - __pScrollEffect = new (std::nothrow) _EditScrollEffectInfo; - SysTryCatch(NID_UI_CTRL, __pScrollEffect, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create EditScrollEffectInfo"); + __pScrollEffect = new (std::nothrow) _EditScrollEffectInfo(); + SysTryCatch(NID_UI_CTRL, __pScrollEffect, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); for (int i = 0; i < EDIT_SCROLLFRAME_MAX; i++) { @@ -1500,8 +1542,8 @@ _EditPresenter::Initialize(const _Control& control) __pScrollEffect->currentAbsY = -1.0f; __pScrollEffect->cursorPosition = -1; - pEditModel = new (std::nothrow) _EditModel; - SysTryCatch(NID_UI_CTRL, pEditModel, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance"); + pEditModel = new (std::nothrow) _EditModel(); + SysTryCatch(NID_UI_CTRL, pEditModel, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); SetModel(*pEditModel); @@ -1528,8 +1570,8 @@ _EditPresenter::Initialize(const _Control& control) __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); - __pCursorVisualElement = new (std::nothrow) _VisualElement; - SysTryCatch(NID_UI_CTRL, __pCursorVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance"); + __pCursorVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, __pCursorVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pCursorVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); @@ -1537,14 +1579,27 @@ _EditPresenter::Initialize(const _Control& control) __pCursorVisualElement->SetSurfaceOpaque(false); __pCursorVisualElement->SetImplicitAnimationEnabled(false); + __pDragAndDropCueVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, __pDragAndDropCueVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pDragAndDropCueVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); + + __pDragAndDropCueVisualElement->SetSurfaceOpaque(false); + __pDragAndDropCueVisualElement->SetImplicitAnimationEnabled(false); + pEditVisualElement = __pEdit->GetVisualElement(); SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] Unable to get root visual element."); __pCursorVisualElement->SetShowState(true); + __pDragAndDropCueVisualElement->SetShowState(false); r = pEditVisualElement->AttachChild(*__pCursorVisualElement); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r)); + r = pEditVisualElement->AttachChild(*__pDragAndDropCueVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r)); + __pInputConnection = _InputConnectionImpl::CreateInputConnectionImplN(null); SysTryCatch(NID_UI_CTRL, __pInputConnection, , r = E_SYSTEM, "[E_SYSTEM] Unable to create an instance ."); @@ -1553,9 +1608,6 @@ _EditPresenter::Initialize(const _Control& control) __pTextObject->SetBounds(__textObjectBounds); __pTextObject->HideRearSpace(TEXT_OBJECT_SPACE_HIDE_TYPE_NONE); - __pEditVEDelegator = new (std::nothrow) _EditAnimationProvider(); - SysTryCatch(NID_UI_CTRL, __pEditVEDelegator, , E_OUT_OF_MEMORY, "Memory allocation failed."); - pWindow = pControlManager->GetCurrentFrame(); if (pWindow) { @@ -1573,6 +1625,8 @@ _EditPresenter::Initialize(const _Control& control) __pClipboard->AddClipboardPopupEventListener(*this); } + __pEdit->SetMaximumSize(FloatDimension(EDIT_MAXIMUM_WIDTH, EDIT_MAXIMUM_HEIGHT)); + return r; CATCH: @@ -1834,8 +1888,8 @@ _EditPresenter::DrawText(void) if (__isTouchMoving && !__pTextVisualElement) { result r = E_SUCCESS; - __pTextVisualElement = new (std::nothrow) _VisualElement; - SysTryReturnVoidResult(NID_UI_CTRL, __pTextVisualElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create __pTextVisualElement instance."); + __pTextVisualElement = new (std::nothrow) _VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTextVisualElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pTextVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); @@ -1852,7 +1906,7 @@ _EditPresenter::DrawText(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r)); pCanvas = __pEdit->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryCatch(NID_UI_CTRL, pCanvas, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pCanvas->SetBackgroundColor(Color(0)); r = pCanvas->Clear(); @@ -1877,13 +1931,67 @@ _EditPresenter::DrawText(void) pCanvas->SetBackgroundColor(Color(0)); pCanvas->Clear(); - DrawText(*pCanvas); - if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR) { - DrawClearIcon(*pCanvas); + if (GetSearchBarFlag()) //SearchBar + { + if (__pTextString->GetLength() == 0) + { + if (__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + else + { + if (!__isClearIconVisible) + { + __isClearIconVisible = true; + AdjustTextBounds(__isClearIconVisible); + } + + DrawClearIcon(*pCanvas); + } + } + else //EditField + { + if (IsCurrentFocused() == true) + { + if (__pTextString->GetLength() == 0) + { + if (__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + else + { + if (!__isClearIconVisible) + { + __isClearIconVisible = true; + AdjustTextBounds(__isClearIconVisible); + } + + if (!(!__pEdit->IsFocusModeStateEnabled() && __pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN)) + { + DrawClearIcon(*pCanvas); + } + } + } + else + { + if (__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + } } + DrawText(*pCanvas); InitializeCursor(); delete pCanvas; } @@ -2007,16 +2115,16 @@ _EditPresenter::DrawTextBlockLine(Canvas& canvas) { return; } - int startRange = 0; - int lengthRange = 0; - int rowIndex = -1; - int columnIndex = -1; + int leftHandlerCursorPos = 0; + int rightHandlerCursorPos = 0; + int leftRowIndex = -1; + int leftColumnIndex = -1; + int rightRowIndex = -1; + int rightColumnIndex = -1; Color textBlockLineColor; GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, textBlockLineColor); - GetBlockRange(startRange, lengthRange); - FloatRectangle cursorBounds; FloatRectangle textObjectBounds = __textObjectBounds; textObjectBounds.x -= 1; @@ -2024,46 +2132,39 @@ _EditPresenter::DrawTextBlockLine(Canvas& canvas) if (__pCopyPasteManager) { - __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, rowIndex, columnIndex); - } - - if (rowIndex != -1 && columnIndex != -1) - { - CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex); - } - else - { - CalculateCursorBounds(__textObjectBounds, cursorBounds, startRange); - } - - if (cursorBounds.x != -1) - { - cursorBounds.x -= 1; - cursorBounds = cursorBounds.GetIntersection(textObjectBounds); - canvas.FillRectangle(textBlockLineColor, cursorBounds); - } - - rowIndex = -1; - columnIndex = -1; - - if (__pCopyPasteManager) - { - __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rowIndex, columnIndex); - } - if (rowIndex != -1 && columnIndex != -1) - { - CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex); - } - else - { - CalculateCursorBounds(__textObjectBounds, cursorBounds, lengthRange); - } + __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, leftRowIndex, leftColumnIndex); + __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rightRowIndex, rightColumnIndex); + leftHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT); + rightHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT); - if (cursorBounds.x != -1 && cursorBounds.x <= __textObjectBounds.x + __textObjectBounds.width) - { - cursorBounds.x -= 1; - cursorBounds = cursorBounds.GetIntersection(textObjectBounds); - canvas.FillRectangle(textBlockLineColor, cursorBounds); + if (leftRowIndex != -1 && leftColumnIndex != -1) + { + CalculateCursorBounds(__textObjectBounds, cursorBounds, leftRowIndex, leftColumnIndex); + } + else + { + CalculateCursorBounds(__textObjectBounds, cursorBounds, leftHandlerCursorPos); + } + if (cursorBounds.x != -1) + { + cursorBounds.x -= 1; + cursorBounds = cursorBounds.GetIntersection(textObjectBounds); + canvas.FillRectangle(textBlockLineColor, cursorBounds); + } + if (rightRowIndex != -1 && rightColumnIndex != -1) + { + CalculateCursorBounds(__textObjectBounds, cursorBounds, rightRowIndex, rightColumnIndex); + } + else + { + CalculateCursorBounds(__textObjectBounds, cursorBounds, rightHandlerCursorPos); + } + if (cursorBounds.x != -1 && cursorBounds.x <= __textObjectBounds.x + __textObjectBounds.width) + { + cursorBounds.x -= 1; + cursorBounds = cursorBounds.GetIntersection(textObjectBounds); + canvas.FillRectangle(textBlockLineColor, cursorBounds); + } } } @@ -2072,7 +2173,7 @@ _EditPresenter::DrawTextForEntireFontSetting(Canvas& canvas) { result r = E_SUCCESS; - if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false) + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false && __pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) { __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); } @@ -2122,12 +2223,17 @@ _EditPresenter::DrawTextForEntireFontSetting(Canvas& canvas) __pTextObject->Compose(); } } - if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)) + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && __pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) { __pTextObject->SetFirstDisplayLineIndexFromTextIndex(0); + __pTextObject->SetFirstDisplayPositionX(0.0f); } __pTextObject->SetForegroundColor(__pEdit->GetTextColor(editStatus), 0, __pTextObject->GetTextLength()); __pTextObject->SetBlock(false); + if (__pTextObject->GetAction() != TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + UpdateComponentInformation(); + } } else { @@ -2165,7 +2271,6 @@ _EditPresenter::DrawTextForEntireFontSetting(Canvas& canvas) __pTextObject->SetBlock(false); __isTextBlocked = false; } - UpdateComponentInformation(); } @@ -2243,12 +2348,14 @@ _EditPresenter::DrawClearIcon(Canvas& canvas) { result r = E_SUCCESS; - float clearIconWidth = 0; - float clearIconHeight = 0; + float clearIconWidth = 0.0f; + float clearIconHeight = 0.0f; + float cursorWidth = 0.0f; _ControlOrientation orientation = __pEdit->GetOrientation(); GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth); GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_HEIGHT, orientation, clearIconHeight); + GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidth); if (__pTextString->GetLength() == 0) { @@ -2256,50 +2363,42 @@ _EditPresenter::DrawClearIcon(Canvas& canvas) } Bitmap* pEditBitmapClear = null; - Bitmap* pEditReplacedBitmapClear = null; Color editClearIconColor; if (!__pEdit->IsEnabled()) { - r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear); + GET_COLOR_CONFIG(EDIT::CLEAR_ICON_DISABLED, editClearIconColor); + r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear); if (pEditBitmapClear == null) { return E_SYSTEM; } - - GET_COLOR_CONFIG(EDIT::CLEAR_ICON_DISABLED, editClearIconColor); } else if (__isClearIconPressed) { - r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear); + GET_COLOR_CONFIG(EDIT::CLEAR_ICON_PRESSED, editClearIconColor); + r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear); if (pEditBitmapClear == null) { return E_SYSTEM; } - - GET_COLOR_CONFIG(EDIT::CLEAR_ICON_PRESSED, editClearIconColor); } else { - r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear); + GET_COLOR_CONFIG(EDIT::CLEAR_ICON_NORMAL, editClearIconColor); + r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear); if (pEditBitmapClear == null) { return E_SYSTEM; } - - GET_COLOR_CONFIG(EDIT::CLEAR_ICON_NORMAL, editClearIconColor); } FloatRectangle textRect = __textObjectBounds; - FloatRectangle afterClearIconRect(textRect.x + textRect.width, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight); + FloatRectangle afterClearIconRect(textRect.x + textRect.width + cursorWidth, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight); FloatRectangle editBounds = __pEdit->GetBoundsF(); - pEditReplacedBitmapClear = _BitmapImpl::GetColorReplacedBitmapN(*pEditBitmapClear, Color::GetColor(COLOR_ID_MAGENTA), - editClearIconColor); - SysTryCatch(NID_UI_CTRL, pEditReplacedBitmapClear, , r = E_SYSTEM, "[E_SYSTEM] Unable to create an instance ."); - if (__clearIconBounds != afterClearIconRect) { __clearIconBounds = afterClearIconRect; @@ -2311,13 +2410,13 @@ _EditPresenter::DrawClearIcon(Canvas& canvas) __clearIconBounds.y = textRect.y; } - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditReplacedBitmapClear)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBitmapClear)) { - r = canvas.DrawNinePatchedBitmap(__clearIconBounds, *pEditReplacedBitmapClear); + r = canvas.DrawNinePatchedBitmap(__clearIconBounds, *pEditBitmapClear); } else { - r = canvas.DrawBitmap(__clearIconBounds, *pEditReplacedBitmapClear); + r = canvas.DrawBitmap(__clearIconBounds, *pEditBitmapClear); } if (pEditBitmapClear) @@ -2326,22 +2425,11 @@ _EditPresenter::DrawClearIcon(Canvas& canvas) pEditBitmapClear = null; } - if (pEditReplacedBitmapClear) - { - delete pEditReplacedBitmapClear; - pEditReplacedBitmapClear = null; - } - - return r; - -CATCH: - delete pEditBitmapClear; - return r; } result -_EditPresenter::Draw(Canvas& canvas) +_EditPresenter::Draw(void) { result r = E_SUCCESS; @@ -2366,13 +2454,17 @@ _EditPresenter::Draw(Canvas& canvas) } } + //Do not change the bounds of the edit control after acquiring a canvas. + Canvas* pCanvas = __pEdit->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); + __isCursorOpaque = true; - canvas.SetBackgroundColor(Color(0)); - r = canvas.Clear(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetBackgroundColor(Color(0)); + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - DrawBackground(canvas); + DrawBackground(*pCanvas); if (__pTextVisualElement) { @@ -2380,21 +2472,75 @@ _EditPresenter::Draw(Canvas& canvas) } else { - DrawText(canvas); if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR) { - DrawClearIcon(canvas); + if (GetSearchBarFlag()) //SearchBar + { + if (__pTextString->GetLength() == 0) + { + if (__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + else + { + if (!__isClearIconVisible) + { + __isClearIconVisible = true; + AdjustTextBounds(__isClearIconVisible); + } + + DrawClearIcon(*pCanvas); + } + } + else //EditField + { + if (IsCurrentFocused() == true) + { + if (__pTextString->GetLength() == 0) + { + if (__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + else + { + if (!__isClearIconVisible) + { + __isClearIconVisible = true; + AdjustTextBounds(__isClearIconVisible); + } + + if (!(!__pEdit->IsFocusModeStateEnabled() && __pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN)) + { + DrawClearIcon(*pCanvas); + } + } + } + else + { + if(__isClearIconVisible) + { + __isClearIconVisible = false; + AdjustTextBounds(__isClearIconVisible); + } + } + } } + + DrawText(*pCanvas); } - if (__rotated && !__clipboardConnected) // Command button should be relocated after rotation in case of no keypad. + RestoreCopyPasteManager(); + + if (__isCopyPasteManagerExist) { - if (__isCopyPasteManagerExist) - { - PostInternalEvent(String(L"ShowCopyPaste")); - } - __rotated = false; + __pCopyPasteManager->Show(); } InitializeCursor(); @@ -2408,18 +2554,30 @@ _EditPresenter::Draw(Canvas& canvas) if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) { AdjustFlexibleHeight(); - - if (__pEdit->HasFocusRing()) - { - __pEdit->RemoveFocusRing(); - __pEdit->OnDrawFocus(); - } } } + //fall through + +CATCH: + delete pCanvas; + return r; } +void +_EditPresenter::RestoreCopyPasteManager(void) +{ + if (__rotated && !__clipboardConnected) // Command button should be relocated after rotation in case of no keypad. + { + if (__isCopyPasteManagerExist) + { + PostInternalEvent(String(L"ShowCopyPaste")); + } + __rotated = false; + } +} + result _EditPresenter::ConvertLinkType(void) { @@ -2551,7 +2709,7 @@ _EditPresenter::ConvertLinkType(void) SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to get font."); _FontImpl* fontImpl = _FontImpl::GetInstance(*pFont); - SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "[E_SYSTEM] fontImpl is null."); + SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "fontImpl is null."); fontImpl->SetUnderline(true); __pEdit->GetCutlinkColorInfo(editLinkType, &cutlinkColor); @@ -2872,7 +3030,7 @@ _EditPresenter::CalculateCursorBounds(const FloatRectangle& textBounds, FloatRec if ((cursorBounds.y + cursorBounds.height > textBounds.y + textBounds.height) && (cursorBounds.y < textBounds.y + textBounds.height)) { - float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f; + float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height; if (cursorHeightDiff > 0.0f) { cursorBounds.height -= cursorHeightDiff; @@ -2988,7 +3146,7 @@ _EditPresenter::CalculateCursorBounds(const FloatRectangle& textBounds, FloatRec if ((cursorBounds.y + cursorBounds.height > textBounds.y + textBounds.height) && (cursorBounds.y < textBounds.y + textBounds.height)) { - float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f; + float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height; if (cursorHeightDiff > 0.0f) { cursorBounds.height -= cursorHeightDiff; @@ -3139,10 +3297,91 @@ _EditPresenter::ScrollContents(float moveY) return E_SUCCESS; } -bool -_EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +result +_EditPresenter::ScrollContentsOnKey(const Tizen::Ui::_KeyCode keyCode) { - if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) + int firstDisplayLine = 0; + float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + float totalHeight = __pTextObject->GetTotalHeightF(); + + if (__pTextObject->GetTextLength() < 1) + { + return E_SYSTEM; + } + + if (totalHeight <= __textObjectBounds.height) + { + return E_SYSTEM; + } + + switch(keyCode) + { + case _KEY_UP: + if (firstDisplayY <= 0.0f) + { + return E_SYSTEM; + } + + firstDisplayLine = __pTextObject->GetFirstDisplayLineIndex(); + if (firstDisplayLine < 1) + { + __pTextObject->SetFirstDisplayPositionY(0.0f); + } + else + { + FloatRectangle firstDisplayLineRect = __pTextObject->GetBoundsAtLineF(firstDisplayLine); + if ( (firstDisplayLineRect.y + firstDisplayLineRect.height - firstDisplayY) < firstDisplayLineRect.height/5.0f) + { + __pTextObject->SetFirstDisplayPositionY(firstDisplayLineRect.y); + } + else + { + __pTextObject->SetFirstDisplayLineIndex(firstDisplayLine - 1); + } + } + break; + case _KEY_DOWN: + if (firstDisplayY >= (totalHeight - __textObjectBounds.height)) + { + return E_SYSTEM; + } + + firstDisplayLine = __pTextObject->GetFirstDisplayLineIndex(); + if (firstDisplayLine >= __pTextObject->GetTotalLineCount() - __pTextObject->GetDisplayLineCount()) + { + __pTextObject->SetFirstDisplayPositionY(totalHeight - __textObjectBounds.height); + } + else + { + FloatRectangle firstDisplayLineRect = __pTextObject->GetBoundsAtLineF(firstDisplayLine); + int newFirstDisplayLine = firstDisplayLine + 1; + + if ( (firstDisplayLineRect.y + firstDisplayLineRect.height - firstDisplayY) < firstDisplayLineRect.height/5.0f) + { + if (firstDisplayLine + 2 < __pTextObject->GetTotalLineCount() - __pTextObject->GetDisplayLineCount()) + { + newFirstDisplayLine = firstDisplayLine + 2; + } + } + __pTextObject->SetFirstDisplayLineIndex(newFirstDisplayLine); + } + break; + default: + return E_SYSTEM; + } + + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->AdjustBounds(); + } + + return E_SUCCESS; +} + +bool +_EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +{ + if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) { return false; } @@ -3187,7 +3426,7 @@ _EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchIn } } - if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR && __pTextString->GetLength() > 0) + if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR && __pTextString->GetLength() > 0 && __isClearIconVisible) { if ((__pressedPoint.x >= __clearIconBounds.x) && (__pressedPoint.x <= __clearIconBounds.x + __clearIconBounds.width) && (__pressedPoint.y >= __clearIconBounds.y) && (__pressedPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) // Clear Icon Pressed @@ -3206,6 +3445,8 @@ _EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchIn bool _EditPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) { + InitializeCopyPasteManager(); + if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) { return false; @@ -3245,6 +3486,14 @@ _EditPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchi bool _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) { + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + return true; + } + + __isTouchLongPressed = false; + if (__isCopyPasteManagerExist) { if (__isTouchPressed && !__isCopyPastePopupMoving) @@ -3258,12 +3507,24 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width) && (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) { + if (__pEdit->IsTouchMoving()) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit); + } ClearText(); __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); __isMovingCursorByTouchMove = false; __pEdit->Invalidate(); } } + + __isTouchPressed = false; + __isCopyPastePopupMoving = false; + + if (IsCurrentFocused()) + { + return true; + } } else { @@ -3271,13 +3532,20 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI { __pEdit->SetFocused(); } - __pCopyPasteManager->CreateCopyPastePopup(); + + FadeOutScrollBar(); // Fade out scrollbar when copypaste popup is moving. + if (__needToCreateCopyPastePopup) + { + __pCopyPasteManager->CreateCopyPastePopup(); + } + __needToCreateCopyPastePopup = false; __pCopyPasteManager->Show(); - } - __isTouchPressed = false; - __isCopyPastePopupMoving = false; - return true; + __isTouchPressed = false; + __isCopyPastePopupMoving = false; + + return true; + } } if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) @@ -3297,13 +3565,21 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width) && (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) { + if (__pEdit->IsTouchMoving()) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit); + } ClearText(); __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); __isTouchPressed = false; __isMovingCursorByTouchMove = false; __pEdit->Invalidate(); - return true; + __isTouchMoving = false; + if (IsCurrentFocused() || GetSearchBarFlag()) + { + return true; + } } } @@ -3354,6 +3630,7 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI LinkType baseLinkType = pCutLinkObject->GetCutLinkType(); // Send Ui Link Event + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit); __pEdit->SendLinkEvent(cutLinkString, baseLinkType, cutLinkString); } } @@ -3389,6 +3666,10 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI { if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false) { + if (__isInputConnectionBound == true && __isTextComposing == true) + { + __pInputConnection->FinishTextComposition(); + } SetCursorPosition(GetTextLength()); } } @@ -3410,12 +3691,17 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI } } - if (!__isUSBKeyboardConnected && !__isKeypadExist && !IsViewModeEnabled()) + if (!__isUSBKeyboardConnected && !__isKeypadExist && !IsViewModeEnabled() && IsKeypadEnabled()) { needToCreatePopup = false; } - if (IsViewModeEnabled() && GetTextLength() == 0) + if (GetTextLength() == 0 && !IsClipped()) + { + needToCreatePopup = false; + } + + if (IsViewModeEnabled()) { needToCreatePopup = false; } @@ -3436,11 +3722,18 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance."); __pCopyPasteManager->AddCopyPasteEventListener(*this); + UpdateComponentInformation(); + __pCopyPasteManager->DestroyCopyPasteMagnifier(); __pCopyPasteManager->Show(); __isCopyPasteManagerExist = true; } } + if (!__isKeypadExist) + { + __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation());//double check + } + if (cutLinkIndex < 0) { CheckUSBKeyboardStatus(); @@ -3498,6 +3791,10 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI } } } + else + { + SysLog(NID_UI_CTRL, "ShowKeypad is skipped[Target:%x][KeypadExist:%d][Bound:%d][Usb mode:%d]", this, __isKeypadExist, __isInputConnectionBound, __isUSBKeyboardConnected); + } } } } @@ -3525,6 +3822,19 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI bool _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) { + if (__dragAndDropStarted) + { + _Window* pDragWindow = __pEdit->GetDragWindow(); + if (pDragWindow) + { + FloatPoint dragPoint = touchInfo.GetCurrentPosition(); + dragPoint.x += __pEdit->GetAbsoluteBoundsF(true).x; + dragPoint.y += __pEdit->GetAbsoluteBoundsF(true).y; + pDragWindow->SetPosition(FloatPoint(dragPoint.x - pDragWindow->GetBoundsF().width/2.0f, dragPoint.y - pDragWindow->GetBoundsF().height/2.0f)); + } + return true; + } + if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) { return false; @@ -3545,10 +3855,119 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo if (__isCopyPasteManagerExist) { - __pCopyPasteManager->Show(); - if (!__isClearIconPressed) + if (!IsBlocked() && GetTextLength() > 0 && __isTouchLongPressed) + { + int cursorPos = -1; + int rowIndex = -1; + int columnIndex = -1; + FloatPoint touchPoint = touchInfo.GetCurrentPosition(); + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__cursorPos); + int totalLine = __pTextObject->GetTotalLineCount(); + float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + float totalHeight = __pTextObject->GetTotalHeightF(); + + if (touchPoint.x < __textObjectBounds.x) + { + touchPoint.x = __textObjectBounds.x; + } + if (touchPoint.x > __textObjectBounds.x + __textObjectBounds.width) + { + touchPoint.x = __textObjectBounds.x + __textObjectBounds.width; + } + if (__textObjectBounds.y > touchPoint.y) + { + if (totalLine == 1 || firstDisplayY == 0.0f) // whether need to scroll the text or not + { + touchPoint.y = __textObjectBounds.y; //not need to scroll the text. + } + } + if (__textObjectBounds.y + __textObjectBounds.height < touchPoint.y) + { + if (totalLine == 1 || (totalHeight - firstDisplayY < __textObjectBounds.height) || curCursorLine == (totalLine - 1)) // || pTextObject->IsDisplayedLastLine()) // whether need to scroll the text or not + { + touchPoint.y = __textObjectBounds.y + __textObjectBounds.height; // check TextObject + } + } + + if(!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + if (totalHeight < __textObjectBounds.height) + { + if (totalHeight < touchPoint.y) + { + touchPoint.y = totalHeight; + } + } + } + cursorPos = GetCursorPositionAt(touchPoint, rowIndex, columnIndex); + if (cursorPos == -1) + { + FloatRectangle cursorRect(0.0f, 0.0f, 0.0f, 0.0f); + CalculateCursorBounds(__textObjectBounds, cursorRect, __rowCursorIndex, __columnCursorIndex); + if (totalLine != 1) + { + if (touchPoint.y > (cursorRect.y + cursorRect.height)) + { + if (curCursorLine < totalLine - 1) + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + cursorPos = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1); + if (offset > textLength) + { + cursorPos = firstTextIndex+textLength; + } + } + } + else + { + if (curCursorLine !=0) + { + if (__rowCursorIndex == 0) + { + cursorPos = -1; + } + else + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); + cursorPos = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset > textLength) + { + cursorPos = firstTextIndex+textLength; + } + } + } + } + } + if (cursorPos == -1) + { + return true; + } + SetCursorPosition(cursorPos); + } + else + { + SetCursorPosition(cursorPos, rowIndex, columnIndex); + } + ScrollPanelToCursorPosition(true); + __pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos); + __pCopyPasteManager->Show(); + if (!__isClearIconPressed) + { + __isCopyPastePopupMoving = true; + } + return true; + } + else { - __isCopyPastePopupMoving = true; + __pCopyPasteManager->Show(); + if (!__isClearIconPressed) + { + __isCopyPastePopupMoving = true; + } } } @@ -3559,7 +3978,7 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo return true; } - if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) { float horizontalGap = touchInfo.GetCurrentPosition().x - __pScrollEffect->currentX; FloatRectangle lineBounds = __pTextObject->GetBoundsAtLineF(0); @@ -3568,9 +3987,14 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo if (horizontalGap < 0.0f && lineBounds.width - textDisplayPositionX > __textObjectBounds.width) { + if (__pTextObject->GetAction() == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + return true; + } + newTextDisplayPositionX = textDisplayPositionX - horizontalGap; - if (newTextDisplayPositionX > lineBounds.width - __textObjectBounds.width) + if (newTextDisplayPositionX > lineBounds.width - __textObjectBounds.width) { newTextDisplayPositionX = lineBounds.width - __textObjectBounds.width; } @@ -3587,6 +4011,11 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo } if (horizontalGap > 0.0f && textDisplayPositionX > 0) { + if (__pTextObject->GetAction() == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + return true; + } + newTextDisplayPositionX = textDisplayPositionX - horizontalGap; if (newTextDisplayPositionX < 0) { @@ -3631,32 +4060,6 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo return true; } - - if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) - { - float horizontalGap = touchInfo.GetCurrentPosition().x - fromBounds.x; - FloatDimension currentCharacterDimension; - if (horizontalGap > 0.0f && __cursorPos < GetTextLength()) - { - currentCharacterDimension = __pTextObject->GetTextExtentF(__cursorPos, 1); - if (horizontalGap >= currentCharacterDimension.width) - { - SetCursorPosition(__cursorPos+1); - __pEdit->Invalidate(); - return true; - } - } - if (horizontalGap < 0.0f && __cursorPos > 0) - { - currentCharacterDimension = __pTextObject->GetTextExtentF(__cursorPos-1, 1); - if (Math::Abs(horizontalGap) >= currentCharacterDimension.width) - { - SetCursorPosition(__cursorPos-1); - __pEdit->Invalidate(); - return true; - } - } - } } if (__isMovingCursorByTouchMove) { @@ -3666,14 +4069,11 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo float totalHeight = __pTextObject->GetTotalHeightF(); - if (__pParentPanel) + if (__textObjectBounds.height >= totalHeight) { - if (__textObjectBounds.height >= totalHeight) - { - __isTouchMoving = true; - __isTouchReleaseSkipped = true; - return false; - } + __isTouchMoving = true; + __isTouchReleaseSkipped = true; + return false; } if ((touchInfo.GetCurrentPosition().y == __pScrollEffect->currentY) || @@ -3688,7 +4088,6 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo __pScrollEffect->previousAbsY = __pScrollEffect->currentAbsY; __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); -// float moveGap = __pScrollEffect->previousY - __pScrollEffect->currentY; float moveGap = __pScrollEffect->previousAbsY - __pScrollEffect->currentAbsY; if (__isMovingCursorByTouchMove) @@ -3740,6 +4139,15 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) FloatRectangle panelAbsBounds(0.0f, 0.0f, 0.0f, 0.0f); FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f); + if (__dragAndDropStarted) + { + if (keyCode == _KEY_ESC) + { + ResetDragAndDrop(); + } + return true; + } + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null"); @@ -3761,7 +4169,27 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } else { - return false; + // ViewMode + CheckUSBKeyboardStatus(); + if (__isUSBKeyboardConnected && __pEdit->GetInputStyle() != INPUT_STYLE_FULLSCREEN) + { + if ((keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL) && ((keyCode == _KEY_A) || (keyCode == _KEY_C))) + { + //fall through + } + else if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_RIGHT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN)) + { + //fall through + } + else + { + return false; + } + } + else + { + return false; + } } if (__isUSBKeyboardConnected && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL) && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT)) @@ -3820,7 +4248,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (!pAccessibilityManager->IsActivated()) { __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); - SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance."); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed."); __pCopyPasteManager->AddCopyPasteEventListener(*this); __pCopyPasteManager->CreateCopyPastePopup(); __pCopyPasteManager->Show(); @@ -3945,7 +4373,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { if (!__isCopyPasteManagerExist) { - if ( (keyCode == _KEY_LEFT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN) || (keyCode == _KEY_RIGHT) ) + if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN) || (keyCode == _KEY_RIGHT)) { if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) { @@ -4168,8 +4596,18 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) return false; } + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) && __pEditModel->IsViewModeEnabled()) + { + if (ScrollContentsOnKey(_KEY_UP) == E_SUCCESS) + { + DrawText(); + return true; + } + return false; + } + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); - if (curCursorLine !=0 ) + if (curCursorLine != 0) { int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); @@ -4229,6 +4667,16 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) FinishTextComposition(); + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) && __pEditModel->IsViewModeEnabled()) + { + if (ScrollContentsOnKey(_KEY_DOWN) == E_SUCCESS) + { + DrawText(); + return true; + } + return false; + } + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); int totalLine = __pTextObject->GetTotalLineCount(); if (curCursorLine < totalLine - 1) @@ -4310,6 +4758,7 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) int startPosition = -1; int endPosition = -1; GetTextImageRangeAt(__cursorPos, startPosition, endPosition); + if (endPosition > __cursorPos+1 && startPosition > -1) { SetCursorPosition(endPosition); @@ -4383,26 +4832,26 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) OnSurroundingTextDeleted(0, 1); } } + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) { DrawText(); + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); } else { __pEdit->Invalidate(); } + ScrollPanelToCursorPosition(); return true; } - else if (_KEY_OEM_1 == keyCode) + else if (_KEY_CLIPBOARD== keyCode) { __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); __clipboardConnected = true; - return true; - } - else if (__composingTextLength > 0 && GetTextLength() >= __limitLength) - { + __pEdit->AddClipboardShowTriggerEventListener(); return true; } else if (_KEY_TAB == keyCode) @@ -4421,6 +4870,10 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) } return false; } + else if (__composingTextLength > 0 && GetTextLength() >= __limitLength) + { + return true; + } return false; } @@ -4428,12 +4881,18 @@ _EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _EditPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { - _KeyCode keyCode = keyInfo.GetKeyCode(); + _KeyCode keyCode = keyInfo.GetKeyCode(); if (__isUSBKeyboardConnected && (keyCode == _KEY_SHIFT_L || keyCode == _KEY_SHIFT_R)) { if (__pCopyPasteManager && __pCopyPasteManager->IsHandlerMovingEnabled()) { + int leftHandler = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT); + int rightHandler = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT); + if (leftHandler > rightHandler) + { + __pCopyPasteManager->CreateHandle(); + } __pCopyPasteManager->SetHandlerMovingEnabled(false); __pCopyPasteManager->CreateCopyPastePopup(); __pCopyPasteManager->Show(); @@ -4445,7 +4904,7 @@ _EditPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) if (!pAccessibilityManager->IsActivated()) { __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); - SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance."); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed."); __pCopyPasteManager->AddCopyPasteEventListener(*this); __pCopyPasteManager->CreateCopyPastePopup(); __pCopyPasteManager->Show(); @@ -4482,10 +4941,10 @@ _EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) InitializeCopyPasteManager(); } - SysTryReturnVoidResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[E_SYSTEM] _EditPresenter::OnClipboardPopupClosed: Unable to get the clipboarditem instance."); + SysTryReturnVoidResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[E_SYSTEM] Unable to get the clipboarditem instance."); String* pClipString = dynamic_cast(pClipboardItem->GetData()); - SysTryReturnVoidResult(NID_UI_CTRL, pClipString != null, E_SYSTEM, "[E_SYSTEM] _EditPresenter::OnClipboardPopupClosed: Unable to get the clipboarditem instance."); + SysTryReturnVoidResult(NID_UI_CTRL, pClipString != null, E_SYSTEM, "[E_SYSTEM] Unable to get the clipboarditem instance."); String str; if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML) @@ -4496,6 +4955,15 @@ _EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString); pClipString = &str; } + if (str.IsEmpty()) + { + if (IsBlocked()) + { + ReleaseTextBlock(); + } + delete pClipboardItem; + return; + } } int currentLength = GetTextLength(); @@ -4526,7 +4994,7 @@ _EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) DeleteText(start, end); ReleaseTextBlock(); pSubString = new String(__limitLength - currentLength + (end - start)); - SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer."); + SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString); r = InsertTextAt(__cursorPos, pSubString->GetPointer()); @@ -4548,9 +5016,23 @@ _EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) delete pClipboardItem; return; } - + + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + int length = filteredString.GetLength(); + for (int i = length-1; i >= 0; i--) + { + wchar_t ch; + filteredString.GetCharAt(i, ch); + if (ch == '\n') + { + filteredString.Remove(i, 1); + } + } + } + pSubString = new String(__limitLength - currentLength); - SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer."); + SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); filteredString.SubString(0, __limitLength - currentLength, *pSubString); r = InsertTextAt(__cursorPos, pSubString->GetPointer()); @@ -4599,8 +5081,58 @@ _EditPresenter::OnLongPressGestureDetected(void) return false; } + int rowIndex = -1; + int columnIndex = -1; + int cursorPos = -1; + if (__isCopyPasteManagerExist) { + +#if EDIT_DRAG_AND_DROP_ENABLED + if (IsBlocked()) + { + int start = -1; + int end = -1; + GetBlockRange(start, end); + __dragAndDropString = GetText(start, end-1); + _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, __dragAndDropString); + SysTryReturn(NID_UI_CTRL, pDragAndDropItem, false, E_OUT_OF_MEMORY, "Memory allocation failed."); + + cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex); + if (cursorPos != -1) + { + SetCursorPosition(cursorPos); + } + else + { + cursorPos = GetTextLength(); + SetCursorPosition(cursorPos); + } + + __pEdit->DragAndDropBegin(*pDragAndDropItem); + delete pDragAndDropItem; + + __dragAndDropStarted = true; + InitializeCopyPasteManager(); + } + else +#endif + if (!IsBlocked()) + { + cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex); + if (cursorPos != -1) + { + SetCursorPosition(cursorPos); + } + else + { + return true; + } + __pCopyPasteManager->CreateCopyPasteMagnifier(); + __pCopyPasteManager->Show(); + __isTouchLongPressed = true; + __needToCreateCopyPastePopup = true; + } return true; } else if (IsCurrentFocused() == false) @@ -4617,14 +5149,15 @@ _EditPresenter::OnLongPressGestureDetected(void) FloatRectangle cursorBounds; InitializeCopyPasteManager(); - if (IsClipped() || GetTextLength()) + bool isClipped = IsClipped(); + if (isClipped || GetTextLength()) { - if (IsClipped() && !GetTextLength() && (__pEdit->IsViewModeEnabled())) + if (!GetTextLength() && IsViewModeEnabled()) { return true; } - if (!IsClipped() && (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)) + if (!isClipped && (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)) { return true; } @@ -4637,7 +5170,7 @@ _EditPresenter::OnLongPressGestureDetected(void) StopPasswordTimer(); } - int cursorPos = GetCursorPositionAt(__pressedPoint); + cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex); if (cursorPos != -1) { SetCursorPosition(cursorPos); @@ -4655,6 +5188,8 @@ _EditPresenter::OnLongPressGestureDetected(void) __pCopyPasteManager->AddCopyPasteEventListener(*this); __pCopyPasteManager->Show(); __isCopyPasteManagerExist = true; + __isTouchLongPressed = true; + __needToCreateCopyPastePopup = true; } @@ -4721,6 +5256,7 @@ _EditPresenter::OnTapGestureDetected(void) __pCopyPasteManager->AddCopyPasteEventListener(*this); __pCopyPasteManager->Show(); __isCopyPasteManagerExist = true; + __needToCreateCopyPastePopup = true; __pEdit->Draw(); } @@ -4904,7 +5440,7 @@ _EditPresenter::CopyText(void) } TextImage* pImageText = null; pImageText = dynamic_cast < TextImage* >(pTextElement); - if ( pImageText == null) + if (pImageText == null) { continue; } @@ -4955,16 +5491,32 @@ _EditPresenter::PasteText(void) int total = 0; String userString; String filteredString; + String str; _Clipboard* pClipBoard = _Clipboard::GetInstance(); SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "Unable to get the clipboard instance."); - const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO); + const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO|CLIPBOARD_DATA_TYPE_HTML); SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "Unable to get the clipboarditem instance."); const String* pClipString = dynamic_cast(pClipboardItem->GetData()); SysTryCatch(NID_UI_CTRL, pClipString, r = E_SYSTEM, E_SYSTEM, "Unable to get the clipboarditem instance."); + if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString); + pClipString = &str; + } + if (str.IsEmpty()) + { + delete pClipboardItem; + return r; + } + } + filteredString = *pClipString; if (__pTextFilter) @@ -4989,7 +5541,7 @@ _EditPresenter::PasteText(void) DeleteText(start, end); ReleaseTextBlock(); pSubString = new String(__limitLength - currentLength + (end - start)); - SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer."); + SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString); r = InsertTextAt(__cursorPos, pSubString->GetPointer()); @@ -5011,9 +5563,21 @@ _EditPresenter::PasteText(void) delete pClipboardItem; return E_SUCCESS; } - + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + int length = filteredString.GetLength(); + for (int i = length-1; i >= 0; i--) + { + wchar_t ch; + filteredString.GetCharAt(i, ch); + if (ch == '\n') + { + filteredString.Remove(i, 1); + } + } + } pSubString = new String(__limitLength - currentLength); - SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer."); + SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); filteredString.SubString(0, __limitLength - currentLength, *pSubString); r = InsertTextAt(__cursorPos, pSubString->GetPointer()); @@ -5080,18 +5644,41 @@ _EditPresenter::RemoveTextBlock(void) bool _EditPresenter::IsClipped(void) const { + String str; _Clipboard* pClipBoard = _Clipboard::GetInstance(); SysTryReturn(NID_UI_CTRL, pClipBoard != null, false, E_SYSTEM, "Unable to get the clipboard instance."); - const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO); + const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO|CLIPBOARD_DATA_TYPE_HTML); if (pClipboardItem == null) { SetLastResult(E_SUCCESS); return false; } - delete pClipboardItem; + const String* pClipString = dynamic_cast(pClipboardItem->GetData()); + SysTryCatch(NID_UI_CTRL, pClipString, , GetLastResult(), "Unable to get the clipboarditem data."); + + if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString); + pClipString = &str; + } + if (str.IsEmpty()) + { + delete pClipboardItem; + return false; + } + } + + delete pClipboardItem; return true; + +CATCH: + delete pClipboardItem; + return false; } result @@ -5167,12 +5754,19 @@ _EditPresenter::GetText(int start, int end) const String resultString; String elementString; const int textElementCount = __pTextObject->GetElementCount(); + + if (textElementCount == 0) + { + return resultString; + } + _Text::TextElement* pTextElement = __pTextObject->GetElementAtTextIndex(start); if (pTextElement == null) { return resultString; } + const int startIndex = __pTextObject->GetElementIndexOf(*pTextElement); for (int index = startIndex; index < textElementCount; index++) @@ -5188,7 +5782,7 @@ _EditPresenter::GetText(int start, int end) const if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) { pSimpleText = dynamic_cast < TextSimple* >(pTextElement); - if ( pSimpleText == null) + if (pSimpleText == null) { continue; } @@ -5282,14 +5876,14 @@ _EditPresenter::SetText(const String& text) } __pTextBuffer[length] = 0; + __pTextObject->RemoveAll(); + TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, length,TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); + __pTextObject->AppendElement(*pSimpleText); + if (__isInitialized == true) { AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT); } - - __pTextObject->RemoveAll(); - TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, length,TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); - __pTextObject->AppendElement(*pSimpleText); __pTextObject->Compose(); ReplaceTextIntoPasswordHyphenString(); @@ -5407,7 +6001,7 @@ _EditPresenter::InsertTextAt(int index, const String& text) SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given."); } - if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN ) + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) { while (insertText.Contains(String(L"\n"))) { @@ -5532,7 +6126,7 @@ _EditPresenter::AppendText(const String& text) if (!__isTextBlocked) { - SetCursorPosition(totalLength); + SetCursorPosition(totalLength); } if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) @@ -5622,7 +6216,7 @@ _EditPresenter::DeleteText(int startCursorPosition, int endCursorPosition) const TextSimple* pLastSimpleText = dynamic_cast (pLastTextElement); if (pLastSimpleText != null && pLastSimpleText->GetBitmap() != null) { - if( (pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength()) > endCursorPosition) + if ((pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength()) > endCursorPosition) { endCursorPosition = pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength(); } @@ -5716,7 +6310,7 @@ _EditPresenter::SetTextLimitLength(int limitLength) } wchar_t* pTempBuffer = new (std::nothrow) wchar_t[limitLength + 1]; - SysTryReturnResult(NID_UI_CTRL, pTempBuffer, E_OUT_OF_MEMORY, "Unable to allocate buffer."); + SysTryReturnResult(NID_UI_CTRL, pTempBuffer, E_OUT_OF_MEMORY, "Memory allocation failed."); for (int i = 0; i < textLength; i++) { @@ -5741,7 +6335,7 @@ _EditPresenter::SetTextLimitLength(int limitLength) __pTextObject->RemoveAll(); pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, textLength, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); - SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Insufficient memory."); + SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -6232,7 +6826,7 @@ _EditPresenter::InsertTextAt(int position, const String& text, const Bitmap& tex TextSimple* pSimpleText = null; pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, GetFont()); - SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Unable to allocate text simple element."); + SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed."); pSimpleText->ChangeTextOffset(__pTextBuffer, position); pSimpleText->SetBitmap((Bitmap&)textImage); @@ -6332,8 +6926,8 @@ _EditPresenter::OnFocusGained(void) if (!__pTextVisualElement) { result r = E_SUCCESS; - __pTextVisualElement = new (std::nothrow) _VisualElement; - SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Unable to create __pTextVisualElement instance."); + __pTextVisualElement = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pTextVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); @@ -6408,10 +7002,28 @@ _EditPresenter::OnNotifiedN(IList* pArgs) if (__pCopyPasteManager) { __pCopyPasteManager->CreateHandle(); + __pCopyPasteManager->DestroyCopyPasteMagnifier(); if (__needToCreateCopyPastePopup) { - __pCopyPasteManager->CreateCopyPastePopup(); - __needToCreateCopyPastePopup = false; + if (__pParentPanel) + { + if (!__pParentPanel->IsScrollAnimationRunning()) + { + __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = false; + } + } + } + else + { + __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = false; + } + } } __pCopyPasteManager->Show(); } @@ -6487,14 +7099,15 @@ _EditPresenter::ChangeToUnbindState(bool removeFocus) if (__isInputConnectionBound) { + SysLog(NID_UI_CTRL, "keypad & clipboard is closed by external request!!"); HideKeypad(removeFocus); if (__isClipboardExist) { if (__pClipboard) { - __pClipboard->HidePopup(); OnClipboardPopupClosed(); + __pClipboard->HidePopup(); } } } @@ -6546,6 +7159,12 @@ _EditPresenter::ChangeToUnbindState(bool removeFocus) bool _EditPresenter::OnFocusLost(void) { + + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + } + if (!__pEdit->IsDestroyed()) { InitializeCopyPasteManager(); @@ -6573,8 +7192,8 @@ _EditPresenter::OnFocusLost(void) { if (__pClipboard) { - __pClipboard->HidePopup(); OnClipboardPopupClosed(); + __pClipboard->HidePopup(); } } @@ -6595,6 +7214,13 @@ _EditPresenter::OnFocusLost(void) ReplaceTextIntoPasswordHyphenString(); + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + delete __pCursorTimer; + __pCursorTimer = null; + } + __pEdit->Invalidate(); return true; @@ -6729,7 +7355,7 @@ _EditPresenter::IsContained(FloatRectangle& paramRect) const } result -_EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorBounds) +_EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorBounds, bool clipCursorHeight) { float cursorAbsX = 0.0f; float cursorAbsY = 0.0f; @@ -6737,6 +7363,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs float cursorHeight = 0.0f; float cursorRelativeX = 0.0f; float cursorRelativeY = 0.0f; + float cursorHeightDiff = 0.0f; FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); @@ -6773,15 +7400,30 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs absCursorBounds.width = cursorWidth; + cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height; + if (cursorHeight > 0.0f) { - if (cursorHeight <= __calculatedCursorBounds.height) + if (cursorHeight <= __calculatedCursorBounds.height || (!clipCursorHeight)) { - absCursorBounds.height = cursorHeight; + absCursorBounds.height = cursorHeight; + + //TODO: EEA AlignToDevice problem - Need to find a concrete solution + if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f)) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } } else { - absCursorBounds.height = __calculatedCursorBounds.height; + if (__calculatedCursorBounds.height > 0) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } + else + { + absCursorBounds.height = cursorHeight; + } } } else @@ -6793,7 +7435,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs } result -_EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds) +_EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds, bool clipCursorHeight) { float cursorAbsX = 0.0f; float cursorAbsY = 0.0f; @@ -6801,6 +7443,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, Flo float cursorHeight = 0.0f; float cursorRelativeX = 0.0f; float cursorRelativeY = 0.0f; + float cursorHeightDiff = 0.0f; FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); @@ -6828,15 +7471,30 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, Flo absCursorBounds.width = cursorWidth; + cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height; + if (cursorHeight > 0.0f) { - if (cursorHeight <= __calculatedCursorBounds.height) + if (cursorHeight <= __calculatedCursorBounds.height || !clipCursorHeight) { absCursorBounds.height = cursorHeight; + + //TODO: EEA AlignToDevice problem - Need to find a concrete solution + if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f)) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } } else { - absCursorBounds.height = __calculatedCursorBounds.height; + if (__calculatedCursorBounds.height > 0) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } + else + { + absCursorBounds.height = cursorHeight; + } } } else @@ -6902,7 +7560,7 @@ _EditPresenter::CreateCommandButtonItemN(int actionId, const String& text) { result r = E_SUCCESS; _Button* pButton = _Button::CreateButtonN(); - SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); float textSize = 0.0f; @@ -6959,7 +7617,7 @@ _EditPresenter::SetKeypadCommandButton(const FloatRectangle& bounds) } __pCommandButton = _Toolbar::CreateToolbarN(false); - SysTryReturn(NID_UI_CTRL, __pCommandButton, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryReturn(NID_UI_CTRL, __pCommandButton, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pCommandButton->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -7129,11 +7787,12 @@ _EditPresenter::ShowFullscreenKeypad(void) { AdjustParentPanelHeight(true); + //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash. if (__pParentForm) { SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); __pParentForm->DeflateClientRectHeight(0); - __pParentForm->Draw(); + __pParentForm->Invalidate(true); } } @@ -7166,7 +7825,7 @@ _EditPresenter::ShowFullscreenKeypad(void) } __pFullscreenKeypad = _Keypad::CreateKeypadN(); - SysTryReturn(NID_UI_CTRL, __pFullscreenKeypad, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryReturn(NID_UI_CTRL, __pFullscreenKeypad, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pFullscreenKeypad->Initialize(editStyle, keypadStyleInfo, GetTextLimitLength(), __pEdit); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -7210,13 +7869,6 @@ _EditPresenter::GetKeypadBounds(FloatRectangle& bounds) bounds = __pInputConnection->GetInputPanelBoundsF(); - _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); - SysTryReturnResult(NID_UI_CTRL, pCoordSystem, E_SYSTEM, "Coordinate system load failed."); - - _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer(); - SysTryReturnResult(NID_UI_CTRL, pXformer, E_SYSTEM, "Coordinate system load failed."); - - bounds = pXformer->Transform(bounds); __keypadBounds = bounds; return E_SUCCESS; @@ -7368,6 +8020,9 @@ _EditPresenter::ShowKeypad(bool focus) { SetCurrentLanguage(initialKeypadLanguage); } + + __pEdit->AttachScrollPanelEvent(); + //layout rearrange if (__isUSBKeyboardConnected) { @@ -7378,7 +8033,6 @@ _EditPresenter::ShowKeypad(bool focus) if (__isKeypadCommandButtonVisible) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); - __pEdit->AttachScrollPanelEvent(); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE) @@ -7394,9 +8048,10 @@ _EditPresenter::ShowKeypad(bool focus) __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash. if (__pParentForm) { - __pParentForm->Draw(); + __pParentForm->Invalidate(true); } } else @@ -7416,7 +8071,6 @@ _EditPresenter::ShowKeypad(bool focus) if (sendKeypadEventForcely) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); - __pEdit->AttachScrollPanelEvent(); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); } @@ -7424,16 +8078,21 @@ _EditPresenter::ShowKeypad(bool focus) AdjustParentPanelHeight(false); ScrollPanelToCursorPosition(); + //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash. if (__pParentForm) { - __pParentForm->Draw(); + __pParentForm->Invalidate(true); } if (sendKeypadEventForcely) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); - } + } + } + else + { + ScrollPanelToCursorPosition(); } } } @@ -7450,7 +8109,6 @@ _EditPresenter::ShowKeypad(bool focus) if (!__pCommandButton || (__pCommandButton && !__pCommandButton->GetVisibleState())) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); - __pEdit->AttachScrollPanelEvent(); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); @@ -7462,7 +8120,6 @@ _EditPresenter::ShowKeypad(bool focus) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); } - __pEdit->AttachScrollPanelEvent(); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); } @@ -7499,7 +8156,6 @@ _EditPresenter::ShowKeypad(bool focus) if (sendKeypadEventForcely) { __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); - __pEdit->AttachScrollPanelEvent(); __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); } @@ -7507,9 +8163,10 @@ _EditPresenter::ShowKeypad(bool focus) AdjustParentPanelHeight(false); ScrollPanelToCursorPosition(); + //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash. if (__pParentForm) { - __pParentForm->Draw(); + __pParentForm->Invalidate(true); } __isKeypadShowing = false; @@ -7542,13 +8199,33 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation) { result r = E_SUCCESS; + //for Target DND + __pDragAndDropCueVisualElement->SetShowState(false); + + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + } + if (__pCopyPasteManager) { if (__pCopyPasteManager->GetCopyPastePopup()) { __needToCreateCopyPastePopup = true; } - __pCopyPasteManager->Release(); + else if (!IsBlocked() && __pEditModel->IsViewModeEnabled()) + { + SetCursorPosition(0); + } + __pCopyPasteManager->ReleaseCopyPastePopup(); + __pCopyPasteManager->ReleaseHandle(); + } + else + { + if (__pEditModel->IsViewModeEnabled()) + { + SetCursorPosition(0); + } } bool isScrollPanelBoundsReloaded = false; @@ -7625,8 +8302,8 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation) __initialParentHeight = 0.0f; ChangeLayoutInternal(orientation); AdjustParentPanelHeight(false); - ScrollPanelToCursorPosition(); } + ScrollPanelToCursorPosition(); } } } @@ -7667,6 +8344,21 @@ _EditPresenter::ChangeLayoutInternal(_ControlOrientation orientation, bool defla _ControlManager* pControlManager = _ControlManager::GetInstance(); SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root."); + + _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame()); + if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN)) + { + if (pCurrentFrame) + { + SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode()); + } + else + { + SysLog(NID_UI_CTRL, "Frame is null"); + } + return r; + } + FloatDimension screenSize; FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -7781,6 +8473,23 @@ _EditPresenter::AdjustParentPanelHeight(bool restore) return; } + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[E_SYSTEM] Failed to get root."); + + _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame()); + if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN)) + { + if (pCurrentFrame) + { + SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode()); + } + else + { + SysLog(NID_UI_CTRL, "Frame is null"); + } + return; + } + float initialParentHeight = __initialParentHeight; if (__pResizedPanel != __pParentPanel) { @@ -7803,7 +8512,6 @@ _EditPresenter::AdjustParentPanelHeight(bool restore) FloatRectangle scrollPanelBounds = __pParentPanel->GetBoundsF(); float gapY = 0.0f; - _ControlManager* pControlManager = _ControlManager::GetInstance(); float displayedPanelHeight = 0.0f; FloatDimension screenSize; @@ -8074,6 +8782,7 @@ _EditPresenter::OnEditCopyPasteStatusChanged(CoreCopyPasteStatus status, CoreCop { case CORE_COPY_PASTE_ACTION_COPY: __pEdit->CopyText(); + InitializeCopyPasteManager(); break; case CORE_COPY_PASTE_ACTION_CUT: __pEdit->CutText(); @@ -8179,24 +8888,15 @@ _EditPresenter::StartCursorTimer(void) if (__pCursorTimer == null) { - __pCursorTimer = new (std::nothrow) Timer; - if (__pCursorTimer == null) - { - return E_OUT_OF_MEMORY; - } + __pCursorTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pCursorTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pCursorTimer->Construct(*this); - if (IsFailed(r)) - { - goto CATCH; - } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the cursor timer.", GetErrorMessage(r)); } r = __pCursorTimer->Start(EDIT_CURSOR_TIMER_PERIOD); - if (IsFailed(r)) - { - goto CATCH; - } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to start timer.", GetErrorMessage(r)); return r; @@ -8296,9 +8996,15 @@ _EditPresenter::MoveCursor(const FloatRectangle& fromRect, const FloatRectangle& void _EditPresenter::OnCursorTimerExpired(void) { - if (!IsCurrentFocused() && __isCursorDisabled) + if (!IsCurrentFocused() || __isCursorDisabled) { - StopCursorTimer(); + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + delete __pCursorTimer; + __pCursorTimer = null; + } + return; } @@ -8387,7 +9093,7 @@ _EditPresenter::OnFontChanged(Font* pFont) result r = E_SUCCESS; r = AdjustFont(*pFont, EDIT_FONT_CHANGE_ALL); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); __titleFontFaceName = pFont->GetFaceName(); @@ -8449,9 +9155,15 @@ _EditPresenter::SetTextSize(const int size) r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + + if (__pTextObject->GetTextLength() > 0) + { + __pTextObject->SetFirstDisplayLineIndex(0); + __pTextObject->SetFirstDisplayPositionY(0.0f); + } } - if (IsGuideTextActivated()) + if (__pGuideTextObject) { r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); @@ -8477,9 +9189,15 @@ _EditPresenter::SetTextSize(const float size) r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + + if (__pTextObject->GetTextLength() > 0) + { + __pTextObject->SetFirstDisplayLineIndex(0); + __pTextObject->SetFirstDisplayPositionY(0.0f); + } } - if (IsGuideTextActivated()) + if (__pGuideTextObject) { r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); @@ -8506,7 +9224,7 @@ _EditPresenter::SetFont(const Font& font) SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); } - if (IsGuideTextActivated()) + if (__pGuideTextObject) { r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); @@ -8638,8 +9356,8 @@ _EditPresenter::SetFontType(const String& typefaceName, unsigned long styleMask) { tempFontFaceName = *static_cast(systemFontList->GetAt(i)); - pFont = new (std::nothrow) Font; - SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "Unable to get text information.\n"); + pFont = new (std::nothrow) Font(); + SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); r = pFont->Construct(tempFontFaceName, fontStyle, textSize); SysTryCatch(NID_UI_CTRL, !IsFailed(r), , r, "Unable to construct Font.\n"); @@ -8749,7 +9467,7 @@ _EditPresenter::SetTextStyle(unsigned long textStyle) SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); } - if (IsGuideTextActivated()) + if (__pGuideTextObject) { r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); @@ -8783,11 +9501,9 @@ _EditPresenter::SetGuideText(const String& guideText) __pGuideTextObject = null; } - __pGuideTextObject = new (std::nothrow) TextObject; - if (__pGuideTextObject == null) - { - return E_OUT_OF_MEMORY; - } + __pGuideTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pGuideTextObject, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pGuideTextObject->Construct(); TextSimple* pSimpleText = new (std::nothrow)TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); __pGuideTextObject->AppendElement(*pSimpleText); @@ -8799,7 +9515,7 @@ _EditPresenter::SetGuideText(const String& guideText) if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) { - __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_CHARACTER); + __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); } else { @@ -8833,11 +9549,9 @@ _EditPresenter::SetTitleText(const String& title) __pTitleTextObject = null; } - __pTitleTextObject = new (std::nothrow) TextObject; - if (__pTitleTextObject == null) - { - return E_OUT_OF_MEMORY; - } + __pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pTitleTextObject->Construct(); TextSimple* pSimpleText = new (std::nothrow)TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); __pTitleTextObject->AppendElement(*pSimpleText); @@ -8853,17 +9567,10 @@ _EditPresenter::SetTitleText(const String& title) __titleFontSize = titleFontSize; _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); - if(fontImpl) - { - r = fontImpl->SetSize(__titleFontSize); - SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); - } - else - { - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); - } + r = fontImpl->SetSize(__titleFontSize); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); __pTitleTextObject->SetFont(__pFont, 0, __pTitleTextObject->GetTextLength()); @@ -8977,6 +9684,12 @@ _EditPresenter::Resize(void) } } + if (__isInputConnectionBound) + { + SysLog(NID_UI_CTRL, "Edit's bounds chagned, scroll position should be recalculated."); + ScrollPanelToCursorPosition(); + } + return E_SUCCESS; } @@ -9043,7 +9756,7 @@ _EditPresenter::SetClientBounds(void) GET_SHAPE_CONFIG(EDIT::DEFAULT_TITLE_FONT_SIZE, __pEdit->GetOrientation(), titleFontSize); r = fontImpl->SetSize(titleFontSize); - SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed."); + SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r)); if (titletHeight < fontImpl->GetMaxHeightF()) { @@ -9052,7 +9765,7 @@ _EditPresenter::SetClientBounds(void) } r = fontImpl->SetSize(originalSize); - SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed."); + SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r)); leftBorder = leftMargin; rightBorder = rightMargin; @@ -9069,6 +9782,50 @@ _EditPresenter::SetClientBounds(void) } result +_EditPresenter::AdjustTextBounds(bool clearIconVisible) +{ + int editStyle = __pEdit->GetEditStyle(); + + if (!(editStyle & EDIT_STYLE_CLEAR)) + { + return E_SYSTEM; + } + + float clearIconWidth = 0.0f; + _ControlOrientation orientation = __pEdit->GetOrientation(); + + GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR) + { + if (clearIconVisible) + { + __textObjectBounds.width -= clearIconWidth; + } + else + { + __textObjectBounds.width += clearIconWidth; + } + } + + float textObectMinimumWidth = 0.0f; + float textObjectMinimumHeight = 0.0f; + GET_SHAPE_CONFIG(EDIT::TEXT_OBJECT_MININMUM_WIDTH, orientation, textObectMinimumWidth); + GET_SHAPE_CONFIG(EDIT::TEXT_OBJECT_MININMUM_HEIGHT, orientation, textObjectMinimumHeight); + + if (__textObjectBounds.width < textObectMinimumWidth) + { + __textObjectBounds.width = textObectMinimumWidth; + } + + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + + return E_SUCCESS; +} + +result _EditPresenter::SetInitialEditFieldBounds(void) { result r = E_SUCCESS; @@ -9082,7 +9839,6 @@ _EditPresenter::SetInitialEditFieldBounds(void) float titleTextRightMargin =0.0f; float titleTextTopMargin = 0.0f; float titleTextBottomMargin = 0.0f; - float clearIconWidth = 0.0f; float titletHeight = 0.0f; _ControlOrientation orientation = __pEdit->GetOrientation(); @@ -9095,7 +9851,6 @@ _EditPresenter::SetInitialEditFieldBounds(void) GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin); GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_TOP_MARGIN, orientation, titleTextTopMargin); GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_BOTTOM_MARGIN, orientation, titleTextBottomMargin); - GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth); GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_RECT_HEIGHT, orientation, titletHeight); if (!(editStyle & EDIT_STYLE_SINGLE_LINE)) @@ -9103,6 +9858,11 @@ _EditPresenter::SetInitialEditFieldBounds(void) return E_SYSTEM; } + if (editStyle & EDIT_STYLE_CLEAR) + { + __isClearIconVisible = false; + } + FloatRectangle bounds = __pEdit->GetBoundsF(); if (editStyle & EDIT_STYLE_TITLE_LEFT) { @@ -9116,13 +9876,7 @@ _EditPresenter::SetInitialEditFieldBounds(void) __titleBounds.x = titleTextLeftMargin; __titleBounds.y = titleTextTopMargin; __titleBounds.width = bounds.width - __clientBounds.width - __titleBounds.x; - __titleBounds.height = __clientBounds.height - titleTextTopMargin - - titleTextBottomMargin; - - if (editStyle & EDIT_STYLE_CLEAR) - { - __textObjectBounds.width -= clearIconWidth; - } + __titleBounds.height = __clientBounds.height - titleTextTopMargin - titleTextBottomMargin; } else if (editStyle & EDIT_STYLE_TITLE_TOP) { @@ -9154,13 +9908,7 @@ _EditPresenter::SetInitialEditFieldBounds(void) __titleBounds.y = titleTextTopMargin; __titleBounds.width = bounds.width - __titleBounds.x - titleTextRightMargin; - __titleBounds.height = bounds.height - __titleBounds.y - __clientBounds.height - - bottomMargin; - - if (editStyle & EDIT_STYLE_CLEAR) - { - __textObjectBounds.width -= clearIconWidth; - } + __titleBounds.height = bounds.height - __titleBounds.y - __clientBounds.height - bottomMargin; } else if ((editStyle & EDIT_STYLE_NORMAL) || (editStyle & EDIT_STYLE_CLEAR)) { @@ -9188,13 +9936,8 @@ _EditPresenter::SetInitialEditFieldBounds(void) __textObjectBounds.width -= textRightMargin; } - if (editStyle & EDIT_STYLE_CLEAR) - { - __textObjectBounds.width -= clearIconWidth; - } __textObjectBounds.y = __clientBounds.y + textTopMargin; - __textObjectBounds.height = __clientBounds.height - textTopMargin - - textBottomMargin; + __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin; } else { @@ -9220,8 +9963,7 @@ _EditPresenter::SetInitialEditFieldBounds(void) __textObjectBounds.width -= textRightMargin; } __textObjectBounds.y = __clientBounds.y + textTopMargin; - __textObjectBounds.height = __clientBounds.height - textTopMargin - - textBottomMargin; + __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin; } float textObectMinimumWidth = 0.0f; @@ -9500,11 +10242,8 @@ _EditPresenter::StartTitleSlidingTimer(void) if (__pTitleSlidingTimer == null) { - __pTitleSlidingTimer = new (std::nothrow) Timer; - if (__pTitleSlidingTimer == null) - { - return E_OUT_OF_MEMORY; - } + __pTitleSlidingTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pTitleSlidingTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pTitleSlidingTimer->Construct(*this); if (IsFailed(r)) @@ -9541,7 +10280,7 @@ _EditPresenter::OnTitleSlidingTimerExpired(void) SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to draw title text"); } - Canvas *pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + Canvas* pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); SysTryReturnResult(NID_UI_CTRL, pTitleTextCanvas, E_SYSTEM, "A system error has occurred. Failed to get canvas of VisualElement"); if (__isTouchPressed) @@ -9617,11 +10356,8 @@ _EditPresenter::StartPasswordTimer(void) if (__pPasswordTimer == null) { - __pPasswordTimer = new (std::nothrow) Timer; - if (__pPasswordTimer == null) - { - return E_OUT_OF_MEMORY; - } + __pPasswordTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pPasswordTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pPasswordTimer->Construct(*this); if (IsFailed(r)) @@ -9654,7 +10390,7 @@ _EditPresenter::OnPasswordTimerExpired(void) if (__composingTextLength > 0) { _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); - SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "[E_SYSTEM] fontImpl is null."); + SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "fontImpl is null."); fontImpl->SetUnderline(false); int composingStartPosition = GetCursorPosition()-__composingTextLength; __pTextObject->SetFont(__pFont, composingStartPosition, composingStartPosition+__composingTextLength); @@ -9794,7 +10530,8 @@ _EditPresenter::CalculateFlexibleHeightF(void) height = __initialBounds.height; } - return height; + FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, height)); + return flexHeightDim.height; } result @@ -9819,14 +10556,13 @@ _EditPresenter::AdjustFlexibleHeight(void) FloatRectangle bounds = __pEdit->GetBoundsF(); float calculateHeight = CalculateFlexibleHeightF(); - FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, calculateHeight)); - if (bounds.height != flexHeightDim.height) + //calculateHeight is being calculated based on AlignToDevice only + if (bounds.height != calculateHeight) { - bounds.height = flexHeightDim.height; + bounds.height = calculateHeight; __prevTotalTextHeight = __pTextObject->GetTotalHeightF(); - FloatRectangle editBounds = CoordinateSystem::AlignToDevice(bounds); - return SetFlexBounds(editBounds); + return SetFlexBounds(bounds); } __prevTotalTextHeight = __pTextObject->GetTotalHeight(); return r; @@ -9850,9 +10586,6 @@ _EditPresenter::SetFlexBounds(const FloatRectangle& bounds) _VisualElement* pVisualElement = __pEdit->GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, pVisualElement, E_SYSTEM, "A system error has occurred. Unable to get root visual element."); - pVisualElement->SetAnimationProvider(__pEditVEDelegator); - pVisualElement->SetImplicitAnimationEnabled(true); - //Modify InitialBounds only on User calls and on Orientation change if (!((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) == false)) { @@ -9866,8 +10599,6 @@ _EditPresenter::SetFlexBounds(const FloatRectangle& bounds) __pEdit->Invalidate(); - pVisualElement->SetImplicitAnimationEnabled(false); - __prevTotalTextHeight = __pTextObject->GetTotalHeightF(); __pEdit->SendExpandableEditAreaEvent(expandableEditAreaStatus, __pTextObject->GetTotalLineCount()); @@ -9931,6 +10662,10 @@ _EditPresenter::GetParentForm(void) } return pForm; } + else + { + return __pParentForm; + } CATCH: return null; @@ -10011,11 +10746,16 @@ _EditPresenter::RemoveActionEventListener(const _IActionEventListener& listener) result _EditPresenter::SetTextBounds(Rectangle& bounds) { - __textObjectBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); - if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + FloatRectangle floatBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + if (__textObjectBounds != floatBounds) { - __pTextObject->SetBounds(__textObjectBounds); - __pTextObject->Compose(); + __textObjectBounds = floatBounds; + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + } } return E_SUCCESS; } @@ -10023,11 +10763,15 @@ _EditPresenter::SetTextBounds(Rectangle& bounds) result _EditPresenter::SetTextBounds(FloatRectangle& bounds) { - __textObjectBounds = bounds; - if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + if (__textObjectBounds != bounds) { - __pTextObject->SetBounds(__textObjectBounds); - __pTextObject->Compose(); + __textObjectBounds = bounds; + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + } } return E_SUCCESS; } @@ -10135,55 +10879,51 @@ _EditPresenter::InitializeFlickAnimation(void) if (__pFlickAnimation == null) { - __pFlickAnimation = new (std::nothrow) _FlickAnimation; + __pFlickAnimation = new (std::nothrow) _FlickAnimation(); + SysTryReturnResult(NID_UI_CTRL, __pFlickAnimation, E_OUT_OF_MEMORY, "Memory allocation failed."); } // Init Flick Animation Config - if (__pFlickAnimation) - { - float width = 0.0f; - float height = 0.0f; - Tizen::Graphics::FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); - Tizen::Graphics::FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); - if (__pEdit->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) - { - width = portraitSize.width; - height = portraitSize.height; - } - else - { - width = landscapeSize.width; - height = landscapeSize.height; - } - __pFlickAnimation->SetSizeInformation(width, height, DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL); - __pFlickAnimation->SetSensitivity(FLICK_ANIMATION_FPS_PANEL, FLICK_ANIMATION_SENSITIVITY_PANEL); + float width = 0.0f; + float height = 0.0f; + Tizen::Graphics::FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + Tizen::Graphics::FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + if (__pEdit->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + width = portraitSize.width; + height = portraitSize.height; + } + else + { + width = landscapeSize.width; + height = landscapeSize.height; } + __pFlickAnimation->SetSizeInformation(width, height, DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL); + __pFlickAnimation->SetSensitivity(FLICK_ANIMATION_FPS_PANEL, FLICK_ANIMATION_SENSITIVITY_PANEL); + + // Stop Timer StopFlickTimer(); // Create Timer if (__pFlickAnimationTimer == null) { - __pFlickAnimationTimer = new (std::nothrow) Timer; - if (__pFlickAnimationTimer == null) - { - r = E_OUT_OF_MEMORY; - goto CATCH; - } + __pFlickAnimationTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pFlickAnimationTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pFlickAnimationTimer->Construct(*this); - if (IsFailed(r)) - { - delete __pFlickAnimationTimer; - goto CATCH; - } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct FlickAnimationTimer.", GetErrorMessage(r)); + } return r; CATCH: + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + return r; } @@ -10482,6 +11222,7 @@ _EditPresenter::InitializeParentPanel(void) if (pScrollPanel) { __pParentPanel = pScrollPanel; + __pParentPanel->AddScrollEventListener(*__pEdit); break; } } @@ -10514,68 +11255,93 @@ void _EditPresenter::ScrollPanelToCursorPosition(bool show) { if (!__pParentPanel) + { return; - - result r = E_SUCCESS; + } UpdateComponentInformation(); FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f); - r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds); + result r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds); if (r != E_SUCCESS) { return; } + //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------."); + FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true); - float panelHeight = __pParentPanel->GetBoundsF().height; + FloatRectangle absEditRect = __pEdit->GetAbsoluteBoundsF(true); float scrollPosition = __pParentPanel->GetScrollPosition(); - float cursorBoundsY = absCursorBounds.y - absPanelRect.y; - float topYCompared = 0.0f; - float bottomYCompared = panelHeight; + float upSideGap = 0.0f; + float newScrollPosition = 0.0f; if (__textObjectBounds.height < absCursorBounds.height) { absCursorBounds.height = __textObjectBounds.height; } - float upSideGap = topYCompared - cursorBoundsY; - float downSideGap = (upSideGap > 0.0f) ? 0.0f : cursorBoundsY + absCursorBounds.height - bottomYCompared; - - if (upSideGap > 0.0f || downSideGap > 0.0f) + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN && (!IsInternalFocused())) { - float gap = 0.0f; - float topTextMargin = 0.0f; - float bottomTextMargin = 0.0f; + upSideGap = absPanelRect.y - absEditRect.y; // cursor is not at the top position for token case + } + else + { + upSideGap = absPanelRect.y - absCursorBounds.y; // absPanelRect.y value is always positive + } + if (upSideGap > 0.0f) + { if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) { - topTextMargin = __pEdit->GetBoundsF().y; - bottomTextMargin = __pEdit->GetBoundsF().height; + newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y); + //SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit."); } else { - topTextMargin = __textObjectBounds.y; - bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height; + newScrollPosition = scrollPosition - upSideGap; + //SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor."); } - if (upSideGap > 0.0f) + //SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition); + } + else + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) { - gap = scrollPosition - (upSideGap + topTextMargin); + if ((absPanelRect.y + absPanelRect.height) > (absEditRect.y + absEditRect.height)) + { + //SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region."); + + return; + } + + newScrollPosition = scrollPosition + ((absEditRect.y + absEditRect.height) -(absPanelRect.y + absPanelRect.height)); + SysLog(NID_UI_CTRL, "Move down till down boundary of edit."); } else { - gap = scrollPosition + (downSideGap + bottomTextMargin); - } + if ((absCursorBounds.y + absCursorBounds.height) < (absPanelRect.y + absPanelRect.height)) + { + //SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region."); - __pParentPanel->SetScrollPosition(gap); + return; + } - __pParentPanel->Invalidate(); + newScrollPosition = scrollPosition + ((absCursorBounds.y + absCursorBounds.height) -(absPanelRect.y + absPanelRect.height)); + //SysLog(NID_UI_CTRL, "Move down till down position of cursor."); + } + + //SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition); } + __pParentPanel->SetScrollPosition(newScrollPosition); + __pParentPanel->Invalidate(); + + //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------."); return; } @@ -10845,14 +11611,14 @@ _EditPresenter::PostInternalEvent(const Tizen::Base::String& type) ClearLastResult(); ArrayList* pArgs = new (std::nothrow) ArrayList(); - SysTryReturnVoidResult(NID_UI_CTRL, pArgs != null, E_SYSTEM, "[E_SYSTEM] pArgs is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pArgs != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = E_SYSTEM; r = pArgs->Construct(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to construct pArgs"); String* pType = new (std::nothrow) String(type); - SysTryReturnVoidResult(NID_UI, pType, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturnVoidResult(NID_UI, pType, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pArgs->Add(*pType); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to add type to pArgs"); @@ -10904,13 +11670,13 @@ bool _EditPresenter::IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const Tizen::Base::String& text) { const int numberOfCharOnNumOnlyStyle = 10; - const int numberOfCharOnPhoneNumStyle = 13; + const int numberOfCharOnPhoneNumStyle = 14; const int numberOfCharOnIpStyle = 18; const wchar_t* TempKey = null; const wchar_t characterOnNumOnlyStyle[numberOfCharOnNumOnlyStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, 0}; const wchar_t characterOnPhoneNumStyle[numberOfCharOnPhoneNumStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, - 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0}; + 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0x70/*p*/, 0}; const wchar_t characterOnIPStyle[numberOfCharOnIpStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, 0x3a/*:*/, 0x2e/*.*/, 0x61/*a*/, 0x62/*b*/, 0x63/*c*/, 0x64/*d*/, 0x65/*e*/, 0x66/*f*/, 0}; bool isSupportedCharacterExist = false; @@ -10943,7 +11709,7 @@ _EditPresenter::IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const { isSupportedCharacterExist = false; wchar_t checkChar =0; - if ( text.GetCharAt(i, checkChar) != E_SUCCESS) + if (text.GetCharAt(i, checkChar) != E_SUCCESS) { break; } @@ -11564,7 +12330,7 @@ _EditPresenter::SetPasswordVisible(bool visible) result r = E_SUCCESS; SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), E_INVALID_OPERATION, - "Edit Style is not EDIT_STYLE_PASSWORD.\n") + "Edit Style is not EDIT_STYLE_PASSWORD.") if (__isPasswordVisible == visible) @@ -11612,7 +12378,7 @@ _EditPresenter::IsClearIconPressed(void) const result _EditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& canvas) { - if (__pEditModel->IsViewModeEnabled() || !__pEdit->IsEnabled()) + if ((!__pEdit->IsFocusModeStateEnabled() && IsViewModeEnabled()) || !__pEdit->IsEnabled()) { return E_SUCCESS; } @@ -11631,7 +12397,7 @@ _EditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& canvas) SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); FloatRectangle editRect(0.0f, 0.0f, __pEdit->GetBoundsF().width, __pEdit->GetBoundsF().height); - + Bitmap* pReplacementFocusRing = _BitmapImpl::GetColorReplacedBitmapN(*pFocusRing, Color::GetColor(COLOR_ID_MAGENTA), focusColor); SysTryCatch(NID_UI_CTRL, pReplacementFocusRing, , r = GetLastResult(), "Unable to allocate text buffer."); @@ -11654,4 +12420,262 @@ CATCH: return r; } +void +_EditPresenter::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition) +{ + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->Show(); + } +} + +void +_EditPresenter::OnScrollStopped(Tizen::Ui::_Control& source) +{ + if (__pCopyPasteManager) + { + if (__needToCreateCopyPastePopup && !__pCopyPasteManager->GetCopyPastePopup()) + { + __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = false; + } + } + __pCopyPasteManager->Show(); + } +} + +_Window* +_EditPresenter::OnDragAndDropBeginning(void) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + result r = E_SUCCESS; + _Label* pLabel = null; + FloatDimension dragWindowDimension; + _ControlOrientation orientation = __pEdit->GetOrientation(); + + GET_SHAPE_CONFIG(EDIT::DRAG_AND_DROP_WINDOW_WIDTH, orientation, dragWindowDimension.width); + GET_SHAPE_CONFIG(EDIT::DRAG_AND_DROP_WINDOW_HEIGHT, orientation, dragWindowDimension.height); + + FloatRectangle bounds(__pressedAbsolutePoint.x-dragWindowDimension.width/2.0f, __pressedAbsolutePoint.y-dragWindowDimension.height/2.0f, dragWindowDimension.width, dragWindowDimension.height); + + _EditDragAndDropWindow* pDragWindow = new (std::nothrow) _EditDragAndDropWindow(); + SysTryReturn(NID_UI_CTRL, pDragWindow, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = pDragWindow->CreateRootVisualElement(_WINDOW_TYPE_SUB); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pDragWindow->SetBackgroundColor(Color(0, 0, 0, 0)); + pDragWindow->SetActivationEnabled(false); + pDragWindow->SetBounds(bounds); + + pLabel = _Label::CreateLabelN(); + SysTryCatch(NID_UI_CTRL, pLabel, , E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r)); + + pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); + pLabel->SetBounds(FloatRectangle(0, 0, bounds.width, bounds.height)); + pLabel->SetText(__dragAndDropString); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + + pDragWindow->AttachChild(*pLabel); + pDragWindow->SetLabel(pLabel); + + pDragWindow->Open(); + + __isCursorDisabled = true; + + DrawDragAndDropVisualCue(); + + return pDragWindow; + +CATCH: + delete pDragWindow; + + return null; +} + +void +_EditPresenter::OnDragAndDropDropping(void) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + _Window* pDragWindow = __pEdit->GetDragWindow(); + if (pDragWindow) + { + pDragWindow->Close(); + delete pDragWindow; + } + return; +} + +void +_EditPresenter::OnDragAndDropEntered(void) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + DrawDragAndDropVisualCue(); + + return; +} + +void +_EditPresenter::OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + if (IsViewModeEnabled()) + { + return; + } + + FloatRectangle clientBounds = __pEdit->GetBoundsF(); + clientBounds.x = 0.0f; + clientBounds.y = 0.0f; + if (clientBounds.Contains(position)) + { + int rowIndex; + int columnIndex; + FloatPoint touchPoint = position; + + if(!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + float totalHeight = __pTextObject->GetTotalHeightF(); + if (totalHeight < __textObjectBounds.height) + { + if (totalHeight < touchPoint.y) + { + touchPoint.y = totalHeight; + } + } + } + + int cursorPos = GetCursorPositionAt(touchPoint, rowIndex,columnIndex); + if (cursorPos != -1) + { + SetCursorPosition(cursorPos, rowIndex, columnIndex); + } + else + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false) + { + SetCursorPosition(GetTextLength()); + } + } + InitializeCursor(); + DrawDragAndDropVisualCue(); + } + return; +} + +void +_EditPresenter::OnDragAndDropLeft(void) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + __pDragAndDropCueVisualElement->SetShowState(false); + + return; +} + +void +_EditPresenter::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) +{ + SysLog(NID_UI_CTRL, "Drag & Drop Callback is called"); + + __pDragAndDropCueVisualElement->SetShowState(false); + + if (IsViewModeEnabled()) + { + return; + } + + if (IsUnsupportedChracterExist(GetKeypadStyle(), dragAndDropItem.GetData())) + { + return; + } + + if (!IsCurrentFocused()) + { + _Window* pWindow = null; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pWindow = pControlManager->GetCurrentFrame(); + if (pWindow) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool visible = pEcoreEvas->IsWindowVisible(*pWindow); + bool activationEnabled = pEcoreEvas->IsWindowActivationEnabled(*pWindow); + + if ((visible == true) && (activationEnabled == true)) + { + pEcoreEvas->ActivateWindow(*pWindow); + } + } + __pEdit->SetFocused(); + } + + InsertTextAt(__cursorPos, dragAndDropItem.GetData()); + DrawText(); + return; +} + +void +_EditPresenter::DrawDragAndDropVisualCue(void) +{ + if (IsViewModeEnabled()) + { + return; + } + + FloatRectangle cursorBounds; + if (CalculateCursorBounds(__textObjectBounds, cursorBounds) != E_SUCCESS) + { + return; + } + __pDragAndDropCueVisualElement->SetShowState(true); + __pDragAndDropCueVisualElement->SetBounds(cursorBounds); + + Canvas* pCanvas = __pDragAndDropCueVisualElement->GetCanvasN(); + if (pCanvas == null) + { + return; + } + pCanvas->SetBackgroundColor(Color(0)); + pCanvas->Clear(); + +// Color cursorColor; +// GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor); + + cursorBounds.SetPosition(0.0f, 0.0f); + pCanvas->FillRectangle(Color::GetColor(COLOR_ID_RED), cursorBounds); + + delete pCanvas; + + return; +} + +void +_EditPresenter::ResetDragAndDrop(void) +{ + __dragAndDropStarted = false; + __pEdit->DragAndDropDrop(); + if (!IsViewModeEnabled()) + { + __isCursorDisabled = false; + InitializeCursor(); + } + __pDragAndDropCueVisualElement->SetShowState(false); +} + +bool +_EditPresenter::IsDragAndDropStarted(void) const +{ + return __dragAndDropStarted; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditTime.cpp b/src/ui/controls/FUiCtrl_EditTime.cpp index 5dc4f68..d6cd978 100644 --- a/src/ui/controls/FUiCtrl_EditTime.cpp +++ b/src/ui/controls/FUiCtrl_EditTime.cpp @@ -56,6 +56,8 @@ _EditTime::_EditTime(void) , __pAccessibilityAmPmElement(null) , __isCalledBoundsChanged(false) , __isXmlBoundsExist(false) + , __pParentPanel(null) + , __isEnterKeyPressed(false) { } @@ -92,6 +94,11 @@ _EditTime::~_EditTime(void) __pAccessibilityAmPmElement->Activate(false); __pAccessibilityAmPmElement = null; } + + if (__pParentPanel != null) + { + __pParentPanel->RemoveScrollEventListener(*this); + } } _EditTime* @@ -101,7 +108,7 @@ _EditTime::CreateEditTimeN(const String& title) _AccessibilityContainer* pContainer = null; - _EditTime* pEditTime = new (std::nothrow) _EditTime; + _EditTime* pEditTime = new (std::nothrow) _EditTime(); SysTryReturn(NID_UI_CTRL, pEditTime, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pEditTime->GetVisualElement()->SetSurfaceOpaque(false); @@ -150,6 +157,8 @@ _EditTime::CreateDateTimeBar(void) r = GetLastResult(); SysTryReturn(NID_UI_CTRL, (__pDateTimeBar != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pDateTimeBar->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE); + r = __pDateTimeBar->AddActionEventListener(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -431,8 +440,8 @@ _EditTime::CalculateDateTimeBarPosition(void) SysTryReturn(NID_UI_CTRL, (pFrame != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get frame instance."); - frameBounds = pFrame->GetAbsoluteBoundsF(); - absoluteBounds = GetAbsoluteBoundsF(); + frameBounds = pFrame->GetAbsoluteBoundsF(true); + absoluteBounds = GetAbsoluteBoundsF(true); parentWindowBounds = GetParentWindowBounds(); titleBounds = __pEditTimePresenter->GetTitleBounds(); @@ -477,7 +486,7 @@ _EditTime::OnDraw(void) { if (GetDateTimeBar() != null) { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { @@ -506,7 +515,10 @@ _EditTime::CreateAccessibilityElement(void) pContainer->AddListener(*this); if (__pAccessibilityEditTimeElement == null) { - __pAccessibilityEditTimeElement = new _AccessibilityElement(true); + __pAccessibilityEditTimeElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityEditTimeElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pAccessibilityEditTimeElement->SetBounds(GetClientBoundsF()); __pAccessibilityEditTimeElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pAccessibilityEditTimeElement->SetName(L"EditTimeText"); @@ -515,23 +527,30 @@ _EditTime::CreateAccessibilityElement(void) if (__pAccessibilityHourElement == null && __pAccessibilityMinuteElement == null) { - String hintText(L"Double tap to edit"); + __pAccessibilityHourElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityHourElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - __pAccessibilityHourElement = new _AccessibilityElement(true); __pAccessibilityHourElement->SetBounds(hourBounds); __pAccessibilityHourElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC"); - __pAccessibilityHourElement->SetHint(hintText); + __pAccessibilityHourElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); pContainer->AddElement(*__pAccessibilityHourElement); - __pAccessibilityMinuteElement = new _AccessibilityElement(true); + __pAccessibilityMinuteElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityMinuteElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pAccessibilityMinuteElement->SetBounds(minuteBounds); __pAccessibilityMinuteElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC"); - __pAccessibilityMinuteElement->SetHint(hintText); + __pAccessibilityMinuteElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); pContainer->AddElement(*__pAccessibilityMinuteElement); if (!Is24HourNotationEnabled()) { - __pAccessibilityAmPmElement = new _AccessibilityElement(true); + __pAccessibilityAmPmElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityAmPmElement != null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pAccessibilityAmPmElement->SetBounds(ampmBounds); __pAccessibilityAmPmElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); pContainer->AddElement(*__pAccessibilityAmPmElement); @@ -574,6 +593,20 @@ _EditTime::OnBoundsChanged(void) __pAccessibilityAmPmElement->SetBounds(ampmBounds); } + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + CalculateDateTimeBarPosition(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + bounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(__pEditTimePresenter->GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + GetDateTimeBar()->CalculateArrowBounds(bounds); + GetDateTimeBar()->ChangeLayout(); + } + return; } @@ -591,12 +624,19 @@ _EditTime::OnChangeLayout(_ControlRotation rotation) } __pEditTimePresenter->Initialize(); - __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); - if (GetDateTimeBar() != null) + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { - GetDateTimeBar()->SetVisibleState(false); - GetDateTimeBar()->Close(); + CalculateDateTimeBarPosition(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + bounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(__pEditTimePresenter->GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + GetDateTimeBar()->CalculateArrowBounds(bounds); + GetDateTimeBar()->ChangeLayout(); } return; @@ -605,7 +645,7 @@ _EditTime::OnChangeLayout(_ControlRotation rotation) bool _EditTime::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { CalculateDateTimeBarPosition(); @@ -745,6 +785,7 @@ _EditTime::OnSettingChanged(String& key) if (GetDateTimeBar() != null) { GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); } @@ -778,7 +819,13 @@ _EditTime::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) { case _KEY_ENTER: { - FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __isEnterKeyPressed = true; + return true; + } if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) { @@ -792,7 +839,7 @@ _EditTime::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) } } - return __pEditTimePresenter->OnKeyReleased(source, keyInfo); + return __pEditTimePresenter->OnKeyReleased(source, keyCode); } bool @@ -881,6 +928,7 @@ _EditTime::OnAncestorVisibleStateChanged(const _Control& control) { if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); Invalidate(); @@ -895,6 +943,7 @@ _EditTime::OnAncestorEnableStateChanged(const _Control& control) { if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) { + GetDateTimeBar()->ClearPreviousText(); GetDateTimeBar()->Close(); __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); Invalidate(); @@ -1070,4 +1119,77 @@ _EditTime::OnAccessibilityValueDecreased(const _AccessibilityContainer&, const _ return false; } +// Tizen::Ui::Animations::IAnimationTransactionEventListener +void +_EditTime::OnAnimationTransactionStarted(int transactionId) +{ + return; +} + +void +_EditTime::OnAnimationTransactionStopped(int transactionId) +{ + __pEditTimePresenter->EndTransaction(); + return; +} + +void +_EditTime::OnAnimationTransactionFinished(int transactionId) +{ + __pEditTimePresenter->EndTransaction(); + return; +} + +void +_EditTime::InitializeParentPanel(void) +{ + if (__pParentPanel == null) + { + _ScrollPanel* pScrollPanel = null; + _Control* pControlCore = null; + + for (pControlCore = GetParent(); pScrollPanel == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + return; + } + + pScrollPanel = dynamic_cast<_ScrollPanel*>(pControlCore); + if (pScrollPanel) + { + __pParentPanel = pScrollPanel; + __pParentPanel->AddScrollEventListener(*this); + break; + } + } + } + + return; +} + +void +_EditTime::OnScrollStopped(Tizen::Ui::_Control& source) +{ + if (__isEnterKeyPressed) + { + CalculateDateTimeBarPosition(); + __pEditTimePresenter->OnKeyReleased(source, _KEY_ENTER); + __isEnterKeyPressed = false; + } +} + +void +_EditTime::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition) +{ + if (GetDateTimeBar()->IsActivated() && __pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + } +} + + }}} // Controls diff --git a/src/ui/controls/FUiCtrl_EditTimeImpl.cpp b/src/ui/controls/FUiCtrl_EditTimeImpl.cpp index de2a836..2705965 100644 --- a/src/ui/controls/FUiCtrl_EditTimeImpl.cpp +++ b/src/ui/controls/FUiCtrl_EditTimeImpl.cpp @@ -137,6 +137,7 @@ _EditTimeImpl::GetCore(void) result _EditTimeImpl::OnAttachedToMainTree(void) { + GetCore().InitializeParentPanel(); return _ControlImpl::OnAttachedToMainTree(); } @@ -392,11 +393,8 @@ protected: titleEnable = true; } - pEditTime = new (std::nothrow) EditTime; - if (pEditTime == null) - { - return null; - } + pEditTime = new (std::nothrow) EditTime(); + SysTryReturn(NID_UI_CTRL, pEditTime, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (titleEnable) { @@ -414,6 +412,8 @@ protected: return null; } + pEditTime->SetBounds(rect); + if (pControl->GetElement(L"b24HourNotationEnabled", elementString)) { if (elementString.Equals(L"true", false)) diff --git a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp index 2c12be0..cbb3ee9 100644 --- a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp @@ -21,19 +21,21 @@ */ #include +#include +#include +#include #include #include #include #include #include "FUi_CoordinateSystemUtils.h" #include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" #include "FUiCtrl_EditTimePresenter.h" #include "FUiCtrl_EditTime.h" #include "FUiCtrl_DateTimeModel.h" #include "FUiCtrl_DateTimeUtils.h" -#include "FUiAnim_VisualElement.h" -#include "FUiAnimVisualElementPropertyAnimation.h" -#include "FGrpColor.h" + using namespace Tizen::Graphics; using namespace Tizen::Base; @@ -87,6 +89,7 @@ _EditTimePresenter::_EditTimePresenter(const String& title) , __isEditTimeInitialized(false) , __isEnterKeyPressed(false) , __isFocused(false) + , __transactionId(0) { } @@ -145,6 +148,18 @@ _EditTimePresenter::~_EditTimePresenter(void) delete __pContentBgEffectDisabledBitmap; __pContentBgEffectDisabledBitmap = null; + + if (__transactionId != 0) + { + AnimationTransaction::Stop(__transactionId); + } + + if (__pContentProvider != null) + { + __pEditTime->GetVisualElement()->DetachChild(__pContentProvider); + __pContentProvider->Destroy(); + __pContentProvider = null; + } } _EditTimePresenter* @@ -155,7 +170,7 @@ _EditTimePresenter::CreateInstanceN(const _EditTime& editTime, const String& tit pEditTimePresenter->__pEditTime = const_cast <_EditTime*>(&editTime); - pEditTimePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel; + pEditTimePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel(); SysTryCatch(NID_UI_CTRL, pEditTimePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -419,6 +434,9 @@ _EditTimePresenter::GetTextWidth(_DateTimeId boxId) const (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + dateObject.AppendElement(*pSimpleText); dateObject.SetFont(__pFont, 0, dateObject.GetTextLength()); dim = dateObject.GetTextExtentF(0, dateObject.GetTextLength()); @@ -458,7 +476,7 @@ _EditTimePresenter::LoadResource(void) Color contentHighlightedColor; Color colonTextColor; Color colonTextDisabledColor; - Bitmap* pTempBitmap = null; + GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_NORMAL, buttonNormalBgColor); GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_PRESSED, buttonPressedColor); @@ -475,98 +493,36 @@ _EditTimePresenter::LoadResource(void) GET_SHAPE_CONFIG(EDITTIME::AMPM_FONT_SIZE, __pEditTime->GetOrientation(), __amPmTextSize); - r = GET_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, colonTextColor, __pColonColorReplacementBitmap); SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - __pColonColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), - colonTextColor); - SysTryCatch(NID_UI_CTRL, (__pColonColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - __pColonDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), - colonTextDisabledColor); - SysTryCatch(NID_UI_CTRL, (__pColonDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, colonTextDisabledColor, __pColonDisabledColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pAmPmBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalBgColor); - SysTryCatch(NID_UI_CTRL, (__pAmPmBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalBgColor, __pAmPmBgNormalColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pAmPmBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledBgColor); - SysTryCatch(NID_UI_CTRL, (__pAmPmBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledBgColor, __pAmPmBgDisabledColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pAmPmBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor); - SysTryCatch(NID_UI_CTRL, (__pAmPmBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pAmPmBgPressedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pAmPmBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonHighlightedColor); - SysTryCatch(NID_UI_CTRL, (__pAmPmBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonHighlightedColor, __pAmPmBgHighlightedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentNormalBgColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, contentNormalBgColor, __pContentBgNormalColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentPressedColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, contentPressedColor, __pContentBgPressedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentDisabledBgColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - delete pTempBitmap; - pTempBitmap = null; - - r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, contentDisabledBgColor, __pContentBgDisabledColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pContentBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); - SysTryCatch(NID_UI_CTRL, (__pContentBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(), - "[%s] Propagating.", GetErrorMessage(GetLastResult())); + r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, __pContentBgHighlightedColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmBgEffectNomralBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -586,15 +542,15 @@ _EditTimePresenter::LoadResource(void) r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectDisabledBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - delete pTempBitmap; - pTempBitmap = null; - return r; CATCH: - delete pTempBitmap; - pTempBitmap = null; + + delete __pColonColorReplacementBitmap; + __pColonColorReplacementBitmap = null; + + delete __pColonDisabledColorReplacementBitmap; + __pColonDisabledColorReplacementBitmap = null; delete __pAmPmBgNormalColorReplacementBitmap; __pAmPmBgNormalColorReplacementBitmap = null; @@ -648,7 +604,7 @@ CATCH: } result -_EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +_EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap) { result r = E_SUCCESS; @@ -664,7 +620,23 @@ _EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bou } else { - r = canvas.DrawBitmap(bounds, *pBitmap); + if (isCustomBitmap) + { + Canvas *pContentCanvas = __pEditTime->GetCanvasN(bounds); + SysTryReturnResult(NID_UI_CTRL, (pContentCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatPoint position; + + position.x = (bounds.width - pBitmap->GetWidthF()) / 2; + position.y = (bounds.height - pBitmap->GetHeightF()) / 2; + r = pContentCanvas->DrawBitmap(position, *pBitmap); + delete pContentCanvas; + } + else + { + r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *pBitmap); + } + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -747,6 +719,9 @@ _EditTimePresenter::InitializeTextObject(void) SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + __textObject.AppendElement(*pSimpleText); __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); @@ -768,7 +743,8 @@ _EditTimePresenter::Draw(void) } Canvas* pCanvas = __pEditTime->GetCanvasN(); - SysAssertf((pCanvas != null), "Failed to get canvas."); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Failed to get canvas."); FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -848,7 +824,7 @@ _EditTimePresenter::Draw(void) if (!__24hours) { - r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap); + r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap, isCustomBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); if (!isCustomBitmap) @@ -871,8 +847,9 @@ _EditTimePresenter::DrawFocus(void) { FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Canvas* pContentCanvas = null; Canvas* pCanvas = __pEditTime->GetCanvasN(); - SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas."); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); if (__focusId == DATETIME_ID_HOUR) { @@ -895,8 +872,15 @@ _EditTimePresenter::DrawFocus(void) } else { - r = pCanvas->DrawBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap); + pContentCanvas = __pEditTime->GetCanvasN(bounds); + SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds.x = (bounds.width - __pContentBgHighlightedColorReplacementBitmap->GetWidthF()) / 2; + bounds.y = (bounds.height - __pContentBgHighlightedColorReplacementBitmap->GetHeightF()) / 2; + + r = pContentCanvas->DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pContentBgHighlightedColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pContentCanvas; } delete pCanvas; @@ -904,6 +888,7 @@ _EditTimePresenter::DrawFocus(void) CATCH: delete pCanvas; + delete pContentCanvas; return r; } @@ -914,11 +899,13 @@ _EditTimePresenter::DrawColon(Canvas& canvas, const FloatRectangle& bounds) if (!__pEditTime->IsEnabled()) { - r = DrawResourceBitmap(canvas, bounds, __pColonDisabledColorReplacementBitmap); + r = canvas.DrawBitmap(bounds, *__pColonDisabledColorReplacementBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } else { - r = DrawResourceBitmap(canvas, bounds, __pColonColorReplacementBitmap); + r = canvas.DrawBitmap(bounds, *__pColonColorReplacementBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } return r; @@ -958,21 +945,11 @@ _EditTimePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& boun pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap; pEffectBitmap = __pContentBgEffectDisabledBitmap; } - else if (__selectedId != boxId) + else if (GetLastSelectedId() != boxId) { - if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated() && - (GetLastSelectedId() == boxId)) - { - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); - pReplacementBitmap = __pContentBgPressedColorReplacementBitmap; - pEffectBitmap = __pContentBgEffectPressedBitmap; - } - else - { - isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL); - pReplacementBitmap = __pContentBgNormalColorReplacementBitmap; - pEffectBitmap = __pContentBgEffectNormalBitmap; - } + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL); + pReplacementBitmap = __pContentBgNormalColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectNormalBitmap; } else { @@ -981,7 +958,7 @@ _EditTimePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& boun pEffectBitmap = __pContentBgEffectPressedBitmap; } - r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap); + r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); if (!isCustomBitmap) @@ -1016,30 +993,23 @@ _EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const { GET_COLOR_CONFIG(EDITTIME::TEXT_NORMAL, textColor); - if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated() && - (GetLastSelectedId() == boxId)) - { - GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor); - (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); - } - if (boxId == DATETIME_ID_AMPM) { - GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_NORMAL, textColor); - } - - if (boxId > -1 && boxId == __selectedId) - { - if (boxId == DATETIME_ID_AMPM) + if (boxId == __selectedId) { GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_PRESSED, textColor); } else { - GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor); - (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_NORMAL, textColor); } } + + else if (boxId > -1 && boxId == GetLastSelectedId()) + { + GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + } } if (boxId != DATETIME_ID_AMPM) @@ -1057,6 +1027,10 @@ _EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const __textObject.RemoveAll(); (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize); + + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + __textObject.AppendElement(*pSimpleText); if (boxId == DATETIME_ID_AMPM) @@ -1065,13 +1039,16 @@ _EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const } if (__isFocused && __focusId == boxId) { - if (boxId == DATETIME_ID_AMPM) + if (boxId != __selectedId) { - GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_HIGHLIGHTED, textColor); - } - else - { - GET_COLOR_CONFIG(EDITTIME::TEXT_HIGHLIGHTED, textColor); + if (boxId == DATETIME_ID_AMPM) + { + GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_HIGHLIGHTED, textColor); + } + else + { + GET_COLOR_CONFIG(EDITTIME::TEXT_HIGHLIGHTED, textColor); + } } DrawFocus(); @@ -1143,8 +1120,13 @@ _EditTimePresenter::SetFocusedElement() if (__isEnterKeyPressed) { __isEnterKeyPressed = false; - __isFocused = true; + + if (__pEditTime->IsFocusModeStateEnabled()) + { + __isFocused = true; + } } + if (__focusId == DATETIME_ID_NONE || __focusId == DATETIME_ID_AMPM) { __focusId = DATETIME_ID_HOUR; @@ -1166,6 +1148,7 @@ _EditTimePresenter::OnFocusLost(const _Control &source) if (!__isEnterKeyPressed || __focusId == DATETIME_ID_AMPM) { __focusId = DATETIME_ID_NONE; + __selectedId = DATETIME_ID_NONE; } __isFocused = false; __pEditTime->Invalidate(); @@ -1177,6 +1160,8 @@ _EditTimePresenter::OnFocusModeStateChanged(void) { __isFocused = false; __focusId = DATETIME_ID_NONE; + __isEnterKeyPressed = false; + __selectedId = DATETIME_ID_NONE; __pEditTime->Invalidate(); return; } @@ -1232,6 +1217,19 @@ _EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo __pEditTime->Invalidate(); break; } + case _KEY_ENTER: + { + if (__focusId == DATETIME_ID_AMPM) + { + __selectedId = DATETIME_ID_AMPM; + __pEditTime->Invalidate(); + } + else + { + return false; + } + break; + } default: { @@ -1242,17 +1240,16 @@ _EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo } bool -_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode) { if (!__isFocused) { return false; } - _KeyCode keyCode = keyInfo.GetKeyCode(); if (__isAnimating) { - VisualElement *pEditTimeElement = __pEditTime->GetVisualElement(); + VisualElement* pEditTimeElement = __pEditTime->GetVisualElement(); result r = GetLastResult(); SysTryReturn(NID_UI_CTRL, (pEditTimeElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); pEditTimeElement->RemoveAllAnimations(); @@ -1328,6 +1325,7 @@ _EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInf SetAmEnabled(!GetAmEnabled()); __pEditTime->FireTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); boxId = DATETIME_ID_AMPM; + __selectedId = DATETIME_ID_NONE; __pEditTime->Invalidate(); } @@ -1493,6 +1491,7 @@ _EditTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to { if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated()) { + __pEditTime->GetDateTimeBar()->ClearPreviousText(); __pEditTime->GetDateTimeBar()->CloseDateTimeBar(); } @@ -1526,6 +1525,7 @@ _EditTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to if (__pEditTime->GetDateTimeBar()->IsActivated()) { __pEditTime->GetDateTimeBar()->RemoveAllAnimations(); + __pEditTime->GetDateTimeBar()->ClearPreviousText(); __pEditTime->GetDateTimeBar()->Close(); __pEditTime->GetDateTimeBar()->SetVisibleState(true); __pEditTime->GetDateTimeBar()->Open(); @@ -1590,6 +1590,7 @@ _EditTimePresenter::UpdateLastSelectedValue(_DateTimeId boxId, bool isTouchPress if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated()) { __pEditTime->GetDateTimeBar()->SetVisibleState(false); + __pEditTime->GetDateTimeBar()->ClearPreviousText(); __pEditTime->GetDateTimeBar()->Close(); } } @@ -1608,6 +1609,7 @@ _EditTimePresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& to } __selectedId = DATETIME_ID_NONE; + __pEditTime->Invalidate(); return true; } @@ -1777,8 +1779,8 @@ _EditTimePresenter::Animate(void) VisualElement* pEditTimeElement = null; VisualElementPropertyAnimation* pNewBoundsAnimation = null; VisualElementPropertyAnimation* pOldBoundsAnimation = null; - Canvas *pCanvas = null; - Canvas *pContentCanvas = null; + Canvas* pCanvas = null; + Canvas* pContentCanvas = null; Color contentBgColor; Color textNormalColor; Color textPressedColor; @@ -1869,8 +1871,8 @@ _EditTimePresenter::Animate(void) pCanvas->Clear(); rect.x = 0.0f; rect.y = 0.0f; - r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap); isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); + r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap); if (!isCustomBitmap) { @@ -1906,7 +1908,6 @@ _EditTimePresenter::Animate(void) pNewBoundsAnimation->SetPropertyName("bounds.position"); pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height))); pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f))); - pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1915,11 +1916,13 @@ _EditTimePresenter::Animate(void) pOldBoundsAnimation->SetPropertyName("bounds.position"); pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f))); pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f))); - pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); pOldSimpleText = new (std::nothrow)TextSimple((const_cast (__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pOldSimpleText->SetTextShadowEnabled(true); + pOldSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + pCanvas = pOldVisualElement->GetCanvasN(); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1944,6 +1947,9 @@ _EditTimePresenter::Animate(void) pNewSimpleText = new (std::nothrow)TextSimple((const_cast (newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pNewSimpleText->SetTextShadowEnabled(true); + pNewSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + pCanvas = pNewVisualElement->GetCanvasN(); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1966,10 +1972,13 @@ _EditTimePresenter::Animate(void) pCanvas = null; pOldVisualElement->SetImplicitAnimationEnabled(false); - pOldVisualElement->AddAnimation(*pOldBoundsAnimation); - pNewVisualElement->SetImplicitAnimationEnabled(false); + + AnimationTransaction::Begin(__transactionId); + pOldVisualElement->AddAnimation(*pOldBoundsAnimation); pNewVisualElement->AddAnimation(*pNewBoundsAnimation); + AnimationTransaction::SetCurrentTransactionEventListener(__pEditTime); + AnimationTransaction::Commit(); delete pOldBoundsAnimation; delete pNewBoundsAnimation; @@ -2000,21 +2009,25 @@ CATCH: } void -_EditTimePresenter::OnVisualElementAnimationFinished (const VisualElementAnimation &animation, const String &keyName, VisualElement &target, bool completedNormally) +_EditTimePresenter::EndTransaction(void) { result r = E_SUCCESS; - __isAnimating = false; + __isAnimating = false; VisualElement* pEditTimeElement = __pEditTime->GetVisualElement(); r = GetLastResult(); SysTryReturnVoidResult(NID_UI_CTRL, (pEditTimeElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); - pEditTimeElement->DetachChild(*__pContentProvider); - __pContentProvider->Destroy(); - __pContentProvider = null; + if (__pContentProvider != null) + { + pEditTimeElement->DetachChild(*__pContentProvider); + __pContentProvider->Destroy(); + __pContentProvider = null; + + } Draw(); + __transactionId = 0; return; } - }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp b/src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp index 40082e6..be76edb 100644 --- a/src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp +++ b/src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp @@ -138,7 +138,7 @@ _ExpandableEditAreaEvent* _ExpandableEditAreaEvent::CreateInstanceN(const _Control& source) { _ExpandableEditAreaEvent* pCoreTextEvent = new (std::nothrow) _ExpandableEditAreaEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -175,7 +175,7 @@ _ExpandableEditAreaEvent::FireImpl(IEventListener& listener, const IEventArg& ar // cast to _CoreExpandableEditAreaEventArg const _CoreExpandableEditAreaEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pArg is null."); _ExpandableEditAreaEventStatus status = pArg->GetStatus(); if (status == _EXPANDABLE_EDITAREA_EVENT_ADDED) @@ -196,7 +196,7 @@ IEventArg* _ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int newLineCount) { _CoreExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _CoreExpandableEditAreaEventArg(status, newLineCount); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp index b7fb99c..3b82c85 100644 --- a/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp +++ b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp @@ -118,7 +118,7 @@ _ExpandableEditAreaImpl::CreateExpandableEditAreaImplFN(ExpandableEditArea* pCon result r = E_SUCCESS; r = FUNC_SIZE_INFO(ExpandableEditArea)().CheckInitialSizeValidF(FloatDimension(fRect.width, fRect.height), _CONTROL_ORIENTATION_PORTRAIT); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The given rect size is not valid."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[%s] Invalid argument is used. The given rect size is not valid.", GetErrorMessage(E_INVALID_ARG)); _Edit* pCore = null; if (style == EXPANDABLE_EDIT_AREA_STYLE_NORMAL) @@ -531,7 +531,7 @@ Color _ExpandableEditAreaImpl::GetTextColor(EditTextColor type) const { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, type != EDIT_TEXT_COLOR_LINK, Color(), E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The EditTextColor type is EDIT_TEXT_COLOR_LINK."); + SysTryReturn(NID_UI_CTRL, type != EDIT_TEXT_COLOR_LINK, Color(), E_INVALID_ARG, "[%s] Invalid argument is used. The EditTextColor type is EDIT_TEXT_COLOR_LINK.", GetErrorMessage(E_INVALID_ARG)); return __pExpandableEditArea->GetTextColor(type); } @@ -817,7 +817,7 @@ _ExpandableEditAreaImpl::InsertTextAt(int position, const String& text, const Bi _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported."); return __pExpandableEditArea->InsertTextAt(position, text, textImage); } @@ -829,7 +829,7 @@ _ExpandableEditAreaImpl::AppendText(const String& text, const Bitmap& textImage) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported."); return __pExpandableEditArea->AppendText(text, textImage); } @@ -913,8 +913,8 @@ _ExpandableEditAreaImpl::SetLineSpacing(int multiplier, int extra) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. multiplier = %d ", multiplier); - SysTryReturn(NID_UI_CTRL, extra >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. extra = %d ", extra); + SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. multiplier is negative. ", GetErrorMessage(E_INVALID_ARG)); + SysTryReturn(NID_UI_CTRL, extra >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. extra is negative ", GetErrorMessage(E_INVALID_ARG)); return __pExpandableEditArea->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra); } @@ -924,8 +924,8 @@ _ExpandableEditAreaImpl::SetLineSpacing(int multiplier, float extra) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. multiplier = %d ", multiplier); - SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. extra = %d ", extra); + SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. multiplier is negative. ", GetErrorMessage(E_INVALID_ARG)); + SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. extra is negative ", GetErrorMessage(E_INVALID_ARG)); return __pExpandableEditArea->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra); } @@ -953,7 +953,7 @@ _ExpandableEditAreaImpl::GetTokenColor(ExpandableEditAreaTokenStatus status) con _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); Variant var; switch (status) @@ -980,7 +980,7 @@ _ExpandableEditAreaImpl::SetTokenColor(ExpandableEditAreaTokenStatus status, con _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); Variant var(color); @@ -1008,7 +1008,7 @@ _ExpandableEditAreaImpl::GetTokenTextColor(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); Variant var = pTokenEdit->GetPropertyTokenTextColor(); @@ -1022,7 +1022,7 @@ _ExpandableEditAreaImpl::GetSelectedTokenTextColor(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); return pTokenEdit->GetSelectedTokenTextColor(); } @@ -1034,7 +1034,7 @@ _ExpandableEditAreaImpl::SetTokenTextColor(const Color& color) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); Variant var(color); @@ -1048,7 +1048,7 @@ _ExpandableEditAreaImpl::SetSelectedTokenTextColor(const Color& color) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); return pTokenEdit->SetSelectedTokenTextColor(color); } @@ -1204,7 +1204,7 @@ _ExpandableEditAreaImpl::SetTitleText(const String& title) ClearLastResult(); SysTryReturnResult(NID_UI_CTRL, (__pExpandableEditArea->GetEditStyle() & (EDIT_STYLE_TITLE_LEFT | EDIT_STYLE_TITLE_TOP)), - E_UNSUPPORTED_OPERATION, "The current title style cannot support this function.\n"); + E_UNSUPPORTED_OPERATION, "The current title style is not supported."); return __pExpandableEditArea->SetTitleText(title); } @@ -1268,7 +1268,7 @@ _ExpandableEditAreaImpl::GetTokenFilter(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, null, E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); return __pTokenFilter; } @@ -1280,7 +1280,7 @@ _ExpandableEditAreaImpl::SetTokenFilter(const ITokenFilter* pFilter) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); __pTokenFilter = const_cast (pFilter); @@ -1294,7 +1294,7 @@ _ExpandableEditAreaImpl::AppendToken(const String& token) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); return pTokenEdit->AppendToken(token); } @@ -1306,7 +1306,7 @@ _ExpandableEditAreaImpl::InsertTokenAt(int index, const String& token) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); return pTokenEdit->InsertTokenAt(index, token); } @@ -1318,7 +1318,7 @@ _ExpandableEditAreaImpl::GetTokenAt(int index) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, String(), E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); return pTokenEdit->GetTokenAt(index); } @@ -1330,7 +1330,7 @@ _ExpandableEditAreaImpl::GetTokenCount(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); return pTokenEdit->GetTokenCount(); } @@ -1342,7 +1342,7 @@ _ExpandableEditAreaImpl::GetSelectedTokenIndex(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); return pTokenEdit->GetSelectedTokenIndex(); } @@ -1354,7 +1354,7 @@ _ExpandableEditAreaImpl::IsTokenEditModeEnabled(void) const _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturn(NID_UI_CTRL, pTokenEdit != null, false, E_UNSUPPORTED_OPERATION, - "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); Variant var = pTokenEdit->GetPropertyTokenEditModeEnabled(); @@ -1368,7 +1368,7 @@ _ExpandableEditAreaImpl::RemoveTokenAt(int index) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); return pTokenEdit->RemoveTokenAt(index); } @@ -1380,7 +1380,7 @@ _ExpandableEditAreaImpl::SetTokenSelected(int index, bool selected) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); return pTokenEdit->SetTokenSelected(index, selected); } @@ -1392,7 +1392,7 @@ _ExpandableEditAreaImpl::SetTokenEditModeEnabled(bool enable) _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, - "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation."); + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); Variant var(enable); return pTokenEdit->SetPropertyTokenEditModeEnabled(var); diff --git a/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp b/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp index 8eb35d6..b110b04 100644 --- a/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp +++ b/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp @@ -333,6 +333,10 @@ _ExpandableListImpl::_ExpandableListImpl(Control* pList, _TableView* pCore) , __pClosedImage(null) , __pEffectClosedImage(null) , __pEffectOpenedImage(null) + , __pOpenedDisabledImage(null) + , __pClosedDisabledImage(null) + , __pOpenedPressedImage(null) + , __pClosedPressedImage(null) , __pItemProvider(null) , __directDelete(false) , __groupExpandStateList(DeleteExpandStateFlag) @@ -596,7 +600,6 @@ result _ExpandableListImpl::LoadArrowBitmap(void) { result r = E_SUCCESS; - Bitmap* pTempBitmap = null; Color normalColor; Color disabledColor; Color pressedColor; @@ -605,31 +608,58 @@ _ExpandableListImpl::LoadArrowBitmap(void) GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_DISABLED, disabledColor); GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_PRESSED, pressedColor); - r = GET_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow Bitmap"); - __pOpenedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor); - __pOpenedDisabledImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor); - __pOpenedPressedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedColor); + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, normalColor, __pOpenedImage); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating. Failed to fetch Arrow Bitmap.", GetErrorMessage(r)); - delete pTempBitmap; - pTempBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, disabledColor, __pOpenedDisabledImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Disabled Arrow Bitmap.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow Bitmap"); - __pClosedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor); - __pClosedDisabledImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor); - __pClosedPressedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedColor); + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pressedColor, __pOpenedPressedImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Pressed Arrow Bitmap.", GetErrorMessage(r)); - delete pTempBitmap; - pTempBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, normalColor, __pClosedImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow Bitmap.", GetErrorMessage(r)); + + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, disabledColor, __pClosedDisabledImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Disabled Arrow Bitmap.", GetErrorMessage(r)); + + r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pressedColor, __pClosedPressedImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Pressed Arrow Bitmap.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_CLOSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pEffectOpenedImage); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow effect Bitmap"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow effect Bitmap.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_OPENED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pEffectClosedImage); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow effect Bitmap"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow effect Bitmap.", GetErrorMessage(r)); return r; + +CATCH: + delete __pOpenedImage; + __pOpenedImage = null; + + delete __pOpenedDisabledImage; + __pOpenedDisabledImage = null; + + delete __pOpenedPressedImage; + __pOpenedPressedImage = null; + + delete __pClosedImage; + __pClosedImage = null; + + delete __pClosedDisabledImage; + __pClosedDisabledImage = null; + + delete __pClosedPressedImage; + __pClosedPressedImage = null; + + delete __pEffectOpenedImage; + __pEffectOpenedImage = null; + + delete __pEffectClosedImage; + __pEffectClosedImage = null; + + return r; } result @@ -682,7 +712,7 @@ _ExpandableListImpl::InsertItemAt(int mainIndex, const CustomListItem& item, int item.__pCustomListItemImpl->itemId = itemId; - Boolean* pIsExpanded = new Boolean(false); + Boolean* pIsExpanded = new (std::nothrow) Boolean(false); SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __groupExpandStateList.InsertAt(*pIsExpanded, mainIndex); @@ -1002,7 +1032,7 @@ _ExpandableListImpl::SetItemExpanded(int mainIndex, bool expand) { SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); - Boolean* pIsExpanded = new Boolean(expand); + Boolean* pIsExpanded = new (std::nothrow) Boolean(expand); SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __groupExpandStateList.SetAt(*pIsExpanded, mainIndex, true); @@ -1943,7 +1973,7 @@ void _ExpandableListImpl::ProcessItemStateChange(int mainIndex, int subIndex, ItemStatus itemStatus) { int itemId = -1; - if (subIndex == -1 ) + if (subIndex == -1) { itemId = GetItemIdAt(mainIndex); } diff --git a/src/ui/controls/FUiCtrl_FastScroll.cpp b/src/ui/controls/FUiCtrl_FastScroll.cpp index a7dbe49..7eb2b8a 100644 --- a/src/ui/controls/FUiCtrl_FastScroll.cpp +++ b/src/ui/controls/FUiCtrl_FastScroll.cpp @@ -100,7 +100,7 @@ _FastScroll::CreateFastScrollN(Tizen::Ui::_Control& parentCtrl, bool enableFadeE ClearLastResult(); _FastScroll* pFastScroll = new (std::nothrow) _FastScroll(); - SysTryReturn(NID_UI_CTRL, pFastScroll, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pFastScroll, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pFastScroll->Construct(parentCtrl, enableFadeEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -317,7 +317,7 @@ result _FastScroll::Construct(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect) { _FastScrollPresenter* pPresenter = _FastScrollPresenter::CreateFastScrollPresenterN(parentCtrl, *this, enableFadeEffect); - SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating."); SetPresenter(*pPresenter); diff --git a/src/ui/controls/FUiCtrl_FastScrollEvent.cpp b/src/ui/controls/FUiCtrl_FastScrollEvent.cpp index b19b25a..30ef661 100644 --- a/src/ui/controls/FUiCtrl_FastScrollEvent.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollEvent.cpp @@ -81,11 +81,11 @@ _FastScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { // cast to IFastScrollListener IFastScrollListener* pFastScrollListener = dynamic_cast (&listener); - SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[E_INVALID_ARG] Listener type is invalid."); + SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[%s] Invalid argument is used. Listener type is invalid.", GetErrorMessage(E_INVALID_ARG)); // cast to __FastScrollEventArg _FastScrollEventArg* pArg = (_FastScrollEventArg*) const_cast (&arg); - SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] Event argument type is invalid."); + SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[%s] Invalid argument is used. Event argument type is invalid.", GetErrorMessage(E_INVALID_ARG)); Tizen::Base::String index = pArg->GetIndex(); pFastScrollListener->OnFastScrollIndexSelected(*pArg->GetSource(), index); diff --git a/src/ui/controls/FUiCtrl_FastScrollIndex.cpp b/src/ui/controls/FUiCtrl_FastScrollIndex.cpp index d835743..fe7eacf 100644 --- a/src/ui/controls/FUiCtrl_FastScrollIndex.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollIndex.cpp @@ -25,7 +25,9 @@ #include #include "FUiCtrl_FastScrollIndex.h" +using namespace Tizen::Base; using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; namespace { @@ -75,7 +77,7 @@ _FastScrollIndex* _FastScrollIndex::CreateFastScrollIndexN(void) { _FastScrollIndex* pIndex = new (std::nothrow) _FastScrollIndex(); - SysTryReturn(NID_UI_CTRL, pIndex, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pIndex, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pIndex->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -90,14 +92,14 @@ CATCH: } result -_FastScrollIndex::SetIndexText(Tizen::Base::String* pText) +_FastScrollIndex::SetIndexText(String* pText) { delete __pText; __pText = null; if (pText) { - __pText = new (std::nothrow) Tizen::Base::String(*pText); + __pText = new (std::nothrow) String(*pText); SysTryReturnResult(NID_UI_CTRL, __pText, E_OUT_OF_MEMORY, "Memory allocation failed."); } @@ -110,21 +112,21 @@ _FastScrollIndex::SetIndexText(Tizen::Base::String* pText) return E_SUCCESS; } -Tizen::Base::String* +String* _FastScrollIndex::GetIndexText(void) const { return __pText; } result -_FastScrollIndex::SetIndexImage(Tizen::Graphics::Bitmap* pImage) +_FastScrollIndex::SetIndexImage(Bitmap* pImage) { delete __pImage; __pImage = null; if (pImage) { - __pImage = Tizen::Graphics::_BitmapImpl::CloneN(*pImage); + __pImage = _BitmapImpl::CloneN(*pImage); } // send the action to _IFastScrollIndexObserver @@ -136,7 +138,7 @@ _FastScrollIndex::SetIndexImage(Tizen::Graphics::Bitmap* pImage) return E_SUCCESS; } -Tizen::Graphics::Bitmap* +Bitmap* _FastScrollIndex::GetIndexImage(void) const { return __pImage; @@ -186,7 +188,7 @@ _FastScrollIndex::SetOmissionIndex(int indexCountMax) int i = 0; int j = 0; result r = E_SUCCESS; - Tizen::Base::String omissionText(L"."); + String omissionText(L"."); if ((indexCountMax > indexCountMin) && (indexCountMax % 2) == 0) { @@ -251,7 +253,7 @@ _FastScrollIndex::SetOmissionIndex(int indexCountMax) } _FastScrollIndex* -_FastScrollIndex::AddChildIndex(Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, ArrayList* pIndexList) +_FastScrollIndex::AddChildIndex(String* pText, Bitmap* pImage, ArrayList* pIndexList) { _FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN(); SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(), @@ -277,7 +279,7 @@ _FastScrollIndex::AddChildIndex(_FastScrollIndex* pChildIndex, ArrayList* pIndex } _FastScrollIndex* -_FastScrollIndex::AddChildIndex(int childOrder, Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, ArrayList* pIndexList) +_FastScrollIndex::AddChildIndex(int childOrder, String* pText, Bitmap* pImage, ArrayList* pIndexList) { _FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN(); SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(), @@ -299,7 +301,7 @@ CATCH: _FastScrollIndex* _FastScrollIndex::AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, ArrayList* pIndexList) { - SysTryReturn(NID_UI_CTRL, pChildIndex, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pChildIndex is null."); + SysTryReturn(NID_UI_CTRL, pChildIndex, null, E_INVALID_ARG, "[%s] Invalid argument is used. pChildIndex is null.", GetErrorMessage(E_INVALID_ARG)); ArrayList* pList = null; if (pIndexList) @@ -311,7 +313,7 @@ _FastScrollIndex::AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, A if (__pChildIndexList == null) { __pChildIndexList = new (std::nothrow) ArrayList(); - SysTryReturn(NID_UI_CTRL, __pChildIndexList, null, E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, __pChildIndexList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } pList = __pChildIndexList; @@ -342,9 +344,9 @@ _FastScrollIndex::AddOmissionChildIndex(_FastScrollIndex* pChildIndex) } SysTryReturnVoidResult(NID_UI_CTRL, pChildIndex, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument is used. pChildIndex is null."); + "[%s] Invalid argument is used. pChildIndex is null.", GetErrorMessage(E_INVALID_ARG)); SysTryReturnVoidResult(NID_UI_CTRL, __pChildIndexList, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument is used. pChildIndexList is null."); + "[%s] Invalid argument is used. pChildIndexList is null.", GetErrorMessage(E_INVALID_ARG)); __pChildIndexList->InsertAt(*pChildIndex, GetChildCount()); } @@ -354,9 +356,9 @@ _FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextInd { result r = E_SUCCESS; - Tizen::Base::String* indexText = null; + String* pIndexText = null; - wchar_t* pTempChar = new (std::nothrow) wchar_t[textLenth+1]; + wchar_t* pTempChar = new (std::nothrow) wchar_t[textLenth + 1]; SysTryReturnResult(NID_UI_CTRL, pTempChar, E_OUT_OF_MEMORY, "Memory allocation failed."); int i = 0; @@ -370,7 +372,7 @@ _FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextInd if (pFirstIndexList == null) { pFirstIndexList = new (std::nothrow) ArrayList(); - SysTryCatch(NID_UI_CTRL, pFirstIndexList, , E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pFirstIndexList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); SetCurrentIndexList(pFirstIndexList); } pChildIndexList = pFirstIndexList; @@ -379,22 +381,22 @@ _FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextInd { for (j = 0; j < textLenth; j++) { - pTempChar[j] = pTextIndexArray[(i*textLenth)+j]; + pTempChar[j] = pTextIndexArray[(i * textLenth) + j]; } pTempChar[j] = 0; - indexText = new (std::nothrow) Tizen::Base::String(pTempChar); - SysTryCatch(NID_UI_CTRL, indexText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - if (indexText->Equals(Tizen::Base::String(_DELIMITER))) + pIndexText = new (std::nothrow) String(pTempChar); + SysTryCatch(NID_UI_CTRL, pIndexText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + if (pIndexText->Equals(String(_DELIMITER))) { - delete indexText; - indexText = null; + delete pIndexText; + pIndexText = null; pFormerList = pChildIndexList; _FastScrollIndex* pFormerIndex = null; pChildIndexList = new (std::nothrow) ArrayList(); - SysTryCatchLabel(NID_UI_CTRL, pChildIndexList, , CATCH1, E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryCatchLabel(NID_UI_CTRL, pChildIndexList, , CATCH1, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); k = 0; pFormerIndex = GetChildIndex(GetChildCount(pFormerList) - 1, pFormerList); @@ -403,7 +405,7 @@ _FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextInd continue; } - pIndex = AddChildIndex(k, indexText, null, pChildIndexList); + pIndex = AddChildIndex(k, pIndexText, null, pChildIndexList); SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), "[%s] Failed to add child index.", GetErrorMessage(GetLastResult())); if (k == 0 && pFormerList) @@ -413,8 +415,8 @@ _FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextInd } k++; - delete indexText; - indexText = null; + delete pIndexText; + pIndexText = null; } if (pChildIndexList) @@ -472,8 +474,8 @@ CATCH1: pChildIndexList = null; CATCH: - delete indexText; - indexText = null; + delete pIndexText; + pIndexText = null; delete[] pTempChar; return r; diff --git a/src/ui/controls/FUiCtrl_FastScrollModel.cpp b/src/ui/controls/FUiCtrl_FastScrollModel.cpp index 2dcee48..aa4b641 100644 --- a/src/ui/controls/FUiCtrl_FastScrollModel.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollModel.cpp @@ -41,7 +41,7 @@ _FastScrollModel* _FastScrollModel::CreateFastScrollModelN(void) { _FastScrollModel* pModel = new (std::nothrow) _FastScrollModel(); - SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pModel->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp index 71860d8..ec869b0 100644 --- a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp @@ -115,7 +115,7 @@ _FastScrollViewConfig* _FastScrollViewConfig::CreateFastScrollViewConfigN(_ControlOrientation orientation) { _FastScrollViewConfig* pConfig = new (std::nothrow) _FastScrollViewConfig(); - SysTryReturn(NID_UI_CTRL, pConfig, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pConfig, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pConfig->Construct(orientation); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -136,98 +136,99 @@ _FastScrollViewConfig::ReloadConfig(_ControlOrientation orientation) // release allocated resources. ReleaseResources(); + // load color configuration + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_NORMAL, __indexBgColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_NORMAL, __indexLineColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_PRESSED, __indexSelectedLineColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_NORMAL, __indexTextColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_DIVIDER_NORMAL, __indexDividerColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_PRESSED, __selectedIndexBgColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_PRESSED, __selectedIndexTextColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_BG_NORMAL, __popupBgColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_TEXT_NORMAL, __popupTextColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + // load bitmap resources - r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pIndexBgBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __indexBgColor,__pIndexBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pSelectedIndexBgBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedIndexBgColor,__pSelectedIndexBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_LINE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pSelectedIndexlineBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_LINE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __indexSelectedLineColor,__pSelectedIndexlineBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pPopupBgBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __popupBgColor,__pPopupBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pPopupBgEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); // load shape configuration r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __indexSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __indexSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + __indexSizeMin = CoordinateSystem::AlignToDevice(__indexSizeMin); r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __indexMarginTop); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_LEFT_LINE_THICKNESS, _CONTROL_ORIENTATION_PORTRAIT, __indexLeftLineThickness); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __indexTextSize); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_FIXED_VALUE_CONFIG(FASTSCROLL::INDEX_SEPARATOR_THICKNESS, _CONTROL_ORIENTATION_PORTRAIT, __indexSeparatorThickness); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_SEPARATOR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __indexSeparatorWidth); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::SELECTED_INDEX_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __selectedIndexMarginRight); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::SELECTED_INDEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __selectedIndexHeight); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __popupSize.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __popupSize.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_WIDTH_INCREMENT, _CONTROL_ORIENTATION_PORTRAIT, __popupWidthIncrement); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __popupTextSize); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_RIGHT_SHADOW, _CONTROL_ORIENTATION_PORTRAIT, __popupShadowRight); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_BOTTOM_SHADOW, _CONTROL_ORIENTATION_PORTRAIT, __popupShadowBottom); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - - // load color configuration - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_NORMAL, __indexBgColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_NORMAL, __indexLineColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_PRESSED, __indexSelectedLineColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_NORMAL, __indexTextColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_DIVIDER_NORMAL, __indexDividerColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_PRESSED, __selectedIndexBgColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_PRESSED, __selectedIndexTextColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_BG_NORMAL, __popupBgColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); - - r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_TEXT_NORMAL, __popupTextColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; @@ -337,7 +338,7 @@ _FastScrollIndexView* _FastScrollIndexView::CreateFastScrollIndexViewN(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig) { _FastScrollIndexView* pIndexView = new (std::nothrow) _FastScrollIndexView(parentVe, viewConfig); - SysTryReturn(NID_UI_CTRL, pIndexView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pIndexView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pIndexView->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -425,10 +426,10 @@ _FastScrollIndexView::GetIndexBoundsF(void) const _FastScrollIndex* _FastScrollIndexView::GetIndexAtPoint(const FloatPoint& point) const { - SysTryReturn(NID_UI_CTRL, __pBaseIndex, null, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null."); + SysTryReturn(NID_UI_CTRL, __pBaseIndex, null, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType()); - SysTryReturn(NID_UI_CTRL, childCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children."); + SysTryReturn(NID_UI_CTRL, childCount > 0, null, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); _FastScrollIndex* pChildIndex = null; @@ -459,7 +460,7 @@ _FastScrollIndexView::GetOmissionIndexAtPoint(_FastScrollIndex* pIndex, const Fl FloatRectangle bounds = __pBaseIndexVe->GetBounds(); float touchY = point.y - bounds.y - __viewConfig.__indexMarginTop - (pIndex->GetIndexOrder(true) * GetIndexHeight()); int hiddenChildCount = pIndex->GetChildCount(); - SysTryReturn(NID_UI_CTRL, hiddenChildCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] Failed to get the hidden index"); + SysTryReturn(NID_UI_CTRL, hiddenChildCount > 0, null, E_INVALID_STATE, "[%s] Failed to get the hidden index", GetErrorMessage(E_INVALID_STATE)); float indexHeight = GetIndexHeight() /hiddenChildCount; int omissionIndexOrder = 0; @@ -578,8 +579,8 @@ _FastScrollIndexView::SelectIndexList(bool isNext) int _FastScrollIndexView::GetSelectedIndexOrder(void) const { - SysTryReturn(NID_UI_CTRL, __pBaseIndex, -1, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null."); - SysTryReturn(NID_UI_CTRL, __pSelectedIndex, -1, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndex must not be null."); + SysTryReturn(NID_UI_CTRL, __pBaseIndex, -1, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); + SysTryReturn(NID_UI_CTRL, __pSelectedIndex, -1, E_INVALID_STATE, "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); return __pBaseIndex->GetChildOrder(__pSelectedIndex, true); } @@ -701,7 +702,7 @@ _FastScrollIndexView::SetSelectedIndexVisibility(bool visibility, bool animation bool _FastScrollIndexView::GetSelectedIndexVisibility(void) const { - SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, false, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndexVe must not be null."); + SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, false, E_INVALID_STATE, "[%s] __pSelectedIndexVe must not be null.", GetErrorMessage(E_INVALID_STATE)); float opacity = __pSelectedIndexVe->GetOpacity(); if (opacity > FASTSCROLL_OPACITY_OFF) @@ -716,7 +717,7 @@ _FastScrollIndexView::GetSelectedIndexVisibility(void) const result _FastScrollIndexView::AddAccessibilityElement(const _AccessibilityContainer& control) { - SysTryReturnResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null."); + SysTryReturnResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "_pBaseIndex must not be null."); int omittedChildCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType()); SysTryReturnResult(NID_UI_CTRL, omittedChildCount > 0, E_INVALID_STATE, "The index has no children."); @@ -728,7 +729,7 @@ _FastScrollIndexView::AddAccessibilityElement(const _AccessibilityContainer& con _AccessibilityElement* pAccessibilityElement = null; result r = E_SUCCESS; - for (int i = 0; i < omittedChildCount; ) + for (int i = 0; i < omittedChildCount;) { _FastScrollIndex* pChildIndex = __pBaseIndex->GetChildIndex(i, true); SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index."); @@ -753,7 +754,7 @@ _FastScrollIndexView::AddAccessibilityElement(const _AccessibilityContainer& con pAccessibilityElement->SetBounds(indexRect); pAccessibilityElement->SetLabel(*pChildIndexText); pAccessibilityElement->SetName(L"FastScrollIndex"); - pAccessibilityElement->SetHint(L"double tap to move ," + *pChildIndexText + L", list"); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); r = pAccessibilityContainer->AddElement(*pAccessibilityElement); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add accessibility element.", GetErrorMessage(r)); } @@ -872,14 +873,14 @@ FloatRectangle _FastScrollIndexView::CalculateSelectedBg(void) { SysTryReturn(NID_UI_CTRL, __pBaseIndex, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, - "[E_INVALID_STATE] __pBaseIndex must not be null."); + "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, - "[E_INVALID_STATE] __pSelectedIndexVe must not be null."); + "[%s] __pSelectedIndexVe must not be null.", GetErrorMessage(E_INVALID_STATE)); SysTryReturn(NID_UI_CTRL, __pSelectedIndex, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, - "[E_INVALID_STATE] __pSelectedIndex must not be null."); + "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType()); - SysTryReturn(NID_UI_CTRL, childCount > 0, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, "[E_INVALID_STATE] The index has no children."); + SysTryReturn(NID_UI_CTRL, childCount > 0, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); FloatRectangle bounds = __pBaseIndexVe->GetBounds(); float indexHeight = GetIndexHeight(); @@ -918,11 +919,11 @@ _FastScrollIndexView::DrawBaseIndex() { return; } - SysTryReturnVoidResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); result r = E_SUCCESS; int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType()); - SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children."); + SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); Canvas* pCanvas = __pBaseIndexVe->GetCanvasN(); SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the index ve.", @@ -941,12 +942,7 @@ _FastScrollIndexView::DrawBaseIndex() FloatRectangle bgBounds(0.0f, 0.0f, bounds.width, bounds.height); if (__viewConfig.__pIndexBgBitmap) { - Bitmap* pReplacementColorBackgroundBitmap = - _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pIndexBgBitmap, - Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__indexBgColor); - DrawBitmap(*pCanvas, bgBounds, *pReplacementColorBackgroundBitmap); - - delete pReplacementColorBackgroundBitmap; + DrawBitmap(*pCanvas, bgBounds, *__viewConfig.__pIndexBgBitmap); } pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, bounds.height)); @@ -955,7 +951,7 @@ _FastScrollIndexView::DrawBaseIndex() float separatorX = indexRect.x + ((indexRect.width - __viewConfig.__indexSeparatorWidth)/2.0f); TextObject* pTextObject = new (std::nothrow) TextObject(); - SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pTextObject->Construct(); @@ -1004,12 +1000,12 @@ _FastScrollIndexView::DrawBaseIndex() else { String* pChildIndexText = pChildIndex->GetIndexText(); - SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "pChildIndexText must not be null."); + SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE)); pTextObject->RemoveAll(); pSimpleText = new (std::nothrow)TextSimple(const_cast(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); - SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed"); + SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simple text.", GetErrorMessage(r)); @@ -1060,7 +1056,7 @@ _FastScrollIndexView::DrawSelectedBg() } SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, - "[E_INVALID_STATE] __pSelectedIndex must not be null."); + "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); Canvas* pCanvas = __pSelectedBgVe->GetCanvasN(); SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the Selected Bg ve.", @@ -1074,13 +1070,7 @@ _FastScrollIndexView::DrawSelectedBg() if (__viewConfig.__pSelectedIndexBgBitmap) { - Bitmap* pReplacementColorBackgroundBitmap = null; - pReplacementColorBackgroundBitmap = - _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pSelectedIndexBgBitmap, - Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__selectedIndexBgColor); - DrawBitmap(*pCanvas, bounds, *pReplacementColorBackgroundBitmap); - - delete pReplacementColorBackgroundBitmap; + DrawBitmap(*pCanvas, bounds, *__viewConfig.__pSelectedIndexBgBitmap); } delete pCanvas; @@ -1094,7 +1084,7 @@ _FastScrollIndexView::DrawSelectedIndex() return; } - SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndex must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); Canvas* pCanvas = __pSelectedIndexVe->GetCanvasN(); SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the selected index ve.", @@ -1111,13 +1101,7 @@ _FastScrollIndexView::DrawSelectedIndex() if (__viewConfig.__pSelectedIndexlineBitmap) { - Bitmap* pReplacementColorBackgroundBitmap = null; - pReplacementColorBackgroundBitmap = - _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pSelectedIndexlineBitmap, - Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__indexSelectedLineColor); - DrawBitmap(*pCanvas, outlineBounds, *pReplacementColorBackgroundBitmap); - - delete pReplacementColorBackgroundBitmap; + DrawBitmap(*pCanvas, outlineBounds, *__viewConfig.__pSelectedIndexlineBitmap); pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, outlineBounds.y)); pCanvas->DrawLine(FloatPoint(1.0f, (outlineBounds.y + outlineBounds.height)), FloatPoint(1.0f, bounds.height)); @@ -1169,15 +1153,15 @@ _FastScrollIndexView::DrawSelectedIndex() else { String* pChildIndexText = __pSelectedIndex->GetIndexText(); - SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[E_INVALID_STATE] pChildIndexText must not be null."); + SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE)); pTextObject = new (std::nothrow) TextObject(); - SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pTextObject->Construct(); pSimpleText = new (std::nothrow)TextSimple(const_cast(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); - SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simpletext.", GetErrorMessage(r)); @@ -1253,7 +1237,7 @@ _FastScrollIndexView::Construct(void) // FormattedText for Title text __pBaseIndexVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pBaseIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pBaseIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pBaseIndexVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the index Ve.", GetErrorMessage(r)); @@ -1272,7 +1256,7 @@ _FastScrollIndexView::Construct(void) //__pSelectedBgVe __pSelectedBgVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pSelectedBgVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pSelectedBgVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pSelectedBgVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the selected Bg ve.", GetErrorMessage(r)); @@ -1293,7 +1277,7 @@ _FastScrollIndexView::Construct(void) //__pSelectedIndexVe __pSelectedIndexVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pSelectedIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pSelectedIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pSelectedIndexVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the selected index ve.", GetErrorMessage(r)); @@ -1373,7 +1357,7 @@ _FastScrollPopupView* _FastScrollPopupView::CreateFastScrollPopupViewN(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig) { _FastScrollPopupView* pPopupView = new (std::nothrow) _FastScrollPopupView(parentVe, viewConfig); - SysTryReturn(NID_UI_CTRL, pPopupView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pPopupView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pPopupView->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1459,7 +1443,7 @@ _FastScrollPopupView::AddPopupIndexVe(int indexLevel) { result r = E_SUCCESS; _VisualElement* pPopupIndexVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, pPopupIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pPopupIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPopupIndexVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the popup index ve.", GetErrorMessage(r)); @@ -1578,7 +1562,7 @@ _FastScrollPopupView::IsOnAnimation(void) const void _FastScrollPopupView::RemoveAllAnimations(void) { - SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE)); __pPopupVe->RemoveAllAnimations(); } @@ -1610,7 +1594,7 @@ _FastScrollPopupView::SetPopupVisibility(bool visibility) bool _FastScrollPopupView::GetPopupVisibility(void) const { - SysTryReturn(NID_UI_CTRL, __pPopupVe, false, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null."); + SysTryReturn(NID_UI_CTRL, __pPopupVe, false, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE)); float opacity = __pPopupVe->GetOpacity(); if (opacity > FASTSCROLL_OPACITY_OFF) @@ -1679,7 +1663,7 @@ _FastScrollPopupView::OnVisualElementAnimationRepeated(const VisualElementAnimat void _FastScrollPopupView::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) { - SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] The popup Ve must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] The popup Ve must not be null.", GetErrorMessage(E_INVALID_STATE)); if (__pPopupVe == (static_cast <_VisualElement*>(&target))) { if (__needDestroySelf && completedNormally) @@ -1710,7 +1694,7 @@ _FastScrollPopupView::DrawPopupVe(void) return; } - SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE)); Canvas* pCanvas = __pPopupVe->GetCanvasN(); SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the popup ve.", @@ -1730,12 +1714,7 @@ _FastScrollPopupView::DrawPopupVe(void) if (__viewConfig.__pPopupBgBitmap) { - Bitmap* pReplacementColorBackgroundBitmap = null; - pReplacementColorBackgroundBitmap = - _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pPopupBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__popupBgColor); - DrawBitmap(*pCanvas, bounds, *pReplacementColorBackgroundBitmap); - - delete pReplacementColorBackgroundBitmap; + DrawBitmap(*pCanvas, bounds, *__viewConfig.__pPopupBgBitmap); } delete pCanvas; @@ -1752,13 +1731,13 @@ _FastScrollPopupView::DrawPopupIndexVe(int indexLevel, const _FastScrollIndex* p return; } - SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] pBaseIndex must not be null."); - SysTryReturnVoidResult(NID_UI_CTRL, pSelectedIndex, E_INVALID_STATE, "[E_INVALID_STATE] pBaseIndex must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndex, E_INVALID_STATE, "[%s] pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); + SysTryReturnVoidResult(NID_UI_CTRL, pSelectedIndex, E_INVALID_STATE, "[%s] pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE)); result r = E_SUCCESS; int childCount = pBaseIndex->GetChildCount(); - SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children."); + SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); _VisualElement* pIndexVe = GetIndexVe(indexLevel); SysTryReturnVoidResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "[%s] Failed to get the popup index ve.", @@ -1785,7 +1764,7 @@ _FastScrollPopupView::DrawPopupIndexVe(int indexLevel, const _FastScrollIndex* p Bitmap* pReplacementColorBitmap = null; TextObject* pTextObject = new (std::nothrow) TextObject(); - SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pTextObject->Construct(); @@ -1838,12 +1817,12 @@ _FastScrollPopupView::DrawPopupIndexVe(int indexLevel, const _FastScrollIndex* p else { String* pChildIndexText = pChildIndex->GetIndexText(); - SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[E_INVALID_STATE] pChildIndexText must not be null."); + SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE)); pTextObject->RemoveAll(); pSimpleText = new (std::nothrow)TextSimple(const_cast(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); - SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simple text.", GetErrorMessage(r)); @@ -1920,7 +1899,7 @@ _FastScrollPopupView::Construct(void) result r = E_SUCCESS; __pPopupVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pPopupVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pPopupVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pPopupVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the popup ve.", GetErrorMessage(r)); @@ -2008,7 +1987,7 @@ _FastScrollPresenter* _FastScrollPresenter::CreateFastScrollPresenterN(_Control& parentCtrl, _FastScroll& fastScroll, bool enableFadeEffect, bool visibility) { _FastScrollPresenter* pPresenter = new (std::nothrow) _FastScrollPresenter(parentCtrl, fastScroll, enableFadeEffect, visibility); - SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pPresenter->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2235,7 +2214,7 @@ _FastScrollPresenter::AddFastScrollEventListener(const Controls::_IUiFastScrollL { __pFastScrollEvent = new (std::nothrow) _UiFastScrollEvent(); SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pFastScrollEvent->Construct(__fastScroll); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2250,7 +2229,7 @@ _FastScrollPresenter::RemoveFastScrollEventListener(const Controls::_IUiFastScro { result r = E_SUCCESS; - SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_INVALID_STATE, "[E_INVALID_STATE] __pFastScrollEvent must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_INVALID_STATE, "[%s] __pFastScrollEvent must not be null.", GetErrorMessage(E_INVALID_STATE)); r = __pFastScrollEvent->RemoveListener(listener); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2279,7 +2258,7 @@ _FastScrollPresenter::AddAccessibilityElement(const _AccessibilityContainer& con SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed."); pAccessibilityElement->SetBounds(pIndexView->GetIndexBounds()); - pAccessibilityElement->SetTrait(L"Fast scroll bar"); + pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_FAST_SCROLL_BAR_T_TTS"); pAccessibilityElement->SetName(L"FastScroll"); pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_ENABLE_FAST_SCROLLING_T_TTS"); r = pAccessibilityContainer->AddElement(*pAccessibilityElement); @@ -2779,7 +2758,7 @@ _FastScrollPresenter::RelayoutFastScrollChildren(void) _FastScrollIndex* pSelectedIndex = pIndexView->GetSelectedIndex(); if (pSelectedIndex && pSelectedIndex->GetOmitted()) { - pIndexView->SetSelectedIndex(null); + DeselectIndexViews(); } r = pIndex->RemoveOmissionChildren(false); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to remove omission index view", GetErrorMessage(r)); @@ -2810,7 +2789,7 @@ _FastScrollPresenter::SelectOnIndexViews(const FloatPoint& point, bool isPressed _FastScrollIndex* pSelectedIndex = null; int selectedIndexLevel = 0; int indexViewCount = GetIndexViewCount(); - SysTryReturn(NID_UI_CTRL, indexViewCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] The root index view is invalid state."); + SysTryReturn(NID_UI_CTRL, indexViewCount > 0, null, E_INVALID_STATE, "[%s] The root index view is in invalid state.", GetErrorMessage(E_INVALID_STATE)); // search the hit index on index views, then fade out other index views for (int i = 0; i < indexViewCount; i++) @@ -3021,7 +3000,7 @@ _FastScrollPresenter::SetPopupIndex(_FastScrollIndex& popupIndex, const FloatPoi SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the popup index ve."); _FastScrollIndex* pFormerIndex = null; - if ( i == __focusedIndexLevel ) + if (i == __focusedIndexLevel) { pFormerIndex = pIndexView->GetFormerIndex(); r = __pPopupView->SelectIndex(i, &popupIndex, pFormerIndex); @@ -3175,7 +3154,7 @@ _FastScrollPresenter::AddIndexView(int indexLevel, _FastScrollIndex& baseIndex) { result r = E_SUCCESS; - _FastScrollIndexView* pNewIndexView = _FastScrollIndexView::CreateFastScrollIndexViewN( *__pCtrlVe, *__pViewConfig); + _FastScrollIndexView* pNewIndexView = _FastScrollIndexView::CreateFastScrollIndexViewN(*__pCtrlVe, *__pViewConfig); SysTryReturnResult(NID_UI_CTRL, pNewIndexView, GetLastResult(), "Propagating."); r = __fastScroll.SetBounds(CalculateFastScrollBounds(GetIndexViewCount() + 1)); diff --git a/src/ui/controls/FUiCtrl_FooterImpl.cpp b/src/ui/controls/FUiCtrl_FooterImpl.cpp index 51031cd..9fce59d 100644 --- a/src/ui/controls/FUiCtrl_FooterImpl.cpp +++ b/src/ui/controls/FUiCtrl_FooterImpl.cpp @@ -141,18 +141,14 @@ _FooterImpl::GetInstance(Footer& footer) result _FooterImpl::AddItem(const FooterItem& item) { - SysTryReturnResult(NID_UI_CTRL, (__style >= FOOTER_STYLE_BUTTON_TEXT && __style <= FOOTER_MAX_STATE_COUNT), - E_INVALID_OPERATION, "[E_INVALID_OPERATION] Current Footer style doesn't support this operation."); - - SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() <= FOOTER_ITEM_ACTION_ID_MAX && item.GetActionId() >= FOOTER_ACTION_ID_MIN), - E_INVALID_ARG, "[E_INVALID_ARG] The item isn't constructed."); - result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - if (IsFailed(r)) - { - return r; - } + r = CheckItemExceed(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SysTryReturnResult(NID_UI_CTRL, (__style >= FOOTER_STYLE_BUTTON_TEXT && __style <= FOOTER_MAX_STATE_COUNT), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] Current Footer style doesn't support this operation."); _Button* pButton = ConvertFooterItem(item); @@ -276,11 +272,10 @@ result _FooterImpl::InsertItemAt(int itemIndex, const FooterItem& item) { result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - if (IsFailed(r)) - { - return r; - } + r = CheckItemExceed(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); int count = GetItemCount(); @@ -380,12 +375,15 @@ _FooterImpl::SetBackgroundBitmap(const Bitmap* pBitmap) result _FooterImpl::SetButton(ButtonPosition position, const ButtonItem& button) { - SysTryReturnResult(NID_UI_CTRL, !(__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE), - E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the button item because the current style does not support it."); + SysTryReturnResult(NID_UI_CTRL, _ButtonItemImpl::GetInstance(button) != null, + E_INVALID_ARG, "[E_INVALID_ARG] The ButtonItem isn't constructed."); - SysTryReturnResult(NID_UI_CTRL, (button.GetActionId() >= FOOTER_ACTION_ID_MIN && button.GetActionId() <= FOOTER_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, button.GetActionId() >= FOOTER_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + SysTryReturnResult(NID_UI_CTRL, !(__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the button item because the current style does not support it."); + int count = GetItemCount(); if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT @@ -437,13 +435,8 @@ _FooterImpl::SetBackButton(void) result _FooterImpl::SetItemAt(int itemIndex, const FooterItem& item) { - SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The FooterItem isn't constructed."); - - if (item.GetActionId() < FOOTER_ACTION_ID_MIN || item.GetActionId() > FOOTER_ACTION_ID_MAX) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); - return E_INVALID_ARG; - } + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); int count = GetItemCount(); @@ -711,8 +704,19 @@ _FooterImpl::CheckItemValidate(const FooterItem& item) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, - "[E_INVALID_ARG] The FooterItem isn't constructed."); + SysTryReturnResult(NID_UI_CTRL, _FooterItemImpl::GetInstance(item) != null, + E_INVALID_ARG, "[E_INVALID_ARG] The FooterItem isn't constructed."); + + SysTryReturnResult(NID_UI_CTRL, item.GetActionId() >= FOOTER_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + return r; +} + +result +_FooterImpl::CheckItemExceed(const FooterItem& item) +{ + result r = E_SUCCESS; int count = GetItemCount(); @@ -764,12 +768,6 @@ _FooterImpl::CheckItemValidate(const FooterItem& item) "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); } - if (item.GetActionId() < FOOTER_ACTION_ID_MIN || item.GetActionId() > FOOTER_ACTION_ID_MAX) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); - return E_INVALID_ARG; - } - return r; } diff --git a/src/ui/controls/FUiCtrl_FooterItemImpl.cpp b/src/ui/controls/FUiCtrl_FooterItemImpl.cpp index f52fabd..380ea1d 100644 --- a/src/ui/controls/FUiCtrl_FooterItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_FooterItemImpl.cpp @@ -64,7 +64,7 @@ _FooterItemImpl::GetInstance(FooterItem& footerItem) result _FooterItemImpl::Construct(int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; @@ -120,7 +120,7 @@ _FooterItemImpl::GetText(void) const result _FooterItemImpl::SetActionId(int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp index 9b1a18a..0e570ab 100644 --- a/src/ui/controls/FUiCtrl_Form.cpp +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -66,6 +66,7 @@ _Form::_Form(void) , __pFormBackEventListener(null) , __pFormMenuEventListener(null) , __formStyle(0) + , __oldFormStyle(0) , __pActionEvent(null) , __pHeader(null) , __pFooter(null) @@ -293,7 +294,7 @@ _Form::CreateFormN(void) { _Form* pForm = null; - pForm = new (std::nothrow) _Form; + pForm = new (std::nothrow) _Form(); SysTryReturn(NID_UI_CTRL, pForm, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); @@ -570,7 +571,6 @@ _Form::MoveOverlayRegion(bool top) void _Form::CreateSoftkey(unsigned long formStyle) { - Bitmap* pTempBitmap = null; FloatDimension softkeyDimension(0.0f, 0.0f); FloatDimension softkeyDisplayDimension(0.0f, 0.0f); FloatDimension optionkeyDimension(0.0f, 0.0f); @@ -628,129 +628,100 @@ _Form::CreateSoftkey(unsigned long formStyle) if (formStyle & FORM_STYLE_SOFTKEY_0) { - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalBitmap[_SOFTKEY_0]) { delete __pSoftkeyNormalBitmap[_SOFTKEY_0]; __pSoftkeyNormalBitmap[_SOFTKEY_0] = null; } - __pSoftkeyNormalBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyDisabledBitmap[_SOFTKEY_0]) { delete __pSoftkeyDisabledBitmap[_SOFTKEY_0]; __pSoftkeyDisabledBitmap[_SOFTKEY_0] = null; } - __pSoftkeyDisabledBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedBitmap[_SOFTKEY_0]) { delete __pSoftkeyPressedBitmap[_SOFTKEY_0]; __pSoftkeyPressedBitmap[_SOFTKEY_0] = null; } - __pSoftkeyPressedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyHighlightedBitmap[_SOFTKEY_0]) { delete __pSoftkeyHighlightedBitmap[_SOFTKEY_0]; __pSoftkeyHighlightedBitmap[_SOFTKEY_0] = null; } - __pSoftkeyHighlightedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor); - delete pTempBitmap; - - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyNormalBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyNormalBitmap[_SOFTKEY_0]; __pTextSoftkeyNormalBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyNormalBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyDisabledBitmap[_SOFTKEY_0]; __pTextSoftkeyDisabledBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyDisabledBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pTextSoftkeyDisabledBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyPressedBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyPressedBitmap[_SOFTKEY_0]; __pTextSoftkeyPressedBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyPressedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]; __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_0]) { delete __pSoftkeyNormalEffectBitmap[_SOFTKEY_0]; __pSoftkeyNormalEffectBitmap[_SOFTKEY_0] = null; } - __pSoftkeyNormalEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]; __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_0]) { delete __pSoftkeyPressedEffectBitmap[_SOFTKEY_0]; __pSoftkeyPressedEffectBitmap[_SOFTKEY_0] = null; } - __pSoftkeyPressedEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]) { delete __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]; __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0] = null; } - __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalIcon[_SOFTKEY_0]) @@ -758,10 +729,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyNormalIcon[_SOFTKEY_0]; __pSoftkeyNormalIcon[_SOFTKEY_0] = null; } - __pSoftkeyNormalIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyDisabledIcon[_SOFTKEY_0]) @@ -769,10 +737,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyDisabledIcon[_SOFTKEY_0]; __pSoftkeyDisabledIcon[_SOFTKEY_0] = null; } - __pSoftkeyDisabledIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyPressedIcon[_SOFTKEY_0]) @@ -780,10 +745,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyPressedIcon[_SOFTKEY_0]; __pSoftkeyPressedIcon[_SOFTKEY_0] = null; } - __pSoftkeyPressedIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[_SOFTKEY_0]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyHighlightedIcon[_SOFTKEY_0]) @@ -791,8 +753,8 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyHighlightedIcon[_SOFTKEY_0]; __pSoftkeyHighlightedIcon[_SOFTKEY_0] = null; } - __pSoftkeyHighlightedIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor); - delete pTempBitmap; + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[_SOFTKEY_0]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); _Button* pButton = _Button::CreateButtonN(); @@ -812,128 +774,100 @@ _Form::CreateSoftkey(unsigned long formStyle) if (formStyle & FORM_STYLE_SOFTKEY_1) { - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalBitmap[_SOFTKEY_1]) { delete __pSoftkeyNormalBitmap[_SOFTKEY_1]; __pSoftkeyNormalBitmap[_SOFTKEY_1] = null; } - __pSoftkeyNormalBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyDisabledBitmap[_SOFTKEY_1]) { delete __pSoftkeyDisabledBitmap[_SOFTKEY_1]; __pSoftkeyDisabledBitmap[_SOFTKEY_1] = null; } - __pSoftkeyDisabledBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedBitmap[_SOFTKEY_1]) { delete __pSoftkeyPressedBitmap[_SOFTKEY_1]; __pSoftkeyPressedBitmap[_SOFTKEY_1] = null; } - __pSoftkeyPressedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyHighlightedBitmap[_SOFTKEY_1]) { delete __pSoftkeyHighlightedBitmap[_SOFTKEY_1]; __pSoftkeyHighlightedBitmap[_SOFTKEY_1] = null; } - __pSoftkeyHighlightedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyNormalBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyNormalBitmap[_SOFTKEY_1]; __pTextSoftkeyNormalBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyNormalBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyDisabledBitmap[_SOFTKEY_1]; __pTextSoftkeyDisabledBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyDisabledBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pTextSoftkeyDisabledBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyPressedBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyPressedBitmap[_SOFTKEY_1]; __pTextSoftkeyPressedBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyPressedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]; __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_1]) { delete __pSoftkeyNormalEffectBitmap[_SOFTKEY_1]; __pSoftkeyNormalEffectBitmap[_SOFTKEY_1] = null; } - __pSoftkeyNormalEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]; __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_1]) { delete __pSoftkeyPressedEffectBitmap[_SOFTKEY_1]; __pSoftkeyPressedEffectBitmap[_SOFTKEY_1] = null; } - __pSoftkeyPressedEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]) { delete __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]; __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1] = null; } - __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalIcon[_SOFTKEY_1]) @@ -941,10 +875,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyNormalIcon[_SOFTKEY_1]; __pSoftkeyNormalIcon[_SOFTKEY_1] = null; } - __pSoftkeyNormalIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyDisabledIcon[_SOFTKEY_1]) @@ -952,10 +883,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyDisabledIcon[_SOFTKEY_1]; __pSoftkeyDisabledIcon[_SOFTKEY_1] = null; } - __pSoftkeyDisabledIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyPressedIcon[_SOFTKEY_1]) @@ -963,10 +891,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyPressedIcon[_SOFTKEY_1]; __pSoftkeyPressedIcon[_SOFTKEY_1] = null; } - __pSoftkeyPressedIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[_SOFTKEY_1]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyHighlightedIcon[_SOFTKEY_1]) @@ -974,8 +899,8 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyHighlightedIcon[_SOFTKEY_1]; __pSoftkeyHighlightedIcon[_SOFTKEY_1] = null; } - __pSoftkeyHighlightedIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor); - delete pTempBitmap; + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[_SOFTKEY_1]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); _Button* pButton = _Button::CreateButtonN(); if (pButton) @@ -994,67 +919,52 @@ _Form::CreateSoftkey(unsigned long formStyle) if (formStyle & FORM_STYLE_OPTIONKEY) { - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyNormalBitmap[SOFTKEY_COUNT]; __pSoftkeyNormalBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyNormalBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyDisabledBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyDisabledBitmap[SOFTKEY_COUNT]; __pSoftkeyDisabledBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyDisabledBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyPressedBitmap[SOFTKEY_COUNT]; __pSoftkeyPressedBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyPressedBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]; __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]; __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]) { delete __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]; __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT] = null; } - __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyNormalIcon[SOFTKEY_COUNT]) @@ -1062,10 +972,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyNormalIcon[SOFTKEY_COUNT]; __pSoftkeyNormalIcon[SOFTKEY_COUNT] = null; } - __pSoftkeyNormalIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyDisabledIcon[SOFTKEY_COUNT]) @@ -1073,10 +980,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyDisabledIcon[SOFTKEY_COUNT]; __pSoftkeyDisabledIcon[SOFTKEY_COUNT] = null; } - __pSoftkeyDisabledIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyPressedIcon[SOFTKEY_COUNT]) @@ -1084,10 +988,7 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyPressedIcon[SOFTKEY_COUNT]; __pSoftkeyPressedIcon[SOFTKEY_COUNT] = null; } - __pSoftkeyPressedIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor); - delete pTempBitmap; - - r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[SOFTKEY_COUNT]); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); if (__pSoftkeyHighlightedIcon[SOFTKEY_COUNT]) @@ -1095,8 +996,8 @@ _Form::CreateSoftkey(unsigned long formStyle) delete __pSoftkeyHighlightedIcon[SOFTKEY_COUNT]; __pSoftkeyHighlightedIcon[SOFTKEY_COUNT] = null; } - __pSoftkeyHighlightedIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor); - delete pTempBitmap; + r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[SOFTKEY_COUNT]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); _Button* pButton = _Button::CreateButtonN(); if (pButton) @@ -2510,24 +2411,6 @@ _Form::SetFooterBounds(Rectangle& bounds) } bool -_Form::OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo) -{ - return false; -} - -bool -_Form::OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo) -{ - _Toolbar* pToolbar = GetFooter(); - if (pToolbar == null) - { - return null; - } - - return true; -} - -bool _Form::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { return false; @@ -2538,50 +2421,21 @@ _Form::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { if (keyInfo.GetKeyCode() == _KEY_ESC || keyInfo.GetKeyCode() == _KEY_BACK) { -// _Toolbar* pToolbar = GetFooter(); -// if (pToolbar == null) -// { -// return null; -// } - -// if (pToolbar->IsButtonSet(BACK_BUTTON)) -// { - { - void* pData = GetUserData(); - if (pData) - { - _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); - pDataImpl->OnFormBackRequested(*this); - } - } -// } -// { -// void* pData = GetUserData(); -// if (pData) -// { -// _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); -// pDataImpl->OnFormBackButtonRequested(*this); -// } -// } - - + void* pData = GetUserData(); + if (pData) + { + _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); + pDataImpl->OnFormBackRequested(*this); + } return false; } if (keyInfo.GetKeyCode() == _KEY_CONTEXT_MENU || keyInfo.GetKeyCode() == _KEY_MENU) { -// _Toolbar* pToolbar = GetFooter(); -// if (pToolbar == null) -// { -// return null; -// } - + void* pData = GetUserData(); + if (pData) { - void* pData = GetUserData(); - if (pData) - { - _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); - pDataImpl->OnFormMenuRequested(*this); - } + _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); + pDataImpl->OnFormMenuRequested(*this); } return false; @@ -2838,7 +2692,7 @@ _Form::GetIndicatorBounds(void) const { if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) { - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight); + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); } } @@ -2881,7 +2735,7 @@ _Form::GetIndicatorBoundsF(void) const { if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) { - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight); + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); } } @@ -3101,7 +2955,17 @@ _Form::AttachedToMainTree(void) FrameShowMode mode = pFrame->GetShowMode(); if (mode != FRAME_SHOW_MODE_FULL_SCREEN) { - SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height)); + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height)); + } + } + else + { + SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height)); + } } } @@ -3305,21 +3169,11 @@ _Form::OnBoundsChanged(void) float indicatorheight = 0.0f; - if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) - { - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - } - else - { - if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) - { - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - } - } + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - if (__pIndicator) + if (__pIndicator && (indicatorheight > 0)) { - __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); } AdjustClientBounds(); @@ -3370,7 +3224,7 @@ _Form::OnBoundsChanged(void) } FloatDimension -_Form::TranslateSize(FloatDimension size ) const +_Form::TranslateSize(FloatDimension size) const { FloatDimension returnSize(0.0f, 0.0f); returnSize = CoordinateSystem::AlignToDevice(size); @@ -3600,6 +3454,11 @@ _Form::OnVisibleStateChanged(void) } } } + ActivateIndicator(); + } + else + { + DeactivateIndicator(); } AdjustClientBounds(); } @@ -3636,6 +3495,92 @@ void _Form::OnFormActivated(void) { AddIndicatorObject(); + + if (__pOverlayerRegionImplArray == null) + { + return; + } + + for (int i = 0; i < OverlayRegion::GetMaxCount(); i++) + { + if (__pOverlayerRegionImplArray[i] != null) + { + __pOverlayerRegionImplArray[i]->SetShowState(true); + } + } + +} + +void +_Form::OnFormDeactivated(void) +{ +} + +void +_Form::ActivateIndicator(void) +{ + if (__pIndicator) + { + __pIndicator->Activate(); + } + + return; +} + +void +_Form::DeactivateIndicator(void) +{ + if (__pIndicator) + { + __pIndicator->Deactivate(); + } + + return; +} + +void +_Form::SetPartialScreenEnabled(bool enable) +{ + int formstyle = GetFormStyle(); + + SysLog(NID_UI_CTRL, "[WM ROTATION]

[0x%x] FORM prev 0x%x, enable %d", this, formstyle, enable); + + _FormImpl* pDataImpl = static_cast<_FormImpl*>(GetUserData()); + if (pDataImpl) + { + if (enable) + { + if (formstyle & _FORM_STYLE_INDICATOR) + { + formstyle = formstyle & (~_FORM_STYLE_INDICATOR); + __oldFormStyle |= _FORM_STYLE_INDICATOR; + } + if (formstyle & _FORM_STYLE_INDICATOR_AUTO_HIDE) + { + formstyle = formstyle & (~_FORM_STYLE_INDICATOR_AUTO_HIDE); + __oldFormStyle |= _FORM_STYLE_INDICATOR_AUTO_HIDE; + } + if (formstyle & _FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) + { + formstyle = formstyle & (~_FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE); + __oldFormStyle |= _FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE; + } + + SysLog(NID_UI_CTRL, "[WM ROTATION]

[0x%x] FORM backup 0x%x, cur 0x%x", this, __oldFormStyle, formstyle); + + pDataImpl->SetFormStyle(formstyle); + } + else + { + unsigned long style = GetFormStyle(); + style |= __oldFormStyle; + + SysLog(NID_UI_CTRL, "[WM ROTATION]

[0x%x] FORM backup 0x%x, cur 0x%x", this, __oldFormStyle, style); + + pDataImpl->SetFormStyle(style); + __oldFormStyle = 0; + } + } } diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp old mode 100755 new mode 100644 index 4e6c69c..28657a0 --- a/src/ui/controls/FUiCtrl_FormImpl.cpp +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -27,6 +27,7 @@ #include #include #include +#include "FUi_UiEventManager.h" #include "FUi_LayoutImpl.h" #include "FUi_LayoutLayoutMaker.h" #include "FUi_EcoreEvasMgr.h" @@ -417,6 +418,26 @@ _FormImpl::SetFormStyle(unsigned long formStyle) GetCore().SetFormBackEventListener(this); } + else + { + if (GetCore().IsIndicatorTranslucent()) + { + if (!GetCore().IsHeaderTranslucent()) + { + indicatorBounds.height = 0.0f; + } + else + { + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + } + } + + FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true)); + GetCore().SetHeaderBounds(bounds); + } } else if (formStyle & FORM_STYLE_TITLE) { @@ -434,6 +455,11 @@ _FormImpl::SetFormStyle(unsigned long formStyle) r = GetCore().AttachSystemChild(pHeader->GetCore()); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } + else + { + FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true)); + GetCore().SetHeaderBounds(bounds); + } } else { @@ -458,6 +484,11 @@ _FormImpl::SetFormStyle(unsigned long formStyle) } } + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + if (!pTabImpl) { pTabImpl = CreateTabImplN(); @@ -474,6 +505,13 @@ _FormImpl::SetFormStyle(unsigned long formStyle) r = GetCore().AttachSystemChild(pTabImpl->GetCore()); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } + else + { + float posY = indicatorBounds.height + titleHeight; + + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); + } GetCore().SetTabStyle(_TAB_STYLE_TEXT); } else if (formStyle & FORM_STYLE_ICON_TAB) @@ -504,6 +542,13 @@ _FormImpl::SetFormStyle(unsigned long formStyle) r = GetCore().AttachSystemChild(pTabImpl->GetCore()); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } + else + { + float posY = indicatorBounds.height + titleHeight; + + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); + } GetCore().SetTabStyle(_TAB_STYLE_ICON); } else @@ -537,6 +582,13 @@ _FormImpl::SetFormStyle(unsigned long formStyle) GetCore().SetFormBackEventListener(this); GetCore().SetFormMenuEventListener(this); } + else + { + FloatRectangle clientbounds = GetClientBoundsF(); + FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height, clientbounds.width, GetCore().GetToolbarHeightF(false)); + + GetCore().SetFooterBounds(bounds); + } } else if (formStyle & FORM_STYLE_SOFTKEY_0 || formStyle & FORM_STYLE_SOFTKEY_1 || formStyle & FORM_STYLE_OPTIONKEY) { @@ -569,6 +621,13 @@ _FormImpl::SetFormStyle(unsigned long formStyle) pFooter->GetCore().AddActionEventListener(*this); } + else + { + FloatRectangle clientbounds = GetClientBoundsF(); + FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height - GetCore().GetToolbarHeightF(false), clientbounds.width, GetCore().GetToolbarHeightF(false)); + + GetCore().SetFooterBounds(bounds); + } } else { @@ -1213,7 +1272,9 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) } } - pFrameImpl->SetPosition(curPoint); + // depend on WM. + // Skip + //pFrameImpl->SetPosition(curPoint); portraitSize = pFrameImpl->GetSizeF(); landscapeSize = portraitSize; pFrameImpl->GetCore().SetMovable(movable); @@ -1234,10 +1295,18 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) SetSize(landscapeSize); } + DeflateClientRectHeight(0.0f); + float indicatorheight = 0.0f; GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight); _Indicator* pIndicator = GetCore().GetIndicator(); + + if (pIndicator) + { + pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); + } + if (GetCore().HasIndicator()) { if (pIndicator) @@ -1245,7 +1314,6 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) pIndicator->SetIndicatorOrientation(orientation); if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { - pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); if ((FORM_STYLE_INDICATOR & GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())) { GetCore().SetIndicatorShowState(true); @@ -1346,6 +1414,13 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) { indicatorBounds.height = 0.0f; } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + indicatorBounds.height = 0.0f; + } + } } } } @@ -1384,7 +1459,7 @@ _FormImpl::CreateHeaderN(void) { result r = E_SUCCESS; - Header* pHeader = new (std::nothrow) Header; + Header* pHeader = new (std::nothrow) Header(); SysTryReturn(NID_UI_CTRL, pHeader, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); r = pHeader->Construct(); @@ -1402,7 +1477,7 @@ _FormImpl::CreateFooterN(void) { result r = E_SUCCESS; - Footer* pFooter = new (std::nothrow) Footer; + Footer* pFooter = new (std::nothrow) Footer(); SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); r = pFooter->Construct(); @@ -1541,7 +1616,10 @@ _FormImpl::OnAttachedToMainTree(void) SetFocused(); r = GetCore().AttachedToMainTree(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = _ContainerImpl::OnAttachedToMainTree(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f); @@ -1585,10 +1663,15 @@ _FormImpl::OnAttachedToMainTree(void) if (pTabImpl) { + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + float posY = indicatorBounds.height + titleHeight; - FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); - GetCore().SetTabBounds(bounds); + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); } if (pFooter) @@ -1616,12 +1699,6 @@ _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(); } @@ -1671,6 +1748,13 @@ _FormImpl::OnFormBackRequested(Tizen::Ui::Controls::_Form& source) if (pForm) { __pFormBackEventListener->OnFormBackRequested(*pForm); + + SysLog(NID_UI, "OnFormBackRequested, Call SetTouchCanceled"); + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + pUiEventManager->ClearEventQueue(); + } } else { @@ -1904,14 +1988,14 @@ protected: return null; } - if ( layoutType == UIBUILDER_LAYOUT_GRID) + if (layoutType == UIBUILDER_LAYOUT_GRID) { for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++) { GridLayout* pGridLayout = null; pControlProperty = pControl->GetAttribute(i); - if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT) + if (i == UIBUILDER_ATTRIBUTE_PORTRAIT) { pGridLayout = dynamic_cast(pPortraitLayout); } diff --git a/src/ui/controls/FUiCtrl_FormPresenter.cpp b/src/ui/controls/FUiCtrl_FormPresenter.cpp index 735ab3c..17efd0c 100644 --- a/src/ui/controls/FUiCtrl_FormPresenter.cpp +++ b/src/ui/controls/FUiCtrl_FormPresenter.cpp @@ -35,7 +35,7 @@ _FormPresenter::_FormPresenter(const _Form& form) { __pForm = const_cast <_Form*>(&form); - _FormModel* pModel = new (std::nothrow) _FormModel; + _FormModel* pModel = new (std::nothrow) _FormModel(); SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.."); SetModel(*pModel); diff --git a/src/ui/controls/FUiCtrl_Frame.cpp b/src/ui/controls/FUiCtrl_Frame.cpp old mode 100755 new mode 100644 index e385bd4..0cc230d --- a/src/ui/controls/FUiCtrl_Frame.cpp +++ b/src/ui/controls/FUiCtrl_Frame.cpp @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -69,7 +70,8 @@ _Frame::_Frame(void) , __constructed(false) , __rotation(false) , __changingBoundsEnabled(true) - , __pFormActivationChangeEventListener(null) + , __skipSetBounds(false) + , __pFormActivationChangeEventListeners(null) { _FramePresenter* pPresenter = new (std::nothrow) _FramePresenter(*this); SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); @@ -78,12 +80,19 @@ _Frame::_Frame(void) __floatingBounds.width = screen.width; __floatingBounds.height = screen.height; - __pFrameEvent = _FrameEvent::CreateInstanceN(*this); - SysTryCatch(NID_UI_CTRL, __pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + LinkedListT <_IFormActivationChangeEventListener*>* pFormActivationChangeEventListeners = null; + + _FrameEvent* pFrameEvent = _FrameEvent::CreateInstanceN(*this); + SysTryCatch(NID_UI_CTRL, pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pFormActivationChangeEventListeners = new (std::nothrow) LinkedListT <_IFormActivationChangeEventListener*>; + SysTryCatch(NID_UI_CTRL, pFormActivationChangeEventListeners, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); SetPresenter(*pPresenter); SetClipChildrenEnabled(false); + __pFrameEvent = pFrameEvent; + __pFormActivationChangeEventListeners = pFormActivationChangeEventListeners; ClearLastResult(); return; @@ -91,6 +100,9 @@ _Frame::_Frame(void) CATCH: delete pPresenter; pPresenter = null; + + delete pFrameEvent; + pFrameEvent = null; } _Frame::~_Frame(void) @@ -104,6 +116,9 @@ _Frame::~_Frame(void) delete __pFramePresenter; __pFramePresenter = null; + delete __pFormActivationChangeEventListeners; + __pFormActivationChangeEventListeners = null; + ClearLastResult(); } @@ -114,8 +129,11 @@ _Frame::CreateFrameN(void) _RootVisualElement* pRootVE = null; _EflLayer* pLayer = null; int appType = _AppInfo::GetAppType(); +#if defined(PARTIAL_SCREEN) + bool isMultiWindow = false; +#endif - _Frame* pFrame = new (std::nothrow) _Frame; + _Frame* pFrame = new (std::nothrow) _Frame(); SysTryCatch(NID_UI_CTRL, pFrame, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); @@ -144,6 +162,16 @@ _Frame::CreateFrameN(void) pFrame->AcquireHandle(); + GetEcoreEvasMgr()->GetEcoreEvas()->SetDragAndDropEnabled(*pFrame); +#if defined(PARTIAL_SCREEN) + isMultiWindow = _AppInfo::IsMultiWindow(); + SysLog(NID_UI_CTRL, "[WM ROTATION]

IsMultiWindow = %d", isMultiWindow); + if (isMultiWindow) + { + GetEcoreEvasMgr()->GetEcoreEvas()->SetPartialScreenEnabled(*pFrame); + } +#endif + SetLastResult(E_SUCCESS); return pFrame; @@ -185,6 +213,7 @@ _Frame::OnActivated(void) } pCurrentForm->AddIndicatorObject(); + pCurrentForm->ActivateIndicator(); SetFocusWindowActivationChecked(true); _Control* pFocusControl = pCurrentForm->GetFocusControl(); @@ -200,6 +229,25 @@ _Frame::OnActivated(void) _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); } + +void +_Frame::OnDeactivated(void) +{ + SysLog(NID_UI, "deactivated(%d)", __activated); + + _Window::OnDeactivated(); + + _Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm == null) + { + return; + } + + pCurrentForm->DeactivateIndicator(); + +} + + bool _Frame::OnNotifiedN(const _Control& source, IList* pArgs) { @@ -345,6 +393,8 @@ _Frame::SetCurrentForm(const _Form* pForm) { if (pCurrentForm != pForm) { + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATING); + // Change order r = MoveChildToTop(*pForm); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -353,11 +403,13 @@ _Frame::SetCurrentForm(const _Form* pForm) pCurrentForm->SetVisibleState(false); pCurrentForm->MoveOverlayRegion(false); - if (__pFormActivationChangeEventListener) - __pFormActivationChangeEventListener->OnFormDeactivated(*pCurrentForm); + pCurrentForm->OnFormDeactivated(); + + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATED); } } + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_ACTIVATING); pNewForm->SetVisibleState(true); pNewForm->OnFormActivated(); _Control* pFocus = pNewForm->GetFocusControl(); @@ -369,11 +421,14 @@ _Frame::SetCurrentForm(const _Form* pForm) { pNewForm->SetFocused(); } - + _Control* pFocusTraversalControl = pNewForm->GetFocusTraversalControl(); + if (pFocusTraversalControl) + { + pFocusTraversalControl->OnTraversalControlFocusGained(); + } pNewForm->SetUpdateLayoutState(true); - if (__pFormActivationChangeEventListener) - __pFormActivationChangeEventListener->OnFormActivated(*pNewForm); + FireFormActivationChangeEvent(pNewForm, _FORM_STATUS_ACTIVATED); SetLastResult(E_SUCCESS); @@ -426,16 +481,77 @@ _Frame::AddFrameEventListener(const _IFrameEventListener& listener) void _Frame::RemoveFrameEventListener(const _IFrameEventListener& listener) { - result r = __pFrameEvent->RemoveListener(listener); + result r = E_SUCCESS; + + if (__pFrameEvent) + { + r = __pFrameEvent->RemoveListener(listener); + } + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } -void -_Frame::SetFormActivationChangeEventListener(const _IFormActivationChangeEventListener* plistener) +result +_Frame::AddFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pFormActivationChangeEventListeners->Add(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_Frame::RemoveFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener) { - __pFormActivationChangeEventListener = const_cast<_IFormActivationChangeEventListener*>(plistener); + ClearLastResult(); + SysTryReturn(NID_UI, __pFormActivationChangeEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; } +result +_Frame::FireFormActivationChangeEvent(_Form* pForm, _FormStatus status) +{ + if (__pFormActivationChangeEventListeners) + { + if (__pFormActivationChangeEventListeners->GetCount() > 0 ) + { + IEnumeratorT<_IFormActivationChangeEventListener*>* pEnumerator = __pFormActivationChangeEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IFormActivationChangeEventListener* pFormActivationChangeEventListener = null; + pEnumerator->GetCurrent(pFormActivationChangeEventListener); + if (pFormActivationChangeEventListener) + { + switch (status) + { + case _FORM_STATUS_ACTIVATING : + pFormActivationChangeEventListener->OnFormActivating(*pForm); + break; + case _FORM_STATUS_DEACTIVATING : + pFormActivationChangeEventListener->OnFormDeactivating(*pForm); + break; + case _FORM_STATUS_ACTIVATED : + pFormActivationChangeEventListener->OnFormActivated(*pForm); + break; + case _FORM_STATUS_DEACTIVATED : + pFormActivationChangeEventListener->OnFormDeactivated(*pForm); + break; + default: + break; + } + } + } + delete pEnumerator; + } + } + } + return E_SUCCESS; +} void _Frame::SetFloatingBounds(const FloatRectangle& rect) @@ -480,7 +596,23 @@ _Frame::SetShowMode(FrameShowMode showMode) { if (__minimized == true) { - return E_SYSTEM; + bool isForeground = false; + + UiApp* pUiApp = UiApp::GetInstance(); + if (pUiApp) + { + AppUiState appUiState = pUiApp->GetAppUiState(); + if (appUiState == APP_UI_STATE_FOREGROUND) + { + SysLog(NID_UI_CTRL, "[WM ROTATION]"); + isForeground = true; + } + } + + if (isForeground == false) + { + return E_SYSTEM; + } } } @@ -504,6 +636,9 @@ _Frame::SetShowMode(FrameShowMode showMode) int oldShowMode = __showMode; __showMode = showMode; + // depend on WM. + // App decides floating bounds directly. +/* if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) { _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; @@ -530,7 +665,7 @@ _Frame::SetShowMode(FrameShowMode showMode) { curPoint.x = prevPoint.x * ratio; } - + if (prevPoint.y > 0.0f) { curPoint.y = prevPoint.y / ratio; @@ -553,20 +688,21 @@ _Frame::SetShowMode(FrameShowMode showMode) { curPoint.x = prevPoint.x / ratio; } - + if (prevPoint.y > 0.0f) { curPoint.y = prevPoint.y * ratio; } - + __floatingBounds.x = curPoint.x; __floatingBounds.y = curPoint.y; } } } +*/ result r = E_SUCCESS; - + Rectangle floatingBounds = _CoordinateSystemUtils::ConvertToInteger(__floatingBounds); switch (__showMode) { case FRAME_SHOW_MODE_FULL_SCREEN: @@ -582,20 +718,27 @@ _Frame::SetShowMode(FrameShowMode showMode) __restore = true; - if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + if (__skipSetBounds == false) { - SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); - } - else - { - SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width)); + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); + } + else + { + SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width)); + } } __restore = false; } + SetChangedPositionByUser(false); + break; case FRAME_SHOW_MODE_PARTIAL_SCREEN: + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set floating bounds(%d, %d, %d, %d).", + GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height); if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) { r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false); @@ -613,6 +756,8 @@ _Frame::SetShowMode(FrameShowMode showMode) break; case FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING: + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set floating bounds(%d, %d, %d, %d).", + GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height); if (oldShowMode != FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) { r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), true); @@ -621,7 +766,14 @@ _Frame::SetShowMode(FrameShowMode showMode) if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN) { - SetBounds(__floatingBounds); + if (IsChangedPositionByUser() == true) + { + SetBounds(__floatingBounds); + } + else + { + SetSize(FloatDimension(__floatingBounds.width, __floatingBounds.height)); + } } break; @@ -674,6 +826,18 @@ _Frame::IsFrameActivated(void) const void _Frame::OnChildAttached(const _Control& child) { +#if defined(PARTIAL_SCREEN) + _Form* pForm = dynamic_cast<_Form*>(const_cast<_Control*>(&child)); + if (pForm) + { + bool isMultiWindow = _AppInfo::IsMultiWindow(); + if ((isMultiWindow == true) && (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN)) + { + pForm->SetPartialScreenEnabled(true); + } + } +#endif + _Form* pCurrentForm = GetCurrentForm(); if (pCurrentForm == &child) @@ -682,23 +846,38 @@ _Frame::OnChildAttached(const _Control& child) if (controlCount > 1) { - _Control* pOldCurrentForm = GetChild(controlCount - 2); + _Form* pOldCurrentForm = dynamic_cast<_Form*>(GetChild(controlCount - 2)); SysTryReturnVoidResult(NID_UI_CTRL, pOldCurrentForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); pOldCurrentForm->SetVisibleState(false); + FireFormActivationChangeEvent(pOldCurrentForm, _FORM_STATUS_DEACTIVATED); } } } void +_Frame::OnChildAttaching(const _Control& child) +{ + _Form* pCurrentForm = GetCurrentForm(); + + if (pCurrentForm != null && pCurrentForm != &child) + { + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATING); + } + _Form* pChild = dynamic_cast<_Form*>(&const_cast<_Control&>(child)); + FireFormActivationChangeEvent(pChild, _FORM_STATUS_ACTIVATING); +} + +void _Frame::OnChildDetached(const _Control& child) { int controlCount = GetChildCount(); if (controlCount > 0) { - _Control* pCurrentForm = GetChild(controlCount - 1); + _Form* pCurrentForm = dynamic_cast<_Form*>(GetChild(controlCount - 1)); SysTryReturnVoidResult(NID_UI_CTRL, pCurrentForm, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); pCurrentForm->SetVisibleState(true); + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_ACTIVATED); } else { @@ -747,10 +926,34 @@ _Frame::OnBoundsChanging(const FloatRectangle& bounds) return E_SUCCESS; } + if (__restore == true) + { + _RootVisualElement* pRootVE = GetRootVisualElement(); + if (pRootVE) + { + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + if (pLayer) + { + FloatDimension screen = _CoordinateSystemUtils::Transform(_ControlManager::GetInstance()->GetScreenSizeF()); + int rotation = GetEcoreEvasMgr()->GetEcoreEvas()->GetWindowRotation(*this); + + FloatDimension size(screen); + if ((rotation == 270) || (rotation == 90)) + { + size.width = screen.height; + size.height = screen.width; + } + pLayer->HasUpdatedWindowSize(size); + } + return E_SUCCESS; + } + } + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); - - pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds)); + bool changePosition = IsChangedPositionByUser(); + SysLog(NID_UI_CTRL, "[WM ROTATION][WIN 0x%x] IsChangedPositionByUser = %d", GetNativeHandle(), changePosition); + pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds), (changePosition ? false : true)); result r = GetLastResult(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -785,7 +988,9 @@ _Frame::OnBackgroundColorChanged(Color& backgroundColor) // Restore FrameShowMode showMode = GetShowMode(false); + __skipSetBounds = true; SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN); + __skipSetBounds = false; SetShowMode(showMode); @@ -846,12 +1051,68 @@ _Frame::OnBackgroundColorChanged(Color& backgroundColor) default: break; } + + if(pCurrentForm) + { + if (FORM_STYLE_INDICATOR & pCurrentForm->GetFormStyle()) + { + pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible()); + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()) + { + pCurrentForm->SetIndicatorAutoHide(false, true); + } + else + { + pCurrentForm->SetIndicatorAutoHide(false, false); + } + } + else + { + if ((FORM_STYLE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle())) + { + pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible()); + pCurrentForm->SetIndicatorAutoHide(true, true); + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible()); + } + else + { + pCurrentForm->SetIndicatorShowState(false); + } + pCurrentForm->SetIndicatorAutoHide(true, false); + } + else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + pCurrentForm->SetIndicatorShowState(false); + } + else + { + pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible()); + } + pCurrentForm->SetIndicatorAutoHide(false, true); + } + else + { + pCurrentForm->SetIndicatorShowState(false); + pCurrentForm->SetIndicatorAutoHide(false, false); + } + } + } + } } void _Frame::ResetFocusList(void) { - Tizen::Ui::Controls::_Form* pCurrentForm = GetCurrentForm(); + _Form* pCurrentForm = GetCurrentForm(); if (pCurrentForm) { pCurrentForm->ResetFocusList(); @@ -965,6 +1226,45 @@ _Frame::SetChangingBoundsEnabled(bool enable) __changingBoundsEnabled = enable; } +void +_Frame::SetPartialScreenEnabled(bool enable) +{ +#if defined(PARTIAL_SCREEN) + _RootVisualElement* pRootVE = GetRootVisualElement(); + if (pRootVE) + { + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + if (pLayer) + { + pLayer->SetConfigured(true); + SysLog(NID_UI_CTRL, "[WM ROTATION]

[WIN 0x%x] enable = %d", GetNativeHandle(), enable); + } + } +#endif + + if (enable == true) + { + __showMode = FRAME_SHOW_MODE_PARTIAL_SCREEN; + } + else + { + SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN); + } + + _Form* pForm = null; + int controlCount = GetChildCount(); + + if (controlCount > 0) + { + for (int i = controlCount; i > 0; i--) + { + pForm = dynamic_cast<_Form*>(GetChild(i - 1)); + SysTryReturnVoidResult(NID_UI_CTRL, pForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pForm->SetPartialScreenEnabled(enable); + } + } +} + Tizen::Base::Collection::IListT<_Control*>* _Frame::GetFocusList(void) const { @@ -1003,7 +1303,7 @@ _Frame::GetFocusTraversalControl(_Control* pControl) const pTempControl = pTempControl->GetParent(); } } - + if (pForm) { return pForm->GetFocusTraversalControl(); @@ -1051,4 +1351,11 @@ _Frame::SetFocusTraversalControl(_Control* pControl, bool on) } } } + +bool +_Frame::IsChildAttachable(_Control& child) const +{ + return (dynamic_cast<_Form*>(&child) != null); +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FrameImpl.cpp b/src/ui/controls/FUiCtrl_FrameImpl.cpp old mode 100755 new mode 100644 index 6a49dca..d6f929a --- a/src/ui/controls/FUiCtrl_FrameImpl.cpp +++ b/src/ui/controls/FUiCtrl_FrameImpl.cpp @@ -395,7 +395,9 @@ _FrameImpl::OnChangeLayout(_ControlOrientation orientation) } } - SetPosition(curPoint); + // depend on WM. + // Skip + //SetPosition(curPoint); SetMovable(movable); GetCore().SetFloatingOrientation(orientation); } @@ -450,7 +452,10 @@ _FrameImpl::OnChildDetached(const _Control& child) int childCount = GetCore().GetChildCount(); if (childCount == 0) { - UpdateOrientationStatus(); + if (IsDestroying() == false) + { + UpdateOrientationStatus(); + } } else if (childCount > 0) { diff --git a/src/ui/controls/FUiCtrl_FramePresenter.cpp b/src/ui/controls/FUiCtrl_FramePresenter.cpp index 2e7cd1f..324d6f1 100644 --- a/src/ui/controls/FUiCtrl_FramePresenter.cpp +++ b/src/ui/controls/FUiCtrl_FramePresenter.cpp @@ -38,7 +38,7 @@ _FramePresenter::_FramePresenter(const _Frame& frame) { __pFrame = const_cast <_Frame*>(&frame); - _FrameModel* pModel = new (std::nothrow) _FrameModel; + _FrameModel* pModel = new (std::nothrow) _FrameModel(); SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); _SetModel(*pModel); diff --git a/src/ui/controls/FUiCtrl_Gallery.cpp b/src/ui/controls/FUiCtrl_Gallery.cpp index 5010011..269c896 100644 --- a/src/ui/controls/FUiCtrl_Gallery.cpp +++ b/src/ui/controls/FUiCtrl_Gallery.cpp @@ -715,6 +715,11 @@ _Gallery::OnSettingChanged(Tizen::Base::String& key) bool _Gallery::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsFocusModeStateEnabled()) + { + return false; + } + bool returnValue = false; bool keyPressed = false; @@ -827,6 +832,11 @@ _Gallery::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _Gallery::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + if (!IsFocusModeStateEnabled()) + { + return false; + } + if ((keyInfo.GetKeyCode() == _KEY_BACK || keyInfo.GetKeyCode() == _KEY_ESC) && IsSlideShowStarted()) { StopSlideShow(); @@ -836,4 +846,22 @@ _Gallery::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) return false; } +bool +_Gallery::OnFocusGained(const _Control& source) +{ + return _Control::OnFocusGained(source); +} + +void +_Gallery::OnFocusModeStateChanged(void) +{ + +} + +bool +_Gallery::OnFocusLost(const _Control& source) +{ + return _Control::OnFocusLost(source); +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryImageReader.cpp b/src/ui/controls/FUiCtrl_GalleryImageReader.cpp index e304b50..2e3f3a2 100644 --- a/src/ui/controls/FUiCtrl_GalleryImageReader.cpp +++ b/src/ui/controls/FUiCtrl_GalleryImageReader.cpp @@ -135,7 +135,7 @@ _GalleryImageReader::LoadPartialImageFromFile(int index, const FloatDimension& i __pTmpFileBitmap = new (std::nothrow) Bitmap(); SysTryCatch(NID_UI_CTRL, __pTmpFileBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - // TODO : need Bitmap::ConstructF(ByteBuffer, ) + // TODO : need Bitmap::ConstructF(ByteBuffer,) //FloatDimension bitmapSizeF(bitmapSize.width, bitmapSize.height); r = __pTmpFileBitmap->Construct(*pBuffer, bitmapSize, pItem->GetGalleryItemImage()->GetInternalBitmap()->GetPixelColorFormat()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_GalleryPresenter.cpp b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp index b7b9d2c..17ff36f 100644 --- a/src/ui/controls/FUiCtrl_GalleryPresenter.cpp +++ b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp @@ -51,7 +51,6 @@ const int MIN_ANIMATION_DURATION = 300; const int MAX_ANIMATION_DURATION = 20000; const int DEFAULT_VIEW_DURATION = 10; const int MIN_VIEW_DURATION = 10; -const int FIRST_SLIDE_SHOW_DURATION = 1; const int PARTIAL_CANVAS = 0; } // unnamed namespace diff --git a/src/ui/controls/FUiCtrl_GalleryRenderer.cpp b/src/ui/controls/FUiCtrl_GalleryRenderer.cpp index 789f7e1..fc4c780 100644 --- a/src/ui/controls/FUiCtrl_GalleryRenderer.cpp +++ b/src/ui/controls/FUiCtrl_GalleryRenderer.cpp @@ -718,7 +718,7 @@ _GalleryRenderer::ShowEmptyImageAndText(void) pFont->GetTextExtent(__emptyString, __emptyString.GetLength(), textDimension); - pTextObject = new (std::nothrow) TextObject; + pTextObject = new (std::nothrow) TextObject(); SysTryCatch(NID_UI_CTRL, pTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextObject->Construct();//(const_cast(__emptyString.GetPointer())), __emptyString.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); diff --git a/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp b/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp index 73cc8da..1f8111f 100644 --- a/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp +++ b/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp @@ -297,16 +297,12 @@ _GalleryViewEventHandler::OnTouchPinchZoom(_GalleryViewEventInfo& eventInfo) area = -area; } - if (__startPinchCenterPosition.x == 0 && __startPinchCenterPosition.y == 0) - { - float factor = canvasRect.width / viewRect.width; - __startPinchCenterPosition = center; - __startPinchCenterPosition.x = CalculateRound((__startPinchCenterPosition.x - canvasRect.x) / factor); - __startPinchCenterPosition.y = CalculateRound((__startPinchCenterPosition.y - canvasRect.y) / factor); - } + float factor = canvasRect.width / viewRect.width; + + __startPinchCenterPosition = center; + __startPinchCenterPosition.x = CalculateRound((__startPinchCenterPosition.x - canvasRect.x) / factor); + __startPinchCenterPosition.y = CalculateRound((__startPinchCenterPosition.y - canvasRect.y) / factor); - //_GalleryAnimationTiming animation = {PINCH_ZOOM_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; - //result r = ZoomCanvas(area, center, zoomIn, &animation); result r = PinchZoomCanvas(area, center, zoomIn); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -399,6 +395,7 @@ bool _GalleryViewEventHandler::OnTouchCanceled(void) { ResetTouch(); + AlignCanvas(); return true; } diff --git a/src/ui/controls/FUiCtrl_GroupContainer.cpp b/src/ui/controls/FUiCtrl_GroupContainer.cpp index aa689d8..38dcbe9 100644 --- a/src/ui/controls/FUiCtrl_GroupContainer.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainer.cpp @@ -85,12 +85,13 @@ _GroupContainer::CreateGroupContainerN(const FloatRectangle& rect, int rowCount, { ClearLastResult(); _GroupContainer* pGroupContainer = new (std::nothrow) _GroupContainer(); - SysTryReturn(NID_UI_CTRL, pGroupContainer != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pGroupContainer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pGroupContainer->AcquireHandle(); result r = pGroupContainer->Initialize(rect, rowCount, columnCount, lineWidth); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - pGroupContainer->AcquireHandle(); return pGroupContainer; CATCH: @@ -105,18 +106,20 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column { result r = E_SUCCESS; - SysTryReturn(NID_UI_CTRL, (lineWidth >= 1), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The line width should not be less than 1."); + SysTryReturnResult(NID_UI_CTRL, lineWidth >= 1, E_INVALID_ARG, "Invalid argument is used. The line width (%f) should not be less than 1.", lineWidth); __lineWidth = lineWidth; - SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f && rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The bounds of the container should be non negative."); - SysTryReturn(NID_UI_CTRL, (rowCount > 0 && columnCount > 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The rowCount or columnCount should be greater than 0."); + SysTryReturnResult(NID_UI_CTRL, (rect.width >= 0.0f && rect.height >= 0.0f), E_INVALID_ARG, + "Invalid arguments is used. The width (%f) and height (%f) of the container should be non negative.", rect.width, rect.height); + SysTryReturnResult(NID_UI_CTRL, (rowCount > 0 && columnCount > 0), E_INVALID_ARG, + "Invalid arguments is used. The rowCount (%d) and columnCount (%d) should be greater than 0."); Color backgroundColor; GET_COLOR_CONFIG(GROUPCONTAINER::NORMAL_BG, backgroundColor); SetBackgroundColor(backgroundColor); r = GET_COLOR_CONFIG(GROUPCONTAINER::LINE_COLOR_FG, __lineColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); float totalColLineWidth = (columnCount + 1.0f) * __lineWidth; float totalRowLineHeight = (rowCount + 1.0f) * __lineWidth; @@ -132,13 +135,13 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); r = GET_FIXED_VALUE_CONFIG(GROUPCONTAINER::DEFAULT_MARGIN, orientation, margin); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pCellsArray = new (std::nothrow) _CellInfo *[rowCount]; - SysTryReturn(NID_UI_CTRL, __pCellsArray != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, __pCellsArray != null, E_OUT_OF_MEMORY, "Memory allocation failed."); __pStretchableRowIndex = new (std::nothrow) bool[rowCount]; - SysTryCatch(NID_UI_CTRL, __pStretchableRowIndex != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pStretchableRowIndex != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for (int i = 0; i < rowCount; i++) { @@ -146,7 +149,7 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column } __pStretchableColumnIndex = new (std::nothrow) bool[columnCount]; - SysTryCatch(NID_UI_CTRL, __pStretchableColumnIndex != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pStretchableColumnIndex != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); for (int i = 0; i < columnCount; i++) { @@ -161,7 +164,7 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column for (int i = 0; i < rowCount; i++) { __pCellsArray[i] = new (std::nothrow) _CellInfo[columnCount]; - SysTryCatch(NID_UI_CTRL, __pCellsArray[i] != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pCellsArray[i] != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) @@ -264,15 +267,17 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column r = AttachSystemChild(*__pSystemControl); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.", GetErrorMessage(r)); + __pSystemControl->SetFocusable(false); + __pContentProvider = new (std::nothrow) GroupContainerContentProvider(); - SysTryCatch(NID_UI_CTRL, __pContentProvider != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pContentProvider != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pSystemControl->GetVisualElement()->SetContentProvider(__pContentProvider); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.", GetErrorMessage(r)); __pGroupContainerPresenter = new (std::nothrow) _GroupContainerPresenter(*this); - SysTryCatch(NID_UI_CTRL, __pGroupContainerPresenter != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pGroupContainerPresenter != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = GetVisualElement()->SetSurfaceOpaque(false); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -283,7 +288,7 @@ _GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int column r = SetBounds(rect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; CATCH: @@ -351,7 +356,7 @@ _GroupContainer::AddControlAt(Control &control, int rowIndex, int columnIndex) { r = E_INVALID_OPERATION; } - return r; + return E_SUCCESS; CATCH: __childAttachedRowIndex = -1; @@ -404,16 +409,14 @@ _GroupContainer::RemoveControlAt(int rowIndex, int columnIndex) r = __pGroupContainerImpl->GetPublic().RemoveControl(const_cast(pChildImpl->GetPublic())); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; } result _GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser) { - result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); - SysTryReturnResult(NID_UI_CTRL, width >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Column width should be non negative."); + SysTryReturnResult(NID_UI_CTRL, width >= 0, E_INVALID_ARG, "Invalid argument is used. Column width (%f) should be non negative.", width); int row = -1; int column = -1; @@ -479,7 +482,7 @@ _GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser) UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), columnIndex, -1); } - return r; + return E_SUCCESS; } float @@ -492,10 +495,8 @@ _GroupContainer::GetColumnWidth(int columnIndex) result _GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser) { - result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); - SysTryReturnResult(NID_UI_CTRL, height >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Row height should be non negative."); + SysTryReturnResult(NID_UI_CTRL, height >= 0, E_INVALID_ARG, "Invalid argument is used. Row height (%f) should be non negative.", height); int row = -1; int column = -1; @@ -561,7 +562,7 @@ _GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser) UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), -1, rowIndex); } - return r; + return E_SUCCESS; } float @@ -697,7 +698,7 @@ _GroupContainer::SetChildResizingEnabled(int rowIndex, int columnIndex, bool ena { __pCellsArray[rowIndex][columnIndex].isResizeEnabled = true; r = ResizeControl(rowIndex, columnIndex); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { @@ -709,7 +710,7 @@ _GroupContainer::SetChildResizingEnabled(int rowIndex, int columnIndex, bool ena r = E_INVALID_ARG; } - return r; + return E_SUCCESS; } result @@ -719,7 +720,8 @@ _GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, floa 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); - SysTryReturnResult(NID_UI_CTRL, (leftMargin >= 0.0f && rightMargin >= 0.0f && topMargin >= 0.0f && bottomMargin >= 0.0f), E_INVALID_ARG, "Invalid argument(s) is used. Invalid margin value."); + SysTryReturnResult(NID_UI_CTRL, (leftMargin >= 0.0f && rightMargin >= 0.0f && topMargin >= 0.0f && bottomMargin >= 0.0f), E_INVALID_ARG, + "Invalid arguments is used. The leftMargin (%f) rightMargin (%f) topMargin (%f) and bottomMargin (%f) should be non negative."); _CellMargin prevCellMargin = __pCellsArray[rowIndex][columnIndex].cellMargin; __pCellsArray[rowIndex][columnIndex].cellMargin.left = leftMargin; @@ -751,11 +753,11 @@ _GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, floa } r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(rect.x, rect.y, controlRect.width, controlRect.height)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } } - return r; + return E_SUCCESS; } FloatRectangle @@ -777,7 +779,6 @@ _GroupContainer::GetBoundsAt(int rowIndex, int columnIndex) const result _GroupContainer::Split(int rowIndex, int columnIndex) { - result r = E_SUCCESS; int rowEndIndex = -1; int columnEndIndex = -1; @@ -810,7 +811,7 @@ _GroupContainer::Split(int rowIndex, int columnIndex) } } - return r; + return E_SUCCESS; } void @@ -924,12 +925,12 @@ _GroupContainer::ResizeControl(int rowIndex, int columnIndex) } r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(controlRect.x, controlRect.y, rect.width, rect.height)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } } } - return r; + return E_SUCCESS; } void @@ -1212,7 +1213,7 @@ _GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRecta stretchableHeight = (controlRect.height - gridRect.height) / stretchableRowCount; balanceHeightPixels = fmod((controlRect.height - gridRect.height), stretchableRowCount); - if ( balanceHeightPixels > 0) + if (balanceHeightPixels > 0) { height = Math::Round((balanceHeightPixels + ROUNDOFF_VALUE) * 10.0); } diff --git a/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp index 06264c5..1306bd8 100644 --- a/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp @@ -335,7 +335,7 @@ public: GetInstance(_UiBuilder* pUiBuilder) { _GroupContainerMaker* pGroupContainerMaker = new (std::nothrow) _GroupContainerMaker(pUiBuilder); - SysTryReturn(NID_UI_CTRL, pGroupContainerMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pGroupContainerMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pGroupContainerMaker; }; @@ -380,7 +380,7 @@ protected: rect = pControlProperty->GetRectF(); pGroupContainer = new (std::nothrow) GroupContainer(); - SysTryReturn(NID_UI_CTRL, pGroupContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pGroupContainer, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); // Construct r = pGroupContainer->Construct(rect, rowCount, columnCount, lineWidth); diff --git a/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp index c7dfe51..b17b655 100644 --- a/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp @@ -71,32 +71,23 @@ result _GroupContainerPresenter::LoadResourceBitmaps(void) { result r = E_SUCCESS; - Bitmap* pSystemChildBgBitmap = null; - Bitmap* pGroupContainerBgBitmap = null; __parentBgColor = GetParentColor(); - 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 != null) { delete __pSystemChildColorReplacedBgBitmap; __pSystemChildColorReplacedBgBitmap = null; } - __pSystemChildColorReplacedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSystemChildBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __parentBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to get replacement color Bitmap.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(GROUPCONTAINER::SYSTEM_CONTROL_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __parentBgColor, __pSystemChildColorReplacedBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (__pSystemChildBgEffectBitmap == null) { r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::BORDER_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pSystemChildBgEffectBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - 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 != null) { delete __pGroupContainerColorReplacedBgBitmap; @@ -105,21 +96,13 @@ _GroupContainerPresenter::LoadResourceBitmaps(void) __bgColor = __pGroupContainer->GetBackgroundColor(); - __pGroupContainerColorReplacedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupContainerBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __bgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to get replacement color Bitmap.", GetErrorMessage(r)); - - delete pSystemChildBgBitmap; - delete pGroupContainerBgBitmap; + r = GET_REPLACED_BITMAP_CONFIG_N(GROUPCONTAINER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __bgColor, __pGroupContainerColorReplacedBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; CATCH: - delete pSystemChildBgBitmap; - - delete pGroupContainerBgBitmap; - delete __pSystemChildColorReplacedBgBitmap; __pSystemChildColorReplacedBgBitmap = null; diff --git a/src/ui/controls/FUiCtrl_GroupItemImpl.cpp b/src/ui/controls/FUiCtrl_GroupItemImpl.cpp index da73749..476390c 100644 --- a/src/ui/controls/FUiCtrl_GroupItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupItemImpl.cpp @@ -76,7 +76,7 @@ _GroupItemImpl::CreateGroupItemImpN(GroupItem* pPublic, const FloatDimension& it result r = E_SUCCESS; _GroupItemImpl* pImpl = new (std::nothrow) _GroupItemImpl(pPublic); - SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pImpl->Construct(itemSize); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp index 78bfde5..3ec5c6e 100644 --- a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp @@ -38,6 +38,7 @@ #include "FUi_TouchLongPressGestureDetector.h" #include "FUi_TouchManager.h" #include "FUi_UiBuilder.h" +#include "FUi_Window.h" #include "FUiCtrl_FastScrollEvent.h" #include "FUiCtrl_FastScrollEventArg.h" #include "FUiCtrl_GroupedListViewImpl.h" @@ -82,7 +83,7 @@ public: // Add _TouchLongPressGestureDetector __pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __core.AddGestureDetector(*__pLongPressedGesture); result r = __pLongPressedGesture->AddGestureListener(*this); @@ -383,7 +384,7 @@ private: TouchEventInfo publicTouchInfo; _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); - SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); publicTouchInfo.Construct(*pEventArg); @@ -520,10 +521,10 @@ private: FloatPoint startPoint; _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); - SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x, - __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y); + startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF(true).x, + __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF(true).y); pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y, touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); @@ -573,6 +574,7 @@ _GroupedListViewImpl::_GroupedListViewImpl(GroupedListView* pGroupedList, _Table , __pAccessibilityElement(null) , __redrawListView(true) , __isOrientationChanged(false) + , __isUpdateListCalled(false) , __needReloadItems(false) , __pPropagatedTouchEventListener(null) { @@ -690,7 +692,7 @@ _GroupedListViewImpl::CreateGroupedListViewImplN(GroupedListView* pControl, Grou TableViewStyle tableViewStyle = ((style == GROUPED_LIST_VIEW_STYLE_SECTION) ? TABLE_VIEW_STYLE_SECTION : TABLE_VIEW_STYLE_GROUPED); _TableView* pCore = _TableView::CreateTableViewN(tableViewStyle, itemDivider, scrollBarStyle); - SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _GroupedListViewImpl* pImpl = new (std::nothrow) _GroupedListViewImpl(pControl, pCore); @@ -738,7 +740,7 @@ _GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProvider& provider) { pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider); SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pProviderAdaptor->SetListViewItemEventListener(*this); @@ -789,7 +791,7 @@ _GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProviderF& provider) { pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider); SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pProviderAdaptor->SetListViewItemEventListener(*this); @@ -819,7 +821,7 @@ _GroupedListViewImpl::AddGroupedListViewItemEventListener(IGroupedListViewItemEv if (__pListItemEvent == null) { __pListItemEvent = new (std::nothrow) _ListItemEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pListItemEvent->Construct(GetPublic(), CLASSNAME_GROUPEDLISTVIEW); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event."); @@ -853,7 +855,7 @@ _GroupedListViewImpl::AddFastScrollListener(IFastScrollListener& listener) if (__pFastScrollEvent == null) { __pFastScrollEvent = new (std::nothrow) _FastScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pFastScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct FastScroll Event."); @@ -887,7 +889,7 @@ _GroupedListViewImpl::AddScrollEventListener(IScrollEventListener& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event."); @@ -908,7 +910,7 @@ _GroupedListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event."); @@ -955,7 +957,7 @@ _GroupedListViewImpl::AddUiLinkEventListener(const IUiLinkEventListener& listene if (__pLinkEvent == null) { __pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); - SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } r = __pLinkEvent->AddListener(listener); @@ -997,13 +999,21 @@ _GroupedListViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon) result _GroupedListViewImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const { - return GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + result r = E_SUCCESS; + r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to get top drawn item index."); + + return r; } result _GroupedListViewImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const { - return GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + result r = E_SUCCESS; + r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to get bottom drawn item index."); + + return r; } result @@ -1150,12 +1160,29 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType _ListViewItemStatus itemStatus; memset(&itemStatus, 0, sizeof(_ListViewItemStatus)); bool needChangeEventTarget = false; + bool itemFocused = false; + bool annexFocused = false; + int focusedGroupedIndex = -1; + int focusedItemIndex = -1; if (pListViewItem != null && pListViewItem->IsItemSelected()) { needChangeEventTarget = true; } + GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex); + if (focusedGroupedIndex == groupIndex && focusedItemIndex == itemIndex) + { + if (GetCore().IsAnnexFocused()) + { + annexFocused = true; + } + else + { + itemFocused = true; + } + } + if (needChangeEventTarget && (pListViewItem != null)) { pListViewItem->GetCurrentStatus(itemStatus); @@ -1185,6 +1212,25 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType pTarget->SetChangingEventTarget(true); _TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget); } + + if (pListViewItem && pListViewItem->IsFocusable() + && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState() + && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated()) + { + if (itemFocused) + { + GetCore().SetFocused(true); + pListViewItem->SetFocused(true); + pListViewItem->DrawFocus(); + itemFocused = false; + } + else if (annexFocused) + { + GetCore().SetFocused(true); + pListViewItem->DrawAnnexFocus(); + annexFocused = false; + } + } } } else @@ -1220,11 +1266,11 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, int elementId) } result -_GroupedListViewImpl::UpdateList(void) +_GroupedListViewImpl::UpdateList(bool isRestoreAnnexFocusValue) { __needReloadItems = true; - result r = GetCore().UpdateTableView(); + result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue); CheckEmptyListShowState(); @@ -1385,7 +1431,7 @@ _GroupedListViewImpl::SetTextOfEmptyList(const String& text) GetCore().AttachChild(*__pEmptyText); } - TextObject* pText = new (std::nothrow) TextObject; + TextObject* pText = new (std::nothrow) TextObject(); SysTryReturn(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); pText->Construct(); @@ -1526,7 +1572,7 @@ _GroupedListViewImpl::CheckEmptyListShowState(void) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pAccessibilityElement->SetName(L"ListView"); @@ -1617,7 +1663,7 @@ _GroupedListViewImpl::AdjustLayoutOfEmptyList(void) if (__pEmptyText != null) { textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f); - textPos.y = ((listDimension.height <= totalHeight ) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f); + textPos.y = ((listDimension.height <= totalHeight) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f); } } @@ -1914,7 +1960,19 @@ _GroupedListViewImpl::OnDraw(void) void _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation) { - __isOrientationChanged = true; + if (__isUpdateListCalled) + { + __isUpdateListCalled = false; + } + else + { + __isOrientationChanged = true; + } + + if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + GetCore().SetFocusDuringOrientationChange(); + } _ControlImpl::OnChangeLayout(orientation); } @@ -1922,6 +1980,14 @@ _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation) void _GroupedListViewImpl::OnBoundsChanged(void) { + _Control* pParent = GetCore().GetParentFormOrWindow(); + + if (pParent != null && (pParent->GetOrientation() != GetCore().GetOrientation())) + { + __isOrientationChanged = true; + __isUpdateListCalled = true; + } + _ControlImpl::OnBoundsChanged(); if (__pEmptyBitmap != null) @@ -1935,12 +2001,17 @@ _GroupedListViewImpl::OnBoundsChanged(void) if (__isOrientationChanged) { - if (GetCore().IsTableViewFocused()) + __isOrientationChanged = false; + + if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled() + && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) { - GetCore().RestoreFocus(true); + UpdateList(true); + } + else + { + UpdateList(); } - __isOrientationChanged = false; - UpdateList(); } } @@ -1984,6 +2055,7 @@ _GroupedListViewImpl::OnFontChanged(Font* pFont) if (pListViewItem != null) { pListViewItem->SetFont(fontName); + pListViewItem->SetItemChanged(true); } } } @@ -2009,7 +2081,7 @@ FloatPoint _GroupedListViewImpl::GetCurrentTouchPosition(void) { FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0); - FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(); + FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true); currentTouchPos.x -= bounds.x; currentTouchPos.y -= bounds.y; diff --git a/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp index 78ca1ae..238eaa8 100644 --- a/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp +++ b/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp @@ -55,6 +55,7 @@ _GroupedListViewItemProviderAdaptor::_GroupedListViewItemProviderAdaptor(const I , __pItemNeedsLazyDeletion(null) , __pLazyDeletionItem(null) , __usingFloatingPoint(false) + , __pDefaultItem(null) { } @@ -72,11 +73,15 @@ _GroupedListViewItemProviderAdaptor::_GroupedListViewItemProviderAdaptor(const I , __pItemNeedsLazyDeletion(null) , __pLazyDeletionItem(null) , __usingFloatingPoint(true) + , __pDefaultItem(null) { } _GroupedListViewItemProviderAdaptor::~_GroupedListViewItemProviderAdaptor() { + delete __pDefaultItem; + __pDefaultItem = null; + __descriptionTextShowItem.clear(); SetItemLazyDeletion(null); @@ -117,7 +122,7 @@ _GroupedListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) { ListItemBase* pItemBase = null; GroupItem* pGroupItem = null; - _TableViewItem* pTableViewItem = null; + _IListItemCommon* pDefaultItem = null; if (itemIndex == -1) { @@ -132,10 +137,10 @@ _GroupedListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pGroupItem == null) { - pTableViewItem = GetDefaultItem(); - pTableViewItem->SetAppInfo(null); + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); - return pTableViewItem; + return pDefaultItem; } } else @@ -151,10 +156,10 @@ _GroupedListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pItemBase == null) { - pTableViewItem = GetDefaultItem(); - pTableViewItem->SetAppInfo(null); + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); - return pTableViewItem; + return pDefaultItem; } } @@ -540,4 +545,18 @@ _GroupedListViewItemProviderAdaptor::SetItemLazyDeletion(_ListViewItem* pItem) } } +_IListItemCommon* +_GroupedListViewItemProviderAdaptor::GetDefaultItem(void) +{ + if (__pDefaultItem == null) + { + _ListViewItem* pListViewItem = _ListViewItem::CreateListViewItemN(0.0f); + pListViewItem->SetFocusable(false); + + __pDefaultItem = pListViewItem; + } + + return __pDefaultItem; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_HeaderImpl.cpp b/src/ui/controls/FUiCtrl_HeaderImpl.cpp index f8159b9..9150549 100644 --- a/src/ui/controls/FUiCtrl_HeaderImpl.cpp +++ b/src/ui/controls/FUiCtrl_HeaderImpl.cpp @@ -146,14 +146,14 @@ _HeaderImpl::GetInstance(Header& header) result _HeaderImpl::AddItem(const HeaderItem& item) { - SysTryReturnResult(NID_UI_CTRL, (__style != HEADER_STYLE_TITLE), E_SYSTEM, "[E_SYSTEM] Unable to add the item because the current style does not support it."); - result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - if (IsFailed(r)) - { - return r; - } + r = CheckItemExceed(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SysTryReturnResult(NID_UI_CTRL, (__style != HEADER_STYLE_TITLE), + E_SYSTEM, "[E_SYSTEM] Unable to add the item because the current style does not support it."); if (__style == HEADER_STYLE_TITLE_BUTTON && GetItemCount() >= 1) { @@ -299,11 +299,10 @@ result _HeaderImpl::InsertItemAt(int itemIndex, const HeaderItem& item) { result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - if (IsFailed(r)) - { - return r; - } + r = CheckItemExceed(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE @@ -515,12 +514,15 @@ _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_LARGE)), E_INVALID_OPERATION, - "[E_INVALID_OPERATION] This operation is not supported."); + SysTryReturnResult(NID_UI_CTRL, _ButtonItemImpl::GetInstance(button) != null, + E_INVALID_ARG, "[E_INVALID_ARG] The ButtonItem isn't constructed."); - SysTryReturnResult(NID_UI_CTRL, (button.GetActionId() >= HEADER_ACTION_ID_MIN && button.GetActionId() <= HEADER_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, button.GetActionId() >= HEADER_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + SysTryReturnResult(NID_UI_CTRL, (!(__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE)), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This operation is not supported."); + int count = GetItemCount(); if (HEADER_STYLE_TAB_WITH_TITLE != __style) @@ -630,13 +632,8 @@ _HeaderImpl::SetButtonNumberedBadgeIcon(ButtonPosition position, int number) result _HeaderImpl::SetItemAt(int itemIndex, const HeaderItem& item) { - SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed."); - - if (item.GetActionId() < HEADER_ACTION_ID_MIN || item.GetActionId() > HEADER_ACTION_ID_MAX) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); - return E_INVALID_ARG; - } + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); int count = GetItemCount(); @@ -994,7 +991,19 @@ _HeaderImpl::CheckItemValidate(const HeaderItem& item) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed."); + SysTryReturnResult(NID_UI_CTRL, _HeaderItemImpl::GetInstance(item) != null, + E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed."); + + SysTryReturnResult(NID_UI_CTRL, item.GetActionId() >= HEADER_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + return r; +} + +result +_HeaderImpl::CheckItemExceed(const HeaderItem& item) +{ + result r = E_SUCCESS; int count = GetItemCount(); @@ -1024,17 +1033,10 @@ _HeaderImpl::CheckItemValidate(const HeaderItem& item) goto CATCH; } - if (item.GetActionId() < HEADER_ACTION_ID_MIN || item.GetActionId() > HEADER_ACTION_ID_MAX) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); - r = E_INVALID_ARG; - goto CATCH; - } - - return (r); + return r; CATCH: - return (r); + return r; } ToolbarStyle @@ -1148,7 +1150,7 @@ _HeaderImpl::ConvertButtonItem(const ButtonItem& buttonItem) extentSize = extentSizeMin; } - pButton->SetMargin(textMargin, 0.0f, textMargin, 0.0f); + pButton->SetMargin(textMargin, 0.0f, textMargin - 1, 0.0f); pButton->SetBounds(FloatRectangle(0.0f, 0.0f, extentSize, buttonItemHeight)); } else diff --git a/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp b/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp index 7970c24..fb0b383 100644 --- a/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp @@ -64,7 +64,7 @@ _HeaderItemImpl::GetInstance(HeaderItem& headerItem) result _HeaderItemImpl::Construct(int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; @@ -120,7 +120,7 @@ _HeaderItemImpl::GetText(void) const result _HeaderItemImpl::SetActionId(int actionId) { - SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX), + SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); __actionId = actionId; diff --git a/src/ui/controls/FUiCtrl_IconListData.cpp b/src/ui/controls/FUiCtrl_IconListData.cpp index 08405c8..c426e55 100644 --- a/src/ui/controls/FUiCtrl_IconListData.cpp +++ b/src/ui/controls/FUiCtrl_IconListData.cpp @@ -79,7 +79,7 @@ _IconListData::SetNormalBitmap(const Bitmap* pNormalBitmap) if (pNormalBitmap != null) { __pNormalBitmap = new (std::nothrow) Bitmap(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pNormalBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pNormalBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = __pNormalBitmap->Construct(*pNormalBitmap, Rectangle(0, 0, pNormalBitmap->GetWidth(), pNormalBitmap->GetHeight())); if (IsFailed(r)) @@ -96,7 +96,7 @@ _IconListData::SetFocusedBitmap(const Bitmap* pFocusedBitmap) if (pFocusedBitmap != null) { __pFocusedBitmap = new (std::nothrow) Bitmap(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pFocusedBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pFocusedBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = __pFocusedBitmap->Construct(*pFocusedBitmap, Rectangle(0, 0, pFocusedBitmap->GetWidth(), pFocusedBitmap->GetHeight())); if (IsFailed(r)) diff --git a/src/ui/controls/FUiCtrl_IconListImpl.cpp b/src/ui/controls/FUiCtrl_IconListImpl.cpp index f395035..a6ec99e 100644 --- a/src/ui/controls/FUiCtrl_IconListImpl.cpp +++ b/src/ui/controls/FUiCtrl_IconListImpl.cpp @@ -104,7 +104,7 @@ _IconListImpl::CreateIconListImplN(IconList* pControl) SysTryReturn(NID_UI_CTRL, (pCore != null), null, GetLastResult(), "[%s] Creating iconListView instance failed", GetErrorMessage(GetLastResult())); _IconListImpl* pImpl = new (std::nothrow) _IconListImpl(pControl, pCore); - SysTryCatch(NID_UI_CTRL, (pImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, (pImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pImpl; @@ -137,7 +137,7 @@ _IconListImpl::SetIconListStyle(IconListStyle style) break; } - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Invalid Icon List style" ); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Invalid Icon List style"); r = GetCore().SetStyle(__annexStyle); SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set style", GetErrorMessage(r)); @@ -199,7 +199,7 @@ result _IconListImpl::SetItemProvider(void) { __pIconListItemProvider = new (std::nothrow) _IconListItemProvider(this); - SysTryReturnResult(NID_UI_CTRL, __pIconListItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnResult(NID_UI_CTRL, __pIconListItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return GetCore().SetItemProvider(*__pIconListItemProvider); } @@ -224,7 +224,7 @@ void _IconListImpl::AddItemEventListener(IItemEventListener& listener) { _ListListener* pIconListListener = new (std::nothrow) _ListListener(); - SysTryReturnVoidResult(NID_UI_CTRL, pIconListListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pIconListListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pIconListListener->pListener = &listener; diff --git a/src/ui/controls/FUiCtrl_IconListItem.cpp b/src/ui/controls/FUiCtrl_IconListItem.cpp index e0043ed..3b0f57c 100644 --- a/src/ui/controls/FUiCtrl_IconListItem.cpp +++ b/src/ui/controls/FUiCtrl_IconListItem.cpp @@ -152,7 +152,7 @@ _IconListItem::~_IconListItem(void) if (__pAccessibilityElement != null) { - if (__pAccessibilityElement->GetParent() != null ) + if (__pAccessibilityElement->GetParent() != null) { __pAccessibilityElement->GetParent()->RemoveElement(*__pAccessibilityElement); } @@ -165,7 +165,7 @@ _IconListItem::CreateIconListItemN(IconListViewItem* pIconListViewItem) { result r = E_SUCCESS; _IconListItem* pItem = null; - _VisualElement* pBase = new (std::nothrow) _VisualElement; + _VisualElement* pBase = new (std::nothrow) _VisualElement(); SysTryReturn(NID_UI_CTRL, (pBase != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pBase->Construct(); @@ -189,7 +189,7 @@ CATCH: } bool -_IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemIndex) +_IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemIndex, bool overwriteItemBG) { SysAssertf(__pProperty != null, "Not yet initialized. SetDrawingProperty() should be called before use."); @@ -205,7 +205,10 @@ _IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemI // Support Accessibility if (__pProperty->IsAccessibilityEnabled()) { - SetItemAccessibilityElement(rect, itemIndex); + if (itemIndex != -1) + { + SetItemAccessibilityElement(rect, itemIndex); + } } if (!__pProperty->IsChanged() && __isDrawn && __foreDrawnState == isFocused) @@ -225,7 +228,14 @@ _IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemI pCanvas->Clear(); float margin = __pProperty->GetSelectBackgroundMargin(); - pCanvas->FillRectangle(__pProperty->GetBackgroundColor(status), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin)); + if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED && overwriteItemBG) + { + pCanvas->FillRectangle(__pProperty->GetBackgroundColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin)); + } + else + { + pCanvas->FillRectangle(__pProperty->GetBackgroundColor(status), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin)); + } // Draw Bitmap Bitmap* pBitmap = (__pBitmap[isFocused] != null) ? __pBitmap[isFocused] : __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL]; @@ -466,10 +476,14 @@ _IconListItem::DrawText(const Color& color) if (__pTextObject == null) { - __pTextObject = new (std::nothrow) TextObject; + __pTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pTextObject, E_OUT_OF_MEMORY, "Memory allocation failed."); + wchar_t* pStr = const_cast (__text.GetPointer()); __pTextObject->Construct(); - TextSimple* pSimpleText = new (std::nothrow)TextSimple(pStr, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + TextSimple* pSimpleText = new (std::nothrow) TextSimple(pStr, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pTextObject->AppendElement(*pSimpleText); __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); @@ -764,14 +778,10 @@ _IconListItem::DrawBorder(Tizen::Graphics::Canvas& canvas, bool isFocused) pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); - if (__pProperty->GetFocusBitmap() != null) - { - const Bitmap* pShadowBitmap = __pProperty->GetFocusBitmap(); - Color focusUiColor = __pProperty->GetBorderColor(isFocused); - - pShadowBitmap = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pShadowBitmap, Color::GetColor(COLOR_ID_MAGENTA), focusUiColor); - SysTryReturn(NID_UI_CTRL, pShadowBitmap != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + const Bitmap* pShadowBitmap = __pProperty->GetFocusBitmap(); + if (pShadowBitmap != null) + { if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pShadowBitmap)) { pCanvas->DrawNinePatchedBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); @@ -781,7 +791,6 @@ _IconListItem::DrawBorder(Tizen::Graphics::Canvas& canvas, bool isFocused) pCanvas->DrawBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); } __pFocusVE->SetShowState(true); - delete pShadowBitmap; } delete pCanvas; } @@ -871,6 +880,10 @@ _IconListItem::SetBitmap(IconListViewItemDrawingStatus status, const Bitmap* pBi delete __pBitmap[status]; __pBitmap[status] = pCopiedBitmap; } + else + { + delete pCopiedBitmap; + } __isDrawn = false; diff --git a/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp b/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp index f378690..3f5e9a3 100644 --- a/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp +++ b/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp @@ -44,7 +44,6 @@ _IconListItemDrawingProperty::_IconListItemDrawingProperty(void) , __highlightedTextColor(0) , __size(0.0f, 0.0f) , __bitmapBounds(0.0f, 0.0f, 0.0f, 0.0f) - , __pDropShadowBitmap(null) , __pFocusBitmap(null) , __pDropShadowBitmapWithReplacementColor(null) , __dropShadowBorderWidth(0.0f) @@ -83,9 +82,6 @@ _IconListItemDrawingProperty::_IconListItemDrawingProperty(void) _IconListItemDrawingProperty::~_IconListItemDrawingProperty(void) { - delete __pDropShadowBitmap; - __pDropShadowBitmap = null; - delete __pFocusBitmap; __pFocusBitmap = null; @@ -108,7 +104,7 @@ _IconListItemDrawingProperty::~_IconListItemDrawingProperty(void) _IconListItemDrawingProperty* _IconListItemDrawingProperty::CreateInstanceN(void) { - _IconListItemDrawingProperty* pProperty = new (std::nothrow) _IconListItemDrawingProperty; + _IconListItemDrawingProperty* pProperty = new (std::nothrow) _IconListItemDrawingProperty(); SysTryReturn(NID_UI_CTRL, (pProperty != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = pProperty->Initialize(); @@ -136,27 +132,17 @@ _IconListItemDrawingProperty::Initialize(void) GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, width); GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); + // Load border color + GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_NORMAL, __normalBorderColor); + GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_HIGHLIGHTED, __focusBorderColor); + if (!_FloatCompareLE(width, 0.0f) && !_FloatCompareLE(height, 0.0f)) { - r = GET_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDropShadowBitmap); - if (r != E_SUCCESS) - { - delete __pDropShadowBitmap; - __pDropShadowBitmap = null; - - SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); - return r; - } - - r = GET_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pFocusBitmap); - if (r != E_SUCCESS) - { - delete __pFocusBitmap; - __pFocusBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __normalBorderColor, __pDropShadowBitmapWithReplacementColor); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); - SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); - return r; - } + r = GET_REPLACED_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __focusBorderColor, __pFocusBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } // Load Check Bitmap @@ -207,18 +193,6 @@ _IconListItemDrawingProperty::Initialize(void) GET_COLOR_CONFIG(ICONLIST::ITEM_BG_PRESSED, __pressedBackgroundColor); __pressedBackgroundColor.SetAlpha(0x80); - // Load border color - GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_NORMAL, __normalBorderColor); - GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_HIGHLIGHTED, __focusBorderColor); - - // Load Drop Shadow Bitmap with Replacement Color - if (__pDropShadowBitmap != null) - { - __pDropShadowBitmapWithReplacementColor = _BitmapImpl::GetColorReplacedBitmapN(*__pDropShadowBitmap, - Color::GetColor(COLOR_ID_MAGENTA), __normalBorderColor); - SysTryReturn(NID_UI_CTRL, (__pDropShadowBitmapWithReplacementColor != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); - } - // Load Item Text Size & color GET_SHAPE_CONFIG(ICONLIST::FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_BG_NORMAL, __inTextBackgroundColor); diff --git a/src/ui/controls/FUiCtrl_IconListPresenter.cpp b/src/ui/controls/FUiCtrl_IconListPresenter.cpp index 1437e3c..8d1d683 100644 --- a/src/ui/controls/FUiCtrl_IconListPresenter.cpp +++ b/src/ui/controls/FUiCtrl_IconListPresenter.cpp @@ -164,7 +164,7 @@ _IconListPresenter::CreateInstanceN(_IconListView& pIconListView) _IconListItemDrawingProperty* pItemDrawingProperty = null; // Create _ListModel - _ListViewModel* pListModel = new (std::nothrow) _ListViewModel; + _ListViewModel* pListModel = new (std::nothrow) _ListViewModel(); SysTryCatch(NID_UI_CTRL, (pListModel != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); // Create _IconListPresenter @@ -191,6 +191,8 @@ CATCH: result _IconListPresenter::Dispose(void) { + StopAllAnimations(); + delete __pListModel; __pListModel = null; @@ -316,7 +318,7 @@ _IconListPresenter::RegisterItemProviderAdaptor(_IListItemProviderAdaptor* pItem if (pItemProviderAdaptor == null) { // Create Default _IconListItemProviderAdaptor - pAdaptor = new (std::nothrow) _IconListItemProviderAdaptor; + pAdaptor = new (std::nothrow) _IconListItemProviderAdaptor(); SysTryReturn(NID_UI_CTRL, (pAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -931,7 +933,8 @@ _IconListPresenter::RefreshList(int index, ListRefreshType type) SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); __needSetAccessibility = true; - RedrawItem(index); + RedrawItem(index, __highlightedIndex == index); + return r; } } @@ -1028,7 +1031,12 @@ _IconListPresenter::UpdateList(void) SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); __selectedIndex = INVALID_INDEX; - __highlightedIndex = INVALID_INDEX; + + if (!__pIconListView->IsFocusModeStateEnabled()) + { + __highlightedIndex = INVALID_INDEX; + } + __isLayoutChanged = true; __alreadyDrawn = false; __listStatusChanged = true; @@ -1577,6 +1585,12 @@ _IconListPresenter::DrawEmptyList(void) if (pScroll != null) { __scrollLength = 0.0f; + + if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB) + { + ChangeScrollBarVisibility(viewBounds.height, viewBounds.height); + } + pScroll->SetScrollRange(viewBounds.height, viewBounds.height); pScroll->EnableScrollingEffect(false); } @@ -1608,7 +1622,7 @@ _IconListPresenter::DrawEmptyList(void) pFont = __pIconListView->GetFallbackFont(); SysTryCatch(NID_UI, pFont != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - pTextObject = new (std::nothrow) TextObject; + pTextObject = new (std::nothrow) TextObject(); SysTryCatch(NID_UI, pTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTextObject->Construct(); @@ -2037,6 +2051,11 @@ _IconListPresenter::AdjustLayout(void) _Scroll* pScroll = __pIconListView->GetScroll(); if (pScroll != null) { + if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB) + { + ChangeScrollBarVisibility(bounds.height, __scrollLength + bounds.height); + } + pScroll->SetScrollRange(bounds.height, __scrollLength + bounds.height); if (_FloatCompareLE(__scrollLength, 0.0f)) @@ -2118,6 +2137,12 @@ _IconListPresenter::AdjustLayout(void) _Scroll* pScroll = __pIconListView->GetScroll(); if (pScroll != null) { + + if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB) + { + ChangeScrollBarVisibility(bounds.width, __scrollLength + bounds.width); + } + pScroll->SetScrollRange(bounds.width, __scrollLength + bounds.width); if (_FloatCompareLE(__scrollLength, 0.0f)) @@ -2205,6 +2230,13 @@ _IconListPresenter::RedrawItem(int index, bool drawFocusUi, bool doShow) { pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED); } + else if (__isTouchPressed && __selectedIndex == index && !drawFocusUi) + { + if (__pIconListView->IsInReorderingMode() == false) + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED, index, true); + } + } else if (__highlightedIndex == index && drawFocusUi) { pItem->DrawItem(itemRect, LIST_ITEM_STATE_HIGHLIGHTED); @@ -2217,7 +2249,7 @@ _IconListPresenter::RedrawItem(int index, bool drawFocusUi, bool doShow) if (_AccessibilityManager::IsActivated()) { _AccessibilityElement* pAccessibilityElement = pItem->GetItemAccessibilityElement(); - if (pAccessibilityElement->GetParent() == null && __needSetAccessibility) + if ((pAccessibilityElement == null || pAccessibilityElement->GetParent() == null) && __needSetAccessibility) { pItem->SetItemAccessibilityElement(itemRect, index); SetAccessibilityElement(index, pItem); @@ -2386,7 +2418,7 @@ _IconListPresenter::SetScrollPosition(float position, bool enableFadeEffect) } result r = E_SUCCESS; - _Scroll *pScroll =__pIconListView->GetScroll(); + _Scroll* pScroll =__pIconListView->GetScroll(); if (pScroll != null) { pScroll->SetScrollingEffectVisibility(true); @@ -2585,7 +2617,7 @@ _IconListPresenter::StartTouchActionTimer(void) if (__pTouchActionTimer == null) { - __pTouchActionTimer = new (std::nothrow) Timer; + __pTouchActionTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pTouchActionTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pTouchActionTimer->Construct(*this); @@ -2622,7 +2654,7 @@ _IconListPresenter::StartMagneticScrollTimer(void) if (__pMagneticScrollTimer == null) { - __pMagneticScrollTimer = new (std::nothrow) Timer; + __pMagneticScrollTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pMagneticScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pMagneticScrollTimer->Construct(*this); @@ -2664,7 +2696,7 @@ _IconListPresenter::StartReorderScrollTimer(void) if (__pReorderScrollTimer == null) { - __pReorderScrollTimer = new (std::nothrow) Timer; + __pReorderScrollTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pReorderScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pReorderScrollTimer->Construct(*this); @@ -2701,7 +2733,7 @@ _IconListPresenter::StartAnimationTimer(int delay) if (__pAnimationTimer == null) { - __pAnimationTimer = new (std::nothrow) Timer; + __pAnimationTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pAnimationTimer->Construct(*this); @@ -2739,7 +2771,7 @@ _IconListPresenter::StartRunningAnimationCheckTimer(void) if (__pRunningAnimationCheckTimer == null) { - __pRunningAnimationCheckTimer = new (std::nothrow) Timer; + __pRunningAnimationCheckTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pRunningAnimationCheckTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pRunningAnimationCheckTimer->Construct(*this); @@ -2777,7 +2809,7 @@ _IconListPresenter::StartFirstShowScrollTimer(void) if (__pFirstShowScrollTimer == null) { - __pFirstShowScrollTimer = new (std::nothrow) Timer; + __pFirstShowScrollTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pFirstShowScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pFirstShowScrollTimer->Construct(*this); @@ -2856,10 +2888,22 @@ _IconListPresenter::OnFocusModeStateChanged(void) void _IconListPresenter::OnDrawFocus(void) { - __highlightedIndex = 0; + if (__highlightedIndex == INVALID_INDEX) + { + __highlightedIndex = 0; + } + DrawFocusUi(__highlightedIndex); } +void +_IconListPresenter::OnFocusLost(void) +{ + if (__highlightedIndex != INVALID_INDEX) + { + RedrawItem(__highlightedIndex, false); + } +} Canvas* _IconListPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) @@ -2927,6 +2971,11 @@ _IconListPresenter::OnPreviewKeyReleased(const _Control& source, const _KeyInfo& bool _IconListPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { + if (!__pIconListView->IsFocusModeStateEnabled() || !__pIconListView->IsVisible() || !__pIconListView->IsEnabled() || !__pIconListView->IsFocusable()) + { + return false; + } + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) { return SetFocusUiIndexVerticalScrollList(keyInfo); @@ -2940,6 +2989,11 @@ _IconListPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo bool _IconListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + if (!__pIconListView->IsFocusModeStateEnabled() || !__pIconListView->IsVisible() || !__pIconListView->IsEnabled() || !__pIconListView->IsFocusable()) + { + return false; + } + switch (keyInfo.GetKeyCode()) { case _KEY_TAB: @@ -2953,7 +3007,6 @@ _IconListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInf if (__highlightedIndex != INVALID_INDEX) { PreDrawCheckAnimation(__highlightedIndex); - FireEventAfterTouchRelease(__highlightedIndex); if (__isTouchAnimationEnabled) { @@ -2963,6 +3016,8 @@ _IconListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInf { DrawCheckAnimation(__highlightedIndex); } + + FireEventAfterTouchRelease(__highlightedIndex); } } break; @@ -3075,7 +3130,6 @@ _IconListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to __isSelectionDelayed = false; PreDrawCheckAnimation(fireIndex); - FireEventAfterTouchRelease(fireIndex); if (__isTouchAnimationEnabled) { @@ -3085,6 +3139,8 @@ _IconListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to { DrawCheckAnimation(fireIndex); } + + FireEventAfterTouchRelease(fireIndex); } else if (__pTouchActionTimer != null) { @@ -3095,7 +3151,6 @@ _IconListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to __isSelectionDelayed = true; PreDrawCheckAnimation(fireIndex); - FireEventAfterTouchRelease(fireIndex); if (__isTouchAnimationEnabled) { @@ -3105,6 +3160,8 @@ _IconListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to { DrawCheckAnimation(fireIndex); } + + FireEventAfterTouchRelease(fireIndex); } } } @@ -4016,7 +4073,7 @@ _IconListPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS) { int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; - currentItemIndex = (__firstDrawnIndex == 0) ? __lastDrawnIndex + 1 : __lastDrawnIndex; + currentItemIndex = (__lastDrawnIndex == lastItemIndex) ? __lastDrawnIndex : __lastDrawnIndex + 1; pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, currentItemIndex)); @@ -4056,7 +4113,14 @@ _IconListPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& __RequestToDrawAccessibilityFocusUi = true; RequestToDrawAccessibilityFocusUi(); - return true; + if (currentItemIndex == lastItemIndex) + { + return false; + } + else + { + return true; + } } return false; } @@ -4925,7 +4989,16 @@ _IconListPresenter::MoveForward(int index) pItemVE = pItem->GetItemVisualElement(); if (pItemVE != null) { - MoveAnimation(*pItem, startBounds, endBounds, ITEM_ANIMATION_DELAY); + if (pItem->IsDrawn()) + { + pItem->ClearVisualElement(); + pItem->SetDrawingProperty(*__pItemDrawingProperty); + pItem->DrawItem(endBounds, LIST_ITEM_STATE_NORMAL); + } + else + { + MoveAnimation(*pItem, startBounds, endBounds, ITEM_ANIMATION_DELAY); + } } } } @@ -5190,8 +5263,15 @@ _IconListPresenter::PreDrawCheckAnimation(int index) void _IconListPresenter::DrawFocusUi(int focusUiIndex) { + StopAllAnimations(); + + // Reset Timer + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; - if (focusUiIndex < 0 ) + if (focusUiIndex < 0) { __highlightedIndex = 0; } @@ -5200,20 +5280,20 @@ _IconListPresenter::DrawFocusUi(int focusUiIndex) __highlightedIndex = lastItemIndex; } - if (!__firstDrawnItemFullyDrawn && (focusUiIndex >= __firstDrawnIndex && focusUiIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1)) + if (!__firstDrawnItemFullyDrawn && (__highlightedIndex >= __firstDrawnIndex && __highlightedIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1)) { - ScrollToItem(focusUiIndex); + ScrollToItem(__highlightedIndex); __pIconListView->Draw(); } - else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - focusUiIndex <= GetItemCountPerAxis() - 1)) + else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - __highlightedIndex <= GetItemCountPerAxis() - 1)) { - ScrollToItem(focusUiIndex); + ScrollToItem(__highlightedIndex); __pIconListView->Draw(); } - if (focusUiIndex < __firstDrawnIndex || focusUiIndex > __lastDrawnIndex) + if (__highlightedIndex < __firstDrawnIndex || __highlightedIndex > __lastDrawnIndex) { - ScrollToItem(focusUiIndex); + ScrollToItem(__highlightedIndex); __pIconListView->Draw(); } @@ -5406,4 +5486,22 @@ _IconListPresenter::SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo) DrawFocusUi(__highlightedIndex); return true; } + +void +_IconListPresenter::ChangeScrollBarVisibility(float viewRange, float scrollRange) +{ + _Scroll* pScroll = __pIconListView->GetScroll(); + SysTryReturnVoidResult(NID_UI_CTRL, (pScroll != NULL), E_SYSTEM, + "[%s] A system error has occurred. _Scroll instance must not be null.", GetErrorMessage(E_SYSTEM)); + + if (viewRange >= scrollRange) + { + pScroll->SetScrollVisibility(false); + } + else + { + pScroll->SetScrollVisibility(true); + } +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListView.cpp b/src/ui/controls/FUiCtrl_IconListView.cpp index fd3cd51..b866e5e 100644 --- a/src/ui/controls/FUiCtrl_IconListView.cpp +++ b/src/ui/controls/FUiCtrl_IconListView.cpp @@ -152,7 +152,7 @@ _IconListView::CreateIconListViewN(IconListViewStyle style) ClearLastResult(); // Create _IconListView - pCore = new (std::nothrow) _IconListView; + pCore = new (std::nothrow) _IconListView(); SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pCore->AcquireHandle(); @@ -204,7 +204,7 @@ _IconListView::Initialize(_IconListPresenter& presenter) SysTryCatch(NID_UI_CTRL, (GetVisualElement() != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to initialize IconList."); // Create _UiIconListItemEvent - __pIconListItemEvent = new (std::nothrow) _UiIconListItemEvent; + __pIconListItemEvent = new (std::nothrow) _UiIconListItemEvent(); SysTryCatch(NID_UI_CTRL, (__pIconListItemEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -212,7 +212,7 @@ _IconListView::Initialize(_IconListPresenter& presenter) SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to construct Event."); // Create _UiScrollEvent - __pScrollEvent = new (std::nothrow) _UiScrollEvent; + __pScrollEvent = new (std::nothrow) _UiScrollEvent(); SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -233,8 +233,8 @@ _IconListView::Initialize(_IconListPresenter& presenter) AnimationTransaction::SetTransactionEventListener(this); - __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryCatch(NID_UI_CTRL, (__pScrollingAnimation != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pScrollingAnimation->SetRepeatCount(SCROLL_ANIMATION_DEFAULT_REPEAT_COUNT); @@ -337,6 +337,12 @@ _IconListView::SetScrollStyle(IconListViewScrollStyle scrollStyle) return E_SUCCESS; } +IconListViewScrollStyle +_IconListView::GetScrollStyle(void) const +{ + return __scrollStyle; +} + result _IconListView::SetBackgroundBitmap(const Bitmap* pBitmap) { @@ -910,7 +916,7 @@ _IconListView::SetScroll(const FloatRectangle& bounds, _ScrollDirection scrollDi (((__scrollStyle == ICON_LIST_SCROLL_STYLE_FIXED) || (__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB)) ? false : true), ((__scrollStyle == ICON_LIST_SCROLL_STYLE_JUMP_TO_TOP) ? true : false), ((__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB) ? true : false), - (((__scrollStyle == ICON_LIST_SCROLL_STYLE_FIXED) || (__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB)) ? true : false), 1, 1, 0); + false, 1, 1, 0); SysTryReturn(NID_UI_CTRL, __pScroll != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -1083,6 +1089,18 @@ _IconListView::OnDrawFocus(void) __pIconListPresenter->OnDrawFocus(); } +bool +_IconListView::OnFocusLost(const _Control& source) +{ + if (&source != this) + { + return false; + } + + __pIconListPresenter->OnFocusLost(); + return true; +} + Canvas* _IconListView::OnCanvasRequestedN(const FloatRectangle& bounds) { diff --git a/src/ui/controls/FUiCtrl_IconListViewImpl.cpp b/src/ui/controls/FUiCtrl_IconListViewImpl.cpp index f1c7ea7..84ece73 100644 --- a/src/ui/controls/FUiCtrl_IconListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_IconListViewImpl.cpp @@ -688,7 +688,7 @@ protected: GetProperty(pControl, &pControlProperty); SysTryReturn(NID_UI, (pControlProperty != null), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to read attributes."); - IconListView* pIconListView = new (std::nothrow) IconListView; + IconListView* pIconListView = new (std::nothrow) IconListView(); SysTryReturn(NID_UI, (pIconListView != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); ClearLastResult(); diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp index a1ad07f..a2d5e09 100644 --- a/src/ui/controls/FUiCtrl_Indicator.cpp +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -20,6 +20,8 @@ */ #include +#include +#include #include #include #include "FUiAnim_VisualElement.h" @@ -29,8 +31,11 @@ #include "FUi_EcoreEvas.h" #include "FUi_ResourceManager.h" #include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiEventManager.h" #include "FUi_Window.h" +#include "FUi_TouchManager.h" #include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" #include "FUiCtrl_Indicator.h" #include "FUiCtrl_IndicatorManager.h" #include "FUiAnim_EflVisualElementSurfaceImpl.h" @@ -40,28 +45,30 @@ using namespace Tizen::Graphics; using namespace Tizen::Ui; using namespace Tizen::Ui::Animations; -namespace Tizen { namespace Ui { namespace Controls +namespace { +const char* pPortraitSvcName = "elm_indicator_portrait"; +const char* pLandScapeSvcName = "elm_indicator_landscape"; +const char* pPortPublicKey = "__Plug_Ecore_Evas_Port"; +const char* pLandPublicKey = "__Plug_Ecore_Evas_Land"; +const char* pIndicatorKey = "Inidcator_Manager_Object"; +const int CONNECTION_INTERVAL = 1000; +const int ANIMATION_INTERVAL = 3000; +const int ANIMATION_DURATION = 200; + +const int MSG_DOMAIN_CONTROL_INDICATOR = 0x10001; +const int MSG_ID_INDICATOR_REPEAT_EVENT = 0x10002; +const int MSG_ID_INDICATOR_START_ANIMATION = 0X10006; +} -static const char* pPortraitSvcName = "elm_indicator_portrait"; -static const char* pLandScapeSvcName = "elm_indicator_landscape"; -static const char* pPortPublicKey = "__Plug_Ecore_Evas_Port"; -static const char* pLandPublicKey = "__Plug_Ecore_Evas_Land"; -static const char* pIndicatorKey = "Inidcator_Manager_Object"; -static const int CONNECTION_INTERVAL = 1000; - -#define MSG_DOMAIN_CONTROL_INDICATOR 0x10001 -#define MSG_ID_INDICATOR_REPEAT_EVENT 0x10002 -#define MSG_ID_INDICATOR_ROTATION 0x10003 -#define MSG_ID_INDICATOR_OPACITY 0X1004 -#define MSG_ID_INDICATOR_TYPE 0X1005 +namespace Tizen { namespace Ui { namespace Controls +{ -typedef enum +struct _IndicatorDataAnimation { - _INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */ - _INDICATOR_TYPE_1, /**< Type 0 the the indicator */ - _INDICATOR_TYPE_2, /**< Type 1 the indicator */ -} _IndicatorTypeMode; + Ecore_X_Window xwin; + double duration; +}; _Indicator* _Indicator::CreateIndicator(void) @@ -69,13 +76,16 @@ _Indicator::CreateIndicator(void) result r = E_SUCCESS; Color bgColor(0xff343432); - _Indicator* pIndicator = new (std::nothrow) _Indicator; + _Indicator* pIndicator = new (std::nothrow) _Indicator(); SysTryReturn(NID_UI_CTRL, pIndicator, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); r = pIndicator->ConstructControlVisualElement(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + pIndicator->__pClientMessageReceived = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _Indicator::OnClientMessageReceived, (void*) pIndicator); + SysTryCatch(NID_UI_CTRL, pIndicator->__pClientMessageReceived, ,E_SYSTEM, "[E_SYSTEM] A system error occurred."); + pIndicator->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); return pIndicator; @@ -89,6 +99,7 @@ _Indicator::_Indicator(void) : __pPortraitIndicatorEvasObject(null) , __pLandscapeIndicatorEvasObject(null) , __pConnectionTimer(null) + , __pAnimationTimer(null) , __pPortraitVisualElement(null) , __pLandscapeVisualElement(null) , __pCurrentVisualElement(null) @@ -98,17 +109,37 @@ _Indicator::_Indicator(void) , __landscapeautohide(false) , __opacity(_INDICATOR_OPACITY_OPAQUE) , __orientation(_CONTROL_ORIENTATION_PORTRAIT) + , __startTouchPoint(0.0f, 0.0f) + , __animating(false) + , __touchPressed(false) + , __quickpanelOpened(false) + , __pClientMessageReceived(null) { } _Indicator::~_Indicator(void) { + + if (__pClientMessageReceived) + { + ecore_event_handler_del(__pClientMessageReceived); + __pClientMessageReceived = null; + } if (__pConnectionTimer != null) { __pConnectionTimer->Cancel(); delete __pConnectionTimer; __pConnectionTimer = null; } + + if (__pAnimationTimer != null) + { + __pAnimationTimer->Cancel(); + delete __pAnimationTimer; + __pAnimationTimer = null; + } + + _UiEventManager::GetInstance()->RemoveTouchEventListener(*this); } result @@ -119,10 +150,13 @@ _Indicator::SetIndicatorShowState(bool state) _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); SysTryReturnResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas"); + Ecore_X_Window win = 0; + if (__pWindow) { r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + win = (Ecore_X_Window)__pWindow->GetNativeHandle(); } __showstate = state; @@ -152,12 +186,22 @@ _Indicator::SetIndicatorAutoHide(bool portrait, bool landscape) { Color bgColor(0x00000000); SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pPortraitVisualElement) + { + __pPortraitVisualElement->SetShowState(false); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2); } else { SetIndicatorOpacity(__opacity); + if (__pPortraitVisualElement) + { + __pPortraitVisualElement->SetShowState(true); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); } } else @@ -166,12 +210,22 @@ _Indicator::SetIndicatorAutoHide(bool portrait, bool landscape) { Color bgColor(0x00000000); SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pLandscapeVisualElement) + { + __pLandscapeVisualElement->SetShowState(false); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2); } else { SetIndicatorOpacity(__opacity); + if (__pLandscapeVisualElement) + { + __pLandscapeVisualElement->SetShowState(true); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); } } __portraitautohide = portrait; @@ -255,20 +309,17 @@ _Indicator::GetIndicatorBounds(void) const const Dimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSize(); const Dimension landscapeSize = Dimension(portraitSize.height, portraitSize.width); - _ControlOrientation orientation = __pWindow->GetOrientation(); - Rectangle indicatorbounds(0, 0, 0, 0); - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) { indicatorbounds.width = portraitSize.width; - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); } else { indicatorbounds.width = landscapeSize.width; - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); } + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); SysTryReturn(NID_UI_CTRL, pCoordSystem, Rectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed."); @@ -287,21 +338,19 @@ _Indicator::GetIndicatorBoundsF(void) const const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); - _ControlOrientation orientation = __pWindow->GetOrientation(); - FloatRectangle indicatorbounds(0.0f, 0.0f, 0.0f, 0.0f); - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) { indicatorbounds.width = portraitSize.width; - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); } else { indicatorbounds.width = landscapeSize.width; - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); } + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height); + _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance(); SysTryReturn(NID_UI_CTRL, pCoordSystem, FloatRectangle(-1.0, -1.0, -1.0, -1.0), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed."); @@ -339,9 +388,9 @@ _Indicator::AddIndicatorObject(_Control* pControl, _Window* pWindow) r = ChangeCurrentVisualElement(__pLandscapeVisualElement); } - Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); + Ecore_Evas* pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); SysTryReturn(NID_UI_CTRL, pPortraitEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); - Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); + Ecore_Evas* pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); SysTryReturn(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); ecore_evas_data_set(pPortraitEe, pPortPublicKey, __pPortraitIndicatorEvasObject); @@ -354,6 +403,8 @@ _Indicator::AddIndicatorObject(_Control* pControl, _Window* pWindow) ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle); ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle); + Activate(); + return r; } @@ -380,6 +431,21 @@ _Indicator::DeleteIndicatorObject(void) } } + Ecore_Evas* pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); + Ecore_Evas* pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); + + if (pPortraitEe) + { + ecore_evas_callback_delete_request_set(pPortraitEe, null); + ecore_evas_callback_msg_handle_set(pPortraitEe, null); + } + + if (pLandscapeEe) + { + ecore_evas_callback_delete_request_set(pLandscapeEe, null); + ecore_evas_callback_msg_handle_set(pLandscapeEe, null); + } + __pPortraitIndicatorEvasObject = null; __pLandscapeIndicatorEvasObject = null; __pPortraitVisualElement = null; @@ -410,6 +476,13 @@ _Indicator::ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pV void _Indicator::OnChangeLayout(_ControlOrientation orientation) { + RemoveIndicatorAnimations(); + if (__pAnimationTimer != null) + { + __pAnimationTimer->Cancel(); + __animating = false; + } + Ecore_X_Window win = 0; if (__pWindow) { @@ -427,12 +500,22 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) { Color bgColor(0x00000000); SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pPortraitVisualElement) + { + __pPortraitVisualElement->SetShowState(false); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2); } else { SetIndicatorOpacity(__opacity); + if (__pPortraitVisualElement) + { + __pPortraitVisualElement->SetShowState(true); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); } } @@ -445,12 +528,22 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) { Color bgColor(0x00000000); SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pLandscapeVisualElement) + { + __pLandscapeVisualElement->SetShowState(false); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2); } else { SetIndicatorOpacity(__opacity); + if (__pLandscapeVisualElement) + { + __pLandscapeVisualElement->SetShowState(true); + } ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); } } } @@ -471,41 +564,48 @@ _Indicator::OnAttachedToMainTree(void) void _Indicator::OnTimerExpired(Timer& timer) { - Eina_Bool result = EINA_TRUE; - - _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + if (__pConnectionTimer == &timer) { - result = ecore_evas_extn_plug_connect(__pPortraitIndicatorEvasObject, pPortraitSvcName, 0, EINA_FALSE); + Eina_Bool result = EINA_TRUE; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + result = ecore_evas_extn_plug_connect(__pPortraitIndicatorEvasObject, pPortraitSvcName, 0, EINA_FALSE); + } + else + { + result = ecore_evas_extn_plug_connect(__pLandscapeIndicatorEvasObject, pLandScapeSvcName, 0, EINA_FALSE); + } + + if (result == EINA_TRUE) + { + timer.Cancel(); + } + else + { + timer.Start(CONNECTION_INTERVAL); + } } - else + else if(__pAnimationTimer == &timer) { - result = ecore_evas_extn_plug_connect(__pLandscapeIndicatorEvasObject, pLandScapeSvcName, 0, EINA_FALSE); - } + ShowIndicatorEffect(false, ANIMATION_DURATION); - if (result == EINA_TRUE) - { timer.Cancel(); - } - else - { - timer.Start(CONNECTION_INTERVAL); + __animating = false; } } void -_Indicator::OnDisconnected(Ecore_Evas *pEe) +_Indicator::OnDisconnected(Ecore_Evas* pEe) { _Indicator* pIndicator = (_Indicator*)ecore_evas_data_get(pEe, pIndicatorKey); SysTryReturnVoidResult(NID_UI_CTRL, pIndicator, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object"); if (pIndicator->__pConnectionTimer == null) { - pIndicator->__pConnectionTimer = new (std::nothrow) Timer; - if (pIndicator->__pConnectionTimer == null) - { - return; - } + pIndicator->__pConnectionTimer = new (std::nothrow) Timer(); + SysTryReturnVoidResult(NID_UI_CTRL, pIndicator->__pConnectionTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pIndicator->__pConnectionTimer->Construct(*pIndicator); if (r != E_SUCCESS) @@ -572,13 +672,16 @@ _Indicator::IsNotificationTrayOpenEnabled(void) const } void -_Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size) +_Indicator::OnMessageHandle(Ecore_Evas* pEe, int msgDomain, int msgId, void *data, int size) { if (!data) { return; } + _Indicator* pIndicator = (_Indicator*)ecore_evas_data_get(pEe, pIndicatorKey); + SysTryReturnVoidResult(NID_UI_CTRL, pIndicator, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object"); + Evas_Object* pPortraitIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pPortPublicKey); Evas_Object* pLandscapeIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pLandPublicKey); @@ -586,7 +689,7 @@ _Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *dat { if (msgId == MSG_ID_INDICATOR_REPEAT_EVENT) { - int *repeat = (int*)data; + int* repeat = (int*)data; if (1 == *repeat) { if (pPortraitIndicatorEvasObject) @@ -610,7 +713,93 @@ _Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *dat } } } + else if (msgId == MSG_ID_INDICATOR_START_ANIMATION) + { + _IndicatorDataAnimation* pData = (_IndicatorDataAnimation*)data; + Ecore_X_Window win = 0; + _Window* pWindow = pIndicator->__pWindow; + if (pWindow) + { + win = (Ecore_X_Window)pWindow->GetNativeHandle(); + } + + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + + if (pData->xwin == win) + { + if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (pIndicator->__portraitautohide) + { + pIndicator->ShowIndicatorEffect(true, pData->duration); + } + } + else + { + if (pIndicator->__landscapeautohide) + { + pIndicator->ShowIndicatorEffect(true, pData->duration); + } + } + } + else + { + if (pFrame) + { + if (pFrame->IsFrameActivated()) + { + if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (pIndicator->__portraitautohide) + { + pIndicator->ShowIndicatorEffect(true, pData->duration); + } + } + else + { + if (pIndicator->__landscapeautohide) + { + pIndicator->ShowIndicatorEffect(true, pData->duration); + } + } + } + } + + } + } + + } +} + +Eina_Bool +_Indicator::OnClientMessageReceived(void* pData, int type, void* pEvent) +{ + SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pEvent, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + _Indicator* pIndicator = static_cast<_Indicator*>(pData); + SysTryReturn(NID_UI_CTRL, pIndicator, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object."); + + Ecore_X_Event_Client_Message *pClientEvent = (Ecore_X_Event_Client_Message*)(pEvent); + + if (pClientEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE) + { + if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (pIndicator->__portraitautohide) + { + pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION); + } + } + else + { + if (pIndicator->__landscapeautohide) + { + pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION); + } + } } + return EINA_TRUE; } HitTestResult @@ -626,55 +815,457 @@ _Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point) return HIT_TEST_NOWHERE; } - Evas_Object* pImageObject = null; - if (this->__pCurrentVisualElement) + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + return HIT_TEST_NOWHERE; + } + else + { + return HIT_TEST_MATCH; + } + } + else + { + if (__landscapeautohide) + { + return HIT_TEST_NOWHERE; + } + else + { + return HIT_TEST_MATCH; + } + } + +} + +void +_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation) +{ + __orientation = orientation; +} + +void +_Indicator::SetWindow(_Window* pWindow) +{ + __pWindow = pWindow; +} + +result +_Indicator::ShowIndicatorEffect(bool down, int duration) +{ + Ecore_X_Window win = 0; + if (__pWindow) + { + win = (Ecore_X_Window)__pWindow->GetNativeHandle(); + } + + VisualElementPropertyAnimation* pSlideAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnResult(NID_UI_CTRL, pSlideAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pSlideAnimation->SetDuration(duration); + pSlideAnimation->SetPropertyName(L"bounds.position"); + pSlideAnimation->SetVisualElementAnimationStatusEventListener(this); + + float indicatorHeight = 0.0f; + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __orientation, indicatorHeight); + + String* pUserData = null; + if (down) + { + Color bgColor(0xff1e1e1e); + SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__pPortraitVisualElement) + { + __pPortraitVisualElement->SetShowState(true); + } + } + else + { + if (__pLandscapeVisualElement) + { + __pLandscapeVisualElement->SetShowState(true); + } + } + + pSlideAnimation->SetStartValue(Variant(FloatPoint(0.0f, -indicatorHeight))); + pSlideAnimation->SetEndValue(Variant(FloatPoint(0.0f, 0.0f))); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1); + pUserData = new (std::nothrow) String(L"DownAnimation"); + SysTryReturnResult(NID_UI_CTRL, pUserData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + else + { + pSlideAnimation->SetStartValue(Variant(FloatPoint(0.0f, 0.0f))); + pSlideAnimation->SetEndValue(Variant(FloatPoint(0.0f, -indicatorHeight))); + ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2); + pUserData = new (std::nothrow) String(L"UpAnimation"); + SysTryReturnResult(NID_UI_CTRL, pUserData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + pSlideAnimation->SetUserData((void*)(pUserData)); + AddAnimation(L"bounds.position", *pSlideAnimation); + + delete pSlideAnimation; + + return E_SUCCESS; +} + +void +_Indicator::RemoveIndicatorAnimations(void) +{ + if (__pAnimationTimer) + { + __pAnimationTimer->Cancel(); + } + RemoveAllAnimations(); +} + +bool +_Indicator::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (IsVisible() ==false) + { + return false; + } + + int pointId = touchinfo.GetPointId(); + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + + FloatPoint touchPosition = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition()); + int indicatorHeight = 0; + if (__pWindow) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight); + } + else { - _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement); - if (pImpl) + return false; + } + if (touchPosition.y < indicatorHeight) + { + __startTouchPoint = touchPosition; + + if (__animating) + { + return true; + } + else + { + __touchPressed = true; + __pointId = pointId; + } + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) { - _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode()); - if (pNativeNode) + if (__portraitautohide) { - VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface(); - if (pPortraitSurface) + return false; + } + else + { + return true; + } + } + else + { + if (__landscapeautohide) + { + return false; + } + else + { + return true; + } + } + } + + if (pTouchManager->IsListenerOnly(pointId) == true) + { + return true; + } + else + { + if (__animating) + { + RemoveIndicatorAnimations(); + __animating = false; + ShowIndicatorEffect(false, ANIMATION_DURATION); + } + return false; + } +} + +bool +_Indicator::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (IsVisible() == false) + { + return false; + } + + __startTouchPoint = FloatPoint(0.0f, 0.0f); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + + if (__touchPressed) + { + if (touchinfo.GetPointId() == __pointId) + { + __touchPressed = false; + } + + FloatPoint touchPosition = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition()); + float indicatorHeight = 0.0f; + if (__pWindow) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight); + } + else + { + return false; + } + if (touchPosition.y < indicatorHeight) + { + if (__animating) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) { - _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface)); - if (pSurface) + if(pTouchManager->GetTouchControlSource() == &source) { - pImageObject = (Evas_Object*)pSurface->GetNativeHandle(); + SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled"); + pTouchManager->SetTouchCanceled(null); } } + return true; + } + } + + if (pTouchManager->IsListenerOnly(touchinfo.GetPointId()) == true) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + if(pTouchManager->GetTouchControlSource() == &source) + { + SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled"); + pTouchManager->SetTouchCanceled(null); + } } + return true; + } + else + { + return false; } } + else if (__quickpanelOpened == true) + { + OnChangeLayout(__orientation); + __quickpanelOpened = false; + } + return false; +} + +bool +_Indicator::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + bool r = false; + + if (IsVisible() == false) + { + return false; + } + + int pointId = touchinfo.GetPointId(); + _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (pImageObject) + if (__touchPressed) { - if (!evas_object_repeat_events_get(pImageObject)) + FloatPoint touchPoint = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition()); + float gap = touchPoint.y - __startTouchPoint.y; + + int touchGap = 0; + if (__pWindow) { - return HIT_TEST_MATCH; + GET_SHAPE_CONFIG(FORM::INDICATOR_TOUCH_GAP, __pWindow->GetOrientation(), touchGap); } else { - return HIT_TEST_NOWHERE; + return false; + } + + if (gap < touchGap || __animating) + { + } + else + { + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + ShowIndicatorEffect(true, ANIMATION_DURATION); + } + } + else + { + if (__landscapeautohide) + { + ShowIndicatorEffect(true, ANIMATION_DURATION); + } + } + } + + if (pTouchManager->IsListenerOnly(pointId) == true) + { + r = true; + } + else + { + r = false; } } else { - return HIT_TEST_NOWHERE; + if (__pAnimationTimer) + { + __pAnimationTimer->Cancel(); + } + __quickpanelOpened = true; + __animating = false; + + int indicatorHeight = 0; + if (__pWindow) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight); + } + + if (__startTouchPoint.y == 0.0f) + { + r = false; + } + else + { + r = true; + } } + return r; +} + +bool +_Indicator::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; } void -_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation) +_Indicator::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) { - __orientation = orientation; + String* pUserData = (String*) animation.GetUserData(); + + if ((pUserData != null) && (*pUserData == String(L"DownAnimation"))) + { + if (__pAnimationTimer == null) + { + __pAnimationTimer = new (std::nothrow) Timer(); + SysTryReturnVoidResult(NID_UI_CTRL, __pAnimationTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = __pAnimationTimer->Construct(*this); + if (r != E_SUCCESS) + { + delete __pAnimationTimer; + __pAnimationTimer = null; + + return; + } + } + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + __pAnimationTimer->Start(ANIMATION_INTERVAL); + __animating = true; + } + } + else + { + if (__landscapeautohide) + { + __pAnimationTimer->Start(ANIMATION_INTERVAL); + __animating = true; + } + } + } } void -_Indicator::SetWindow(_Window* pWindow) +_Indicator::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) { - __pWindow = pWindow; + +} + +void +_Indicator::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) +{ + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + String* pUserData = (String*) animation.GetUserData(); + + if ((pUserData != null) && (*pUserData == String(L"UpAnimation"))) + { + Color bgColor(0x00000000); + + int indicatorHeight = 0; + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight); + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pPortraitVisualElement && __portraitautohide) + { + __pPortraitVisualElement->SetShowState(false); + } + } + SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorHeight)); + } + else + { + if (__landscapeautohide) + { + SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + if (__pLandscapeVisualElement && __landscapeautohide) + { + __pLandscapeVisualElement->SetShowState(false); + } + } + SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorHeight)); + } + delete pUserData; + } +} + +void +_Indicator::Activate(void) +{ + _UiEventManager::GetInstance()->AddTouchEventListener(*this); + + return; +} + +void +_Indicator::Deactivate(void) +{ + _UiEventManager::GetInstance()->RemoveTouchEventListener(*this); + + return; } }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IndicatorManager.cpp b/src/ui/controls/FUiCtrl_IndicatorManager.cpp index 82b9385..48aed9a 100644 --- a/src/ui/controls/FUiCtrl_IndicatorManager.cpp +++ b/src/ui/controls/FUiCtrl_IndicatorManager.cpp @@ -33,7 +33,6 @@ #include "FUiCtrl_IndicatorManager.h" #include "FUiCtrl_Form.h" #include "FUiCtrl_Frame.h" -#include "FUiCtrl_Popup.h" #include "FUiCtrl_Keypad.h" using namespace Tizen::Base::Collection; @@ -62,7 +61,7 @@ _IndicatorManager::Initialize(void) { if (!__pInstance) { - __pInstance = new (std::nothrow)_IndicatorManager; + __pInstance = new (std::nothrow)_IndicatorManager(); SysAssert(__pInstance); } } @@ -254,10 +253,9 @@ _IndicatorManager::AddWindow(_Window* pWindow) result r = E_SUCCESS; _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); - _Popup* pPopup = dynamic_cast<_Popup*>(pWindow); _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow); - if ((pFrame == null) && (pPopup == null) && (pKeypad ==null)) + if ((pFrame == null) && (pKeypad == null)) { return E_SUCCESS; } @@ -276,10 +274,9 @@ _IndicatorManager::DeleteWindow(_Window* pWindow) IndicatorComponent* pIndicatorComponentArray = null; _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); - _Popup* pPopup = dynamic_cast<_Popup*>(pWindow); _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow); - if ((pFrame == null) && (pPopup == null) && (pKeypad ==null)) + if ((pFrame == null) && (pKeypad == null)) { return E_SUCCESS; } @@ -363,7 +360,7 @@ _IndicatorManager::MakeIndicatorComponentArrayN(_Window* pWindow) VisualElementSurface* pPortraitSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pWindow->GetDisplayContext(), reinterpret_cast(pPortraitEvasObject), GetIndicatorSize(_INDICATOR_ORIENTATION_PORTRAIT)); VisualElementSurface* pLandScapeSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pWindow->GetDisplayContext(), reinterpret_cast(pLandscapeEvasObject), GetIndicatorSize(_INDICATOR_ORIENTATION_LANDSCAPE)); - pPortraitVisualElement = new (std::nothrow) _VisualElement; + pPortraitVisualElement = new (std::nothrow) _VisualElement(); SysTryCatch(NID_UI_CTRL, pPortraitVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); r = pPortraitVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred."); @@ -372,7 +369,7 @@ _IndicatorManager::MakeIndicatorComponentArrayN(_Window* pWindow) pPortraitVisualElement->SetSurface(pPortraitSurface); pPortraitVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, portraitsize.width, portraitsize.height)); - pLandscapeVisualElement = new (std::nothrow) _VisualElement; + pLandscapeVisualElement = new (std::nothrow) _VisualElement(); SysTryCatch(NID_UI_CTRL, pLandscapeVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); r = pLandscapeVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred."); diff --git a/src/ui/controls/FUiCtrl_InputPad.cpp b/src/ui/controls/FUiCtrl_InputPad.cpp index 879d7a7..9f8c396 100644 --- a/src/ui/controls/FUiCtrl_InputPad.cpp +++ b/src/ui/controls/FUiCtrl_InputPad.cpp @@ -218,7 +218,7 @@ _InputPad::SetAllAccessibilityElement(void) int returnValue = __pInputPadPresenter->GetReturnValue(index); if (returnValue >= 0) { - _AccessibilityElement* pElement = new _AccessibilityElement(true); + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); if (pElement != null) { if (__pInputPadPresenter->GetInputPadStyle() == INPUTPAD_STYLE_ALPHA) diff --git a/src/ui/controls/FUiCtrl_InputPadPresenter.cpp b/src/ui/controls/FUiCtrl_InputPadPresenter.cpp index afd7460..d8b38a3 100644 --- a/src/ui/controls/FUiCtrl_InputPadPresenter.cpp +++ b/src/ui/controls/FUiCtrl_InputPadPresenter.cpp @@ -124,13 +124,11 @@ _InputPadPresenter::LoadResource(void) Color buttonColor[DATETIME_STATUS_MAX]; Color replacementColor = Color::GetColor(COLOR_ID_MAGENTA); - Bitmap* pButtonBgNormalBitmap[DATETIME_STATUS_MAX]; bool isCustomBitmap[DATETIME_STATUS_MAX]; for (int i = 0; i < DATETIME_STATUS_MAX; i++) { buttonColor[i] = Color(); - pButtonBgNormalBitmap[i] = null; isCustomBitmap[i] = false; } @@ -142,63 +140,58 @@ _InputPadPresenter::LoadResource(void) r = GET_BITMAP_CONFIG_N(INPUTPAD::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadBackgroundBitmap); SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); - r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_NORMAL]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_SELECTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_DISABLED]); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - isCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_NORMAL); isCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_PRESSED); isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_HIGHLIGHTED); isCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_DISABLED); - for (int i = 0; i < DATETIME_STATUS_MAX; i++) + if (isCustomBitmap[DATETIME_STATUS_NORMAL]) { - if (isCustomBitmap[i]) - { - __pKeypadButtonNormalBitmap[i] = pButtonBgNormalBitmap[i]; - } - else - { - __pKeypadButtonNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormalBitmap[i], replacementColor, buttonColor[i]); - SysTryCatch(NID_UI_CTRL, (__pKeypadButtonNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - } + r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - if (!isCustomBitmap[DATETIME_STATUS_NORMAL]) + else { + r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_NORMAL], __pKeypadButtonNormalBitmap[DATETIME_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_NORMAL]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - if (!isCustomBitmap[DATETIME_STATUS_SELECTED]) + if (isCustomBitmap[DATETIME_STATUS_SELECTED]) + { + r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else { + r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_SELECTED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_SELECTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_SELECTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - if (!isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) + if (isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED]) { + r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_HIGHLIGHTED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - if (!isCustomBitmap[DATETIME_STATUS_DISABLED]) + if (isCustomBitmap[DATETIME_STATUS_DISABLED]) { - r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_DISABLED]); + r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_DISABLED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - - for (int i = 0; i < DATETIME_STATUS_MAX; i++) + else { - delete pButtonBgNormalBitmap[i]; + r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_DISABLED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } return r; @@ -209,7 +202,6 @@ CATCH: for (int i = 0; i < DATETIME_STATUS_MAX; i++) { - delete pButtonBgNormalBitmap[i]; delete __pKeypadButtonNormalBitmap[i]; __pKeypadButtonNormalBitmap[i] = null; @@ -295,12 +287,24 @@ _InputPadPresenter::Draw(void) r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Propagating."); + pCanvas->Clear(); + bgBounds = pCanvas->GetBoundsF(); if(__pKeypadBackgroundBitmap != null) { - r = pCanvas->DrawNinePatchedBitmap(bgBounds, *__pKeypadBackgroundBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pKeypadBackgroundBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bgBounds, *__pKeypadBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + bgBounds.x = (bgBounds.width - __pKeypadBackgroundBitmap->GetWidthF()) / 2; + bgBounds.y = (bgBounds.height - __pKeypadBackgroundBitmap->GetHeightF()) / 2; + r = pCanvas->DrawBitmap(FloatPoint(bgBounds.x, bgBounds.y), *__pKeypadBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } } r = DrawAllButtons(*pCanvas); diff --git a/src/ui/controls/FUiCtrl_Keypad.cpp b/src/ui/controls/FUiCtrl_Keypad.cpp old mode 100755 new mode 100644 index cba15f6..62e85f0 --- a/src/ui/controls/FUiCtrl_Keypad.cpp +++ b/src/ui/controls/FUiCtrl_Keypad.cpp @@ -54,8 +54,7 @@ using namespace Tizen::System; namespace Tizen { namespace Ui { namespace Controls { const int COMMAND_DONE_BUTTON_ID = 100; -const int COMMAND_CANCEL_BUTTON_ID = 101; -const int FOOTER_BACK_BUTTON_ID = 102; +const int FOOTER_BACK_BUTTON_ID = 101; IMPLEMENT_PROPERTY(_Keypad); @@ -99,7 +98,7 @@ _Keypad::CreateKeypadN(void) FloatRectangle landBounds(0.0f, 0.0f, screenSize.width, screenSize.height); _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); - _Keypad* pKeypad = new (std::nothrow) _Keypad; + _Keypad* pKeypad = new (std::nothrow) _Keypad(); result r = GetLastResult(); SysTryCatch(NID_UI_CTRL, pKeypad, , r, "[%s] Propagating.", GetErrorMessage(r)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -108,6 +107,9 @@ _Keypad::CreateKeypadN(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + // For DragAndDrop + pEcoreEvas->SetDragAndDropEnabled(*pKeypad); + pEcoreEvas->SetWindowRotationBounds(*pKeypad, 0, portBounds); pEcoreEvas->SetWindowRotationBounds(*pKeypad, 180, portBounds); pEcoreEvas->SetWindowRotationBounds(*pKeypad, 90, landBounds); @@ -166,10 +168,10 @@ _Keypad::Initialize(int editStyle, _KeypadStyleInfo keypadStyleInfo, int limitLe __pCallerEdit = null; } - if ( __pChildEdit == null) + if (__pChildEdit == null) { __pChildEdit = _Edit::CreateEditN(); - SysTryCatch(NID_UI_CTRL, __pChildEdit, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Unable to create Edit"); + SysTryCatch(NID_UI_CTRL, __pChildEdit, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); String doneText; String cancelText; @@ -331,7 +333,7 @@ _Keypad::CreateFooter(void) FloatDimension screenSize = pControlManager->GetScreenSizeF(); pFooter = _Toolbar::CreateToolbarN(false); - SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pFooter->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -391,7 +393,7 @@ _Keypad::CreateButtonItemN(int actionId, const String& text) { result r = E_SUCCESS; _Button* pButton = _Button::CreateButtonN(); - SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance."); + SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pButton->SetActionId(actionId); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -478,7 +480,7 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) } else { - if ( isKeypadExist || isClipboardExist) + if (isKeypadExist || isClipboardExist) { if (isKeypadExist) { @@ -573,6 +575,7 @@ _Keypad::OnNativeWindowActivated(void) { __pChildEdit->SetFocused(); __isFirstCall = false; + ChangeLayoutInternal(LAYOUT_CHANGE_NONE); } return; @@ -877,4 +880,26 @@ _Keypad::IsLayoutChangable(void) const return true; } +void +_Keypad::OnActivated(void) +{ + _Window::OnActivated(); + + if (__pIndicator) + { + __pIndicator->Activate(); + } +} + +void +_Keypad::OnDeactivated(void) +{ + _Window::OnDeactivated(); + + if (__pIndicator) + { + __pIndicator->Deactivate(); + } +} + } } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_KeypadEvent.cpp b/src/ui/controls/FUiCtrl_KeypadEvent.cpp index 9737a87..cf3f169 100644 --- a/src/ui/controls/FUiCtrl_KeypadEvent.cpp +++ b/src/ui/controls/FUiCtrl_KeypadEvent.cpp @@ -132,7 +132,7 @@ _KeypadEvent* _KeypadEvent::CreateInstanceN(const _Control& source) { _KeypadEvent* pCoreKeypadEvent = new (std::nothrow) _KeypadEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -159,11 +159,11 @@ _KeypadEvent::FireImpl(IEventListener& listener, const IEventArg& arg) // param checking _IKeypadEventListener* pKeypadEventListener = dynamic_cast <_IKeypadEventListener*>(&listener); SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); const _KeypadEventArg* pKeypadEventArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + "[E_INVALID_ARG] The invalid Event Argument was given."); CoreKeypadAction keypadAction = pKeypadEventArg->GetKeypadActionId(); @@ -203,7 +203,7 @@ IEventArg* _KeypadEvent::CreateKeypadEventArgN(CoreKeypadAction actionId, CoreKeypadEventStatus status) { _KeypadEventArg* pEventArg = new (std::nothrow) _KeypadEventArg(actionId, status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_KeypadImpl.cpp b/src/ui/controls/FUiCtrl_KeypadImpl.cpp index caa0742..3beabc0 100644 --- a/src/ui/controls/FUiCtrl_KeypadImpl.cpp +++ b/src/ui/controls/FUiCtrl_KeypadImpl.cpp @@ -142,7 +142,7 @@ _KeypadImpl::Initialize(KeypadStyle keypadStyle, KeypadInputModeCategory categor SysTryReturn(NID_UI_CTRL, (__pPublicTextEvent == null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance is already constructed."); __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic()); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pKeypad->AddTextEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_Label.cpp b/src/ui/controls/FUiCtrl_Label.cpp index e8ba7f9..5928d6c 100644 --- a/src/ui/controls/FUiCtrl_Label.cpp +++ b/src/ui/controls/FUiCtrl_Label.cpp @@ -588,8 +588,8 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const FloatRectangle previousRect = pTextObject->GetBoundsF(); TextObjectActionType previousActionType = pTextObject->GetAction(); - dimension.width = GetBoundsF().width - __leftMargin * 2; - dimension.height = GetBoundsF().height - __topMargin * 2; + dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin); + dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin); _ControlOrientation orientation = GetOrientation(); if (orientation == _CONTROL_ORIENTATION_PORTRAIT) @@ -605,12 +605,22 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const if (horizontalMode == true) { - FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - __leftMargin, dimension.height); + FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - (__leftMargin + __rightMargin), dimension.height); pTextObject->SetBounds(bounds); pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); pTextObject->Compose(); - textSize = pTextObject->GetTextExtentF(); + int displayLineCount = pTextObject->GetDisplayLineCount(); + int offSet = pTextObject->GetFirstTextIndexAt(displayLineCount - 1); + + if (displayLineCount == 1) + { + textSize = pTextObject->GetTextExtentF(offSet, pTextObject->GetTextLength() - offSet); + } + else + { + textSize = pTextObject->GetTextExtentF(); + } dimension.width = (textSize.width < bounds.width) ? textSize.width : bounds.width; } @@ -630,8 +640,8 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const pTextObject->SetBounds(previousRect); pTextObject->SetAction(previousActionType); - dimension.width += __leftMargin * 2; - dimension.height += __topMargin * 2; + dimension.width += (__leftMargin + __rightMargin); + dimension.height += (__topMargin + __bottomMargin); if (__pBackgroundBitmap != null) { @@ -645,5 +655,38 @@ _Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const return dimension; } +int +_Label::GetTextExtentSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentSizeF()); +} + +float +_Label::GetTextExtentSizeF(void) const +{ + float textExtentSize = 0.0f; + + TextObject* pTextObject = __pLabelPresenter->GetTextObject(); + Font* pFont = __pLabelPresenter->GetFont(); + + TextObjectActionType previousActionType = pTextObject->GetAction(); + TextObjectWrapType previousWrapType = pTextObject->GetWrap(); + FloatRectangle previousRect = pTextObject->GetBoundsF(); + + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); + pTextObject->Compose(); + + textExtentSize = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength()).width; + + pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); + pTextObject->SetWrap(previousWrapType); + pTextObject->Compose(); + + return textExtentSize; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_LabelImpl.cpp b/src/ui/controls/FUiCtrl_LabelImpl.cpp index 1ae2f58..6969766 100644 --- a/src/ui/controls/FUiCtrl_LabelImpl.cpp +++ b/src/ui/controls/FUiCtrl_LabelImpl.cpp @@ -246,6 +246,7 @@ _LabelImpl::SetTextVerticalAlignment(VerticalAlignment alignment) result _LabelImpl::SetTextConfig(int size, LabelTextStyle style) { + SysTryReturn(NID_UI_CTRL, size >= 6, E_INVALID_ARG, E_INVALID_ARG, "The size of the text should be greater than or equal to 6", GetErrorMessage(E_INVALID_ARG)); result r = GetCore().SetTextConfig(size, style); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); @@ -255,6 +256,7 @@ _LabelImpl::SetTextConfig(int size, LabelTextStyle style) result _LabelImpl::SetTextConfig(float size, LabelTextStyle style) { + SysTryReturn(NID_UI_CTRL, size >= 6.0f, E_INVALID_ARG, E_INVALID_ARG, "The size of the text should be greater than or equal to 6", GetErrorMessage(E_INVALID_ARG)); result r = GetCore().SetTextConfig(size, style); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); @@ -264,6 +266,9 @@ _LabelImpl::SetTextConfig(float size, LabelTextStyle style) result _LabelImpl::SetMargin(int topMargin, int leftMargin) { + topMargin = topMargin < 0 ? 0 : topMargin; + leftMargin = leftMargin < 0 ? 0 : leftMargin; + result r = GetCore().SetMargin(topMargin, leftMargin); SetLastResultReturn(r); } @@ -271,6 +276,9 @@ _LabelImpl::SetMargin(int topMargin, int leftMargin) result _LabelImpl::SetMargin(float topMargin, float leftMargin) { + topMargin = topMargin < 0.0f ? 0.0f : topMargin; + leftMargin = leftMargin < 0.0f ? 0.0f : leftMargin; + result r = GetCore().SetMargin(topMargin, leftMargin); SetLastResultReturn(r); } diff --git a/src/ui/controls/FUiCtrl_LanguageEvent.cpp b/src/ui/controls/FUiCtrl_LanguageEvent.cpp index 26c2aec..af72982 100644 --- a/src/ui/controls/FUiCtrl_LanguageEvent.cpp +++ b/src/ui/controls/FUiCtrl_LanguageEvent.cpp @@ -158,11 +158,11 @@ _LanguageEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _ILanguageEventListener* pLanguageEventListener = dynamic_cast <_ILanguageEventListener*>(&listener); SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); const _LanguageEventArg* pLanguageEventArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + "[E_INVALID_ARG] The invalid Event Argument was given."); LanguageCode currentLanguageCode = pLanguageEventArg->GetCurrentLanguageCode(); LanguageCode previousLanguageCode = pLanguageEventArg->GetPreviousLanguageCode(); diff --git a/src/ui/controls/FUiCtrl_LinkEvent.cpp b/src/ui/controls/FUiCtrl_LinkEvent.cpp index 672f01e..0465bb9 100644 --- a/src/ui/controls/FUiCtrl_LinkEvent.cpp +++ b/src/ui/controls/FUiCtrl_LinkEvent.cpp @@ -157,10 +157,10 @@ void _LinkEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _IUiLinkEventListener* pLinkEventListener = dynamic_cast <_IUiLinkEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given."); _LinkEventArg* pLinkEventArg = dynamic_cast <_LinkEventArg*>(const_cast (&arg)); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given."); const String text = pLinkEventArg->GetText(); LinkType linkType = pLinkEventArg->GetLinkType(); diff --git a/src/ui/controls/FUiCtrl_ListBaseImpl.cpp b/src/ui/controls/FUiCtrl_ListBaseImpl.cpp index fbdb1a2..ef7fffe 100644 --- a/src/ui/controls/FUiCtrl_ListBaseImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListBaseImpl.cpp @@ -50,7 +50,7 @@ _ListBaseImpl::_ListBaseImpl(Control* pList, _TableView* pCore) GET_SHAPE_CONFIG(LIST::LIST_DEFAULT_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, _defaultItemHeight); GET_COLOR_CONFIG(TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL, __emptyTextColor); - for (int i = 0; i < CHECK_BOX_MAX; i++) + for (int i = 0; i < BITMAP_MAX; i++) { _pCheckBitmaps[i] = null; } @@ -59,11 +59,19 @@ _ListBaseImpl::_ListBaseImpl(Control* pList, _TableView* pCore) _ListBaseImpl::~_ListBaseImpl(void) { - for (int i = 0; i < CHECK_BOX_MAX; i++) + for (int i = 0; i < BITMAP_MAX; i++) { delete _pCheckBitmaps[i]; } + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + _TableView* pCore = static_cast<_TableView*>(&GetCore()); SysTryReturnVoidResult(NID_UI_CTRL, (pCore != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _TableView core object."); @@ -888,7 +896,7 @@ _ListBaseImpl::SetTextOfEmptyList(const String& text) GetCore().AttachChild(*__pEmptyText); } - TextObject* pText = new (std::nothrow) TextObject; + TextObject* pText = new (std::nothrow) TextObject(); SysTryReturnVoidResult(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); pText->Construct(); diff --git a/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp b/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp index 2aff8c4..cc3e495 100644 --- a/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp @@ -89,7 +89,7 @@ _ListContextItemImpl::CreateListContextItemImplN(ListContextItem* pPublic) result r = E_SUCCESS; _ListContextItemImpl* pImpl = new (std::nothrow) _ListContextItemImpl(pPublic); - SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pImpl->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -107,7 +107,7 @@ result _ListContextItemImpl::Construct(void) { __pContextItem = _ListViewContextItem::CreateListViewContextItemN(0.0f); - SysTryReturn(NID_UI_CTRL, (__pContextItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (__pContextItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Color bgColor(0, 0, 0, 0); GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor); @@ -119,7 +119,7 @@ _ListContextItemImpl::Construct(void) result _ListContextItemImpl::AddElement(int elementId, const String& text, bool enable) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, text, enable) == true), E_SYSTEM, E_SYSTEM, @@ -132,7 +132,7 @@ result _ListContextItemImpl::AddElement(int elementId, const Bitmap& normalBitmap, const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, &normalBitmap, &pressedBitmap, pHighlightedBitmap, enable) == true), @@ -145,7 +145,7 @@ result _ListContextItemImpl::AddElement(int elementId, const String& text, const Bitmap& normalBitmap, const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG, + SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The element ID should not be less than 0.")); SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, text, &normalBitmap, &pressedBitmap, pHighlightedBitmap, enable) == true), @@ -157,7 +157,7 @@ _ListContextItemImpl::AddElement(int elementId, const String& text, const Bitmap result _ListContextItemImpl::SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Color& backgroundColor) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId), + SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId.")); bool ret = __pContextItem->SetElementBackgroundColor(elementId, (ListViewContextItemElementDrawingStatus)status, backgroundColor); @@ -168,7 +168,7 @@ _ListContextItemImpl::SetElementBackgroundColor(int elementId, ListContextItemEl Color _ListContextItemImpl::GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId), + SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId), Color(0), E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId.")); return __pContextItem->GetElementBackgroundColor(elementId, (ListViewContextItemElementDrawingStatus)status); @@ -177,7 +177,7 @@ _ListContextItemImpl::GetElementBackgroundColor(int elementId, ListContextItemEl result _ListContextItemImpl::SetElementTextColor(int elementId, ListContextItemElementStatus status, const Color& textColor) { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId), + SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId.")); bool ret = __pContextItem->SetElementTextColor(elementId, (ListViewContextItemElementDrawingStatus)status, textColor); @@ -188,7 +188,7 @@ _ListContextItemImpl::SetElementTextColor(int elementId, ListContextItemElementS Color _ListContextItemImpl::GetElementTextColor(int elementId, ListContextItemElementStatus status) const { - SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId), + SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId), Color(0), E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId.")); return __pContextItem->GetElementTextColor(elementId, (ListViewContextItemElementDrawingStatus)status); diff --git a/src/ui/controls/FUiCtrl_ListImpl.cpp b/src/ui/controls/FUiCtrl_ListImpl.cpp index a8d69e4..8b7c2d7 100644 --- a/src/ui/controls/FUiCtrl_ListImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListImpl.cpp @@ -580,7 +580,7 @@ _ListImpl::InsertItemAt(int index, const String* pText1, const String* pText2, SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= GetItemCount()), E_OUT_OF_RANGE, "The index(%d) is out of range.", index); - CustomListItem *pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index); + CustomListItem* pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index); SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(), "A system error has occurred. CustomListItem instance is null."); @@ -626,7 +626,7 @@ _ListImpl::SetItemAt(int index, const String* pText1, const String* pText2, __pNumberElements->RemoveAt(index, true); } - CustomListItem *pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index); + CustomListItem* pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index); SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(), "A system error has occurred. CustomListItem instance is null."); @@ -884,7 +884,7 @@ _ListImpl::EnableTextSlide(ListItemText textIndex) SysTryReturnVoidResult(NID_UI_CTRL, (pItem), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); - _CustomListItemImpl *pItemImpl = pItem->__pCustomListItemImpl; + _CustomListItemImpl* pItemImpl = pItem->__pCustomListItemImpl; SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); @@ -908,7 +908,7 @@ _ListImpl::DisableTextSlide(void) SysTryReturnVoidResult(NID_UI_CTRL, (pItem), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); - _CustomListItemImpl *pItemImpl = pItem->__pCustomListItemImpl; + _CustomListItemImpl* pItemImpl = pItem->__pCustomListItemImpl; SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); diff --git a/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp b/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp index 17b8797..7f4f941 100644 --- a/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp @@ -105,7 +105,7 @@ _ListItemBaseImpl* _ListItemBaseImpl::CreateListItemBaseImplN(ListItemBase* pPublic, const FloatDimension& itemSize, ListAnnexStyle style) { _ListItemBaseImpl* pImpl = new (std::nothrow) _ListItemBaseImpl(pPublic); - SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = pImpl->Construct(itemSize, style); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -126,7 +126,7 @@ _ListItemBaseImpl::Construct(const FloatDimension& itemSize, ListAnnexStyle styl ("[E_INVALID_ARG] The item size should be greater than 0.0f")); __pListViewItem = _ListViewItem::CreateListViewItemN(itemSize.height); - SysTryReturn(NID_UI_CTRL, (__pListViewItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (__pListViewItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pListViewItem->SetSize(itemSize); __pListViewItem->SetBounds(FloatRectangle(0.0f, 0.0f, itemSize.width, itemSize.height)); @@ -351,7 +351,7 @@ _ListItemBaseImpl::AddListViewItemEventListener(_IUiListViewItemEventListener& l if (__pEvent == null) { __pEvent = new (std::nothrow) _UiListViewItemEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, __pEvent != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, __pEvent != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } __pEvent->AddListener(listener); diff --git a/src/ui/controls/FUiCtrl_ListViewContextItem.cpp b/src/ui/controls/FUiCtrl_ListViewContextItem.cpp index 3eb3381..94c2abb 100644 --- a/src/ui/controls/FUiCtrl_ListViewContextItem.cpp +++ b/src/ui/controls/FUiCtrl_ListViewContextItem.cpp @@ -70,7 +70,7 @@ _ListViewContextItem* _ListViewContextItem::CreateListViewContextItemN(float itemHeight) { _ListViewContextItem* pItem = new (std::nothrow) _ListViewContextItem(itemHeight); - SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pItem->AcquireHandle(); @@ -98,7 +98,7 @@ _ListViewContextItem::AddElement(int elementId, const String& text, bool enable) contextElement.elementId = elementId; contextElement.pButton = _Button::CreateButtonN(); - SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed."); __elements.push_back(contextElement); @@ -127,7 +127,7 @@ _ListViewContextItem::AddElement(int elementId, const Bitmap* pNormalBitmap, con contextElement.elementId = elementId; contextElement.pButton = _Button::CreateButtonN(); - SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed."); __elements.push_back(contextElement); diff --git a/src/ui/controls/FUiCtrl_ListViewImpl.cpp b/src/ui/controls/FUiCtrl_ListViewImpl.cpp index b9dc6cb..d2a985c 100644 --- a/src/ui/controls/FUiCtrl_ListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListViewImpl.cpp @@ -36,6 +36,7 @@ #include "FUi_TouchLongPressGestureDetector.h" #include "FUi_TouchManager.h" #include "FUi_UiBuilder.h" +#include "FUi_Window.h" #include "FUiCtrl_FastScrollEvent.h" #include "FUiCtrl_FastScrollEventArg.h" #include "FUiCtrl_Label.h" @@ -80,7 +81,7 @@ public: // Add _TouchLongPressGestureDetector __pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __core.AddGestureDetector(*__pLongPressedGesture); result r = __pLongPressedGesture->AddGestureListener(*this); @@ -381,7 +382,7 @@ private: TouchEventInfo publicTouchInfo; _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); - SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); publicTouchInfo.Construct(*pEventArg); @@ -518,10 +519,10 @@ private: FloatPoint startPoint; _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); - SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x, - __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y); + startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF(true).x, + __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF(true).y); pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y, touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); @@ -571,6 +572,7 @@ _ListViewImpl::_ListViewImpl(ListView* pList, _TableView* pCore) , __pAccessibilityElement(null) , __redrawListView(true) , __isOrientationChanged(false) + , __isUpdateListCalled(false) , __needReloadItems(false) , __pPropagatedTouchEventListener(null) { @@ -687,7 +689,7 @@ _ListViewImpl::CreateListViewImplN(ListView* pControl, bool itemDivider, ListScr _TableView* pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, itemDivider, scrollBarStyle); - SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); _ListViewImpl* pImpl = new (std::nothrow) _ListViewImpl(pControl, pCore); @@ -725,7 +727,7 @@ _ListViewImpl::SetItemProvider(IListViewItemProvider& provider) { pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider); SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pProviderAdaptor->SetListViewItemEventListener(*this); @@ -767,7 +769,7 @@ _ListViewImpl::SetItemProvider(IListViewItemProviderF& provider) { pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider); SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pProviderAdaptor->SetListViewItemEventListener(*this); @@ -797,7 +799,7 @@ _ListViewImpl::AddListViewItemEventListener(IListViewItemEventListener& listener if (__pListItemEvent == null) { __pListItemEvent = new (std::nothrow) _ListItemEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pListItemEvent->Construct(GetPublic(), CLASSNAME_LISTVIEW); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event."); @@ -831,7 +833,7 @@ _ListViewImpl::AddFastScrollListener(IFastScrollListener& listener) if (__pFastScrollEvent == null) { __pFastScrollEvent = new (std::nothrow) _FastScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pFastScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct FastScroll Event."); @@ -865,7 +867,7 @@ _ListViewImpl::AddScrollEventListener(IScrollEventListener& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event."); @@ -886,7 +888,7 @@ _ListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event."); @@ -933,7 +935,7 @@ _ListViewImpl::AddUiLinkEventListener(const IUiLinkEventListener& listener) if (__pLinkEvent == null) { __pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); - SysTryReturnVoidResult(NID_UI_CTRL, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); } r = __pLinkEvent->AddListener(listener); @@ -976,10 +978,12 @@ _ListViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon) int _ListViewImpl::GetTopDrawnItemIndex(void) const { + result r = E_SUCCESS; int groupIndex = -1; int itemIndex = -1; - GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); return itemIndex; } @@ -987,10 +991,12 @@ _ListViewImpl::GetTopDrawnItemIndex(void) const int _ListViewImpl::GetBottomDrawnItemIndex(void) const { + result r = E_SUCCESS; int groupIndex = -1; int itemIndex = -1; - GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); return itemIndex; } @@ -1121,12 +1127,29 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type) _ListViewItemStatus itemStatus; memset(&itemStatus, 0, sizeof(_ListViewItemStatus)); bool needChangeEventTarget = false; + bool itemFocused = false; + bool annexFocused = false; + int focusedGroupedIndex = -1; + int focusedItemIndex = -1; if (pListViewItem != null && pListViewItem->IsItemSelected()) { needChangeEventTarget = true; } + GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex); + if (focusedGroupedIndex == 0 && focusedItemIndex == index) + { + if (GetCore().IsAnnexFocused()) + { + annexFocused = true; + } + else + { + itemFocused = true; + } + } + if (needChangeEventTarget && (pListViewItem != null)) { pListViewItem->GetCurrentStatus(itemStatus); @@ -1156,6 +1179,25 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type) pTarget->SetChangingEventTarget(true); _TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget); } + + if (pListViewItem && pListViewItem->IsFocusable() + && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState() + && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated()) + { + if (itemFocused) + { + GetCore().SetFocused(true); + pListViewItem->SetFocused(true); + pListViewItem->DrawFocus(); + itemFocused = false; + } + else if (annexFocused) + { + GetCore().SetFocused(true); + pListViewItem->DrawAnnexFocus(); + annexFocused = false; + } + } } else { @@ -1196,11 +1238,11 @@ _ListViewImpl::RefreshList(int index, int elementId) } result -_ListViewImpl::UpdateList(void) +_ListViewImpl::UpdateList(bool isRestoreAnnexFocusValue) { __needReloadItems = true; - result r = GetCore().UpdateTableView(); + result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue); CheckEmptyListShowState(); @@ -1320,7 +1362,7 @@ _ListViewImpl::AdjustLayoutOfEmptyList(void) if (__pEmptyText != null) { textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f); - textPos.y = ((listDimension.height <= totalHeight ) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f); + textPos.y = ((listDimension.height <= totalHeight) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f); } } @@ -1361,7 +1403,7 @@ _ListViewImpl::CheckEmptyListShowState(void) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pAccessibilityElement->SetName(L"ListView"); @@ -1468,7 +1510,7 @@ _ListViewImpl::SetTextOfEmptyList(const String& text) GetCore().AttachChild(*__pEmptyText); } - TextObject* pText = new (std::nothrow) TextObject; + TextObject* pText = new (std::nothrow) TextObject(); SysTryReturn(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); pText->Construct(); @@ -1773,7 +1815,19 @@ _ListViewImpl::OnDraw(void) void _ListViewImpl::OnChangeLayout(_ControlOrientation orientation) { - __isOrientationChanged = true; + if (__isUpdateListCalled) + { + __isUpdateListCalled = false; + } + else + { + __isOrientationChanged = true; + } + + if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + GetCore().SetFocusDuringOrientationChange(); + } _ControlImpl::OnChangeLayout(orientation); } @@ -1781,6 +1835,14 @@ _ListViewImpl::OnChangeLayout(_ControlOrientation orientation) void _ListViewImpl::OnBoundsChanged(void) { + _Control* pParent = GetCore().GetParentFormOrWindow(); + + if (pParent != null && (pParent->GetOrientation() != GetCore().GetOrientation())) + { + __isOrientationChanged = true; + __isUpdateListCalled = true; + } + _ControlImpl::OnBoundsChanged(); if (__pEmptyBitmap != null) @@ -1795,11 +1857,17 @@ _ListViewImpl::OnBoundsChanged(void) if (__isOrientationChanged) { __isOrientationChanged = false; - if (GetCore().IsTableViewFocused()) + + if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled() + && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) { - GetCore().RestoreFocus(true); + UpdateList(true); } - UpdateList(); + else + { + UpdateList(); + } + } } @@ -1837,6 +1905,7 @@ _ListViewImpl::OnFontChanged(Font* pFont) if (pListViewItem != null) { pListViewItem->SetFont(fontName); + pListViewItem->SetItemChanged(true); } } } @@ -1861,7 +1930,7 @@ FloatPoint _ListViewImpl::GetCurrentTouchPosition(void) { FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0); - FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(); + FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true); currentTouchPos.x -= bounds.x; currentTouchPos.y -= bounds.y; diff --git a/src/ui/controls/FUiCtrl_ListViewItem.cpp b/src/ui/controls/FUiCtrl_ListViewItem.cpp index 1c49e9b..5cf92ee 100644 --- a/src/ui/controls/FUiCtrl_ListViewItem.cpp +++ b/src/ui/controls/FUiCtrl_ListViewItem.cpp @@ -131,7 +131,7 @@ _ListViewItem* _ListViewItem::CreateListViewItemN(float itemHeight) { _ListViewItem* pItem = new (std::nothrow) _ListViewItem(itemHeight); - SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pItem->AcquireHandle(); @@ -162,11 +162,19 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const String& tex // Convert String to TextObject TextObject* pText = new (std::nothrow) TextObject(); - pText->Construct(); + SysTryReturn(NID_UI_CTRL, pText != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + TextSimple* pSimpleText = null; + _ListViewItemElement element; + _VisualElement* pVE = null; + + r = pText->Construct(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Unable to construct Text Object.", GetErrorMessage(r)); if (text.IsEmpty() == false) { - TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast (text.GetPointer()), text.GetLength()); + pSimpleText = new (std::nothrow) TextSimple(const_cast (text.GetPointer()), text.GetLength()); + SysTryCatch(NID_UI_CTRL, (pSimpleText != null), r = E_OUT_OF_MEMORY , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pText->AppendElement(*pSimpleText); pText->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); @@ -174,15 +182,13 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const String& tex } // Make element object - _ListViewItemElement element; memset(&element, 0, sizeof(_ListViewItemElement)); - element.elementId = elementId; element.elementType = LISTVIEW_ITEM_ELEMENT_TEXT; element.bounds = rect; element.pTextElement = new (std::nothrow) _ListViewItemElementText(); - SysTryReturn(NID_UI_CTRL, (element.pTextElement != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), r = E_OUT_OF_MEMORY , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); element.pTextElement->pTextObject = pText; element.pTextElement->textSlidingEnabled = textSliding; @@ -193,7 +199,9 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const String& tex GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]); // Set Visual element for this element - _VisualElement* pVE = new (std::nothrow) _VisualElement(); + pVE = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pVE->Construct(); pVE->SetImplicitAnimationEnabled(false); pVE->SetContentProvider(&__hitTestVEDelegator); @@ -202,11 +210,24 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const String& tex __elements.push_back(element); return r; +CATCH: + delete pText; + delete pSimpleText; + delete element.pTextElement; + + if (pVE != null) + { + pVE->Destroy(); + } + + return r; } result _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedText* pEnrichedText) { + result r = E_SUCCESS; + SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] This elementId already exists.")); @@ -218,6 +239,7 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedTex SysTryReturn(NID_GRP, (pCloneText != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This _EnrichedText element can not clone."); TextObject* pText = pCloneText->GetTextObject(); + _VisualElement* pVE = null; // Make element object _ListViewItemElement element; @@ -228,7 +250,7 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedTex element.bounds = rect; element.pTextElement = new (std::nothrow) _ListViewItemElementText(); - SysTryReturn(NID_UI_CTRL, (element.pTextElement != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", + SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); element.pTextElement->pTextObject = pText; @@ -240,10 +262,12 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedTex GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]); // Set Visual element for this element - _VisualElement* pVE = new (std::nothrow) _VisualElement(); - SysTryReturn(NID_UI_CTRL, (pVE != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pVE = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, (pVE != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pVE->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r)); - pVE->Construct(); pVE->SetImplicitAnimationEnabled(false); pVE->SetContentProvider(&__hitTestVEDelegator); element.pTextElement->pVE = pVE; @@ -251,25 +275,39 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedTex __elements.push_back(element); return E_SUCCESS; + +CATCH: + delete pCloneText; + delete element.pTextElement; + + if (pVE != null) + { + pVE->Destroy(); + } + return r; } result _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { + result r = E_SUCCESS; SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] This elementId already exists.")); SysTryReturn(NID_GRP, (pNormalBitmap != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This Bitmap element is null."); _ListViewItemElement element; + element.pBitmapElement = null; _VisualElement* pVE = null; Bitmap* pClonePressedBitmap = null; Bitmap* pCloneHighlightedBitmap = null; - result r = E_SUCCESS; Bitmap* pCloneNormalBitmap = _BitmapImpl::CloneN(*pNormalBitmap); SysTryReturn(NID_UI_CTRL, (pCloneNormalBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + // Make element object + memset(&element, 0, sizeof(_ListViewItemElement)); + if (pPressedBitmap != null) { pClonePressedBitmap = _BitmapImpl::CloneN(*pPressedBitmap); @@ -282,9 +320,6 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const Bitmap* pNo SysTryCatch(NID_UI_CTRL, (pCloneHighlightedBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); } - // Make element object - memset(&element, 0, sizeof(_ListViewItemElement)); - element.elementId = elementId; element.elementType = LISTVIEW_ITEM_ELEMENT_BITMAP; element.bounds = rect; @@ -299,7 +334,9 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const Bitmap* pNo pVE = new (std::nothrow) _VisualElement(); SysTryCatch(NID_UI_CTRL, pVE, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - pVE->Construct(); + r = pVE->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r)); + pVE->SetImplicitAnimationEnabled(false); pVE->SetContentProvider(&__hitTestVEDelegator); element.pBitmapElement->pVE = pVE; @@ -312,6 +349,12 @@ CATCH: delete pCloneNormalBitmap; delete pClonePressedBitmap; delete pCloneHighlightedBitmap; + delete element.pBitmapElement; + + if (pVE) + { + pVE->Destroy(); + } return r; } @@ -319,6 +362,7 @@ CATCH: result _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const _ICustomElement* pCustom) { + result r = E_SUCCESS; SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] This elementId already exists.")); @@ -338,8 +382,11 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const _ICustomEle element.pCustomElement->pCustom = const_cast<_ICustomElement*>(pCustom); _VisualElement* pVE = new (std::nothrow) _VisualElement(); - SysTryReturn(NID_UI_CTRL, (pVE != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - pVE->Construct(); + SysTryCatch(NID_UI_CTRL, (pVE != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pVE->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r)); + pVE->SetImplicitAnimationEnabled(false); pVE->SetContentProvider(&__hitTestVEDelegator); element.pCustomElement->pVE = pVE; @@ -354,6 +401,16 @@ _ListViewItem::AddElement(FloatRectangle& rect, int elementId, const _ICustomEle __elements.push_back(element); return E_SUCCESS; + +CATCH: + delete element.pCustomElement; + + if(pVE != null) + { + pVE->Destroy(); + } + + return r; } bool @@ -504,6 +561,7 @@ _ListViewItem::SetLastStateChangedInfo(void) { ___stateChangedInfo.selectionType = LISTVIEW_ITEM_ELEMENT_SELECTED; ___stateChangedInfo.elementId = elementId; + delete pInfo; } } else @@ -909,7 +967,7 @@ _ListViewItem::SetDescriptionText(const String& text) textBounds.width = bounds.width - (textBounds.x * 2.0f); TextObject* pText = new (std::nothrow) TextObject(); - SysTryReturn(NID_UI_CTRL, (pText != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, (pText != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pText->Construct(); @@ -1523,11 +1581,9 @@ _ListViewItem::DrawDivider(void) { float lineHeight = 0.0f; float lineLeftMargin = 0.0f; - float lineBottomMargin = 0.0f; float lineTopMargin = 0.0f; GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight); GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin); - GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineBottomMargin); FloatRectangle textBounds; FloatRectangle bitmapBounds; @@ -1550,7 +1606,7 @@ _ListViewItem::DrawDivider(void) lineTopMargin = (textBottomPos > bitmapBottomPos) ? textBottomPos : bitmapBottomPos; FloatRectangle bounds = GetBoundsF(); - float defaultMargin = bounds.height - lineBottomMargin; + float defaultMargin = bounds.height - lineHeight; lineTopMargin = (lineTopMargin > defaultMargin) ? lineTopMargin : defaultMargin; if (bounds.height <= lineTopMargin) @@ -1670,6 +1726,8 @@ _ListViewItem::ResetTextSlide(void) pElement->pTextElement->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); pElement->pTextElement->pTextObject->SetForegroundColor(pElement->pTextElement->textColor[LISTVIEW_ITEM_STATUS_NORMAL], 0, pElement->pTextElement->pTextObject->GetTextLength()); + + RefreshElement(__selectedElementId); } } } @@ -1704,12 +1762,12 @@ _ListViewItem::ParseCutlinkText(_ListViewItemElementText* pElementText) int strLength = pTextObject->GetTextLength(); wchar_t* pStr = new (std::nothrow) wchar_t[strLength + 1]; - SysTryReturn(NID_UI, (pStr != null), false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI, (pStr != null), false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] Memory allocation failed.")); pTextObject->GetText(pStr, strLength); TextCutLinkParser* pParser = new (std::nothrow) TextCutLinkParser(); - SysTryCatch(NID_UI, (pParser != null), (ret = false), E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryCatch(NID_UI, (pParser != null), (ret = false), E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] Memory allocation failed.")); pParser->SetCutLinkMask(cutlinkMaskType); @@ -1775,7 +1833,6 @@ _ListViewItem::ParseCutlinkText(_ListViewItemElementText* pElementText) delete pTextLinkInfo; pTextLinkInfo = pNextLinkInfo; } - SysTryCatch(NID_UI, (pTextLinkInfo != null), (ret = false), E_SYSTEM, ("[E_SYSTEM] TextLinkInfo is not valid.")); } for (int i = 0; i < pTextLinkInfo->length; i++) @@ -1842,11 +1899,13 @@ _ListViewItem::IsCutlinkTextSelected(const FloatPoint& position, int* index, _Li { int elementId = GetElementIdFromPosition(position); _ListViewItemElementText* pElement = GetElementText(elementId); + _ListViewItemElement* pElementItem = GetElement(elementId); - if ((pElement != null) && (pElement->pTextObject) && (pElement->cutlinkViewModeEnabled)) + if ((pElement != null) && (pElement->pTextObject != null) && (pElement->cutlinkViewModeEnabled) && (pElementItem != null)) { TextObject* pTextObject = pElement->pTextObject; - FloatRectangle displayRect = pTextObject->GetBoundsF(); + FloatRectangle displayRect = pElementItem->bounds; + int selectedIndex = pTextObject->GetCutLinkIndexFromPositionData(position.x - displayRect.x, position.y - displayRect.y); if (selectedIndex >= 0) @@ -1978,7 +2037,7 @@ _ListViewItem::SetAccessibilityElement(void) if (__pAccessibilityElement == null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pContainer->AddElement(*__pAccessibilityElement); } @@ -1986,6 +2045,13 @@ _ListViewItem::SetAccessibilityElement(void) __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); } } + +_AccessibilityElement* +_ListViewItem::GetAccessibilityElement(void) +{ + return __pAccessibilityElement; +} + void _ListViewItem::SetAccessibilityElementTrait(void) { @@ -1995,7 +2061,7 @@ _ListViewItem::SetAccessibilityElementTrait(void) } int groupIndex = -1; int itemIndex = -1; - + switch (GetItemStyle()) { case TABLE_VIEW_ANNEX_STYLE_NORMAL: @@ -2034,7 +2100,7 @@ _ListViewItem::SetAccessibilityElementValue(void) { return; } - + switch (GetItemStyle()) { case TABLE_VIEW_ANNEX_STYLE_MARK: @@ -2129,7 +2195,7 @@ _ListViewItem::SetAccessibilityElementLabel(void) if (textLength > 0) { wchar_t* pAccessibilityText = new (std::nothrow) wchar_t[textLength + 1]; - SysTryReturnVoidResult(NID_UI_CTRL, (pAccessibilityText != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, (pAccessibilityText != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pElement->pTextElement->pTextObject->GetText(pAccessibilityText, textLength); diff --git a/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp index 3070fcf..f4502fe 100644 --- a/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp +++ b/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp @@ -53,6 +53,7 @@ _ListViewItemProviderAdaptor::_ListViewItemProviderAdaptor(const IListViewItemPr , __pItemNeedsLazyDeletion(null) , __pLazyDeletionItem(null) , __usingFloatingPoint(false) + , __pDefaultItem(null) { } @@ -67,11 +68,15 @@ _ListViewItemProviderAdaptor::_ListViewItemProviderAdaptor(const IListViewItemPr , __pItemNeedsLazyDeletion(null) , __pLazyDeletionItem(null) , __usingFloatingPoint(true) + , __pDefaultItem(null) { } _ListViewItemProviderAdaptor::~_ListViewItemProviderAdaptor(void) { + delete __pDefaultItem; + __pDefaultItem = null; + __descriptionTextShowItem.clear(); SetItemLazyDeletion(null); @@ -113,13 +118,13 @@ _ListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) SysTryReturn(NID_UI_CTRL, (groupIndex == 0), null, E_INVALID_ARG, "[E_INVALID_ARG] parameter not available."); - _TableViewItem* pTableViewItem = null; + _IListItemCommon* pDefaultItem = null; if (itemIndex == -1) { - pTableViewItem = GetDefaultItem(); - pTableViewItem->SetAppInfo(null); + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); - return pTableViewItem; + return pDefaultItem; } ListItemBase* pItemBase = null; @@ -134,10 +139,10 @@ _ListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) if (pItemBase == null) { - pTableViewItem = GetDefaultItem(); - pTableViewItem->SetAppInfo(null); + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); - return pTableViewItem; + return pDefaultItem; } _ListItemBaseImpl* pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase); @@ -403,4 +408,18 @@ _ListViewItemProviderAdaptor::SetItemLazyDeletion(_ListViewItem* pItem) } } +_IListItemCommon* +_ListViewItemProviderAdaptor::GetDefaultItem(void) +{ + if (__pDefaultItem == null) + { + _ListViewItem* pListViewItem = _ListViewItem::CreateListViewItemN(0.0f); + pListViewItem->SetFocusable(false); + + __pDefaultItem = pListViewItem; + } + + return __pDefaultItem; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListViewModel.cpp b/src/ui/controls/FUiCtrl_ListViewModel.cpp index cca6eb6..2ef2918 100644 --- a/src/ui/controls/FUiCtrl_ListViewModel.cpp +++ b/src/ui/controls/FUiCtrl_ListViewModel.cpp @@ -433,7 +433,7 @@ _ListViewModel::AddGroup(int itemCount, bool usingRadioStyle) //Create new GroupNode _ListViewGroupNode* pListGroupNode = new (std::nothrow) _ListViewGroupNode(); SysTryReturn(NID_UI_CTRL, pListGroupNode != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pListGroupNode->__itemCountInGroup = itemCount; pListGroupNode->__usingRadioStyle = usingRadioStyle; @@ -463,7 +463,7 @@ _ListViewModel::InsertGroup(int groupIndex, int itemCount, bool usingRadioStyle) //Create new GroupNode _ListViewGroupNode* pListGroupNode = new (std::nothrow) _ListViewGroupNode(); SysTryReturn(NID_UI_CTRL, pListGroupNode != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] The memory is insufficient."); + "[E_OUT_OF_MEMORY] Memory allocation failed."); pListGroupNode->__itemCountInGroup = itemCount; pListGroupNode->__usingRadioStyle = usingRadioStyle; @@ -1606,11 +1606,6 @@ _ListViewModel::MoveItem(int originGroupIndex, int originItemIndex, int destinat theIter++; } - if (indexCount < 0) - { - indexCount = 0; - } - pItem->SetItemIndex(destinationGroupIndex, destinationItemIndex); pOriginGroupNode->__items.insert(pOriginGroupNode->__items.begin() + indexCount, pItem); diff --git a/src/ui/controls/FUiCtrl_MessageBox.cpp b/src/ui/controls/FUiCtrl_MessageBox.cpp index 1b93ae9..3c337b4 100644 --- a/src/ui/controls/FUiCtrl_MessageBox.cpp +++ b/src/ui/controls/FUiCtrl_MessageBox.cpp @@ -64,9 +64,6 @@ _MessageBox::~_MessageBox(void) delete __pMsgboxPresenter; __pMsgboxPresenter = null; - delete _pBgBitmap; - _pBgBitmap = null; - delete _pComposedBgBitmap; _pComposedBgBitmap = null; @@ -114,8 +111,6 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle result r = E_SUCCESS; float titleHeight = 0.0f; - Bitmap* buttonBgBitmap = null; - Bitmap* titleBgBitmap = null; Color titleBgColor(0x00000000); Color buttonBgColor(0x00000000); _AccessibilityContainer* pContainer = null; @@ -147,51 +142,35 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, GetOrientation(), titleHeight); // MsgBox_Outline - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed to load MessageBox Outline Image."); // MsgBox BG - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed to load MessageBox BG Image."); - - _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), _bgColor); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _bgColor, _pComposedBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load MessageBox BG Image."); if (style != MSGBOX_STYLE_NONE) { // MsgBox-BottomBitmap - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgColor, __pComposedButtonBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // MsgBox-BottomEffectBitmap - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pComposedButtonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*buttonBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pComposedButtonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); } if (_titleState) { // MsgBox-TitleBitmap - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, __pComposedTitleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // MsgBox-TitleEffectBitmap - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTitleEffectBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTitleEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pComposedTitleBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); } // for clearing canvas @@ -212,47 +191,27 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle SetTouchPressThreshold(0.08); - if (buttonBgBitmap != null) - { - delete buttonBgBitmap; - buttonBgBitmap = null; - } - - if (titleBgBitmap != null) - { - delete titleBgBitmap; - titleBgBitmap = null; - } - return r; CATCH: - if (buttonBgBitmap != null) - { - delete buttonBgBitmap; - buttonBgBitmap = null; - } - if (titleBgBitmap != null) - { - delete titleBgBitmap; - titleBgBitmap = null; - } + delete _pOutlineBitmap; + _pOutlineBitmap = null; delete _pComposedBgBitmap; _pComposedBgBitmap = null; - if (__pComposedButtonBitmap != null) - { - delete __pComposedButtonBitmap; - __pComposedButtonBitmap = null; - } + delete __pComposedButtonBitmap; + __pComposedButtonBitmap = null; - if(__pComposedTitleBitmap != null) - { - delete __pComposedTitleBitmap; - __pComposedTitleBitmap = null; - } + delete __pButtonEffectBitmap; + __pButtonEffectBitmap = null; + + delete __pComposedTitleBitmap; + __pComposedTitleBitmap = null; + + delete __pTitleEffectBitmap; + __pTitleEffectBitmap = null; return r; } @@ -283,7 +242,7 @@ _MessageBox::OnDraw() } void -_MessageBox::OnFontChanged(Font * pFont) +_MessageBox::OnFontChanged(Font* pFont) { __pMsgboxPresenter->OnFontChanged(pFont); } @@ -367,30 +326,22 @@ float _MessageBox::GetTotalHeight(void) const { float titleHeight = 0.0f; - float btnHeight = 0.0f; + float bottomHeight = 0.0f; float textTopMargin = 0.0f; float textTopMarginNoButton = 0.0f; - float btnGap = 0.0f; - float btnTopMargin = 0.0f; - float btnBottomMargin = 0.0f; - float transTopMargin = 0.0f; float transBottomMargin = 0.0f; _ControlOrientation orientation; orientation = GetOrientation(); GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight); - GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, btnHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN, orientation, textTopMargin); GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN_NO_BUTTON, orientation, textTopMarginNoButton); - GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_INTERNAL_GAP, orientation, btnGap); - GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_TOP_MARGIN, orientation, btnTopMargin); - GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_BOTTOM_MARGIN, orientation, btnBottomMargin); - GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); @@ -426,9 +377,7 @@ _MessageBox::GetTotalHeight(void) const // fall through case MSGBOX_STYLE_CANCELTRYCONTINUE: totalH += textTopMargin * 2.0f - + btnHeight - + btnTopMargin - + btnBottomMargin; + + bottomHeight; break; } diff --git a/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp b/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp index 8010f17..7328613 100644 --- a/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp +++ b/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp @@ -29,7 +29,6 @@ #include "FUiCtrl_FrameImpl.h" #include "FUiCtrl_MessageBoxImpl.h" #include "FUiCtrl_Form.h" -#include "FUiCtrl_Indicator.h" using namespace Tizen::Graphics; diff --git a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp index 625e76f..99b9d2f 100644 --- a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp +++ b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp @@ -176,7 +176,7 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation) r = CalculateTitleTextSize(titleTextSize, minTitleTextSize); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - _titleBounds.height = titleHeight - titleTopMargin; + _titleBounds.height = _pTitleTextObject->GetTotalHeightF(); } // Text @@ -290,7 +290,7 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox) _titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin, __titleBgBounds.y + (__titleBgBounds.height - labelHeight) / 2, defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin), - titleHeight - titleTopMargin); + labelHeight); } else { @@ -355,8 +355,13 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox) __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin), bottomHeight); - r = CreateButtons(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + GetButtonString(); + + if (__buttonNum != 0) + { + r = CreateButtons(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } return r; @@ -381,8 +386,16 @@ _MessageBoxPresenter::GetLabelHeight(TextObject* textObject, wchar_t* text, int pSimpleTextForBodyText = new (std::nothrow) TextSimple(text, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, pSimpleTextForBodyText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + if (isTitle == true) + { + pSimpleTextForBodyText->SetTextShadowEnabled(true); + textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + } + else + { + textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + } textObject->AppendElement(*pSimpleTextForBodyText); - textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); textObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); textObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); textObject->SetBounds(bounds); @@ -579,6 +592,8 @@ _MessageBoxPresenter::ShowAndWait(int& modalResult) modalResult = GetReturnValue(); + _ModalLoopManager::GetInstance()->SetLastExitCode(-1); + return r; } @@ -722,7 +737,6 @@ result _MessageBoxPresenter::CreateButtons(void) { result r = E_SUCCESS; - GetButtonString(); //Button Colors Color buttonColorNormal(0x00000000); Color buttonColorPressed(0x00000000); @@ -734,12 +748,6 @@ _MessageBoxPresenter::CreateButtons(void) Color buttonTextHighlighted(0x00000000); bool isCustomBitmap = false; - - Bitmap* pButtonBgNormal = null; - Bitmap* pButtonBgPressed = null; - Bitmap* pButtonBgDisabled = null; - Bitmap* pButtonBgHighlighted = null; - Bitmap* pComposedButtonBgNormal = null; Bitmap* pComposedButtonBgPressed = null; Bitmap* pComposedButtonBgDisabled = null; @@ -759,65 +767,42 @@ _MessageBoxPresenter::CreateButtons(void) GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled); GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted); - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormal); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorNormal, pComposedButtonBgNormal); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating. Failed to load Bottom button normal Image.", GetErrorMessage(r)); isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button normal effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgPressed); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorPressed, pComposedButtonBgPressed); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed Image.", GetErrorMessage(r)); isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgDisabled); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorDisabled, pComposedButtonBgDisabled); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled Image.", GetErrorMessage(r)); isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgHighlighted); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorHighlighted, pComposedButtonBgHighlighted); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button highlighted Image.", GetErrorMessage(r)); - pComposedButtonBgNormal = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormal, Color::GetColor(COLOR_ID_MAGENTA), buttonColorNormal); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - pComposedButtonBgPressed = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgPressed, Color::GetColor(COLOR_ID_MAGENTA), buttonColorPressed); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgPressed != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - pComposedButtonBgDisabled = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgDisabled, Color::GetColor(COLOR_ID_MAGENTA), buttonColorDisabled); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgDisabled != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - pComposedButtonBgHighlighted = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgHighlighted, Color::GetColor(COLOR_ID_MAGENTA), buttonColorHighlighted); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgHighlighted != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pButtonListener = new (std::nothrow) _MessageBoxButtonListener(); SysTryCatch(NID_UI_CTRL, __pButtonListener != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -876,18 +861,6 @@ _MessageBoxPresenter::CreateButtons(void) } - delete pButtonBgNormal; - pButtonBgNormal = null; - - delete pButtonBgPressed; - pButtonBgPressed = null; - - delete pButtonBgDisabled; - pButtonBgDisabled = null; - - delete pButtonBgHighlighted; - pButtonBgHighlighted = null; - delete pComposedButtonBgNormal; pComposedButtonBgNormal = null; @@ -913,18 +886,6 @@ _MessageBoxPresenter::CreateButtons(void) CATCH: - delete pButtonBgNormal; - pButtonBgNormal = null; - - delete pButtonBgPressed; - pButtonBgPressed = null; - - delete pButtonBgDisabled; - pButtonBgDisabled = null; - - delete pButtonBgHighlighted; - pButtonBgHighlighted = null; - delete pComposedButtonBgNormal; pComposedButtonBgNormal = null; @@ -1294,7 +1255,7 @@ _MessageBoxPresenter::InitializeAccessibilityElement(void) pElementMessageBox->SetSupportOperatingGesture(false); pElementMessageBox->SetName(L"MessageBox"); - pElementMessageBox->SetHint(L"double tap to close"); + pElementMessageBox->SetHintWithStringId("IDS_TPLATFORM_BODY_CENTRE_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS"); pElementMessageBox->SetBounds(FloatRectangle(0.0f, 0.0f, __pMessageBox->GetBoundsF().width, __pMessageBox->GetBoundsF().height)); pContainer->AddElement(*pElementMessageBox); } @@ -1456,7 +1417,7 @@ _MessageBoxPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyI { MessageBoxStyle style = __pMessageBox->GetMsgBoxStyle(); - if ((__pButtonListener->GetBeginModal() == true) || (__beginModal == true)) + if ((__pButtonListener != null) && (__pButtonListener->GetBeginModal() == true)) { switch (style) { @@ -1470,7 +1431,7 @@ _MessageBoxPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyI // fall through case MSGBOX_STYLE_RETRYCANCEL: _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false); - __beginModal = false; + __pButtonListener->SetBeginModal(false); break; default: break; @@ -1563,6 +1524,11 @@ _MessageBoxPresenter::_MessageBoxButtonListener::OnKeyReleased(const Tizen::Ui:: pImpl = _ControlImpl::GetInstance(source); pControl = dynamic_cast(&pImpl->GetCore()); + if (!pControl->IsFocusModeStateEnabled()) + { + return; + } + if (pControl != null) { if (keyCode == KEY_ENTER) diff --git a/src/ui/controls/FUiCtrl_OptionMenu.cpp b/src/ui/controls/FUiCtrl_OptionMenu.cpp index 3bc9302..54fc725 100644 --- a/src/ui/controls/FUiCtrl_OptionMenu.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenu.cpp @@ -28,6 +28,7 @@ #include "FUi_ControlImplManager.h" #include "FUi_EcoreEvasMgr.h" #include "FUi_ResourceManager.h" +#include "FUi_TouchManager.h" #include "FUiAnim_VisualElement.h" #include "FUiAnim_AnimationManager.h" #include "FUi_AccessibilityContainer.h" @@ -39,11 +40,11 @@ #include "FUiCtrl_Scroll.h" #include "FUiCtrl_ContextMenu.h" #include "FUiCtrl_OptionMenuItem.h" -#include "FUi_TouchManager.h" using namespace Tizen::Graphics; using namespace Tizen::Base; using namespace Tizen::Media; +using namespace Tizen::Ui; using namespace Tizen::Ui::Animations; using namespace Runtime; @@ -63,6 +64,10 @@ _OptionMenu::_OptionMenu(void) , __isMaxVisibleCountSet(false) , __isFocused(false) , __currentFocusedIndex(-1) + , __selectedActionID(-1) + , __isAnimating(false) + , __pBoundsTimingFunction(null) + , __pOpacityTimingFunction(null) , __windowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __bodyRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __itemRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) @@ -94,6 +99,11 @@ _OptionMenu::~_OptionMenu(void) GetOwner()->UnlockInputEvent(); } + if (GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + } + __pCurrentFrame = null; if (__pScrollPanel != null) @@ -123,6 +133,12 @@ _OptionMenu::~_OptionMenu(void) delete __pActionEvent; __pActionEvent = null; + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + + delete __pOpacityTimingFunction; + __pOpacityTimingFunction= null; + __actionId.RemoveAll(); RemoveAllAccessibilityElement(); @@ -142,7 +158,7 @@ _OptionMenu::CreateOptionMenuN(void) GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, minHeight); pOptionMenu = new (std::nothrow) _OptionMenu(); - SysTryReturn(NID_UI_CTRL, pOptionMenu != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pOptionMenu != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pOptionMenu->CreateRootVisualElement(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -171,7 +187,7 @@ _OptionMenu::CreateOptionMenuN(void) pScrollPanel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); pScroll = pScrollPanel->GetScrollBar(); - SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[E_INVALID_STATE] _Scroll isn't constructed"); + SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[%s] _Scroll is not constructed", GetErrorMessage(E_INVALID_STATE)); pScroll->SetContextMenuScrollType(true); pOptionMenu->AttachChild(*(pScrollPanel)); @@ -205,6 +221,7 @@ _OptionMenu::OnFocusGained(const _Control &source) bool _OptionMenu::OnFocusLost(const _Control &source) { + __pOptionMenuPresenter->ClearFocus(); __isFocused = false; return true; @@ -225,7 +242,7 @@ _OptionMenu::OnDrawFocus(void) } void -_OptionMenu::OnFocusModeStateChanged(void) +_OptionMenu::ResetFocus(void) { __isFocused = false; __pOptionMenuPresenter->ClearFocus(); @@ -244,6 +261,7 @@ _OptionMenu::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) __isFocused = true; __currentFocusedIndex = 0; __pOptionMenuPresenter->DrawFocus(__currentFocusedIndex); + __pScrollPanel->ScrollToTop(); } return true; } @@ -310,11 +328,19 @@ _OptionMenu::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) bool _OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { + if (__isAnimating && GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + } + _KeyCode keyCode = keyInfo.GetKeyCode(); if (keyCode == _KEY_ENTER && __isFocused) { - __pOptionMenuPresenter->OnEnterKeyReleased(__currentFocusedIndex); + if (!__isAnimating) + { + __pOptionMenuPresenter->OnEnterKeyReleased(__currentFocusedIndex); + } return true; } @@ -322,8 +348,7 @@ _OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { __isFocused = false; __pOptionMenuPresenter->ClearFocus(); - - SetVisibleState(false); + CloseAnimation(-1); return true; } @@ -331,7 +356,7 @@ _OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { if (__isAttachedToMainTree) { - SetVisibleState(false); + CloseAnimation(-1); } else { @@ -344,6 +369,33 @@ _OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) return false; } +void +_OptionMenu::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) +{ + if (!completedNormally) + { + VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(const_cast< VisualElementAnimation* >(&animation)); + if (pPropertyAnimation) + { + target.SetProperty(keyName, pPropertyAnimation->GetEndValue()); + } + } + + __isAnimating = false; + + if (keyName == L"ClosingOpacityAnimation") + { + SetVisibleState(false); + + if (__selectedActionID != -1) + { + int selectedActionId = __selectedActionID; + __selectedActionID = -1; + FireActionEvent(selectedActionId); + } + } +} + result _OptionMenu::Install(void) { @@ -351,13 +403,13 @@ _OptionMenu::Install(void) // load bitmap of a background and arrow r = LoadBitmap(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to load bitmap."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); r = __actionId.Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct arraylist."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct arraylist."); _OptionMenuPresenter* pPresenter = new (std::nothrow) _OptionMenuPresenter(this); - SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed."); SetPresenter(*pPresenter); @@ -379,7 +431,7 @@ _OptionMenu::Initialize(void) screen = _ControlManager::GetInstance()->GetScreenSizeF(); r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "SetBounds failed."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set option menu bounds."); SetMovable(false); SetResizable(false); @@ -435,7 +487,7 @@ _OptionMenu::OnAttachedToMainTree(void) if (pOwner == null) { __pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); - SysTryReturn(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Current frame instance is not available."); + SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Current frame instance is not available."); _Form* pForm = __pCurrentFrame->GetCurrentForm(); pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame); @@ -483,31 +535,21 @@ _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(); - FloatRectangle pBounds = pVisualElement->GetBounds(); - float oldBoundsX = pBounds.x; - float oldBoundsY = pBounds.y; + __layout = GetOwner()->GetOrientation(); - pVisualElement->SetBounds(pBounds); - pVisualElement->SetOpacity(0.0f); + if (!__isMaxVisibleCountSet) + { + GET_SHAPE_CONFIG(OPTIONMENU::MAX_VISIBLE_ITEM_COUNT, __layout, __showItemCount); + } - bool enable = pVisualElement->IsImplicitAnimationEnabled(); + __pOptionMenuPresenter->CalculateItemMaximumWidth(); - pVisualElement->SetImplicitAnimationEnabled(true); + r = __pOptionMenuPresenter->CalculateWindowRect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - pBounds.x = oldBoundsX; - pBounds.y = oldBoundsY; - pVisualElement->SetBounds(pBounds); - pVisualElement->SetOpacity(1.0f); + GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); - pVisualElement->SetImplicitAnimationEnabled(enable); + OpenAnimation(); return _Window::OnAttachedToMainTree(); } @@ -569,9 +611,12 @@ _OptionMenu::OnActivated(void) { pTouchManager->SetTouchCanceled(null); } - SetTouchCapture(false, false); - return _Window::OnActivated(); + _Window::OnActivated(); + + SetTouchCapture(false, false); + + return; } void @@ -586,15 +631,18 @@ _OptionMenu::AddItem(const String& text, int actionId, const Bitmap* pNormalBitm { result r = E_SUCCESS; - SysTryReturn(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred." + SysTryReturnResult(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, "A system error has occurred." " The option menu already has an item with the same action id (%d)", actionId); r = __pOptionMenuPresenter->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); __actionId.Add(actionId); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -604,15 +652,18 @@ _OptionMenu::InsertItemAt(int mainIndex, const String& text, int actionId, const { result r = E_SUCCESS; - SysTryReturn(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred." + SysTryReturnResult(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, "A system error has occurred." " The option menu already has an item with the same action id (%d)", actionId); r = __pOptionMenuPresenter->InsertItem(mainIndex, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); __actionId.InsertAt(actionId, mainIndex); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -629,11 +680,14 @@ _OptionMenu::SetItemAt(int mainIndex, const String& text, int actionId, const Bi result r = E_SUCCESS; r = __pOptionMenuPresenter->SetItem(mainIndex, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); __actionId.SetAt(actionId, mainIndex); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -642,7 +696,7 @@ result _OptionMenu::AddSubItem(int mainIndex, const String& text, int actionId) { result r = __pOptionMenuPresenter->AddSubItem(mainIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); if (__pSubMenu != null && mainIndex == __subMenuIndex) { @@ -656,7 +710,7 @@ result _OptionMenu::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { result r = __pOptionMenuPresenter->InsertSubItemAt(mainIndex, subIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); if (__pSubMenu != null && mainIndex == __subMenuIndex) { @@ -670,7 +724,7 @@ result _OptionMenu::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { result r = __pOptionMenuPresenter->SetSubItemAt(mainIndex, subIndex, text, actionId); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); if (__pSubMenu != null && mainIndex == __subMenuIndex) { @@ -684,7 +738,7 @@ result _OptionMenu::RemoveSubItemAt(int mainIndex, int subIndex) { result r = __pOptionMenuPresenter->RemoveSubItemAt(mainIndex, subIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); if (__pSubMenu != null && mainIndex == __subMenuIndex) { @@ -756,8 +810,7 @@ _OptionMenu::ShowSubMenu(int mainIndex, _OptionMenuItem& item) if (__pSubMenu->GetOwner() == null) { _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); - SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, - E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "This instance is not constructed."); _Form* pForm = pFrame->GetCurrentForm(); if (pForm != null) @@ -799,10 +852,7 @@ _OptionMenu::IsSubMenuShown(void) const result _OptionMenu::DestroySubMenu(void) { - if (__pSubMenu == null) - { - return E_SYSTEM; - } + SysTryReturnResult(NID_UI_CTRL, __pSubMenu != null, E_SYSTEM, "A system error has occured. __pSubMenu is null."); __pSubMenu->Close(); delete __pSubMenu; @@ -819,11 +869,14 @@ _OptionMenu::InsertItem(int index, const String& text, int actionId, const Bitma result r = E_SUCCESS; r = __pOptionMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to insert a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item."); __actionId.InsertAt(actionId, index); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -834,11 +887,14 @@ _OptionMenu::SetItem(int index, const String& text, int actionId, const Bitmap* result r = E_SUCCESS; r = __pOptionMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); __actionId.SetAt(actionId, index); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -849,11 +905,14 @@ _OptionMenu::RemoveItemAt(int index) result r = E_SUCCESS; r = __pOptionMenuPresenter->DeleteItem(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove a item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item."); __actionId.RemoveAt(index); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return r; } @@ -868,7 +927,10 @@ _OptionMenu::RemoveAllItems(void) __actionId.RemoveAll(); - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } SetLastResult(r); return; @@ -961,11 +1023,7 @@ _OptionMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) { int showCount = count.ToInt(); - if (showCount < 1) - { - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Count is invalid."); - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid."); __showItemCount = showCount; @@ -975,7 +1033,7 @@ _OptionMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) Variant _OptionMenu::GetPropertyMaxVisibleItemsCount(void) const { - return Tizen::Ui::Variant(__showItemCount); + return Variant(__showItemCount); } int @@ -992,10 +1050,13 @@ _OptionMenu::SetShowItemCount(int count) result r; r = SetProperty("maxVisibleItemsCount", Variant(count)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set property."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set property."); - r = __pOptionMenuPresenter->CalculateWindowRect(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window."); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window."); + } return E_SUCCESS; } @@ -1006,7 +1067,7 @@ _OptionMenu::SetPropertyColor(const Variant& color) __backgroundColor = color.ToColor(); result r = LoadColorReplacedBitmap(__backgroundColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error occurred. Failed to load the color replacement bitmap.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to load the color replacement bitmap."); return E_SUCCESS; } @@ -1014,7 +1075,7 @@ _OptionMenu::SetPropertyColor(const Variant& color) Variant _OptionMenu::GetPropertyColor(void) const { - return Tizen::Ui::Variant(__backgroundColor); + return Variant(__backgroundColor); } result @@ -1035,11 +1096,14 @@ result _OptionMenu::SetMaxVisibleItemsCount(int maxItemsCount) { result r = SetPropertyMaxVisibleItemsCount(maxItemsCount); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __isMaxVisibleCountSet = true; - __pOptionMenuPresenter->CalculateWindowRect(); + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } return E_SUCCESS; } @@ -1055,7 +1119,7 @@ _OptionMenu::SetPropertyNormalItemColor(const Variant& color) Variant _OptionMenu::GetPropertyNormalItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); } result @@ -1069,7 +1133,7 @@ _OptionMenu::SetPropertyPressedItemColor(const Variant& color) Variant _OptionMenu::GetPropertyPressedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); } result @@ -1083,7 +1147,7 @@ _OptionMenu::SetPropertyHighlightedItemColor(const Variant & color) Variant _OptionMenu::GetPropertyHighlightedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); } result @@ -1144,7 +1208,7 @@ _OptionMenu::SetPropertyNormalItemTextColor(const Variant& color) Variant _OptionMenu::GetPropertyNormalItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); } result @@ -1158,7 +1222,7 @@ _OptionMenu::SetPropertyPressedItemTextColor(const Variant& color) Variant _OptionMenu::GetPropertyPressedItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); } result @@ -1172,7 +1236,7 @@ _OptionMenu::SetPropertyHighlightedItemTextColor(const Variant & color) Variant _OptionMenu::GetPropertyHighlightedItemTextColor(void) const { - return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); } result @@ -1230,10 +1294,10 @@ _OptionMenu::AddActionEventListener(const _IActionEventListener& listener) if (__pActionEvent == null) { __pActionEvent = _ActionEvent::CreateInstanceN(*this); - SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating."); r = __pActionEvent->AddListener(listener); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove an action event listener."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener."); } return r; @@ -1247,13 +1311,13 @@ CATCH: result _OptionMenu::RemoveActionEventListener(const _IActionEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, E_INVALID_STATE, - "[E_INVALID_STATE] The action event instance isn't constructed."); + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, + "The action event instance isn't constructed."); result r = E_SUCCESS; r = __pActionEvent->RemoveListener(listener); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener"); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener"); return r; } @@ -1263,7 +1327,7 @@ _OptionMenu::FireActionEvent(int actionId) { IEventArg* pArg = _ActionEvent::CreateActionEventArgN(actionId); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pArg != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (pArg != null), r, "Propagating."); r = __pActionEvent->Fire(*pArg); @@ -1303,7 +1367,6 @@ result _OptionMenu::LoadColorReplacedBitmap(const Color& color) { result r = E_SUCCESS; - Bitmap* ptempNormalBitmap = null; // Delete old bitmap if (__pBackgroundNormalBitmap != null) @@ -1312,21 +1375,9 @@ _OptionMenu::LoadColorReplacedBitmap(const Color& color) __pBackgroundNormalBitmap = null; } - r = GET_BITMAP_CONFIG_N(OPTIONMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); - - __pBackgroundNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryCatch(NID_UI_CTRL, __pBackgroundNormalBitmap != null, , GetLastResult(), "[%s] Propagating.", - GetErrorMessage(GetLastResult())); - delete ptempNormalBitmap; - - return r; - -CATCH: - delete ptempNormalBitmap; - - delete __pBackgroundNormalBitmap; - __pBackgroundNormalBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBackgroundNormalBitmap); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); return r; } @@ -1349,9 +1400,183 @@ _OptionMenu::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& tou return __pOptionMenuPresenter->OnPreviewTouchPressed(source, touchinfo); } +void +_OptionMenu::OpenAnimation() +{ + VisualElementPropertyAnimation* pBoundsAnimation; + VisualElementPropertyAnimation* pOpacityAnimation; + + _VisualElement* pVisualElement = GetVisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element."); + + FloatRectangle pEndBounds = pVisualElement->GetBounds(); + FloatRectangle pStartBounds(0.0f, 0.0f, 0.0f, 0.0f); + pStartBounds = pEndBounds; + + float animationDistance = 0.0f; + + GET_SHAPE_CONFIG(OPTIONMENU::ANIMATION_DISTANCE_Y, _CONTROL_ORIENTATION_PORTRAIT, animationDistance); + + pStartBounds.y += animationDistance; + + pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, pOpacityAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (__pBoundsTimingFunction != null) + { + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + } + + __pBoundsTimingFunction = new (std::nothrow) SineThirtyThreeTimingFunction(); + SysTryCatch(NID_UI_CTRL, __pBoundsTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pBoundsAnimation->SetPropertyName(L"bounds"); + pBoundsAnimation->SetStartValue(Variant(pStartBounds)); + pBoundsAnimation->SetEndValue(Variant(pEndBounds)); + pBoundsAnimation->SetTimingFunction(__pBoundsTimingFunction); + pBoundsAnimation->SetDuration(ANIMATION_DURATION); + + pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); + + if (__pOpacityTimingFunction != null) + { + delete __pOpacityTimingFunction; + __pOpacityTimingFunction = null; + } + + __pOpacityTimingFunction = new (std::nothrow) SineSixtyTimingFunction(); + SysTryCatch(NID_UI_CTRL, __pOpacityTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pOpacityAnimation->SetPropertyName(L"opacity"); + pOpacityAnimation->SetStartValue(Variant(0.0f)); + pOpacityAnimation->SetEndValue(Variant(1.0f)); + pOpacityAnimation->SetTimingFunction(__pOpacityTimingFunction); + pOpacityAnimation->SetDuration(ANIMATION_DURATION); + + pOpacityAnimation->SetVisualElementAnimationStatusEventListener(this); + + pVisualElement->AddAnimation(L"bounds", *pBoundsAnimation); + pVisualElement->AddAnimation(L"opacity", *pOpacityAnimation); + + __isAnimating = true; + + delete pBoundsAnimation; + + delete pOpacityAnimation; + + return; + +CATCH: + delete pBoundsAnimation; + delete pOpacityAnimation; + + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + + delete __pOpacityTimingFunction; + __pOpacityTimingFunction = null; + + return; +} + +void +_OptionMenu::CloseAnimation(int actionId) +{ + __selectedActionID = actionId; + + VisualElementPropertyAnimation* pBoundsAnimation ; + VisualElementPropertyAnimation* pOpacityAnimation; + + _VisualElement* pVisualElement = GetVisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element."); + + FloatRectangle pStartBounds = pVisualElement->GetBounds(); + FloatRectangle pEndBounds(0.0f, 0.0f, 0.0f, 0.0f); + pEndBounds = pStartBounds; + + float animationDistance = 0.0f; + + GET_SHAPE_CONFIG(OPTIONMENU::ANIMATION_DISTANCE_Y, _CONTROL_ORIENTATION_PORTRAIT, animationDistance); + + pEndBounds.y += animationDistance; + + pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, pOpacityAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (__pBoundsTimingFunction != null) + { + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + } + + __pBoundsTimingFunction = new (std::nothrow) SineThirtyThreeTimingFunction(); + SysTryCatch(NID_UI_CTRL, __pBoundsTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pBoundsAnimation->SetPropertyName(L"bounds"); + pBoundsAnimation->SetStartValue(Variant(pStartBounds)); + pBoundsAnimation->SetEndValue(Variant(pEndBounds)); + pBoundsAnimation->SetTimingFunction(__pBoundsTimingFunction); + pBoundsAnimation->SetEndValueApplied(false); + pBoundsAnimation->SetDuration(ANIMATION_DURATION); + + pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); + + if (__pOpacityTimingFunction != null) + { + delete __pOpacityTimingFunction; + __pOpacityTimingFunction = null; + } + + __pOpacityTimingFunction = new (std::nothrow) SineSixtyTimingFunction(); + SysTryCatch(NID_UI_CTRL, __pOpacityTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pOpacityAnimation->SetPropertyName(L"opacity"); + pOpacityAnimation->SetStartValue(Variant(1.0f)); + pOpacityAnimation->SetEndValue(Variant(0.0f)); + pOpacityAnimation->SetEndValueApplied(false); + pOpacityAnimation->SetTimingFunction(__pOpacityTimingFunction); + pOpacityAnimation->SetDuration(ANIMATION_DURATION); + + pOpacityAnimation->SetVisualElementAnimationStatusEventListener(this); + + pVisualElement->AddAnimation(L"ClosingBoundsAnimation", *pBoundsAnimation); + pVisualElement->AddAnimation(L"ClosingOpacityAnimation", *pOpacityAnimation); + + __isAnimating = true; + + delete pBoundsAnimation; + delete pOpacityAnimation; + + return; + +CATCH: + delete pBoundsAnimation; + + delete pOpacityAnimation; + + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + + delete __pOpacityTimingFunction; + __pOpacityTimingFunction = null; + + return; +} + bool _OptionMenu::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { + if (__isFocused) + { + ResetFocus(); + } return __pOptionMenuPresenter->OnTouchPressed(source, touchinfo); } @@ -1376,6 +1601,12 @@ _OptionMenu::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& to bool _OptionMenu::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { + if (__isAnimating && GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + return true; + } + return __pOptionMenuPresenter->OnTouchReleased(source, touchinfo); } @@ -1428,7 +1659,6 @@ _OptionMenu::OnChangeLayout(_ControlRotation rotation) __rotation = rotation; __pOptionMenuPresenter->ResetSelectedItem(); - __pOptionMenuPresenter->CalculateWindowRect(); } void @@ -1519,7 +1749,7 @@ _OptionMenu::OnAccessibilityFocusOut(const _AccessibilityContainer& control, con bool _OptionMenu::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) { - SetVisibleState(false); + CloseAnimation(-1); return true; } diff --git a/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp old mode 100755 new mode 100644 index dcf61f5..e0fc21a --- a/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp @@ -121,8 +121,8 @@ _OptionMenuImpl::InsertItemAt(int mainIndex, const String& text, int actionId, c const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetItemCount()), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex); return GetCore().InsertItemAt(mainIndex, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); } @@ -132,8 +132,8 @@ _OptionMenuImpl::SetItemAt(int mainIndex, const String& text, int actionId, cons const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex); return GetCore().SetItemAt(mainIndex, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); } @@ -142,8 +142,8 @@ result _OptionMenuImpl::RemoveItemAt(int mainIndex) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex); return GetCore().RemoveItemAt(mainIndex); } @@ -179,7 +179,7 @@ _OptionMenuImpl::GetItemActionIdAt(int mainIndex) const { ClearLastResult(); SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex); + "[%s] Invalid argument is used. The specified main index (%d) is invalid.", GetErrorMessage(E_INVALID_ARG), mainIndex); return GetCore().GetItemActionIdAt(mainIndex); } @@ -188,8 +188,8 @@ result _OptionMenuImpl::AddSubItem(int mainIndex, const String& text, int actionId) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is negative.", mainIndex); return GetCore().AddSubItem(mainIndex, text, actionId); } @@ -198,10 +198,10 @@ result _OptionMenuImpl::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); - SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is negative.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified sub index (%d) is negative.", subIndex); return GetCore().InsertSubItemAt(mainIndex, subIndex, text, actionId); } @@ -210,10 +210,10 @@ result _OptionMenuImpl::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); - SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is negative.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified sub index (%d) is negative.", subIndex); return GetCore().SetSubItemAt(mainIndex, subIndex, text, actionId); } @@ -222,10 +222,10 @@ result _OptionMenuImpl::RemoveSubItemAt(int mainIndex, int subIndex) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); - SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex); + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified main index (%d) is negative.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, + "Invalid argument is used. The specified sub index (%d) is negative.", subIndex); return GetCore().RemoveSubItemAt(mainIndex, subIndex); } @@ -235,7 +235,7 @@ _OptionMenuImpl::GetSubItemCount(int mainIndex) const { ClearLastResult(); SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); + "[%s] Invalid argument is used. The specified main index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), mainIndex); return GetCore().GetSubItemCount(mainIndex); } @@ -253,9 +253,9 @@ _OptionMenuImpl::GetSubItemActionIdAt(int mainIndex, int subIndex) const { ClearLastResult(); SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex); + "[%s] Invalid argument is used. The specified main index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), mainIndex); SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex); + "[%s] Invalid argument is used. The specified sub index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), subIndex); return GetCore().GetSubItemActionIdAt(mainIndex, subIndex); } @@ -282,7 +282,7 @@ _OptionMenuImpl::SetItemTextColor(OptionMenuItemStatus status, const Color& colo break; default: - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at OptionMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid."); r = E_INVALID_ARG; break; } @@ -295,7 +295,7 @@ _OptionMenuImpl::GetItemTextColor(OptionMenuItemStatus status) const { ClearLastResult(); - Tizen::Graphics::Color color(0, 0, 0, 0); + Color color(0, 0, 0, 0); switch (status) { @@ -312,7 +312,7 @@ _OptionMenuImpl::GetItemTextColor(OptionMenuItemStatus status) const break; default: - SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at OptionMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus param is invalid."); break; } @@ -340,7 +340,7 @@ _OptionMenuImpl::SetItemColor(OptionMenuItemStatus status, const Color& color) break; default: - SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at OptionMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid."); r = E_INVALID_ARG; break; } @@ -353,7 +353,7 @@ _OptionMenuImpl::GetItemColor(OptionMenuItemStatus status) const { ClearLastResult(); - Tizen::Graphics::Color color(0, 0, 0, 0); + Color color(0, 0, 0, 0); switch (status) { @@ -370,7 +370,7 @@ _OptionMenuImpl::GetItemColor(OptionMenuItemStatus status) const break; default: - SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at OptionMenuItemStatus."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus parma is invalid."); break; } @@ -411,10 +411,7 @@ _OptionMenuImpl::GetMaxVisibleItemsCount(void) const result _OptionMenuImpl::OnAttachedToMainTree(void) { - SysTryReturn(NID_UI_CTRL, (GetCore().GetItemCount() > 0), E_INVALID_OPERATION, E_INVALID_OPERATION, - "[E_INVALID_OPERATION] There is no item to show."); - - return _WindowImpl::OnAttachedToMainTree();; + return _WindowImpl::OnAttachedToMainTree(); } const char* diff --git a/src/ui/controls/FUiCtrl_OptionMenuItem.cpp b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp old mode 100755 new mode 100644 index 08f69e3..38da96a --- a/src/ui/controls/FUiCtrl_OptionMenuItem.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp @@ -66,7 +66,8 @@ _OptionMenuItem::_OptionMenuItem(void) , __bgPressedTopBottomMargin(0.0f) , __textSize(0.0f) , __text(L"") - , __pMagentaBgBitmap(null) + , __pNormalBgBitmap(null) + , __pSelectedBgBitmap(null) , __pArrowBitmap(null) , __pArrowPressedBitmap(null) , __size(FloatDimension(0.0f, 0.0f)) @@ -104,7 +105,7 @@ _OptionMenuItem::_OptionMenuItem(void) GET_COLOR_CONFIG(OPTIONMENU::ITEM_BG_PRESSED, __selectedBgColor); GET_COLOR_CONFIG(OPTIONMENU::LIST_ITEM_DIVIDER_01_NORMAL, __lowerDividerLineColor); // lower divider of item n and GET_COLOR_CONFIG(OPTIONMENU::LIST_ITEM_DIVIDER_02_NORMAL, __upperDividerLineColor); // upper divider of item n+1 are bonded together. - GET_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagentaBgBitmap); + GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap); InitializeAccessibilityElement(); } @@ -148,8 +149,11 @@ _OptionMenuItem::~_OptionMenuItem(void) __pTextLabel = null; } - delete __pMagentaBgBitmap; - __pMagentaBgBitmap = null; + delete __pNormalBgBitmap; + __pNormalBgBitmap = null; + + delete __pSelectedBgBitmap; + __pSelectedBgBitmap = null; delete __pArrowBitmap; __pArrowBitmap = null; @@ -193,11 +197,7 @@ _OptionMenuItem::CreateOptionMenuItemN(void) _OptionMenuItem* pItem = null; pItem = new (std::nothrow) _OptionMenuItem(); - if (pItem == null) - { - SetLastResult(E_OUT_OF_MEMORY); - return null; - } + SysTryReturn(NID_UI_CTRL, pItem != null, null , E_OUT_OF_MEMORY, "[%s] Memory allocation falied.", GetErrorMessage(E_OUT_OF_MEMORY)); pItem->AcquireHandle(); @@ -210,8 +210,8 @@ _OptionMenuItem::InsertSubItemAt(_OptionMenuItem& subItem, int index) { if (__pSubItems == null) { - __pSubItems = new (std::nothrow) ArrayList; - SysTryReturn(NID_UI_CTRL, (__pSubItems != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pSubItems = new (std::nothrow) ArrayList(); + SysTryReturnResult(NID_UI_CTRL, __pSubItems != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = __pSubItems->Construct(); if (r != E_SUCCESS) @@ -223,8 +223,8 @@ _OptionMenuItem::InsertSubItemAt(_OptionMenuItem& subItem, int index) } } - SysTryReturn(NID_UI_CTRL, (index >= 0 && index <= __pSubItems->GetCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified index (%d) is greater than the available items count.", index); + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= __pSubItems->GetCount()), E_INVALID_ARG, + "Invalid argument is used. The specified index (%d) is greater than the available items count.", index); return __pSubItems->InsertAt(subItem, index); } @@ -245,10 +245,10 @@ _OptionMenuItem::SetSubItemAt(_OptionMenuItem& subItem, int index) result _OptionMenuItem::RemoveSubItemAt(int index) { - SysTryReturn(NID_UI_CTRL, (__pSubItems != null), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The sub items list is null."); - SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The specified index (%d) is greater than the available items count.", index); + SysTryReturnResult(NID_UI_CTRL, __pSubItems != null, E_SYSTEM, + "A system error has occurred. The sub items list is null."); + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), E_SYSTEM, + "A system error has occurred. The specified index (%d) is greater than the available items count.", index); return __pSubItems->RemoveAt(index, true); } @@ -273,10 +273,10 @@ _OptionMenuItem::GetSubItemCount(void) const _OptionMenuItem* _OptionMenuItem::GetSubItem(int index) { - SysTryReturn(NID_UI_CTRL, (__pSubItems != null), null, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The sub items list is null.", index); + SysTryReturn(NID_UI_CTRL, __pSubItems != null, null, E_SYSTEM, + "[%s] A system error has occurred. The sub items list is null.", GetErrorMessage(E_SYSTEM), index); SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), null, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The specified index (%d) is greater than the available items count.", index); + "[%s] A system error has occurred. The specified index (%d) is greater than the available items count.", GetErrorMessage(E_SYSTEM), index); return static_cast<_OptionMenuItem*>(__pSubItems->GetAt(index)); } @@ -289,9 +289,9 @@ _OptionMenuItem::InitializeAccessibilityElement(void) { pContainer->Activate(true); _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - pElement->SetTrait(L"Optionual popup"); + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); pContainer->AddElement(*pElement); } @@ -404,13 +404,11 @@ _OptionMenuItem::GetText(void) const result _OptionMenuItem::SetBitmap(OptionMenuItemDrawingStatus status, const Bitmap* pBitmap) { - if (status < OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || status > OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED) - { - return E_INVALID_ARG; - } + SysTryReturnResult(NID_UI_CTRL, (status >= OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL && status <= OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED), + E_INVALID_ARG, "Invalid argument is used. The status is not valid."); - SysTryReturn(NID_UI_CTRL, (status != OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), E_INVALID_ARG, - E_INVALID_ARG, "[E_INVALID_ARG] The normal bitmap must not be null."); + SysTryReturnResult(NID_UI_CTRL, (status != OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), + E_INVALID_ARG, "Invalid argument is used. The normal bitmap must not be null."); Bitmap* pClonedBitmap = _BitmapImpl::CloneN(*pBitmap); @@ -438,19 +436,25 @@ _OptionMenuItem::GetBitmap(OptionMenuItemDrawingStatus status) const } void -_OptionMenuItem::SetSize(Tizen::Graphics::FloatDimension size) +_OptionMenuItem::SetPressedItemColor(Color color) +{ + __selectedBgColor = color; +} + +void +_OptionMenuItem::SetSize(FloatDimension size) { __size = size; } -Tizen::Graphics::FloatDimension +FloatDimension _OptionMenuItem::GetSize(void) const { return __size; } void -_OptionMenuItem::SetDrawRect(Tizen::Graphics::FloatRectangle rect) +_OptionMenuItem::SetDrawRect(FloatRectangle rect) { __drawRect = rect; } @@ -462,7 +466,7 @@ _OptionMenuItem::GetDrawRect(void) const } void -_OptionMenuItem::SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect) +_OptionMenuItem::SetPressedDrawRect(FloatRectangle rect) { __pressedDrawRect = rect; } @@ -573,42 +577,33 @@ _OptionMenuItem::DrawArrow(void) textRect.width -= __arrowMargin; Color arrowColor; - Bitmap *pArrowBitmap = null; result r = E_SUCCESS; FloatRectangle arrowbounds(0.0f, 0.0f, 0.0f, 0.0f); if (__pArrowBitmap == null) { // Load Contextual Popup Arrow Bitmap - r = GET_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowBitmap); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); - GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL, arrowColor); - __pArrowBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pArrowBitmap; - pArrowBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowBitmap); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); } if (__pArrowPressedBitmap == null) { // Load Contextual Popup Arrow Pressed Bitmap - r = GET_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED, arrowColor); - __pArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pArrowBitmap; - pArrowBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowPressedBitmap); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); } if (__pArrowLabel == null) { __pArrowLabel = _Label::CreateLabelN(); - SysTryCatch(NID_UI_CTRL, (__pArrowLabel != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, __pArrowLabel != null, , r, "[%s] Propagating.", GetErrorMessage(r)); AttachChild(*__pArrowLabel); @@ -637,7 +632,6 @@ _OptionMenuItem::DrawArrow(void) return; CATCH: - delete pArrowBitmap; delete __pArrowBitmap; __pArrowBitmap = null; @@ -658,7 +652,7 @@ _OptionMenuItem::DrawItemUpperDivider(void) if (__pUpperDividerLineLabel == null) { __pUpperDividerLineLabel = _Label::CreateLabelN(); - SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); AttachChild(*__pUpperDividerLineLabel); @@ -714,7 +708,7 @@ _OptionMenuItem::DrawItemBackground(void) if (__pBackgroundLabel == null) { __pBackgroundLabel = _Label::CreateLabelN(); - SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); __pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); AttachChild(*__pBackgroundLabel); @@ -729,12 +723,6 @@ _OptionMenuItem::DrawItemBackground(void) FloatRectangle bounds = GetBoundsF(); - Color color= Color(0, 0, 0, 0); - if (__selected) - { - color = __selectedBgColor; - } - _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent()); FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF(); @@ -760,13 +748,15 @@ _OptionMenuItem::DrawItemBackground(void) __pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedLeftRightMargin, topMargin, bounds.width - __bgPressedLeftRightMargin * 2.0f, bounds.height - topMargin - bottomMargin)); - - Bitmap* BgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagentaBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - SysTryReturnVoidResult(NID_UI_CTRL, BgBitmap, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - __pBackgroundLabel->SetBackgroundBitmap(*BgBitmap); - delete BgBitmap; - BgBitmap = null; + if (__selected) + { + GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedBgColor, __pSelectedBgBitmap); + __pBackgroundLabel->SetBackgroundBitmap(*__pSelectedBgBitmap); + } + else + { + __pBackgroundLabel->SetBackgroundBitmap(*__pNormalBgBitmap); + } __pBackgroundLabel->Invalidate(); } @@ -887,7 +877,7 @@ _OptionMenuItem::TouchMoved(const _Control& source, const _TouchInfo& touchinfo) } void -_OptionMenuItem::OnFontChanged(Tizen::Graphics::Font* pFont) +_OptionMenuItem::OnFontChanged(Font* pFont) { String fontName = _Control::GetFont(); @@ -942,10 +932,4 @@ _OptionMenuItem::SetAndInvalidate(bool flag) Invalidate(); } -const Tizen::Graphics::Bitmap* -_OptionMenuItem::GetMagentaBgBitmap(void) const -{ - return __pMagentaBgBitmap; -} - }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OptionMenuModel.cpp b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp old mode 100755 new mode 100644 index 4a83234..569c9d8 --- a/src/ui/controls/FUiCtrl_OptionMenuModel.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp @@ -46,7 +46,7 @@ result _OptionMenuModel::Construct(void) { result r = __items.Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct ArrayList."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList."); return r; } @@ -97,7 +97,7 @@ _OptionMenuModel::AddItem(_OptionMenuItem* pItem, int mainIndex) { _OptionMenuItem* pMainItem = GetItem(mainIndex); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); r = pMainItem->InsertSubItemAt(*pItem, pMainItem->GetSubItemCount()); } @@ -106,7 +106,7 @@ _OptionMenuModel::AddItem(_OptionMenuItem* pItem, int mainIndex) } result -_OptionMenuModel::InsertItemAt( _OptionMenuItem* pItem, int mainIndex, int subIndex) +_OptionMenuModel::InsertItemAt(_OptionMenuItem* pItem, int mainIndex, int subIndex) { result r = E_SUCCESS; @@ -118,7 +118,7 @@ _OptionMenuModel::InsertItemAt( _OptionMenuItem* pItem, int mainIndex, int subIn { _OptionMenuItem* pMainItem = GetItem(mainIndex); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); r = pMainItem->InsertSubItemAt(*pItem, subIndex); @@ -133,24 +133,24 @@ _OptionMenuModel::SetItemAt(int mainIndex, const String& text, int actionId, con { _OptionMenuItem* pItem = GetItem(mainIndex, subIndex); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT; if (subIndex == INVALID_INDEX) { int index = GetItemIndexFromActionId(actionId); - SysTryReturn(NID_UI_CTRL, (index < 0 || mainIndex == index), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The specified actionId (%d) is not valid", actionId); + SysTryReturnResult(NID_UI_CTRL, (index < 0 || mainIndex == index), E_SYSTEM, + "A system error has occurred. The specified actionId (%d) is not valid", actionId); } else { _OptionMenuItem* pMainItem = GetItem(mainIndex); - SysTryReturn(NID_UI_CTRL, (pMainItem != null), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The specified main index (%d) does not exists.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, pMainItem != null, E_SYSTEM, + "A system error has occurred. The specified main index (%d) does not exists.", mainIndex); int index = pMainItem->GetSubItemIndexFromActionId(actionId); - SysTryReturn(NID_UI_CTRL, (index < 0 || subIndex == index), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The specified actionId (%d) is not valid", actionId); + SysTryReturnResult(NID_UI_CTRL, (index < 0 || subIndex == index), E_SYSTEM, + "A system error has occurred. The specified actionId (%d) is not valid", actionId); } _Label* pLabel = null; @@ -199,11 +199,11 @@ _OptionMenuModel::RemoveItem(int mainIndex, int subIndex) _OptionMenuItem* pMainItem = GetItem(mainIndex); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pMainItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pMainItem != null, r, "Propagating."); - SysTryReturn(NID_UI_CTRL, - (subIndex > INVALID_INDEX && subIndex < pMainItem->GetSubItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified sub index (%d) is out of range.", subIndex); + SysTryReturnResult(NID_UI_CTRL, + (subIndex > INVALID_INDEX && subIndex < pMainItem->GetSubItemCount()), E_INVALID_ARG, + "Invalid argument is used. The specified sub index (%d) is out of range.", subIndex); return pMainItem->RemoveSubItemAt(subIndex); } @@ -239,7 +239,7 @@ _OptionMenuModel::ResetSelectedItem(int selectedIndex) _OptionMenuItem* pItem = null; pItem = static_cast <_OptionMenuItem*>(__items.GetAt(selectedIndex)); - SysTryReturnVoidResult(NID_UI_CTRL, (pItem != null), E_SYSTEM, "[E_SYSTEM] A system error occurred. Item is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system error has occurred. pItem must not be null.", GetErrorMessage(E_SYSTEM)); pItem->SetAndInvalidate(false); } diff --git a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp old mode 100755 new mode 100644 index 96fbecf..57d8b25 --- a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp @@ -30,6 +30,7 @@ #include "FUi_CoordinateSystemUtils.h" #include "FUi_Math.h" #include "FUi_ResourceManager.h" +#include "FUiAnim_MatrixUtil.h" #include "FUiCtrl_ActionEvent.h" #include "FUiCtrl_IActionEventListener.h" @@ -40,16 +41,67 @@ using namespace Tizen::Ui; using namespace Tizen::Base; using namespace Tizen::Base::Runtime; using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; namespace { static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; -static const int OPTION_MENU_LIST_ELEMENT_TEXT = 0; -static const int OPTION_MENU_LIST_ELEMENT_BITMAP = 1; } namespace Tizen { namespace Ui { namespace Controls { +float +SineThirtyThreeTimingFunction::CalculateProgress(float timeProgress) const +{ + const float segments[2][3] = {{0.0f, 0.050f, 0.495f}, {0.495f, 0.940f, 1.0f}}; + + float loc_5 = timeProgress; + int loc_6 = 2; //Length of the segments array + int loc_9 = (int)floor(loc_6 * loc_5); + + if (loc_9 >= loc_6) + { + loc_9 = loc_6 - 1; + } + + float loc_7 = (loc_5 - loc_9 * (1.0f / loc_6)) * loc_6; + + float loc_8[3]; + + for (int i = 0; i < 3; i++) + { + loc_8[i] = segments[loc_9][i]; + } + + float ret = 0 + 1 * (loc_8[0] + loc_7 * (2 * (1 - loc_7) * (loc_8[1] - loc_8[0]) + loc_7 * (loc_8[2] - loc_8[0]))); + return ret; +} + +float +SineSixtyTimingFunction::CalculateProgress(float timeProgress) const +{ + const float segments[3][3] = {{0.0f, 0.01f, 0.37f}, {0.37f, 0.72f, 0.888f}, {0.888f, 0.9999f, 1.0f}}; + float loc_5 = timeProgress; + int loc_6 = 3; //Length of the segments array + int loc_9 = (int)floor(loc_6 * loc_5); + + if (loc_9 >= loc_6) + { + loc_9 = loc_6 - 1; + } + float loc_7 = (loc_5 - loc_9 * (1.0 / loc_6)) * loc_6; + float loc_8[3]; + + for (int i = 0; i < 3; i++) + { + loc_8[i] = segments[loc_9][i]; + } + + float ret = 0 + 1 * (loc_8[0] + loc_7 * (2 * (1 - loc_7) * (loc_8[1] - loc_8[0]) + loc_7 * (loc_8[2] - loc_8[0]))); + + return ret; +} + _OptionMenuPresenter::_OptionMenuPresenter(_OptionMenu* pOptionMenu) : __pOptionMenu(pOptionMenu) , __pModel(null) @@ -96,11 +148,11 @@ _OptionMenuPresenter::Install(void) LoadShape(); - __pModel = new (std::nothrow) _OptionMenuModel; - SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pModel = new (std::nothrow) _OptionMenuModel(); + SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pModel->Construct(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pFont = __pOptionMenu->GetFallbackFont(); r = GetLastResult(); @@ -140,10 +192,10 @@ _OptionMenuPresenter::LoadShape(void) } _OptionMenuItem* -_OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, bool isSubItem) +_OptionMenuPresenter::CreateItemN(const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, bool isSubItem) { _OptionMenuItem* pItem = _OptionMenuItem::CreateOptionMenuItemN(); - SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT; _Label* pLabel = null; @@ -160,7 +212,7 @@ _OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap* pLabel->SetBackgroundBitmap(*pNormalBitmap); pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); - int bitmapY = (__itemHeight - __itemBitmapHeight ) / 2; + int bitmapY = (__itemHeight - __itemBitmapHeight) / 2; pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight)); pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); pItem->AttachChild(*pLabel); @@ -305,15 +357,15 @@ _OptionMenuPresenter::CalculateItemSize(const String &text, OptionMenuItemDrawin result _OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { - _OptionMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + _OptionMenuItem* pItem = CreateItemN(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->AddItem(pItem); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } return r; @@ -322,17 +374,17 @@ _OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* no result _OptionMenuPresenter::AddSubItem(int mainIndex, const String& text, int actionId) { - SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", mainIndex); - _OptionMenuItem* pItem = CreateItem(text, actionId, null, null, null, true); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + _OptionMenuItem* pItem = CreateItemN(text, actionId, null, null, null, true); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->AddItem(pItem, mainIndex); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } return r; @@ -360,14 +412,14 @@ result _OptionMenuPresenter::InsertItem(int mainIndex, const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { - _OptionMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + _OptionMenuItem* pItem = CreateItemN(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->InsertItemAt(pItem, mainIndex); if (r != E_SUCCESS) { delete pItem; - SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item."); + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); } return E_SUCCESS; @@ -376,14 +428,14 @@ _OptionMenuPresenter::InsertItem(int mainIndex, const String& text, int actionId result _OptionMenuPresenter::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { - SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex); - SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex <= __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex); + SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, " Invalid argument is used. mainIndex (%d) is invalid.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex <= __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, " Invalid subIndex %d.", subIndex); - _OptionMenuItem* pItem = CreateItem(text, actionId, null, null, null, true); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + _OptionMenuItem* pItem = CreateItemN(text, actionId, null, null, null, true); + SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item."); result r = __pModel->InsertItemAt(pItem, mainIndex, subIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); return E_SUCCESS; } @@ -391,11 +443,11 @@ _OptionMenuPresenter::InsertSubItemAt(int mainIndex, int subIndex, const String& result _OptionMenuPresenter::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) { - SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex); - SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex); + SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", mainIndex); + SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, "Invalid argument is used. SubIndex (%d) is invalid.", subIndex); result r = __pModel->SetItemAt(mainIndex, text, actionId, null, null, null, __itemFontSize, subIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); return E_SUCCESS; } @@ -403,11 +455,11 @@ _OptionMenuPresenter::SetSubItemAt(int mainIndex, int subIndex, const String& te result _OptionMenuPresenter::RemoveSubItemAt(int mainIndex, int subIndex) { - SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex); - SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex); + SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid", mainIndex); + SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, "Invalid argument is used. SubIndex (%d) is invalid.", subIndex); result r = __pModel->RemoveItem(mainIndex, subIndex); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); return E_SUCCESS; } @@ -415,7 +467,7 @@ _OptionMenuPresenter::RemoveSubItemAt(int mainIndex, int subIndex) int _OptionMenuPresenter::GetSubItemCount(int mainIndex) const { - SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex); + SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), -1, E_INVALID_ARG, "[%s] Invalid argument is used. mainIndex (%d) is invalid.", GetErrorMessage(E_INVALID_ARG), mainIndex); return __pModel->GetSubItemCount(mainIndex); } @@ -443,14 +495,14 @@ _OptionMenuPresenter::CalculateItemMaximumWidth(void) { FloatDimension itemSize(0.0f, 0.0f); FloatDimension textArea(0.0f, 0.0f); - float maxItemWidth = 0.0f; + float maxItemWidth = __itemMinWidth; - for (int i = 0; i < __pModel->GetItemCount() - 1; i++) + for (int i = 0; i < __pModel->GetItemCount(); i++) { _OptionMenuItem* pItem = null; pItem = __pModel->GetItem(i); - SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item."); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system has error occurred. Unable to get the item.", GetErrorMessage(E_SYSTEM)); CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize); @@ -459,27 +511,21 @@ _OptionMenuPresenter::CalculateItemMaximumWidth(void) maxItemWidth = itemSize.width; } - __itemWidth = maxItemWidth; } - + __itemWidth = maxItemWidth; } result _OptionMenuPresenter::SetItem(int index, const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) { - SysTryReturn(NID_UI_CTRL, index >=0 && index < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", index); + SysTryReturnResult(NID_UI_CTRL, index >=0 && index < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", index); result r = __pModel->SetItemAt(index, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap, __itemFontSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); _OptionMenuItem* pItem = __pModel->GetItem(index); - if (pItem == null) - { - SysLog(NID_UI_CTRL, "Item is null."); - return r; - } - + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); CalculateItemMaximumWidth(); return r; @@ -488,14 +534,22 @@ _OptionMenuPresenter::SetItem(int index, const String& text, int actionId, const result _OptionMenuPresenter::DeleteItem(int index) { - SysTryReturn(NID_UI_CTRL, (index < __pOptionMenu->GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The specified main index (%d) is invalid.", index); + SysTryReturnResult(NID_UI_CTRL, (index < __pOptionMenu->GetItemCount()), E_INVALID_ARG, + "Invalid argument is used. The specified index (%d) is invalid.", index); + + result r = E_SUCCESS; + _OptionMenuItem* pItem = null; - result r = __pOptionMenu->GetScrollPanel()->DetachChild(*__pModel->GetItem(index)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item."); + pItem = __pModel->GetItem(index); + + if (pItem != null && pItem->HasParent()) + { + r = __pOptionMenu->GetScrollPanel()->DetachChild(*__pModel->GetItem(index)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item."); + } r = __pModel->RemoveItem(index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item."); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); CalculateItemMaximumWidth(); @@ -505,13 +559,25 @@ _OptionMenuPresenter::DeleteItem(int index) result _OptionMenuPresenter::DeleteItemAll(void) { - SysTryReturn(NID_UI_CTRL, (__pOptionMenu->GetItemCount() > 0), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error occurred. No items exists."); + SysTryReturnResult(NID_UI_CTRL, (__pOptionMenu->GetItemCount() > 0), E_SYSTEM, + "A system error has occurred. No items exists."); - __pOptionMenu->GetScrollPanel()->DetachAllChildren(); + result r = E_SUCCESS; + _OptionMenuItem* pItem = null; - result r = __pModel->RemoveAllItem(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all."); + for (int index = 0; index < __pOptionMenu->GetItemCount(); index++) + { + pItem = __pModel->GetItem(0); + + if (pItem != null && pItem->HasParent()) + { + r = __pOptionMenu->GetScrollPanel()->DetachChild(*pItem); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item."); + } + + r = __pModel->RemoveItem(0); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); + } return r; } @@ -521,6 +587,7 @@ _OptionMenuPresenter::CalculateWindowRect(void) { result r = CalculateRect(); AdjustItemPosition(); + __pOptionMenu->SetAllAccessibilityElement(); return r; } @@ -528,6 +595,18 @@ _OptionMenuPresenter::CalculateWindowRect(void) result _OptionMenuPresenter::ApplyColorProperty(void) { + int count; + count = __pOptionMenu->GetItemCount(); + + for (int i = 0; i < count; i++) + { + _OptionMenuItem* pItem = null; + Color color = __pOptionMenu->GetItemColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED); + + pItem = __pModel->GetItem(i); + pItem->SetPressedItemColor(color); + } + return E_SUCCESS; } @@ -566,10 +645,9 @@ _OptionMenuPresenter::CalculateRect(void) bodyRect.y = screen.height - bodyRect.height; - windowRect.x = bodyRect.x ; - windowRect.y = bodyRect.y; - windowRect.width = bodyRect.width ; - windowRect.height = bodyRect.height; + bodyRect = CoordinateSystem::AlignToDevice(bodyRect); + + windowRect = bodyRect; bodyRect.x = 0.0f; bodyRect.y = 0.0f; @@ -749,7 +827,7 @@ _OptionMenuPresenter::Draw(void) result r = E_SUCCESS; Canvas* pCanvas = __pOptionMenu->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating"); // Clear canvas for drawing area of the OptionMenu. pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -819,8 +897,7 @@ _OptionMenuPresenter::OnEnterKeyReleased(int selectedIndex) } else { - __pOptionMenu->Close(); - __pOptionMenu->FireActionEvent(pItem->GetActionId()); + __pOptionMenu->CloseAnimation(pItem->GetActionId()); } } return; @@ -829,7 +906,7 @@ _OptionMenuPresenter::OnEnterKeyReleased(int selectedIndex) result _OptionMenuPresenter::DrawBackground(Canvas* pCanvas) { - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null"); result r = E_SUCCESS; @@ -907,10 +984,13 @@ _OptionMenuPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& if (!itemRect.Contains(touchPosition)) { __selectedIndex = -1; - __pOptionMenu->SetVisibleState(false); - + __pOptionMenu->CloseAnimation(-1); return true; } + else + { + __pOptionMenu->SetFocused(true); + } } __pOptionMenu->Invalidate(true); @@ -932,15 +1012,13 @@ _OptionMenuPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& } else { - // Fire Action Event - __pOptionMenu->SetVisibleState(false); PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pOptionMenu); - __pOptionMenu->FireActionEvent(pItem->GetActionId()); + // Fire Action Event + __pOptionMenu->CloseAnimation(pItem->GetActionId()); } } } - return true; } @@ -980,8 +1058,7 @@ _OptionMenuPresenter::OnActionPerformed(const _Control& source, int actionId) { // for SubMenu Events __pOptionMenu->DestroySubMenu(); - __pOptionMenu->SetVisibleState(false); - __pOptionMenu->FireActionEvent(actionId); + __pOptionMenu->CloseAnimation(actionId); } void @@ -1011,16 +1088,19 @@ _OptionMenuPresenter::OnFontInfoRequested(unsigned long& style, float& size) void _OptionMenuPresenter::SetAllAccessibilityElement(void) { + int scrollPanelMargin; + GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + _AccessibilityContainer* pContainerOptionMenu = __pOptionMenu->GetAccessibilityContainer(); if (pContainerOptionMenu != null) { _AccessibilityElement* pElementOptionMenu = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, pElementOptionMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, pElementOptionMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pElementOptionMenu->SetSupportOperatingGesture(false); - pElementOptionMenu->SetTrait(L"Optionual popup"); - pElementOptionMenu->SetHint(L"double tap to close"); - pElementOptionMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pOptionMenu->GetBoundsF().width, __pOptionMenu->GetBoundsF().height)); + //pElementOptionMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); + pElementOptionMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS"); + pElementOptionMenu->SetBounds(FloatRectangle(__pOptionMenu->GetItemRect().x, __pOptionMenu->GetItemRect().y - scrollPanelMargin, __pOptionMenu->GetItemRect().width, __pOptionMenu->GetItemRect().height + 2* scrollPanelMargin)); pContainerOptionMenu->AddElement(*pElementOptionMenu); __pOptionMenu->AddAccessibilityElement(*pElementOptionMenu); @@ -1042,7 +1122,9 @@ _OptionMenuPresenter::SetAllAccessibilityElement(void) pElement->SetName(L"OptionMenuItem" + Integer::ToString(i)); if (pItem->GetType() == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP) { - pElement->SetLabel(L"icon " + pItem->GetText()); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string); + pElement->SetLabel(string + pItem->GetText()); } else { diff --git a/src/ui/controls/FUiCtrl_OverlayAgent.cpp b/src/ui/controls/FUiCtrl_OverlayAgent.cpp index 789d7c9..9ee34b1 100644 --- a/src/ui/controls/FUiCtrl_OverlayAgent.cpp +++ b/src/ui/controls/FUiCtrl_OverlayAgent.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -42,6 +43,7 @@ #include "FUiAnim_VisualElementSurfaceImpl.h" #include "FUiAnim_VisualElementImpl.h" #include "FUiCtrl_OverlayAgent.h" +#include "FUiAnim_DisplayManager.h" #define B(c,s) ((((unsigned int)(c)) & 0xff) << (s)) #define FOURCC(a,b,c,d) (B(d,24) | B(c,16) | B(b,8) | B(a,0)) @@ -154,14 +156,18 @@ OnPixmapDamaged(void* pData, int type, void* pEvent) Tizen::Ui::Controls::_OverlayAgent* pOverlayAgent = static_cast(pData); SysTryReturn(NID_UI_CTRL, pOverlayAgent != null, ECORE_CALLBACK_PASS_ON, E_INVALID_DATA, "[E_INVALID_DATA] Failed to get OverlayAgent from DamagedEvent."); - if (pDamageEvent->drawable != pOverlayAgent->GetPixmap()) + for (int i = 0; i < Tizen::Ui::Controls::_OVERLAY_AGENT_PIXMAP_MAX; i++) { - return ECORE_CALLBACK_PASS_ON; - } + if (pOverlayAgent->GetPixmap(i) == pDamageEvent->drawable) + { + pOverlayAgent->SetRendererFlushNeeded(i); + pOverlayAgent->SetBufferFree(i); - pOverlayAgent->SetRendererFlushNeeded(); + return ECORE_CALLBACK_PASS_ON; + } + } - return ECORE_CALLBACK_DONE; + return ECORE_CALLBACK_PASS_ON; } void @@ -190,11 +196,11 @@ OnEvasImageDamaged(void* pData, Evas_Object* pImageObject) pOverlayAgent->SetDestination(FloatDimension(static_cast(newImageSize.width), static_cast(newImageSize.height))); } } + } // Anonymous namespace Tizen { namespace Ui { namespace Controls { - int _OverlayAgent::__baseXvPort = 0; bool _OverlayAgent::__isPortGrabbed[]={false,}; @@ -216,8 +222,17 @@ struct visualElementDeleter } }; +struct xVImageDeleter +{ + void operator()(XvImage* pXvImage) + { + XFree(pXvImage); + pXvImage = null; + } +}; + _OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(void) - : __pTimer(null) + : __pOverlayTimer(null) , __pImageObject(null) , __showStateChanged(false) { @@ -225,7 +240,7 @@ _OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(void) _OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(const _OverlayVisualElement& rhs) : _VisualElement(rhs) - , __pTimer(null) + , __pOverlayTimer(null) , __pImageObject(rhs.__pImageObject) , __showStateChanged(rhs.__showStateChanged) { @@ -233,11 +248,11 @@ _OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(const _OverlayVisual _OverlayAgent::_OverlayVisualElement::~_OverlayVisualElement(void) { - if (__pTimer) + if (__pOverlayTimer) { - __pTimer->Cancel(); - delete __pTimer; - __pTimer = null; + __pOverlayTimer->Cancel(); + delete __pOverlayTimer; + __pOverlayTimer = null; } if (__pImageObject) @@ -250,10 +265,10 @@ _OverlayAgent::_OverlayVisualElement::~_OverlayVisualElement(void) result _OverlayAgent::_OverlayVisualElement::Construct(void) { - if (!__pTimer) + if (!__pOverlayTimer) { - __pTimer = new (nothrow) Timer(); - __pTimer->Construct(*this); + __pOverlayTimer = new (nothrow) Timer(); + __pOverlayTimer->Construct(*this); } return _VisualElement::Construct(); @@ -288,7 +303,13 @@ _OverlayAgent::_OverlayVisualElement::SetImageObjectShowStateChanged(void) { __showStateChanged = true; - __pTimer->Start(0); + if (IsFailed(__pOverlayTimer->Start(0))) + { + __pOverlayTimer->Cancel(); + __pOverlayTimer->Start(0); + SysSecureLog(NID_UI_CTRL, "The timer is restarted."); + ClearLastResult(); + } } void @@ -322,12 +343,16 @@ _OverlayAgent::_OverlayVisualElement::CloneN(void) const void _OverlayAgent::_OverlayVisualElement::OnTimerExpired(Timer& timer) { - if (__showStateChanged && __pImageObject) + if (&timer == __pOverlayTimer && __showStateChanged && __pImageObject) { SetShowState(evas_object_visible_get(__pImageObject)); __showStateChanged = false; SysSecureLog(NID_UI_CTRL, "Updates show state of Renderer VisualElement"); } + else + { + SysSecureLog(NID_UI_CTRL, "The state of timer is invalid."); + } } _OverlayAgent* @@ -356,25 +381,52 @@ _OverlayAgent::_OverlayAgent(_OverlayAgentStyle style, const _Control& parentCon , __needToRellaocImage(false) , __pCurrentSourceBuffer(null) , __pConvertedSourceBuffer(null) - , __pixmapDamageHandle(0) , __pPixmapEventHandler(null) - , __pixmap(0) + , __currentReadingPixmap(-1) + , __stopReadingPixmap(false) + , __pMutex(null) + , __prevTime(0) , __xvPort(-1) , __pXvImage(null) , __pShmInfo(null) { + + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + __pixmap[i].__nativePixmap = 0; + __pixmap[i].__timeStamp = 0; + __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + __pixmapDamageHandle[i] = 0; + __pImageObjectForPixmap = 0; + __pSurfaceForPixmap = null; + } + result r = CreateRendererVisualElement(parentControl, logicalBounds, physicalBounds); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); SysTryReturnVoidResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "[E_SYSTEM] The Renderer VisualElement is null."); SysTryReturnVoidResult(NID_UI_CTRL, __pImageObject!= null, E_SYSTEM, "[E_SYSTEM] The Renderder ImageObject is null."); + if(__style == _OVERLAY_AGENT_STYLE_REGION_GL || __style == _OVERLAY_AGENT_STYLE_PANEL_GL) + { + if (!__pMutex) + { + __pMutex = new (std::nothrow) Mutex(); + SysTryReturnVoidResult(NID_UI_CTRL, __pMutex != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pMutex->Create("GET_FREE_PIXMAP"); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + __overlayAgentCount++; SysLog(NID_UI_CTRL, "The current count of OverlayAgent is %d", __overlayAgentCount); } _OverlayAgent::~_OverlayAgent(void) { + __stopReadingPixmap = true; + SysLog(NID_UI_CTRL, "The %dth OverlayAgent is deleted.", __overlayAgentCount); __overlayAgentCount--; @@ -383,22 +435,24 @@ _OverlayAgent::~_OverlayAgent(void) UngrabXvPort(); } - if (__pPixmapEventHandler) + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) { - ecore_event_handler_del(__pPixmapEventHandler); - __pPixmapEventHandler = null; - } + if (__pixmapDamageHandle[i]) + { + ecore_x_damage_free(__pixmapDamageHandle[i]); + __pixmapDamageHandle[i] = 0; + } - if (__pixmapDamageHandle) - { - ecore_x_damage_free(__pixmapDamageHandle); - __pixmapDamageHandle = 0; + XFreePixmap((Display*) ecore_x_display_get(), __pixmap[i].__nativePixmap); + __pixmap[i].__nativePixmap = 0; + __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + __pSurfaceForPixmap = null; } - if (__pixmap != 0) + if (__pPixmapEventHandler) { - XFreePixmap((Display*)ecore_x_display_get(), __pixmap); - __pixmap = 0; + ecore_event_handler_del(__pPixmapEventHandler); + __pPixmapEventHandler = null; } if (__pShmInfo) @@ -406,6 +460,7 @@ _OverlayAgent::~_OverlayAgent(void) XShmDetach((Display*)ecore_x_display_get(), __pShmInfo); shmdt(__pShmInfo->shmaddr); shmctl(__pShmInfo->shmid, IPC_RMID, NULL); + delete __pShmInfo; __pShmInfo = null; } @@ -429,7 +484,6 @@ _OverlayAgent::~_OverlayAgent(void) if (__pRendererVE != null) { - __pRendererVE->SetSurface(null); __pRendererVE->Destroy(); __pRendererVE = null; } @@ -439,6 +493,13 @@ _OverlayAgent::~_OverlayAgent(void) evas_object_del(__pImageObject); __pImageObject = null; } + + if (__pMutex) + { + __pMutex->Release(); + delete __pMutex; + __pMutex = null; + } } result @@ -469,7 +530,18 @@ _OverlayAgent::GetBufferInfo(BufferInfo& bufferInfo) const } else { - pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_OVERLAY_REGION, __pixmap); + if (__pixmap[1].__nativePixmap == 0) + { + r = const_cast<_OverlayAgent*>(this)->CreateAdditionalPixmap(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to create pixmap for overlay agent."); + } + + const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__userProperties.__displayMode = 2; //::PLAYER_DISPLAY_MODE_FULL_SCREEN + const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pInstance = const_cast<_OverlayAgent*>(this); + const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pPixmapCallback = _OverlayAgent::GetFreeBuffer; + const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pPixmapErrorCallback = _OverlayAgent::PixmapErrorCallback; + + pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_OVERLAY_REGION, const_cast<_OverlayAgent*>(this)->GetFreeBuffer(), (void*)& __pixmapCallBackData); SysSecureLog(NID_UI_CTRL,"The returned handle of BufferInfo is a pixmap (HANDLE_TYPE_OVERLAY_REGION)"); } @@ -571,7 +643,7 @@ _OverlayAgent::GrabXvPort(void) } 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); + SysTryReturnResult(NID_UI_CTRL, portCount >= 1 && portCount <= _OVERLAY_AGENT_XV_PORT, E_SYSTEM, "The current count of available XvPort[%d] is invalid.", portCount); _OverlayAgent::__baseXvPort = baseXvPort; @@ -593,8 +665,8 @@ _OverlayAgent::GrabXvPort(void) } } - 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); + SysTryReturnResult(NID_UI_CTRL, __xvPort > 0, E_SYSTEM, "Failed to grab pixmap[%d]", __pixmap[0].__nativePixmap); + SysSecureLog(NID_UI_CTRL, "The current value of grabbed XvPort is [%d] and pixmap is [%d]", __xvPort, __pixmap[0].__nativePixmap); return E_SUCCESS; } @@ -611,7 +683,7 @@ _OverlayAgent::UngrabXvPort(void) XvSetPortAttribute(pDisplay, __xvPort, atom, 1); XvUngrabPort(pDisplay, __xvPort, 0); - SysSecureLog(NID_UI_CTRL, "The current value of ungrabbed XvPort is %d, and pixmap is %d", __xvPort, __pixmap); + SysSecureLog(NID_UI_CTRL, "The current value of ungrabbed XvPort is %d, and pixmap is %d", __xvPort, __pixmap[0].__nativePixmap); __isPortGrabbed[__xvPort - __baseXvPort] = false; __xvPort = -1; @@ -621,7 +693,7 @@ _OverlayAgent::UngrabXvPort(void) result _OverlayAgent::PutXvImage(void) { - SysTryReturnResult(NID_UI_CTRL, __pixmap != 0, E_SYSTEM, "The current value of pixmap is null"); + SysTryReturnResult(NID_UI_CTRL, __pixmap[0].__nativePixmap != 0, E_SYSTEM, "The current value of pixmap is null"); Display* pDisplay = (Display*)ecore_x_display_get(); SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null"); @@ -661,25 +733,19 @@ _OverlayAgent::PutXvImage(void) if (__needToRellaocImage) { - XShmSegmentInfo* pShmInfo = new (std::nothrow) XShmSegmentInfo(); + unique_ptr pShmInfo(new (std::nothrow) XShmSegmentInfo()); SysTryReturnResult(NID_UI_CTRL, pShmInfo != null, E_SYSTEM, "Failed to create XShmSegmentInfo"); - XvImage* pXvImage = XvShmCreateImage(pDisplay, __xvPort, __savedColorFormat, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, pShmInfo); + unique_ptr pXvImage(XvShmCreateImage(pDisplay, __xvPort, __savedColorFormat, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, pShmInfo.get())); SysTryReturnResult(NID_UI_CTRL, pXvImage != null, E_SYSTEM, "Failed to create XvImage"); pShmInfo->shmid = shmget(IPC_PRIVATE, pXvImage->data_size, IPC_CREAT | 0777); pShmInfo->shmaddr = pXvImage->data = (char*)shmat(pShmInfo->shmid, 0, 0); pShmInfo->readOnly = False; + SysTryReturnResult(NID_UI_CTRL, XShmAttach(pDisplay, pShmInfo.get()), E_SYSTEM, "[E_SYSTEM] Failed to XShmAttach."); - if (!XShmAttach(pDisplay, pShmInfo)) - { - XFree(pXvImage); - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Failed to XShmAttach."); - return E_SYSTEM; - } - - __pXvImage = pXvImage; - __pShmInfo = pShmInfo; + __pShmInfo = pShmInfo.release(); + __pXvImage = pXvImage.release(); } if (__pXvImage == null) @@ -696,7 +762,7 @@ _OverlayAgent::PutXvImage(void) evas_object_image_size_get(__pImageObject, &imageWidth, &imageHeight); GC gc= DefaultGCOfScreen(DefaultScreenOfDisplay(pDisplay)); - XvShmPutImage(pDisplay, __xvPort, __pixmap, gc, __pXvImage, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, 0, 0, imageWidth, imageHeight, False); + XvShmPutImage(pDisplay, __xvPort, __pixmap[0].__nativePixmap, gc, __pXvImage, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, 0, 0, imageWidth, imageHeight, False); XSync(pDisplay, 0); if (__needToRellaocImage) @@ -731,7 +797,7 @@ _OverlayAgent::PutEvasImage(void) __pConvertedSourceBuffer = null; } - __pConvertedSourceBuffer = new (std::nothrow) ByteBuffer; + __pConvertedSourceBuffer = new (std::nothrow) ByteBuffer(); SysTryReturnResult(NID_UI_CTRL, __pConvertedSourceBuffer != null, E_OUT_OF_MEMORY, "Failed to create a ByteBuffer for Evas Image Object."); r = __pConvertedSourceBuffer->Construct(__currentSourceBufferSize.width * __currentSourceBufferSize.height * 4); @@ -778,7 +844,6 @@ _OverlayAgent::PutEvasImage(void) evas_object_image_size_set(__pImageObject, __currentSourceBufferSize.width, __currentSourceBufferSize.height); evas_object_image_data_set(__pImageObject, pImageData); evas_object_image_data_update_add(__pImageObject, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height); - evas_object_show(__pImageObject); if (__needToRellaocImage) { @@ -793,12 +858,6 @@ _OverlayAgent::PutEvasImage(void) } result -_OverlayAgent::SetRendererFlushNeeded(void) -{ - return __pRendererVE->SetFlushNeeded(); -} - -result _OverlayAgent::SetRotation(_OverlayAgentRotation rotation) { SysTryReturnResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "The Renderer Visual Element is null"); @@ -1000,10 +1059,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<_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"); + SysTryReturnResult(NID_UI_CTRL, pRendererVE != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = pRendererVE->Construct(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1020,8 +1078,8 @@ _OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const logicalPoint.x = logicalBounds.x; logicalPoint.y = logicalBounds.y; } - pRendererVE->SetBounds(FloatRectangle(logicalPoint.x, logicalPoint.y, logicalBounds.width, logicalBounds.height)); + pRendererVE->SetBounds(FloatRectangle(logicalPoint.x, logicalPoint.y, logicalBounds.width, logicalBounds.height)); __pParentVE = parentControl.GetVisualElement(); SysTryReturnResult(NID_UI_CTRL, __pParentVE != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayPanel's VisualElement is null."); @@ -1038,37 +1096,37 @@ _OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const _EflNode* pEflNode = dynamic_cast<_EflNode*>(pRendererVE->GetNativeNode()); SysTryReturnResult(NID_UI_CTRL, pEflNode != null, E_SYSTEM, "Failed to get EflNode from Renderer VisualElement."); - Evas_Object* pSmartObject = (Evas_Object*) pEflNode->GetGroupContainer(); - SysTryReturnResult(NID_UI_CTRL, pSmartObject != null, E_SYSTEM, "Failed to get Group Container of Renderer VisualElement."); - - Evas* pEvas = evas_object_evas_get(pSmartObject); + Evas* pEvas = pEflNode->GetEvas(); SysTryReturnResult(NID_UI_CTRL, pEvas != null, E_SYSTEM, "Failed to get Evas of Renderer VisualElement."); - Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas); - SysTryReturnResult(NID_UI_CTRL, pEcoreEvas != null, E_SYSTEM, "Failed to get Ecore Evas of Renderer VisualElement."); - __pImageObject = evas_object_image_add(pEvas); SysTryReturnResult(NID_UI_CTRL, __pImageObject != null, E_SYSTEM, "Failed to get Renderer Image Object."); evas_object_name_set(__pImageObject, "OverlayRenderer"); evas_object_image_size_set(__pImageObject, physicalBounds.width, physicalBounds.height); evas_object_image_alpha_set(__pImageObject, false); - evas_object_image_filled_set(__pImageObject, EINA_TRUE); - evas_object_resize(__pImageObject, physicalBounds.width, physicalBounds.height); - evas_object_move(__pImageObject, physicalBounds.x, physicalBounds.y); - evas_object_show(__pImageObject); + evas_object_hide(__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."); unique_ptr pRendererSurface(_VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pDisplayContext, (Handle)__pImageObject, Dimension(physicalBounds.width, physicalBounds.height))); SysTryReturnResult(NID_UI_CTRL, pRendererSurface != null, E_SYSTEM, "[E_SYSTEM] The current value of RootWindow's DisplayContext is null."); - r = pRendererVE->SetSurface(pRendererSurface.release()); + r = pRendererVE->SetSurface(pRendererSurface.get()); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW) + { + evas_object_image_pixels_get_callback_set(__pImageObject, OnEvasImageDamaged,(void*)this); + } + else if (__style == _OVERLAY_AGENT_STYLE_REGION_GL || __style == _OVERLAY_AGENT_STYLE_PANEL_GL) + { + __pImageObjectForPixmap = __pImageObject; + SysTryReturnResult(NID_UI_CTRL, __pImageObjectForPixmap != null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + r = pRendererVE->SetFlushNeeded(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1076,16 +1134,11 @@ _OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const __pRendererVE = pRendererVE.release(); __standardRendererBounds = __pRendererVE->GetBounds(); - if (__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW) - { - evas_object_image_pixels_get_callback_set(__pImageObject, OnEvasImageDamaged,(void*)this); - } - return r; } result -_OverlayAgent::CreatePixmap(const Rectangle& physicalBounds) +_OverlayAgent::CreatePixmap(const Rectangle& physicalBounds, int pixmapIndex) { //Set size of pixmap Dimension pixmapSize(physicalBounds.width, physicalBounds.height); @@ -1096,63 +1149,262 @@ _OverlayAgent::CreatePixmap(const Rectangle& physicalBounds) Display *pDisplay = (Display*)ecore_x_display_get(); SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null"); - __pixmap = XCreatePixmap(pDisplay, DefaultRootWindow(pDisplay), pixmapSize.width, pixmapSize.height, DefaultDepth(pDisplay, DefaultScreen(pDisplay))); - SysTryReturnResult(NID_UI_CTRL, __pixmap != 0, E_SYSTEM, "Failed to create a pixmap of Overlay Agent"); + __pixmap[pixmapIndex].__timeStamp = 0; + __pixmap[pixmapIndex].__pixmapState = _PIXMAP_STATE_FREE; + __pixmap[pixmapIndex].__nativePixmap = XCreatePixmap(pDisplay, DefaultRootWindow(pDisplay), physicalBounds.width, physicalBounds.height, DefaultDepth(pDisplay, DefaultScreen(pDisplay))); + SysTryReturnResult(NID_UI_CTRL, __pixmap[pixmapIndex].__nativePixmap != 0, E_SYSTEM, "Failed to create a pixmap of Overlay Agent"); - GC gc = XCreateGC(pDisplay, __pixmap, 0,0); + GC gc = XCreateGC(pDisplay, __pixmap[pixmapIndex].__nativePixmap, 0, 0); SysTryReturnResult(NID_UI_CTRL, gc > 0, E_SYSTEM, "Failed to create Graphic Contexts"); //Set initial color XSetForeground(pDisplay, gc, (long unsigned int)(Color(0xff000000).GetRGB32())); - XFillRectangle(pDisplay, __pixmap, gc, 0, 0, pixmapSize.width, pixmapSize.height); + XFillRectangle(pDisplay, __pixmap[pixmapIndex].__nativePixmap, gc, 0, 0, physicalBounds.width, physicalBounds.height); XSync(pDisplay, 0); XFreeGC(pDisplay, gc); //Set evas native surface Evas_Native_Surface evasNativeSuface = {0,}; - evasNativeSuface.version = EVAS_NATIVE_SURFACE_VERSION; evasNativeSuface.type = EVAS_NATIVE_SURFACE_X11; evasNativeSuface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get()); - evasNativeSuface.data.x11.pixmap = __pixmap; + evasNativeSuface.data.x11.pixmap = __pixmap[pixmapIndex].__nativePixmap; - evas_object_lower(__pImageObject); - evas_object_image_native_surface_set(__pImageObject, &evasNativeSuface); +// evas_object_lower(__pImageObjectForPixmap); + evas_object_image_native_surface_set(__pImageObjectForPixmap, &evasNativeSuface); + __pixmapDamageHandle[pixmapIndex] = ecore_x_damage_new(__pixmap[pixmapIndex].__nativePixmap, ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES); + SysTryCatch(NID_UI_CTRL, __pixmapDamageHandle[pixmapIndex] != 0, , E_SYSTEM, "[E_SYSTEM] Failed to create a damage object"); - __pixmapDamageHandle = ecore_x_damage_new(__pixmap, ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES); - SysTryCatch(NID_UI_CTRL, __pixmapDamageHandle != 0, , E_SYSTEM, "[E_SYSTEM] Failed to create a damage object"); + if (pixmapIndex == 0) + { + __pPixmapEventHandler = ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, OnPixmapDamaged, (void*)this); + SysTryCatch(NID_UI_CTRL, __pPixmapEventHandler != null, , E_SYSTEM, "[E_SYSTEM] Failed to add a pixmap damage event handle"); + } - __pPixmapEventHandler = ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, OnPixmapDamaged, (void*)this); - SysTryCatch(NID_UI_CTRL, __pPixmapEventHandler != null, , E_SYSTEM, "[E_SYSTEM] Failed to add a pixmap damage event handle"); + SysSecureLog(NID_UI_CTRL,"The [%d]th pixmap[%d] is Created", pixmapIndex, (unsigned int) __pixmap[pixmapIndex].__nativePixmap); return E_SUCCESS; CATCH: - if (__pPixmapEventHandler) + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) { - ecore_event_handler_del(__pPixmapEventHandler); - __pPixmapEventHandler = null; + if (__pPixmapEventHandler) + { + ecore_event_handler_del(__pPixmapEventHandler); + __pPixmapEventHandler = null; + } + + if (__pixmapDamageHandle[i]) + { + ecore_x_damage_free(__pixmapDamageHandle[i]); + __pixmapDamageHandle[i] = 0; + } + + if (__pixmap[i].__nativePixmap) + { + XFreePixmap((Display*)ecore_x_display_get(), __pixmap[i].__nativePixmap); + __pixmap[i].__nativePixmap = 0; + __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + } } - if (__pixmapDamageHandle) + return E_SYSTEM; +} + +result +_OverlayAgent::CreateAdditionalPixmap(void) +{ + int physicalWidth = 0; + int physicalHeight = 0; + + evas_object_image_size_get(__pImageObjectForPixmap, &physicalWidth, &physicalHeight); + SysTryReturnResult(NID_UI_CTRL, (physicalWidth >= GetDstRectMinWidth()) && (physicalHeight >= GetDstRectMinHeight()), + E_SYSTEM, "Failed to create a pixmap. Because input bounds[%d, %d] is under minimum size.", physicalWidth, physicalHeight); + + Rectangle physicalBounds(0, 0, physicalWidth, physicalHeight); + + for (int i = 1; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) { - ecore_x_damage_free(__pixmapDamageHandle); - __pixmapDamageHandle = 0; + result r = CreatePixmap(physicalBounds, i); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } - if (__pixmap) + return E_SUCCESS; +} + +unsigned int +_OverlayAgent::GetFreeBuffer(void* userData) +{ + _OverlayAgent* pOverlayAgent = dynamic_cast<_OverlayAgent*> ((_OverlayAgent*)userData); + if (pOverlayAgent == null) { - XFreePixmap((Display*)ecore_x_display_get(), __pixmap); - __pixmap = 0; + return 0; } - return E_SYSTEM; + return pOverlayAgent->GetFreeBuffer(); +} + +void +_OverlayAgent::PixmapErrorCallback(unsigned int* pPixmap, void* userData) +{ + _OverlayAgent* pOverlayAgent = dynamic_cast<_OverlayAgent*> ((_OverlayAgent*)userData); + if (pOverlayAgent == null) + { + return; + } + + if (pPixmap != 0) + { + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + if ((unsigned int) pOverlayAgent->__pixmap[i].__nativePixmap == (unsigned int) *pPixmap) + { + pOverlayAgent->__pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + SystemTime::GetTicks(pOverlayAgent->__pixmap[i].__timeStamp); + + SysSecureLog(NID_UI_CTRL,"The [%d]th pixmap[%d] is invalid and it will be FREE", + i, (unsigned int) pOverlayAgent->__pixmap[i].__nativePixmap); + + return; + } + } + } +} + +void +_OverlayAgent::SetBufferFree(int index) +{ + if (__pixmap[index].__pixmapState == _PIXMAP_STATE_ENQUEUE && __pixmap[index].__nativePixmap != 0) + { + MutexGuard foo(*__pMutex); + + __pixmap[index].__pixmapState = _PIXMAP_STATE_FREE; + SystemTime::GetTicks(__pixmap[index].__timeStamp); + + SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is FREEING (free)", index, (unsigned int) __pixmap[index].__nativePixmap); + + if (__pixmap[index].__timeStamp != __prevTime) + { + long long timeGap = __pixmap[index].__timeStamp - __prevTime; + + SysSecureLog(NID_UI_CTRL, "The gap of display time (current%llu - prev %llu) is %lld and FPS : [%.6f]", + __pixmap[index].__timeStamp, __prevTime, timeGap, (float) 1000.0f / (float) timeGap); + } + + SystemTime::GetTicks(__prevTime); + } +} + +result +_OverlayAgent::SetRendererFlushNeeded(unsigned int index) +{ + MutexGuard foo(*__pMutex); + + Evas_Native_Surface evasNativeSuface = {0,}; + evasNativeSuface.version = EVAS_NATIVE_SURFACE_VERSION; + evasNativeSuface.type = EVAS_NATIVE_SURFACE_X11; + evasNativeSuface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get()); + evasNativeSuface.data.x11.pixmap = __pixmap[index].__nativePixmap; + evas_object_image_native_surface_set(__pImageObjectForPixmap, &evasNativeSuface); + + __pRendererVE->SetFlushNeeded(); + + __pixmap[index].__pixmapState = _PIXMAP_STATE_ENQUEUE; + SystemTime::GetTicks(__pixmap[index].__timeStamp); + + SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is ENQUEUEING (display)", index, (unsigned int) __pixmap[index].__nativePixmap); + + return E_SUCCESS; +} + +int +_OverlayAgent::FindFreeBuffer(void) +{ + int oldestFreedPixmap = -1; + long long timeStamp = 0; + int count = 0; + SystemTime::GetTicks(timeStamp); + + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + if (__pixmap[i].__pixmapState == _PIXMAP_STATE_FREE) + { + if (__pixmap[i].__timeStamp < timeStamp) + { + count++; + oldestFreedPixmap = i; + timeStamp = __pixmap[i].__timeStamp; + } + } + } + +#ifdef _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER + if (count == 0 || oldestFreedPixmap == __currentReadingPixmap) + { + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + if (__pixmap[i].__pixmapState == _PIXMAP_STATE_DEQUEUE) + { + SystemTime::GetTicks(timeStamp); + if (timeStamp - __pixmap[i].__timeStamp > _DEQUEUE_THRESHOLD_EVENT_TIME) + { + count++; + oldestFreedPixmap = i; + timeStamp = __pixmap[i].__timeStamp; + + MutexGuard foo(*__pMutex); + __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + + SysSecureLog(NID_UI_CTRL, "The dequeued [%d]th pixmap[%d] is over the threshold evnet time(%lu)" + ,i, (unsigned int) __pixmap[i].__nativePixmap, (unsigned long) __pixmap[i].__timeStamp); + + break; + } + } + } + } +#endif //_FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER + + if (count == 0) + { + return -1; + } + else + { + return oldestFreedPixmap; + } } Pixmap -_OverlayAgent::GetPixmap(void) const +_OverlayAgent::GetPixmap(int index) const +{ + return __pixmap[index].__nativePixmap; +} + +unsigned int +_OverlayAgent::GetFreeBuffer(void) { - return __pixmap; + if (__stopReadingPixmap) + { + return 0; + } + + int oldestFreedPixmap = FindFreeBuffer(); + + if (oldestFreedPixmap == -1 || oldestFreedPixmap == __currentReadingPixmap || __pixmap[oldestFreedPixmap].__nativePixmap == 0) + { + return 0; + } + + MutexGuard foo(*__pMutex); + __pixmap[oldestFreedPixmap].__pixmapState = _PIXMAP_STATE_DEQUEUE; + SystemTime::GetTicks(__pixmap[oldestFreedPixmap].__timeStamp); + __currentReadingPixmap = oldestFreedPixmap; + + SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is DEQUEUEING (ready to render)", + oldestFreedPixmap, (unsigned int) __pixmap[oldestFreedPixmap].__nativePixmap); + + return (unsigned int) __pixmap[oldestFreedPixmap].__nativePixmap; } Evas_Object* @@ -1387,6 +1639,9 @@ _OverlayAgent::EvaluateBounds(OverlayAgentEvaluationOption option, FloatRectangl FloatRectangle originalInputRect(rect); rect = _CoordinateSystemUtils::ConvertToFloat(_CoordinateSystemUtils::InverseTransform(physicalRect)); + rect.x = originalInputRect.x; + rect.y = originalInputRect.y; + if (rect != originalInputRect) { modified = true; diff --git a/src/ui/controls/FUiCtrl_OverlayPanel.cpp b/src/ui/controls/FUiCtrl_OverlayPanel.cpp index ffc5974..bd72d8e 100644 --- a/src/ui/controls/FUiCtrl_OverlayPanel.cpp +++ b/src/ui/controls/FUiCtrl_OverlayPanel.cpp @@ -48,7 +48,7 @@ _OverlayPanel* _OverlayPanel::CreateOverlayPanelN() { std::unique_ptr<_OverlayPanel> pOverlayPanel(new (std::nothrow) _OverlayPanel()); - SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); result r = GetLastResult(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -126,7 +126,7 @@ _OverlayPanel::SetRendererRotation(OverlayPanel::Rotation rotation) result _OverlayPanel::SetRendererAspectRatio(bool aspectRatio) { - SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] OverlayAgent must not be null."); + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "OverlayAgent must not be null."); return __pOverlayAgent->SetAspectRatio(aspectRatio); } @@ -169,11 +169,21 @@ _OverlayPanel::OnAttachedToMainTree(void) _Control* pParent = GetParent(); SysTryReturnResult(NID_UI_CTRL, pParent != null, E_SYSTEM, "The parent container must not be null."); - _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pParent->GetUserData()); - SysTryReturnResult(NID_UI_CTRL, pControlImpl != null, E_SYSTEM, "The impl of parent must not be null."); - - _FormImpl* pFormImpl = dynamic_cast<_FormImpl*>(pControlImpl); - SysTryReturnResult(NID_UI_CTRL, pFormImpl != null, E_SYSTEM, "The impl of form must not be null."); + _FormImpl* pFormImpl = null; + while (pParent) + { + _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pParent->GetUserData()); + pFormImpl = dynamic_cast<_FormImpl*>(pControlImpl); + if (pFormImpl != null) + { + break; + } + else + { + pParent = pParent->GetParent(); + SysTryReturnResult(NID_UI_CTRL, pParent != null, E_SYSTEM, "The parent container must not be null."); + } + } // check for using OverlayRegion simutaneously in the same form _Form& form = pFormImpl->GetCore(); @@ -279,7 +289,7 @@ _OverlayPanel::OnAttachedToMainTree(void) { int size = (physicalBounds.width * 2) * (physicalBounds.height * 2); std::unique_ptr pBuf(new (std::nothrow) byte[size]); - SysTryReturnResult(NID_UI_CTRL, pBuf != null, E_OUT_OF_MEMORY, "Buffer for OverlayPanel must not be null."); + SysTryReturnResult(NID_UI_CTRL, pBuf != null, E_OUT_OF_MEMORY, "Memory allocation failed to create buffer for first frame."); unsigned long* pPos = (unsigned long*)pBuf.get(); for(int i = 0; i < physicalBounds.height; i++) @@ -302,10 +312,10 @@ _OverlayPanel::OnAttachedToMainTree(void) } r = GetVisualElement()->SetRenderOperation(_VisualElement::RENDER_OPERATION_BLEND); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GetVisualElement()->SetBackgroundColor(_Colorf(1.0f, 1.0f, 1.0f, 0.0f)); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } diff --git a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp index 1b1c203..af6aed2 100644 --- a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp @@ -176,7 +176,8 @@ _OverlayPanelImpl::OnAttachedToMainTree(void) if (orientation == ORIENTATION_STATUS_LANDSCAPE || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE) { controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; - GetBuilderBoundsF(controlOrientation, builderBounds); + exist = GetBuilderBoundsF(controlOrientation, builderBounds); + SysTryLog(NID_UI_CTRL, exist, "Failed to GetBuilderBoundsF on Landscape mode"); } r = SetBounds(builderBounds); @@ -375,7 +376,7 @@ _OverlayPanelImpl::GetSupportedBufferPixelFormatListN(void) SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); } - std::unique_ptr< ArrayListT > pFormatList( new (std::nothrow) ArrayListT()); + std::unique_ptr< ArrayListT > pFormatList(new (std::nothrow) ArrayListT()); SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] failed to create a list instance"); r = pFormatList->Construct(); diff --git a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp old mode 100755 new mode 100644 index aa0e111..1caf3e8 --- a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp @@ -381,7 +381,7 @@ _OverlayRegionImpl::Construct(_Form* pParentForm, OverlayRegionType overlayRegio { int size = (finalPhyRect.width * 2) * (finalPhyRect.height * 2); std::unique_ptr pBuffer(new (std::nothrow) byte[size]); - SysTryReturnResult(NID_UI_CTRL, pBuffer != null, E_OUT_OF_MEMORY, "Failed to create a buffer for OverlayRegion."); + SysTryReturnResult(NID_UI_CTRL, pBuffer != null, E_OUT_OF_MEMORY, "Memory allocation failed to create a buffer for OverlayRegion."); unsigned long* pPos = (unsigned long*)pBuffer.get(); for(int i = 0; i < finalPhyRect.height; i++) @@ -413,7 +413,7 @@ OverlayRegion* _OverlayRegionImpl::CreateOverlayRegionN(void) { OverlayRegion* pOverlayRegion = new (std::nothrow) OverlayRegion(); - SysTryReturn(NID_UI_CTRL, pOverlayRegion != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The current value of OverlayRegion is null."); + SysTryReturn(NID_UI_CTRL, pOverlayRegion != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create OverlayRegion."); __pOverlayRegion = pOverlayRegion; __pOverlayRegion->__pOverlayRegionImpl = this; @@ -440,7 +440,6 @@ _OverlayRegionImpl::GoForeground(void) SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayAgent is null."); __showState = true; - SysSecureLog(NID_UI_CTRL, "The current pixmap[%d] of OverlayRegion is on foreground.", __pOverlayAgent->GetPixmap()); } void @@ -451,7 +450,25 @@ _OverlayRegionImpl::GoBackground(void) __showState = false; __pOverlayAgent->UngrabXvPort(); - SysSecureLog(NID_UI_CTRL, "The current pixmap[%d] of OverlayRegion is on background.", __pOverlayAgent->GetPixmap()); +} + +void +_OverlayRegionImpl::SetShowState(bool show) +{ + Evas_Object* pImageObject = __pOverlayAgent->GetRendererImageObject(); + if (pImageObject == null) + { + return; + } + + if (show) + { + evas_object_show(__pOverlayAgent->GetRendererImageObject()); + } + else + { + evas_object_hide(__pOverlayAgent->GetRendererImageObject()); + } } result @@ -474,7 +491,7 @@ _OverlayRegionImpl::SetPixelFormatList(void) } std::unique_ptr< IListT > pFormatList(_OverlayAgent::GetPixelFormatListN()); - SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create a list instance"); + SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create a list instance"); bool set = false; for (int formatIndex = 0; formatIndex < pFormatList->GetCount(); formatIndex++) @@ -507,8 +524,8 @@ _OverlayRegionImpl::GetSupportedBufferPixelFormatListN(void) SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); } - std::unique_ptr< ArrayListT > pFormatList( new (std::nothrow) ArrayListT()); - SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] failed to create a list instance"); + std::unique_ptr< ArrayListT > pFormatList(new (std::nothrow) ArrayListT()); + SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create a list instance"); r = pFormatList->Construct(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -653,13 +670,13 @@ result _OverlayRegionMediaCapability::ParseCapability(const char* xmlBuffer, int length) { std::unique_ptr pDoc(xmlParseMemory(xmlBuffer, length)); - SysTryReturnResult(NID_UI_CTRL, pDoc != null, E_SYSTEM, "xmlParseMemory failed %s %d", xmlBuffer, length); + SysTryReturnResult(NID_UI_CTRL, pDoc != null, E_SYSTEM, "Failed to create xmlParseMemory %s %d", xmlBuffer, length); xmlNode* pRoot = xmlDocGetRootElement(pDoc.get()); - SysTryReturnResult(NID_UI_CTRL, pRoot != null, E_SYSTEM, "[E_SYSTEM] xmlDocGetRootElement failed"); + SysTryReturnResult(NID_UI_CTRL, pRoot != null, E_SYSTEM, "Failed to get RootElement of xmlDoc."); String name = (const char*) (pRoot->name); - SysSecureTryReturnResult(NID_UI_CTRL, name.Equals("MediaCapability", true), E_SYSTEM, "[E_SYSTEM] Invalid Root Name %ls", name.GetPointer()); + SysSecureTryReturnResult(NID_UI_CTRL, name.Equals("MediaCapability", true), E_SYSTEM, "Invalid Root Name %ls", name.GetPointer()); xmlNode* pNode = null; for (pNode = pRoot->children; pNode; pNode = pNode->next) diff --git a/src/ui/controls/FUiCtrl_Panel.cpp b/src/ui/controls/FUiCtrl_Panel.cpp index 16505a2..53be9d5 100644 --- a/src/ui/controls/FUiCtrl_Panel.cpp +++ b/src/ui/controls/FUiCtrl_Panel.cpp @@ -72,11 +72,11 @@ _Panel::CreatePanelN(const FloatRectangle& rect, GroupStyle groupStyle) ClearLastResult(); result r = E_SUCCESS; - _Panel* pPanel = new (std::nothrow) _Panel; - SysTryReturn(NID_UI_CTRL, pPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + _Panel* pPanel = new (std::nothrow) _Panel(); + SysTryReturn(NID_UI_CTRL, pPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - _PanelPresenter* pPresenter = new (std::nothrow) _PanelPresenter; - SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + _PanelPresenter* pPresenter = new (std::nothrow) _PanelPresenter(); + SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPresenter->Initialize(*pPanel); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -120,15 +120,15 @@ _Panel::Initialize(const _PanelPresenter& presenter) SetPanelPresenter(&presenter); result r = GetVisualElement()->SetSurfaceOpaque(false); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); SetBackgroundColor(Color(0, 0, 0, 0)); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); // create data binding context _DataBindingContext* pContext = new (std::nothrow) _DataBindingContext(*this); - SysTryCatch(NID_UI_CTRL, pContext != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryCatch(NID_UI_CTRL, pContext != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_PanelImpl.cpp b/src/ui/controls/FUiCtrl_PanelImpl.cpp index 5404848..e24e287 100644 --- a/src/ui/controls/FUiCtrl_PanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_PanelImpl.cpp @@ -32,6 +32,7 @@ #include "FUiCtrl_FormImpl.h" using namespace Tizen::Graphics; +using namespace Tizen::Base; namespace Tizen { namespace Ui { namespace Controls { @@ -121,7 +122,7 @@ _PanelImpl::GetCore(void) } void -_PanelImpl::SetBackgroundColor(const Tizen::Graphics::Color& color) +_PanelImpl::SetBackgroundColor(const Color& color) { if (!IsOpaque()) { @@ -159,6 +160,8 @@ _PanelImpl::SetCompositeEnabled(bool enabled) result _PanelImpl::OnAttachedToMainTree(void) { + result r = E_SUCCESS; + SetFocusable(false); FloatRectangle builderBounds; @@ -190,8 +193,12 @@ _PanelImpl::OnAttachedToMainTree(void) if (orientation == ORIENTATION_STATUS_LANDSCAPE || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE) { + FloatRectangle landscapeBuilderBounds; controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; - GetBuilderBoundsF(controlOrientation, builderBounds); + if (GetBuilderBoundsF(controlOrientation, landscapeBuilderBounds)) + { + builderBounds = landscapeBuilderBounds; + } } result r = SetBounds(builderBounds); if (r != E_SUCCESS) @@ -203,9 +210,9 @@ _PanelImpl::OnAttachedToMainTree(void) } } - _ContainerImpl::OnAttachedToMainTree(); + r = _ContainerImpl::OnAttachedToMainTree(); - return E_SUCCESS; + return r; } void @@ -250,7 +257,7 @@ public: GetInstance(_UiBuilder* uibuilder) { _PanelMaker* pPanelMaker = new (std::nothrow) _PanelMaker(uibuilder); - SysTryReturn(NID_UI_CTRL, pPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pPanelMaker; }; @@ -262,7 +269,7 @@ protected: _UiBuilderControlLayout* pControlProperty = null; Panel* pPanel = null; FloatRectangle rect; - Tizen::Base::String elementString; + String elementString; int opacity = 0; Color color; GroupStyle panelGroupStyle = GROUP_STYLE_NONE; @@ -273,7 +280,7 @@ protected: return null; } - if(pControl->GetParentWin().IsEmpty()) + if (pControl->GetParentWin().IsEmpty()) { pPanel = static_cast (GetContainer()); } @@ -337,14 +344,14 @@ protected: return null; } - if ( layoutType == UIBUILDER_LAYOUT_GRID) + if (layoutType == UIBUILDER_LAYOUT_GRID) { for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++) { GridLayout* pGridLayout = null; pControlProperty = pControl->GetAttribute(i); - if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT) + if (i == UIBUILDER_ATTRIBUTE_PORTRAIT) { pGridLayout = dynamic_cast(pPortraitLayout); } diff --git a/src/ui/controls/FUiCtrl_PanelPresenter.cpp b/src/ui/controls/FUiCtrl_PanelPresenter.cpp index 0800b9a..0558ad5 100644 --- a/src/ui/controls/FUiCtrl_PanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_PanelPresenter.cpp @@ -219,7 +219,7 @@ CATCH: } void -_PanelPresenter::DrawGroupStyleBackgroundBitmap(Tizen::Graphics::Canvas* pCanvas) +_PanelPresenter::DrawGroupStyleBackgroundBitmap(Canvas* pCanvas) { result r = E_SUCCESS; @@ -234,7 +234,7 @@ _PanelPresenter::DrawGroupStyleBackgroundBitmap(Tizen::Graphics::Canvas* pCanvas pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupStyleBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pPanel->GetBackgroundColor()); r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap != null && r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pColorReplacedBitmap != null, r, "[%s] Propagating.", GetErrorMessage(r)); if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pGroupStyleBackgroundBitmap)) { diff --git a/src/ui/controls/FUiCtrl_Popup.cpp b/src/ui/controls/FUiCtrl_Popup.cpp index 88c5798..024fd5b 100644 --- a/src/ui/controls/FUiCtrl_Popup.cpp +++ b/src/ui/controls/FUiCtrl_Popup.cpp @@ -37,7 +37,6 @@ #include "FUiCtrl_PopupPresenter.h" #include "FUiCtrl_Form.h" #include "FUiCtrl_Frame.h" -#include "FUiCtrl_Indicator.h" using namespace Tizen::Graphics; @@ -55,7 +54,6 @@ _Popup::_Popup(void) , _titleText(L"") , _bgColor(Color(0xFFFFFFFF)) , _titleTextColor(Color(0xFFFFFFFF)) - , _pBgBitmap(null) , _pComposedBgBitmap(null) , _pOutlineBitmap(null) , _pComposedTitleBitmap(null) @@ -64,10 +62,7 @@ _Popup::_Popup(void) , __pPopupPresenter(null) , __bounds(0.0f, 0.0f, 0.0f, 0.0f) , __popupResult(POPUP_RESULT_NONE) - , __pIndicator(null) { - __pIndicator = _Indicator::CreateIndicator(); - SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); } _Popup::~_Popup(void) @@ -75,9 +70,6 @@ _Popup::~_Popup(void) delete __pPopupPresenter; __pPopupPresenter = null; - delete _pBgBitmap; - _pBgBitmap = null; - delete _pComposedBgBitmap; _pComposedBgBitmap = null; @@ -95,12 +87,6 @@ _Popup::~_Popup(void) _pTitleTextAccessibilityElement->Activate(false); _pTitleTextAccessibilityElement = null; } - - if (__pIndicator) - { - __pIndicator->Destroy(); - __pIndicator = null; - } } _Popup* @@ -129,7 +115,6 @@ _Popup::Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds) _AccessibilityContainer* pContainer = null; _DataBindingContext* pContext = null; - Bitmap* titleBgBitmap = null; Color titleBgColor(0x00000000); _titleState = hasTitle; @@ -152,33 +137,20 @@ _Popup::Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds) { GET_COLOR_CONFIG(POPUP::TITLE_BG_NORMAL, titleBgColor); - // Popup-TitleBitmap - GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, _pComposedTitleBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - _pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - // Popup-TitleEffectBitmap - GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } // Popup-Outline - GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // Popup BG - GET_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), _bgColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _bgColor, _pComposedBgBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // for clearing canvas @@ -201,41 +173,20 @@ _Popup::Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds) pContainer->Activate(true); } - if (titleBgBitmap != null) - { - delete titleBgBitmap; - titleBgBitmap = null; - } - return r; CATCH: delete pContext; - if (titleBgBitmap != null) - { - delete titleBgBitmap; - titleBgBitmap = null; - } - - if (_pComposedTitleBitmap != null) - { - delete _pComposedTitleBitmap; - _pComposedTitleBitmap = null; - } + delete _pComposedTitleBitmap; + _pComposedTitleBitmap = null; - if (_pTitleEffectBitmap != null) - { - delete _pTitleEffectBitmap; - _pTitleEffectBitmap = null; - } + delete _pTitleEffectBitmap; + _pTitleEffectBitmap = null; delete _pOutlineBitmap; _pOutlineBitmap = null; - delete _pBgBitmap; - _pBgBitmap = null; - delete _pComposedBgBitmap; _pComposedBgBitmap = null; @@ -334,13 +285,16 @@ _Popup::GetClientAreaCanvasN(void) const void _Popup::SetColor(const Color& color) { + result r = E_SUCCESS; + if (_pComposedBgBitmap != null) { delete _pComposedBgBitmap; _pComposedBgBitmap = null; } - _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, _pComposedBgBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); _bgColor = color; } @@ -448,12 +402,6 @@ _Popup::GetTitleTextAccessibilityElement(void) return _pTitleTextAccessibilityElement; } -_Indicator* -_Popup::GetIndicator(void) const -{ - return __pIndicator; -} - void _Popup::OnDraw(void) { @@ -498,10 +446,6 @@ _Popup::OnActivated(void) SetTouchCapture(false, false); } - bool showstate = false; - bool opacity = false; - unsigned long formstyle = 0x00000000; - _Control* pOwner = GetOwner(); if (pOwner == null) { @@ -512,10 +456,6 @@ _Popup::OnActivated(void) if (pForm != null) { SetOwner(pForm); - - showstate = pForm->IsIndicatorVisible(); - opacity = pForm->IsIndicatorTranslucent(); - formstyle = pForm->GetFormStyle(); } else { @@ -524,81 +464,9 @@ _Popup::OnActivated(void) } else { - _Form* pForm = dynamic_cast<_Form*>(pOwner); - if (pForm != null) - { - showstate = pForm->IsIndicatorVisible(); - opacity = pForm->IsIndicatorTranslucent(); - formstyle = pForm->GetFormStyle(); - } - pOwner->LockInputEvent(); } - if (__pIndicator) - { - __pIndicator->AddIndicatorObject(this, GetRootWindow()); - - - float indicatorwidth = 0.0f; - float indicatorheight = 0.0f; - - if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) - { - indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width; - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - } - else - { - indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height; - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight); - } - __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight)); - __pIndicator->SetIndicatorShowState(showstate); - if (opacity) - { - __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT); - } - else - { - __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE); - } - - if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR) - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - __pIndicator->SetIndicatorAutoHide(false, true); - } - else - { - __pIndicator->SetIndicatorAutoHide(false, false); - } - } - else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE) - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - __pIndicator->SetIndicatorAutoHide(true, true); - } - else - { - __pIndicator->SetIndicatorAutoHide(true, false); - } - } - else - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - __pIndicator->SetIndicatorAutoHide(false, true); - } - else - { - __pIndicator->SetIndicatorAutoHide(false, false); - } - } - } - _Window::OnActivated(); } @@ -634,16 +502,6 @@ _Popup::OnAttachedToMainTree(void) SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'"); - _Control* pOwner = GetOwner(); - if (pOwner != null) - { - GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *pOwner); - } - - if (__pIndicator) - { - __pIndicator->OnAttachedToMainTree(); - } InitializeAccessibilityElement(); @@ -679,10 +537,6 @@ _Popup::InitializeAccessibilityElement(void) result _Popup::OnDetachingFromMainTree(void) { - if (__pIndicator) - { - __pIndicator->DeleteIndicatorObject(); - } return _Window::OnDetachingFromMainTree(); } @@ -782,45 +636,6 @@ void _Popup::OnChangeLayout(_ControlOrientation orientation) { _Window::OnChangeLayout(orientation); - - float indicatorheight = 0.0f; - - const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); - const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); - - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - - _Form* pForm = dynamic_cast<_Form*>(GetOwner()); - if (pForm) - { - if (__pIndicator) - { - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) - { - __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight)); - if ((FORM_STYLE_INDICATOR & pForm->GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle())) - { - __pIndicator->SetIndicatorShowState(true); - } - else - { - __pIndicator->SetIndicatorShowState(false); - } - } - else - { - if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle()) - { - __pIndicator->SetIndicatorShowState(true); - } - else - { - __pIndicator->SetIndicatorShowState(false); - } - } - __pIndicator->OnChangeLayout(orientation); - } - } } }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PopupImpl.cpp b/src/ui/controls/FUiCtrl_PopupImpl.cpp index 274fa79..7d8a598 100644 --- a/src/ui/controls/FUiCtrl_PopupImpl.cpp +++ b/src/ui/controls/FUiCtrl_PopupImpl.cpp @@ -37,7 +37,6 @@ #include "FUiCtrl_PopupImpl.h" #include "FUiCtrl_Popup.h" #include "FUiCtrl_Form.h" -#include "FUiCtrl_Indicator.h" using namespace Tizen::Ui::Animations; @@ -501,14 +500,14 @@ protected: return null; } - if ( layoutType == UIBUILDER_LAYOUT_GRID) + if (layoutType == UIBUILDER_LAYOUT_GRID) { for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++) { GridLayout* pGridLayout = null; pControlProperty = pControl->GetAttribute(i); - if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT) + if (i == UIBUILDER_ATTRIBUTE_PORTRAIT) { pGridLayout = dynamic_cast(pPortraitLayout); } diff --git a/src/ui/controls/FUiCtrl_PopupPresenter.cpp b/src/ui/controls/FUiCtrl_PopupPresenter.cpp old mode 100755 new mode 100644 index 53e56f9..a42e518 --- a/src/ui/controls/FUiCtrl_PopupPresenter.cpp +++ b/src/ui/controls/FUiCtrl_PopupPresenter.cpp @@ -228,6 +228,8 @@ _PopupPresenter::SetTitleTextObject(const String &title) TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, pSimpleText != null , r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pSimpleText->SetTextShadowEnabled(true); + _pTitleTextObject->AppendElement(*pSimpleText); _pTitleTextObject->SetForegroundColor(__pPopup->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength()); _pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); diff --git a/src/ui/controls/FUiCtrl_Progress.cpp b/src/ui/controls/FUiCtrl_Progress.cpp index a40ed43..2c0f9f0 100644 --- a/src/ui/controls/FUiCtrl_Progress.cpp +++ b/src/ui/controls/FUiCtrl_Progress.cpp @@ -66,8 +66,8 @@ _Progress::CreateProgressN() { result r = E_SUCCESS; - _Progress* pProgress = new (std::nothrow) _Progress; - SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _Progress* pProgress = new (std::nothrow) _Progress(); + SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _AccessibilityContainer* pContainer = pProgress->GetAccessibilityContainer(); @@ -76,10 +76,10 @@ _Progress::CreateProgressN() SysTryCatch(NID_UI_CTRL, pProgress->__pProgressPresenter != null, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, pProgress->__barColor); + r = GET_COLOR_CONFIG(PROGRESS::BAR_NORMAL, pProgress->__barColor); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get progress colorconfig", GetErrorMessage(r)); - r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, pProgress->__barBgColor); + r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, pProgress->__barBgColor); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get progress colorconfig", GetErrorMessage(r)); pProgress->AcquireHandle(); @@ -114,19 +114,19 @@ _Progress::InitializeAccessibilityElement(void) _AccessibilityContainer* pContainer = GetAccessibilityContainer(); 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."); + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed."); __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetName(L"ProgressingImage"); __pAccessibilityElement->SetLabel(L"Progressing"); String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); - string.Insert(GetPercentComplete(), 0); + string.Replace(L"%d", Integer::ToString(GetPercentComplete())); __pAccessibilityElement->SetValue(string); r = pContainer->AddElement(*__pAccessibilityElement); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } return r; @@ -166,18 +166,18 @@ _Progress::SetPropertyValue(const Variant& value) int tempValue = value.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pProgressPresenter->SetValue(tempValue); r = InitializeAccessibilityElement(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (__pAccessibilityElement != null) { String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); - string.Insert(GetPercentComplete(), 0); + string.Replace(L"%d", Integer::ToString(GetPercentComplete())); __pAccessibilityElement->SetValue(string); } @@ -203,10 +203,10 @@ _Progress::GetPropertyValue(void) const result _Progress::SetRange(int minValue, int maxValue) { - SysTryReturn(NID_UI_CTRL, minValue >= 0 && maxValue >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] Values can not be negative."); - SysTryReturn(NID_UI_CTRL, minValue < maxValue, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The minimum value is greater than maximum value."); + SysTryReturnResult(NID_UI_CTRL, minValue >= 0 && maxValue >= 0, E_OUT_OF_RANGE, + "Values can not be negative."); + SysTryReturnResult(NID_UI_CTRL, minValue < maxValue, E_INVALID_ARG, + "Invalid argument(s) is used. The minimum value is greater than maximum value."); result r = E_SUCCESS; @@ -214,7 +214,7 @@ _Progress::SetRange(int minValue, int maxValue) Variant value = GetProperty("value"); r = SetProperty("minValue", Variant(minValue)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set minimum value.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set minimum value."); r = SetProperty("maxValue", Variant(maxValue)); if (r != E_SUCCESS) @@ -239,7 +239,7 @@ _Progress::SetRange(int minValue, int maxValue) { String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); - string.Insert(GetPercentComplete(), 0); + string.Replace(L"%d", Integer::ToString(GetPercentComplete())); __pAccessibilityElement->SetValue(string); } @@ -253,7 +253,7 @@ _Progress::SetPropertyMinValue(const Variant& minValue) int tempMinValue = minValue.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pProgressPresenter->SetMinValue(tempMinValue); @@ -267,7 +267,7 @@ _Progress::SetPropertyMaxValue(const Variant& maxValue) int tempMaxValue = maxValue.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pProgressPresenter->SetMaxValue(tempMaxValue); @@ -281,11 +281,11 @@ _Progress::GetRange(int& minValue, int& maxValue) const Variant minimum = GetProperty("minValue"); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); Variant maximum = GetProperty("maxValue"); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); minValue = minimum.ToInt(); maxValue = maximum.ToInt(); @@ -324,7 +324,7 @@ _Progress::SetPropertyBarColor(const Variant& barColor) Color tempColor = barColor.ToColor(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __barColor = tempColor; __barColor.SetAlpha(0xFF); @@ -361,7 +361,7 @@ _Progress::SetPropertyBarBackgroundColor(const Variant& barBgColor) Color tempColor = barBgColor.ToColor(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __barBgColor = tempColor; __barBgColor.SetAlpha(0xFF); diff --git a/src/ui/controls/FUiCtrl_ProgressImpl.cpp b/src/ui/controls/FUiCtrl_ProgressImpl.cpp index 5d2d28e..ffd6057 100644 --- a/src/ui/controls/FUiCtrl_ProgressImpl.cpp +++ b/src/ui/controls/FUiCtrl_ProgressImpl.cpp @@ -76,8 +76,7 @@ _ProgressImpl::CreateProgressImplN(Progress* pControl, const Rectangle& bounds) SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); _ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore); - r = CheckConstruction(pCore, pImpl); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(Progress), bounds, pCore->GetOrientation()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -106,8 +105,7 @@ _ProgressImpl::CreateProgressImplFN(Progress* pControl, const FloatRectangle& bo SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); _ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore); - r = CheckConstruction(pCore, pImpl); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Progress), bounds, pCore->GetOrientation()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -267,11 +265,9 @@ protected: return null; } - pProgress = new (std::nothrow) Progress; - if (pProgress == null) - { - return null; - } + pProgress = new (std::nothrow) Progress(); + SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + rect = pControlProperty->GetRectF(); if (pControl->GetElement(L"min", elementString) && pControl->GetElement(L"max", elementString1)) diff --git a/src/ui/controls/FUiCtrl_ProgressPopup.cpp b/src/ui/controls/FUiCtrl_ProgressPopup.cpp index 5ae7f19..7a648ff 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopup.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopup.cpp @@ -38,7 +38,6 @@ #include "FUiCtrl_Frame.h" #include "FUiCtrl_ProgressPopup.h" #include "FUiCtrl_ProgressPopupPresenter.h" -#include "FUiCtrl_Indicator.h" using namespace Tizen::Graphics; @@ -78,9 +77,6 @@ _ProgressPopup::~_ProgressPopup(void) __pProgressPopupEvent = null; } - delete _pBgBitmap; - _pBgBitmap = null; - delete _pComposedBgBitmap; _pComposedBgBitmap = null; @@ -131,8 +127,6 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta _AccessibilityContainer* pContainer = null; - Bitmap* buttonBgBitmap = null; - Bitmap* titleBgBitmap = null; Color titleBgColor(0x00000000); Color buttonBgColor(0x00000000); @@ -146,11 +140,6 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta Color buttonTextHighlighted(0x00000000); bool isCustomBitmap = false; - Bitmap* pButtonBgNormal = null; - Bitmap* pButtonBgPressed = null; - Bitmap* pButtonBgDisabled = null; - Bitmap* pButtonBgHighlighted = null; - Bitmap* pComposedButtonBgNormal = null; Bitmap* pComposedButtonBgPressed = null; Bitmap* pComposedButtonBgDisabled = null; @@ -178,46 +167,28 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta GET_COLOR_CONFIG(MESSAGEBOX::TITLE_BG_NORMAL, titleBgColor); GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BG_NORMAL, buttonBgColor); - GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); Color bgColor; GET_COLOR_CONFIG(POPUP::BG_NORMAL, bgColor); - GET_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - - _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, _pComposedBgBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); if (cancelButton) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgBitmap); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgColor, __pComposedButtonBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pComposedButtonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*buttonBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (__pComposedButtonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, _pComposedTitleBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - _pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); // for clearing canvas @@ -240,64 +211,42 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled); GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted); - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormal); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating. Failed to load Bottom button normal Image.", GetErrorMessage(r)); isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button normal effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgPressed); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed Image.", GetErrorMessage(r)); - isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgDisabled); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled Image.", GetErrorMessage(r)); - isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED); if (!isCustomBitmap) { - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect); - r = GetLastResult(); + r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled effect Image.", GetErrorMessage(r)); } - GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgHighlighted); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button highlighted Image.", GetErrorMessage(r)); - - pComposedButtonBgNormal = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormal, Color::GetColor(COLOR_ID_MAGENTA), buttonColorNormal); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorNormal, pComposedButtonBgNormal); SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - pComposedButtonBgPressed = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgPressed, Color::GetColor(COLOR_ID_MAGENTA), buttonColorPressed); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgPressed != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorPressed, pComposedButtonBgPressed); + SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - pComposedButtonBgDisabled = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgDisabled, Color::GetColor(COLOR_ID_MAGENTA), buttonColorDisabled); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgDisabled != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorDisabled, pComposedButtonBgDisabled); + SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r)); - pComposedButtonBgHighlighted = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgHighlighted, Color::GetColor(COLOR_ID_MAGENTA), buttonColorHighlighted); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pComposedButtonBgHighlighted != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorHighlighted, pComposedButtonBgHighlighted); + SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r)); __pButton = new (std::nothrow) Button(); SysTryCatch(NID_UI_CTRL, __pButton != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -349,24 +298,6 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - if (buttonBgBitmap != null) - { - delete buttonBgBitmap; - buttonBgBitmap = null; - } - - delete pButtonBgNormal; - pButtonBgNormal = null; - - delete pButtonBgPressed; - pButtonBgPressed = null; - - delete pButtonBgDisabled; - pButtonBgDisabled = null; - - delete pButtonBgHighlighted; - pButtonBgHighlighted = null; - delete pComposedButtonBgNormal; pComposedButtonBgNormal = null; @@ -388,25 +319,10 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta delete pButtonDisabledEffect; pButtonNormalEffect = null; - delete titleBgBitmap; - titleBgBitmap = null; - return r; CATCH: - delete pButtonBgNormal; - pButtonBgNormal = null; - - delete pButtonBgPressed; - pButtonBgPressed = null; - - delete pButtonBgDisabled; - pButtonBgDisabled = null; - - delete pButtonBgHighlighted; - pButtonBgHighlighted = null; - delete pComposedButtonBgNormal; pComposedButtonBgNormal = null; @@ -428,24 +344,12 @@ _ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRecta delete pButtonDisabledEffect; pButtonNormalEffect = null; - delete titleBgBitmap; - titleBgBitmap = null; - - delete _pBgBitmap; - _pBgBitmap = null; - delete _pOutlineBitmap; _pOutlineBitmap = null; delete _pComposedBgBitmap; _pComposedBgBitmap = null; - if (buttonBgBitmap != null) - { - delete buttonBgBitmap; - buttonBgBitmap = null; - } - if (__pComposedButtonBitmap != null) { delete __pComposedButtonBitmap; @@ -819,10 +723,6 @@ _ProgressPopup::OnActivated(void) SetTouchCapture(false, false); } - bool showstate = false; - bool opacity = false; - unsigned long formstyle = 0x00000000; - _Control* pOwner = GetOwner(); if (pOwner == null) { @@ -833,10 +733,6 @@ _ProgressPopup::OnActivated(void) if (pForm != null) { SetOwner(pForm); - - showstate = pForm->IsIndicatorVisible(); - opacity = pForm->IsIndicatorTranslucent(); - formstyle = pForm->GetFormStyle(); } else { @@ -845,83 +741,9 @@ _ProgressPopup::OnActivated(void) } else { - _Form* pForm = dynamic_cast<_Form*>(pOwner); - if (pForm != null) - { - showstate = pForm->IsIndicatorVisible(); - opacity = pForm->IsIndicatorTranslucent(); - formstyle = pForm->GetFormStyle(); - } - pOwner->LockInputEvent(); } - _Indicator* pIndicator = GetIndicator(); - if (pIndicator) - { - pIndicator->AddIndicatorObject(this, GetRootWindow()); - - float indicatorwidth = 0.0f; - float indicatorheight = 0.0f; - - if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) - { - indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width; - GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); - } - else - { - indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height; - GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight); - } - - pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight)); - pIndicator->SetIndicatorShowState(showstate); - if (opacity) - { - pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT); - } - else - { - pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE); - } - - if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR) - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - pIndicator->SetIndicatorAutoHide(false, true); - } - else - { - pIndicator->SetIndicatorAutoHide(false, false); - } - } - else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE) - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - pIndicator->SetIndicatorAutoHide(true, true); - } - else - { - pIndicator->SetIndicatorAutoHide(true, false); - } - } - else - { - if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) - { - pIndicator->SetIndicatorAutoHide(false, true); - } - else - { - pIndicator->SetIndicatorAutoHide(false, false); - } - } - } - - if (__isTransparent) { _DimmingLayer* pDimmingLayer = GetDimmingLayer(); diff --git a/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp index 624fea1..e80feb2 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp @@ -30,7 +30,7 @@ #include "FUiCtrl_FrameImpl.h" #include "FUiCtrl_Form.h" #include "FUiCtrl_ProgressPopupImpl.h" -#include "FUiCtrl_Indicator.h" + using namespace Tizen::Ui::Animations; diff --git a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp index 568aa6f..93da7f8 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp @@ -93,6 +93,7 @@ _ProgressPopupPresenter::~_ProgressPopupPresenter(void) if (__pAnimationFrameList != null) { + __pAnimationFrameList->RemoveAll(true); delete __pAnimationFrameList; __pAnimationFrameList = null; } @@ -171,6 +172,8 @@ _ProgressPopupPresenter::SetTitleTextObject(void) TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); SysTryCatch(NID_UI_CTRL, pSimpleTextForTitleText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pSimpleTextForTitleText->SetTextShadowEnabled(true); _pTitleTextObject->AppendElement(*pSimpleTextForTitleText); _pTitleTextObject->SetForegroundColor(__pProgressPopup->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength()); _pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); @@ -419,7 +422,7 @@ _ProgressPopupPresenter::SetProcessAnimation(void) delete __pAnimation; __pAnimation = null; - __pAnimation = _Animation::CreateAnimationN(); + __pAnimation = _Animation::CreateAnimationN(true); if (__pAnimation) { @@ -577,7 +580,7 @@ _ProgressPopupPresenter::Draw(void) _pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); } - if( __cancelButton ) + if(__cancelButton) { const Bitmap* pButtonBitmap = __pProgressPopup->GetButtonBackgroundBitmap(); const Bitmap* pButtonEffectBitmap = __pProgressPopup->GetButtonBackgroundEffectBitmap(); @@ -746,7 +749,7 @@ _ProgressPopupPresenter::InitializeAccessibilityElement(void) if (pLabelElement != null) { pLabelElement->SetName(L"ProgressPopupText"); - pLabelElement->SetTrait(L"Popup body text"); + pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK"); } // Add Container diff --git a/src/ui/controls/FUiCtrl_ProgressPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp index 4d07c14..7a1d87b 100644 --- a/src/ui/controls/FUiCtrl_ProgressPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp @@ -36,8 +36,6 @@ namespace Tizen { namespace Ui { namespace Controls _ProgressPresenter::_ProgressPresenter(void) : __pProgress(null) , __pProgressModel(null) - , __pResourceBitmap(null) - , __pResourceBarBgBitmap(null) , __pBarResourceEffectBitmap(null) , __pBarBgResourceEffectBitmap(null) , __pBarColorReplacementBitmap(null) @@ -50,12 +48,6 @@ _ProgressPresenter::~_ProgressPresenter(void) delete __pProgressModel; __pProgressModel = null; - delete __pResourceBitmap; - __pResourceBitmap = null; - - delete __pResourceBarBgBitmap; - __pResourceBarBgBitmap = null; - delete __pBarResourceEffectBitmap; __pBarResourceEffectBitmap = null; @@ -73,20 +65,20 @@ _ProgressPresenter* _ProgressPresenter::CreateInstanceN(const _Progress& progress) { result r = E_SUCCESS; - _ProgressPresenter* pProgressPresenter = new (std::nothrow) _ProgressPresenter; + _ProgressPresenter* pProgressPresenter = new (std::nothrow) _ProgressPresenter(); SysTryReturn(NID_UI_CTRL, pProgressPresenter != null, null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pProgressPresenter->__pProgress = const_cast <_Progress*>(&progress); SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgress != null, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The Progress control core is null"); + "A system error has occurred. The Progress control core is null.", GetErrorMessage(E_SYSTEM)); - pProgressPresenter->__pProgressModel = new (std::nothrow) _ProgressModel; + pProgressPresenter->__pProgressModel = new (std::nothrow) _ProgressModel(); SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgressModel != null, , E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pProgressPresenter->LoadResource(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. The loading of resource failed"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. The loading of resource failed", GetErrorMessage(E_SYSTEM)); return pProgressPresenter; @@ -185,25 +177,17 @@ _ProgressPresenter::LoadResource(void) Color barColor; r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, bgColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(PROGRESS::BAR_NORMAL, barColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating."); - r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pBarBgColorReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); - __pBarBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap,Color::GetColor(COLOR_ID_MAGENTA), bgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, barColor, __pBarColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pBarColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBitmap,Color::GetColor(COLOR_ID_MAGENTA), barColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarBgResourceEffectBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -220,11 +204,8 @@ _ProgressPresenter::LoadResource(void) CATCH: - delete __pResourceBitmap; - __pResourceBitmap = null; - - delete __pResourceBarBgBitmap; - __pResourceBarBgBitmap = null; + delete __pBarBgColorReplacementBitmap; + __pBarBgColorReplacementBitmap = null; delete __pBarResourceEffectBitmap; __pBarResourceEffectBitmap = null; @@ -235,9 +216,6 @@ CATCH: delete __pBarColorReplacementBitmap; __pBarColorReplacementBitmap = null; - delete __pBarBgColorReplacementBitmap; - __pBarBgColorReplacementBitmap = null; - return r; } @@ -266,7 +244,7 @@ _ProgressPresenter::Draw(void) FloatRectangle bounds = __pProgress->GetBoundsF(); Canvas* pCanvas = __pProgress->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to get a canvas."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "Failed to get a canvas."); int minValue = __pProgressModel->GetMinValue(); int maxValue = __pProgressModel->GetMaxValue(); @@ -337,8 +315,7 @@ _ProgressPresenter::Draw(void) if (__pProgress->GetBarBackgroundColor() != __currentBarBgColor) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarBackgroundColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pProgress->GetBarBackgroundColor(), pReplacementBitmap); SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r)); delete __pBarBgColorReplacementBitmap; __pBarBgColorReplacementBitmap = null; @@ -360,8 +337,7 @@ _ProgressPresenter::Draw(void) { if (__pProgress->GetBarColor() != __currentBarColor) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pProgress->GetBarColor(), pReplacementBitmap); SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r)); delete __pBarColorReplacementBitmap; __pBarColorReplacementBitmap = null; diff --git a/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp b/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp index 72763d8..e0d2cd1 100644 --- a/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp @@ -51,7 +51,7 @@ public: { } - const Tizen::Graphics::Color GetColor(void) const + const Color GetColor(void) const { return __color; } @@ -86,12 +86,12 @@ void _PublicColorChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { IColorChangeEventListener* pColorChangeListener = dynamic_cast (&listener); - SysTryReturnVoidResult(NID_UI_CTRL, (pColorChangeListener != null), E_INVALID_ARG, - "[E_INVALID_ARG] The event argument is invalid type.\n."); + SysTryReturnVoidResult(NID_UI_CTRL, pColorChangeListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The IColorChangeEventListener instance is null."); const _PublicColorChangeEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, - "[E_INVALID_ARG] The event argument is invalid type.\n."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _PublicColorChangeEventArg instance is null."); pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor())); @@ -102,8 +102,8 @@ _PublicColorChangeEvent* _PublicColorChangeEvent::CreateInstanceN(const Control& source) { _PublicColorChangeEvent* pCoreColorChangeEvent = new (std::nothrow) _PublicColorChangeEvent(source); - SysTryReturn(NID_UI_CTRL, (pCoreColorChangeEvent != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pCoreColorChangeEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { @@ -122,8 +122,8 @@ IEventArg* _PublicColorChangeEvent::CreateColorChangeEventArgN(const Color& color) { _PublicColorChangeEventArg* pEventArg = new (std::nothrow) _PublicColorChangeEventArg(color); - SysTryReturn(NID_UI_CTRL, (pEventArg != null), null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp b/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp index c411e6f..a3433d4 100644 --- a/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp @@ -137,7 +137,7 @@ _PublicExpandableEditAreaEvent* _PublicExpandableEditAreaEvent::CreateInstanceN(const Tizen::Ui::Control& source) { _PublicExpandableEditAreaEvent* pPublicExpandableEditAreaEvent = new (std::nothrow) _PublicExpandableEditAreaEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicExpandableEditAreaEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicExpandableEditAreaEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -174,7 +174,7 @@ _PublicExpandableEditAreaEvent::FireImpl(Tizen::Base::Runtime::IEventListener& l // cast to _PublicExpandableEditAreaEventArg const _PublicExpandableEditAreaEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pArg is null."); // call cursor change event listener method ExpandableEditAreaEventStatus status = pArg->GetStatus(); @@ -197,7 +197,7 @@ IEventArg* _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int newLineCount) { _PublicExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _PublicExpandableEditAreaEventArg(status, newLineCount); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp b/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp index 3b19b38..1bbf0f3 100644 --- a/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp @@ -148,7 +148,7 @@ _PublicKeypadEvent* _PublicKeypadEvent::CreateInstanceN(const Control& source) { _PublicKeypadEvent* pPublicKeypadEvent = new (std::nothrow) _PublicKeypadEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pPublicKeypadEvent; } @@ -166,11 +166,11 @@ _PublicKeypadEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { IKeypadEventListener* pKeypadEventListener = dynamic_cast (&listener); SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); const _PublicKeypadEventArg* pKeypadEventArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + "[E_INVALID_ARG] The invalid Event Argument was given."); Control* tempSource = null; tempSource = const_cast (pKeypadEventArg->GetSource()); @@ -213,7 +213,7 @@ _PublicKeypadEvent::CreateKeypadEventArgN(const Tizen::Ui::Control& source, Tize KeypadEventStatus status) { _PublicKeypadEventArg* pEventArg = new (std::nothrow) _PublicKeypadEventArg(source, actionId, status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp b/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp index 51ec5e5..67c9dca 100644 --- a/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp @@ -151,7 +151,7 @@ _PublicLanguageEvent* _PublicLanguageEvent::CreateInstanceN(const Control& source) { _PublicLanguageEvent* pPublicLanguageEvent = new (std::nothrow) _PublicLanguageEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicLanguageEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicLanguageEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pPublicLanguageEvent; } @@ -167,11 +167,11 @@ _PublicLanguageEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { ILanguageEventListener* pLanguageEventListener = dynamic_cast (&listener); SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); const _PublicLanguageEventArg* pLanguageEventArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + "[E_INVALID_ARG] The invalid Event Argument was given."); Control* tempSource = null; tempSource = const_cast (pLanguageEventArg->GetSource()); @@ -192,7 +192,7 @@ _PublicLanguageEvent::CreateLanguageEventArgN(const Control& source, LanguageCod { _PublicLanguageEventArg* pLanguageEventArg = new (std::nothrow) _PublicLanguageEventArg(source, prevLanguageCode, currentLanguageCode); - SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pLanguageEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp b/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp index 497e93a..8c981b4 100644 --- a/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp @@ -173,10 +173,10 @@ void _PublicLinkEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) { IUiLinkEventListener* pLinkEventListener = dynamic_cast (&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given."); _PublicLinkEventArg* pLinkEventArg = dynamic_cast <_PublicLinkEventArg*>(const_cast (&arg)); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given."); const Tizen::Base::String text = pLinkEventArg->GetText(); Tizen::Base::Utility::LinkType linkType = pLinkEventArg->GetLinkType(); diff --git a/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp b/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp index 81cd868..a2b10f7 100644 --- a/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp @@ -32,6 +32,7 @@ // using namespace using namespace Tizen::Base; using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -99,7 +100,7 @@ _PublicScrollPanelEventArg::GetStatus(void) const //////////////////////////////////////////////////////////////////////////////// /// _PublicScrollPanelEvent class Lifecycle -_PublicScrollPanelEvent::_PublicScrollPanelEvent(const Tizen::Ui::Control& source) +_PublicScrollPanelEvent::_PublicScrollPanelEvent(const Control& source) : __pSource(null) { result r = _Event::Initialize(); @@ -117,17 +118,17 @@ _PublicScrollPanelEvent::~_PublicScrollPanelEvent(void) } _PublicScrollPanelEvent* -_PublicScrollPanelEvent::CreateInstanceN(const Tizen::Ui::Control& source) +_PublicScrollPanelEvent::CreateInstanceN(const Control& source) { _PublicScrollPanelEvent* pPublicScrollPanelEvent = new (std::nothrow) _PublicScrollPanelEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicScrollPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicScrollPanelEvent, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pPublicScrollPanelEvent; } // Accessors -const Tizen::Ui::Control* +const Control* _PublicScrollPanelEvent::GetSource(void) const { return __pSource; @@ -136,13 +137,15 @@ _PublicScrollPanelEvent::GetSource(void) const // Operations void -_PublicScrollPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +_PublicScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast (&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The IScrollPanelEventListener instance is null."); const _PublicScrollPanelEventArg* pScrollPanelEventArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _PublicScrollPanelEventArg instance is null."); switch (pScrollPanelEventArg->GetStatus()) { @@ -173,7 +176,7 @@ IEventArg* _PublicScrollPanelEvent::CreateScrollPanelEventArgN(ScrollPanelStatus status) { _PublicScrollPanelEventArg* pEventArg = new (std::nothrow) _PublicScrollPanelEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp b/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp index f04bb65..4727c9d 100644 --- a/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp @@ -124,7 +124,7 @@ _PublicSearchBarEvent* _PublicSearchBarEvent::CreateInstanceN(const SearchBar& source) { _PublicSearchBarEvent* pPublicSearchBarEvent = new (std::nothrow) _PublicSearchBarEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicSearchBarEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicSearchBarEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -182,7 +182,7 @@ IEventArg* _PublicSearchBarEvent::CreateSearchBarEventArgN(SearchBarEventStatus status) { _PublicSearchBarEventArg* pEventArg = new (std::nothrow) _PublicSearchBarEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp b/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp index eb1c3a7..3139523 100644 --- a/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp @@ -145,7 +145,7 @@ _PublicTextBlockEvent* _PublicTextBlockEvent::CreateInstanceN(const Control& source) { _PublicTextBlockEvent* pPublicTextBlockEvent = new (std::nothrow) _PublicTextBlockEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pPublicTextBlockEvent; } @@ -164,10 +164,10 @@ void _PublicTextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { ITextBlockEventListener* pTextBlockEventListener = dynamic_cast (&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given."); const _PublicTextBlockEventArg* pTextBlockEventArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given."); pTextBlockEventListener->OnTextBlockSelected(const_cast (*__pSource), pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition()); @@ -181,7 +181,7 @@ IEventArg* _PublicTextBlockEvent::CreateTextBlockEventArgN(int start, int end) { _PublicTextBlockEventArg* pEventArg = new (std::nothrow) _PublicTextBlockEventArg(start, end); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_PublicTextEvent.cpp b/src/ui/controls/FUiCtrl_PublicTextEvent.cpp index 10869ac..028d79b 100644 --- a/src/ui/controls/FUiCtrl_PublicTextEvent.cpp +++ b/src/ui/controls/FUiCtrl_PublicTextEvent.cpp @@ -128,7 +128,7 @@ _PublicTextEvent* _PublicTextEvent::CreateInstanceN(const Control& source) { _PublicTextEvent* pPublicTextEvent = new (std::nothrow) _PublicTextEvent(source); - SysTryReturn(NID_UI_CTRL, pPublicTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPublicTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pPublicTextEvent; } @@ -151,11 +151,11 @@ _PublicTextEvent::FireImpl(IEventListener& listener, const IEventArg& arg) // cast to ITextEventListener ITextEventListener* pTextListener = dynamic_cast (&listener); SysTryReturnVoidResult(NID_UI_CTRL, pTextListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); // cast to _PublicTextEventArg const _PublicTextEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); // call cursor change event listener method TextEventStatus stauts = pArg->GetStatus(); @@ -177,7 +177,7 @@ IEventArg* _PublicTextEvent::CreateTextEventArgN(TextEventStatus status) { _PublicTextEventArg* pEventArg = new (std::nothrow) _PublicTextEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_Scroll.cpp b/src/ui/controls/FUiCtrl_Scroll.cpp index 763bc6f..01923cb 100644 --- a/src/ui/controls/FUiCtrl_Scroll.cpp +++ b/src/ui/controls/FUiCtrl_Scroll.cpp @@ -57,7 +57,7 @@ _Scroll::CreateScrollN(Tizen::Ui::_Control& parentCtrl, ClearLastResult(); _Scroll* pScroll = new (std::nothrow) _Scroll(); - SysTryReturn(NID_UI_CTRL, pScroll, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pScroll, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pScroll->Construct(parentCtrl, @@ -99,7 +99,7 @@ _Scroll::Construct(Tizen::Ui::_Control& parentCtrl, viewRange, scrollRange, scrollPosition); - SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating."); SetPresenter((_ScrollPresenter &)*pPresenter); SetFocusable(false); diff --git a/src/ui/controls/FUiCtrl_ScrollEventArg.cpp b/src/ui/controls/FUiCtrl_ScrollEventArg.cpp index 91096d9..acea1a9 100644 --- a/src/ui/controls/FUiCtrl_ScrollEventArg.cpp +++ b/src/ui/controls/FUiCtrl_ScrollEventArg.cpp @@ -50,7 +50,7 @@ _ScrollEventArg* _ScrollEventArg::GetScrollEventArgN(const Control& source) { _ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_STOPPED, source); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } @@ -59,7 +59,7 @@ _ScrollEventArg* _ScrollEventArg::GetScrollEventArgN(const Control& source, float scrollPosition) { _ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED, source, scrollPosition); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } @@ -68,7 +68,7 @@ _ScrollEventArg* _ScrollEventArg::GetScrollEventArgN(const Control& source, ScrollEndEvent scrollType) { _ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_END_REACHED, source, -1.0f, scrollType); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_ScrollPanel.cpp b/src/ui/controls/FUiCtrl_ScrollPanel.cpp index 95bcaeb..b534222 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanel.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanel.cpp @@ -37,6 +37,7 @@ using namespace Tizen::Base; using namespace Tizen::Graphics; using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Runtime; namespace { @@ -130,15 +131,15 @@ _ScrollPanel::CreateScrollPanelN(const FloatRectangle& rect, ScrollPanelScrollDi FloatRectangle areaBounds(0.0f, 0.0f, rect.width, rect.height); - _ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel; - SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + _ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel(); + SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pScrollPanel->SetScrollDirection(scrollDirection); pScrollPanel->SetScrollAreaAutoResizingEnabled(autoResizingEnable); pScrollPanel->SetPageScrollEnabled(pageScrollEnabled); - _ScrollPanelPresenter* pPresenter = new (std::nothrow) _ScrollPanelPresenter; - SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + _ScrollPanelPresenter* pPresenter = new (std::nothrow) _ScrollPanelPresenter(); + SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPresenter->Initialize(*pScrollPanel); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -241,8 +242,8 @@ _ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter, bool acquireHan SetScrollPanelPresenter(&presenter); - __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryReturn(NID_UI_CTRL, __pScrollingAnimation != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryReturn(NID_UI_CTRL, __pScrollingAnimation != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pScrollingAnimation->SetRepeatCount(SCROLL_PANEL_ANIMATION_DEFAULT_REPEAT_COUNT); __pScrollingAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseOut")); @@ -257,8 +258,8 @@ _ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter, bool acquireHan r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector; - SysTryCatch(NID_UI_CTRL, __pGestureFlick != null, , E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector(); + SysTryCatch(NID_UI_CTRL, __pGestureFlick != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -312,7 +313,7 @@ _ScrollPanel::OnDraw(void) } result -_ScrollPanel::OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds) +_ScrollPanel::OnBoundsChanging(const FloatRectangle& bounds) { ClearLastResult(); @@ -727,6 +728,12 @@ _ScrollPanel::IsPageScrollFlickMoveLimitedOnePage(void) const return __pageScrollMoveOnlyOnePageOnFlick; } +bool +_ScrollPanel::IsScrollAnimationRunning(void) const +{ + return __pScrollPanelPresenter->IsScrollAnimationRunning(); +} + void _ScrollPanel::SetScrollPosition(float position, bool withAnimation) { @@ -736,7 +743,7 @@ _ScrollPanel::SetScrollPosition(float position, bool withAnimation) } void -_ScrollPanel::SetScrollPosition(Tizen::Graphics::FloatPoint position, bool withAnimation) +_ScrollPanel::SetScrollPosition(FloatPoint position, bool withAnimation) { ClearLastResult(); @@ -765,6 +772,7 @@ _ScrollPanel::SetVerticalScrollPosition(float position) ClearLastResult(); __pScrollPanelPresenter->SetVerticalScrollPosition(position); + InvalidateHierarchyAbsoluteBounds(*this); } float @@ -781,6 +789,7 @@ _ScrollPanel::SetHorizontalScrollPosition(float position) ClearLastResult(); __pScrollPanelPresenter->SetHorizontalScrollPosition(position); + InvalidateHierarchyAbsoluteBounds(*this); } float @@ -840,14 +849,14 @@ _ScrollPanel::AddScrollEventListener(const _IScrollEventListener& listener) if (__pScrollEvent == null) { // Create scroll event - __pScrollEvent = new (std::nothrow) _UiScrollEvent; - SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pScrollEvent = new (std::nothrow) _UiScrollEvent(); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollEvent->Construct(*this); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } - r = __pScrollEvent->AddListener((const Tizen::Base::Runtime::IEventListener &)listener); + r = __pScrollEvent->AddListener((const IEventListener &)listener); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -857,7 +866,7 @@ _ScrollPanel::RemoveScrollEventListener(const _IScrollEventListener& listener) ClearLastResult(); SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_SYSTEM, "[%s] __pScrollEvent is invalid pointer.", GetErrorMessage(E_SYSTEM)); - result r = __pScrollEvent->RemoveListener((const Tizen::Base::Runtime::IEventListener &)listener); + result r = __pScrollEvent->RemoveListener((const IEventListener &)listener); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } @@ -1111,7 +1120,7 @@ _ScrollPanel::FireScrollPanelEvent(const _Control& source, CoreScrollPanelStatus { if (__pCoreScrollPanelEvent != null) { - Tizen::Base::Runtime::IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(scrollPanelStatus); + IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(scrollPanelStatus); result r = GetLastResult(); SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp b/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp index 4f4f8fe..658ea0c 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp @@ -31,6 +31,7 @@ // using namespace using namespace Tizen::Base; using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -98,7 +99,7 @@ _ScrollPanelEventArg::GetStatus(void) const //////////////////////////////////////////////////////////////////////////////// /// _ScrollPanelEvent class Lifecycle -_ScrollPanelEvent::_ScrollPanelEvent(const Tizen::Ui::_Control& source) +_ScrollPanelEvent::_ScrollPanelEvent(const _Control& source) : __pSource(null) { result r = _Event::Initialize(); @@ -116,10 +117,10 @@ _ScrollPanelEvent::~_ScrollPanelEvent(void) } _ScrollPanelEvent* -_ScrollPanelEvent::CreateScrollPanelEventN(const Tizen::Ui::_Control& source) +_ScrollPanelEvent::CreateScrollPanelEventN(const _Control& source) { _ScrollPanelEvent* pCoreScrollPanelEvent = new (std::nothrow) _ScrollPanelEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreScrollPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreScrollPanelEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { @@ -135,7 +136,7 @@ CATCH: // Accessors -const Tizen::Ui::_Control* +const _Control* _ScrollPanelEvent::GetSource(void) const { return __pSource; @@ -144,13 +145,15 @@ _ScrollPanelEvent::GetSource(void) const // Operations void -_ScrollPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +_ScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast <_IScrollPanelEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _IScrollPanelEventListener instance is null."); const _ScrollPanelEventArg* pScrollPanelEventArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The _ScrollPanelEventArg instance is null."); switch (pScrollPanelEventArg->GetStatus()) { @@ -181,7 +184,7 @@ IEventArg* _ScrollPanelEvent::CreateScrollPanelEventArgN(CoreScrollPanelStatus status) { _ScrollPanelEventArg* pEventArg = new (std::nothrow) _ScrollPanelEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp b/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp index 750f26d..eeda9be 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp @@ -38,6 +38,7 @@ using namespace Tizen::App; using namespace Tizen::Graphics; +using namespace Tizen::Base; namespace Tizen { namespace Ui { namespace Controls { @@ -150,7 +151,7 @@ _ScrollPanelImpl::AddScrollEventListener(IScrollEventListener& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -174,7 +175,7 @@ _ScrollPanelImpl::AddScrollEventListener(IScrollEventListenerF& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollEvent->Construct(GetPublic()); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -422,7 +423,7 @@ public: GetInstance(_UiBuilder* pUibuilder) { _ScrollPanelMaker* pScrollPanelMaker = new (std::nothrow) _ScrollPanelMaker(pUibuilder); - SysTryReturn(NID_UI_CTRL, pScrollPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pScrollPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pScrollPanelMaker; }; @@ -445,9 +446,9 @@ protected: ScrollPanelScrollDirection scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL; bool autoResizingEnabled = true; - Tizen::Base::String elementString; + String elementString; GetProperty(pControl, &pControlProperty); - SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[%s] pControlProperty is invalid pointer.", GetErrorMessage(E_SYSTEM)); + SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred. pControlProperty is invalid pointer."); if(pControl->GetParentWin().IsEmpty()) { @@ -455,9 +456,9 @@ protected: } else { - pScrollPanel = new (std::nothrow) ScrollPanel; + pScrollPanel = new (std::nothrow) ScrollPanel(); } - SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); rect = pControlProperty->GetRectF(); // Construct @@ -522,7 +523,7 @@ protected: if (pControl->GetElement("backgroundColorOpacity", elementString) || pControl->GetElement("BGColorOpacity", elementString) || pControl->GetElement("backgroundOpacity", elementString)) { - Base::Integer::Parse(elementString, opacity); + Integer::Parse(elementString, opacity); } if (pControl->GetElement("backgroundColor", elementString) || pControl->GetElement("BGColor", elementString)) diff --git a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp index 2fdf164..77abf76 100644 --- a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp @@ -33,6 +33,8 @@ #include "FUi_IAccessibilityListener.h" #include "FUi_AccessibilityContainer.h" #include "FUi_AccessibilityElement.h" +#include "FUi_WindowImpl.h" +#include "FUi_FocusManagerImpl.h" #include "FUiAnim_VisualElement.h" #include "FUiCtrl_Scroll.h" #include "FUiCtrl_ScrollPanelImpl.h" @@ -42,6 +44,7 @@ using namespace Tizen::Base; using namespace Tizen::Graphics; using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Runtime; namespace { @@ -96,8 +99,8 @@ _ScrollPanelPresenter::Initialize(_ScrollPanel& scrollPanel) __pScrollPanel = &scrollPanel; // create model - _ScrollPanelModel* pModel = new (std::nothrow) _ScrollPanelModel; - SysTryReturn(NID_UI_CTRL, pModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY)); + _ScrollPanelModel* pModel = new (std::nothrow) _ScrollPanelModel(); + SysTryReturn(NID_UI_CTRL, pModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pScrollPanelModel = pModel; @@ -168,6 +171,7 @@ void _ScrollPanelPresenter::OnBoundsChanged(void) { AdjustModel(); + ScrollToFocusedControl(); } void @@ -232,6 +236,7 @@ _ScrollPanelPresenter::OnChildBoundsChanged(const _Control& child) __previousScrollAreaBounds = GetScrollAreaBounds(); } AdjustModel(); + ScrollToFocusedControl(); } } } @@ -253,17 +258,17 @@ void _ScrollPanelPresenter::SetScrollPosition(float position, bool withAnimation) { // change scroll position + position = FixScrollPositionIntoScrollAreaBounds(position, __previousBounds, __previousScrollAreaBounds); + ScrollTo(position, withAnimation); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if (withAnimation) { FadeInScrollBar(); result r = GetLastResult(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } - - position = FixScrollPositionIntoScrollAreaBounds(position); - ScrollTo(position, withAnimation); - result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } float @@ -546,6 +551,19 @@ _ScrollPanelPresenter::RunTouchCanceled(const _Control& source, const _TouchInfo __touchPressed = false; __firstTouchMove = true; + if (__pScrollPanel->IsPageScrollEnabled() && !__flickRunning && !__jumpToTopRunning) + { + float currentPosition = GetScrollPosition(); + float targetPosition = CalculatePagingScrollPosition(currentPosition); + + if (targetPosition > currentPosition || targetPosition < currentPosition) + { + SetScrollPosition(targetPosition, true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + __pPressedControl = null; __subControlMoved = false; @@ -1055,8 +1073,8 @@ _ScrollPanelPresenter::OnFlickGestureCanceled(_TouchFlickGestureDetector& gestur bool _ScrollPanelPresenter::IsControlOutOfView(const _Control& control) const { - FloatRectangle controlBounds = control.GetAbsoluteBoundsF(); - FloatRectangle scrollPanelBounds = __pScrollPanel->GetAbsoluteBoundsF(); + FloatRectangle controlBounds = control.GetAbsoluteBoundsF(true); + FloatRectangle scrollPanelBounds = __pScrollPanel->GetAbsoluteBoundsF(true); // is control out of view area if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) @@ -1088,6 +1106,30 @@ _ScrollPanelPresenter::ScrollToControlWhenOutOfView(const _Control& control) } } +void +_ScrollPanelPresenter::ScrollToFocusedControl(void) +{ + if (_FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled()) + { + _WindowImpl* pWindowImpl = _FocusManagerImpl::GetInstance()->GetCurrentFocusedWindow(); + + if (pWindowImpl != null) + { + _Window* pWindow = &pWindowImpl->GetCore(); + + if (pWindow != null) + { + _Control* pControl = pWindow->GetCurrentFocusControl(); + + if (pControl != null) + { + ScrollToControlWhenOutOfView(*pControl); + } + } + } + } +} + float _ScrollPanelPresenter::CalculatePagingScrollPosition(float position) const { @@ -1229,7 +1271,7 @@ _ScrollPanelPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContaine } void -_ScrollPanelPresenter::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) +_ScrollPanelPresenter::OnTimerExpired(Timer& timer) { if (&timer == __pScrollBarLoadEffectTimer) { @@ -1567,6 +1609,7 @@ float _ScrollPanelPresenter::ScrollTo(float targetPosition, bool withAnimation) { StopScrollingAnimation(); + __pScrollPanel->InvalidateHierarchyAbsoluteBounds(*__pScrollPanel); if (withAnimation) { @@ -1646,10 +1689,12 @@ _ScrollPanelPresenter::ScrollToInternal(float targetPosition) if (targetPosition <= minScrollPos) { __pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_LEFT); + __pScrollPanel->GetVisualElement()->RemoveAllAnimations(); } else if (targetPosition >= maxScrollPos) { __pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_RIGHT); + __pScrollPanel->GetVisualElement()->RemoveAllAnimations(); } } } @@ -1672,10 +1717,12 @@ _ScrollPanelPresenter::ScrollToInternal(float targetPosition) if (targetPosition <= minScrollPos) { __pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_TOP); + __pScrollPanel->GetVisualElement()->RemoveAllAnimations(); } else if (targetPosition >= maxScrollPos) { __pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_BOTTOM); + __pScrollPanel->GetVisualElement()->RemoveAllAnimations(); } } } @@ -1777,8 +1824,8 @@ _ScrollPanelPresenter::StartScrollBarLoadEffectTimer(void) if (__pScrollBarLoadEffectTimer == null && __scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING) { - __pScrollBarLoadEffectTimer = new (std::nothrow) Tizen::Base::Runtime::Timer; - SysTryReturnVoidResult(NID_UI_CTRL, __pScrollBarLoadEffectTimer != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY)); + __pScrollBarLoadEffectTimer = new (std::nothrow) Timer(); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollBarLoadEffectTimer != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollBarLoadEffectTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1910,7 +1957,7 @@ _ScrollPanelPresenter::SetScrollAreaBoundsInternal(FloatRectangle& bounds) } void -_ScrollPanelPresenter::UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds) +_ScrollPanelPresenter::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) { if (__pScrollPanel->IsFixingClientBoundsEnabled()) { @@ -2009,7 +2056,12 @@ _ScrollPanelPresenter::GetCurrentTouchPosition(void) const bool _ScrollPanelPresenter::IsScrollAnimationRunning(void) const { - return __scrollAnimationRunning; + if (__scrollOccured && __scrollAnimationRunning) + { + return true; + } + + return false; } bool diff --git a/src/ui/controls/FUiCtrl_ScrollPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp index 0449ab4..1705415 100644 --- a/src/ui/controls/FUiCtrl_ScrollPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp @@ -49,8 +49,6 @@ const float SCROLL_OPACITY_ON = 1.0f; const float SCROLL_OPACITY_DARK_DIM =0.6f; const float SCROLL_OPACITY_LIGHT_DIM = 0.3f; const float SCROLL_OPACITY_OFF = 0.0f; -const float SCROLLING_EFFECT_MAX_POSITION = 100.0f; -const float SCROLLING_EFFECT_MIN_SCALE_RATE = 0.95f; } namespace Tizen { namespace Ui { namespace Controls @@ -192,11 +190,11 @@ _ScrollPresenter::CreateScrollPresenterN(_Control& parentCtrl, float scrollRange, float scrollPosition) { - SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments"); - SysTryReturn(NID_UI_CTRL, scrollPosition >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments"); + SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), null, E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition (%d) is not in the range of viewRange (%d).", GetErrorMessage(E_INVALID_ARG), scrollRange, viewRange); + SysTryReturn(NID_UI_CTRL, scrollPosition >= 0, null, E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition is negative.", GetErrorMessage(E_INVALID_ARG)); _ScrollPresenter* pPresenter = new (std::nothrow) _ScrollPresenter(); - SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pPresenter->Construct(parentCtrl, scrollCtrl, @@ -257,7 +255,7 @@ _ScrollPresenter::GetScrollDirection(void) const result _ScrollPresenter::SetScrollRange(float viewRange, float scrollRange) { - SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments"); + SysTryReturnResult(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition (%d) is not in the range of viewRange (%d)", GetErrorMessage(E_INVALID_ARG), scrollRange, viewRange); if (__viewRange == viewRange && __scrollRange == scrollRange) { @@ -278,7 +276,7 @@ _ScrollPresenter::GetScrollRange(float* pViewRange, float* pScrollRange) const { SysTryReturnVoidResult(NID_UI_CTRL, !((pViewRange == null) && (pScrollRange == null)), - E_INVALID_ARG,"[E_INVALID_ARG] Input parameter is invalid."); + E_INVALID_ARG,"[%s] Invalid argument(s) is used. The given pViewRange and pScrollRange must not be null.", GetErrorMessage(E_INVALID_ARG)); *pViewRange = __viewRange; *pScrollRange = __scrollRange; @@ -436,30 +434,30 @@ _ScrollPresenter::SetContextMenuScrollType(bool isContextMenu) if (isContextMenu) { r = GET_BITMAP_CONFIG_N(SCROLL::CONTEXTTHUMB_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MARGIN, orientation, __thumbMargin); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); } else { r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MARGIN, orientation, __thumbMargin); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); } __pThumbVe->SetBounds(CalculateThumbBounds(__scrollDirection)); @@ -747,40 +745,6 @@ _ScrollPresenter::SetScrollingEffectVisibility(bool visibility) __pFrontScrollingEffectVe->RemoveAllAnimations(); __pReerScrollingEffectVe->RemoveAllAnimations(); - - if (visibility) - { - if (__enableFadeEffect) - { - __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(true); - __pReerScrollingEffectVe->SetImplicitAnimationEnabled(true); - } - - SetScrollingEffectOpacity(SCROLL_OPACITY_DARK_DIM); - - if (__enableFadeEffect) - { - __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(false); - __pReerScrollingEffectVe->SetImplicitAnimationEnabled(false); - } - } - else - { - if (__enableFadeEffect) - { - __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(true); - __pReerScrollingEffectVe->SetImplicitAnimationEnabled(true); - } - - SetScrollingEffectOpacity(SCROLL_OPACITY_OFF); - - if (__enableFadeEffect) - { - __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(false); - __pReerScrollingEffectVe->SetImplicitAnimationEnabled(false); - } - } - __scrollingEffectVisibility = visibility; return E_SUCCESS; @@ -813,7 +777,7 @@ _ScrollPresenter::AddScrollEventListener(const Controls::_IScrollEventListener& { __pScrollEvent = new (std::nothrow) _UiScrollEvent(); SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pScrollEvent->Construct(GetControl()); } @@ -826,7 +790,7 @@ void _ScrollPresenter::RemoveScrollEventListener(const Controls::_IScrollEventListener& listener) { ClearLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_SYSTEM, "[E_SYSTEM] __pScrollEvent must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_SYSTEM, "[%s] A system error has occurred. __pScrollEvent must not be null.", GetErrorMessage(E_SYSTEM)); __pScrollEvent->RemoveListener(listener); @@ -850,7 +814,6 @@ _ScrollPresenter::OnDraw(void) DrawThumb(); DrawJumpToTop(); DrawHandler(); - DrawScrollingEffect(); return; } @@ -1071,7 +1034,7 @@ _ScrollPresenter::Construct(_Control& parentCtrl, // initialize scrolling effect front VE __pFrontScrollingEffectVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pFrontScrollingEffectVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pFrontScrollingEffectVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pFrontScrollingEffectVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pFrontScrollingEffectVe.", GetErrorMessage(r)); @@ -1090,7 +1053,7 @@ _ScrollPresenter::Construct(_Control& parentCtrl, // initialize scrolling effect reer VE __pReerScrollingEffectVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pReerScrollingEffectVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pReerScrollingEffectVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pReerScrollingEffectVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pReerScrollingEffectVe.", GetErrorMessage(r)); @@ -1255,19 +1218,19 @@ _ScrollPresenter::LoadColorConfig(void) // load color configuration r = GET_COLOR_CONFIG(SCROLL::THUMB_BG_NORMAL, __thumbColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_COLOR_CONFIG(SCROLL::JUMP_TO_TOP_NORMAL, __jumpToTopColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_COLOR_CONFIG(SCROLL::JUMP_TO_TOP_PRESSED, __jumpToTopColorPressed); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_COLOR_CONFIG(SCROLL::BUTTON_BG_NORMAL, __buttonColor); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_COLOR_CONFIG(SCROLL::BUTTON_BG_PRESSED, __buttonColorPressed); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; @@ -1291,77 +1254,77 @@ _ScrollPresenter::LoadBitmapResources(_ScrollDirection scrollDirection) ReleaseBitmapResources(); // load bitmap resources - r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __buttonColor,__pButtonBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEfBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonPressBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __buttonColorPressed,__pButtonPressBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonPressEfBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) { - r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __thumbColor,__pThumbBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColor,__pJumpToTopBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopPressBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColorPressed,__pJumpToTopPressBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopEfBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::HANDLER_HORIZONTAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_LEFT_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_RIGHT_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pReerScrollingEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); } else // if (__scrollDirection == SCROLL_DIRECTION_VERTICAL) { if (__isContextMenuScroll) { r = GET_BITMAP_CONFIG_N(SCROLL::CONTEXTTHUMB_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); } else { - r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __thumbColor,__pThumbBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); } r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColor,__pJumpToTopBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); - r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopPressBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColorPressed,__pJumpToTopPressBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopEfBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::HANDLER_VERTICAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_TOP_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_BOTTOM_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pReerScrollingEffectBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); } return E_SUCCESS; @@ -1383,70 +1346,70 @@ _ScrollPresenter::LoadShapeConfig(_ScrollDirection scrollDirection, _ControlOrie if (__isContextMenuScroll) { r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MARGIN, orientation, __thumbMargin); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); } else { r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MARGIN, orientation, __thumbMargin); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); } } else { r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MARGIN, orientation, __thumbMargin); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); } r = GET_SHAPE_CONFIG(SCROLL::JUMP_TO_TOP_RIGHT_MARGIN, orientation, __jumpToTopMarginRight); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::JUMP_TO_TOP_TOP_MARGIN, orientation, __jumpToTopMarginTop); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_FIXED_VALUE_CONFIG(SCROLL::JUMP_TO_TOP_WIDTH, orientation, __jumpToTopSize.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_FIXED_VALUE_CONFIG(SCROLL::JUMP_TO_TOP_HEIGHT, orientation, __jumpToTopSize.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MARGIN, orientation, __handlerMarginLeft); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MIN_WIDTH, orientation, __handlerSizeMin.width); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MIN_HEIGHT, orientation, __handlerSizeMin.height); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_LEFT_WIDTH, orientation, __scrollingEffectWidthLeft); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_RIGHT_WIDTH, orientation, __scrollingEffectWidthRight); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_TOP_HEIGHT, orientation, __scrollingEffectHeightTop); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_BOTTOM_HEIGHT, orientation, __scrollingEffectHeightBottom); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); __handlerMarginRight = __handlerMarginLeft; __handlerMarginTop = __handlerMarginLeft; @@ -1859,7 +1822,7 @@ _ScrollPresenter::AttachScrollChild(_VisualElement** ppScrollVe, const FloatRect if (pScrollVe == null) { pScrollVe = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, pScrollVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pScrollVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pScrollVe->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pScrollVe.", GetErrorMessage(r)); @@ -1953,13 +1916,12 @@ _ScrollPresenter::DrawThumb(void) } Canvas* pCanvas = null; - Bitmap* pThumbBitmap = null; result r = E_SUCCESS; if (__enableHandler != true) { pCanvas = __pThumbVe->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pThumbVe"); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pThumbVe.", GetErrorMessage(GetLastResult())); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -1979,19 +1941,13 @@ _ScrollPresenter::DrawThumb(void) if (__isContextMenuScroll == false) { - pThumbBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pThumbBitmap, - Color::GetColor(COLOR_ID_MAGENTA), - __thumbColor); - SysTryCatch(NID_UI_CTRL, pThumbBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.", - GetErrorMessage(GetLastResult())); - if (isCustomBitmap == false) { r = DrawBitmap(*pCanvas, thumbBounds, *__pThumbEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); } - r = DrawBitmap(*pCanvas, thumbBounds, *pThumbBitmap); + r = DrawBitmap(*pCanvas, thumbBounds, *__pThumbBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); } else @@ -2005,7 +1961,7 @@ _ScrollPresenter::DrawThumb(void) //fall through CATCH: delete pCanvas; - delete pThumbBitmap; + return; } @@ -2019,7 +1975,6 @@ _ScrollPresenter::DrawJumpToTop(void) } Canvas* pCanvas = null; - Bitmap* pColorReplacedBitmap = null; result r = E_SUCCESS; bool isCustomBitmap = false; if (__enableJumpToTop) @@ -2030,8 +1985,6 @@ _ScrollPresenter::DrawJumpToTop(void) bitmapId = L"SCROLL::JUMP_TO_LEFT_NORMAL"; } - Color jumpToTopColor = __jumpToTopColor; - Color buttonColor = __buttonColor; Bitmap* pJumpToTopBitmap = __pJumpToTopBitmap; Bitmap* pButtonBitmap = __pButtonBitmap; Bitmap* pButtonEfBitmap = __pButtonEfBitmap; @@ -2039,8 +1992,6 @@ _ScrollPresenter::DrawJumpToTop(void) if (__jumpToTopPressed) { - jumpToTopColor = __jumpToTopColorPressed; - buttonColor = __buttonColorPressed; pJumpToTopBitmap = __pJumpToTopPressBitmap; pButtonBitmap = __pButtonPressBitmap; pButtonEfBitmap = __pButtonPressEfBitmap; @@ -2057,7 +2008,7 @@ _ScrollPresenter::DrawJumpToTop(void) } pCanvas = __pJumpToTopVe->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pJumpToTopVe"); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pJumpToTopVe.", GetErrorMessage(GetLastResult())); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -2073,12 +2024,7 @@ _ScrollPresenter::DrawJumpToTop(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); } - pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBitmap, - Color::GetColor(COLOR_ID_MAGENTA), - buttonColor); - SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.", GetErrorMessage(GetLastResult())); - - r = DrawBitmap(*pCanvas, jumpToTopBounds, *pColorReplacedBitmap); + r = DrawBitmap(*pCanvas, jumpToTopBounds, *pButtonBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); if (__scrollDirection == SCROLL_DIRECTION_VERTICAL) { @@ -2094,12 +2040,7 @@ _ScrollPresenter::DrawJumpToTop(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); } - pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pJumpToTopBitmap, - Color::GetColor(COLOR_ID_MAGENTA), - jumpToTopColor); - SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.", GetErrorMessage(GetLastResult())); - - r = DrawBitmap(*pCanvas, jumpToTopBounds, *pColorReplacedBitmap); + r = DrawBitmap(*pCanvas, jumpToTopBounds, *pJumpToTopBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); } @@ -2107,7 +2048,7 @@ _ScrollPresenter::DrawJumpToTop(void) //fall through CATCH: delete pCanvas; - delete pColorReplacedBitmap; + return; } @@ -2127,7 +2068,7 @@ _ScrollPresenter::DrawHandler(void) { // handler bounds setting pCanvas = __pHandlerVe->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pHandlerVe"); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pHandlerVe.", GetErrorMessage(GetLastResult())); // clear background pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -2360,7 +2301,7 @@ _ScrollPresenter::OnTouchMovedHandler(const _Control& source, const _TouchInfo& } float touchDistance = touchPosition - __handlerTouchedPosition; - float scrollDistance = ( __scrollRange * touchDistance) / scrollBoundsRange; + float scrollDistance = (__scrollRange * touchDistance) / scrollBoundsRange; scrollPosition += scrollDistance; diff --git a/src/ui/controls/FUiCtrl_SearchBar.cpp b/src/ui/controls/FUiCtrl_SearchBar.cpp index ba31f97..7a07d35 100644 --- a/src/ui/controls/FUiCtrl_SearchBar.cpp +++ b/src/ui/controls/FUiCtrl_SearchBar.cpp @@ -23,8 +23,14 @@ #include #include #include -#include "FUiAnim_VisualElement.h" +#include #include "FUi_ResourceManager.h" +#include "FUi_FocusManagerImpl.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_VisualElement.h" #include "FUiCtrl_SearchBar.h" #include "FUiCtrl_SearchBarPresenter.h" #include "FUiCtrl_Form.h" @@ -36,15 +42,9 @@ #include "FUiCtrl_ActionEvent.h" #include "FUiCtrl_TextBlockEvent.h" #include "FUiCtrl_TextEvent.h" -#include "FUi_AccessibilityContainer.h" -#include "FUi_AccessibilityElement.h" -#include "FUi_AccessibilityManager.h" -#include "FUi_CoordinateSystemUtils.h" #include "FUiCtrl_SearchBarImpl.h" #include "FUiCtrl_EditFieldImpl.h" #include "FUiCtrl_ButtonImpl.h" -#include "FUi_FocusManagerImpl.h" -#include using namespace Tizen::Graphics; @@ -80,6 +80,7 @@ _SearchBar::_SearchBar(void) , __isButtonTextChangedByApp(false) , __contentVisibilitySetByApp(true) , __isFocusUiInitialized(false) + , __isTouchMoved(false) , __keypadAction(CORE_KEYPAD_ACTION_SEARCH) , __pBackgroundBitmap(null) , __backgroundColor(Color()) @@ -166,8 +167,8 @@ _SearchBar::~_SearchBar(void) _SearchBar* _SearchBar::CreateSearchBarN(void) { - _SearchBar* pSearchBar = new (std::nothrow) _SearchBar; - SysTryReturn(NID_UI_CTRL, pSearchBar, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _SearchBar* pSearchBar = new (std::nothrow) _SearchBar(); + SysTryReturn(NID_UI_CTRL, pSearchBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (GetLastResult() != E_SUCCESS) { delete pSearchBar; @@ -200,7 +201,7 @@ _SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction for (int i = 0; i < SEARCHBAR_COLOR_MAX; i++) { - switch(i) + switch (i) { case SEARCH_FIELD_STATUS_DISABLED: GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_DISABLED, __color[i]); @@ -230,22 +231,22 @@ _SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction r = CreateClippedGroupControl(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The construction of parent control for clipped group control failed."); + "[%s] A system error has occurred. The construction of parent control for clipped group control failed.", GetErrorMessage(E_SYSTEM)); r = CreateSearchField(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit construction failed."); + "[%s] A system error has occurred. The edit construction failed.", GetErrorMessage(E_SYSTEM)); r = CreateCancelButton(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button construction failed."); + "[%s] A system error has occurred. The cancel button construction failed.", GetErrorMessage(E_SYSTEM)); SetContentsArea(); r = CreateContentsArea(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The construction of parent for content failed."); + "[%s] A system error has occurred. The construction of parent for content failed.", GetErrorMessage(E_SYSTEM)); - _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter; - SysTryReturn(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter(); + SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPresenter->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -317,10 +318,12 @@ _SearchBar::CreateSearchField(void) editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight; _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData()); - __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore()); + SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM, + "A system error has occurred. Failed to get _SearchBarImpl instance."); + __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore()); SysTryReturnResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to get _Edit instance"); + "A system error has occurred. Failed to get _Edit instance."); __pEdit->SetKeypadCommandButtonVisible(false); __pEdit->SetBounds(editBounds); @@ -351,7 +354,7 @@ _SearchBar::CreateSearchField(void) r = __pClippedGroupControl->AttachChild(*__pEdit); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to attach edit as child."); + "[%s] A system error has occurred. Failed to attach edit as child.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; @@ -373,10 +376,12 @@ _SearchBar::CreateCancelButton(void) _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData()); - __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore()); + SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM, + "A system error has occurred. Failed to get _SearchBarImpl instance."); + __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore()); SysTryReturnResult(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to get _Edit instance"); + "A system error has occurred. Failed to get _Button instance."); r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); @@ -416,7 +421,7 @@ _SearchBar::CreateCancelButton(void) r = __pClippedGroupControl->AttachChild(*__pCancelButton); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to attach button as child."); + "[%s] A system error has occurred. Failed to attach button as child.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; @@ -441,7 +446,7 @@ _SearchBar::CreateContentsArea(void) r = AttachChild(*__pContainer); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to attach the parent of content."); + "[%s] A system error has occurred. Failed to attach the parent of content.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; @@ -495,6 +500,21 @@ _SearchBar::GetContent(void) const } result +_SearchBar::DetachContent(_Control* pContent) +{ + result r = E_SUCCESS; + + if (__pContainer != null && pContent != null) + { + r = __pContainer->DetachChild(*pContent); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating"); + } + __pContentControl = null; + + return r; +} + +result _SearchBar::SetContent(const _Control* pContent) { __pContentControl = const_cast <_Control*>(pContent); @@ -518,8 +538,8 @@ _SearchBar::UpdateContentArea(bool invalidate) result _SearchBar::SetContentAreaVisible(bool visible, bool isCalledByApp) { - SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The instance of parent to content is null."); + SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The instance of parent to content is null.", GetErrorMessage(E_SYSTEM)); SearchBarMode searchBarMode = GetMode(); if (searchBarMode == SEARCH_BAR_MODE_INPUT) @@ -665,8 +685,8 @@ _SearchBar::GetButtonTextColor(SearchBarButtonStatus status) const SearchBarButtonStatus _SearchBar::GetButtonStatus(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL; @@ -681,14 +701,14 @@ _SearchBar::GetButtonStatus(void) const result _SearchBar::SetButtonText(const String& text) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetText(text); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set text."); + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); __isButtonTextChangedByApp = true; @@ -704,8 +724,8 @@ _SearchBar::SetButtonActionId(int actionId) result _SearchBar::SetButtonEnabled(bool enabled) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); __pCancelButton->SetEnableState(enabled); @@ -769,16 +789,16 @@ _SearchBar::SetButtonTextColor(SearchBarButtonStatus status, const Color& color) result _SearchBar::AppendCharacter(const Character& character) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The character is null."); + "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->AppendCharacter(character); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set character."); + "[%s] A system error has occurred. Failed to set character.", GetErrorMessage(E_SYSTEM)); return r; } @@ -786,16 +806,16 @@ _SearchBar::AppendCharacter(const Character& character) result _SearchBar::AppendText(const String& text) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, text.IsEmpty() == false, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The text is empty."); + "[%s] A system error has occurred. The text is empty.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->AppendText(text); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set text."); + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); return r; } @@ -803,19 +823,19 @@ _SearchBar::AppendText(const String& text) result _SearchBar::SetText(const String& text) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; int limitLength = __pEdit->GetTextLimitLength(); int textLength = text.GetLength(); SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. textLength exceeds the limitLength"); + "[%s] A system error has occurred. textLength exceeds the limitLength", GetErrorMessage(E_SYSTEM)); r = __pEdit->SetText(text); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set text."); + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); return r; } @@ -823,12 +843,12 @@ _SearchBar::SetText(const String& text) result _SearchBar::InsertCharacterAt(int index, const Character& character) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range.", index); + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The character is null."); + "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; @@ -838,14 +858,14 @@ _SearchBar::InsertCharacterAt(int index, const Character& character) textLength = __pEdit->GetTextLength() + 1; SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED, - "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength); + "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength); SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength()); + "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength()); r = __pEdit->InsertCharacterAt(index, character); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set text."); + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); return r; } @@ -853,10 +873,10 @@ _SearchBar::InsertCharacterAt(int index, const Character& character) result _SearchBar::InsertTextAt(int index, const String& text) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range.", index); + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); result r = E_SUCCESS; @@ -866,13 +886,13 @@ _SearchBar::InsertTextAt(int index, const String& text) textLength = __pEdit->GetTextLength() + text.GetLength(); SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED, - "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength); + "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength); SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength()); + "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength()); r = __pEdit->InsertTextAt(index, text); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to insert text."); + "[%s] A system error has occurred. Failed to insert text.", GetErrorMessage(E_SYSTEM)); return r; } @@ -880,21 +900,21 @@ _SearchBar::InsertTextAt(int index, const String& text) result _SearchBar::DeleteCharacterAt(int index) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, index > -1, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. index = %d", index); + "[%s] Invalid argument(s) is used. index = %d", GetErrorMessage(E_INVALID_ARG), index); result r = E_SUCCESS; int textLength = 0; textLength = __pEdit->GetTextLength(); SysTryReturn(NID_UI_CTRL, textLength > index, E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range. textLength(%d)", index, textLength); + "[%s] index(%d) is out of range. textLength(%d)", GetErrorMessage(E_OUT_OF_RANGE), index, textLength); r = __pEdit->DeleteCharacterAt(index); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to delete character."); + "A system error has occurred. Failed to delete character."); return r; } @@ -902,8 +922,8 @@ _SearchBar::DeleteCharacterAt(int index) result _SearchBar::Clear(void) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->ClearText(); } @@ -911,8 +931,8 @@ _SearchBar::Clear(void) int _SearchBar::GetTextLength(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetTextLength(); } @@ -920,8 +940,8 @@ _SearchBar::GetTextLength(void) const String _SearchBar::GetText(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetText(); } @@ -929,8 +949,8 @@ _SearchBar::GetText(void) const String _SearchBar::GetText(int start, int end) const { - SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetText(start, end); } @@ -938,8 +958,8 @@ _SearchBar::GetText(int start, int end) const int _SearchBar::GetLimitLength(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetTextLimitLength(); } @@ -947,16 +967,16 @@ _SearchBar::GetLimitLength(void) const result _SearchBar::SetLimitLength(int limitLength) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, limitLength > 0, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used.limitLength = %d", limitLength); + "[%s] Invalid argument(s) is used.limitLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength); String tempString = GetText(); int textLength = tempString.GetLength(); SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. limitLength = %d, textLength = %d", limitLength, textLength); + "[%s] Invalid argument(s) is used. limitLength = %d, textLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength, textLength); result r = __pEdit->SetLimitLength(limitLength); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -970,24 +990,24 @@ _SearchBar::SetLimitLength(int limitLength) result _SearchBar::ShowKeypad(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SearchBarMode mode = __pSearchBarPresenter->GetMode(); SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_STATE, E_INVALID_STATE, - "[E_INVALID_STATE] The SearchBar is currently in Normal mode."); + "[%s] The SearchBar is currently in Normal mode.", GetErrorMessage(E_INVALID_STATE)); return __pEdit->ShowKeypad(); } result _SearchBar::HideKeypad(void) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SearchBarMode mode = __pSearchBarPresenter->GetMode(); SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The SearchBar is currently in Normal mode."); + "[%s] A system error has occurred. The SearchBar is currently in Normal mode.", GetErrorMessage(E_SYSTEM)); result r = __pEdit->HideKeypad(); @@ -999,8 +1019,8 @@ _SearchBar::HideKeypad(void) float _SearchBar::GetSearchFieldTextSizeF(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetTextSizeF(); } @@ -1008,8 +1028,8 @@ _SearchBar::GetSearchFieldTextSizeF(void) const result _SearchBar::SetSearchFieldTextSize(float size) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->SetTextSize(size); } @@ -1017,15 +1037,15 @@ _SearchBar::SetSearchFieldTextSize(float size) result _SearchBar::GetBlockRange(int& start, int& end) const { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); int startIndex = -1; int endIndex = -1; __pEdit->GetBlockRange(startIndex, endIndex); SysTryReturn(NID_UI_CTRL, (startIndex > -1 && endIndex > 0), E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to get text block range."); + "[%s] A system error has occurred. Failed to get text block range.", GetErrorMessage(E_SYSTEM)); start = startIndex; end = endIndex - 1; @@ -1036,8 +1056,8 @@ _SearchBar::GetBlockRange(int& start, int& end) const result _SearchBar::ReleaseBlock(void) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; @@ -1053,8 +1073,8 @@ _SearchBar::ReleaseBlock(void) result _SearchBar::SetBlockRange(int start, int end) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; @@ -1062,18 +1082,18 @@ _SearchBar::SetBlockRange(int start, int end) textLength = __pEdit->GetTextLength(); SysTryReturn(NID_UI_CTRL, (start < end && start >= 0 && textLength >= end), E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] start (%d) and end (%d) is out of range.", start, end - 1); + "[%s] start (%d) and end (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), start, end - 1); r = SetCursorPosition(start); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = __pEdit->BeginTextBlock(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set text block range."); + "[%s] A system error has occurred. Failed to set text block range.", GetErrorMessage(E_SYSTEM)); r = SetCursorPosition(end); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set cursor position."); + "[%s] A system error has occurred. Failed to set cursor position.", GetErrorMessage(E_SYSTEM)); return E_SUCCESS; } @@ -1081,8 +1101,8 @@ _SearchBar::SetBlockRange(int start, int end) result _SearchBar::RemoveTextBlock(void) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; @@ -1152,8 +1172,8 @@ result _SearchBar::SetBackgroundBitmap(const Bitmap& bitmap) { Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap); - SysTryReturn(NID_UI_CTRL, pNewBitmap, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The creation of bitmap failed."); + SysTryReturn(NID_UI_CTRL, pNewBitmap != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The creation of bitmap failed.", GetErrorMessage(E_SYSTEM)); delete __pBackgroundBitmap; __pBackgroundBitmap = null; @@ -1226,8 +1246,8 @@ _SearchBar::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color String _SearchBar::GetGuideText(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetGuideText(); } @@ -1235,8 +1255,8 @@ _SearchBar::GetGuideText(void) const result _SearchBar::SetGuideText(const String& guideText) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __pEdit->SetGuideText(guideText); @@ -1246,8 +1266,8 @@ _SearchBar::SetGuideText(const String& guideText) Color _SearchBar::GetGuideTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetGuideTextColor(); } @@ -1255,8 +1275,8 @@ _SearchBar::GetGuideTextColor(void) const result _SearchBar::SetGuideTextColor(const Color& color) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __isUserGuideTextColor = true; return __pEdit->SetGuideTextColor(color); @@ -1265,8 +1285,8 @@ _SearchBar::SetGuideTextColor(const Color& color) int _SearchBar::GetCursorPosition(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetCursorPosition(); } @@ -1274,16 +1294,16 @@ _SearchBar::GetCursorPosition(void) const result _SearchBar::SetCursorPosition(int index) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); int textLength = -1; textLength = __pEdit->GetTextLength(); SysTryReturn(NID_UI_CTRL, (index > -1 && index <= textLength), E_OUT_OF_RANGE, E_OUT_OF_RANGE, - "[E_OUT_OF_RANGE] index(%d) is out of range.", index); + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); return __pEdit->SetCursorPosition(index); } @@ -1291,8 +1311,8 @@ _SearchBar::SetCursorPosition(int index) bool _SearchBar::IsLowerCaseModeEnabled(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->IsLowerCaseModeEnabled(); } @@ -1300,8 +1320,8 @@ _SearchBar::IsLowerCaseModeEnabled(void) const void _SearchBar::SetLowerCaseModeEnabled(bool enable) { - SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __pEdit->SetLowerCaseModeEnabled(enable); } @@ -1309,8 +1329,8 @@ _SearchBar::SetLowerCaseModeEnabled(bool enable) EllipsisPosition _SearchBar::GetEllipsisPosition(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, ELLIPSIS_POSITION_START, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, ELLIPSIS_POSITION_START, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->GetEllipsisPosition(); } @@ -1318,8 +1338,8 @@ _SearchBar::GetEllipsisPosition(void) const result _SearchBar::SetEllipsisPosition(EllipsisPosition position) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __pEdit->SetEllipsisPosition(position); return E_SUCCESS; @@ -1334,16 +1354,16 @@ _SearchBar::GetKeypadAction(void) const bool _SearchBar::IsTextPredictionEnabled(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, false, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, false, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->IsTextPredictionEnabled(); } result _SearchBar::SetTextPredictionEnabled(bool enable) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return __pEdit->SetTextPredictionEnabled(enable); } @@ -1379,8 +1399,8 @@ _SearchBar::AddActionEventListener(const _IActionEventListener& listener) result _SearchBar::RemoveActionEventListener(const _IActionEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The action event instance is null."); + SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The action event instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pActionEvent->RemoveListener(listener); @@ -1410,8 +1430,8 @@ _SearchBar::AddKeypadEventListener(const _IKeypadEventListener& listener) result _SearchBar::RemoveKeypadEventListener(const _IKeypadEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pKeypadEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The keypad event instance is null."); + SysTryReturn(NID_UI_CTRL, __pKeypadEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The keypad event instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pKeypadEvent->RemoveListener(listener); @@ -1442,8 +1462,8 @@ _SearchBar::AddTextBlockEventListener(const _ITextBlockEventListener& listener) result _SearchBar::RemoveTextBlockEventListener(const _ITextBlockEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTextBlockEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The text block event instance is null."); + SysTryReturn(NID_UI_CTRL, __pTextBlockEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The text block event instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pTextBlockEvent->RemoveListener(listener); @@ -1474,8 +1494,8 @@ _SearchBar::AddTextEventListener(const _ITextEventListener& listener) result _SearchBar::RemoveTextEventListener(const _ITextEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The text event instance is null."); + SysTryReturn(NID_UI_CTRL, __pTextEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The text event instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pTextEvent->RemoveListener(listener); @@ -1505,8 +1525,8 @@ _SearchBar::AddSearchBarEventListener(const _ISearchBarEventListener& listener) result _SearchBar::RemoveSearchBarEventListener(const _ISearchBarEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pSearchBarEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The searchbar event instance is null."); + SysTryReturn(NID_UI_CTRL, __pSearchBarEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The searchbar event instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pSearchBarEvent->RemoveListener(listener); @@ -1536,7 +1556,7 @@ _SearchBar::AddLanguageEventListener(const _ILanguageEventListener& listener) result _SearchBar::RemoveLanguageEventListener(const _ILanguageEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pLanguageEvent != null, E_SYSTEM, E_SYSTEM, "[%s] This instance isn't constructed.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; __pLanguageEvent->RemoveListener(listener); @@ -1558,6 +1578,16 @@ _SearchBar::OnBoundsChanged(void) { __pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); } + + if (IsFocused()) + { + RemoveFocusRing(true); + if (IsFocusModeStateEnabled()) + { + DrawFocus(); + } + } + return; } @@ -1587,6 +1617,17 @@ _SearchBar::OnDraw(void) } _UiTouchEventDelivery +_SearchBar::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source == __pEdit) + { + __isTouchMoved = true; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery _SearchBar::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) { _Edit* pEdit = dynamic_cast <_Edit*>(const_cast <_Control*>(&source)); @@ -1597,13 +1638,26 @@ _SearchBar::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& tou if (pEdit->IsClearIconPressed()) { + __isTouchMoved = false; return _UI_TOUCH_EVENT_DELIVERY_YES; } SetContentAreaVisible(__contentVisibilitySetByApp); //When a touch happens on SearchField SetFocusCallbackParameter(true); - SetMode(SEARCH_BAR_MODE_INPUT); + if (!__isTouchMoved) + { + SetMode(SEARCH_BAR_MODE_INPUT); + } + + __isTouchMoved = false; + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_SearchBar::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchMoved = false; return _UI_TOUCH_EVENT_DELIVERY_YES; } @@ -1629,7 +1683,7 @@ _SearchBar::FireButtonActionEvent(const _Control &source, int actionId) { IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pActionEvent->Fire(*pEventArg); } @@ -1654,7 +1708,7 @@ _SearchBar::OnKeypadWillOpen(void) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pKeypadEvent->Fire(*pEventArg); } @@ -1671,7 +1725,7 @@ _SearchBar::OnKeypadOpened(void) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pKeypadEvent->Fire(*pEventArg); } @@ -1688,7 +1742,7 @@ _SearchBar::OnKeypadClosed(void) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pKeypadEvent->Fire(*pEventArg); } @@ -1706,7 +1760,7 @@ _SearchBar::OnKeypadBoundsChanged(void) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pKeypadEvent->Fire(*pEventArg); } @@ -1722,7 +1776,7 @@ _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction) { IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pKeypadEvent->Fire(*pEventArg); } @@ -1737,7 +1791,7 @@ _SearchBar::OnTextBlockSelected(_Control& source, int start, int end) { IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pTextBlockEvent->Fire(*pEventArg); } @@ -1760,7 +1814,7 @@ _SearchBar::OnTextValueChanged(const _Control& source) { IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CHANGED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pTextEvent->Fire(*pEventArg); } @@ -1775,7 +1829,7 @@ _SearchBar::OnTextValueChangeCanceled(const _Control& source) { IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CANCELED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pTextEvent->Fire(*pEventArg); } @@ -1822,7 +1876,6 @@ void _SearchBar::OnDrawFocus(void) { __isFocusUiInitialized = true; - __pEdit->SetSearchFieldFocus(true); _Control::OnDrawFocus(); return; @@ -1834,6 +1887,17 @@ _SearchBar::IsChildControlFocusManage(void) const return true; } +void +_SearchBar::OnAncestorEnableStateChanged(const _Control& control) +{ + if (__pCancelButton != null) + { + __pCancelButton->Invalidate(); + } + + return; +} + bool _SearchBar::OnPreviewKeyPressed(const _Control &source, const _KeyInfo &keyInfo) { @@ -1846,7 +1910,6 @@ _SearchBar::OnPreviewKeyPressed(const _Control &source, const _KeyInfo &keyInfo) if (keyCode == _KEY_TAB && GetMode() == SEARCH_BAR_MODE_INPUT && __isFocusUiInitialized == false) { - __pEdit->SetSearchFieldFocus(true); __isFocusUiInitialized = true; return false; } @@ -2114,7 +2177,7 @@ _SearchBar::SendSearchBarEvent(_SearchBarEventStatus status) { IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); if (!IsContentAreaVisible()) { @@ -2140,10 +2203,10 @@ _SearchBar::SetHeaderVisibleState(bool visible) result _SearchBar::SetPropertyButtonActionId(const Variant& actionId) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); SysTryReturn(NID_UI_CTRL, actionId.ToInt() > -1, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. actionId.ToInt() = %d", actionId.ToInt()); + "[%s] Invalid argument(s) is used. actionId.ToInt() = %d", GetErrorMessage(E_INVALID_ARG), actionId.ToInt()); result r = E_SUCCESS; @@ -2159,8 +2222,8 @@ _SearchBar::SetPropertyButtonActionId(const Variant& actionId) Variant _SearchBar::GetPropertyButtonActionId(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(-1), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(-1), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__actionId); } @@ -2168,14 +2231,14 @@ _SearchBar::GetPropertyButtonActionId(void) const result _SearchBar::SetPropertyButtonDisabledColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyDisabledColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button color."); + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); __buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = color.ToColor(); @@ -2185,8 +2248,8 @@ _SearchBar::SetPropertyButtonDisabledColor(const Variant& color) Variant _SearchBar::GetPropertyButtonDisabledColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]); } @@ -2194,14 +2257,14 @@ _SearchBar::GetPropertyButtonDisabledColor(void) const result _SearchBar::SetPropertyButtonHighlightedColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyHighlightedColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button color."); + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); __buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); @@ -2211,8 +2274,8 @@ _SearchBar::SetPropertyButtonHighlightedColor(const Variant& color) Variant _SearchBar::GetPropertyButtonHighlightedColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]); } @@ -2220,14 +2283,14 @@ _SearchBar::GetPropertyButtonHighlightedColor(void) const result _SearchBar::SetPropertyButtonNormalColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyNormalColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button color."); + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); __buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = color.ToColor(); @@ -2237,8 +2300,8 @@ _SearchBar::SetPropertyButtonNormalColor(const Variant& color) Variant _SearchBar::GetPropertyButtonNormalColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]); } @@ -2246,14 +2309,14 @@ _SearchBar::GetPropertyButtonNormalColor(void) const result _SearchBar::SetPropertyButtonPressedColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyPressedColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button color."); + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); __buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = color.ToColor(); @@ -2263,8 +2326,8 @@ _SearchBar::SetPropertyButtonPressedColor(const Variant& color) Variant _SearchBar::GetPropertyButtonPressedColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]); } @@ -2272,14 +2335,14 @@ _SearchBar::GetPropertyButtonPressedColor(void) const result _SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyDisabledTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button text color."); + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = textColor.ToColor(); @@ -2289,8 +2352,8 @@ _SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor) Variant _SearchBar::GetPropertyButtonDisabledTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]); } @@ -2298,14 +2361,14 @@ _SearchBar::GetPropertyButtonDisabledTextColor(void) const result _SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM]] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyHighlightedTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button text color."); + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = textColor.ToColor(); @@ -2315,8 +2378,8 @@ _SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor) Variant _SearchBar::GetPropertyButtonHighlightedTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]); } @@ -2324,14 +2387,14 @@ _SearchBar::GetPropertyButtonHighlightedTextColor(void) const result _SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyNormalTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button text color."); + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = textColor.ToColor(); @@ -2341,8 +2404,8 @@ _SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor) Variant _SearchBar::GetPropertyButtonNormalTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]); } @@ -2350,14 +2413,14 @@ _SearchBar::GetPropertyButtonNormalTextColor(void) const result _SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pCancelButton->SetPropertyPressedTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set button text color."); + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = textColor.ToColor(); @@ -2367,8 +2430,8 @@ _SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor) Variant _SearchBar::GetPropertyButtonPressedTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]); } @@ -2376,14 +2439,14 @@ _SearchBar::GetPropertyButtonPressedTextColor(void) const result _SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyDisabledColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set the edit disabled color."); + "[%s] A system error has occurred. Failed to set the edit disabled color.", GetErrorMessage(E_SYSTEM)); __color[SEARCH_FIELD_STATUS_DISABLED] = color.ToColor(); @@ -2393,8 +2456,8 @@ _SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color) Variant _SearchBar::GetPropertySearchFieldDisabledColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__color[SEARCH_FIELD_STATUS_DISABLED]); } @@ -2402,14 +2465,14 @@ _SearchBar::GetPropertySearchFieldDisabledColor(void) const result _SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyHighlightedColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set the edit highlighted color."); + "[%s] A system error has occurred. Failed to set the edit highlighted color.", GetErrorMessage(E_SYSTEM)); __color[SEARCH_FIELD_STATUS_HIGHLIGHTED] = color.ToColor(); @@ -2419,8 +2482,8 @@ _SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color) Variant _SearchBar::GetPropertySearchFieldHighlightedColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__color[SEARCH_FIELD_STATUS_HIGHLIGHTED]); } @@ -2428,14 +2491,14 @@ _SearchBar::GetPropertySearchFieldHighlightedColor(void) const result _SearchBar::SetPropertySearchFieldNormalColor(const Variant& color) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyNormalColor(color); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set edit normal color."); + "[%s] A system error has occurred. Failed to set edit normal color.", GetErrorMessage(E_SYSTEM)); __color[SEARCH_FIELD_STATUS_NORMAL] = color.ToColor(); @@ -2445,8 +2508,8 @@ _SearchBar::SetPropertySearchFieldNormalColor(const Variant& color) Variant _SearchBar::GetPropertySearchFieldNormalColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__color[SEARCH_FIELD_STATUS_NORMAL]); } @@ -2454,14 +2517,14 @@ _SearchBar::GetPropertySearchFieldNormalColor(void) const result _SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyDisabledTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set edit disabled text color."); + "[%s] A system error has occurred. Failed to set edit disabled text color.", GetErrorMessage(E_SYSTEM)); __textColor[SEARCH_FIELD_STATUS_DISABLED] = textColor.ToColor(); @@ -2471,8 +2534,8 @@ _SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor) Variant _SearchBar::GetPropertySearchFieldDisabledTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__textColor[SEARCH_FIELD_STATUS_DISABLED]); } @@ -2480,14 +2543,14 @@ _SearchBar::GetPropertySearchFieldDisabledTextColor(void) const result _SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyHighlightedTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set edit highlighted text color."); + "[%s] A system error has occurred. Failed to set edit highlighted text color.", GetErrorMessage(E_SYSTEM)); __textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED] = textColor.ToColor(); @@ -2497,8 +2560,8 @@ _SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor) Variant _SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED]); } @@ -2506,14 +2569,14 @@ _SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const result _SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; r = __pEdit->SetPropertyNormalTextColor(textColor); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to set edit normal text color."); + "[%s] A system error has occurred. Failed to set edit normal text color.", GetErrorMessage(E_SYSTEM)); __textColor[SEARCH_FIELD_STATUS_NORMAL] = textColor.ToColor(); @@ -2523,8 +2586,8 @@ _SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor) Variant _SearchBar::GetPropertySearchFieldNormalTextColor(void) const { - SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); return Variant(__textColor[SEARCH_FIELD_STATUS_NORMAL]); } @@ -2548,8 +2611,8 @@ _SearchBar::SetPropertyContentAreaSize(const Variant& size) { FloatDimension contentAreaSize = size.ToFloatDimension(); SysTryReturn(NID_UI_CTRL, contentAreaSize.width >= 0 && contentAreaSize.height >= 0, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f", - contentAreaSize.width, contentAreaSize.height); + "[%s] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f", + GetErrorMessage(E_INVALID_ARG), contentAreaSize.width, contentAreaSize.height); result r = E_SUCCESS; @@ -2644,7 +2707,7 @@ _SearchBar::InitializeAccessibility(void) void _SearchBar::SetContentDimming(void) { - if (__pContainer != NULL) + if (__pContainer != null) { if (!GetTextLength()) { @@ -2845,8 +2908,8 @@ _SearchBar::GetCurrentStatus(void) void _SearchBar::SetEditTextFilter(IEditTextFilter* pFilter) { - SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __pEdit->SetEditTextFilter(pFilter); @@ -2856,8 +2919,8 @@ _SearchBar::SetEditTextFilter(IEditTextFilter* pFilter) void _SearchBar::SendOpaqueCommand(const String& command) { - SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _Edit instance is null."); __pEdit->SendOpaqueCommand(command); diff --git a/src/ui/controls/FUiCtrl_SearchBarEvent.cpp b/src/ui/controls/FUiCtrl_SearchBarEvent.cpp index 73ba9d3..c32336e 100644 --- a/src/ui/controls/FUiCtrl_SearchBarEvent.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarEvent.cpp @@ -122,8 +122,8 @@ _SearchBarEvent* _SearchBarEvent::CreateInstanceN(const _SearchBar& source) { _SearchBarEvent* pSearchBarEvent = new (std::nothrow) _SearchBarEvent(source); - SysTryReturn(NID_UI_CTRL, pSearchBarEvent, null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pSearchBarEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { @@ -155,17 +155,17 @@ _SearchBarEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const // cast to _IActionEventListener _ISearchBarEventListener* pSearchBarListener = dynamic_cast <_ISearchBarEventListener*>(&listener); SysTryReturnVoidResult(NID_UI_CTRL, pSearchBarListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The searchbar listener instance is null."); + "[%s] Invalid argument(s) is used. The searchbar listener instance is null.", GetErrorMessage(E_INVALID_ARG)); // cast to _SearchBarEventArg const _SearchBarEventArg* pArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The argument to searchbar event listener is null."); + "[%s] Invalid argument(s) is used. The argument to searchbar event listener is null.", GetErrorMessage(E_INVALID_ARG)); _SearchBar* pSource = null; pSource = const_cast <_SearchBar*>(__pSource); SysTryReturnVoidResult(NID_UI_CTRL, pSource != null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used.The searchbar instance is null."); + "[%s] Invalid argument(s) is used.The searchbar instance is null.", GetErrorMessage(E_INVALID_ARG)); // call cursor change event listener method _SearchBarEventStatus status = pArg->GetStatus(); @@ -183,8 +183,8 @@ IEventArg* _SearchBarEvent::CreateSearchBarEventArgN(_SearchBarEventStatus status) { _SearchBarEventArg* pEventArg = new (std::nothrow) _SearchBarEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp index a416e40..0bbbcf3 100644 --- a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp @@ -20,20 +20,20 @@ * @brief This is the implementation file for _SearchBarImpl class. */ -#include #include -#include #include #include #include +#include +#include #include "FUi_ResourceSizeInfo.h" #include "FUi_ResourceManager.h" #include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" #include "FUiCtrl_PublicActionEvent.h" #include "FUiCtrl_PublicTextBlockEvent.h" #include "FUiCtrl_PublicTextEvent.h" #include "FUiCtrl_SearchBarImpl.h" -#include "FUi_CoordinateSystemUtils.h" #include "FUiCtrl_EditFieldImpl.h" #include "FUiCtrl_ButtonImpl.h" @@ -112,7 +112,7 @@ _SearchBarImpl::CreateSearchBarImplN(SearchBar* pControl, const Rectangle& bound r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid."); + "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG)); _SearchBar* pCore = _SearchBar::CreateSearchBarN(); r = GetLastResult(); @@ -132,6 +132,7 @@ _SearchBarImpl::CreateSearchBarImplN(SearchBar* pControl, const Rectangle& bound return pImpl; CATCH: delete pImpl; + SetLastResult(r); return null; } @@ -143,7 +144,7 @@ _SearchBarImpl::CreateSearchBarImplFN(SearchBar* pControl, const FloatRectangle& r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid."); + "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG)); _SearchBar* pCore = _SearchBar::CreateSearchBarN(); r = GetLastResult(); @@ -163,6 +164,7 @@ _SearchBarImpl::CreateSearchBarImplFN(SearchBar* pControl, const FloatRectangle& return pImpl; CATCH: delete pImpl; + SetLastResult(r); return null; } @@ -260,78 +262,78 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction } __pEditField = new (std::nothrow) EditField(); - SysTryReturnResult(NID_UI_CTRL, __pEditField, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory."); + SysTryReturnResult(NID_UI_CTRL, __pEditField != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pEditField->Construct(GetBoundsF(), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, EDIT_FIELD_TITLE_STYLE_NONE, true); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pEditField->AddFocusEventListener(*this); - SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); __pEditField->AddKeyEventListener(*this); - SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); __pEditFieldImpl = _EditFieldImpl::GetInstance(*__pEditField); SysTryReturnResult(NID_UI_CTRL, __pEditFieldImpl != null, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to EditFieldImpl instance"); + "A system error has occurred. Failed to get _EditFieldImpl instance."); String cancelButtonText; GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelButtonText); __pButton = new (std::nothrow) Button(); - SysTryReturnResult(NID_UI_CTRL, __pButton, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory."); + SysTryReturnResult(NID_UI_CTRL, __pButton != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pButton->Construct(GetBoundsF(), cancelButtonText); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pButton->AddFocusEventListener(*this); - SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); __pButtonImpl = _ButtonImpl::GetInstance(*__pButton); SysTryReturnResult(NID_UI_CTRL, __pButtonImpl != null, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to ButtonImpl instance"); + "A system error has occurred. Failed to get _ButtonImpl instance."); r = __pSearchBar->Initialize(enableSearchBarButton, coreKeypadAction); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddActionEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddKeypadEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddTextBlockEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddTextEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicSearchBarEvent = _PublicSearchBarEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddSearchBarEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic()); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); r = __pSearchBar->AddLanguageEventListener(*this); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -357,16 +359,28 @@ _SearchBarImpl::SetContent(const Control* pContent) ClearLastResult(); result r = E_SUCCESS; + if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat()) + { + if (__pContentControl) + { + _Control& control = _ControlImpl::GetInstance(*__pContentControl)->GetCore(); + __pSearchBar->DetachContent(&control); + __pContentControl->Destroy(); + } + } + else + { + __pSearchBar->DetachContent(null); + } + __pContentControl = null; + if (pContent != null) { const _Control& content = _ControlImpl::GetInstance(*pContent)->GetCore(); bool isContentAttachable = __pSearchBar->IsContentAttachable(&content); SysTryReturn(NID_UI_CTRL, isContentAttachable, E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The content cannot be set."); - } + "[%s] Invalid argument(s) is used. The content cannot be set.", GetErrorMessage(E_INVALID_ARG)); - if (pContent != null && __pContentControl == null) - { __pContentControl = const_cast (pContent); _Control& control = _ControlImpl::GetInstance(*__pContentControl)->GetCore(); @@ -683,7 +697,7 @@ _SearchBarImpl::Clear(void) r = __pSearchBar->Clear(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to clear the text."); + "A system error has occurred. Failed to clear the text."); return r; } @@ -807,7 +821,7 @@ _SearchBarImpl::RemoveTextBlock(void) ClearLastResult(); result r = __pSearchBar->RemoveTextBlock(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Unable to remove the text block."); + "[%s] A system error has occurred. Unable to remove the text block.", GetErrorMessage(E_SYSTEM)); return r; } @@ -1064,8 +1078,8 @@ _SearchBarImpl::AddActionEventListener(IActionEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicActionEvent->AddListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, @@ -1078,7 +1092,7 @@ _SearchBarImpl::RemoveActionEventListener(IActionEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); result r = __pPublicActionEvent->RemoveListener(listener); @@ -1092,8 +1106,8 @@ _SearchBarImpl::AddKeypadEventListener(IKeypadEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicKeypadEvent->AddListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, @@ -1107,8 +1121,8 @@ _SearchBarImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicKeypadEvent->RemoveListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, @@ -1122,8 +1136,8 @@ _SearchBarImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicTextBlockEvent->AddListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, @@ -1137,8 +1151,8 @@ _SearchBarImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicTextBlockEvent->RemoveListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, @@ -1153,8 +1167,8 @@ _SearchBarImpl::AddTextEventListener(ITextEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicTextEvent->AddListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, @@ -1168,8 +1182,8 @@ _SearchBarImpl::RemoveTextEventListener(ITextEventListener& listener) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicTextEvent->RemoveListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, @@ -1183,8 +1197,8 @@ _SearchBarImpl::AddSearchBarEventListener(const ISearchBarEventListener& listene { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicSearchBarEvent->AddListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, @@ -1198,8 +1212,8 @@ _SearchBarImpl::RemoveSearchBarEventListener(const ISearchBarEventListener& list { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); result r = __pPublicSearchBarEvent->RemoveListener(listener); SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, @@ -1253,7 +1267,7 @@ _SearchBarImpl::OnActionPerformed(const _Control& source, int actionId) { IEventArg* pEventArg = _PublicActionEvent::CreateActionEventArgN(actionId); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicActionEvent->Fire(*pEventArg); } @@ -1270,7 +1284,7 @@ _SearchBarImpl::OnKeypadWillOpen(void) IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CREATED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent->Fire(*pEventArg); } @@ -1287,7 +1301,7 @@ _SearchBarImpl::OnKeypadOpened(void) IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_OPEN); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent->Fire(*pEventArg); } @@ -1305,7 +1319,7 @@ _SearchBarImpl::OnKeypadClosed(void) IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CLOSE); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent->Fire(*pEventArg); } @@ -1322,7 +1336,7 @@ _SearchBarImpl::OnKeypadBoundsChanged(void) IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent->Fire(*pEventArg); } @@ -1341,7 +1355,7 @@ _SearchBarImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( GetPublic(), publicKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicKeypadEvent->Fire(*pEventArg); } @@ -1357,7 +1371,7 @@ _SearchBarImpl::OnTextBlockSelected(_Control& source, int start, int end) { IEventArg* pEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextBlockEvent->Fire(*pEventArg); } @@ -1373,7 +1387,7 @@ _SearchBarImpl::OnTextValueChanged(const _Control& source) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextEvent->Fire(*pEventArg); } @@ -1389,7 +1403,7 @@ _SearchBarImpl::OnTextValueChangeCanceled(const _Control& source) { IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicTextEvent->Fire(*pEventArg); } @@ -1418,7 +1432,7 @@ _SearchBarImpl::OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode) { IEventArg* pEventArg = _PublicSearchBarEvent::CreateSearchBarEventArgN(SEARCH_BAR_EVENT_MODE_CHANGE); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicSearchBarEvent->Fire(*pEventArg); } @@ -1432,7 +1446,7 @@ _SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLang { IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); result r = GetLastResult(); - SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); __pPublicLanguageEvent->Fire(*pKLanguageEventArg); } @@ -1449,7 +1463,7 @@ _SearchBarImpl::OnFocusEventListenerAdded(IFocusEventListener& listener) ClearLastResult(); SysTryReturnVoidResult(NID_UI, __pPublicFocusEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to add listener."); + "[E_SYSTEM] A system error has occurred. Failed to add listener."); } void @@ -1458,7 +1472,7 @@ _SearchBarImpl::OnFocusEventListenerRemoved(IFocusEventListener& listener) ClearLastResult(); SysTryReturnVoidResult(NID_UI, __pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, - "[E_SYSTEM] A system error has occured. Failed to remove listener."); + "[E_SYSTEM] A system error has occurred. Failed to remove listener."); } void @@ -1480,7 +1494,7 @@ _SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source) IFocusEventListener* pFocusEventListener = dynamic_cast (pListener); - if (pFocusEventListener != null ) + if (pFocusEventListener != null) { pFocusEventListener->OnFocusGained(GetPublic()); } @@ -1510,7 +1524,7 @@ _SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source) IFocusEventListener* pFocusEventListener = dynamic_cast (pListener); - if (pFocusEventListener != null ) + if (pFocusEventListener != null) { pFocusEventListener->OnFocusLost(GetPublic()); } @@ -1535,7 +1549,7 @@ _SearchBarImpl::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCod IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); - if (pKeyEventListener != null ) + if (pKeyEventListener != null) { pKeyEventListener->OnKeyPressed(GetPublic(), keyCode); } @@ -1560,7 +1574,7 @@ _SearchBarImpl::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCo IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); - if (pKeyEventListener != null ) + if (pKeyEventListener != null) { pKeyEventListener->OnKeyReleased(GetPublic(), keyCode); } @@ -1585,7 +1599,7 @@ _SearchBarImpl::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::Ke IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); - if (pKeyEventListener != null ) + if (pKeyEventListener != null) { pKeyEventListener->OnKeyLongPressed(GetPublic(), keyCode); } @@ -1701,7 +1715,7 @@ protected: return null; } - pSearchBar = new (std::nothrow) SearchBar; + pSearchBar = new (std::nothrow) SearchBar(); if (pSearchBar == null) { return null; diff --git a/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp index 01a0588..859cda1 100644 --- a/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp @@ -24,6 +24,7 @@ #include #include #include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" #include "FUiAnim_VisualElement.h" #include "FUiCtrl_Edit.h" #include "FUiCtrl_Form.h" @@ -31,7 +32,6 @@ #include "FUiCtrl_SearchBarModel.h" #include "FUiCtrl_SearchBarPresenter.h" #include "FUiCtrl_Toolbar.h" -#include "FUi_CoordinateSystemUtils.h" using namespace Tizen::Graphics; using namespace Tizen::Ui::Animations; @@ -51,7 +51,6 @@ _SearchBarPresenter::_SearchBarPresenter(void) , __pReplacedSearchFieldNormalBitmap(null) , __pReplacedSearchFieldDisabledBitmap(null) , __pReplacedSearchBarBitmap(null) - , __pSearchBarBitmap(null) , __pSearchFieldEffectBitmap(null) , __pSearchBarEffectBitmap(null) , __currentBgColor(Color()) @@ -73,9 +72,6 @@ _SearchBarPresenter::~_SearchBarPresenter(void) delete __pReplacedSearchBarBitmap; __pReplacedSearchBarBitmap = null; - delete __pSearchBarBitmap; - __pSearchBarBitmap = null; - delete __pSearchFieldEffectBitmap; __pSearchFieldEffectBitmap = null; @@ -90,31 +86,31 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar) _VisualElement* pSearchBarElement = null; __pSearchBar = const_cast <_SearchBar*>(&searchBar); - SysTryReturn(NID_UI_CTRL, __pSearchBar, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The searchbar instance is null."); + SysTryReturn(NID_UI_CTRL, __pSearchBar != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Searchbar instance is null.", GetErrorMessage(E_SYSTEM)); __pCancelButton = __pSearchBar->GetSearchBarButton(); - SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); + SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM)); __pEdit = __pSearchBar->GetSearchField(); - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The edit instance is null."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); __pContainer = __pSearchBar->GetSearchBarContainer(); - SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM, - " [E_SYSTEM] A system error has occurred. Failed to get the content."); + SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM, + " [%s] A system error has occurred. Failed to get the content.", GetErrorMessage(E_SYSTEM)); r = LoadSearchBarBitmaps(); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); _VisualElement* pEditElement = __pEdit->GetVisualElement(); SysTryReturn(NID_UI_CTRL, pEditElement, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to get edit visual element."); + "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM)); __pIconElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pIconElement, , E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pIconElement != null, , E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pIconElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -131,7 +127,7 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar) pSearchBarElement = __pSearchBar->GetVisualElement(); SysTryCatch(NID_UI_CTRL, pSearchBarElement, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to get searchbar's visual element."); + "[%s] A system error has occurred. Failed to get searchbar's visual element.", GetErrorMessage(E_SYSTEM)); return r; @@ -150,62 +146,37 @@ _SearchBarPresenter::LoadSearchBarBitmaps() { result r = E_SUCCESS; Color searchFieldIconColor; - Bitmap* pSearchFieldBitmap; - - r = GET_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchBarBitmap); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchBarEffectBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r,"Propagating."); __currentBgColor = __pSearchBar->GetColor(); - __pReplacedSearchBarBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pSearchBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor); - SysTryCatch(NID_UI_CTRL, __pReplacedSearchBarBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", - GetErrorMessage(GetLastResult())); - - r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchFieldBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pReplacedSearchBarBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchFieldEffectBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r)); GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_NORMAL, searchFieldIconColor); - __pReplacedSearchFieldNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchFieldBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchFieldIconColor); - SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldNormalBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", - GetErrorMessage(GetLastResult())); - - delete pSearchFieldBitmap; - pSearchFieldBitmap = null; - - r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchFieldBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldNormalBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r)); GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_DISABLED, searchFieldIconColor); - __pReplacedSearchFieldDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchFieldBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchFieldIconColor); - SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldDisabledBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", - GetErrorMessage(GetLastResult())); - - delete pSearchFieldBitmap; - pSearchFieldBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldDisabledBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r)); return r; CATCH: - delete __pSearchBarBitmap; - __pSearchBarBitmap = null; - delete __pSearchBarEffectBitmap; __pSearchBarEffectBitmap = null; delete __pReplacedSearchBarBitmap; __pReplacedSearchBarBitmap = null; - delete pSearchFieldBitmap; - pSearchFieldBitmap = null; - delete __pSearchFieldEffectBitmap; __pSearchFieldEffectBitmap = null; @@ -220,12 +191,12 @@ _SearchBarPresenter::Install(void) { result r = E_SUCCESS; - _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel; - SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel(); + SysTryReturn(NID_UI_CTRL, pModel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pModel->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The searchbar model construction failed."); + "[%s] A system error has occurred. The searchbar model construction failed.", GetErrorMessage(E_SYSTEM)); __pSearchBarModel = pModel; @@ -241,7 +212,7 @@ _SearchBarPresenter::UpdateContentArea(bool invalidate) { SearchBarMode mode = __pSearchBarModel->GetMode(); SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_OPERATION, E_INVALID_OPERATION, - "[E_INVALID_OPERATION] The searchbar mode cannot be updated."); + "[%s] The searchbar mode cannot be updated.", GetErrorMessage(E_INVALID_OPERATION)); __pSearchBar->Invalidate(invalidate); @@ -276,7 +247,7 @@ result _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."); + "[%s] The searchbar mode is locked.", GetErrorMessage(E_INVALID_OPERATION)); if (GetMode() == mode) { @@ -287,7 +258,7 @@ _SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp) 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."); + "[%s] A system error has occurred. Failed to change the mode of searchbar.", GetErrorMessage(E_SYSTEM)); return r; } @@ -323,7 +294,7 @@ _SearchBarPresenter::Draw(void) imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName(); } - if(!imagePath.IsEmpty()) + if (!imagePath.IsEmpty()) { __pSearchBar->GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); __pSearchBar->GetVisualElement()->SetImageSource(imagePath); @@ -335,7 +306,7 @@ _SearchBarPresenter::Draw(void) __lazyDecode = false; Canvas* pCanvas = __pSearchBar->GetCanvasN(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); pCanvas->SetBackgroundColor(bgColor); pCanvas->Clear(); @@ -374,9 +345,8 @@ _SearchBarPresenter::DrawSearchBarDefaultBitmap(void) delete __pReplacedSearchBarBitmap; __pReplacedSearchBarBitmap = null; - __pReplacedSearchBarBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pSearchBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (__pReplacedSearchBarBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pReplacedSearchBarBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); __currentBgColor = bgColor; } @@ -449,10 +419,10 @@ _SearchBarPresenter::SetContainerVisible(bool visible) result _SearchBarPresenter::DrawIcon(void) { - SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to get edit instance."); - SysTryReturn(NID_UI_CTRL, __pIconElement, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to get edit visual element."); + SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to get _Edit instance.", GetErrorMessage(E_SYSTEM)); + SysTryReturn(NID_UI_CTRL, __pIconElement != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM)); result r = E_SUCCESS; @@ -494,7 +464,7 @@ _SearchBarPresenter::DrawIcon(void) } else { - pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldNormalBitmap); + pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldNormalBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldNormalBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldNormalBitmap); } } } @@ -508,7 +478,7 @@ _SearchBarPresenter::DrawIcon(void) } else { - pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldDisabledBitmap); + pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldDisabledBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldDisabledBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldDisabledBitmap); } } } @@ -521,7 +491,7 @@ _SearchBarPresenter::DrawIcon(void) } else { - pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pSearchFieldEffectBitmap); + pIconCanvas->DrawBitmap(FloatPoint(0.0f, 0.0f), *__pSearchFieldEffectBitmap); } } @@ -541,8 +511,6 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode, bool isCalledByApp) { __pSearchBar->SetFocusCallbackParameter(true); InitializeViewModeLayout(); - SetCancelButtonVisible(false); - SetContainerVisible(false); if (__pEdit != null) { @@ -554,15 +522,18 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode, bool isCalledByApp) } } + SetCancelButtonVisible(false); + SetContainerVisible(false); + r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event."); + "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM)); } else { r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, - "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event."); + "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM)); InitializeInputModeLayout(); SetCancelButtonVisible(true); @@ -743,6 +714,8 @@ _SearchBarPresenter::OnTouchReleased(const _Control& source) { __pEdit->ShowKeypad(); } + + return; } Canvas* @@ -753,7 +726,7 @@ _SearchBarPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) 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."); + SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[%s] A system error has occurred. Failed to get the background bitmap.", GetErrorMessage(E_SYSTEM)); //Decode the bitmap explicitly pBackgroundBitmap->IsNinePatchedBitmap(); diff --git a/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp b/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp index 1acdc41..00789ba 100644 --- a/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp @@ -75,7 +75,7 @@ _SimpleItemImpl::CreateSimpleItemImplN(SimpleItem* pPublic, const FloatDimension result r = E_SUCCESS; _SimpleItemImpl* pImpl = new (std::nothrow) _SimpleItemImpl(pPublic); - SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pImpl->Construct(itemSize, style); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] Unable to construct _SimpleItemImpl."); diff --git a/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp b/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp index 6d77a92..779d7d9 100644 --- a/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp +++ b/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp @@ -1713,7 +1713,7 @@ _SlidableGroupedListImpl::SetAllItemsChecked(int groupIndex, bool check) pGroupObject->__pCheckedList->SetAt(*pChecked, indexItem, true); - _CheckElementModel *pCheckElement = GetCheckElementAt(groupIndex, indexItem); + _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, indexItem); if (pCheckElement) { diff --git a/src/ui/controls/FUiCtrl_SlidableListImpl.cpp b/src/ui/controls/FUiCtrl_SlidableListImpl.cpp index 4795aa1..ceaadd0 100644 --- a/src/ui/controls/FUiCtrl_SlidableListImpl.cpp +++ b/src/ui/controls/FUiCtrl_SlidableListImpl.cpp @@ -347,11 +347,11 @@ _SlidableListImpl::~_SlidableListImpl(void) { if (__pItemProvider && __pItemProvider->firstTime == true) { - _itemsList.RemoveAll(true); + _itemsList.RemoveAll(false); } else { - _itemsList.RemoveAll(false); + _itemsList.RemoveAll(true); } __slidableListenersList.RemoveAll(true); @@ -439,7 +439,7 @@ _SlidableListImpl::UpdateBounds(const Rectangle& rect) void _SlidableListImpl::AddSlidableListEventListener(const ISlidableListEventListener& listener) { - _ListListener* pListenerData = new (std::nothrow) _ListListener; + _ListListener* pListenerData = new (std::nothrow) _ListListener(); SysTryReturnVoidResult(NID_UI_CTRL, pListenerData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pListenerData->pListener = const_cast(&listener); @@ -466,7 +466,7 @@ _SlidableListImpl::RemoveSlidableListEventListener(const ISlidableListEventListe void _SlidableListImpl::AddCustomItemEventListener(const ICustomItemEventListener& listener) { - _ListListener* pListenersList = new (std::nothrow) _ListListener; + _ListListener* pListenersList = new (std::nothrow) _ListListener(); SysTryReturnVoidResult(NID_UI_CTRL, pListenersList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pListenersList->pListener = const_cast(&listener); @@ -710,7 +710,7 @@ _SlidableListImpl::InsertItemAt(int index, const CustomListItem& item, int itemI if (__pCheckedList) { - Boolean *pChecked = new (std::nothrow) Boolean(false); + Boolean* pChecked = new (std::nothrow) Boolean(false); SysTryReturn(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pCheckedList->InsertAt(*pChecked, index); @@ -891,6 +891,11 @@ _SlidableListImpl::SetItemCountAndHeight(int count, int listHeight) r = __pCheckedList->SetCapacity(count); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + for (int itemIndex = prevCount - 1; itemIndex >= count; itemIndex--) + { + __pCheckedList->RemoveAt(itemIndex, true); + } + for (int itemIndex = prevCount; itemIndex < count; itemIndex++) { pChecked = new (std::nothrow) Boolean(false); diff --git a/src/ui/controls/FUiCtrl_Slider.cpp b/src/ui/controls/FUiCtrl_Slider.cpp index 44eb70a..393edc9 100644 --- a/src/ui/controls/FUiCtrl_Slider.cpp +++ b/src/ui/controls/FUiCtrl_Slider.cpp @@ -114,8 +114,8 @@ _Slider::CreateSliderN(void) { result r = E_SUCCESS; - _Slider* pSlider = new (std::nothrow) _Slider; - SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + _Slider* pSlider = new (std::nothrow) _Slider(); + SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pSlider->__pSliderPresenter = _SliderPresenter::CreateInstanceN(*pSlider); r = GetLastResult(); @@ -131,7 +131,7 @@ _Slider::CreateSliderN(void) CATCH: delete pSlider; pSlider = null; - + SetLastResult(r); return null; } @@ -144,28 +144,28 @@ _Slider::Initialize(void) _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __bgColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __barColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __barBgColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::TITLE_TEXT_NORMAL, __titleTextColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, handleRect.width); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, handleRect.height); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - __pHandle = new (std::nothrow) Tizen::Ui::Animations::_VisualElement; - SysTryReturn(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pHandle = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pHandle->Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pHandle->SetBounds(FloatRectangle(handleRect.x, handleRect.y, handleRect.width, handleRect.height)); @@ -176,20 +176,20 @@ _Slider::Initialize(void) r = __pHandle->SetSurfaceOpaque(false); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pHandle->SetImplicitAnimationEnabled(false); r = __pBase->AttachChild(*__pHandle); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pAdjustmentEvent = _AdjustmentEvent::CreateInstanceN(*this); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pAdjustmentEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, __pAdjustmentEvent, r, "Propagating."); __pSliderEvent = _SliderEvent::CreateInstanceN(*this); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, __pSliderEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, __pSliderEvent, r, "Propagating."); InitializeAccessibilityElement(); @@ -210,8 +210,8 @@ _Slider::InitializeAccessibilityElement(void) if (pContainer != null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, + "Memory allocation failed."); __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetLabel(__titleText); __pAccessibilityElement->SetName(L"SliderControl"); @@ -219,7 +219,7 @@ _Slider::InitializeAccessibilityElement(void) __pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); SetAccessibilityElementValue(); r = pContainer->AddElement(*__pAccessibilityElement); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); pContainer->AddListener(*this); } @@ -315,8 +315,11 @@ _Slider::OnDrawFocus(void) bool _Slider::OnFocusGained(const _Control& source) { - __pSliderPresenter->SetFocusMode(true); - Invalidate(); + if (IsFocusModeStateEnabled()) + { + __pSliderPresenter->SetFocusMode(true); + Invalidate(); + } return true; } @@ -349,7 +352,7 @@ _Slider::OnFocusModeStateChanged() { __pSliderPresenter->SetFocusMode(false); - if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed ) + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed) { _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); pSliderOverlay->SetVisibleState(false); @@ -375,7 +378,7 @@ _Slider::IsKeyPressed() const bool _Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { - if(__pSliderPresenter->GetFocusMode() == false) + if (__pSliderPresenter->GetFocusMode() == false) { return false; } @@ -384,7 +387,14 @@ _Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (keyCode == _KEY_RIGHT) { - SetValue(GetValue() + 1); + if (__pSliderPresenter->GetMaxValue() == GetValue()) + { + return false; + } + + __pSliderPresenter->SetValue(GetValue() + 1); + SetAccessibilityElementValue(); + FireSliderMoveEvent(GetValue()); if (GetStyle() & _SLIDER_STYLE_OVERLAY) @@ -401,7 +411,14 @@ _Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (keyCode == _KEY_LEFT) { - SetValue(GetValue() - 1); + if (__pSliderPresenter->GetMinValue() == GetValue()) + { + return false; + } + + __pSliderPresenter->SetValue(GetValue() - 1); + SetAccessibilityElementValue(); + FireSliderMoveEvent(GetValue()); if (GetStyle() & _SLIDER_STYLE_OVERLAY) @@ -422,7 +439,7 @@ _Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _Slider::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) { - if(__pSliderPresenter->GetFocusMode() == false) + if (__pSliderPresenter->GetFocusMode() == false) { return false; } @@ -452,7 +469,6 @@ void _Slider::OnBoundsChanged(void) { __pSliderPresenter->OnBoundsChanged(); - if (__pAccessibilityElement != null) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); @@ -473,18 +489,18 @@ _Slider::SetRange(int minValue, int maxValue) { result r = E_SUCCESS; - SysTryReturn(NID_UI_CTRL, (minValue >= _SLIDER_MINIMUM_VALUE && maxValue >= _SLIDER_MINIMUM_VALUE), - E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The minimum value %d is out of range [-99 to 999].", minValue); - SysTryReturn(NID_UI_CTRL, (minValue <= _SLIDER_MAXIMUM_VALUE && maxValue <= _SLIDER_MAXIMUM_VALUE), - E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The maximum value %d is out of range [-99 to 999].", maxValue); - SysTryReturn(NID_UI_CTRL, (minValue < maxValue), E_INVALID_ARG, E_INVALID_ARG, - "[E_INVALID_ARG] The minimum value is greater than maximum value."); + SysTryReturnResult(NID_UI_CTRL, (minValue >= _SLIDER_MINIMUM_VALUE && maxValue >= _SLIDER_MINIMUM_VALUE), + E_OUT_OF_RANGE, "[The minimum value %d is out of range [-99 to 999].", minValue); + SysTryReturnResult(NID_UI_CTRL, (minValue <= _SLIDER_MAXIMUM_VALUE && maxValue <= _SLIDER_MAXIMUM_VALUE), + E_OUT_OF_RANGE, "The maximum value %d is out of range [-99 to 999].", maxValue); + SysTryReturnResult(NID_UI_CTRL, (minValue < maxValue), E_INVALID_ARG, + "The minimum value is greater than maximum value."); Variant oldMinValue = GetProperty("minValue"); Variant value = GetProperty("value"); r = SetProperty("minValue", Variant(minValue)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set minimum value.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Failed to set minimum value."); r = SetProperty("maxValue", Variant(maxValue)); if (r != E_SUCCESS) @@ -517,7 +533,7 @@ _Slider::SetPropertyMinValue(const Variant& minValue) int tempMinValue = minValue.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pSliderPresenter->SetMinValue(tempMinValue); @@ -531,7 +547,7 @@ _Slider::SetPropertyMaxValue(const Variant& maxValue) int tempMaxValue = maxValue.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating."); __pSliderPresenter->SetMaxValue(tempMaxValue); @@ -545,11 +561,11 @@ _Slider::GetRange(int& minValue, int& maxValue) const Variant minimum = GetProperty("minValue"); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); Variant maximum = GetProperty("maxValue"); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); minValue = minimum.ToInt(); maxValue = maximum.ToInt(); @@ -580,13 +596,18 @@ _Slider::SetPropertyValue(const Variant& value) { result r = E_SUCCESS; + SysTryReturnResult(NID_UI_CTRL, __isKeyPressed == false, E_SYSTEM, "[E_SYSTEM] Failed to set value of slider."); + int tempValue = value.ToInt(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - __pSliderPresenter->SetValue(tempValue); + if (__pSliderPresenter->GetValue() != tempValue) + { + __pSliderPresenter->SetValue(tempValue); - SetAccessibilityElementValue(); + SetAccessibilityElementValue(); + } return r; } @@ -599,10 +620,10 @@ _Slider::SetAccessibilityElementValue() String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); char buffer[10] = {0,}; - sprintf(buffer, "%d", GetValue()); + snprintf(buffer, sizeof(buffer), "%d", GetValue()); string.Replace(L"%1$d", buffer); memset(buffer, 0, 10); - sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue()); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); string.Replace(L"%2$d", buffer); __pAccessibilityElement->SetValue(string); } @@ -638,17 +659,17 @@ _Slider::SetIcon(IconPosition position, const Bitmap& icon) Bitmap* pNewBitmap = null; r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"Propagating."); r = GET_SHAPE_CONFIG(SLIDER::ICON_HEIGHT, orientation, iconHeight); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (position == ICON_POSITION_LEFT) { pNewBitmap = _BitmapImpl::CloneN(icon); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pNewBitmap != null, r, "Propagating."); r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -662,7 +683,7 @@ _Slider::SetIcon(IconPosition position, const Bitmap& icon) pNewBitmap = _BitmapImpl::CloneN(icon); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pNewBitmap != null, r, "Propagating."); r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -717,7 +738,7 @@ _Slider::SetPropertyTitleText(const Variant& titleText) __pSliderPresenter->SetNeedUpdate(); r = InitializeAccessibilityElement(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (__pAccessibilityElement != null) { @@ -758,7 +779,7 @@ _Slider::SetPropertyTitleTextColor(const Variant& titleTextColor) Color tempColor = titleTextColor.ToColor(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __titleTextColor = tempColor; __pSliderPresenter->SetNeedUpdate(); @@ -821,13 +842,11 @@ _Slider::SetPropertyBarColor(const Variant& barColor) Color tempBarColor = barColor.ToColor(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __barColor = tempBarColor; __barColor.SetAlpha(0xFF); - __pSliderPresenter->SetNeedUpdate(); - return r; } @@ -862,13 +881,11 @@ _Slider::SetPropertyBarBackgroundColor(const Variant& barBackgroundColor) Color tempBarBackgroundColor = barBackgroundColor.ToColor(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __barBgColor = tempBarBackgroundColor; __barBgColor.SetAlpha(0xFF); - __pSliderPresenter->SetNeedUpdate(); - return r; } @@ -908,7 +925,7 @@ _Slider::SetPropertyColor(const Variant& color) result r = E_SUCCESS; Color tempBgColor = color.ToColor(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __bgColor = tempBgColor; @@ -998,6 +1015,14 @@ _Slider::OnAncestorEnableStateChanged(const _Control& control) return; } +void +_Slider::OnVisibleStateChanged(void) +{ + __pSliderPresenter->OnVisibleStateChanged(); + + return; +} + bool _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) { @@ -1009,10 +1034,10 @@ _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, c String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); char buffer[10] = {0,}; - sprintf(buffer, "%d", GetValue()); + snprintf(buffer, sizeof(buffer), "%d", GetValue()); string.Replace(L"%1$d", buffer); memset(buffer, 0, 10); - sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue()); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); string.Replace(L"%2$d", buffer); _AccessibilityManager::GetInstance()->ReadContent(string); @@ -1034,10 +1059,10 @@ _Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, c String string; GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); char buffer[10] = {0,}; - sprintf(buffer, "%d", GetValue()); + snprintf(buffer, sizeof(buffer), "%d", GetValue()); string.Replace(L"%1$d", buffer); memset(buffer, 0, 10); - sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue()); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); string.Replace(L"%2$d", buffer); _AccessibilityManager::GetInstance()->ReadContent(string); @@ -1055,7 +1080,7 @@ _Slider::FireSliderMoveEvent(int value) { IEventArg* pEventArg = _SliderEvent::CreateSliderEventArgN(value); - if( pEventArg == null) + if (pEventArg == null) { return; } @@ -1070,7 +1095,7 @@ _Slider::FireAdjustmentValueEvent(int adjustment) if (__pAdjustmentEvent != null) { IEventArg* pEventArg = _AdjustmentEvent::CreateAdjustmentEventArgN(adjustment); - if( pEventArg == null) + if (pEventArg == null) { return; } diff --git a/src/ui/controls/FUiCtrl_SliderEvent.cpp b/src/ui/controls/FUiCtrl_SliderEvent.cpp index 183e17a..61aeba5 100644 --- a/src/ui/controls/FUiCtrl_SliderEvent.cpp +++ b/src/ui/controls/FUiCtrl_SliderEvent.cpp @@ -89,7 +89,7 @@ _SliderEvent* _SliderEvent::CreateInstanceN(const _Slider& source) { _SliderEvent* pSliderEvent = new (std::nothrow) _SliderEvent(source); - SysTryReturn(NID_UI_CTRL, pSliderEvent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pSliderEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); if (IsFailed(GetLastResult())) { @@ -117,12 +117,12 @@ _SliderEvent::FireImpl(IEventListener& listener, const IEventArg& arg) // cast to ISliderEventListener _ISliderEventListener* pSliderListener = dynamic_cast <_ISliderEventListener*>(&listener); SysTryReturnVoidResult(NID_UI_CTRL, pSliderListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The _ISliderEventListener is null"); + "Invalid argument(s) is used. The _ISliderEventListener is null"); // cast to _SliderEventArg const _SliderEventArg* pSliderEventArg = dynamic_cast (&arg); SysTryReturnVoidResult(NID_UI_CTRL, pSliderEventArg != null, E_INVALID_ARG, - "[E_INVALID_ARG] Invalid argument(s) is used. The _SliderEventArg is null"); + "Invalid argument(s) is used. The _SliderEventArg is null"); // call cursor change event listener method pSliderListener->OnSliderBarMoved(*__pSource, pSliderEventArg->GetValue()); @@ -134,7 +134,7 @@ IEventArg* _SliderEvent::CreateSliderEventArgN(int value) { _SliderEventArg* pEventArg = new (std::nothrow) _SliderEventArg(value); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_SliderImpl.cpp b/src/ui/controls/FUiCtrl_SliderImpl.cpp index ab87c43..840fecf 100644 --- a/src/ui/controls/FUiCtrl_SliderImpl.cpp +++ b/src/ui/controls/FUiCtrl_SliderImpl.cpp @@ -81,17 +81,16 @@ _SliderImpl::CreateSliderImplN(Slider* pControl, const Rectangle& rect, int slid SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); _SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore); - r = CheckConstruction(pCore, pImpl); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->InitializeBoundsProperties(FUNC_SIZE_INFO(Slider)(sliderStyle), rect, pCore->GetOrientation()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pImpl->__pPublicAdjustmentEvent = _PublicAdjustmentEvent::CreateInstanceN(*pControl); - SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct an AdjustmentEvent instance"); + SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct an AdjustmentEvent instance"); pImpl->__pPublicSliderEvent = _PublicSliderEvent::CreateInstanceN(*pControl); - SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct a SliderEvent instance"); + SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct a SliderEvent instance"); r = pCore->AddAdjustmentEventListener(*pImpl); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -123,17 +122,16 @@ _SliderImpl::CreateSliderImplFN(Slider* pControl, const FloatRectangle& rect, in SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); _SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore); - r = CheckConstruction(pCore, pImpl); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->InitializeBoundsPropertiesF(FUNC_SIZE_INFO(Slider)(sliderStyle), rect, pCore->GetOrientation()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); pImpl->__pPublicAdjustmentEvent = _PublicAdjustmentEvent::CreateInstanceN(*pControl); - SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct an AdjustmentEvent instance"); + SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct an AdjustmentEvent instance"); pImpl->__pPublicSliderEvent = _PublicSliderEvent::CreateInstanceN(*pControl); - SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct a SliderEvent instance"); + SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct a SliderEvent instance"); r = pCore->AddAdjustmentEventListener(*pImpl); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -166,8 +164,8 @@ _SliderImpl::Initialize(int minValue, int maxValue, BackgroundStyle bgStyle, int if (bgStyle == BACKGROUND_STYLE_NONE) { - SysTryReturn(NID_UI_CTRL, groupStyle == GROUP_STYLE_NONE, E_INVALID_OPERATION, E_INVALID_OPERATION, - "[E_INVALID_OPERATION] The current Slider style does not support given group style."); + SysTryReturnResult(NID_UI_CTRL, groupStyle == GROUP_STYLE_NONE, E_INVALID_OPERATION, + "The current Slider style does not support given group style."); style |= _SLIDER_STYLE_NO_BG; } @@ -177,7 +175,10 @@ _SliderImpl::Initialize(int minValue, int maxValue, BackgroundStyle bgStyle, int } r = SetRange(minValue, maxValue); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = SetValue(minValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); GetCore().SetStyle(style); GetCore().SetGroupStyle(groupStyle); @@ -479,11 +480,9 @@ protected: return null; } - pSlider = new (std::nothrow) Slider; - if (pSlider == null) - { - return null; - } + pSlider = new (std::nothrow) Slider(); + SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + rect = pControlProperty->GetRectF(); if (pControl->GetElement(L"backgroundStyle", elementString) || pControl->GetElement(L"BackgroundStyle", elementString)) diff --git a/src/ui/controls/FUiCtrl_SliderOverlay.cpp b/src/ui/controls/FUiCtrl_SliderOverlay.cpp index 4e3ade5..16af62e 100644 --- a/src/ui/controls/FUiCtrl_SliderOverlay.cpp +++ b/src/ui/controls/FUiCtrl_SliderOverlay.cpp @@ -105,28 +105,15 @@ _SliderOverlay::LoadBitmaps() { result r = E_SUCCESS; - Bitmap* pBitmap = null; Bitmap* pReplacementBitmap = null; - r = GET_BITMAP_CONFIG_N(SLIDER::OVERLAY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::OVERLAY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __overlayBgColor, pReplacementBitmap); - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __overlayBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); delete __pOverlayBgBitmap; __pOverlayBgBitmap = pReplacementBitmap; - delete pBitmap; - pBitmap = null; - - return r; - -CATCH: - delete pBitmap; - pBitmap = null; - return r; } @@ -179,15 +166,8 @@ _SliderOverlay::DrawSliderOverlay(int positionX, int handleWidth, int value) __pFont->GetTextExtent(text, text.GetLength(), textDim); - if (text.GetLength() == SLIDER_OVERLAY_SINGLE_DIGIT) - { - r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_WIDTH, orientation, overlayWidth); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - } - else - { - overlayWidth = 2 * overlayLeftMargin + textDim.width; - } + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_WIDTH, orientation, overlayWidth); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); if (__sliderTouchRect.y > 0) { diff --git a/src/ui/controls/FUiCtrl_SliderPresenter.cpp b/src/ui/controls/FUiCtrl_SliderPresenter.cpp index 64aeb0d..dde5b59 100644 --- a/src/ui/controls/FUiCtrl_SliderPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SliderPresenter.cpp @@ -49,11 +49,6 @@ _SliderPresenter::_SliderPresenter(void) : __pSlider(null) , __pSliderModel(null) , __pSliderOverlay(null) - , __pSlideTimer(null) - , __pResourceBgTopBitmap(null) - , __pResourceBgMiddleBitmap(null) - , __pResourceBgBottomBitmap(null) - , __pResourceBgSingleBitmap(null) , __pBgTopBitmap(null) , __pBgMiddleBitmap(null) , __pBgBottomBitmap(null) @@ -63,8 +58,6 @@ _SliderPresenter::_SliderPresenter(void) , __pBgMiddleEffectBitmap(null) , __pBgBottomEffectBitmap(null) , __pBgSingleEffectBitmap(null) - , __pResourceBarBitmap(null) - , __pResourceBarBgBitmap(null) , __pBarResourceEffectBitmap(null) , __pBarBgResourceEffectBitmap(null) , __pBarColorReplacementBitmap(null) @@ -82,8 +75,8 @@ _SliderPresenter::_SliderPresenter(void) , __currentBgColor(0) , __pFont(null) , __pTitleTextObject(null) + , __pHandleTextObject(null) , __handleX(0) - , __prevSliderValue(0) , __handleOffset(0) , __isSliderPressed(false) , __isSetValue(true) @@ -96,8 +89,6 @@ _SliderPresenter::_SliderPresenter(void) , __groupStyle(GROUP_STYLE_NONE) , __fontSize(0.0f) , __barOffset(0.0f) - , __isTimerRunning(false) - , __currentPosition(0.0f, 0.0f) { } @@ -109,25 +100,6 @@ _SliderPresenter::~_SliderPresenter(void) delete __pSliderOverlay; __pSliderOverlay = null; - if (__pSlideTimer != null) - { - __pSlideTimer->Cancel(); - delete __pSlideTimer; - __pSlideTimer = null; - } - - delete __pResourceBgTopBitmap; - __pResourceBgTopBitmap = null; - - delete __pResourceBgMiddleBitmap; - __pResourceBgMiddleBitmap = null; - - delete __pResourceBgBottomBitmap; - __pResourceBgBottomBitmap = null; - - delete __pResourceBgSingleBitmap; - __pResourceBgSingleBitmap = null; - delete __pBgTopBitmap; __pBgTopBitmap = null; @@ -155,12 +127,6 @@ _SliderPresenter::~_SliderPresenter(void) delete __pBgSingleEffectBitmap; __pBgSingleEffectBitmap = null; - delete __pResourceBarBitmap; - __pResourceBarBitmap = null; - - delete __pResourceBarBgBitmap; - __pResourceBarBgBitmap = null; - delete __pBarResourceEffectBitmap; __pBarResourceEffectBitmap = null; @@ -200,6 +166,9 @@ _SliderPresenter::~_SliderPresenter(void) delete __pTitleTextObject; __pTitleTextObject = null; + delete __pHandleTextObject; + __pHandleTextObject = null; + } _SliderPresenter* @@ -207,34 +176,37 @@ _SliderPresenter::CreateInstanceN(const _Slider& slider) { result r = E_SUCCESS; - _SliderPresenter* pSliderPresenter = new (std::nothrow) _SliderPresenter; + _SliderPresenter* pSliderPresenter = new (std::nothrow) _SliderPresenter(); SysTryReturn(NID_UI_CTRL, pSliderPresenter != null, null, E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pSliderPresenter->__pSlider = const_cast <_Slider*>(&slider); SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSlider != null, , E_SYSTEM, - "[E_SYSTEM] A system error has occurred. The Slider control core is null."); + "A system error has occurred. The Slider control core is null."); - pSliderPresenter->__pSliderModel = new (std::nothrow) _SliderModel; + pSliderPresenter->__pSliderModel = new (std::nothrow) _SliderModel(); SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderModel != null, , E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "Memory allocation failed."); if (pSliderPresenter->__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) { - pSliderPresenter->__pSliderOverlay = new (std::nothrow) _SliderOverlay; + pSliderPresenter->__pSliderOverlay = new (std::nothrow) _SliderOverlay(); SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderOverlay != null, , E_OUT_OF_MEMORY, - "[E_OUT_OF_MEMORY] Memory allocation failed."); + "Memory allocation failed."); r = pSliderPresenter->__pSliderOverlay->Construct(*pSliderPresenter->__pSlider); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } + r = pSliderPresenter->LoadBitmap(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + return pSliderPresenter; CATCH: delete pSliderPresenter; pSliderPresenter = null; - + SetLastResult(r); return null; } @@ -255,51 +227,52 @@ _SliderPresenter::Resize(void) float titleHeight = 0.0f; FloatRectangle titleTextBounds; + int minValue = 0; + int maxValue = 0; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); if (!__isResourceLoaded) { - r = LoadBitmap(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); __isResourceLoaded = true; r = GET_SHAPE_CONFIG(SLIDER::HANDLE_ONE_DIGIT_TEXT_SIZE, orientation, __fontSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pFont = __pSlider->GetFallbackFont(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_NORMAL, __handleTextColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_DISABLED, __handleTextDisabledColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_PRESSED, __handleTextPressedColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED, __handleTextHighlightedColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } r = GET_SHAPE_CONFIG(SLIDER::BAR_HEIGHT, orientation, barHeight); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::BAR_OFFSET, orientation, __barOffset); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (!__isCustomHandle) { r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, __handleRect.width); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, __handleRect.height); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __handleOffset = __handleRect.width / 2; } @@ -307,23 +280,23 @@ _SliderPresenter::Resize(void) __rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height); r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if ((__pSlider->GetIcon(ICON_POSITION_LEFT) != null) || (__pSlider->GetIcon(ICON_POSITION_RIGHT) != null)) { r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITH_ICON, orientation, minimumWidth); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::ICON_LEFT_MARGIN, orientation, barLeftMargin); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITHOUT_ICON, orientation, minimumWidth); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_SHAPE_CONFIG(SLIDER::BAR_LEFT_MARGIN, orientation, barLeftMargin); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } barRightMargin = barLeftMargin; @@ -334,12 +307,12 @@ _SliderPresenter::Resize(void) } r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_HEIGHT, orientation, minimumHeight); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (__pSlider->GetStyle() & _SLIDER_STYLE_TITLE_TEXT) { r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_HEIGHT, orientation, titleHeight); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); minimumHeight = minimumHeight + titleHeight; } @@ -354,12 +327,12 @@ _SliderPresenter::Resize(void) titleTextBounds = GetTitleTextBounds(); sliderY = titleTextBounds.y + titleTextBounds.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); + __rect.width - (barLeftMargin + barRightMargin) + (2.0f * __handleOffset) - (2.0 * __barOffset), __handleRect.height); } else { __touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, (__rect.height - __handleRect.height) / 2.0f, - (__rect.width - (barLeftMargin + barRightMargin ) - ( 2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height); + (__rect.width - (barLeftMargin + barRightMargin ) - (2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height); } if (__pSlider->GetIcon(ICON_POSITION_LEFT) != null) @@ -376,9 +349,13 @@ _SliderPresenter::Resize(void) __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(); + FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(true); __pSliderOverlay->SetSliderRect(absBounds, __touchRect); + minValue = __pSliderModel->GetMinValue(); + maxValue = __pSliderModel->GetMaxValue(); + __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); + return r; } @@ -388,10 +365,6 @@ _SliderPresenter::LoadBitmap(void) result r = E_SUCCESS; int opacity = 0; - Bitmap* pNormalBitmap = null; - Bitmap* pPressedBitmap = null; - Bitmap* pDisabledBitmap = null; - Bitmap* pHighlightedBitmap = null; Bitmap* pReplacementBitmap = null; Color handleNormalColor; Color handlePressedColor; @@ -399,74 +372,57 @@ _SliderPresenter::LoadBitmap(void) Color handleHighlightedColor; r = GET_COLOR_CONFIG(SLIDER::BG_OTHERS_NORMAL, __currentBgColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __currentGrpStyleNoneColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __currentBarColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __currentBarBgColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_NORMAL, handleNormalColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_PRESSED, handlePressedColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_DISABLED, handleDisabledColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_HIGHLIGHTED, handleHighlightedColor); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); // for GROUP_STYLE_TOP - r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgTopBitmap); - SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); - - __pBgTopBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgTopBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgTopBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgTopEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // for GROUP_STYLE_MIDDLE - r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgMiddleBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgMiddleBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pBgMiddleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgMiddleBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgMiddleEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // for GROUP_STYLE_BOTTOM - r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgBottomBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pBgBottomBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgBottomBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgBottomBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgBottomEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // for GROUP_STYLE_SINGLE and GROUP_STYLE_NONE - r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgSingleBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgSingleBitmap); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pBgSingleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pBgGrpStyleNoneBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentGrpStyleNoneColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentGrpStyleNoneColor, __pBgGrpStyleNoneBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -489,18 +445,10 @@ _SliderPresenter::LoadBitmap(void) // Bar Resources - r = GET_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBgBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pBarBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBarBgColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBarBgColor, __pBarBgColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - - __pBarColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBarColor); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBarColor, __pBarColorReplacementBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(SLIDER::BAR_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarBgResourceEffectBitmap); @@ -513,50 +461,36 @@ _SliderPresenter::LoadBitmap(void) __pBarColorReplacementBitmap->SetAlphaConstant(opacity); // Handle Resources - r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); if (__pHandleNormalBitmap == null) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleNormalColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, handleNormalColor, pReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); __pHandleNormalBitmap = pReplacementBitmap; } - r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); if (__pHandlePressedBitmap == null) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handlePressedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, handlePressedColor, pReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); __pHandlePressedBitmap = pReplacementBitmap; } - r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pHandleDisabledBitmap == null) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleDisabledColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, handleDisabledColor, pReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); __pHandleDisabledBitmap = pReplacementBitmap; } - r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBitmap); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - if (__pHandleHighlightedBitmap == null) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleHighlightedColor); - r = GetLastResult(); - SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, handleHighlightedColor, pReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); __pHandleHighlightedBitmap = pReplacementBitmap; } @@ -585,32 +519,17 @@ _SliderPresenter::LoadBitmap(void) SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - delete pNormalBitmap; - delete pPressedBitmap; - delete pDisabledBitmap; - delete pHighlightedBitmap; + __pHandleTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI_CTRL, __pHandleTextObject != null, , E_OUT_OF_MEMORY, "Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pHandleTextObject->Construct(); + __pHandleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pHandleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); return r; CATCH: - delete pNormalBitmap; - delete pPressedBitmap; - delete pDisabledBitmap; - delete pHighlightedBitmap; - - delete __pResourceBgTopBitmap; - __pResourceBgTopBitmap = null; - - delete __pResourceBgMiddleBitmap; - __pResourceBgMiddleBitmap = null; - - delete __pResourceBgBottomBitmap; - __pResourceBgBottomBitmap = null; - - delete __pResourceBgSingleBitmap; - __pResourceBgSingleBitmap = null; - delete __pBgTopBitmap; __pBgTopBitmap = null; @@ -638,12 +557,6 @@ CATCH: delete __pBgSingleEffectBitmap; __pBgSingleEffectBitmap = null; - delete __pResourceBarBitmap; - __pResourceBarBitmap = null; - - delete __pResourceBarBgBitmap; - __pResourceBarBgBitmap = null; - delete __pBarResourceEffectBitmap; __pBarResourceEffectBitmap = null; @@ -680,6 +593,9 @@ CATCH: delete __pHandleHighlightedEffectBitmap; __pHandleHighlightedEffectBitmap = null; + delete __pHandleTextObject; + __pHandleTextObject = null; + return r; } @@ -711,12 +627,12 @@ _SliderPresenter::CalculateSliderValue(float positionX, float offsetX) __handleRect.x = __touchRect.x + __handleX; __handleRect.y = __touchRect.y; - if (__handleRect.x < __touchRect.x ) + if (__handleRect.x < __touchRect.x) { __handleRect.x = __touchRect.x; } - if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width ) + if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width) { __handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width; } @@ -730,7 +646,6 @@ _SliderPresenter::Draw(void) if (__isNeedToBeUpdated) { Resize(); - __isNeedToBeUpdated = false; } return DrawSlider(); @@ -746,10 +661,13 @@ _SliderPresenter::DrawSlider(void) int style = __pSlider->GetStyle(); Canvas* pCanvas = __pSlider->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "System error occurred."); - r = DrawBackground(*pCanvas); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + if (__isNeedToBeUpdated) + { + r = DrawBackground(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } if (style & _SLIDER_STYLE_TITLE_TEXT) { @@ -782,14 +700,19 @@ _SliderPresenter::DrawSlider(void) } } - if (style & _SLIDER_STYLE_TITLE_TEXT) + if (__isNeedToBeUpdated) { - r = DrawTitleText(*pCanvas); + if (style & _SLIDER_STYLE_TITLE_TEXT) + { + r = DrawTitleText(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = DrawIcon(*pCanvas); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - } - r = DrawIcon(*pCanvas); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + __isNeedToBeUpdated = false; + } delete pCanvas; pCanvas = null; @@ -829,8 +752,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } else { - pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgTopBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap); if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); @@ -859,8 +781,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } else { - pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgMiddleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap); if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); @@ -889,8 +810,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } else { - pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgBottomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap); if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); @@ -919,8 +839,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } else { - pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap); if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); @@ -950,8 +869,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } else { - pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor()); - r = GetLastResult(); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap); if (pBgGroupBitmap == null) { SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r)); @@ -973,7 +891,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) } DrawBitmap(canvas, __rect, pBgBitmap); - if ( __groupStyle != GROUP_STYLE_NONE) + if (__groupStyle != GROUP_STYLE_NONE) { if (!isCustomBitmap) { @@ -1065,12 +983,12 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) __handleRect.x = __touchRect.x + __handleX; __handleRect.y = __touchRect.y; - if (__handleRect.x < __touchRect.x ) + if (__handleRect.x < __touchRect.x) { __handleRect.x = __touchRect.x; } - if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width ) + if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width) { __handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width; } @@ -1079,9 +997,8 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) if (__pSlider->GetBarBackgroundColor() != __currentBarBgColor) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetBarBackgroundColor()); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pReplacementBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetBarBackgroundColor(), pReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, (pReplacementBitmap != null), r, "Propagating."); delete __pBarBgColorReplacementBitmap; __pBarBgColorReplacementBitmap = null; @@ -1092,9 +1009,8 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) if (__pSlider->GetBarColor() != __currentBarColor) { - pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetBarColor()); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, (pReplacementBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetBarColor(), pReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, (pReplacementBitmap != null), r, "Propagating."); delete __pBarColorReplacementBitmap; __pBarColorReplacementBitmap = null; @@ -1135,7 +1051,7 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN(); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pHandleCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, pHandleCanvas != null, r, "Propagating."); pHandleCanvas->SetBackgroundColor(0x00000000); pHandleCanvas->Clear(); @@ -1158,13 +1074,13 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas) if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHandleBitmap)) { // to clip the center portion of the larger bitmap. - if( bitmapWidth > __handleRect.width ) + if(bitmapWidth > __handleRect.width) { bitmapPositionX = (bitmapWidth / 2.0f) - (__handleRect.width / 2.0f); bitmapWidth = __handleRect.width; } - if( bitmapHeight > __handleRect.height ) + if(bitmapHeight > __handleRect.height) { bitmapPositionY = (bitmapHeight / 2.0f) - (__handleRect.height / 2.0f); bitmapHeight = __handleRect.height; @@ -1221,9 +1137,14 @@ _SliderPresenter::DrawSliderBarNumber(int value) int handleNumberSize = 0; Color textColor; String text; + TextSimple* pSimpleText = null; int valueLength = 0; _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pHandleCanvas != null, r, "Propagating."); + if (!__pSlider->IsEnabled()) // disabled { textColor = __handleTextDisabledColor; @@ -1241,46 +1162,53 @@ _SliderPresenter::DrawSliderBarNumber(int value) textColor = __handleTextColor; } - FloatDimension textDim(0.0f, 0.0f); text.Append(value); valueLength = text.GetLength(); + pSimpleText = new (std::nothrow) TextSimple(const_cast(text.GetPointer()), valueLength); + + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f)); + if (valueLength == SLIDER_HANDLE_THREE_DIGIT) { r = GET_SHAPE_CONFIG(SLIDER::HANDLE_THREE_DIGIT_TEXT_SIZE, orientation, handleNumberSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } else if (valueLength == SLIDER_HANDLE_TWO_DIGIT) { r = GET_SHAPE_CONFIG(SLIDER::HANDLE_TWO_DIGIT_TEXT_SIZE, orientation, handleNumberSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } else { r = GET_SHAPE_CONFIG(SLIDER::HANDLE_ONE_DIGIT_TEXT_SIZE, orientation, handleNumberSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } (_FontImpl::GetInstance(*__pFont))->SetSize(handleNumberSize); - Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN(); - r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pHandleCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pHandleTextObject->RemoveAll(); - pHandleCanvas->SetFont(*__pFont); - __pFont->GetTextExtent(text, valueLength, textDim); + r = __pHandleTextObject->AppendElement(*pSimpleText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append Simpletext.", GetErrorMessage(r)); - FloatPoint textPoint; - textPoint.x = (__handleRect.width - textDim.width) / 2.0f; - textPoint.y = (__handleRect.height - textDim.height) / 2.0f; - - pHandleCanvas->SetForegroundColor(textColor); - pHandleCanvas->DrawText(textPoint, text); + __pHandleTextObject->SetForegroundColor(textColor, 0, valueLength); + __pHandleTextObject->SetBounds(pHandleCanvas->GetBounds()); + __pHandleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pHandleTextObject->SetFont(__pFont, 0, valueLength); + __pHandleTextObject->Draw(*_CanvasImpl::GetInstance(*pHandleCanvas)); delete pHandleCanvas; pHandleCanvas = null; return r; + +CATCH: + delete pSimpleText; + delete pHandleCanvas; + + return r; } result @@ -1295,10 +1223,10 @@ _SliderPresenter::DrawTitleText(Canvas& canvas) _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); titleLength = __pSlider->GetTitleText().GetLength(); - SysTryReturn(NID_UI_CTRL, titleLength != 0, E_SUCCESS, E_SUCCESS, "Title text is empty"); + SysTryReturnResult(NID_UI_CTRL, titleLength != 0, E_SUCCESS, "Title text is empty"); r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_SIZE, orientation, titleTextSize); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); (_FontImpl::GetInstance(*__pFont))->SetSize(titleTextSize); @@ -1307,7 +1235,7 @@ _SliderPresenter::DrawTitleText(Canvas& canvas) if (__pTitleTextObject == null) { __pTitleTextObject = new (std::nothrow) TextObject(); - SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, "Memory allocation failed."); __pTitleTextObject->Construct(); } @@ -1339,13 +1267,13 @@ _SliderPresenter::DrawIcon(Canvas& canvas) if (pLeftBitmap != null) { r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_LEFT), pLeftBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } if (pRightBitmap != null) { r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_RIGHT), pRightBitmap); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } return r; @@ -1356,12 +1284,12 @@ _SliderPresenter::DrawSliderOverlay(int value) { result r = E_SUCCESS; - FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(); + FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(true); r = __pSliderOverlay->SetSliderRect(absBounds, __touchRect); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = __pSliderOverlay->DrawSliderOverlay(__touchRect.x + __handleX, __handleRect.width, value); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return r; } @@ -1374,12 +1302,12 @@ _SliderPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitma if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) { r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); } else { r = canvas.DrawBitmap(bounds, *pBitmap); - SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.", GetErrorMessage(r)); } return r; } @@ -1472,30 +1400,25 @@ _SliderPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touch return false; } - if (__pSlideTimer == null) - { - __pSlideTimer = new (std::nothrow) Timer; - SysTryReturn(NID_UI_CTRL, __pSlideTimer != null, true, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - - result r = __pSlideTimer->Construct(*this); - if (r != E_SUCCESS) - { - delete __pSlideTimer; - __pSlideTimer = null; - - return true; - } - } - FloatPoint point = touchinfo.GetCurrentPosition(); - if (__handleRect.Contains(point)) + + if (__touchRect.Contains(point)) { - __isSliderPressed = true; __isSetValue = false; + int candidateValue = __pSliderModel->GetValue(); - int candidateValue = CalculateSliderValue(point.x, point.x - __handleRect.x); - __prevSliderValue = candidateValue; + if (!__handleRect.Contains(point)) + { + if (point.x >= (__touchRect.x + __handleRect.width / 2) && point.x <= __touchRect.x + (__touchRect.width - __handleRect.width / 2)) + { + candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2); + } + else + { + return __isSliderPressed; + } + } __pSliderModel->SetValue(candidateValue); __pSlider->SetAccessibilityElementValue(); @@ -1507,6 +1430,7 @@ _SliderPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touch } __pSlider->Invalidate(); + __isSliderPressed = true; } return __isSliderPressed; @@ -1520,25 +1444,8 @@ _SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touc return false; } - if (__pSlideTimer != null) - { - __isTimerRunning = false; - __pSlideTimer->Cancel(); - } - FloatPoint point = touchinfo.GetCurrentPosition(); - Canvas* pCanvas = __pSlider->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas."); - - if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width)) - { - point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width; - } - - delete pCanvas; - pCanvas = null; - if (__isSliderPressed) { PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSlider); @@ -1550,7 +1457,7 @@ _SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touc if (__isTouchCanceled) { __isTouchCanceled = false; - candidateValue = __prevSliderValue; + candidateValue = __pSliderModel->GetValue(); } else { @@ -1567,21 +1474,6 @@ _SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touc __pSliderOverlay->Close(); } - // Slider Event Fire is required if some handle value changes not fired sldier event because of timer call back. - if (__prevSliderValue != candidateValue) - { - _SliderEvent* pSliderEvent = dynamic_cast <_SliderEvent*>(__pSlider->GetSliderEvent()); - if (pSliderEvent != null) - { - IEventArg* pEventArg = _SliderEvent::CreateSliderEventArgN(candidateValue); - - result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, pEventArg != null, true, r, "[%s] Propagating.", GetErrorMessage(r)); - - pSliderEvent->Fire(*pEventArg); - } - } - // Adjustment Event Fire _AdjustmentEvent* pAdjustmentEvent = dynamic_cast <_AdjustmentEvent*>(__pSlider->GetAdjustmentEvent()); if (pAdjustmentEvent != null) @@ -1613,48 +1505,16 @@ _SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin FloatPoint point = touchinfo.GetCurrentPosition(); - Canvas* pCanvas = __pSlider->GetCanvasN(); - SysTryReturn(NID_UI_CTRL, pCanvas != null, true, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas."); - - if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width)) - { - point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width; - } - - __currentPosition.x = point.x; - __currentPosition.y = point.y; - - if (!__isTimerRunning) - { - __isTimerRunning = true; - __pSlideTimer->Start(__timerValue); - } - - delete pCanvas; - pCanvas = null; - - return true; -} - -void -_SliderPresenter::OnTimerExpired(Timer& timer) -{ - __isTimerRunning = false; - - float handleHalfWidth = __handleRect.width / 2; - int candidateValue = CalculateSliderValue(__currentPosition.x, handleHalfWidth); - - __prevSliderValue = candidateValue; + int candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2); __pSliderModel->SetValue(candidateValue); __pSlider->SetAccessibilityElementValue(); - __pSlider->Draw(); - __pSlider->Show(); + __pSlider->Invalidate(); - __pSlider->FireSliderMoveEvent(candidateValue); + __pSlider->FireSliderMoveEvent(candidateValue); - return; + return true; } bool @@ -1702,12 +1562,6 @@ _SliderPresenter::OnAncestorEnableStateChanged(const _Control& control) return; } - if (__pSlideTimer != null) - { - __isTimerRunning = false; - __pSlideTimer->Cancel(); - } - __pSlider->Invalidate(); return; @@ -1716,11 +1570,30 @@ _SliderPresenter::OnAncestorEnableStateChanged(const _Control& control) void _SliderPresenter::OnAncestorVisibleStateChanged(const _Control& control) { + if (control.GetVisibleState()) + { + return; + } + + __isSliderPressed = false; + __isSetValue = true; + __isTouchCanceled = false; + + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(false); + __pSliderOverlay->Close(); + } + + return; +} - if (__pSlideTimer != null) +void +_SliderPresenter::OnVisibleStateChanged() +{ + if (__pSlider->GetVisibleState()) { - __isTimerRunning = false; - __pSlideTimer->Cancel(); + return; } __isSliderPressed = false; diff --git a/src/ui/controls/FUiCtrl_SplitPanel.cpp b/src/ui/controls/FUiCtrl_SplitPanel.cpp index 838f14f..c723819 100644 --- a/src/ui/controls/FUiCtrl_SplitPanel.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanel.cpp @@ -68,7 +68,7 @@ _SplitPanel::CreateSplitPanelN(const FloatRectangle& rect, SplitPanelDividerStyl _SplitPanel* pSplitPanel = null; _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; - pSplitPanel = new (std::nothrow) _SplitPanel; + pSplitPanel = new (std::nothrow) _SplitPanel(); SysTryReturn(NID_UI_CTRL, pSplitPanel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pSplitPanel->Construct(splitPanelDividerStyle, splitPanelDividerDirection); @@ -102,7 +102,7 @@ _SplitPanel::CreateSplitPanelN(const FloatRectangle& rect, SplitPanelDividerStyl pSplitPanel->__dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = rect.height / 2.0f; pSplitPanel->__dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = rect.height / 2.0f; - pSplitPanel->__pTapGesture = new (std::nothrow) _TouchTapGestureDetector; + pSplitPanel->__pTapGesture = new (std::nothrow) _TouchTapGestureDetector(); SysTryCatch(NID_UI_CTRL, pSplitPanel->__pTapGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pSplitPanel->AddGestureDetector(*(pSplitPanel->__pTapGesture)); @@ -145,7 +145,7 @@ _SplitPanel::Construct(SplitPanelDividerStyle splitPanelDividerStyle, SplitPanel r = GetVisualElement()->AttachChild(*__pDividerVisualElement); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach divider visual element.", GetErrorMessage(r)); - __pSplitPanelPresenter = new (std::nothrow) _SplitPanelPresenter; + __pSplitPanelPresenter = new (std::nothrow) _SplitPanelPresenter(); SysTryCatch(NID_UI_CTRL, __pSplitPanelPresenter != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pSplitPanelPresenter->Construct(*this, splitPanelDividerStyle, splitPanelDividerDirection); @@ -332,7 +332,7 @@ _SplitPanel::OnBoundsChanged(void) _UiTouchEventDelivery _SplitPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { - if (__pSplitPanelPresenter->OnTouchPressed(source, touchinfo)) + if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchPressed(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -343,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)) + if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchReleased(source, touchinfo)) { return _UI_TOUCH_EVENT_DELIVERY_NO; } @@ -588,12 +588,6 @@ _SplitPanel::GetDividerPosition(void) const result _SplitPanel::SetMaximumDividerPosition(float position) { - if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] System error occurred. This functionality is not supported for divider style fixed."); - return E_SUCCESS; - } - const float width = GetBoundsF().width; const float height = GetBoundsF().height; int configValue = 0; @@ -653,47 +647,35 @@ _SplitPanel::SetMaximumDividerPosition(float position) float _SplitPanel::GetMaximumDividerPosition(void) const { - if (GetDividerStyle() != SPLIT_PANEL_DIVIDER_STYLE_FIXED) - { - _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) { - if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) - { - return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; - } - else - { - return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE]; - } + return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; } else { - if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) - { - return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT]; - } - else - { - return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT]; - } + return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT]; + } + else + { + return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT]; } - } - - return GetBounds().width; } result _SplitPanel::SetMinimumDividerPosition(float position) { - if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] System error occurred. This functionality is not supported for divider style fixed"); - return E_SUCCESS; - } - const float width = GetBoundsF().width; const float height = GetBoundsF().height; int configValue = 0; @@ -753,36 +735,30 @@ _SplitPanel::SetMinimumDividerPosition(float position) float _SplitPanel::GetMinimumDividerPosition(void) const { - if (GetDividerStyle() != SPLIT_PANEL_DIVIDER_STYLE_FIXED) - { - _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); - if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) { - if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) - { - return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; - } - else - { - return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE]; - } + return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; } else { - if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) - { - return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT]; - } - else - { - return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT]; - } + return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT]; + } + else + { + return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT]; } - } - - return 0; } void diff --git a/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp index 3e63b9d..4855cac 100644 --- a/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp @@ -89,7 +89,7 @@ _SplitPanelPresenter::Construct(const _SplitPanel& splitPanel, SplitPanelDivider result r = E_SUCCESS; _SplitPanelModel* pModel = null; - pModel = new (std::nothrow) _SplitPanelModel; + pModel = new (std::nothrow) _SplitPanelModel(); SysTryReturnResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "Memory allocation failed."); r = SetModel(*pModel); @@ -530,9 +530,9 @@ result _SplitPanelPresenter::LoadBitmap(SplitPanelDividerDirection splitPanelDividerDirection) { result r = E_SUCCESS; - Bitmap *pDividerBackgroundBitmap = null; + Bitmap* pDividerBackgroundBitmap = null; - // Modified - Changeable Color / Resource ( Fixed Style ) + // Modified - Changeable Color / Resource (Fixed Style) r = GET_BITMAP_CONFIG_N(SPLITPANEL::DIVIDER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDividerBackgroundBitmap); SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to load bitmap."); @@ -554,10 +554,10 @@ _SplitPanelPresenter::LoadBitmap(SplitPanelDividerDirection splitPanelDividerDir } __pDividerPressedBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDividerBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __dividerPressedBackgroundColor); - SysTryCatch(NID_UI_CTRL, (__pDividerPressedBackgroundBitmap != null), , r, "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult())); + SysTryCatch(NID_UI_CTRL, (__pDividerPressedBackgroundBitmap != null), r = GetLastResult(), GetLastResult(), "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult())); __pDividerBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDividerBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __dividerBackgroundColor); - SysTryCatch(NID_UI_CTRL, (__pDividerBackgroundBitmap != null), , r, "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult())); + SysTryCatch(NID_UI_CTRL, (__pDividerBackgroundBitmap != null), r = GetLastResult(), GetLastResult(), "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult())); delete pDividerBackgroundBitmap; @@ -566,8 +566,13 @@ _SplitPanelPresenter::LoadBitmap(SplitPanelDividerDirection splitPanelDividerDir CATCH: delete pDividerBackgroundBitmap; delete __pDividerBackgroundEffectBitmap; + __pDividerBackgroundEffectBitmap = null; + delete __pDividerPressedBackgroundBitmap; + __pDividerPressedBackgroundBitmap = null; + delete __pDividerThumbBitmap; + __pDividerThumbBitmap = null; return r; } @@ -821,7 +826,7 @@ _SplitPanelPresenter::AnimateDivider(int destination) pVisualElementDivider->RemoveAllAnimations(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Propagating."); - pAnimationDivider = GetVisualElementAnimation(L"bounds"); + pAnimationDivider = GetVisualElementAnimation(L"bounds", destination); SysTryReturnResult(NID_UI_CTRL, pAnimationDivider != null, GetLastResult(), "Propagating."); dividerBounds = pVisualElementDivider->GetBounds(); @@ -928,8 +933,10 @@ _SplitPanelPresenter::AnimatePane(int destination) ControlAnimator* pControlAnimatorFirstPane = null; ControlAnimator* pControlAnimatorSecondPane = null; - FloatAnimation hidePane(ANIMATION_ALPHA_SHOW, ANIMATION_ALPHA_HIDE, ANIMATION_DURATION, __controlAnimatorInterpolator); - FloatAnimation showPane(ANIMATION_ALPHA_HIDE, ANIMATION_ALPHA_SHOW, ANIMATION_DURATION, __controlAnimatorInterpolator); + long animationDuration = GetAnimationDuration(destination); + + FloatAnimation hidePane(ANIMATION_ALPHA_SHOW, ANIMATION_ALPHA_HIDE, animationDuration, __controlAnimatorInterpolator); + FloatAnimation showPane(ANIMATION_ALPHA_HIDE, ANIMATION_ALPHA_SHOW, animationDuration, __controlAnimatorInterpolator); pFirstPaneControl = GetPaneControl(SPLIT_PANEL_PANE_ORDER_FIRST); pSecondPaneControl = GetPaneControl(SPLIT_PANEL_PANE_ORDER_SECOND); @@ -952,7 +959,7 @@ _SplitPanelPresenter::AnimatePane(int destination) Rectangle secondPaneEndBounds = secondPaneBounds; secondPaneEndBounds.x = clientBounds.width + dividerRectangle.width; - RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { @@ -975,7 +982,7 @@ _SplitPanelPresenter::AnimatePane(int destination) Rectangle firstPaneEndBounds = firstPaneBounds; firstPaneEndBounds.x = -(firstPaneBounds.width + dividerRectangle.width); - RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { @@ -998,7 +1005,7 @@ _SplitPanelPresenter::AnimatePane(int destination) Rectangle firstPaneEndBounds = firstPaneBounds; firstPaneEndBounds.y = -(firstPaneBounds.height + dividerRectangle.height); - RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) { @@ -1021,7 +1028,7 @@ _SplitPanelPresenter::AnimatePane(int destination) Rectangle secondPaneEndBounds = secondPaneBounds; secondPaneEndBounds.y = clientBounds.height + dividerRectangle.height; - RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { @@ -1046,8 +1053,8 @@ _SplitPanelPresenter::AnimatePane(int destination) secondPaneEndBounds.x = secondPaneEndBounds.y = 0; - RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { @@ -1082,8 +1089,8 @@ _SplitPanelPresenter::AnimatePane(int destination) secondPaneEndBounds.x = secondPaneEndBounds.y = 0; - RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); - RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator); if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) { @@ -1152,10 +1159,10 @@ _SplitPanelPresenter::AnimatePaneParent(int destination) pVESecondPane->RemoveAllAnimations(); - pAnimationFirstPane = GetVisualElementAnimation(L"bounds"); + pAnimationFirstPane = GetVisualElementAnimation(L"bounds", destination); SysTryReturnResult(NID_UI_CTRL, pAnimationFirstPane != null, GetLastResult(), "Propagating."); - pAnimationSecondPane = GetVisualElementAnimation(L"bounds"); + pAnimationSecondPane = GetVisualElementAnimation(L"bounds", destination); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, pAnimationSecondPane != null, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1362,7 +1369,7 @@ _SplitPanelPresenter::GetRestorePaneBounds(SplitPanelPaneOrder paneOrder) } VisualElementPropertyAnimation* -_SplitPanelPresenter::GetVisualElementAnimation(Tizen::Base::String propertyName) +_SplitPanelPresenter::GetVisualElementAnimation(String propertyName, int destination) { result r = E_SUCCESS; VisualElementPropertyAnimation* pAnimation = null; @@ -1376,7 +1383,7 @@ _SplitPanelPresenter::GetVisualElementAnimation(Tizen::Base::String propertyName r = pAnimation->SetPropertyName(propertyName); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); - r = pAnimation->SetDuration(ANIMATION_DURATION); + r = pAnimation->SetDuration(GetAnimationDuration(destination)); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); pAnimation->SetTimingFunction(pTimingFunction); @@ -1390,6 +1397,116 @@ CATCH: return null; } +long +_SplitPanelPresenter::GetAnimationDuration(int destination) +{ + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + float dividerPosition = 0.0f; + float ratio = 0.0f; + long animationDuration = 0; + + _ControlOrientation orientation = __pSplitPanel->GetOrientation(); + SplitPanelPaneOrder maximizedPaneOrder = __pSplitPanelModel->GetMaximizedPaneOrder(); + bool isPaneMaximized = __pSplitPanelModel->GetPaneMaximumState(); + + clientBounds = __pSplitPanel->GetBoundsF(); + dividerPosition = __pSplitPanel->GetDividerPosition(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize.width = _ControlManager::GetInstance()->GetScreenSizeF().width; + screenSize.height = _ControlManager::GetInstance()->GetScreenSizeF().height; + } + else + { + screenSize.width = _ControlManager::GetInstance()->GetScreenSizeF().height; + screenSize.height = _ControlManager::GetInstance()->GetScreenSizeF().width; + } + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + animationDuration = (clientBounds.width / screenSize.width) * ANIMATION_DURATION_MAX; + } + else + { + animationDuration = (clientBounds.height / screenSize.height) * ANIMATION_DURATION_MAX; + } + + switch (destination) + { + case _SPLIT_PANEL_ANIMATION_RIGHT: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_SECOND) + { + ratio = 1.0f; + } + else + { + ratio = ((clientBounds.width - dividerPosition) / clientBounds.width); + } + break; + case _SPLIT_PANEL_ANIMATION_LEFT: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + ratio = 1.0f; + } + else + { + ratio = (dividerPosition / clientBounds.width); + } + break; + case _SPLIT_PANEL_ANIMATION_TOP: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + ratio = 1.0f; + } + else + { + ratio = (dividerPosition / clientBounds.height); + } + break; + case _SPLIT_PANEL_ANIMATION_BOTTOM: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_SECOND) + { + ratio = 1.0f; + } + else + { + ratio = ((clientBounds.height - dividerPosition) / clientBounds.height); + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + ratio = ((clientBounds.height - dividerPosition) / clientBounds.height); + } + else + { + ratio = (dividerPosition / clientBounds.height); + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL: + if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + ratio = ((clientBounds.width - dividerPosition) / clientBounds.width); + } + else + { + ratio = (dividerPosition / clientBounds.width); + } + break; + } + + animationDuration = animationDuration * ratio; + + if (animationDuration < ANIMATION_DURATION_MIN) + { + animationDuration = ANIMATION_DURATION_MIN; + } + + return animationDuration; +} + void _SplitPanelPresenter::OnAnimationTransactionStarted(int transactionId) { diff --git a/src/ui/controls/FUiCtrl_Tab.cpp b/src/ui/controls/FUiCtrl_Tab.cpp index c8d4859..66c9a48 100644 --- a/src/ui/controls/FUiCtrl_Tab.cpp +++ b/src/ui/controls/FUiCtrl_Tab.cpp @@ -76,7 +76,7 @@ _Tab::_Tab(void) _Control::SetResizable(false); _Control::SetMovable(false); - _TabPresenter* pPresenter = new (std::nothrow) _TabPresenter; + _TabPresenter* pPresenter = new (std::nothrow) _TabPresenter(); SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = SetPresenter(*pPresenter); @@ -141,7 +141,7 @@ _Tab::CreateTabN(void) { result r = E_SUCCESS; - _Tab* pTab = new (std::nothrow) _Tab; + _Tab* pTab = new (std::nothrow) _Tab(); SysTryReturn(NID_UI_CTRL, pTab, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) @@ -151,7 +151,7 @@ _Tab::CreateTabN(void) pTab->AcquireHandle(); - pTab->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector; + pTab->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector(); SysTryCatch(NID_UI_CTRL, pTab->__pGestureLongPress, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); pTab->__pGestureLongPress->SetDuration(500); @@ -159,7 +159,7 @@ _Tab::CreateTabN(void) r = pTab->__pGestureLongPress->AddGestureListener(*pTab); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _ITouchGestureEventListener instance could not be set."); - pTab->__pFlickGesture = new (std::nothrow) _TouchFlickGestureDetector; + pTab->__pFlickGesture = new (std::nothrow) _TouchFlickGestureDetector(); SysTryCatch(NID_UI_CTRL, pTab->__pFlickGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pTab->AddGestureDetector(*(pTab->__pFlickGesture)); @@ -224,7 +224,7 @@ _Tab::AddItem(const Bitmap& icon, const String& text, int actionId) SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem* pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetIcon(icon); @@ -275,7 +275,7 @@ _Tab::AddItem(const Bitmap& icon, int actionId) SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem* pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetIcon(icon); @@ -325,7 +325,7 @@ _Tab::AddItem(const String& text, int actionId) SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem* pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetText(text); @@ -380,7 +380,7 @@ _Tab::InsertItemAt(int index, const Bitmap& icon, const String& text, int action SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem* pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetIcon(icon); @@ -392,7 +392,7 @@ _Tab::InsertItemAt(int index, const Bitmap& icon, const String& text, int action if (selectedIndex >= index) { - _TabItem *pSelectedItem = null; + _TabItem* pSelectedItem = null; pSelectedItem = GetItemAt(selectedIndex); if (pSelectedItem != null) { @@ -449,7 +449,7 @@ _Tab::InsertItemAt(int index, const Bitmap& icon, int actionId) SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem *pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetIcon(icon); @@ -459,7 +459,7 @@ _Tab::InsertItemAt(int index, const Bitmap& icon, int actionId) if (selectedIndex >= index) { - _TabItem *pSelectedItem = null; + _TabItem* pSelectedItem = null; pSelectedItem = GetItemAt(selectedIndex); if (pSelectedItem != null) { @@ -516,7 +516,7 @@ _Tab::InsertItemAt(int index, const String& text, int actionId) SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); - _TabItem *pItem = new (std::nothrow) _TabItem; + _TabItem* pItem = new (std::nothrow) _TabItem(); SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetText(text); @@ -526,7 +526,7 @@ _Tab::InsertItemAt(int index, const String& text, int actionId) if (selectedIndex >= index) { - _TabItem *pSelectedItem = null; + _TabItem* pSelectedItem = null; pSelectedItem = GetItemAt(selectedIndex); if (pSelectedItem != null) { @@ -589,7 +589,7 @@ _Tab::SetItemAt(int index, const Bitmap& icon, const String& text, int actionId) return E_SYSTEM; } - _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); result r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -631,7 +631,7 @@ _Tab::SetItemAt(int index, const Bitmap& icon, int actionId) return E_SYSTEM; } - _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); result r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -670,7 +670,7 @@ _Tab::SetItemAt(int index, const String& text, int actionId) return E_SYSTEM; } - _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); result r = GetLastResult(); SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -691,7 +691,7 @@ _Tab::RemoveItemAt(int index) if (selectedIndex >= index) { - _TabItem *pSelectedItem = null; + _TabItem* pSelectedItem = null; pSelectedItem = GetItemAt(selectedIndex); if (pSelectedItem != null) { @@ -799,80 +799,29 @@ result _Tab::LoadBitmap(void) { result r = E_SUCCESS; - Bitmap* pPressedItemBackgroundBitmap = null; - Bitmap* pItemBackgroundBitmap = null; - Bitmap* pDisabledBackgroundBitmap = null; - Bitmap* pSelectedItemBackgroundBitmap = null; - Bitmap* pPressedItemBackgroundEffectBitmap = null; - Bitmap* pHighlightedItemBackgroundBitmap = null; Color pressedEffectColor; GET_COLOR_CONFIG(TAB::ITEM_BG_EFFECT_PRESSED, pressedEffectColor); - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, GetDisabledItemBackgroundColor(), __pDisabledBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate disabled item background bitmap."); - 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."); - - delete pDisabledBackgroundBitmap; - } - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pItemBackgroundBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, GetItemBackgroundColor(), __pBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate item background bitmap."); - 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."); - - delete pItemBackgroundBitmap; - } - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, GetPressedItemBackgroundColor(), __pPressedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate pressed item background bitmap."); - 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."); - - delete pPressedItemBackgroundBitmap; - } - - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedItemBackgroundBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, GetSelectedItemBackgroundColor(), __pSelectedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap."); - 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."); - - delete pSelectedItemBackgroundBitmap; - } - - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundEffectBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pressedEffectColor, __pPressedItemBackgroundEffectBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap."); - 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."); - - delete pPressedItemBackgroundEffectBitmap; - } - - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedItemBackgroundBitmap); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, GetHighlightedItemBackgroundColor(), __pHighlightedItemBackgroundBitmap); SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate highlighted item background bitmap."); - 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."); - - delete pHighlightedItemBackgroundBitmap; - } return r; } @@ -889,7 +838,7 @@ _Tab::SetBadgeIcon(int actionId, const Bitmap* pBadgeIcon) int itemIndex = GetItemIndexFromActionId(actionId); - _TabItem *pItem = null; + _TabItem* pItem = null; if (itemIndex < 0) { @@ -929,7 +878,7 @@ _Tab::GetItemIndexFromActionId(int actionId) const for (index = 0; index < itemCount; index++) { - const _TabItem *pItem = dynamic_cast(__tabItems.GetAt(index)); + const _TabItem* pItem = dynamic_cast(__tabItems.GetAt(index)); if (pItem != null) { @@ -946,12 +895,12 @@ _Tab::GetItemIndexFromActionId(int actionId) const int _Tab::GetItemActionIdAt(int index) const { - if (__tabItems.GetAt(index) == null ) + if (__tabItems.GetAt(index) == null) { return -1; } - const _TabItem *pItem = dynamic_cast(__tabItems.GetAt(index)); + const _TabItem* pItem = dynamic_cast(__tabItems.GetAt(index)); SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A system error has occurred. Failed to get an item at index (%d).", index); return pItem->GetActionId(); @@ -960,12 +909,12 @@ _Tab::GetItemActionIdAt(int index) const _TabItem* _Tab::GetItemAt(int index) { - if (__tabItems.GetAt(index) == null ) + if (__tabItems.GetAt(index) == null) { return null; } - _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); result r = GetLastResult(); SysTryReturn(NID_UI_CTRL, pItem != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_TabBar.cpp b/src/ui/controls/FUiCtrl_TabBar.cpp index 35475dd..6dc49a7 100644 --- a/src/ui/controls/FUiCtrl_TabBar.cpp +++ b/src/ui/controls/FUiCtrl_TabBar.cpp @@ -33,6 +33,7 @@ using namespace Tizen::Base; using namespace Tizen::Graphics; using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; namespace Tizen { namespace Ui { namespace Controls { @@ -74,7 +75,7 @@ _TabBar* _TabBar::CreateTabBarN(void) { _TabBar* pTabBar = new (std::nothrow) _TabBar(); - SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pTabBar->Initialize(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Initialize.", GetErrorMessage(r)); @@ -92,7 +93,7 @@ _TabBar::CreateTabBarN(void) CATCH: delete pTabBar; - + SetLastResult(r); return null; } @@ -100,7 +101,7 @@ result _TabBar::Initialize(void) { _TabBarPresenter* pTabBarPresenter = new (std::nothrow) _TabBarPresenter(*this); - SysTryReturn(NID_UI_CTRL, pTabBarPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pTabBarPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = pTabBarPresenter->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -130,19 +131,19 @@ _TabBar::SetPresenter(const _TabBarPresenter& tabBarPresenter) } result -_TabBar::AddItem(const Tizen::Base::String& text, int actionId) +_TabBar::AddItem(const String& text, int actionId) { return __pTabBarPresenter->AddItem(text, actionId); } result -_TabBar::InsertItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBar::InsertItemAt(int index, const String& text, int actionId) { return __pTabBarPresenter->InsertItemAt(index, text, actionId); } result -_TabBar::SetItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBar::SetItemAt(int index, const String& text, int actionId) { return __pTabBarPresenter->SetItemAt(index, text, actionId); } @@ -177,16 +178,16 @@ _TabBar::SetPropertyColor(const Variant& color) Variant _TabBar::GetPropertyColor(void) const { - return Tizen::Ui::Variant(__color); + return Variant(__color); } result -_TabBar::SetColor(Tizen::Graphics::Color color) +_TabBar::SetColor(Color color) { return SetProperty("color", Variant(color)); } -Tizen::Graphics::Color +Color _TabBar::GetColor(void) const { Variant color = GetProperty("color"); @@ -211,7 +212,7 @@ _TabBar::SetPropertyNormalItemColor(const Variant& color) Variant _TabBar::GetPropertyNormalItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_NORMAL]); + return Variant(__itemColor[ITEM_STATUS_NORMAL]); } result @@ -231,7 +232,7 @@ _TabBar::SetPropertySelectedItemColor(const Variant& color) Variant _TabBar::GetPropertySelectedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_SELECTED]); + return Variant(__itemColor[ITEM_STATUS_SELECTED]); } result @@ -251,7 +252,7 @@ _TabBar::SetPropertyPressedItemColor(const Variant& color) Variant _TabBar::GetPropertyPressedItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_PRESSED]); + return Variant(__itemColor[ITEM_STATUS_PRESSED]); } result @@ -271,11 +272,11 @@ _TabBar::SetPropertyDisabledItemColor(const Variant& color) Variant _TabBar::GetPropertyDisabledItemColor(void) const { - return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_DISABLED]); + return Variant(__itemColor[ITEM_STATUS_DISABLED]); } result -_TabBar::SetItemColor(_TabBarItemStatus itemStatus, Tizen::Graphics::Color color) +_TabBar::SetItemColor(_TabBarItemStatus itemStatus, Color color) { result r = E_SUCCESS; @@ -299,7 +300,7 @@ _TabBar::SetItemColor(_TabBarItemStatus itemStatus, Tizen::Graphics::Color color return r; } -Tizen::Graphics::Color +Color _TabBar::GetItemColor(_TabBarItemStatus itemStatus) const { Color itemColor; @@ -339,7 +340,7 @@ _TabBar::SetPropertyNormalItemTextColor(const Variant & color) Variant _TabBar::GetPropertyNormalItemTextColor(void) const { - return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_NORMAL]); + return Variant(__itemTextColor[ITEM_STATUS_NORMAL]); } result @@ -353,7 +354,7 @@ _TabBar::SetPropertySelectedItemTextColor(const Variant & color) Variant _TabBar::GetPropertySelectedItemTextColor(void) const { - return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_SELECTED]); + return Variant(__itemTextColor[ITEM_STATUS_SELECTED]); } result @@ -367,7 +368,7 @@ _TabBar::SetPropertyPressedItemTextColor(const Variant & color) Variant _TabBar::GetPropertyPressedItemTextColor(void) const { - return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_PRESSED]); + return Variant(__itemTextColor[ITEM_STATUS_PRESSED]); } result @@ -381,11 +382,11 @@ _TabBar::SetPropertyDisabledItemTextColor(const Variant & color) Variant _TabBar::GetPropertyDisabledItemTextColor(void) const { - return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_DISABLED]); + return Variant(__itemTextColor[ITEM_STATUS_DISABLED]); } void -_TabBar::SetItemTextColor(_TabBarItemStatus status, Tizen::Graphics::Color color) +_TabBar::SetItemTextColor(_TabBarItemStatus status, Color color) { Color itemTextColor; result r = E_SUCCESS; @@ -410,7 +411,7 @@ _TabBar::SetItemTextColor(_TabBarItemStatus status, Tizen::Graphics::Color color } -Tizen::Graphics::Color +Color _TabBar::GetItemTextColor(_TabBarItemStatus status) const { Color itemTextColor; @@ -458,7 +459,7 @@ _TabBar::GetItemCount(void) const } _TabBarItem* -_TabBar::GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const +_TabBar::GetItemFromPosition(const FloatPoint& position) const { return __pTabBarPresenter->GetItemFromPosition(position); } @@ -476,14 +477,14 @@ _TabBar::SetWidth(float width) GET_SHAPE_CONFIG(TABBAR::HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); result r = SetSize(FloatDimension(width, height)); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __pTabBarPresenter->ResetItemPositionX(); return r; } void -_TabBar::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener) +_TabBar::AddActionEventListener(const _IActionEventListener& listener) { ClearLastResult(); @@ -493,7 +494,7 @@ _TabBar::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener if (__pActionEvent == null || IsFailed(GetLastResult())) { - SysLog(NID_UI_CTRL, "[E_INVALID_STATE] System error occured."); + SysLog(NID_UI_CTRL, "[%s] System error occured.", GetErrorMessage(E_INVALID_STATE)); SetLastResult(E_INVALID_STATE); delete __pActionEvent; return; @@ -505,9 +506,9 @@ _TabBar::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener } void -_TabBar::RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener) +_TabBar::RemoveActionEventListener(const _IActionEventListener& listener) { - SysTryReturnVoidResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed.") + SysTryReturnVoidResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, "[%s] This instance isn't constructed.", GetErrorMessage(E_INVALID_STATE)) // Todo : check fail case of RemoveListener __pActionEvent->RemoveListener(listener); } @@ -533,7 +534,7 @@ _TabBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) if (__pActionEvent) { IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); - SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); __pActionEvent->Fire(*pEventArg); @@ -557,7 +558,7 @@ _TabBar::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) } void -_TabBar::OnFontChanged(Font * pFont) +_TabBar::OnFontChanged(Font* pFont) { __pTabBarPresenter->OnFontChanged(pFont); } @@ -649,7 +650,7 @@ _TabBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (__pActionEvent) { IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); - SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); __pActionEvent->Fire(*pEventArg); diff --git a/src/ui/controls/FUiCtrl_TabBarImpl.cpp b/src/ui/controls/FUiCtrl_TabBarImpl.cpp index f9b70d4..d344543 100644 --- a/src/ui/controls/FUiCtrl_TabBarImpl.cpp +++ b/src/ui/controls/FUiCtrl_TabBarImpl.cpp @@ -30,7 +30,9 @@ using namespace Tizen::Ui; using namespace Tizen::Graphics; -using namespace Tizen::Base::Runtime; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Runtime; namespace Tizen { namespace Ui { namespace Controls { @@ -63,10 +65,10 @@ _TabBarImpl::~_TabBarImpl(void) } _TabBarImpl* -_TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const Tizen::Graphics::FloatRectangle& bounds) +_TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const FloatRectangle& bounds) { ClearLastResult(); - SysTryReturn(NID_UI_CTRL, bounds.width >= 0.0f && bounds.height >= 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified width is smaller than minimum size."); + SysTryReturn(NID_UI_CTRL, bounds.width >= 0.0f && bounds.height >= 0.0f, null, E_INVALID_ARG, "[%s] Invalid argument is used. The specified width is smaller than minimum size.", GetErrorMessage(E_INVALID_ARG)); float height = 0.0f; GET_SHAPE_CONFIG(TABBAR::HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); @@ -74,20 +76,19 @@ _TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const Tizen::Graphics::FloatRect result r = E_SUCCESS; _TabBar* pCore = _TabBar::CreateTabBarN(); - SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _TabBar is not constructed."); + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); _TabBarImpl* pImpl = new (std::nothrow) _TabBarImpl(pTabBar, pCore); - r = CheckConstruction(pCore, pImpl); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->SetBounds(FloatRectangle(bounds.x, bounds.y, bounds.width, height)); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetBounds is failed.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds.", GetErrorMessage(r)); r = pImpl->SetMinimumSize(FloatDimension(pImpl->GetMinimumSizeF().width, height)); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetMinimumSize is failed.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set minimum size.", GetErrorMessage(r)); r = pImpl->SetMaximumSize(FloatDimension(pImpl->GetMaximumSizeLimitF().width, height)); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetMaximumSize is failed.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set maximum size.", GetErrorMessage(r)); return pImpl; @@ -98,27 +99,29 @@ CATCH: } result -_TabBarImpl::AddItem(const Tizen::Base::String& text, int actionId) +_TabBarImpl::AddItem(const String& text, int actionId) { int itemMaxCnt = 0; - GET_SHAPE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt); + + GET_FIXED_VALUE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt); SysTryReturn(NID_UI_CTRL, GetCore().GetItemCount() < itemMaxCnt, E_MAX_EXCEEDED, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The item is not added more than %d.", itemMaxCnt); return GetCore().AddItem(text, actionId); } result -_TabBarImpl::InsertItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBarImpl::InsertItemAt(int index, const String& text, int actionId) { int itemMaxCnt = 0; - GET_SHAPE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt); + + GET_FIXED_VALUE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt); SysTryReturn(NID_UI_CTRL, GetCore().GetItemCount() < itemMaxCnt, E_MAX_EXCEEDED, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The item is not added more than %d.", itemMaxCnt); SysTryReturn(NID_UI_CTRL, index >= 0 && index <= GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index); return GetCore().InsertItemAt(index, text, actionId); } -Tizen::Graphics::Color +Color _TabBarImpl::GetColor(void) const { return GetCore().GetColor(); @@ -130,13 +133,13 @@ _TabBarImpl::GetItemCount(void) const return GetCore().GetItemCount(); } -Tizen::Graphics::Color +Color _TabBarImpl::GetSelectedItemColor(void) const { return GetCore().GetItemColor(ITEM_STATUS_SELECTED); } -Tizen::Graphics::Color +Color _TabBarImpl::GetItemTextColor(TabBarItemStatus status) const { if (status == TAB_BAR_ITEM_STATUS_NORMAL) @@ -148,7 +151,7 @@ _TabBarImpl::GetItemTextColor(TabBarItemStatus status) const return GetCore().GetItemTextColor(ITEM_STATUS_SELECTED); } - return Tizen::Graphics::Color(0); + return Color(0); } int @@ -160,7 +163,7 @@ _TabBarImpl::GetSelectedItemIndex(void) const result _TabBarImpl::RemoveItemAt(int index) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index); return GetCore().RemoveItemAt(index); } @@ -172,15 +175,15 @@ _TabBarImpl::RemoveAllItems(void) } result -_TabBarImpl::SetColor(const Tizen::Graphics::Color& color) +_TabBarImpl::SetColor(const Color& color) { return GetCore().SetColor(color); } result -_TabBarImpl::SetItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBarImpl::SetItemAt(int index, const String& text, int actionId) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index); return GetCore().SetItemAt(index, text, actionId); } @@ -188,13 +191,13 @@ _TabBarImpl::SetItemAt(int index, const Tizen::Base::String& text, int actionId) result _TabBarImpl::SetItemSelected(int index) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index); return GetCore().SetItemSelected(index); } result -_TabBarImpl::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color) +_TabBarImpl::SetItemTextColor(TabBarItemStatus status, const Color& color) { if (status == TAB_BAR_ITEM_STATUS_NORMAL) { @@ -209,7 +212,7 @@ _TabBarImpl::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Co } result -_TabBarImpl::SetSelectedItemColor(const Tizen::Graphics::Color& color) +_TabBarImpl::SetSelectedItemColor(const Color& color) { return GetCore().SetItemColor(ITEM_STATUS_SELECTED, color); } @@ -221,7 +224,7 @@ _TabBarImpl::SetWidth(float width) } void -_TabBarImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) +_TabBarImpl::AddActionEventListener(IActionEventListener& listener) { ClearLastResult(); @@ -231,7 +234,7 @@ _TabBarImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) if (__pPublicActionEvent == null || IsFailed(GetLastResult())) { - SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] System error occurred."); + SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[%s] __pPublicActionEvent must not be null.", GetErrorMessage(E_INVALID_STATE)); SetLastResult(E_INVALID_STATE); delete __pPublicActionEvent; return; @@ -246,9 +249,9 @@ _TabBarImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener) } void -_TabBarImpl::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener) +_TabBarImpl::RemoveActionEventListener(IActionEventListener& listener) { - SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed.") + SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[%s] This instance is not constructed yet.", GetErrorMessage(E_INVALID_STATE)) // Todo : check fail case of RemoveListener __pPublicActionEvent->RemoveListener(listener); @@ -287,7 +290,7 @@ _TabBarImpl::GetCore(void) } void -_TabBarImpl::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId) +_TabBarImpl::OnActionPerformed(const _Control& source, int actionId) { if (__pPublicActionEvent != null) { @@ -307,18 +310,18 @@ public: GetInstance(_UiBuilder* uibuilder) { _TabBarMaker* pTabBarMaker = new (std::nothrow) _TabBarMaker(uibuilder); - SysTryReturn(NID_UI_CTRL, pTabBarMaker != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pTabBarMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pTabBarMaker; }; protected: - virtual Tizen::Ui::Control* + virtual Control* Make(_UiBuilderControl* pControl) { result r = E_SUCCESS; _UiBuilderControlLayout* pControlProperty = null; TabBar* pTabBar = null; - Tizen::Graphics::FloatRectangle rect; - Tizen::Base::String elementString; + FloatRectangle rect; + String elementString; int opacity = 0; Color color; @@ -332,7 +335,7 @@ protected: //Construct pTabBar = new (std::nothrow) TabBar(); - SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTabBar->Construct(rect.x, rect.y, rect.width); if (r != E_SUCCESS) diff --git a/src/ui/controls/FUiCtrl_TabBarItem.cpp b/src/ui/controls/FUiCtrl_TabBarItem.cpp index 3cf6bca..f4252e3 100644 --- a/src/ui/controls/FUiCtrl_TabBarItem.cpp +++ b/src/ui/controls/FUiCtrl_TabBarItem.cpp @@ -63,7 +63,7 @@ _TabBarItem::GetActionId(void) const } void -_TabBarItem::SetText(const Tizen::Base::String& text, _ControlOrientation orientation) +_TabBarItem::SetText(const String& text, _ControlOrientation orientation) { float fontSize = 0.0f; GET_SHAPE_CONFIG(TABBAR::FONT_SIZE, orientation, fontSize); @@ -96,7 +96,7 @@ _TabBarItem::SetText(const Tizen::Base::String& text, _ControlOrientation orient __text = text; } -Tizen::Base::String +String _TabBarItem::GetText(void) const { return __text; @@ -115,12 +115,12 @@ _TabBarItem::GetStatus(void) const } void -_TabBarItem::SetBounds(const Tizen::Graphics::FloatRectangle& bounds) +_TabBarItem::SetBounds(const FloatRectangle& bounds) { __bounds = bounds; } -Tizen::Graphics::FloatRectangle +FloatRectangle _TabBarItem::GetBounds(void) const { return __bounds; diff --git a/src/ui/controls/FUiCtrl_TabBarModel.cpp b/src/ui/controls/FUiCtrl_TabBarModel.cpp index b0a1606..20500b7 100644 --- a/src/ui/controls/FUiCtrl_TabBarModel.cpp +++ b/src/ui/controls/FUiCtrl_TabBarModel.cpp @@ -25,6 +25,7 @@ using namespace Tizen::Graphics; +using namespace Tizen::Base; namespace Tizen { namespace Ui { namespace Controls { @@ -92,10 +93,10 @@ _TabBarModel::GetWidthOfAllItems(void) const } result -_TabBarModel::AddItem(const Tizen::Base::String& text, int actionId, _ControlOrientation orientation) +_TabBarModel::AddItem(const String& text, int actionId, _ControlOrientation orientation) { _TabBarItem* pItem = new (std::nothrow) _TabBarItem(orientation); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetText(text, orientation); pItem->SetActionId(actionId); @@ -134,16 +135,16 @@ _TabBarModel::AddItem(const Tizen::Base::String& text, int actionId, _ControlOri } result -_TabBarModel::InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation) +_TabBarModel::InsertItemAt(int index, const String& text, int actionId, _ControlOrientation orientation) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The index (%d) is out of range.", index); if (GetItemCount() == 0) { return AddItem(text, actionId, orientation); } _TabBarItem* pItem = new (std::nothrow) _TabBarItem(orientation); - SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); pItem->SetText(text, orientation); pItem->SetActionId(actionId); @@ -160,25 +161,25 @@ _TabBarModel::InsertItemAt(int index, const Tizen::Base::String& text, int actio } result r = __tabBarItems.InsertAt(*pItem, index); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = ReCalculateItemPosition(index + 1, orientation); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return E_SUCCESS; } result -_TabBarModel::SetItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation) +_TabBarModel::SetItemAt(int index, const String& text, int actionId, _ControlOrientation orientation) { _TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(index)); - SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The %d index item is not exist.", index); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "Invalid argument is used. The item at index (%d) does not exist.", index); pItem->SetText(text, orientation); pItem->SetActionId(actionId); result r = ReCalculateItemPosition(index + 1, orientation); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return E_SUCCESS; } @@ -187,16 +188,16 @@ result _TabBarModel::RemoveItemAt(int index, _ControlOrientation orientation) { _TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(index)); - SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The %d index item is not exist.", index); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "Invalid argument is used. The item at index(%d) does not exist.", index); float itemMargin = 0.0f; GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin); result r = __tabBarItems.RemoveAt(index, true); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = ReCalculateItemPosition(index, orientation); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return E_SUCCESS; } @@ -220,7 +221,7 @@ _TabBarModel::GetItemAt(int index) const result _TabBarModel::ReCalculateItemPosition(int itemIndex, _ControlOrientation orientation) { - SysTryReturn(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The itemIndex(%d) is negative."); + SysTryReturnResult(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, "Invalid argument is used. The itemIndex(%d) is negative."); int itemCount = __tabBarItems.GetCount(); float itemMargin = 0.0f; GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin); diff --git a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp index db2466b..25e362b 100644 --- a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp @@ -108,13 +108,13 @@ _TabBarPresenter::~_TabBarPresenter(void) result _TabBarPresenter::Construct(void) { - __pTabBarModel = new (std::nothrow) _TabBarModel; - SysTryReturn(NID_UI_CTRL, __pTabBarModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pTabBarModel = new (std::nothrow) _TabBarModel(); + SysTryReturnResult(NID_UI_CTRL, __pTabBarModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); result r = E_SUCCESS; r = LoadBitmap(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); return r; @@ -130,10 +130,10 @@ _TabBarPresenter::InitializeFont(void) { result r = E_SUCCESS; __pFont = __tabBar.GetFallbackFont(); - SysTryCatch(NID_UI_CTRL, __pFont != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pFont != null, r = GetLastResult(), GetLastResult(), "[%s] Propgating.", GetErrorMessage(GetLastResult())); __pTextObject = new (std::nothrow) TextObject(); - SysTryCatch(NID_UI_CTRL, __pTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTextObject->Construct(); __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); @@ -167,9 +167,9 @@ _TabBarPresenter::OnFontInfoRequested(unsigned long& style, float& size) result _TabBarPresenter::LoadBitmap(void) { - Bitmap* pBitmap = null; Color arrowColor; + bool isCustomColor; GET_COLOR_CONFIG(TABBAR::ARROW_BG_NORMAL, arrowColor); if (__pBgBitmapCached != null) @@ -206,49 +206,38 @@ _TabBarPresenter::LoadBitmap(void) } result r; - r = GET_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - __pBgBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetColor()); - delete pBitmap; - pBitmap = null; + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetColor(), __pBgBitmapCached); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); r = GET_BITMAP_CONFIG_N(TABBAR::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgEffectBitmapCached); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(TABBAR::LEFT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - __pLeftArrowBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::LEFT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pLeftArrowBitmapCached); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pBitmap; - pBitmap = null; - r = GET_BITMAP_CONFIG_N(TABBAR::RIGHT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - __pRightArrowBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::RIGHT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pRightArrowBitmapCached); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pBitmap; - pBitmap = null; - r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - __pItemBgBitmapCached[ITEM_STATUS_SELECTED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_SELECTED)); + isCustomColor = IS_CUSTOM_COLOR(TABBAR::ITEM_BG_NORMAL); + if (isCustomColor) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_NORMAL), __pItemBgBitmapCached[ITEM_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_SELECTED), __pItemBgBitmapCached[ITEM_STATUS_SELECTED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pBitmap; - pBitmap = null; - r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - __pItemBgBitmapCached[ITEM_STATUS_PRESSED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_PRESSED)); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_PRESSED), __pItemBgBitmapCached[ITEM_STATUS_PRESSED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pBitmap; - pBitmap = null; - r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - __pItemBgBitmapCached[ITEM_STATUS_DISABLED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_DISABLED)); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_DISABLED), __pItemBgBitmapCached[ITEM_STATUS_DISABLED]); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pBitmap; - pBitmap = null; + return E_SUCCESS; CATCH: - delete pBitmap; delete __pBgBitmapCached; __pBgBitmapCached = null; @@ -269,13 +258,13 @@ CATCH: } result -_TabBarPresenter::AddItem(const Tizen::Base::String& text, int actionId) +_TabBarPresenter::AddItem(const String& text, int actionId) { return __pTabBarModel->AddItem(text, actionId, _CONTROL_ORIENTATION_PORTRAIT); } result -_TabBarPresenter::InsertItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBarPresenter::InsertItemAt(int index, const String& text, int actionId) { if (index <= __pTabBarModel->GetSelectedItemIndex()) { @@ -286,13 +275,13 @@ _TabBarPresenter::InsertItemAt(int index, const Tizen::Base::String& text, int a } result r = __pTabBarModel->InsertItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); return E_SUCCESS; } result -_TabBarPresenter::SetItemAt(int index, const Tizen::Base::String& text, int actionId) +_TabBarPresenter::SetItemAt(int index, const String& text, int actionId) { return __pTabBarModel->SetItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT); } @@ -316,12 +305,12 @@ _TabBarPresenter::RemoveItemAt(int index) } result r = __pTabBarModel->RemoveItemAt(index, _CONTROL_ORIENTATION_PORTRAIT); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (GetItemCount() != 0) { r = SetItemSelected(0); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } else { @@ -342,7 +331,7 @@ result _TabBarPresenter::SetItemSelected(int index) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetItemCount(), E_OUT_OF_RANGE, "The index (%d) is out of range.", index); int oldSelectedItemIndex = GetSelectedItemIndex(); if (index == oldSelectedItemIndex) @@ -351,7 +340,7 @@ _TabBarPresenter::SetItemSelected(int index) } _TabBarItem* pItem = GetItemAt(oldSelectedItemIndex); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); pItem->SetStatus(ITEM_STATUS_NORMAL); _AccessibilityElement* pElement = pItem->GetAccessibilityElement(); if(pElement != null) @@ -362,7 +351,7 @@ _TabBarPresenter::SetItemSelected(int index) pItem = GetItemAt(index); r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); pItem->SetStatus(ITEM_STATUS_SELECTED); pElement = pItem->GetAccessibilityElement(); if(pElement != null) @@ -371,6 +360,19 @@ _TabBarPresenter::SetItemSelected(int index) pElement->SetHintDisabled(true); } + FloatRectangle itemBounds = pItem->GetBounds(); + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + + if (itemBounds.x < 0.0f) + { + SetTopDrawnItemIndex(index); + } + else if ((clientBounds.width - __sideMargin * 2.0f - __arrowMargin * 2.0f) < (itemBounds.x + itemBounds.width)) + { + float movableDistance = (itemBounds.x + itemBounds.width) - (clientBounds.width - __sideMargin * 2.0f - __arrowMargin); + AdjustItemPositionX(-movableDistance); + } + __pTabBarModel->SetSelectedItemIndex(index); return E_SUCCESS; @@ -389,7 +391,7 @@ _TabBarPresenter::GetItemCount(void) const } int -_TabBarPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const +_TabBarPresenter::GetItemIndexFromPosition(const FloatPoint& point) const { FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -423,7 +425,7 @@ _TabBarPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& po } int -_TabBarPresenter::GetItemIndexFromAbsPosition(const Tizen::Graphics::FloatPoint& point) const +_TabBarPresenter::GetItemIndexFromAbsPosition(const FloatPoint& point) const { FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -449,11 +451,11 @@ _TabBarPresenter::GetItemIndexFromAbsPosition(const Tizen::Graphics::FloatPoint& } _TabBarItem* -_TabBarPresenter::GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const +_TabBarPresenter::GetItemFromPosition(const FloatPoint& position) const { SetLastResult(E_SUCCESS); int index = GetItemIndexFromPosition(position); - SysTryReturn(NID_UI_CTRL, index != -1, null, E_SYSTEM, "[E_SYSTEM] Item not found."); + SysTryReturn(NID_UI_CTRL, index != -1, null, E_SYSTEM, "[%s] A system error has occurred. Item not found.", GetErrorMessage(E_SYSTEM)); return __pTabBarModel->GetItemAt(index); } @@ -461,17 +463,17 @@ _TabBarPresenter::GetItemFromPosition(const Tizen::Graphics::FloatPoint& positio result _TabBarPresenter::SetTopDrawnItemIndex(int index) { - SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetItemCount(), - E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index); + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetItemCount(), + E_OUT_OF_RANGE, "The index (%d) is out of range.", index); _TabBarItem* pTopItem = GetItemAt(index); result r = GetLastResult(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); float distance = pTopItem->GetBounds().x; _TabBarItem* pLastItem = GetItemAt(GetItemCount() - 1); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); FloatRectangle clientBounds = __tabBar.GetBoundsF(); float movableDistance = (pLastItem->GetBounds().x + pLastItem->GetBounds().width) - (clientBounds.width - __sideMargin * 2.0f - __arrowMargin * 2.0f); @@ -480,7 +482,7 @@ _TabBarPresenter::SetTopDrawnItemIndex(int index) distance = movableDistance; } - r = AdjustItemPositionX(-distance); + r = AdjustItemPositionX(-distance + __arrowMargin); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); return E_SUCCESS; @@ -490,7 +492,7 @@ result _TabBarPresenter::SetItemStatus(int index, _TabBarItemStatus status) { _TabBarItem* pItem = __pTabBarModel->GetItemAt(index); - SysTryReturn(NID_UI_CTRL, pItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item(%d) not exists.", index); + SysTryReturnResult(NID_UI_CTRL, pItem, E_SYSTEM, "A system error has occurred. Item at index (%d) does not exists.", index); pItem->SetStatus(status); @@ -501,7 +503,7 @@ _TabBarItemStatus _TabBarPresenter::GetItemStatus(int index) const { _TabBarItem* pItem = __pTabBarModel->GetItemAt(index); - SysTryReturn(NID_UI_CTRL, pItem, ITEM_STATUS_NORMAL, E_SYSTEM, "[E_SYSTEM] Item(%d) not exists.", index); + SysTryReturn(NID_UI_CTRL, pItem, ITEM_STATUS_NORMAL, E_SYSTEM, "[%s] A system error has occured. Item at index (%d) does not exists.", GetErrorMessage(E_SYSTEM), index); _TabBarItemStatus status = pItem->GetStatus(); @@ -516,7 +518,7 @@ _TabBarPresenter::AdjustItemPositionX(float distance) while (index < GetItemCount()) { _TabBarItem* pItem = __pTabBarModel->GetItemAt(index); - SysTryReturn(NID_UI_CTRL, pItem, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Item(%d) not exists.", index); + SysTryReturnResult(NID_UI_CTRL, pItem, E_INVALID_STATE, "Item at index (%d) does not exists.", index); FloatRectangle bounds = pItem->GetBounds(); bounds.x += distance; pItem->SetBounds(bounds); @@ -529,17 +531,14 @@ _TabBarPresenter::AdjustItemPositionX(float distance) } result -_TabBarPresenter::SetReplacementColor(const Tizen::Graphics::Color& color) +_TabBarPresenter::SetReplacementColor(const Color& color) { - Bitmap* pBitmap = null; Bitmap* pColorReplcedBitmap = null; result r; - r = GET_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail."); - pColorReplcedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - delete pBitmap; + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM)); if (__pBgBitmapCached != null) { @@ -551,29 +550,26 @@ _TabBarPresenter::SetReplacementColor(const Tizen::Graphics::Color& color) } result -_TabBarPresenter::SetItemReplacementColor(_TabBarItemStatus itemStatus, const Tizen::Graphics::Color& color) +_TabBarPresenter::SetItemReplacementColor(_TabBarItemStatus itemStatus, const Color& color) { - Bitmap* pBitmap = null; Bitmap* pColorReplcedBitmap = null; result r; if (itemStatus == ITEM_STATUS_SELECTED) { - r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail."); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM)); } else if (itemStatus == ITEM_STATUS_PRESSED) { - r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail."); + r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM)); } else { return E_SUCCESS; } - pColorReplcedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); - delete pBitmap; if (__pItemBgBitmapCached[itemStatus] != null) { @@ -588,7 +584,7 @@ void _TabBarPresenter::Draw(void) { Canvas* pCanvas = __tabBar.GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[E_SYSTEM] It can not get canvas."); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[%s] A system error has occured. Canvas instance must be null.", GetErrorMessage(E_SYSTEM)); FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -624,7 +620,7 @@ _TabBarPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove directio } _TabBarItem* pItem = GetItemAt(itemIndex); - SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item loading fail."); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "Failed to load an item."); FloatRectangle itemBounds = pItem->GetBounds(); FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -637,15 +633,9 @@ _TabBarPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove directio else { r = SetTopDrawnItemIndex(firstDrawnItemIndex + 1); - - pItem = GetItemAt(itemIndex); - SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item loading fail."); - - itemBounds = pItem->GetBounds(); - AdjustItemPositionX((clientBounds.width - (__sideMargin * 2.0f)) - (itemBounds.x + itemBounds.width)); } - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } __tabBar.Invalidate(); @@ -664,7 +654,7 @@ _TabBarPresenter::ResetItemPositionX(void) _TabBarItem* pFirstItem = __pTabBarModel->GetItemAt(0); _TabBarItem* pLastItem = __pTabBarModel->GetItemAt(itemCount - 1); - SysTryReturnVoidResult(NID_UI_CTRL, pFirstItem != null && pLastItem != null, E_SYSTEM, "[E_SYSTEM] Item not found."); + SysTryReturnVoidResult(NID_UI_CTRL, pFirstItem != null && pLastItem != null, E_SYSTEM, "[%s] A system error has occurred. Item not found.", GetErrorMessage(E_SYSTEM)); FloatRectangle clientBounds = __tabBar.GetBoundsF(); FloatRectangle firstItemBounds = pFirstItem->GetBounds(); @@ -672,7 +662,7 @@ _TabBarPresenter::ResetItemPositionX(void) if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width - firstItemBounds.x < clientBounds.width - __sideMargin * 2.0f) { - AdjustItemPositionX(-firstItemBounds.x); + AdjustItemPositionX(-firstItemBounds.x + __arrowMargin); } else if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width < clientBounds.width - __sideMargin * 2.0f) { @@ -687,9 +677,10 @@ _TabBarPresenter::OnBoundsChanged(void) } void -_TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) +_TabBarPresenter::DrawItem(Canvas* pCanvas) { - SysTryReturnVoidResult(NID_UI_CTRL, __pTextObject != null, E_INVALID_STATE, "[E_INVALID_STATE] TextObject is not constructed."); + result r = E_SUCCESS; + SysTryReturnVoidResult(NID_UI_CTRL, __pTextObject != null, E_INVALID_STATE, "[%s] TextObject is not constructed.", GetErrorMessage(E_INVALID_STATE)); FloatRectangle clientBounds = pCanvas->GetBoundsF(); @@ -740,7 +731,8 @@ _TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) textColor = __tabBar.GetItemTextColor(ITEM_STATUS_DISABLED); if (__pItemBgBitmapCached[ITEM_STATUS_DISABLED] != null) { - pCanvas->DrawNinePatchedBitmap(itemBounds, *__pItemBgBitmapCached[ITEM_STATUS_DISABLED]); + r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[ITEM_STATUS_DISABLED]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } } else @@ -748,7 +740,8 @@ _TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) textColor = __tabBar.GetItemTextColor(itemStatus); if (__pItemBgBitmapCached[itemStatus] != null) { - pCanvas->DrawNinePatchedBitmap(itemBounds, *__pItemBgBitmapCached[itemStatus]); + r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[itemStatus]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } } @@ -768,7 +761,7 @@ _TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) drawText = pDrawItem->GetText(); __pTextObject->RemoveAll(); pSimpleText = new (std::nothrow)TextSimple(const_cast (drawText.GetPointer()), drawText.GetLength()); - SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] TextSimple is not constructed."); + SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pFont = __tabBar.GetFallbackFont(); SysTryReturnVoidResult(NID_UI_CTRL, __pFont != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -793,7 +786,7 @@ _TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas) } void -_TabBarPresenter::DrawBackground(Tizen::Graphics::Canvas* pCanvas) +_TabBarPresenter::DrawBackground(Canvas* pCanvas) { result r = E_SUCCESS; FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -813,7 +806,7 @@ _TabBarPresenter::DrawBackground(Tizen::Graphics::Canvas* pCanvas) } void -_TabBarPresenter::DrawArrow(Tizen::Graphics::Canvas* pCanvas) +_TabBarPresenter::DrawArrow(Canvas* pCanvas) { FloatRectangle clientBounds = __tabBar.GetBoundsF(); @@ -1034,7 +1027,7 @@ _TabBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin } result -_TabBarPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap) +_TabBarPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) { result r = E_SUCCESS; if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) diff --git a/src/ui/controls/FUiCtrl_TabImpl.cpp b/src/ui/controls/FUiCtrl_TabImpl.cpp index 89b0102..842c558 100644 --- a/src/ui/controls/FUiCtrl_TabImpl.cpp +++ b/src/ui/controls/FUiCtrl_TabImpl.cpp @@ -130,7 +130,7 @@ _TabImpl::CreateTabN(void) { result r = E_SUCCESS; - Tab* pTab = new (std::nothrow) Tab; + Tab* pTab = new (std::nothrow) Tab(); SysTryReturn(NID_UI_CTRL, (pTab != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = pTab->Construct(); diff --git a/src/ui/controls/FUiCtrl_TabPresenter.cpp b/src/ui/controls/FUiCtrl_TabPresenter.cpp index 2d4b2e1..c18fa3e 100644 --- a/src/ui/controls/FUiCtrl_TabPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TabPresenter.cpp @@ -71,13 +71,8 @@ _TabPresenter::_TabPresenter(void) , __isRecalculateNeeded(false) , __isEditMode(false) , __editItemIndex(-1) - //, __pVerticalLineBitmap(null) , __pHorizontalLineBitmap(null) -// , __pFrontScrollingEffectBitmap(null) -// , __pRearScrollingEffectBitmap(null) -// , __pScrollingEffectBitmap(null) , __pFocusBitmap(null) -// , __pScrollingEffectVe(null) , __pFlickAnimationTimer(null) , __pScrollAnimationTimer(null) , __flickAnimation() @@ -100,11 +95,8 @@ _TabPresenter::_TabPresenter(void) , __reorderDist(0.0f) , __firstItemIndex(0) , __lastItemIndex(0) -// , __isScrollEffectEnded(false) -// , __isScrollEffectStarted(false) , __timerCount(0) , __isTouchMove(false) -// , __scrollFlag(0) , __tabMinimumSize(0.0f) , __fontChangeItemCount(0) @@ -139,12 +131,6 @@ _TabPresenter::~_TabPresenter(void) __pTextObject = null; } - //if (__pVerticalLineBitmap) - //{ - // delete __pVerticalLineBitmap; - // __pVerticalLineBitmap = null; - //} - if (__pHorizontalLineBitmap) { delete __pHorizontalLineBitmap; @@ -186,35 +172,12 @@ _TabPresenter::~_TabPresenter(void) __pScrollAnimationTimer = null; } -// if (__pFrontScrollingEffectBitmap) -// { -// delete __pFrontScrollingEffectBitmap; -// __pFrontScrollingEffectBitmap = null; -// } - -// if (__pRearScrollingEffectBitmap) -// { -// delete __pRearScrollingEffectBitmap; -// __pRearScrollingEffectBitmap = null; -// } -// -// if (__pScrollingEffectBitmap) -// { -// __pScrollingEffectBitmap = null; -// } - - if(__pFocusBitmap) + if (__pFocusBitmap) { delete __pFocusBitmap; __pFocusBitmap = null; } -// if (__pScrollingEffectVe) -// { -// __pScrollingEffectVe->RemoveAllAnimations(); -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// } } result @@ -227,7 +190,7 @@ _TabPresenter::Construct(const _Tab& tab) __pFont = __pTab->GetFallbackFont(); SysTryReturn(NID_UI_CTRL, __pFont, E_SYSTEM , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to retrive Font."); - _TabModel* pModel = new (std::nothrow) _TabModel; + _TabModel* pModel = new (std::nothrow) _TabModel(); SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = SetModel(*pModel); @@ -236,7 +199,7 @@ _TabPresenter::Construct(const _Tab& tab) r = pModel->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct _TabModel instance."); - __pTextObject = new (std::nothrow) TextObject; + __pTextObject = new (std::nothrow) TextObject(); SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pTextObject->Construct(); @@ -287,41 +250,27 @@ result _TabPresenter::LoadBitmap(void) { result r = E_SUCCESS; - Tizen::Graphics::Bitmap* pBitmap = null; - Tizen::Graphics::Bitmap* pFocusBitmap = null; Color focusBgColor(0x00000000); Color itemSelectedColor(0x00000000); - r = GET_BITMAP_CONFIG_N(TAB::ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); - SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate horizontal line bitmap."); - GET_COLOR_CONFIG(TAB::ITEM_SELECTED, itemSelectedColor); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, itemSelectedColor, __pHorizontalLineBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to locate horizontal line bitmap."); - if (pBitmap) - { - __pHorizontalLineBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pBitmap), Color::GetColor(COLOR_ID_MAGENTA), itemSelectedColor); - SysTryLog(NID_UI_CTRL, (__pHorizontalLineBitmap != null), "Failed to locate focus item line bitmap."); - } + GET_COLOR_CONFIG(TAB::ITEM_BG_HIGHLIGHTED, focusBgColor); + r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, focusBgColor, __pFocusBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Failed to locate focus bitmap."); -// r = GET_BITMAP_CONFIG_N(TAB::TAB_BOUNCE_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap); -// SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate overscrolling left bitmap."); + return r; -// r = GET_BITMAP_CONFIG_N(TAB::TAB_BOUNCE_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, __pRearScrollingEffectBitmap); -// SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate overscrolling right bitmap."); +CATCH: - r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pFocusBitmap); - SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate focus bitmap."); + delete __pHorizontalLineBitmap; + __pHorizontalLineBitmap = null; - GET_COLOR_CONFIG(TAB::ITEM_BG_HIGHLIGHTED, focusBgColor); + delete __pFocusBitmap; + __pFocusBitmap = null; - if (pFocusBitmap) - { - __pFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pFocusBitmap), Color::GetColor(COLOR_ID_MAGENTA), focusBgColor); - SysTryLog(NID_UI_CTRL, (__pFocusBitmap != null), "Failed to locate focus item line bitmap."); - } - - delete pBitmap; - delete pFocusBitmap; return r; } @@ -431,7 +380,7 @@ _TabPresenter::GetItemAt(int index) result _TabPresenter::SetItemStatus(int index, _TabItemStatus status) { - _TabItem *pItem = GetItemAt(index); + _TabItem* pItem = GetItemAt(index); SysTryReturn(NID_UI_CTRL, pItem, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); pItem->SetUpdateState(true); @@ -444,7 +393,7 @@ _TabItemStatus _TabPresenter::GetItemStatus(int index) const { - _TabItem *pItem = __pTab->GetItemAt(index); + _TabItem* pItem = __pTab->GetItemAt(index); if (pItem == null) { @@ -508,7 +457,7 @@ _TabPresenter::Draw(void) __isRecalculateNeeded = false; CalculateItemBounds(); } - else if (__isFlickEnabled ) + else if (__isFlickEnabled) { DrawHorizontal(); } @@ -1609,7 +1558,7 @@ _TabPresenter::DrawEditIconTextItem(Canvas* pCanvas) void _TabPresenter::SetEditItemBounds(const FloatPoint& point) { - _TabItem *pTabItem = null; + _TabItem* pTabItem = null; FloatRectangle editRect(0.0f, 0.0f, 0.0f, 0.0f); pTabItem = GetItemAt(__editItemIndex); SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -1886,7 +1835,6 @@ _TabPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchin return true; } -// __scrollFlag = 0; Rectangle itemBounds(0, 0, 0, 0); _TabItem* pItem = null; @@ -1894,16 +1842,6 @@ _TabPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchin ResetScrollAnimationTimer(); int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); -// if (__pScrollingEffectVe) -// { -// __pScrollingEffectVe->RemoveAllAnimations(); -// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe); -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// __isScrollEffectEnded = false; -// __isScrollEffectStarted = false; -// } - int pressedIndex = GetPressedItemIndex(); __isRightScrollable = false; @@ -2025,9 +1963,9 @@ _TabPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) return true; } - _TabItem *pTabItem = null; - _TabItem *pNextItem = null; - _TabItem *pPrevItem = null; + _TabItem* pTabItem = null; + _TabItem* pNextItem = null; + _TabItem* pPrevItem = null; FloatPoint movedPosition = touchinfo.GetCurrentPosition(); int index = GetNextItemIndexFromPosition(movedPosition, __editItemIndex); @@ -2049,87 +1987,6 @@ _TabPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) distance = movedPosition.x - __currentTouchPosition.x; __currentTouchPosition.x = movedPosition.x; -// if (!__isEditMode && distance > 0.0f) //Move right i.e Bounce at leftEnd -// { -// __isTouchMove = true; -// if (!__isDirectionRight) -// { -// if (__pScrollingEffectVe) -// { -// __pScrollingEffectVe->RemoveAllAnimations(); -// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe); -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// } -// -// __isScrollEffectEnded = false; -// __isScrollEffectStarted = false; -// } -// -// __isDirectionRight = true; -// SetFirstLoadedItemIndex(); -// if ( GetItemAt(0)->GetItemBounds().x >= 0.0f) -// { -// if (!__isScrollEffectStarted) -// { -// __pScrollingEffectBitmap = __pFrontScrollingEffectBitmap; -// SetOpacityVisualElement(0.0f); -// StartScrollingEffect(); -// } -// -// __isScrollEffectStarted = true; -// } -// -// __moveDistance = distance; -// DrawHorizontal(); -// Draw(); -// __moveDistance = 0.0f; -// -// return true; -// } -// -// if (!__isEditMode && distance < 0.0f)//Move left i.e Bounce at RightEnd -// { -// __isTouchMove = true; -// if (__isDirectionRight) -// { -// if (__pScrollingEffectVe) -// { -// __pScrollingEffectVe->RemoveAllAnimations(); -// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe); -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// } -// -// __isScrollEffectEnded = false; -// __isScrollEffectStarted = false; -// } -// -// __isDirectionRight = false; -// SetLastLoadedItemIndex(); -// -// if ( __lastLoadedItemIndex == (GetItemCount() - 1) && ((GetItemAt(__lastLoadedItemIndex)->GetItemBounds().x + __itemWidth) <= (__width))) -// { -// if (!__isScrollEffectStarted) -// { -// int index = (GetItemCount() - 1); -// float xPosition = (GetItemAt(index)->GetItemBounds().x + (__itemWidth / 2.0f)); -// __pScrollingEffectBitmap = __pRearScrollingEffectBitmap; -// SetOpacityVisualElement(xPosition); -// StartScrollingEffect(); -// } -// -// __isScrollEffectStarted = true; -// } -// -// __moveDistance = distance; -// DrawHorizontal(); -// Draw(); -// __moveDistance = 0.0f; -// -// return true; -// } - if (!__isEditMode) { return false; @@ -2214,7 +2071,7 @@ _TabPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) { if (__isDirectionRight) { - _TabItem *pLastItem = GetItemAt(__lastItemIndex); + _TabItem* pLastItem = GetItemAt(__lastItemIndex); SysTryReturn(NID_UI_CTRL, pLastItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); if ((pLastItem->GetItemBounds().x + pLastItem->GetItemBounds().width) > __width) @@ -2294,7 +2151,7 @@ _TabPresenter::ShiftItems(void) bounds = pTabItem->GetItemBounds(); bounds.x = bounds.x + fitDistance; - if ( i == __firstItemIndex && ( bounds.x ) >= (2.0f * __itemWidth)) + if (i == __firstItemIndex && ( bounds.x ) >= (2.0f * __itemWidth)) { return; } @@ -2469,7 +2326,7 @@ _TabPresenter::StartFlickAnimationTimer(void) if (__pFlickAnimationTimer == null) { - __pFlickAnimationTimer = new (std::nothrow) Timer; + __pFlickAnimationTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pFlickAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pFlickAnimationTimer->Construct(*this); @@ -2497,7 +2354,7 @@ _TabPresenter::StartScrollAnimationTimer(void) ResetReorderTimer(); if (__pScrollAnimationTimer == null) { - __pScrollAnimationTimer = new (std::nothrow) Timer; + __pScrollAnimationTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pScrollAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pScrollAnimationTimer->Construct(*this); @@ -2678,7 +2535,7 @@ _TabPresenter::StartReorderTimer(int index) result r = E_SUCCESS; if (__pTimerInfo[index]->pReorderTimer == null) { - __pTimerInfo[index]->pReorderTimer = new (std::nothrow) Timer; + __pTimerInfo[index]->pReorderTimer = new (std::nothrow) Timer(); SysTryReturn(NID_UI_CTRL, (__pTimerInfo[index]->pReorderTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); r = __pTimerInfo[index]->pReorderTimer->Construct(*this); @@ -2790,7 +2647,7 @@ _TabPresenter::StartReorderAnimation(int index, int timerIndex) void _TabPresenter::SwapItems(int indexDest, float distance) { - _TabItem *pItem; + _TabItem* pItem; FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); pItem = GetItemAt(indexDest); SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); @@ -2965,71 +2822,6 @@ _TabPresenter::OnBoundsChanged() return; } -//void -//_TabPresenter::SetOpacityVisualElement(float xPosition) -//{ -// Canvas * pCanvas = null; -// float bounceWidth = (__itemWidth / 2.0f); -// -// if (__pScrollingEffectVe == null) -// { -// __pScrollingEffectVe = new (std::nothrow) _VisualElement(); -// SysTryReturnVoidResult(NID_UI_CTRL, __pScrollingEffectVe, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); -// -// __pScrollingEffectVe->Construct(); -// __pScrollingEffectVe->SetName(L"Opacity"); -// } -// -// __pScrollingEffectVe->SetBounds(FloatRectangle(xPosition, 0.0f, bounceWidth, __itemHeight)); -// __pScrollingEffectVe->SetShowState(true); -// __pScrollingEffectVe->SetImplicitAnimationEnabled(true); -// __pTab->GetVisualElement()->AttachChild(*__pScrollingEffectVe); -// pCanvas = __pScrollingEffectVe->GetCanvasN(); -// -// if (!pCanvas) -// { -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// -// SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(GetLastResult())); -// return; -// } -// -// Color backgroundColor(0, 0, 0, 0); -// pCanvas->SetBackgroundColor(backgroundColor); -// pCanvas->Clear(); -// FloatRectangle rect(0.0f, 0.0f, bounceWidth, __itemHeight); -// -// DrawResourceBitmap(*pCanvas, rect, __pScrollingEffectBitmap); -// -// delete pCanvas; -// return; -//} - -//void -//_TabPresenter::StartScrollingEffect(void) -//{ -// float __startOpacity = 0.0f; -// float __endOpacity = 1.0f; -// -// VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); -// SysTryReturnVoidResult(NID_UI_CTRL, pAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); -// -// pAnimation->SetPropertyName(L"opacity"); -// pAnimation->SetStartValue(Variant(__startOpacity)); -// pAnimation->SetEndValue(Variant(__endOpacity)); -// pAnimation->SetDuration(OVERSCROLL_ANIMATION_DURATION); -// pAnimation->SetVisualElementAnimationStatusEventListener(this); -// -// String animationName3(L"opacity"); -// __pScrollingEffectVe->AddAnimation(animationName3, *pAnimation); -// -// delete pAnimation; -// __isScrollEffectStarted = true; -// return; -// -//} - void _TabPresenter::OnChangeLayout(_ControlOrientation orientation) { @@ -3038,16 +2830,6 @@ _TabPresenter::OnChangeLayout(_ControlOrientation orientation) __isRightScrollable = false; __isLeftScrollable = false; -// if (__pScrollingEffectVe) -// { -// __pScrollingEffectVe->RemoveAllAnimations(); -// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe); -// __pScrollingEffectVe->Destroy(); -// __pScrollingEffectVe = null; -// __isScrollEffectEnded = false; -// __isScrollEffectStarted = false; -// } - ResetScrollAnimationTimer(); ResetReorderTimer(); ResetFlickAnimationTimer(); diff --git a/src/ui/controls/FUiCtrl_TableView.cpp b/src/ui/controls/FUiCtrl_TableView.cpp index 1019042..5e06843 100644 --- a/src/ui/controls/FUiCtrl_TableView.cpp +++ b/src/ui/controls/FUiCtrl_TableView.cpp @@ -23,9 +23,12 @@ #include #include "FUi_ControlManager.h" #include "FUi_ResourceManager.h" +#include "FUi_Window.h" +#include "FUi_CoordinateSystemUtils.h" #include "FUiAnim_VisualElement.h" #include "FUiCtrl_ListViewModel.h" #include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_Form.h" #include "FUiCtrl_Scroll.h" #include "FUiCtrl_TableView.h" #include "FUiCtrl_TableViewPresenter.h" @@ -33,7 +36,6 @@ #include "FUiCtrl_TableViewItemProvider.h" #include "FUiCtrl_TableViewItemProviderAdaptor.h" #include "FUiCtrl_UiTableViewItemEvent.h" -#include "FUi_CoordinateSystemUtils.h" using namespace Tizen::Base; @@ -65,13 +67,8 @@ _TableView::_TableView(void) , __pSweptAnimation(null) , __pRemoveItemtAnimation(null) { - Color bgColor; - - GET_COLOR_CONFIG(TABLEVIEW::BG_NORMAL, bgColor); GET_COLOR_CONFIG(TABLEVIEW::SECTIONITEM_BG_NORMAL, __sectionStyleColor); GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, __itemDividerColor); - - SetBackgroundColor(bgColor); } _TableView::~_TableView(void) @@ -134,10 +131,10 @@ _TableView::CreateTableViewN(TableViewStyle style, bool itemDivider, TableViewSc _TableView* pTableView = null; _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturn(NID_UI_CTRL, pControlManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred."); + SysTryReturn(NID_UI_CTRL, pControlManager, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM)); - pTableView = new (std::nothrow) _TableView; - SysTryCatch(NID_UI_CTRL, pTableView != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pTableView = new (std::nothrow) _TableView(); + SysTryCatch(NID_UI_CTRL, pTableView != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating", GetErrorMessage(r)); @@ -160,7 +157,7 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa result r = E_SUCCESS; _TableViewPresenter* pPresenter = new (std::nothrow) _TableViewPresenter(); - SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pPresenter->Construct(this); SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -176,8 +173,12 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa SetScrollStyle(scrollStyle); SetItemDividerEnabled(itemDivider); - __pExpandGroupAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryReturn(NID_UI_CTRL, __pExpandGroupAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + Color bgColor; + GET_COLOR_CONFIG(TABLEVIEW::BG_NORMAL, bgColor); + SetBackgroundColor(bgColor); + + __pExpandGroupAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryReturn(NID_UI_CTRL, __pExpandGroupAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pExpandGroupAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); r = GetLastResult(); @@ -191,8 +192,8 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pCollapseGroupAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryReturn(NID_UI_CTRL, __pCollapseGroupAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pCollapseGroupAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryReturn(NID_UI_CTRL, __pCollapseGroupAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pCollapseGroupAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); r = GetLastResult(); @@ -206,8 +207,8 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pSweptAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryReturn(NID_UI_CTRL, __pSweptAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pSweptAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryReturn(NID_UI_CTRL, __pSweptAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pSweptAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); r = GetLastResult(); @@ -221,8 +222,8 @@ _TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBa r = GetLastResult(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pRemoveItemtAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryReturn(NID_UI_CTRL, __pRemoveItemtAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pRemoveItemtAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryReturn(NID_UI_CTRL, __pRemoveItemtAnimation != null, false, E_OUT_OF_MEMORY,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pRemoveItemtAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn")); r = GetLastResult(); @@ -316,15 +317,15 @@ _TableView::SetReorderModeEnabled(bool enable) } void -_TableView::RestoreFocus(bool isRestoreFocus) +_TableView::SetAnnexFocused(bool isAnnexFocused) { - return __pTableViewPresenter->RestoreFocus(isRestoreFocus); + return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused); } -void -_TableView::SetAnnexFocused(bool isAnnexFocused) +bool +_TableView::IsAnnexFocused(void) { - return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused); + return __pTableViewPresenter->IsAnnexFocused(); } void @@ -340,6 +341,12 @@ _TableView::IsTableViewFocused(void) } result +_TableView::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const +{ + return __pTableViewPresenter->GetFocusedItemIndex(groupIndex, itemIndex); +} + +result _TableView::SetItemChecked(int groupIndex, int itemIndex, bool check) { if (IsOnProcessing()) @@ -530,10 +537,10 @@ _TableView::AddTableViewItemEventListener(const _ITableViewItemEventListener& li if (__pTableViewItemEvent == null) { __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_SIMPLE); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); } r = __pTableViewItemEvent->AddListener(listener); @@ -545,7 +552,7 @@ _TableView::AddTableViewItemEventListener(const _ITableViewItemEventListener& li result _TableView::RemoveTableViewItemEventListener(const _ITableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewItemEvent->RemoveListener(listener); } @@ -558,10 +565,10 @@ _TableView::AddGroupedTableViewItemEventListener(const _ITableViewItemEventListe if (__pTableViewItemEvent == null) { __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_GROUPED); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); } r = __pTableViewItemEvent->AddListener(listener); @@ -573,7 +580,7 @@ _TableView::AddGroupedTableViewItemEventListener(const _ITableViewItemEventListe result _TableView::RemoveGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewItemEvent->RemoveListener(listener); } @@ -586,10 +593,10 @@ _TableView::AddSectionTableViewItemEventListener(const _ITableViewItemEventListe if (__pTableViewItemEvent == null) { __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_SECTION); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); } r = __pTableViewItemEvent->AddListener(listener); @@ -601,7 +608,7 @@ _TableView::AddSectionTableViewItemEventListener(const _ITableViewItemEventListe result _TableView::RemoveSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewItemEvent->RemoveListener(listener); } @@ -609,7 +616,7 @@ _TableView::RemoveSectionTableViewItemEventListener(const _ITableViewItemEventLi result _TableView::AddFastScrollListener(const _IUiFastScrollListener& listener) { - SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); __pFastScroll->AddFastScrollEventListener(listener); return E_SUCCESS; @@ -618,7 +625,7 @@ _TableView::AddFastScrollListener(const _IUiFastScrollListener& listener) result _TableView::RemoveFastScrollListener(const _IUiFastScrollListener& listener) { - SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); __pFastScroll->RemoveFastScrollEventListener(listener); return E_SUCCESS; @@ -635,9 +642,9 @@ _TableView::SetFastScrollIndex(const String& text, bool useSearchIcon) { SysTryReturn(NID_UI_CTRL, (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || __scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED), - E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL"); - SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed."); - SysTryReturn(NID_UI_CTRL, (useSearchIcon || (!useSearchIcon && text.GetLength() > 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid input argument."); + E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s]The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); + SysTryReturn(NID_UI_CTRL, (useSearchIcon || (!useSearchIcon && text.GetLength() > 0)), E_INVALID_ARG, E_INVALID_ARG,"[%s] Invalid input argument.",GetErrorMessage(E_INVALID_ARG)); result r = E_SUCCESS; @@ -668,10 +675,10 @@ _TableView::SetFastScrollIndex(const String& text, bool useSearchIcon) String fastScrollSearchIconIndex(L"[SEARCH_ICON_INDEX]"); r = GET_BITMAP_CONFIG_N(TABLEVIEW::SEARCH_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchIcon); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] SearchIcon image load failed"); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. SearchIcon image load failed.", GetErrorMessage(E_SYSTEM)); _FastScrollIndex* pIndex = pRootIndex->AddChildIndex(&fastScrollSearchIconIndex, pSearchIcon); - SysTryReturn(NID_UI_CTRL, pIndex, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to add text array to the primary index."); + SysTryReturn(NID_UI_CTRL, pIndex, E_INVALID_STATE, E_INVALID_STATE, "[%s] Primary Index is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); childOrder++; } @@ -737,7 +744,7 @@ _TableView::GetGroupCount(void) const int _TableView::GetItemCountAt(int groupIndex) const { - SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid group index."); + SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), -1, E_INVALID_ARG, "[%s] Invalid argument is used. Group Index={%d} ", GetErrorMessage(E_INVALID_ARG), groupIndex); int itemCount = __pTableViewPresenter->GetItemCountAt(groupIndex); @@ -779,15 +786,20 @@ _TableView::RefreshAllItems(void) return __pTableViewPresenter->RefreshAllItems(); } +void +_TableView::RestoreEditCopyPasteManager(void) +{ + __pTableViewPresenter->RestoreEditCopyPasteManager(); +} result -_TableView::UpdateTableView(void) +_TableView::UpdateTableView(bool isRestoreAnnexFocusValue) { if (IsOnProcessing()) { return E_INVALID_OPERATION; } - return __pTableViewPresenter->UpdateTableView(); + return __pTableViewPresenter->UpdateTableView(isRestoreAnnexFocusValue); } result @@ -816,7 +828,7 @@ _TableView::SetSectionColor(const Color& color) { if (GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) { - SysLog(NID_UI_CTRL, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION."); + SysLog(NID_UI_CTRL, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION.", GetErrorMessage(E_INVALID_OPERATION)); return E_INVALID_OPERATION; } @@ -1015,7 +1027,7 @@ _TableView::FireTableViewItemEvent(int groupIndex, int itemIndex, TableViewNotif if (__pTableViewItemEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, type); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewItemEvent->Fire(*pArg); } } @@ -1026,7 +1038,7 @@ _TableView::FireTableViewItemSweepEvent(int groupIndex, int itemIndex, TableView if (__pTableViewItemEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, directioin, 0, null, TABLEVIEW_NOTIFY_TYPE_ITEM_SWEPT); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewItemEvent->Fire(*pArg); } } @@ -1037,7 +1049,7 @@ _TableView::FireTableViewItemReorderEvent(int fromItemIndex, int toItemIndex) if (__pTableViewItemEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(fromItemIndex, toItemIndex, 0, 0, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewItemEvent->Fire(*pArg); } } @@ -1047,7 +1059,7 @@ _TableView::FireTableViewItemReorderEvent(int fromGroupIndex, int fromItemIndex, if (__pTableViewItemEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(fromGroupIndex, fromItemIndex, toGroupIndex, toItemIndex, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewItemEvent->Fire(*pArg); } } @@ -1058,7 +1070,7 @@ _TableView::FireTableViewContextItemActivationEvent(int groupIndex, int itemInde if (__pTableViewItemEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewItemEvent->Fire(*pArg); } } @@ -1206,6 +1218,42 @@ _TableView::FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemInd __pTableViewPresenter->FireItemTouchReleasedEventDuringPressing(groupIndex, itemIndex); } +_Control* +_TableView::GetParentFormOrWindow(void) const +{ + _Form* pForm = null; + _Window* pWindow = null; + _Control* pControlCore = GetParent(); + + while (true) + { + if (pControlCore == null) + { + SysLog(NID_UI_CTRL,"[E_SYSTEM] The parent form is null."); + + return null; + } + + pForm = dynamic_cast <_Form*>(pControlCore); + + if (pForm != null) + { + break; + } + + pWindow = dynamic_cast <_Window*>(pControlCore); + + if (pWindow != null) + { + break; + } + + pControlCore = pControlCore->GetParent(); + } + + return pControlCore; +} + void _TableView::OnDraw(void) { @@ -1287,10 +1335,10 @@ _TableView::OnBoundsChanged(void) pScroll = _Scroll::CreateScrollN(*this, SCROLL_DIRECTION_VERTICAL, - ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) ? false : true), + (((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) || (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB)) ? false : true), ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP) ? true : false), ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB) ? true : false), - ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) ? true : false), + false, bounds.height, bounds.height, 0); @@ -1307,6 +1355,12 @@ _TableView::OnBoundsChanged(void) _ScrollPanel::OnBoundsChanged(); } +void +_TableView::OnChangeLayout(_ControlOrientation orientation) +{ + __pTableViewPresenter->OnChangeLayout(orientation); +} + _UiTouchEventDelivery _TableView::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { @@ -1363,6 +1417,30 @@ _TableView::OnFocusGained(const _Control& source) return true; } +void +_TableView::SetFocusItemOnPressedState(int groupIndex, int itemIndex) +{ + __pTableViewPresenter->SetFocusItemOnPressedState(groupIndex, itemIndex); +} + +void +_TableView::SetCurrentAccessibilityIndex(int groupIndex, int itemIndex) +{ + __pTableViewPresenter->SetCurrentAccessibilityIndex(groupIndex, itemIndex); +} + +bool +_TableView::OnTraversalControlFocusGained(void) +{ + return __pTableViewPresenter->OnTraversalControlFocusGained(); +} + +bool +_TableView::OnTraversalControlFocusLost(void) +{ + return __pTableViewPresenter->OnTraversalControlFocusLost(); +} + bool _TableView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) { @@ -1423,6 +1501,12 @@ _TableView::GetVisualElementValueAnimation(const Tizen::Base::String& keyName) c return pAnimation; } +void +_TableView::SetFocusDuringOrientationChange(void) +{ + __pTableViewPresenter->SetFocusDuringOrientationChange(); +} + bool _TableView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { diff --git a/src/ui/controls/FUiCtrl_TableViewImpl.cpp b/src/ui/controls/FUiCtrl_TableViewImpl.cpp index 8bcf62a..bdebd6d 100644 --- a/src/ui/controls/FUiCtrl_TableViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_TableViewImpl.cpp @@ -58,7 +58,7 @@ _TableViewImpl::TableViewSizeInfo::GetDefaultMinimumSize(_ControlOrientation ori result r = E_SUCCESS; Tizen::Graphics::Dimension dimension(0, 0); r = GET_DIMENSION_CONFIG(TABLEVIEW::MIN_SIZE, orientation, dimension); - SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] System Error", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error has been occurred.", GetErrorMessage(r)); return dimension; } @@ -159,10 +159,11 @@ _TableViewImpl::CreateTableViewImplN(Container* pPublic, FloatRectangle bounds, SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); _TableView* pCore = _TableView::CreateTableViewN(style, itemDivider, scrollStyle); - SysTryReturn(NID_UI_CTRL, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TableViewImpl* pImpl = new (std::nothrow) _TableViewImpl(pPublic, pCore); - SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + pImpl->SetPublic(style, pPublic); @@ -200,14 +201,14 @@ result _TableViewImpl::SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pItemProvider->SetSimpleStyleItemProvider(pProvider); if (r != E_SUCCESS) @@ -224,14 +225,15 @@ result _TableViewImpl::SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_GROUPED"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_GROUPED", GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + result r = pItemProvider->SetGroupedStyleItemProvider(pProvider); if (r != E_SUCCESS) @@ -248,14 +250,15 @@ result _TableViewImpl::SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + result r = pItemProvider->SetSectionStyleItemProvider(pProvider); if (r != E_SUCCESS) @@ -272,14 +275,14 @@ result _TableViewImpl::SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pItemProvider->SetSimpleStyleItemProviderF(pProvider); if (r != E_SUCCESS) @@ -296,14 +299,14 @@ result _TableViewImpl::SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_GROUPED"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_GROUPED",GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pItemProvider->SetGroupedStyleItemProviderF(pProvider); if (r != E_SUCCESS) @@ -321,14 +324,14 @@ result _TableViewImpl::SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); _TableViewItemProvider* pItemProvider = null; if (pProvider != null) { pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true); - SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = pItemProvider->SetSectionStyleItemProviderF(pProvider); if (r != E_SUCCESS) @@ -349,7 +352,7 @@ _TableViewImpl::AddTableViewItemEventListener(ITableViewItemEventListener& liste if (__pTableViewEvent == null) { __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_SIMPLE); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -367,8 +370,7 @@ _TableViewImpl::AddTableViewItemEventListener(ITableViewItemEventListener& liste result _TableViewImpl::RemoveTableViewItemEventListener(ITableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found"); - + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewEvent->RemoveListener(listener); } @@ -380,7 +382,7 @@ _TableViewImpl::AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventL if (__pTableViewEvent == null) { __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_GROUPED); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -398,7 +400,7 @@ _TableViewImpl::AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventL result _TableViewImpl::RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found"); + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewEvent->RemoveListener(listener); } @@ -411,7 +413,7 @@ _TableViewImpl::AddSectionTableViewItemEventListener(ISectionTableViewItemEventL if (__pTableViewEvent == null) { __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_SECTION); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -429,7 +431,7 @@ _TableViewImpl::AddSectionTableViewItemEventListener(ISectionTableViewItemEventL result _TableViewImpl::RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener) { - SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found"); + SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND)); return __pTableViewEvent->RemoveListener(listener); } @@ -442,12 +444,12 @@ _TableViewImpl::AddFastScrollListener(IFastScrollListener& listener) TableViewScrollBarStyle style = GetCore().GetScrollStyle(); SysTryReturn(NID_UI_CTRL, (style == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || style == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED), - E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL"); + E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION)); if (__pFastScrollEvent == null) { __pFastScrollEvent = new (std::nothrow) _FastScrollEvent(); - SysTryReturn(NID_UI_CTRL, __pFastScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pFastScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = __pFastScrollEvent->Construct(GetPublic()); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -481,7 +483,7 @@ _TableViewImpl::AddScrollEventListener(IScrollEventListener& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollEvent->Construct(GetPublic()); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -517,7 +519,7 @@ _TableViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) if (__pScrollEvent == null) { __pScrollEvent = new (std::nothrow) _ScrollEvent(); - SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pScrollEvent->Construct(GetPublic()); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -765,7 +767,7 @@ result _TableViewImpl::SetGroupedLookEnabled(bool enable) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SIMPLE"); + SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION)); GetCore().SetGroupedLookEnabled(enable); @@ -782,7 +784,8 @@ result _TableViewImpl::BeginReorderingMode(void) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); + SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + return GetCore().SetReorderModeEnabled(true); } @@ -791,7 +794,8 @@ result _TableViewImpl::EndReorderingMode(void) { TableViewStyle style = GetCore().GetTableViewStyle(); - SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); + SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + return GetCore().SetReorderModeEnabled(false); } @@ -809,7 +813,7 @@ _TableViewImpl::OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tab if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndex, 0, 0, 0, pItem, static_cast(status)); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -820,7 +824,7 @@ _TableViewImpl::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndex, 0, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -831,7 +835,7 @@ _TableViewImpl::OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableV if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndexFrom, itemIndexTo, 0, 0, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -842,7 +846,7 @@ _TableViewImpl::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_Ta if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, -1, 0, 0, pItem, static_cast(status)); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -853,7 +857,7 @@ _TableViewImpl::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableVi if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, static_cast(status)); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -864,7 +868,7 @@ _TableViewImpl::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::C if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -875,7 +879,7 @@ _TableViewImpl::OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndexFrom, itemIndexFrom, groupIndexTo, itemIndexTo, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -887,7 +891,7 @@ _TableViewImpl::OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableVi if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(sectionIndex, itemIndex, 0, 0, pItem, static_cast(status)); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -898,7 +902,7 @@ _TableViewImpl::OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::C if (__pTableViewEvent != null) { _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(sectionIndex, itemIndex, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated); - SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pTableViewEvent->Fire(*pArg); } } @@ -957,7 +961,7 @@ _TableViewImpl::OnUiFastScrollIndexSelected(_Control& source, Tizen::Ui::Control if (pIndexText != null) { _FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create _FastScrollEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pFastScrollEvent->Fire(*pEventArg); } } @@ -1025,7 +1029,7 @@ public: static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) { _TableViewMaker* pTableViewMaker = new (std::nothrow) _TableViewMaker(uibuilder); - SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pTableViewMaker; }; protected: @@ -1049,7 +1053,7 @@ protected: } pTableView = new (std::nothrow) TableView(); - SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); rect = pControlProperty->GetRectF(); @@ -1177,7 +1181,7 @@ public: static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) { _GroupedTableViewMaker* pTableViewMaker = new (std::nothrow) _GroupedTableViewMaker(uibuilder); - SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pTableViewMaker; }; protected: @@ -1201,7 +1205,7 @@ protected: } pTableView = new (std::nothrow) GroupedTableView(); - SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); rect = pControlProperty->GetRectF(); @@ -1357,7 +1361,7 @@ public: static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) { _SectionTableViewMaker* pTableViewMaker = new (std::nothrow) _SectionTableViewMaker(uibuilder); - SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pTableViewMaker; }; protected: @@ -1381,7 +1385,7 @@ protected: } pTableView = new (std::nothrow) SectionTableView(); - SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); rect = pControlProperty->GetRectF(); diff --git a/src/ui/controls/FUiCtrl_TableViewItem.cpp b/src/ui/controls/FUiCtrl_TableViewItem.cpp index 2539ffc..ff5ae91 100644 --- a/src/ui/controls/FUiCtrl_TableViewItem.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItem.cpp @@ -134,8 +134,9 @@ _TableViewItemControl* _TableViewItemControl::CreateTableViewItemControlN(void) { _TableViewItemControl* pItemControl = new (std::nothrow) _TableViewItemControl(); - SysTryReturn(NID_UI_CTRL, pItemControl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); - SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + SysTryReturn(NID_UI_CTRL, pItemControl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM)); + pItemControl->AcquireHandle(); @@ -239,6 +240,7 @@ _TableViewItem::_TableViewItem(float itemHeight) , __isTabSoundPlayed(false) , __isSelectedDetailButton(false) , __isSimpleLastItem(false) + , __isSectionItem(false) , __isTouchPressOnScroll(false) , __isTouchCancelOnPressRelease(false) , __pHighlightVisualElement(null) @@ -276,11 +278,11 @@ _TableViewItem::~_TableViewItem() { __isAnimationCallbackBlocked = true; - StopTouchPressedTimer(); + StopTouchPressedTimer(true); delete __pPressedTimer; __pPressedTimer = null; - StopTouchReleasedTimer(); + StopTouchReleasedTimer(true); delete __pReleasedTimer; __pReleasedTimer = null; @@ -400,12 +402,13 @@ _TableViewItem::CreateTableViewItemN(float itemHeight) _TableViewItem* pItem = null; pItem = new (std::nothrow) _TableViewItem(itemHeight); - SysTryReturn(NID_UI_CTRL, pItem, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pItem, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pItem->AcquireHandle(); r = pItem->Initialize(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[E_SYSTEM] Unable to create TableView Item"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM)); + return pItem; @@ -423,7 +426,7 @@ _TableViewItem::Initialize(void) result r = E_SUCCESS; __pHighlightVisualElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pHighlightVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pHighlightVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pHighlightVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct Visual Element.", GetErrorMessage(r)); @@ -723,14 +726,14 @@ _TableViewItem::CreateDetailButton(void) } _Label* -_TableViewItem::GetLabelCore(Label* label) +_TableViewItem::GetLabelCore(Label* pLabel) { - if (label == null) + if (pLabel == null) { return null; } - _LabelImpl* pImpl = _LabelImpl::GetInstance(*label); + _LabelImpl* pImpl = _LabelImpl::GetInstance(*pLabel); return &pImpl->GetCore(); } @@ -806,7 +809,7 @@ _TableViewItem::SetItemBackgroundBitmap(ListItemState itemState, const Bitmap* p Bitmap* pCopyBitmap = null; pCopyBitmap = _BitmapImpl::CloneN(*pBitmap); - SysTryReturn(NID_UI_CTRL, pCopyBitmap != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, pCopyBitmap != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); delete __pItemBgBitmap[itemState]; __pItemBgBitmap[itemState] = pCopyBitmap; @@ -830,7 +833,7 @@ _TableViewItem::SetItemBackgroundBitmap(ListItemState itemState, const Bitmap* p result r = E_SUCCESS; __pBitmapVisualElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pBitmapVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, __pBitmapVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pBitmapVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1129,7 +1132,7 @@ _TableViewItem::OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds if (pDrawBitmap != null) { pCanvas = __pBitmapVisualElement->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -1377,7 +1380,7 @@ _TableViewItem::FireItemTouchPressed() { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; SetItemChanged(true); - Invalidate(); + Invalidate(true); } else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) { @@ -1396,7 +1399,7 @@ _TableViewItem::FireItemTouchPressed() { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; SetItemChanged(true); - Invalidate(); + Invalidate(true); } } else @@ -1405,13 +1408,13 @@ _TableViewItem::FireItemTouchPressed() { __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; SetItemChanged(true); - Invalidate(); + Invalidate(true); } } } void -_TableViewItem::FireItemTouchReleased() +_TableViewItem::FireItemTouchReleased(bool isTouchRelease) { if (__isTouchCancelOnPressRelease == true) { @@ -1485,7 +1488,7 @@ _TableViewItem::FireItemTouchReleased() } SetItemChanged(true); - Invalidate(); + Invalidate(true); } else { @@ -1511,6 +1514,20 @@ _TableViewItem::FireItemTouchReleased() if (fireItemEvent) { + if (isTouchRelease) + { + int groupIndex = -1; + int itemIndex = -1; + GetItemIndex(groupIndex, itemIndex); + if (GetParent()) + { + _TableView* pTableView = dynamic_cast<_TableView*>(GetParent()); + if (pTableView) + { + pTableView->SetFocusItemOnPressedState(groupIndex, itemIndex); + } + } + } FireItemEvent(selectedItem); } } @@ -1541,7 +1558,7 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; SetItemChanged(true); - Invalidate(); + Invalidate(true); } else if (&source == GetLabelCore(__pItemAnnex)) { @@ -1564,7 +1581,7 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; SetItemChanged(true); - Invalidate(); + Invalidate(true); } } else @@ -1575,7 +1592,7 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; SetItemChanged(true); - Invalidate(); + Invalidate(true); } } @@ -1597,16 +1614,7 @@ _TableViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchi __annexOnOffHandlerMoved = false; __itemTouchMoved = false; - __itemSelected = false; - __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; - - if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) - { - __isSelectedDetailButton = false; - } - - SetItemChanged(true); - Invalidate(); + ResetItemState(); if (&source != this) { @@ -1684,6 +1692,8 @@ _TableViewItem::OnChildAttached(const _Control& child) } } + DeactivateChildAccessibilityContainer(child); + pControl->SetTouchPressThreshold(SENSITIVE); FloatRectangle bounds = child.GetBoundsF(); @@ -1730,11 +1740,13 @@ _TableViewItem::OnChildDetached(const _Control& child) if (&child == pSimpleItemTextCore) { + delete __pSimpleItemText; __pSimpleItemText = null; } if (&child == pSimpleItemBitmapCore) { + delete __pSimpleItemBitmap; __pSimpleItemBitmap = null; } } @@ -1786,7 +1798,7 @@ _TableViewItem::StartTouchPressedTimer(const _Control& source, const _TouchInfo& if (__pPressedTimer == null) { __pPressedTimer = new (std::nothrow) Timer(); - SysTryCatch(NID_UI_CTRL, __pPressedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pPressedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pPressedTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage); @@ -1795,7 +1807,7 @@ _TableViewItem::StartTouchPressedTimer(const _Control& source, const _TouchInfo& if (__isPressedTimerEnabled == false) { r = __pPressedTimer->Start(TOUCH_PRESSED_DURATION); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __isPressedTimerEnabled = true; } @@ -1815,7 +1827,7 @@ CATCH: } void -_TableViewItem::StopTouchPressedTimer(void) +_TableViewItem::StopTouchPressedTimer(bool forceStop) { result r = E_SUCCESS; @@ -1824,7 +1836,7 @@ _TableViewItem::StopTouchPressedTimer(void) return; } - if (__isPressedTimerEnabled) + if (__isPressedTimerEnabled || forceStop) { r = __pPressedTimer->Cancel(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1843,7 +1855,8 @@ _TableViewItem::StartTouchReleasedTimer() 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."); + SysTryCatch(NID_UI_CTRL, __pReleasedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + r = __pReleasedTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage); @@ -1852,7 +1865,7 @@ _TableViewItem::StartTouchReleasedTimer() if (!__isReleasedTimerEnabled) { r = __pReleasedTimer->Start(TOUCH_RELEASED_DURATION); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); } __isReleasedTimerEnabled = true; @@ -1871,7 +1884,7 @@ CATCH: } void -_TableViewItem::StopTouchReleasedTimer(void) +_TableViewItem::StopTouchReleasedTimer(bool forceStop) { result r = E_SUCCESS; @@ -1880,7 +1893,7 @@ _TableViewItem::StopTouchReleasedTimer(void) return; } - if (__isReleasedTimerEnabled) + if (__isReleasedTimerEnabled || forceStop) { r = __pReleasedTimer->Cancel(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1922,7 +1935,8 @@ _TableViewItem::StartCheckBoxAnimation(void) if (__pCheckedTimer == null) { __pCheckedTimer = new (std::nothrow) Timer(); - SysTryCatch(NID_UI_CTRL, __pCheckedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pCheckedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); +; r = __pCheckedTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage); @@ -1931,7 +1945,7 @@ _TableViewItem::StartCheckBoxAnimation(void) if (__isCheckedTimerEnabled == false) { r = __pCheckedTimer->Start(CHECKED_ANIMATION_DURATION); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __isCheckedTimerEnabled = true; } @@ -1955,7 +1969,8 @@ _TableViewItem::StopCheckBoxAnimation(void) { result r = E_SUCCESS; - SysTryReturnVoidResult(NID_UI_CTRL, __pCheckedTimer != null, E_SYSTEM, "[E_SYSTEM] Timer is invalid."); + SysTryReturnVoidResult(NID_UI_CTRL, __pCheckedTimer != null, E_SYSTEM, "[%s] A system error has been occurred. Timer is invalid.", GetErrorMessage(E_SYSTEM)); + if (__isCheckedTimerEnabled) { @@ -2003,7 +2018,7 @@ _TableViewItem::PlayCheckBoxAnimation(void) bounds.SetBounds(0, 0, annexWidth, annexHeight); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pCanvas->Construct(bounds); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -2028,7 +2043,7 @@ _TableViewItem::PlayCheckBoxAnimation(void) } pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -2105,13 +2120,23 @@ _TableViewItem::OnBoundsChanged(void) { __pAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height)); } + + RemoveFocusRing(true); + if (IsFocusModeStateEnabled()) + { + if (GetRootWindow() && GetRootWindow()->IsActivated() + && IsFocused()) + { + DrawFocus(); + } + } } void _TableViewItem::SetDrawingProperty(_ItemDrawingProperty* pDrawingProperty) { - SysTryReturnVoidResult(NID_UI_CTRL, pDrawingProperty != null, E_INVALID_ARG, "[E_INAVLID_ARG] pDrawingProperty is null"); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawingProperty != null, E_INVALID_ARG, "[%s] Invalid argument(s) is used. The pDrawingProperty is null.", GetErrorMessage(E_INVALID_ARG)); __pDrawingProperty = pDrawingProperty; @@ -2167,7 +2192,7 @@ _TableViewItem::DrawItemBackground(void) else { pCanvas = __pBitmapVisualElement->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -2277,11 +2302,9 @@ void _TableViewItem::DrawSectionStyleBackground(void) { Canvas* pCanvas = null; - Bitmap* pSectionBg = null; - Bitmap* pSectionPressBg = null; - Bitmap* pSectionDisabledBg = null; Bitmap* pReplacementSectionPressBg = null; Bitmap* pReplacementSectionBg = null; + Bitmap* pReplacementSectionDisabledBg = null; Color bgColor = __colorItemBg[__drawingStatus]; FloatRectangle bounds = GetBoundsF(); float dividerHeight = 0.0f; @@ -2289,32 +2312,58 @@ _TableViewItem::DrawSectionStyleBackground(void) result r = E_SUCCESS; pCanvas = GetVisualElement()->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); - if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) - { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg); - } - else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) + if (bgColor != null) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg); - } - else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) - { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg); - } - else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) - { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg); + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); + } + else + { + r = E_SYSTEM; + } } else { - r = E_SYSTEM; + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg); + } + else + { + r = E_SYSTEM; + } } - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); if (__enabledState) { @@ -2324,107 +2373,96 @@ _TableViewItem::DrawSectionStyleBackground(void) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight); - if (pSectionPressBg) + if (pReplacementSectionPressBg) { - pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionPressBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); + DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionPressBg); } else { - pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); + DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionBg); } - - DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionPressBg); } else { - if (bgColor != null) - { - pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - } - else - { - pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), __pDrawingProperty->sectionStyleBgColor); - } - DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg); } } else { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { 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"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); } } - GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); - if (pSectionDisabledBg) + if (pReplacementSectionDisabledBg) { - pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionDisabledBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionDisabledBg); } else { - pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg); } - DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg); } if (__pDrawingProperty->groupedLookEnabled == true) @@ -2442,11 +2480,9 @@ _TableViewItem::DrawSectionStyleBackground(void) } CATCH: - delete pSectionBg; - delete pSectionPressBg; - delete pSectionDisabledBg; delete pReplacementSectionPressBg; delete pReplacementSectionBg; + delete pReplacementSectionDisabledBg; delete pCanvas; } @@ -2459,80 +2495,75 @@ _TableViewItem::DrawSectionStyleBackgroundCover(void) return; } - Bitmap* pSectionBgCoverEf = null; Bitmap* pReplacementSectionBgEf = null; Bitmap* pReplacementSectionBg = null; - Bitmap* pSectionBgCoverBg = null; Bitmap* pMergeBitmap = null; Canvas* pCanvas = null; Color bgColor; result r = E_SUCCESS; FloatRectangle bounds = GetBoundsF(); + + if (__enabledState) + { + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + SysTryCatch(NID_UI_CTRL, pParent != null, , E_SYSTEM, "[%s] A system error has been occurred. SectionTableView load failed", GetErrorMessage(E_SYSTEM)); + + bgColor = pParent->GetBackgroundColor(); + } + else + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); + } + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf); } else { r = E_SYSTEM; } - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); } else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM) { - r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg); } else { r = E_SYSTEM; } - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed"); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); __pItemCover->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); - if (__enabledState) - { - _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); - SysTryCatch(NID_UI_CTRL, pParent != null, , E_SYSTEM, "[E_SYSTEM] SectionTableView load failed"); - - bgColor = pParent->GetBackgroundColor(); - } - else - { - GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); - } - - pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - pReplacementSectionBgEf = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverEf, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); - + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -2541,7 +2572,7 @@ _TableViewItem::DrawSectionStyleBackgroundCover(void) DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBgEf); pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); @@ -2550,10 +2581,8 @@ _TableViewItem::DrawSectionStyleBackgroundCover(void) __pItemCover->SetBackgroundBitmap(*pMergeBitmap); CATCH: - delete pSectionBgCoverEf; delete pReplacementSectionBgEf; delete pReplacementSectionBg; - delete pSectionBgCoverBg; delete pCanvas; delete pMergeBitmap; } @@ -2562,7 +2591,6 @@ void _TableViewItem::DrawContextItemBackground(void) { Canvas* pCanvas = null; - Bitmap* pContextBg = null; Bitmap* pContextBgEf = null; Bitmap* pReplacementContextBg = null; Color bgColor = __colorItemBg[__drawingStatus]; @@ -2570,18 +2598,6 @@ _TableViewItem::DrawContextItemBackground(void) FloatRectangle bounds = GetBoundsF(); result r = E_SUCCESS; - r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBg); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed"); - - r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBgEf); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed"); - - pCanvas = GetVisualElement()->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); - - pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); - pCanvas->Clear(); - if (__enabledState) { if (bgColor == null) @@ -2593,15 +2609,24 @@ _TableViewItem::DrawContextItemBackground(void) { GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); } - pReplacementContextBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pContextBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor); - SysTryCatch(NID_UI_CTRL, pReplacementContextBg != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementContextBg); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. ContextItem image load failed", GetErrorMessage(E_SYSTEM)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBgEf); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. ContextItem image load failed", GetErrorMessage(E_SYSTEM)); + + pCanvas = GetVisualElement()->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementContextBg); DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pContextBgEf); CATCH: delete pCanvas; - delete pContextBg; delete pContextBgEf; delete pReplacementContextBg; } @@ -2707,7 +2732,7 @@ _TableViewItem::DrawCheckBox(void) bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(bounds); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -2728,7 +2753,7 @@ _TableViewItem::DrawCheckBox(void) } pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -2763,27 +2788,28 @@ _TableViewItem::DrawRadioBox(void) if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM)); } else if ((__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) || (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED)) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM)); + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM)); } } else { r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM)); } GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); @@ -2791,7 +2817,7 @@ _TableViewItem::DrawRadioBox(void) bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(bounds); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -2805,7 +2831,7 @@ _TableViewItem::DrawRadioBox(void) } pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -2860,7 +2886,7 @@ _TableViewItem::DrawOnOffButton(void) r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); } } - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[E_SYSTEM] OnOffButtonHandler image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffButtonHandler image load failed", GetErrorMessage(E_SYSTEM)); if (__enabledState) { @@ -2870,14 +2896,14 @@ _TableViewItem::DrawOnOffButton(void) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton); } - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), , E_SYSTEM, "[E_SYSTEM] OnOffButton image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffButton image load failed", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); bounds.SetBounds(0, 0, annexWidth, annexHeight); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(bounds); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -2900,7 +2926,7 @@ _TableViewItem::DrawOnOffButton(void) DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler); pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -2941,7 +2967,7 @@ _TableViewItem::AdjustAnnexOnOffHandlerPosition() { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); } - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), E_SYSTEM, "[E_SYSTEM] OnOffHandlerButton button image load failed."); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), E_SYSTEM, "[%s] A system error has been occurred. OnOffHandlerButton button image load failed.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); @@ -2956,7 +2982,7 @@ _TableViewItem::AdjustAnnexOnOffHandlerPosition() 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); @@ -3011,7 +3037,7 @@ _TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) float nextHandlerX = 0.0f; r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton); - SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), E_SYSTEM, "[E_SYSTEM] OnOffButton image load failed."); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), E_SYSTEM, "[%s] A system error has been occurred. OnOffButton image load failed", GetErrorMessage(E_SYSTEM)); if (IsChecked() == true) { @@ -3021,14 +3047,14 @@ _TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); } - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[E_SYSTEM] OnOffHandlerButton image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffHandlerButton button image load failed.", GetErrorMessage(E_SYSTEM)); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(FloatRectangle(0, 0, annexWidth, annexHeight)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -3070,7 +3096,7 @@ _TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler); pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, FloatRectangle(0, 0, annexWidth, annexHeight)); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -3090,8 +3116,6 @@ CATCH: void _TableViewItem::DrawDetailButton(void) { - Bitmap* pDetail = null; - Bitmap* pDetailBg = null; Bitmap* pDetailBgEffect = null; Bitmap* pDetailEffect = null; Bitmap* pReplacementDetail = null; @@ -3111,24 +3135,22 @@ _TableViewItem::DrawDetailButton(void) 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"); - if (__isSelectedDetailButton) { if (!themeBackgroundBitmap) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM,"[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); } - r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); - GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_PRESSED, replacementNewColor); + + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_BG_PRESSED, replacementNewBgColor); } else @@ -3136,44 +3158,45 @@ _TableViewItem::DrawDetailButton(void) if (!themeBackgroundBitmap) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); } - r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); - GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor); + + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_BG_NORMAL, replacementNewBgColor); } } else { - if (!themeBackgroundBitmap) { r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); } - r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor); - r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBg); - SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBg != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); - GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor); + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewBgColor, pReplacementDetailBg); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetailBg != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); } - pReplacementDetailBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pDetailBg, Color::GetColor(COLOR_ID_MAGENTA), replacementNewBgColor); - SysTryCatch(NID_UI_CTRL, pReplacementDetailBg != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); - pReplacementDetail = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pDetail, Color::GetColor(COLOR_ID_MAGENTA), replacementNewColor); - SysTryCatch(NID_UI_CTRL, pReplacementDetail != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Detail button image load failed"); + if (pReplacementDetailBg == null) + { + r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewBgColor, pReplacementDetailBg); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetailBg != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); + } GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); @@ -3181,7 +3204,7 @@ _TableViewItem::DrawDetailButton(void) bounds.SetBounds(0, 0, annexWidth, annexHeight); pCanvas = new (std::nothrow) Canvas(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Construct(bounds); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); @@ -3199,8 +3222,7 @@ _TableViewItem::DrawDetailButton(void) } pMergeBitmap = new (std::nothrow) Bitmap(); - SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); - + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pMergeBitmap->Construct(*pCanvas, bounds); _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); @@ -3208,8 +3230,6 @@ _TableViewItem::DrawDetailButton(void) __pItemAnnex->Invalidate(false); CATCH: - delete pDetail; - delete pDetailBg; delete pDetailBgEffect; delete pDetailEffect; delete pReplacementDetail; @@ -3231,7 +3251,8 @@ _TableViewItem::DrawItemDivider(void) if (__pDrawingProperty->itemDividerEnabled == false || __itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER || - __itemDividerEnabled == false) + __itemDividerEnabled == false || + __isSectionItem) { __pItemDivider->SetVisibleState(false); __pItemTopDivider->SetVisibleState(false); @@ -3274,7 +3295,6 @@ _TableViewItem::DrawItemDivider(void) { float lineHeight = 0.0f; float lineLeftMargin = 0.0f; - float lineBottomMargin = 0.0f; bounds = GetBoundsF(); if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) @@ -3288,12 +3308,10 @@ _TableViewItem::DrawItemDivider(void) GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight); GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin); - GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineBottomMargin); lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight); - lineBottomMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineBottomMargin); bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, bounds.height)); - dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y - lineBottomMargin, bounds.width - lineLeftMargin * 2.0f, lineHeight); + dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); } } else @@ -3301,15 +3319,6 @@ _TableViewItem::DrawItemDivider(void) float lineLeftMargin = 0.0f; float lineHeight = 0.0f; bounds = GetBoundsF(); - int groupIndex = -1; - int itemIndex = -1; - - GetItemIndex(groupIndex, itemIndex); - - if (itemIndex < 1) - { - __pItemTopDivider->SetVisibleState(false); - } if (!IsContextItem()) { @@ -3318,6 +3327,7 @@ _TableViewItem::DrawItemDivider(void) if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE) { __pItemDivider->SetVisibleState(false); + __pItemTopDivider->SetVisibleState(false); } } } @@ -3332,7 +3342,7 @@ _TableViewItem::DrawItemDivider(void) lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight); bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height))); - dividerTopBounds.SetBounds(lineLeftMargin, 0.0f, bounds.width - lineLeftMargin * 2.0f, lineHeight); + dividerTopBounds.SetBounds(lineLeftMargin, bottomPoint.y - (lineHeight * 2.0f), bounds.width - lineLeftMargin * 2.0f, lineHeight); dividerBottomBounds.SetBounds(lineLeftMargin, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); } @@ -3459,12 +3469,12 @@ _TableViewItem::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const B if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) { r = canvas.DrawNinePatchedBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Fail to draw ninepatched bitmap.", GetErrorMessage(r)) + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap."); } else { r = canvas.DrawBitmap(bounds, bitmap); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Fail to draw bitmap.", GetErrorMessage(r)) + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap."); } return r; @@ -4023,9 +4033,20 @@ _TableViewItem::AdjustAnnexBounds(void) float leftMargin = 0.0f; GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); - leftMargin += __pDrawingProperty->scrollMargin; + + if (__pDrawingProperty != null) + { + leftMargin += __pDrawingProperty->scrollMargin; + } annexPositionX = GetBoundsF().width - annexBounds.width - leftMargin; + if (__pDrawingProperty != null && __pDrawingProperty->groupedLookEnabled) + { + float groupedBarMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, groupedBarMargin); + + annexPositionX += groupedBarMargin; + } if (!_FloatCompare(annexPositionX, annexBounds.x)) { @@ -4173,8 +4194,8 @@ _TableViewItem::MoveItem(FloatPoint position, int duration, int delay) if (__pMoveItemAnimation == null) { - __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pMoveItemAnimation->SetVisualElementAnimationTickEventListener(this); r = GetLastResult(); @@ -4223,8 +4244,8 @@ _TableViewItem::ZoomInOutItem(bool zoomOut, int duration, int delay) if (__pZoomInOutItemAnimation == null) { - __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(this); r = GetLastResult(); @@ -4283,8 +4304,8 @@ _TableViewItem::FadeInOutItem(bool fadeOut, int duration, int delay) if (__pFadeInOutItemtAnimation == null) { - __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation; - SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation(); + SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(this); r = GetLastResult(); @@ -4362,14 +4383,7 @@ _TableViewItem::SetIndividualSelectionEnabled(const _Control& control, bool enab controlCount++; } - if (controlCount == 0 || __individualSelectionControls.GetCount() == controlCount) - { - GetAccessibilityContainer()->Activate(false); - } - else - { - GetAccessibilityContainer()->Activate(true); - } + GetAccessibilityContainer()->Activate(true); } else { @@ -4438,6 +4452,15 @@ _TableViewItem::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimati { FloatPoint position = currentValue.ToFloatPoint(); SetPosition(position); + if (GetParent()) + { + _TableView* pTableView = dynamic_cast<_TableView*>(GetParent()); + if (pTableView) + { + //Move handler position while animation in progress + pTableView->RestoreEditCopyPasteManager(); + } + } } else if (keyName == L"FADE_IN_OUT_ITEM") { @@ -4534,6 +4557,18 @@ _TableViewItem::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::Vi if (tableViewItemAnimation) { __animationCount--; + if (__animationCount == 0) + { + if (GetParent()) + { + _TableView* pTableView = dynamic_cast<_TableView*>(GetParent()); + if (pTableView) + { + //Move handler position at end of Move animation + pTableView->RestoreEditCopyPasteManager(); + } + } + } } return; @@ -4560,7 +4595,7 @@ _TableViewItem::SetAccessibilityElement(void) if (__pAccessibilityElement == null) { __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pAccessibilityElement->SetName(L"TableViewItem"); @@ -4571,13 +4606,12 @@ _TableViewItem::SetAccessibilityElement(void) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityOnOffElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pAccessibilityOnOffElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); __pAccessibilityOnOffElement->SetName(L"OnOffButton"); - __pAccessibilityOnOffElement->SetHint(hintText); + __pAccessibilityOnOffElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); pContainer->AddElement(*__pAccessibilityOnOffElement); __pAccessibilityOnOffElement->SetBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)); @@ -4590,6 +4624,7 @@ _TableViewItem::GetAccessibilityElement(void) { return __pAccessibilityElement; } + void _TableViewItem::SetAccessibilityElementTrait(void) { @@ -4599,7 +4634,7 @@ _TableViewItem::SetAccessibilityElementTrait(void) } int groupIndex = -1; int itemIndex = -1; - + switch (__annexStyle) { case TABLE_VIEW_ANNEX_STYLE_NORMAL: @@ -4640,7 +4675,7 @@ _TableViewItem::SetAccessibilityElementValue(void) { return; } - + switch (__annexStyle) { case TABLE_VIEW_ANNEX_STYLE_MARK: @@ -4728,25 +4763,8 @@ _TableViewItem::SetAccessibilityElementLabel(void) continue; } - if (!IsIndividualSelectionEnabled(*pChildControl)) - { - _AccessibilityContainer* pContainer = pChildControl->GetAccessibilityContainer(); - LinkedListT<_AccessibilityElement*> accessibilityElements; - _AccessibilityElement* pElement = null; - - pContainer->GetElements(accessibilityElements); - pContainer->Activate(false); - int elementCount = accessibilityElements.GetCount(); - - for (int i = 0; i < elementCount; i++) - { - if (accessibilityElements.GetAt(i, pElement) == E_SUCCESS) - { - accessibilityLabel += pElement->GetLabel(); - accessibilityLabel += space; - } - } - } + accessibilityLabel += GetChildAccessibilityLabelContent(*pChildControl); + accessibilityLabel += space; } __pAccessibilityElement->SetLabel(accessibilityLabel); @@ -4783,6 +4801,14 @@ _TableViewItem::OnAccessibilityReadingElement(const _AccessibilityContainer& con bool _TableViewItem::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) { + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + + if (pParent == null) + { + return false; + } + + pParent->SetCurrentAccessibilityIndex(__itemGroupIndex, __itemIndex); return false; } @@ -4885,13 +4911,39 @@ _TableViewItem::OnAccessibilityValueDecreased(const _AccessibilityContainer& con return false; } +void +_TableViewItem::DrawFocusOnInternalItem(_Control* pChildControl) +{ + pChildControl->SetFocused(true); + pChildControl->DrawFocus(); + _Control* pParent = pChildControl->GetParent(); + while (pParent != null && pParent->GetHashCode() != this->GetHashCode()) + { + _ScrollPanel* pScrollPanel = dynamic_cast<_ScrollPanel*>(pParent); + if (pScrollPanel) + { + pScrollPanel->OnChildControlFocusMoved(*pChildControl); + return; + } + pParent = pParent->GetParent(); + } +} + bool _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { - if (!IsFocusModeStateEnabled()) + __isTouchCancelOnPressRelease = false; + + if (!IsFocusModeStateEnabled() || !IsVisible() || !IsEnabled()) + { + return false; + } + + if (IsReorderMode() || IsAnimationPlaying()) { return false; } + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); _KeyCode keyCode = keyInfo.GetKeyCode(); IListT<_Control*>* pFocusList = GetFocusListN(); @@ -4904,6 +4956,14 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (pTop) { pFocusedControl = pTop->GetCurrentFocusControl(); + if (pFocusedControl) + { + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl); + if (pFocusTraversalControl != GetParent()) + { + return false; + } + } } int count = pFocusList->GetCount(); @@ -4963,8 +5023,7 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { pParent->SetAnnexFocused(true); } - pChildControl->SetFocused(true); - pChildControl->DrawFocus(); + DrawFocusOnInternalItem(pChildControl); } else { @@ -5054,12 +5113,16 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState() && pChildControl->IsFocusable()) { + if (IsFocused() && __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + ResetItemState(); + } + if (pParent != null) { pParent->SetAnnexFocused(true); } - pChildControl->SetFocused(true); - pChildControl->DrawFocus(); + DrawFocusOnInternalItem(pChildControl); } break; @@ -5110,7 +5173,12 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) bool _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { - if (!IsFocusModeStateEnabled()) + if (!IsFocusModeStateEnabled() || !IsVisible() || !IsEnabled()) + { + return false; + } + + if (IsReorderMode() || IsAnimationPlaying()) { return false; } @@ -5139,7 +5207,7 @@ _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE; } - FireItemTouchReleased(); + FireItemTouchReleased(false); return true; } else if (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT) @@ -5150,6 +5218,28 @@ _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) return false; } +void +_TableViewItem::OnFocusModeStateChanged(void) +{ + ResetItemState(); +} + +void +_TableViewItem::ResetItemState(void) +{ + __itemSelected = false; + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE; + + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + __isSelectedDetailButton = false; + } + + SetItemChanged(true); + Invalidate(true); +} + _Control* _TableViewItem::GetPreviousFocusChildControl(const _Control& source) { @@ -5267,6 +5357,12 @@ _TableViewItem::SetSimpleLastItemEnabled(bool enable) } void +_TableViewItem::SetSectionItem(bool isSectionItem) +{ + __isSectionItem = isSectionItem; +} + +void _TableViewItem::SetTouchPressOnScroll(bool isTouch) { __isTouchPressOnScroll = isTouch; @@ -5281,7 +5377,7 @@ _TableViewItem::IsTouchPressOnScroll(void) const void _TableViewItem::OnVisibleStateChanged(void) { - if (IsFocused()) + if (IsFocused() && !GetVisibleState()) { RemoveFocusRing(); } @@ -5290,7 +5386,7 @@ _TableViewItem::OnVisibleStateChanged(void) void _TableViewItem::OnAncestorEnableStateChanged(const _Control& control) { - if (IsFocused()) + if (IsFocused() && !IsEnabled()) { RemoveFocusRing(); } @@ -5299,7 +5395,7 @@ _TableViewItem::OnAncestorEnableStateChanged(const _Control& control) void _TableViewItem::OnAncestorVisibleStateChanged(const _Control& control) { - if (IsFocused()) + if (IsFocused() && !IsVisible()) { RemoveFocusRing(); } @@ -5323,5 +5419,107 @@ _TableViewItem::SetPublicLabelUpdate(bool resetPublicLabelUpdate) } } +void +_TableViewItem::ResetTextSlide(void) +{ + return; +} + +String +_TableViewItem::GetChildAccessibilityLabelContent(const _Control& source) +{ + String accessibilityLabel = L""; + String space = L" "; + + if (IsIndividualSelectionEnabled(source)) + { + return accessibilityLabel; + } + + if (!source.IsVisible() || !source.GetEnableState()) + { + return accessibilityLabel; + } + + _Control* pSource = const_cast<_Control*>(&source); + + if (pSource) + { + _AccessibilityContainer* pContainer = pSource->GetAccessibilityContainer(); + LinkedListT<_AccessibilityElement*> accessibilityElements; + _AccessibilityElement* pElement = null; + + if (pContainer) + { + pContainer->GetElements(accessibilityElements); + int elementCount = accessibilityElements.GetCount(); + + for (int i = 0; i < elementCount; i++) + { + if (accessibilityElements.GetAt(i, pElement) == E_SUCCESS) + { + accessibilityLabel += pElement->GetLabel(); + accessibilityLabel += space; + } + } + } + } + + //check for children + int childControlCount = source.GetChildCount(); + + for (int i = 0; i < childControlCount; i++) + { + _Control* pChildControl = source.GetChild(i); + + if (pChildControl == null) + { + continue; + } + + accessibilityLabel += GetChildAccessibilityLabelContent(*pChildControl); + } + + return accessibilityLabel; +} + +void +_TableViewItem::DeactivateChildAccessibilityContainer(const _Control& source) +{ + _Control* pControl = const_cast<_Control*>(&source); + + if (pControl) + { + _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer(); + + if (pContainer) + { + if (__individualSelectionControls.Contains(source)) + { + pContainer->Activate(true); + } + else + { + pContainer->Activate(false); + } + } + } + + //check for children + int childControlCount = source.GetChildCount(); + + for (int i = 0; i < childControlCount; i++) + { + _Control* pChildControl = source.GetChild(i); + + if (pChildControl == null) + { + continue; + } + + DeactivateChildAccessibilityContainer(*pChildControl); + } +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItemEvent.cpp b/src/ui/controls/FUiCtrl_TableViewItemEvent.cpp index 610b56a..6d72bcc 100644 --- a/src/ui/controls/FUiCtrl_TableViewItemEvent.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItemEvent.cpp @@ -55,7 +55,7 @@ result _TableViewItemEvent::Construct(Tizen::Ui::Control* pSource, TableViewStyle style) { result r = _Event::Initialize(); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Could not construct TableViewItemEvent!"); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Could not construct TableViewItemEvent!"); __pSource = pSource; @@ -75,7 +75,8 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { // cast to _ItemEventArg _TableViewItemEventArg* pEventArg = dynamic_cast<_TableViewItemEventArg*>(const_cast(&arg)); - SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); + int index1 = pEventArg->GetArg1(); int index2 = pEventArg->GetArg2(); @@ -97,41 +98,41 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (index2 == -1) { TableViewGroupItem* pGroupItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_SELECTED); } else { TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); } @@ -139,13 +140,13 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); } @@ -156,41 +157,41 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (index2 == -1) { TableViewGroupItem* pGroupItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); } else { TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); } @@ -198,13 +199,13 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); } @@ -215,41 +216,41 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (index2 == -1) { TableViewGroupItem* pGroupItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_CHECKED); } else { TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); } @@ -257,13 +258,13 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); } @@ -274,40 +275,40 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used.", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (index2 == -1) { TableViewGroupItem* pGroupItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); } else { TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); } @@ -315,13 +316,13 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); } @@ -332,41 +333,41 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_MORE); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (index2 == -1) { TableViewGroupItem* pGroupItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_MORE); } else { TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); } @@ -374,13 +375,13 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); TableViewItem* pItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); } @@ -411,20 +412,20 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewItemReordered(*pTableView, index1, index2); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewItemReordered(*pTableView, index1, index2, index3, index4); } @@ -435,39 +436,39 @@ _TableViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) if (tempInvokeTableViewItemCallback == true) { _TableViewItem* pItem = pEventArg->GetItem(); - SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableViewItemBase* pItemBase = static_cast(pItem->GetAppInfo()); TableViewContextItem* pContextItem = dynamic_cast(pItemBase); - SysTryReturnVoidResult(NID_UI_CTRL, pContextItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pContextItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if (__style == TABLE_VIEW_STYLE_SIMPLE) { ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); TableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnTableViewContextItemActivationStateChanged(*pTableView, index1, pContextItem, activated); } else if (__style == TABLE_VIEW_STYLE_GROUPED) { IGroupedTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); GroupedTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnGroupedTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pContextItem, activated); } else { ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); SectionTableView* pTableView = dynamic_cast(GetSource()); - SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); pItemListener->OnSectionTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pContextItem, activated); } diff --git a/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp b/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp index fbeec36..b97b3ec 100644 --- a/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp @@ -118,20 +118,20 @@ _TableViewItemImpl::CreateTableViewItemImplN(TableViewItemBase* pPublic, const T if (pPublicPortraitLayout != null) { _LayoutImpl* pPortraitLayoutImpl = _LayoutImpl::GetInstance(*pPublicPortraitLayout); - SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Portrait layout is invalid object"); + SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[%s] Invalid Portrait layout argument(s) is used. ",GetErrorMessage(E_INVALID_ARG)); } if (pPublicLandscapeLayout != null) { _LayoutImpl* pLandscapeLayoutImpl = _LayoutImpl::GetInstance(*pPublicLandscapeLayout); - SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Landscape layout is invalid object"); + SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[%s] Invalid Landscape layout argument(s) is used. ",GetErrorMessage(E_INVALID_ARG)); } _TableViewItem* pCore = _TableViewItem::CreateTableViewItemN(itemSize.height); - SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); _TableViewItemImpl* pImpl = new (std::nothrow) _TableViewItemImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); - SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pImpl->Construct(itemSize, style); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -152,7 +152,7 @@ _TableViewItemImpl::Construct(const FloatDimension& itemSize, const TableViewAnn { result r = E_SUCCESS; - SysTryReturn(NID_UI_CTRL, (itemSize.width >= 0 && itemSize.height >= 0), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The item size should be greater than 0")); //CONVERTFLOAT_1 + SysTryReturn(NID_UI_CTRL, (itemSize.width >= 0 && itemSize.height >= 0), E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. The item size should be greater than 0." , GetErrorMessage(E_INVALID_ARG)); //CONVERTFLOAT_1 GetCore().SetItemStyle(style); GetCore().SetItemWidth(itemSize.width); @@ -194,8 +194,7 @@ _TableViewItemImpl::GetSelectionStyle(void) const result _TableViewItemImpl::SetBackgroundBitmap(TableViewItemDrawingStatus status, const Bitmap* pBitmap) { - SysTryReturn(NID_UI_CTRL, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] It is invalid argument"); - + SysTryReturn(NID_UI_CTRL, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. ", GetErrorMessage(E_INVALID_ARG)); ListItemState itemState; switch (status) diff --git a/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp index 1cca16a..210c1dd 100644 --- a/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp @@ -91,7 +91,7 @@ _TableViewItemProviderAdaptor::IsItemProvider() const int _TableViewItemProviderAdaptor::GetItemCount(int groupIndex) const { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); if (__style == TABLE_VIEW_STYLE_SECTION) { @@ -107,7 +107,7 @@ _TableViewItemProviderAdaptor::GetItemCount(int groupIndex) const int _TableViewItemProviderAdaptor::GetGroupCount(void) const { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); if (__style == TABLE_VIEW_STYLE_SIMPLE) { @@ -120,7 +120,7 @@ _TableViewItemProviderAdaptor::GetGroupCount(void) const _IListItemCommon* _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, null, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, null, E_SYSTEM, "[%s] A system error has been occurred. This instance isn't constructed.", GetErrorMessage(E_SYSTEM)); TableViewItem* pItem = null; TableViewGroupItem* pGroupItem = null; @@ -302,8 +302,9 @@ _TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) result _TableViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); - SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] pItemCore is invalid argument."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] pItemCore is invalid argument. ", GetErrorMessage(E_INVALID_ARG)); + TableViewItem* pItem = static_cast (pItemCore->GetAppInfo()); TableViewItemTag index = {groupIndex, itemIndex}; @@ -351,8 +352,8 @@ _TableViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pItemCore, int group result _TableViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); - SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] pItemCore is invalid argument."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] pItemCore is invalid argument. ", GetErrorMessage(E_INVALID_ARG)); TableViewItem* pItem = static_cast (pItemCore->GetAppInfo()); @@ -379,7 +380,7 @@ _TableViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pItemCore, int group bool _TableViewItemProviderAdaptor::UpdateItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); TableViewItemTag itemTag = {groupIndex, itemIndex}; bool ret = false; @@ -437,7 +438,7 @@ _TableViewItemProviderAdaptor::SetTableViewPresenter(_TableViewPresenter* pPrese bool _TableViewItemProviderAdaptor::HasSectionHeader(int groupIndex) const { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); return __pTableViewProvider->HasSectionHeader(groupIndex); } @@ -445,7 +446,7 @@ _TableViewItemProviderAdaptor::HasSectionHeader(int groupIndex) const bool _TableViewItemProviderAdaptor::HasSectionFooter(int groupIndex) const { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); return __pTableViewProvider->HasSectionFooter(groupIndex); } @@ -453,7 +454,7 @@ _TableViewItemProviderAdaptor::HasSectionFooter(int groupIndex) const float _TableViewItemProviderAdaptor::GetItemHeight(int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); float itemHeight = 0.0f; @@ -473,7 +474,7 @@ _TableViewItemProviderAdaptor::GetItemHeight(int groupIndex, int itemIndex) float _TableViewItemProviderAdaptor::GetDefaultItemHeight(void) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); return __pTableViewProvider->GetDefaultItemHeight(); } @@ -481,7 +482,7 @@ _TableViewItemProviderAdaptor::GetDefaultItemHeight(void) float _TableViewItemProviderAdaptor::GetDefaultGroupItemHeight(void) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); return __pTableViewProvider->GetDefaultGroupItemHeight(); } @@ -489,7 +490,7 @@ _TableViewItemProviderAdaptor::GetDefaultGroupItemHeight(void) bool _TableViewItemProviderAdaptor::IsReorderable(int groupIndexFrom, int groupIndexTo) { - SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider."); + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); return __pTableViewProvider->IsReorderable(groupIndexFrom, groupIndexTo); } @@ -510,6 +511,7 @@ _TableViewItemProviderAdaptor::GetDefaultItem(void) if (__pDefaultItem == null) { __pDefaultItem = _TableViewItem::CreateTableViewItemN(0.0f); + __pDefaultItem->SetFocusable(false); } return __pDefaultItem; diff --git a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp index 69bdc9a..9fc8556 100644 --- a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp @@ -38,6 +38,7 @@ #include "FUi_FocusManagerImpl.h" #include "FUi_Math.h" #include "FUi_Window.h" +#include "FUiCtrl_Edit.h" using namespace Tizen::Ui::Animations; using namespace Tizen::Graphics; @@ -82,6 +83,10 @@ _TableViewPresenter::_TableViewPresenter() , __isTableViewFocused(false) , __itemTouchReleasedEventState(TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL) , __scrollToItemTag() + , __isOrientationChanged(false) + , __isFocusedDuringOrientationChange(false) + , __isUpdatingTableView(false) + , __isUpdateTableViewCalledDuringTts(false) { __sweptItemTag.itemIndex = -1; __sweptItemTag.groupIndex = -1; @@ -94,6 +99,12 @@ _TableViewPresenter::_TableViewPresenter() __focusItemTag.groupIndex = -1; __focusItemTag.itemIndex = -1; + + __focusItemTagOnTraversal.groupIndex = -1; + __focusItemTagOnTraversal.itemIndex = -1; + + __accessibilityTag.groupIndex = -1; + __accessibilityTag.itemIndex = -1; } _TableViewPresenter::~_TableViewPresenter() @@ -124,22 +135,22 @@ _TableViewPresenter::Initialize(_TableView* pTableView) __pBaseVisualElement->SetSurfaceOpaque(false); result r = __itemHeightList.Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __sectionAlignmentList.Construct(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY,"[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); // Create Model __pListModel = new (std::nothrow) _ListViewModel(); - SysTryReturn(NID_UI_CTRL, __pListModel != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, __pListModel != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __pListModel->SetListViewModelDelegate(this); __pItemDrawingProperty = new (std::nothrow) _ItemDrawingProperty(); - SysTryReturn(NID_UI_CTRL, __pItemDrawingProperty != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, __pItemDrawingProperty != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); // Timer __pFastScrollTimer = new (std::nothrow) Timer(); - SysTryCatch(NID_UI_CTRL, __pFastScrollTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pFastScrollTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pFastScrollTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -228,7 +239,7 @@ _TableViewPresenter::SetItemProvider(const _TableViewItemProvider* pProvider) if (pProviderAdaptor == null) { pProviderAdaptor = new (std::nothrow) _TableViewItemProviderAdaptor(); - SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient.")); + SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); SetTableViewItemProviderAdaptor(pProviderAdaptor); } @@ -263,7 +274,7 @@ _TableViewPresenter::GetItemFromPosition(const Tizen::Graphics::FloatPoint& posi do { pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); - SysTryCatch(NID_UI_CTRL, pItem != null, , E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysTryCatch(NID_UI_CTRL, pItem != null, , E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),itemPos.groupIndex,itemPos.itemIndex); FloatRectangle itemBounds = pItem->GetBoundsF(); if (itemBounds.Contains(position)) @@ -396,17 +407,17 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe _TableViewItemProviderAdaptor* pProviderAdaptor = __pProviderAdaptor; SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_INVALID_STATE, E_INVALID_STATE, - ("[E_INVALID_STATE] This instance isn't constructed.")); + "[%s] The instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); if ((groupIndex < 0) || (groupIndex > GetGroupCount()) || (itemIndex < -1) || (itemIndex > GetItemCountAt(groupIndex))) { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex); return E_OUT_OF_RANGE; } if (groupIndex == GetGroupCount() && itemIndex != -1 && type != TABLE_VIEW_REFRESH_TYPE_ITEM_ADD) { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex); return E_OUT_OF_RANGE; } @@ -429,7 +440,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe int itemCount = pProviderAdaptor->GetItemCount(groupIndex); if (__pListModel->InsertGroup(groupIndex, itemCount, false) != E_SUCCESS) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to add Group item."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add Group item.", GetErrorMessage(E_SYSTEM)); return E_SYSTEM; } @@ -448,7 +459,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe if (__pListModel->InsertItemToGroup(null, groupIndex, itemIndex) != E_SUCCESS) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to add item."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add item.", GetErrorMessage(E_SYSTEM)); return E_SYSTEM; } @@ -466,6 +477,11 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe SetStatusChanged(true); } + if (!__pTableView->IsFocusNavigateEnabled() && (!IsEmpty())) + { + __pTableView->SetFocusNavigateEnabled(true); + } + break; case TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE: @@ -473,7 +489,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe { if (groupIndex == GetGroupCount()) { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex); return E_OUT_OF_RANGE; } @@ -482,7 +498,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe if (__pListModel->RemoveGroup(groupIndex) != E_SUCCESS) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to remove group."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM)); return E_SYSTEM; } @@ -506,13 +522,13 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe { if (itemIndex == GetItemCountAt(groupIndex)) { - SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex); return E_OUT_OF_RANGE; } if (__pListModel->RemoveItemAt(groupIndex, itemIndex) != E_SUCCESS) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to remove item."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM)); return E_SYSTEM; } @@ -534,6 +550,11 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe SetStatusChanged(true); } + if (__pTableView->IsFocusNavigateEnabled() && IsEmpty()) + { + __pTableView->SetFocusNavigateEnabled(false); + } + break; case TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY: @@ -571,7 +592,7 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe break; default: - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to refresh list."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to refresh list.", GetErrorMessage(E_SYSTEM)); return E_SYSTEM; break; } @@ -600,6 +621,8 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, animation); } + RestoreEditCopyPasteManager(); + return E_SUCCESS; } @@ -635,13 +658,51 @@ _TableViewPresenter::RefreshAllItems(void) } result -_TableViewPresenter::UpdateTableView(void) +_TableViewPresenter::UpdateTableView(bool isRestoreAnnexFocusValue) { + if (likely(_AccessibilityManager::IsActivated()) && __accessibilityTag.groupIndex != -1 + && __pTableView->GetRootWindow() && __pTableView->GetRootWindow()->IsActivated()) + { + __isUpdateTableViewCalledDuringTts = true; + } + else + { + __isUpdateTableViewCalledDuringTts = false; + __accessibilityTag.groupIndex = -1; + __accessibilityTag.itemIndex = -1; + } + + if (__focusItemTag.groupIndex != -1 && __pTableView->IsTableViewFocused() && __pTableView->IsFocusModeStateEnabled() + && __pTableView->GetRootWindow() && __pTableView->GetRootWindow()->IsActivated()) + { + __isRestoreFocus = true; + } + + if (!__isRestoreFocus) + { + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + __isTableViewFocused = false; + __isAnnexFocused = false; + } + + if (!isRestoreAnnexFocusValue) + { + __isAnnexFocused = false; + } + + if (__isUpdatingTableView) + { + return E_SUCCESS; + } + + __isUpdatingTableView = true; + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); if (pVisualElement != null) { - __pTableView->GetVisualElement()->RemoveAllAnimations(); + pVisualElement->RemoveAllAnimations(); } @@ -649,10 +710,7 @@ _TableViewPresenter::UpdateTableView(void) { SetItemDrawingProperty(); - if(PreloadItem() == false) - { - return E_SUCCESS; - } + PreloadItem(); } else { @@ -681,6 +739,33 @@ _TableViewPresenter::UpdateTableView(void) } } + _Control* pFocusedControl = null; + _Window* pTop = __pTableView->GetRootWindow(); + if (pTop) + { + pFocusedControl = pTop->GetCurrentFocusControl(); + } + + _TableView* pTableView = null; + + while (true) + { + if (pFocusedControl == null) + { + __isRestoreFocus = false; + break; + } + + pTableView = dynamic_cast <_TableView*>(pFocusedControl); + + if (pTableView != null && (pTableView == __pTableView)) + { + break; + } + + pFocusedControl = pFocusedControl->GetParent(); + } + __pListModel->RemoveAllItem(false, true); PreloadItem(topDrawnTag.groupIndex, topDrawnTag.itemIndex, shiftingDistance); @@ -701,6 +786,17 @@ _TableViewPresenter::UpdateTableView(void) } } + if (IsEmpty() == true) + { + __pTableView->SetFocusNavigateEnabled(false); + } + else + { + __pTableView->SetFocusNavigateEnabled(true); + } + + __isUpdatingTableView = false; + return E_SUCCESS; } @@ -1185,8 +1281,7 @@ _TableViewPresenter::PreloadItem(int topDrawnGroupIndex, int topDrawnItemIndex, __pListModel->RestoreItemStatus(); - DeleteItemHeightList(); - CreateItemHeightList(defaultGroupHeight, defaultItemHeight); + RestoreItemHeightList(defaultGroupHeight, defaultItemHeight); DeleteSectionAlignmentList(); CreateSectionAlignmentList(); @@ -1251,8 +1346,7 @@ _TableViewPresenter::SetItemChecked(int groupIndex, int itemIndex, bool checked) } bool enabled = __pListModel->IsItemEnabled(groupIndex, itemIndex); - SysTryReturn(NID_UI_CTRL, (enabled == true), E_INVALID_OPERATION, E_INVALID_OPERATION, - "[E_INVALID_OPERATION] The item is disabled."); + SysTryReturn(NID_UI_CTRL, (enabled == true), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The item is disabled.", GetErrorMessage(E_INVALID_OPERATION)); if (__pListModel->IsItemChecked(groupIndex, itemIndex) == checked) { @@ -1260,7 +1354,7 @@ _TableViewPresenter::SetItemChecked(int groupIndex, int itemIndex, bool checked) } TableViewItemTag itemTag = {groupIndex, itemIndex}; - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); TableViewItemTag topDrawnItemTag = {-1, -1}; GetTopDrawnItem(topDrawnItemTag); @@ -1380,15 +1474,15 @@ _TableViewPresenter::SetLeftMargin(float leftMargin) } void -_TableViewPresenter::RestoreFocus(bool isRestoreFocus) +_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused) { - __isRestoreFocus = isRestoreFocus; + __isAnnexFocused = isAnnexFocused; } -void -_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused) +bool +_TableViewPresenter::IsAnnexFocused(void) { - __isAnnexFocused = isAnnexFocused; + return __isAnnexFocused; } void @@ -1410,6 +1504,17 @@ _TableViewPresenter::IsTableViewFocused(void) return __isTableViewFocused; } +result +_TableViewPresenter::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const +{ + result r = E_SUCCESS; + + groupIndex = __focusItemTag.groupIndex; + itemIndex = __focusItemTag.itemIndex; + + return r; +} + void _TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPosition) { @@ -1440,6 +1545,10 @@ _TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPos pItem->SetSimpleLastItemEnabled(false); } } + if (style == TABLE_VIEW_STYLE_SECTION) + { + pItem->SetSectionItem(true); + } if (itemPosition.itemIndex == 0) { @@ -1666,7 +1775,7 @@ _TableViewPresenter::UnloadItem(TableViewItemTag& itemTag) void _TableViewPresenter::DetachItem(TableViewItemTag& itemTag) { - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); if (pItem != null && pItem->HasParent()) { @@ -1677,7 +1786,7 @@ _TableViewPresenter::DetachItem(TableViewItemTag& itemTag) void _TableViewPresenter::DetachContextItem(TableViewItemTag& itemTag) { - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); if (pItem == null) { return; @@ -1799,6 +1908,8 @@ _TableViewPresenter::OnBoundsChanged(void) { StopExpandCollapseAnimation(); + StopAllItemAnimation(); + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) { ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex); @@ -1830,6 +1941,25 @@ _TableViewPresenter::OnBoundsChanged(void) SetClientAreaHeight(__pTableView->GetBoundsF().height); _ScrollPanelPresenter::OnBoundsChanged(); } + + //FastScroll Visibility + if (__isOrientationChanged) + { + TableViewScrollBarStyle scrollStyle = __pTableView->GetScrollStyle(); + + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL + || scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + _FastScroll* pFastScroll = __pTableView->GetFastScrollBar(); + if (pFastScroll != null) + { + pFastScroll->UpdateIndex(); + pFastScroll->SetScrollVisibility(IsScrollable()); + } + } + + __isOrientationChanged = false; + } } result @@ -1842,7 +1972,7 @@ _TableViewPresenter::Draw(void) { SetItemDrawingProperty(); - if(PreloadItem() == false) + if (PreloadItem() == false) { __pTableView->SetFocusNavigateEnabled(false); return E_SUCCESS; @@ -1872,14 +2002,86 @@ _TableViewPresenter::Draw(void) __pTableView->SetFocusNavigateEnabled(true); } + if (!__isRestoreFocus && __isFocusedDuringOrientationChange) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + + if ((bottomDrawnItemIndex.groupIndex < __focusItemTag.groupIndex) || + (bottomDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __focusItemTag.itemIndex)) + { + ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + } + } + __isFocusedDuringOrientationChange = false; + + if (__isUpdateTableViewCalledDuringTts && __accessibilityTag.groupIndex != -1 && (likely(_AccessibilityManager::IsActivated()))) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + + if ((bottomDrawnItemIndex.groupIndex < __accessibilityTag.groupIndex) || + (bottomDrawnItemIndex.groupIndex == __accessibilityTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __accessibilityTag.itemIndex)) + { + ScrollToItem(__accessibilityTag.groupIndex, __accessibilityTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + } + + _TableViewItem* pItem = null; + pItem = FindItem(__accessibilityTag); + + if (pItem != null) + { + _AccessibilityElement* pElement = pItem->GetAccessibilityElement(); + _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer(); + if (pContainer != null && pElement != null) + { + pContainer->Activate(true); + pContainer->SetCurrentFocusedElement(pElement); + if (_AccessibilityManager::GetInstance() != null) + { + _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pElement); + } + } + } + + if (_AccessibilityManager::GetInstance() != null) + { + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + } + + __isUpdateTableViewCalledDuringTts = false; + } + return E_SUCCESS; } +void +_TableViewPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + __isOrientationChanged = true; + if (__focusItemTag.groupIndex != -1) + { + __isFocusedDuringOrientationChange = true; + } +} + _UiTouchEventDelivery _TableViewPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo) { _UiTouchEventDelivery response = _ScrollPanelPresenter::OnPreviewTouchPressed(source, touchInfo); + if (__focusItemTag.groupIndex != -1) + { + _TableViewItem* pItem = FindItem(__focusItemTag); + if (pItem) + { + pItem->ResetItemState(); + } + } + + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + _TableViewItem* pItem = GetTableViewItemFromControl(source); if (pItem == null) { @@ -1908,6 +2110,7 @@ _TableViewPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchI if (SelectReorderItem(itemPos.groupIndex, itemPos.itemIndex, false)) { __reorderInfo.touchPressedPositionY = touchInfo.GetCurrentPosition().y; + __reorderInfo.blockedTouchReleaseState = true; } } @@ -1946,6 +2149,12 @@ _TableViewPresenter::OnPreviewTouchReleased(const _Control& source, const _Touch { __reorderInfo.blockedTouchReleaseState = false; + _TableViewItem* pItem = GetTableViewItemFromControl(source); + if (pItem != null) + { + pItem->ResetTextSlide(); + } + return _UI_TOUCH_EVENT_DELIVERY_NO; } } @@ -2254,11 +2463,11 @@ _TableViewPresenter::StartFastScrollTimer(void) SysTryReturn(NID_UI_CTRL, __pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL, - E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL"); - SysTryReturn(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Timer is not created."); + E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, E_INVALID_STATE,"[%s] Timer is not created.", GetErrorMessage(E_INVALID_OPERATION)); r = __pFastScrollTimer->Start(FAST_SCROLL_FADE_OUT_DURATION); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); __isFastScrollTimerEnabled = true; @@ -2270,7 +2479,7 @@ _TableViewPresenter::StopFastScrollTimer(void) { result r = E_SUCCESS; - SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, "[E_INVALID_STATE] Timer is invalid."); + SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, "[%s] Timer is invalid.", GetErrorMessage(E_INVALID_OPERATION)); r = __pFastScrollTimer->Cancel(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2292,7 +2501,7 @@ _TableViewPresenter::IsEmpty(void) const } else { - if (GetGroupCount() <= 0 ) + if (GetGroupCount() <= 0) { return true; } @@ -2379,7 +2588,7 @@ _TableViewPresenter::GetTopDrawnItem(TableViewItemTag& itemPos) const itemPos.itemIndex = -1; itemPos.groupIndex = -1; - return E_OUT_OF_RANGE; + return E_OBJ_NOT_FOUND; } result @@ -2393,7 +2602,7 @@ _TableViewPresenter::GetBottomDrawnItem(TableViewItemTag& itemPos) const itemPos.itemIndex = -1; itemPos.groupIndex = -1; - return E_INVALID_STATE; + return E_OBJ_NOT_FOUND; } float scrollPosition = GetScrollPosition() + __pTableView->GetBoundsF().height; @@ -2457,18 +2666,23 @@ _TableViewPresenter::GetPreviousItemPosition(const TableViewItemTag& currentItem return true; } + else + { + prevItem.groupIndex = currentItemPos.groupIndex - 1; + prevItem.itemIndex = __pListModel->GetItemCountInGroup(prevItem.groupIndex) - 1; + + return true; + } } if (__pListModel->IsGroupExpanded(currentItemPos.groupIndex) == false) { - if (currentItemPos.groupIndex == 0 && currentItemPos.itemIndex == -1) + if (currentItemPos.itemIndex >= 0) { - return false; + prevItem.groupIndex = currentItemPos.groupIndex; + prevItem.itemIndex = -1; } - prevItem.groupIndex = currentItemPos.groupIndex - 1; - prevItem.itemIndex = __pListModel->GetItemCountInGroup(prevItem.groupIndex) - 1; - return true; } @@ -2674,7 +2888,7 @@ _TableViewPresenter::ExpandGroup(int groupIndex, bool withAnimation) if (withAnimation) { - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); if (pItem == null) { return E_SUCCESS; @@ -2799,7 +3013,7 @@ _TableViewPresenter::CollapseGroup(int groupIndex, bool withAnimation) if (withAnimation) { - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); if (pItem == null) { return E_SUCCESS; @@ -2898,7 +3112,7 @@ _TableViewPresenter::LoadAllItemsInGroup(int groupIndex, bool downward) if (pItem == null) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to load item."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM)); } } } @@ -2910,7 +3124,7 @@ _TableViewPresenter::LoadAllItemsInGroup(int groupIndex, bool downward) if (pItem == null) { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to load item."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM)); } } } @@ -2961,7 +3175,7 @@ _TableViewPresenter::LoadItemsToBeVisible(const TableViewItemTag& from) TableViewItemTag current; TableViewItemTag next; - _TableViewItem *pItem = LoadItem(from.groupIndex, from.itemIndex); + _TableViewItem* pItem = LoadItem(from.groupIndex, from.itemIndex); if (pItem == null) { @@ -2998,7 +3212,7 @@ _TableViewPresenter::AttachNextItemsToBottom(const TableViewItemTag& anchor) TableViewItemTag current; TableViewItemTag next; - _TableViewItem *pItem = FindItem(itemTag); + _TableViewItem* pItem = FindItem(itemTag); if (pItem == null) { return; @@ -3102,6 +3316,11 @@ _TableViewPresenter::SetClientAreaHeight(float height) _Scroll* pScroll = __pTableView->GetScrollBar(); if (pScroll != null) { + if (__pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED || __pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB) + { + ChangeScrollBarVisibility(__pTableView->GetBoundsF().height, clientBounds.height); + } + pScroll->SetScrollRange(__pTableView->GetBoundsF().height, clientBounds.height); } } @@ -3627,6 +3846,11 @@ _TableViewPresenter::SweepItem(float x) pContextItem->ExposeContextItem(FloatRectangle(__leftMargin, __sweptItemPosition.y, contextItemWidth, pContextItem->GetSizeF().height), pItem->GetSize().width); + if (__sweptItemTag.groupIndex == -1) + { + needToFireEvent = false; + } + if (needToFireEvent) { PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP, pItem); @@ -3795,14 +4019,15 @@ _TableViewPresenter::AdjustLoadedItemWidth(void) result _TableViewPresenter::OpenContextItem(int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index."); + SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range.",GetErrorMessage(E_OUT_OF_RANGE),groupIndex); + TableViewItemTag itemTag = {groupIndex, itemIndex}; _TableViewItem* pItem = FindItem(itemTag); - SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Item was not loaded."); - SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem is not set to the item."); - SysTryReturn(NID_UI_CTRL,__sweptItemTag.groupIndex != groupIndex || __sweptItemTag.itemIndex != itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem already opened."); + SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Item was not loaded.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem is not set to the item.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL,__sweptItemTag.groupIndex != groupIndex || __sweptItemTag.itemIndex != itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem already opened.", GetErrorMessage(E_INVALID_OPERATION)); ResetSweepItem(); @@ -3840,14 +4065,14 @@ _TableViewPresenter::OpenContextItem(int groupIndex, int itemIndex) result _TableViewPresenter::CloseContextItem(int groupIndex, int itemIndex) { - SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index."); + SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex); TableViewItemTag itemTag = {groupIndex, itemIndex}; _TableViewItem* pItem = FindItem(itemTag); - SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Item was not loaded."); - SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem is not set to the item."); - SysTryReturn(NID_UI_CTRL, __sweptItemTag.groupIndex == groupIndex && __sweptItemTag.itemIndex == itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem was not opened."); + SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Item was not loaded.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem is not set to the item.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, __sweptItemTag.groupIndex == groupIndex && __sweptItemTag.itemIndex == itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem was not opened.", GetErrorMessage(E_INVALID_OPERATION)); ResetSweepItem(); @@ -3857,9 +4082,10 @@ _TableViewPresenter::CloseContextItem(int groupIndex, int itemIndex) bool _TableViewPresenter::IsContextItemOpened(int groupIndex, int itemIndex) const { - SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), false, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index."); + SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), false, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range. ", GetErrorMessage(E_OUT_OF_RANGE), groupIndex); + - if ( __sweptItemTag.groupIndex == -1 && __sweptItemTag.itemIndex == -1) + if (__sweptItemTag.groupIndex == -1 && __sweptItemTag.itemIndex == -1) { return false; } @@ -3875,9 +4101,9 @@ _TableViewPresenter::IsContextItemOpened(int groupIndex, int itemIndex) const result _TableViewPresenter::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) { - SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); - SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Header is not set to the section."); - SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index."); + SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Header is not set to the section.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Section index (%d)is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex); _TableViewSectionStringAlignment newAlignment; @@ -3899,9 +4125,9 @@ _TableViewPresenter::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, H HorizontalAlignment _TableViewPresenter::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const { - SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_LEFT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); - SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), ALIGNMENT_LEFT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Header is not set to the section."); - SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_LEFT, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index."); + SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_LEFT, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), ALIGNMENT_LEFT, E_INVALID_OPERATION, "[%s] Header is not set to the section.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_LEFT, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex); _TableViewSectionStringAlignment alignment; __sectionAlignmentList.GetAt(sectionIndex, alignment); @@ -3912,9 +4138,9 @@ _TableViewPresenter::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) c result _TableViewPresenter::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) { - SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); - SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Footer is not set to the section."); - SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index."); + SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Footer is not set to the section.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex); _TableViewSectionStringAlignment newAlignment; @@ -3936,9 +4162,9 @@ _TableViewPresenter::SetSectionFooterTextHorizontalAlignment(int sectionIndex, H HorizontalAlignment _TableViewPresenter::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const { - SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION"); - SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Footer is not set to the section."); - SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_RIGHT, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index."); + SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[%s] Footer is not set to the section.", GetErrorMessage(E_INVALID_OPERATION)); + SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_RIGHT, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex); _TableViewSectionStringAlignment alignment; __sectionAlignmentList.GetAt(sectionIndex, alignment); @@ -3982,7 +4208,7 @@ _TableViewPresenter::StopAllItemAnimation(void) do { - _TableViewItem *pItem = FindItem(currentItemTag); + _TableViewItem* pItem = FindItem(currentItemTag); if (pItem != null) { pItem->StopAllAnimation(); @@ -4057,15 +4283,22 @@ _TableViewPresenter::GetItemHeight(TableViewItemTag itemTag) const itemTag.itemIndex++; itemTag.itemIndex = startIndex + itemTag.itemIndex; - __itemHeightList.GetAt(itemTag.itemIndex, itemHeight); + _TableViewItemHeight itemHeightListEntry; + __itemHeightList.GetAt(itemTag.itemIndex, itemHeightListEntry); - return itemHeight; + return itemHeightListEntry.itemHeight; } float _TableViewPresenter::SetItemHeight(TableViewItemTag itemTag, float height) { int startIndex = 0; + _TableViewItemHeight oldHeightEntry; + _TableViewItemHeight itemHeightListEntry; + + itemHeightListEntry.itemHeight = height; + itemHeightListEntry.groupIndex = itemTag.groupIndex; + itemHeightListEntry.itemIndex = itemTag.itemIndex; for (int i = 0; i < itemTag.groupIndex; i++) { @@ -4077,13 +4310,14 @@ _TableViewPresenter::SetItemHeight(TableViewItemTag itemTag, float height) itemTag.itemIndex++; itemTag.itemIndex = startIndex + itemTag.itemIndex; - float oldHeight = 0.0f; - __itemHeightList.GetAt(itemTag.itemIndex, oldHeight); - __itemHeightList.SetAt(height, itemTag.itemIndex); + __itemHeightList.GetAt(itemTag.itemIndex, oldHeightEntry); - return oldHeight; -} + itemHeightListEntry.isFooterItem = oldHeightEntry.isFooterItem; + __itemHeightList.SetAt(itemHeightListEntry, itemTag.itemIndex); + + return oldHeightEntry.itemHeight; +} result _TableViewPresenter::SetReorderMode(bool enabled) @@ -4306,6 +4540,7 @@ _TableViewPresenter::DragSelectedItem(float distance, bool relativeCoordinate) if (itemPosition.y < 0) { + __reorderInfo.itemBasisPositionY += (0 - itemPosition.y); itemPosition.y = 0; } @@ -4324,6 +4559,7 @@ _TableViewPresenter::DragSelectedItem(float distance, bool relativeCoordinate) if (itemPosition.y > limitBottomPositionY) { + __reorderInfo.itemBasisPositionY -= (itemPosition.y - limitBottomPositionY); itemPosition.y = limitBottomPositionY; } @@ -4447,7 +4683,7 @@ _TableViewPresenter::ReorderItem(int destinationGroupIndex, int destinationItemI FloatPoint destinationItemPosition = FloatPoint(destinationItemBounds.x, 0.0f); - if ( __reorderInfo.itemIndex > destinationItemIndex && __reorderInfo.groupIndex == destinationGroupIndex) + if (__reorderInfo.itemIndex > destinationItemIndex && __reorderInfo.groupIndex == destinationGroupIndex) { destinationItemPosition.y = __reorderInfo.itemBounds.y + __reorderInfo.itemBounds.height - destinationItemBounds.height; __reorderInfo.itemBounds.y = destinationItemBounds.y; @@ -4488,8 +4724,8 @@ _TableViewPresenter::StartReorderScrollTimer(void) { StopReorderScrollTimer(); - __pReorderScrollTimer = new (std::nothrow) Tizen::Base::Runtime::Timer; - SysTryReturnVoidResult(NID_UI_CTRL, __pReorderScrollTimer != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + __pReorderScrollTimer = new (std::nothrow) Timer(); + SysTryReturnVoidResult(NID_UI_CTRL, __pReorderScrollTimer != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); result r = __pReorderScrollTimer->Construct(*this); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4561,25 +4797,40 @@ _TableViewPresenter::CreateItemHeightList(float defaultGroupItemHeight, float de { int groupCount = GetGroupCount(); + _TableViewItemHeight itemHeightEntry; + result r = __itemHeightList.SetCapacity(GetItemCount()); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); for (int i = 0; i < groupCount; i++) { int itemCount = GetItemCountAt(i); - + itemHeightEntry.groupIndex = i; if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) { - __itemHeightList.Add(0.0f); + itemHeightEntry.itemIndex = -1; + itemHeightEntry.itemHeight = 0.0f; + itemHeightEntry.isFooterItem = false; + __itemHeightList.Add(itemHeightEntry); } else { - __itemHeightList.Add(defaultGroupItemHeight); + itemHeightEntry.itemIndex = -1; + itemHeightEntry.itemHeight = defaultGroupItemHeight; + itemHeightEntry.isFooterItem = false; + __itemHeightList.Add(itemHeightEntry); } for (int j = 0; j < itemCount; j++) { - __itemHeightList.Add(defaultItemHeight); + itemHeightEntry.itemIndex = j; + itemHeightEntry.itemHeight = defaultItemHeight; + itemHeightEntry.isFooterItem = false; + if (HasSectionFooter(i) && j == (itemCount - 1)) + { + itemHeightEntry.isFooterItem = true; + } + __itemHeightList.Add(itemHeightEntry); } } @@ -4591,6 +4842,125 @@ CATCH: return false; } +bool +_TableViewPresenter::RestoreItemHeightList(float defaultGroupHeight, float defaultItemHeight) +{ + _TableViewItemHeight backupItem; + _TableViewItemHeight currentItem; + _TableViewItemHeight itemHeightEntry; + int groupCount = GetGroupCount(); + bool isGroupItem = true; + int itemCount = 0; + int groupIndex = 0; + int itemIndex = 0; + + ArrayListT<_TableViewItemHeight> backupItemHeightList; + backupItemHeightList.Construct(); + + result r = backupItemHeightList.SetCapacity(__itemHeightList.GetCapacity()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = 0; index < __itemHeightList.GetCount(); index++) + { + __itemHeightList.GetAt(index, backupItem); + backupItemHeightList.Add(backupItem); + } + + DeleteItemHeightList(); + + r = __itemHeightList.SetCapacity(GetItemCount()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int backUpListIndex = 0, actualListIndex = 0; actualListIndex < GetItemCount() && groupIndex < groupCount;) + { + backupItemHeightList.GetAt(backUpListIndex, backupItem); + if (groupIndex < groupCount) + { + itemCount = GetItemCountAt(groupIndex); + if (isGroupItem) + { + isGroupItem = false; + itemHeightEntry.groupIndex = groupIndex; + itemIndex = 0; + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + { + itemHeightEntry.itemHeight = 0.0f; + } + else + { + itemHeightEntry.itemHeight = defaultGroupHeight; + } + + itemHeightEntry.itemIndex = -1; + itemHeightEntry.isFooterItem = false; + __itemHeightList.Add(itemHeightEntry); + if (itemCount == 0) + { + isGroupItem = true; + groupIndex++; + } + } + else + { + itemHeightEntry.itemIndex = itemIndex; + itemHeightEntry.itemHeight = defaultItemHeight; + itemHeightEntry.isFooterItem = false; + + if (HasSectionFooter(groupIndex) && itemIndex == (itemCount - 1)) + { + itemHeightEntry.isFooterItem = true; + } + __itemHeightList.Add(itemHeightEntry); + itemIndex++; + + if (itemIndex == itemCount) + { + isGroupItem = true; + groupIndex++; + } + } + } + if (actualListIndex < GetItemCount() && backUpListIndex < backupItemHeightList.GetCount()) + { + __itemHeightList.GetAt(actualListIndex, currentItem); + if (backupItem.isFooterItem) + { + backUpListIndex++; + continue; + } + + if(backupItem.groupIndex == currentItem.groupIndex && backupItem.itemIndex == currentItem.itemIndex) + { + currentItem.itemHeight = backupItem.itemHeight; + __itemHeightList.SetAt(currentItem, actualListIndex); + actualListIndex++; + backUpListIndex++; + } + else if (backupItem.groupIndex > currentItem.groupIndex) + { + actualListIndex++; + } + else if (backupItem.groupIndex < currentItem.groupIndex) + { + backUpListIndex++; + } + else + { + SysLog(NID_UI_CTRL, "System error has occurred. Failed to restore the height values."); + } + } + } + backupItemHeightList.RemoveAll(); + + return true; + +CATCH: + backupItemHeightList.RemoveAll(); + DeleteItemHeightList(); + + return false; +} + void _TableViewPresenter::DeleteItemHeightList(void) { @@ -4603,7 +4973,9 @@ _TableViewPresenter::RefreshItemHeightList(int groupIndex, int itemIndex, TableV float defaultItemHeight = __pProviderAdaptor->GetDefaultItemHeight(); float defaultGroupItemHeight = __pProviderAdaptor->GetDefaultGroupItemHeight(); + _TableViewItemHeight itemHeightEntry; int startIndex = 0; + for (int i = 0; i < groupIndex; i++) { int itemCount = GetItemCountAt(i); @@ -4622,15 +4994,59 @@ _TableViewPresenter::RefreshItemHeightList(int groupIndex, int itemIndex, TableV int itemCount = GetItemCountAt(groupIndex); for (int i = 0; i < itemCount; i++) { - __itemHeightList.InsertAt(defaultItemHeight, targetIndex); + itemHeightEntry.groupIndex = groupIndex; + itemHeightEntry.itemIndex = (itemCount - 1) - i; + itemHeightEntry.itemHeight = defaultItemHeight; + itemHeightEntry.isFooterItem = false; + if (HasSectionFooter(groupIndex) && i == (itemCount - 1)) + { + itemHeightEntry.isFooterItem = true; + } + + __itemHeightList.InsertAt(itemHeightEntry, targetIndex); } - __itemHeightList.InsertAt(defaultGroupItemHeight, targetIndex); + itemHeightEntry.groupIndex = groupIndex; + itemHeightEntry.itemIndex = itemIndex; + itemHeightEntry.itemHeight = defaultGroupItemHeight; + itemHeightEntry.isFooterItem = false; + __itemHeightList.InsertAt(itemHeightEntry, targetIndex); + + int updateIndex = targetIndex + itemCount + 1;// Increment the group Index below the added item by 1 + int lastIndex = 0; + int groupCount = GetGroupCount(); + for (int i = 0; i < groupCount; i++) + { + int itemCount = GetItemCountAt(i); + lastIndex = lastIndex + itemCount + 1; + } + + for (int index = updateIndex; index < lastIndex; index++) + { + __itemHeightList.GetAt(index, itemHeightEntry); + itemHeightEntry.groupIndex = itemHeightEntry.groupIndex + 1; + __itemHeightList.SetAt(itemHeightEntry, index); + } } else { - __itemHeightList.InsertAt(defaultItemHeight, targetIndex); + itemHeightEntry.groupIndex = groupIndex; + itemHeightEntry.itemIndex = itemIndex; + itemHeightEntry.itemHeight = defaultItemHeight; + itemHeightEntry.isFooterItem = false; + __itemHeightList.InsertAt(itemHeightEntry, targetIndex); + + int itemCount = GetItemCountAt(groupIndex); + int remainingItemCount = (itemCount - itemIndex); + + for (int i = (targetIndex + 1); i < (targetIndex + remainingItemCount); i++) + { + __itemHeightList.GetAt(i, itemHeightEntry); + itemHeightEntry.groupIndex = groupIndex; + itemHeightEntry.itemIndex = itemHeightEntry.itemIndex + 1; + __itemHeightList.SetAt(itemHeightEntry, i); + } } } else if (refreshType == TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE) @@ -4643,10 +5059,36 @@ _TableViewPresenter::RefreshItemHeightList(int groupIndex, int itemIndex, TableV { __itemHeightList.RemoveAt(targetIndex); } + + int updateIndex = targetIndex;// Decrement the group Index below the added item by 1 + int lastIndex = 0; + + for (int i = 0; i < (GetGroupCount() + 1); i++) + { + int itemCount = GetItemCountAt(i); + lastIndex = lastIndex + itemCount + 1; + } + + for (int index = updateIndex; index < lastIndex; index++) + { + __itemHeightList.GetAt(index, itemHeightEntry); + itemHeightEntry.groupIndex = itemHeightEntry.groupIndex - 1; + __itemHeightList.SetAt(itemHeightEntry, index); + } } else { __itemHeightList.RemoveAt(targetIndex); + int itemCount = GetItemCountAt(groupIndex); + int remainingItemCount = itemCount - itemIndex; + + for (int i = targetIndex; i < (targetIndex + remainingItemCount); i++) + { + __itemHeightList.GetAt(i, itemHeightEntry); + itemHeightEntry.groupIndex = groupIndex; + itemHeightEntry.itemIndex = (itemHeightEntry.itemIndex - 1); + __itemHeightList.SetAt(itemHeightEntry, i); + } } } @@ -4672,7 +5114,6 @@ _TableViewPresenter::CreateSectionAlignmentList(void) for (int i = 0; i < groupCount; i++) { - __sectionAlignmentList.Add(alignment); } @@ -4740,7 +5181,7 @@ _TableViewPresenter::CaptureAndStartRemoveItemAnimation(int groupIndex, int item pCanvas = null; pVisualElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, pVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4751,7 +5192,7 @@ _TableViewPresenter::CaptureAndStartRemoveItemAnimation(int groupIndex, int item pVisualElement->SetShowState(true); pCanvas = pVisualElement->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->Clear(); pCanvas->DrawBitmap(FloatRectangle(0, 0, itemBounds.width, itemBounds.height), *pBitmap); @@ -4854,7 +5295,7 @@ _TableViewPresenter::ShowTableViewCapturedItem(int groupIndex, int itemIndex, fl if (__pCapturedItemVisualElement == null) { __pCapturedItemVisualElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pCapturedItemVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, __pCapturedItemVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pCapturedItemVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4870,7 +5311,7 @@ _TableViewPresenter::ShowTableViewCapturedItem(int groupIndex, int itemIndex, fl __pCapturedItemVisualElement->SetBounds(FloatRectangle(itemBounds.x, itemBounds.y, itemBounds.width, height)); pCanvas = __pCapturedItemVisualElement->GetCanvasN(); - SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); pCanvas->Clear(); @@ -5209,6 +5650,34 @@ _TableViewPresenter::CollapseGroupAnimationFinished(bool completedNormally) } void +_TableViewPresenter::RestoreEditCopyPasteManager(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, pControlManager != null, E_SYSTEM, "Failed to get Control Manager."); + + _Control* pFocusControl = pControlManager->GetFocusControl(); + SysTryReturnVoidResult(NID_UI_CTRL, pFocusControl != null, E_SYSTEM, "Failed to get Focussed Control."); + + _Edit* pEdit = dynamic_cast<_Edit*>(pFocusControl); + if (pEdit == null) + { + return; + } + + _Control* pControl = pEdit; + while (pControl) + { + pControl = pControl->GetParent(); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pControl); + if (pItem) + { + pEdit->Invalidate(); + break; + } + } +} + +void _TableViewPresenter::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) { if (keyName == L"REMOVE_ITEM_ANIMATION") @@ -5265,6 +5734,7 @@ _TableViewPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation __scrollToItemTag.startedAnimation = false; ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance); } + RestoreEditCopyPasteManager(); return; } else if (keyName == L"COLLAPSE_GROUP_ANIMATION") @@ -5280,6 +5750,7 @@ _TableViewPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation __scrollToItemTag.startedAnimation = false; ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance); } + RestoreEditCopyPasteManager(); return; } @@ -5315,6 +5786,7 @@ _TableViewPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn SetLoadedItemsVisibleFromPosition(currentPosition, true); MoveLoadedItemsFromPosition(currentPosition); + RestoreEditCopyPasteManager(); return; } else if (keyName == L"COLLAPSE_GROUP_ANIMATION") @@ -5323,6 +5795,7 @@ _TableViewPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn SetLoadedItemsVisibleFromPosition(currentPosition, false); MoveLoadedItemsFromPosition(currentPosition); + RestoreEditCopyPasteManager(); return; } else if (keyName == L"SWEEP_ITEM_ANIMATION") @@ -5381,7 +5854,7 @@ _TableViewPresenter::OnOcurredOverflowItems(const int currentCashSize, const int bool _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { - if (!__pTableView->IsFocusModeStateEnabled()) + if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable()) { return false; } @@ -5392,6 +5865,14 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf if (pTop) { pFocusedControl = pTop->GetCurrentFocusControl(); + if (pFocusedControl) + { + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl); + if (pFocusTraversalControl != __pTableView) + { + return false; + } + } } _TableViewItem* pItem = null; @@ -5400,15 +5881,30 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf switch (keyCode) { case _KEY_UP: + StopExpandCollapseAnimation(); if (pFocusedControl != null) { pItem = dynamic_cast<_TableViewItem*>(pFocusedControl); if (pItem == null) { _Control* pParentControl = pFocusedControl->GetParent(); + while (pParentControl != null && pParentControl->GetParent() != __pTableView) + { + pParentControl = pParentControl->GetParent(); + } pItem = dynamic_cast<_TableViewItem*>(pParentControl); } + if (pItem && pItem->GetParent() != __pTableView) + { + _Control* pParentControl = pItem->GetParent(); + while (pParentControl != __pTableView) + { + pItem = dynamic_cast<_TableViewItem*>(pParentControl); + pParentControl = pParentControl->GetParent(); + } + } + if (pItem != null) { pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex); @@ -5461,17 +5957,17 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf if (pItem->GetBoundsF().y < GetScrollPosition()) { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + } + else if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height) + { ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); } if (pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) { - pItem->SetFocused(true); - __focusItemTag.groupIndex = itemPos.groupIndex; - __focusItemTag.itemIndex = itemPos.itemIndex; - __isAnnexFocused = false; - pItem->DrawFocus(); + SetItemFocus(pItem, itemPos); break; } } @@ -5485,21 +5981,36 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf break; case _KEY_DOWN: + StopExpandCollapseAnimation(); if (pFocusedControl != null) { pItem = dynamic_cast<_TableViewItem*>(pFocusedControl); if (pItem == null) { _Control* pParentControl = pFocusedControl->GetParent(); + while (pParentControl != null && pParentControl->GetParent() != __pTableView) + { + pParentControl = pParentControl->GetParent(); + } pItem = dynamic_cast<_TableViewItem*>(pParentControl); } + if (pItem && pItem->GetParent() != __pTableView) + { + _Control* pParentControl = pItem->GetParent(); + while (pParentControl != __pTableView) + { + pItem = dynamic_cast<_TableViewItem*>(pParentControl); + pParentControl = pParentControl->GetParent(); + } + } + if (pItem != null) { pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex); TableViewItemTag lastItemPos = {-1, -1}; GetLastItem(lastItemPos); - if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) + if (itemPos.groupIndex == lastItemPos.groupIndex && (itemPos.itemIndex == lastItemPos.itemIndex || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false)) { SetTableViewFocused(false); return false; @@ -5525,7 +6036,8 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf TableViewItemTag lastItemPos = {-1, -1}; GetLastItem(lastItemPos); - if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) + if (itemPos.groupIndex == lastItemPos.groupIndex && (itemPos.itemIndex == lastItemPos.itemIndex + || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false)) { SetTableViewFocused(false); return false; @@ -5535,17 +6047,13 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf } if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height) { - ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); } if (pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) { - pItem->SetFocused(true); - pItem->DrawFocus(); - __focusItemTag.groupIndex = itemPos.groupIndex; - __focusItemTag.itemIndex = itemPos.itemIndex; - __isAnnexFocused = false; + SetItemFocus(pItem, itemPos); break; } } @@ -5572,7 +6080,7 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf bool _TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { - if (!__pTableView->IsFocusModeStateEnabled()) + if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable()) { return false; } @@ -5588,6 +6096,31 @@ _TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyIn } void +_TableViewPresenter::SetFocusItemOnPressedState(int groupIndex, int itemIndex) +{ + __focusItemTagOnTraversal.groupIndex = groupIndex; + __focusItemTagOnTraversal.itemIndex = itemIndex; +} + +void +_TableViewPresenter::SetCurrentAccessibilityIndex(int groupIndex, int itemIndex) +{ + __accessibilityTag.groupIndex = groupIndex; + __accessibilityTag.itemIndex = itemIndex; + return; +} + +void +_TableViewPresenter::SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos) +{ + pItem->SetFocused(true); + __focusItemTag.groupIndex = itemPos.groupIndex; + __focusItemTag.itemIndex = itemPos.itemIndex; + __isAnnexFocused = false; + pItem->DrawFocus(); +} + +void _TableViewPresenter::OnDrawFocus(void) { if (!__pTableView->IsFocusModeStateEnabled()) @@ -5595,6 +6128,14 @@ _TableViewPresenter::OnDrawFocus(void) return; } + if (__pTableView->GetRootWindow()) + { + if(!__pTableView->GetRootWindow()->IsActivated()) + { + return; + } + } + _Control* pFocusedControl = null; _Window* pTop = __pTableView->GetRootWindow(); if (pTop) @@ -5606,6 +6147,42 @@ _TableViewPresenter::OnDrawFocus(void) _TableViewItem* pItem = null; TableViewItemTag itemPos = {-1, -1}; + if (__focusItemTagOnTraversal.groupIndex != -1) + { + __focusItemTag.groupIndex = __focusItemTagOnTraversal.groupIndex; + __focusItemTag.itemIndex = __focusItemTagOnTraversal.itemIndex; + __isRestoreFocus = true; + __isAnnexFocused = false; + } + + //Check for focus on orientation change + if (__isFocusedDuringOrientationChange || __focusItemTagOnTraversal.groupIndex != -1) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + GetTopDrawnItem(topDrawnItemIndex); + + if ((bottomDrawnItemIndex.groupIndex < __focusItemTag.groupIndex) || + (bottomDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __focusItemTag.itemIndex)) + { + ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + } + else + { + if ((topDrawnItemIndex.groupIndex > __focusItemTag.groupIndex) || + (topDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && topDrawnItemIndex.itemIndex >= __focusItemTag.itemIndex)) + { + ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + } + + } + __isFocusedDuringOrientationChange = false; + } + + __focusItemTagOnTraversal.groupIndex = -1; + __focusItemTagOnTraversal.itemIndex = -1; + pItem = FindItem(__focusItemTag); if (__isRestoreFocus && pItem != null) @@ -5627,166 +6204,167 @@ _TableViewPresenter::OnDrawFocus(void) return; } - if (pFocusedControl != null) + SysTryReturnVoidResult(NID_UI_CTRL, pFocusedControl != null, E_SYSTEM, "Failed to get Focussed control."); + + pTableView = dynamic_cast<_TableView*>(pFocusedControl); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_SYSTEM, "Failed to get Focussed control."); + + if (_FocusManagerImpl::GetInstance()->IsForwardDirection() == true) { - 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 && pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) + { + SetItemFocus(pItem, itemPos); + return; + } + + while (GetNextItemPosition(itemPos, itemPos)) { - if (_FocusManagerImpl::GetInstance()->IsForwardDirection() == true) + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetTopDrawnItem(topDrawnItemIndex); + if ((topDrawnItemIndex.groupIndex < itemPos.groupIndex) || + (topDrawnItemIndex.groupIndex == itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex)) { - GetFirstItem(itemPos); - if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + if ((bottomDrawnItemIndex.groupIndex > itemPos.groupIndex) || + (bottomDrawnItemIndex.groupIndex == itemPos.groupIndex && bottomDrawnItemIndex.itemIndex > itemPos.itemIndex)) { - itemPos.itemIndex = 0; + 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_TOP); pItem = FindItem(itemPos); - if (pItem != null) + } + + if (pItem != null) + { + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) { - if (pItem->GetEnableState() && pItem->GetVisibleState() - && pItem->IsFocusable()) - { - __focusItemTag.groupIndex = itemPos.groupIndex; - __focusItemTag.itemIndex = itemPos.itemIndex; - __isAnnexFocused = false; - pItem->SetFocused(true); - pItem->DrawFocus(); - } - else + TableViewItemTag lastItemPos = {-1, -1}; + GetLastItem(lastItemPos); + + if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex) { - 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; - } - } - } + return; } + + continue; + } + else + { + SetItemFocus(pItem, itemPos); + break; + } + } + } + } + else + { + GetLastItem(itemPos); + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + pItem = FindItem(itemPos); + + if (pItem != null && pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) + { + SetItemFocus(pItem, itemPos); + return; + } + + while (GetPreviousItemPosition(itemPos, itemPos)) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + + if ((bottomDrawnItemIndex.groupIndex > itemPos.groupIndex) || + (bottomDrawnItemIndex.groupIndex == itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex)) + { + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetTopDrawnItem(topDrawnItemIndex); + if ((topDrawnItemIndex.groupIndex < itemPos.groupIndex) || + (topDrawnItemIndex.groupIndex == itemPos.groupIndex && topDrawnItemIndex.itemIndex < itemPos.itemIndex)) + { + pItem = FindItem(itemPos); + } + else + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + pItem = FindItem(itemPos); } } else { - GetLastItem(itemPos); ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); pItem = FindItem(itemPos); + } - if (pItem != null) + if (pItem != null) + { + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) { - if (pItem->GetEnableState() && pItem->GetVisibleState() - && pItem->IsFocusable()) - { - __focusItemTag.groupIndex = itemPos.groupIndex; - __focusItemTag.itemIndex = itemPos.itemIndex; - __isAnnexFocused = false; - pItem->SetFocused(true); - pItem->DrawFocus(); - } - else + TableViewItemTag firstItemPos = {-1, -1}; + GetFirstItem(firstItemPos); + if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) { - 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; - } - } - } + return; } + + continue; + } + else + { + SetItemFocus(pItem, itemPos); + break; } } } } } +bool +_TableViewPresenter::OnTraversalControlFocusGained(void) +{ + if (__focusItemTagOnTraversal.groupIndex != -1) + { + OnDrawFocus(); + } + else if (__focusItemTag.groupIndex != -1) //Fix for 55059 + { + __focusItemTagOnTraversal.groupIndex = __focusItemTag.groupIndex; + __focusItemTagOnTraversal.itemIndex = __focusItemTag.itemIndex; + OnDrawFocus(); + } + + return false; +} + +bool +_TableViewPresenter::OnTraversalControlFocusLost(void) +{ + return false; +} + void _TableViewPresenter::OnFocusModeStateChanged(void) { + __isFocusedDuringOrientationChange = false; __focusItemTag.groupIndex = -1; __focusItemTag.itemIndex = -1; __isRestoreFocus = false; @@ -5861,7 +6439,7 @@ _TableViewPresenter::GetAccessibilityElementFocusedState(void) do { pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); - SysTryReturn(NID_UI_CTRL, pItem != null, false, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + SysTryReturn(NID_UI_CTRL, pItem != null, false, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),itemPos.groupIndex,itemPos.itemIndex); _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer(); _AccessibilityElement* pElement = null; @@ -5915,6 +6493,32 @@ _TableViewPresenter::FireItemTouchReleasedEventDuringPressing(int groupIndex, in } } +void +_TableViewPresenter::SetFocusDuringOrientationChange(void) +{ + if (__focusItemTag.groupIndex != -1) + { + __isFocusedDuringOrientationChange = true; + } +} + +void +_TableViewPresenter::ChangeScrollBarVisibility(float viewRange, float scrollRange) +{ + _Scroll* pScroll = __pTableView->GetScrollBar(); + SysTryReturnVoidResult(NID_UI_CTRL, (pScroll != NULL), E_SYSTEM, + "[%s] A system error has occurred. _Scroll instance must not be null.", GetErrorMessage(E_SYSTEM)); + + if (viewRange >= scrollRange) + { + pScroll->SetScrollVisibility(false); + } + else + { + pScroll->SetScrollVisibility(true); + } +} + bool _TableViewSectionStringAlignment::operator== (const _TableViewSectionStringAlignment& rhs) const { @@ -5937,4 +6541,25 @@ _TableViewSectionStringAlignment::operator!= (const _TableViewSectionStringAlign return true; } +bool +_TableViewItemHeight::operator!= (const _TableViewItemHeight& rhs) const +{ + if (groupIndex == rhs.groupIndex && itemIndex == rhs.itemIndex && itemHeight == rhs.itemHeight && isFooterItem == rhs.isFooterItem) + { + return false; + } + + return true; +} + +bool +_TableViewItemHeight::operator== (const _TableViewItemHeight& rhs) const +{ + if (groupIndex == rhs.groupIndex && itemIndex == rhs.itemIndex && itemHeight == rhs.itemHeight && isFooterItem == rhs.isFooterItem) + { + return true; + } + + return false; +} }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TextBlockEvent.cpp b/src/ui/controls/FUiCtrl_TextBlockEvent.cpp index 23ad827..c33f626 100644 --- a/src/ui/controls/FUiCtrl_TextBlockEvent.cpp +++ b/src/ui/controls/FUiCtrl_TextBlockEvent.cpp @@ -133,7 +133,7 @@ _TextBlockEvent* _TextBlockEvent::CreateInstanceN(const _Control& source) { _TextBlockEvent* pCoreTextBlockEvent = new (std::nothrow) _TextBlockEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -161,10 +161,10 @@ void _TextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _ITextBlockEventListener* pTextBlockEventListener = dynamic_cast <_ITextBlockEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given."); const _TextBlockEventArg* pTextBlockEventArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given."); pTextBlockEventListener->OnTextBlockSelected(const_cast <_Control&>(*__pSource), pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition()); @@ -178,7 +178,7 @@ IEventArg* _TextBlockEvent::CreateTextBlockEventArgN(int start, int end) { _TextBlockEventArg* pEventArg = new (std::nothrow) _TextBlockEventArg(start, end); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_TextBoxImpl.cpp b/src/ui/controls/FUiCtrl_TextBoxImpl.cpp index ab93c02..fe98d84 100644 --- a/src/ui/controls/FUiCtrl_TextBoxImpl.cpp +++ b/src/ui/controls/FUiCtrl_TextBoxImpl.cpp @@ -411,13 +411,13 @@ _TextBoxImpl::GetBlockRange(int& start, int& end) const result _TextBoxImpl::SetBlockRange(int start, int end) { - SysTryReturnResult(NID_UI_CTRL, (start > -1 && end > -1), E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.\n"); - SysTryReturnResult(NID_UI_CTRL, (end > start), E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.\n"); + SysTryReturnResult(NID_UI_CTRL, (start > -1 && end > -1), E_INVALID_ARG, "The invalid argument is given."); + SysTryReturnResult(NID_UI_CTRL, (end > start), E_INVALID_ARG, "The invalid argument is given."); int tempTextLength = 0; tempTextLength = __pEdit->GetTextLength(); SysTryReturnResult(NID_UI_CTRL, (tempTextLength > start && tempTextLength > end), E_INVALID_ARG, - "[E_INVALID_ARG] The invalid argument is given.\n"); + "The invalid argument is given."); return __pEdit->SetBlockRange(start, end); } @@ -587,7 +587,7 @@ _TextBoxImpl::OnLinkClicked(_Control& source, const String& text, LinkType linkT if (__pPublicLinkEvent != null) { IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); - SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.Memory allocation failed."); __pPublicLinkEvent->Fire(*pLinkEventArg); } @@ -599,7 +599,7 @@ _TextBoxImpl::OnTextBlockSelected(_Control& source, int start, int end) if (__pPublicTextBlockEvent != null) { IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); - SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg."); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); } diff --git a/src/ui/controls/FUiCtrl_TextEvent.cpp b/src/ui/controls/FUiCtrl_TextEvent.cpp index 263a603..6203ac6 100644 --- a/src/ui/controls/FUiCtrl_TextEvent.cpp +++ b/src/ui/controls/FUiCtrl_TextEvent.cpp @@ -130,7 +130,7 @@ _TextEvent* _TextEvent::CreateInstanceN(const _Control& source) { _TextEvent* pCoreTextEvent = new (std::nothrow) _TextEvent(source); - SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); if (IsFailed(GetLastResult())) { @@ -162,11 +162,11 @@ _TextEvent::FireImpl(IEventListener& listener, const IEventArg& arg) // cast to _ITextEventListener _ITextEventListener* pTextListener = dynamic_cast <_ITextEventListener*>(&listener); SysTryReturnVoidResult(NID_UI_CTRL, pTextListener != null, E_INVALID_ARG, - "[E_INVALID_ARG] The invalid listener was given.\n"); + "[E_INVALID_ARG] The invalid listener was given."); // cast to _TextEventArg const _TextEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); CoreTextEventStatus stauts = pArg->GetStatus(); if (stauts == CORE_TEXT_EVENT_CHANGED) @@ -187,7 +187,7 @@ IEventArg* _TextEvent::CreateTextEventArgN(CoreTextEventStatus status) { _TextEventArg* pEventArg = new (std::nothrow) _TextEventArg(status); - SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); return pEventArg; } diff --git a/src/ui/controls/FUiCtrl_TokenEdit.cpp b/src/ui/controls/FUiCtrl_TokenEdit.cpp index daeea4f..396e522 100644 --- a/src/ui/controls/FUiCtrl_TokenEdit.cpp +++ b/src/ui/controls/FUiCtrl_TokenEdit.cpp @@ -60,7 +60,6 @@ _TokenEdit::_TokenEdit(void) _TokenEdit::~_TokenEdit(void) { - } _TokenEdit* @@ -71,7 +70,7 @@ _TokenEdit::CreateTokenEditN(void) SysTryReturn(NID_UI_CTRL, pPresenter != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); _TokenEdit* pTokenEdit = new (std::nothrow) _TokenEdit(); - SysTryCatch(NID_UI_CTRL, pTokenEdit != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pTokenEdit != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); pTokenEdit->AcquireHandle(); @@ -97,13 +96,10 @@ _TokenEdit::OnDraw(void) return; } - Canvas* pCanvas = GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - - r = __pTokenEditPresenter->Draw(*pCanvas); + r = __pTokenEditPresenter->Draw(); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - delete pCanvas; + return; } result @@ -127,7 +123,7 @@ _TokenEdit::AppendToken(const String& token) { result r = E_SUCCESS; - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); r = __pTokenEditPresenter->AppendToken(token); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); @@ -140,7 +136,7 @@ _TokenEdit::InsertTokenAt(int index, const String& token) { result r = E_SUCCESS; - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); r = __pTokenEditPresenter->InsertTokenAt(index, token, true); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); @@ -151,7 +147,7 @@ _TokenEdit::InsertTokenAt(int index, const String& token) String _TokenEdit::GetTokenAt(int index) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->GetTokenAt(index); } @@ -159,7 +155,7 @@ _TokenEdit::GetTokenAt(int index) const int _TokenEdit::GetTokenCount(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->GetTokenCount(true); } @@ -167,7 +163,7 @@ _TokenEdit::GetTokenCount(void) const int _TokenEdit::GetSelectedTokenIndex(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->GetSelectedTokenIndex(); } @@ -175,7 +171,7 @@ _TokenEdit::GetSelectedTokenIndex(void) const bool _TokenEdit::IsTokenEditModeEnabled(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); Variant var = GetProperty("tokenEditModeEnabled"); @@ -185,7 +181,7 @@ _TokenEdit::IsTokenEditModeEnabled(void) const result _TokenEdit::RemoveTokenAt(int index) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->RemoveTokenAt(index, true); } @@ -193,7 +189,7 @@ _TokenEdit::RemoveTokenAt(int index) result _TokenEdit::SetTokenSelected(int index, bool selected) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->SetTokenSelected(index, selected); } @@ -201,7 +197,7 @@ _TokenEdit::SetTokenSelected(int index, bool selected) result _TokenEdit::SetTokenEditModeEnabled(bool enable) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); Variant var(enable); @@ -304,11 +300,11 @@ _TokenEdit::SetTitleText(const String& title) { result r = E_SUCCESS; - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); - __pTokenEditPresenter->SetDescriptionText(title); + __pTokenEditPresenter->SetTitleText(title); - r = __pTokenEditPresenter->CalculateDescriptionTextRect(title); + r = __pTokenEditPresenter->CalculateTitleTextRect(title); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); r = __pTokenEditPresenter->CalculateTokenPositionFromIndex(0); @@ -324,23 +320,25 @@ _TokenEdit::SetTitleText(const String& title) String _TokenEdit::GetTitleText(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); - return __pTokenEditPresenter->GetDescriptionText(); + return __pTokenEditPresenter->GetTitleText(); } void _TokenEdit::SetAutoShrinkModeEnabled(bool enable) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); __pTokenEditPresenter->SetAutoShrinkModeEnabled(enable); + + return; } bool _TokenEdit::IsAutoShrinkModeEnabled(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); return __pTokenEditPresenter->IsAutoShrinkModeEnabled(); } @@ -404,9 +402,11 @@ _TokenEdit::SetPropertyNormalTokenColor(const Variant& color) { ClearLastResult(); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + __tokenColor[TOKEN_EDIT_STATUS_NORMAL] = color.ToColor(); - return E_SUCCESS; + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_NORMAL); } Variant @@ -422,9 +422,11 @@ _TokenEdit::SetPropertySelectedTokenColor(const Variant& color) { ClearLastResult(); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + __tokenColor[TOKEN_EDIT_STATUS_SELECTED] = color.ToColor(); - return E_SUCCESS; + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_SELECTED); } Variant @@ -440,9 +442,11 @@ _TokenEdit::SetPropertyHighlightedTokenColor(const Variant& color) { ClearLastResult(); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + __tokenColor[TOKEN_EDIT_STATUS_HIGHLIGHTED] = color.ToColor(); - return E_SUCCESS; + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_HIGHLIGHTED); } Variant @@ -458,9 +462,11 @@ _TokenEdit::SetPropertyDisabledTokenColor(const Variant& color) { ClearLastResult(); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + __tokenColor[TOKEN_EDIT_STATUS_DISABLED] = color.ToColor(); - return E_SUCCESS; + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_DISABLED); } Variant @@ -516,7 +522,7 @@ _TokenEdit::GetPropertySelectedTokenTextColor(void) const result _TokenEdit::SetPropertyTokenEditModeEnabled(const Variant& enable) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); ClearLastResult(); @@ -526,7 +532,7 @@ _TokenEdit::SetPropertyTokenEditModeEnabled(const Variant& enable) Variant _TokenEdit::GetPropertyTokenEditModeEnabled(void) const { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); ClearLastResult(); @@ -556,7 +562,7 @@ _TokenEdit::OnAttachedToMainTree(void) void _TokenEdit::OnBoundsChanged(void) { - SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); __pTokenEditPresenter->OnBoundsChanged(); @@ -601,6 +607,8 @@ _TokenEdit::UpdateAccessibilityElement(EditAccessibilityElementType type) pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + GetGuideText() + GetText()); } pTextAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + + pTextAccessibilityElement->SetSupportOperatingGesture(false); } break; @@ -643,10 +651,10 @@ _TokenEdit::AddTitleAccessibilityElement(void) if (pContainer) { _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); String labelText = GetTitleText(); - pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetDescriptionTextRect()); + pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetTitleTextRect()); pAccessibilityElement->SetLabel(labelText); pContainer->AddElement(*pAccessibilityElement); __pTitleTextAccessibilityElement = pAccessibilityElement; @@ -670,7 +678,7 @@ _TokenEdit::AddCursorAccessibilityElement(void) if (pContainer) { _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); if (GetTextLength()) { @@ -678,7 +686,7 @@ _TokenEdit::AddCursorAccessibilityElement(void) } else { - pAccessibilityElement->SetTrait(L"Edit field"); + pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS"); } pContainer->AddElement(*pAccessibilityElement); @@ -715,6 +723,8 @@ _TokenEdit::RemoveTitleAccessibilityElement(void) __pTitleTextAccessibilityElement = null; } } + + return; } void @@ -729,6 +739,8 @@ _TokenEdit::RemoveCursorAccessibilityElement(void) __pCursorAccessibilityElement = null; } } + + return; } void diff --git a/src/ui/controls/FUiCtrl_TokenEditModel.cpp b/src/ui/controls/FUiCtrl_TokenEditModel.cpp index da57f47..ced08d8 100644 --- a/src/ui/controls/FUiCtrl_TokenEditModel.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditModel.cpp @@ -26,14 +26,10 @@ namespace Tizen { namespace Ui { namespace Controls _TokenEditModel::_TokenEditModel(void) { - } _TokenEditModel::~_TokenEditModel(void) { - } -}; -}; -}; +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp index abe7668..394288d 100644 --- a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -23,6 +23,8 @@ #include #include #include "FUiAnim_VisualElement.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" #include "FUi_UiTouchEvent.h" #include "FUiCtrl_TokenEditPresenter.h" #include "FUiCtrl_Scroll.h" @@ -32,6 +34,7 @@ #include "FUi_AccessibilityElement.h" #include "FUiAnim_VisualElementImpl.h" +using namespace Tizen::Ui::Animations; using namespace Tizen::Base; using namespace Tizen::Base::Runtime; using namespace Tizen::Media; @@ -115,8 +118,8 @@ _Token::Construct(const String& text, Font* pEditFont) currTokenLength = text.GetLength(); float tokenFontSize = 0.0f; - pTextObject = new (std::nothrow) TextObject; - SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed."); // for default initialize. r = pTextObject->Construct(); @@ -143,8 +146,8 @@ _Token::Construct(const String& text, Font* pEditFont) r = ResetToken(text); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pVisualElement = new (std::nothrow) _VisualElement; - SysTryCatch(NID_UI_CTRL, __pVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, __pVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = __pVisualElement->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct _VisualElement.", GetErrorMessage(r)); @@ -198,7 +201,7 @@ _Token::ResetToken(const String& text) pTextObject->RemoveAll(true); TextSimple* pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont); - SysTryCatch(NID_UI_CTRL, pSimpleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pSimpleText != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); r = pTextObject->AppendElement(*pSimpleText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -274,19 +277,22 @@ _Token::GetText(void) const _TokenEditPresenter::_TokenEditPresenter(void) : __pTokenEdit(null) , __pTokenList(null) - , __pTokenBgBitmap(null) + , __pReplacedTokenBgNormalBitmap(null) + , __pReplacedTokenBgSelectedBitmap(null) + , __pReplacedTokenBgHighlightedBitmap(null) + , __pReplacedTokenBgDisabledBitmap(null) , __pTokenBgNormalEffectBitmap(null) - , __pTokenBgPressedEffectBitmap(null) - , __pTokenBgReplacementFocusBitmap(null) - , __pTokenBgFocusEffectBitmap(null) + , __pTokenBgSelectedEffectBitmap(null) + , __pTokenBgHighlightedEffectBitmap(null) , __pressedTokenIndex(-1) , __isEditingToken(false) , __editingTokenIndex(-1) , __clientRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __initTextRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __isEditModeEnabled(true) - , __pDescriptionTextVisualElement(null) - , __pDescriptionTextTextObject(null) + , __pTitleTextVisualElement(null) + , __pFocusRingVisualElement(null) + , __pTitleTextObject(null) , __isTokenEditingFinished(false) , __prevScrollValue(0.0f) , __scrollValue(0.0f) @@ -294,14 +300,14 @@ _TokenEditPresenter::_TokenEditPresenter(void) , __isNeedToScroll(false) , __maxScrollValue(0.0f) , __autoShrink(false) - , __descriptionText(String()) + , __titleText(String()) , __isPopupVisible(false) , __isLongPressed(false) , __lineSpacing(0.0f) , __animatingIndex(-1) , __lastTokenIndex(-1) , __pTimingFunction(null) - , __descriptionTextRectForScroll(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __titleTextRectForScroll(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __previousTitleWidth(-1.0f) , __isTokenEditPresenterInitialized(false) , __isFocus(false) @@ -320,49 +326,35 @@ _TokenEditPresenter::_TokenEditPresenter(void) , __focusedTokenIndex(-1) , __drawFocusState(false) , __accessibilityFocusIn(false) + , __transactionId(0) + , __isDestroyed(false) { } result -_TokenEditPresenter::InitializeDescriptionText(void) +_TokenEditPresenter::InitializeTitleText(void) { result r = E_SUCCESS; - float descriptionTextSize = 0.0f; - Font* pFont = null; - float editFontSize = 0.0f; - __pDescriptionTextTextObject = new (std::nothrow) TextObject(); - SysTryReturnResult(NID_UI_CTRL, __pDescriptionTextTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed."); // for default initialize. - r = __pDescriptionTextTextObject->Construct(); + r = __pTitleTextObject->Construct(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = __pDescriptionTextTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = __pDescriptionTextTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + r = __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize); - - pFont = GetFont(); - SysTryCatch(NID_UI_CTRL, pFont != null, , r, "[%s] Propagating.", GetErrorMessage(r)); - - editFontSize = GetTextSize(); - (_FontImpl::GetInstance(*pFont))->SetSize(descriptionTextSize); - - r = __pDescriptionTextTextObject->SetFont(pFont, 0, __pDescriptionTextTextObject->GetTextLength()); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - (_FontImpl::GetInstance(*pFont))->SetSize(editFontSize); - return r; CATCH: - delete __pDescriptionTextTextObject; - __pDescriptionTextTextObject = null; + delete __pTitleTextObject; + __pTitleTextObject = null; return r; } @@ -391,6 +383,9 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) } } + __isDestroyed = true; + AnimationTransaction::Stop(__transactionId); //Stop the animation transaction + if (__pTokenList != null) { __pTokenList->RemoveAll(true); @@ -398,29 +393,41 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void) __pTokenList = null; } - delete __pTokenBgBitmap; - __pTokenBgBitmap = null; + delete __pReplacedTokenBgNormalBitmap; + __pReplacedTokenBgNormalBitmap = null; + + delete __pReplacedTokenBgSelectedBitmap; + __pReplacedTokenBgSelectedBitmap = null; + + delete __pReplacedTokenBgHighlightedBitmap; + __pReplacedTokenBgHighlightedBitmap = null; + + delete __pReplacedTokenBgDisabledBitmap; + __pReplacedTokenBgDisabledBitmap = null; delete __pTokenBgNormalEffectBitmap; __pTokenBgNormalEffectBitmap = null; - delete __pTokenBgPressedEffectBitmap; - __pTokenBgPressedEffectBitmap = null; + delete __pTokenBgSelectedEffectBitmap; + __pTokenBgSelectedEffectBitmap = null; - delete __pTokenBgReplacementFocusBitmap; - __pTokenBgReplacementFocusBitmap = null; + delete __pTokenBgHighlightedEffectBitmap; + __pTokenBgHighlightedEffectBitmap = null; - delete __pTokenBgFocusEffectBitmap; - __pTokenBgFocusEffectBitmap = null; + if (__pTitleTextVisualElement != null) + { + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; + } - if (__pDescriptionTextVisualElement != null) + if (__pFocusRingVisualElement != null) { - __pDescriptionTextVisualElement->Destroy(); - __pDescriptionTextVisualElement = null; + __pFocusRingVisualElement->Destroy(); + __pFocusRingVisualElement = null; } - delete __pDescriptionTextTextObject; - __pDescriptionTextTextObject = null; + delete __pTitleTextObject; + __pTitleTextObject = null; delete __pTimingFunction; __pTimingFunction = null; @@ -434,7 +441,7 @@ _TokenEditPresenter* _TokenEditPresenter::CreateTokenEditPresenterN(void) { _TokenEditPresenter* pPresenter = new (std::nothrow) _TokenEditPresenter(); - SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pPresenter; } @@ -447,20 +454,20 @@ _TokenEditPresenter::Initialize(const _Control& control) r = _EditPresenter::Initialize(control); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); - r = InitializeDescriptionText(); + r = InitializeTitleText(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); TextObject* pTextObject = GetTextObject(); if (pTextObject != null) { pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); - pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); pTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); } __pTokenEdit = dynamic_cast< _TokenEdit* >(GetEditView()); - SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_SYSTEM, "A system error has occurred. The _Token instance is null."); + SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_SYSTEM, "A system error has occurred. The _TokenEdit instance is null."); _TokenEditModel* pTokenEditModel = new (std::nothrow) _TokenEditModel(); SysTryReturnResult(NID_UI_CTRL, pTokenEditModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); @@ -524,15 +531,13 @@ _TokenEditPresenter::Initialize(const _Control& control) float tokenBottomMargin = 0.0f; float tokenHeight = 0.0f; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); - Color focusTokenColor; - Bitmap* pTokenBgFocusBitmap = null; + Color tokenColor; GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin); GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); - GET_COLOR_CONFIG(TOKENEDIT::BG_HIGHLIGHTED, focusTokenColor); // For drawing token in specific area __clientRect.x = leftMargin; @@ -553,32 +558,34 @@ _TokenEditPresenter::Initialize(const _Control& control) _EditPresenter::SetTextSize(__editContentFontSize); __pTokenList = new (std::nothrow) Collection::LinkedList(); - SysTryCatch(NID_UI_CTRL, __pTokenList != null, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, __pTokenList != null, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); __delimiter = L"\n"; - r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgBitmap); + tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_NORMAL); + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgNormalBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgNormalEffectBitmap); + tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED); + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgSelectedBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgPressedEffectBitmap); + tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_HIGHLIGHTED); + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgHighlightedBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTokenBgFocusBitmap); + tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_DISABLED); + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgDisabledBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - __pTokenBgReplacementFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN( - *pTokenBgFocusBitmap,Color::GetColor(COLOR_ID_MAGENTA), focusTokenColor); - SysTryCatch(NID_UI_CTRL, __pTokenBgReplacementFocusBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r)); - - r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgFocusEffectBitmap); + r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgNormalEffectBitmap); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - delete pTokenBgFocusBitmap; - pTokenBgFocusBitmap = null; + r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgSelectedEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgHighlightedEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); __isTokenEditPresenterInitialized = true; @@ -591,20 +598,23 @@ CATCH: delete pTokenEditModel; pTokenEditModel = null; - delete __pTokenBgBitmap; - __pTokenBgBitmap = null; + delete __pReplacedTokenBgNormalBitmap; + __pReplacedTokenBgNormalBitmap = null; - delete __pTokenBgNormalEffectBitmap; - __pTokenBgNormalEffectBitmap = null; + delete __pReplacedTokenBgSelectedBitmap; + __pReplacedTokenBgSelectedBitmap = null; + + delete __pReplacedTokenBgHighlightedBitmap; + __pReplacedTokenBgHighlightedBitmap = null; - delete __pTokenBgPressedEffectBitmap; - __pTokenBgPressedEffectBitmap = null; + delete __pReplacedTokenBgDisabledBitmap; + __pReplacedTokenBgDisabledBitmap = null; - delete pTokenBgFocusBitmap; - pTokenBgFocusBitmap = null; + delete __pTokenBgNormalEffectBitmap; + __pTokenBgNormalEffectBitmap = null; - delete __pTokenBgReplacementFocusBitmap; - __pTokenBgReplacementFocusBitmap = null; + delete __pTokenBgSelectedEffectBitmap; + __pTokenBgSelectedEffectBitmap = null; return r; } @@ -620,28 +630,25 @@ _TokenEditPresenter::DrawText(void) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "[%s] A system error has occurred. Failed to get visual element of token.", GetErrorMessage(E_SYSTEM)); Canvas* pTokenCanvas = pTokenVisualElement->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of the token."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of the token.", GetErrorMessage(E_SYSTEM)); FloatRectangle tokenRect(0.0f, 0.0f, pToken->displayRect.width, pToken->displayRect.height); pTokenCanvas->SetBackgroundColor(Color(0)); pTokenCanvas->Clear(); Color selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED); - Bitmap* pReplacementColorBackgroundBitmap = null; - if (__pTokenBgBitmap != null) + if (__pReplacedTokenBgSelectedBitmap != null) { - pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor); - - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); } } else @@ -649,15 +656,15 @@ _TokenEditPresenter::DrawText(void) pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); } - if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap)) + if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap)) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgPressedEffectBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgPressedEffectBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); } } @@ -665,8 +672,6 @@ _TokenEditPresenter::DrawText(void) delete pTokenCanvas; pTokenCanvas = null; - - delete pReplacementColorBackgroundBitmap; } } else @@ -680,7 +685,7 @@ _TokenEditPresenter::DrawText(void) else { Canvas* pCanvas = __pTokenEdit->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of Control."); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_SYSTEM, "[%s] A system error has occurred. Failed to get visual element of Control.", GetErrorMessage(E_SYSTEM)); _EditPresenter::DrawText(*pCanvas); @@ -688,31 +693,43 @@ _TokenEditPresenter::DrawText(void) pCanvas = null; } } + + return; } result -_TokenEditPresenter::Draw(Canvas& canvas) +_TokenEditPresenter::Draw(void) { + result r = E_SUCCESS; + _VisualElement* pEditVisualElement = null; + _VisualElement* pCursorVisualElement = null; + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + if (!IsInitialized()) { InitializeAtFirstDrawing(); - if (IsFocused()) + if (IsCurrentFocused()) { ShowKeypad(false); } } - canvas.SetBackgroundColor(Color(0, 0, 0, 0)); - canvas.Clear(); + //Do not change the bounds of the edit control after acquiring a canvas. + Canvas* pCanvas = __pTokenEdit->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); - DrawBackground(canvas); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + DrawBackground(*pCanvas); DrawScrollBar(); - if (__pDescriptionTextTextObject->GetTextLength() != 0) + if (__pTitleTextObject->GetTextLength() != 0) { - DrawDescriptionText(); + DrawTitleText(); } if (GetTokenCount() != 0) @@ -720,23 +737,23 @@ _TokenEditPresenter::Draw(Canvas& canvas) DrawToken(); } - _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); + pEditVisualElement = __pTokenEdit->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _TokenEdit visual element."); - _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); + pCursorVisualElement = GetCursorVisualElement(); + SysTryCatch(NID_UI_CTRL, pCursorVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); - _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); 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."); + pTokenVisualElement = pToken->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pTokenVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of token."); if (__isEditingToken) { Canvas* pTokenCanvas = pTokenVisualElement->GetCanvasN(); - SysTryReturnResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "A system error has occurred. Failed to get canvas of the token."); + SysTryCatch(NID_UI_CTRL, pTokenCanvas, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of the token."); _EditPresenter::DrawText(*pTokenCanvas); @@ -753,7 +770,7 @@ _TokenEditPresenter::Draw(Canvas& canvas) } else { - SysTryReturnResult(NID_UI_CTRL, !__isEditingToken, E_SYSTEM, "An invalid argument is given."); + SysTryCatch(NID_UI_CTRL, !__isEditingToken, , r = E_SYSTEM, "[E_SYSTEM] An invalid argument is given."); DrawText(); InitializeCursor(); @@ -768,7 +785,13 @@ _TokenEditPresenter::Draw(Canvas& canvas) __isTokenEditingFinished = false; } - return E_SUCCESS; + RestoreCopyPasteManager(); + + //fall through +CATCH: + delete pCanvas; + + return r; } bool @@ -781,7 +804,7 @@ _TokenEditPresenter::DrawToken(int count) bool isCustomBitmap = false; bool isCustomFocusBitmap = false; - SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[%s] A system error has occurred. The _TokenEdit instance is null.", GetErrorMessage(E_SYSTEM)); _ControlOrientation orientation = __pTokenEdit->GetOrientation(); @@ -809,47 +832,34 @@ _TokenEditPresenter::DrawToken(int count) Bitmap* pReplacementColorBackgroundBitmap = null; _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - if (pToken == null || pToken->pTextObject == null) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] The _Token instance is null"); - break; - } + SysTryReturn(NID_UI_CTRL, (pToken != null && pToken->pTextObject != null), true, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); normalTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_NORMAL); selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED); disabledTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_DISABLED); _VisualElement* pTokenElement = pToken->GetVisualElement(); - if (pTokenElement == null) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. The _VisualElement instance is null"); - break; - } + SysTryReturn(NID_UI_CTRL, pTokenElement != null, true, E_SYSTEM, "[%s] A system error has occurred. The _VisualElement instance must not be null.", GetErrorMessage(E_SYSTEM)); bool isSelected = false; Canvas* pTokenCanvas = pTokenElement->GetCanvasN(); - if (pTokenCanvas == null) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. The Canvas instance is null"); - break; - } + SysTryReturn(NID_UI_CTRL, pTokenCanvas != null, true, E_SYSTEM, "[%s] A system error has occurred. The Canvas instance must not be null.", GetErrorMessage(E_SYSTEM)); + FloatRectangle tokenRect(0.0f, 0.0f, pToken->displayRect.width, pToken->displayRect.height); pTokenCanvas->SetBackgroundColor(Color(0)); pTokenCanvas->Clear(); if (__pressedTokenIndex == i && IsFocused()) { - if (__pTokenBgBitmap != null) + if (__pReplacedTokenBgSelectedBitmap != null) { - pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor); - - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); } } else @@ -857,15 +867,15 @@ _TokenEditPresenter::DrawToken(int count) pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); } - if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap)) + if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap)) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgPressedEffectBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgPressedEffectBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); } } @@ -874,15 +884,16 @@ _TokenEditPresenter::DrawToken(int count) else { Color tokenBgColor = normalTokenColor; + pReplacementColorBackgroundBitmap = __pReplacedTokenBgNormalBitmap; + if (GetCurrentStatus() == EDIT_STATUS_DISABLED) { tokenBgColor = disabledTokenColor; + pReplacementColorBackgroundBitmap = __pReplacedTokenBgDisabledBitmap; } - if (__pTokenBgBitmap != null) + if (pReplacementColorBackgroundBitmap != null) { - pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), tokenBgColor); - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) { pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap); @@ -913,27 +924,27 @@ _TokenEditPresenter::DrawToken(int count) if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken)) { - if (__pTokenBgReplacementFocusBitmap != null) + if (__pReplacedTokenBgHighlightedBitmap != null) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgHighlightedBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap); } } - if (__pTokenBgFocusEffectBitmap != null && (!isCustomFocusBitmap)) + if (__pTokenBgHighlightedEffectBitmap != null && (!isCustomFocusBitmap)) { - if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap)) + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgHighlightedEffectBitmap)) { - pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgFocusEffectBitmap); + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap); } else { - pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgFocusEffectBitmap); + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap); } } @@ -973,9 +984,6 @@ _TokenEditPresenter::DrawToken(int count) pTokenElement->SetFlushNeeded(); delete pTokenCanvas; - - delete pReplacementColorBackgroundBitmap; - pReplacementColorBackgroundBitmap = null; } return true; } @@ -983,7 +991,7 @@ _TokenEditPresenter::DrawToken(int count) Color _TokenEditPresenter::GetTokenEditColor(const TokenEditStatus status) const { - SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[E_INVALID_STATE] _TokenEdit is in an invalid state."); + SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[%s] __pTokenEdit must not be null.", GetErrorMessage(E_INVALID_STATE)); return __pTokenEdit->GetTokenColor(status); } @@ -991,7 +999,7 @@ _TokenEditPresenter::GetTokenEditColor(const TokenEditStatus status) const Color _TokenEditPresenter::GetTokenEditTextColor(const TokenEditStatus status) const { - SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[E_INVALID_STATE] _TokenEdit is in an invalid state."); + SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[%s] __pTokenEdit must not be null.", GetErrorMessage(E_INVALID_STATE)); Color color; @@ -1010,7 +1018,7 @@ _TokenEditPresenter::GetTokenEditTextColor(const TokenEditStatus status) const result _TokenEditPresenter::MakeToken(const String& tokenString) { - SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_INVALID_STATE, "_TokenEdit is in an invalid state."); + SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_INVALID_STATE, "__pTokenEdit must not be null."); result r = E_SUCCESS; int tokenCount = 0; @@ -1032,10 +1040,9 @@ _TokenEditPresenter::MakeToken(const String& tokenString) if (inputTokenString.GetLength() <= 0) { r = ClearText(); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to clear text object.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear text object."); - SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength()); - return E_INVALID_ARG; + SysTryReturnResult(NID_UI_CTRL, false, E_INVALID_ARG, "Invalid argument is used. Input tokenString length is 0."); } _Token* pToken = new (std::nothrow) _Token(); @@ -1102,7 +1109,7 @@ _TokenEditPresenter::AppendToken(const Tizen::Base::String& token) result r = E_SUCCESS; r = MakeToken(token); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); if (__editingTokenIndex >= 0) { @@ -1153,7 +1160,7 @@ _TokenEditPresenter::InsertTokenAt(int index, const String& token, bool isUser) for (int i = 0; i < GetTokenCount(); i++) { pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - SysTryCatch(NID_UI_CTRL, pToken != null, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null"); + SysTryCatch(NID_UI_CTRL, pToken != null, , r = E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); r = pToken->SetBounds(pToken->displayRect); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds", GetErrorMessage(r)); @@ -1200,7 +1207,7 @@ String _TokenEditPresenter::GetTokenAt(int index) const { String tempString; - SysTryReturn(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] index (%d) is out of range.", index); + SysTryReturn(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), tempString, E_OUT_OF_RANGE, "[%s] index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); @@ -1258,7 +1265,7 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText) if (index == __editingTokenIndex && isClearText) { _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); + SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get edit visual element."); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); @@ -1286,6 +1293,7 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText) r = CalculateTokenPositionFromIndex(index); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to calculate token position."); + r = SetInitialBounds(); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); @@ -1419,7 +1427,7 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa float tokenHorizontalSpacing = 0.0f; float tokenTextLeftMargin = 0.0f; float tokenTextRightMargin = 0.0f; - float descriptionTextRightMargin = 0.0f; + float titleTextRightMargin = 0.0f; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin); @@ -1431,9 +1439,9 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HORIZONTAL_SPACING, orientation, tokenHorizontalSpacing); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); - GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, descriptionTextRightMargin); + GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin); - SysTryReturn(NID_UI_CTRL, startIndex >= 0 && startIndex <= tokenCount, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. startIndex = (%d)", startIndex); + SysTryReturn(NID_UI_CTRL, startIndex >= 0 && startIndex <= tokenCount, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. startIndex (%d) is not valid.", GetErrorMessage(E_INVALID_ARG), startIndex); _Token* pToken = null; _Token* pPreviousToken = null; @@ -1443,25 +1451,25 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF(); String titleText = __pTokenEdit->GetTitleText(); - if (!_FloatCompare(GetDescriptionTextRect().width, __previousTitleWidth)) + if (!_FloatCompare(GetTitleTextRect().width, __previousTitleWidth)) { - __descriptionTextRectForScroll = GetDescriptionTextRect(); - __previousTitleWidth = GetDescriptionTextRect().width; + __titleTextRectForScroll = GetTitleTextRect(); + __previousTitleWidth = GetTitleTextRect().width; } bool findPrevTokenLoopFlag = true; for (; index < tokenCount; index++) { pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); - SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); if (index == 0) { // TODO : description text (title style inner) if (titleText.GetLength()) { - pToken->displayRect.x = __descriptionTextRectForScroll.x + __descriptionTextRectForScroll.width + descriptionTextRightMargin; - pToken->displayRect.y = __descriptionTextRectForScroll.y + __scrollValue; + pToken->displayRect.x = __titleTextRectForScroll.x + __titleTextRectForScroll.width + titleTextRightMargin; + pToken->displayRect.y = __titleTextRectForScroll.y + __scrollValue; } else // Set description text. { @@ -1520,16 +1528,16 @@ _TokenEditPresenter::InitializeTokenVisibilityAt(int ndex) _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(ndex)); - SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); r = pToken->SetBounds(pToken->displayRect); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set bounds", GetErrorMessage(r)); _VisualElement* pRootElement = __pTokenEdit->GetVisualElement(); - SysTryReturn(NID_UI_CTRL, pRootElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); + SysTryReturn(NID_UI_CTRL, pRootElement, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); _VisualElement* pVisualElement = pToken->GetVisualElement(); - SysTryReturn(NID_UI_CTRL, pVisualElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element."); + SysTryReturn(NID_UI_CTRL, pVisualElement, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to get token _VisualElement.", GetErrorMessage(E_SYSTEM)); pVisualElement->SetShowState(true); @@ -1546,7 +1554,7 @@ _TokenEditPresenter::GetMaxTextHeight(void) float maxHeight = __editContentFontSize; pFont = GetFont(); - SysTryReturn(NID_UI_CTRL, pFont != null, maxHeight, E_SYSTEM, "[E_SYSTEM] Failed to get Font instance."); + SysTryReturn(NID_UI_CTRL, pFont != null, maxHeight, E_SYSTEM, "[%s] A system error has occured. Failed to get Font instance.", GetErrorMessage(E_SYSTEM)); maxHeight = pFont->GetMaxHeightF(); @@ -1559,7 +1567,7 @@ _TokenEditPresenter::ResetTextBounds(void) if (!__isEditingToken) { result r = SetInitialBounds(); - SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to set margin."); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] A system error has occured. Failed to set margin.", GetErrorMessage(E_SYSTEM)); } return; } @@ -1579,7 +1587,7 @@ _TokenEditPresenter::SetInitialBounds(void) float tokenTextLeftMargin = 0.0f; float tokenTextRightMargin = 0.0f; float textBoundsAlignValue = 0.0f; - float descriptionTextRightMargin = 0.0f; + float titleTextRightMargin = 0.0f; _ControlOrientation orientation = GetEditView()->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin); @@ -1591,7 +1599,7 @@ _TokenEditPresenter::SetInitialBounds(void) GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HORIZONTAL_SPACING, orientation, tokenHorizontalSpacing); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); - GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, descriptionTextRightMargin); + GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin); float textObjectMaxHeight = GetMaxTextHeight(); textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f; @@ -1607,8 +1615,8 @@ _TokenEditPresenter::SetInitialBounds(void) { if (__pTokenEdit->GetTitleText().GetLength()) { - FloatRectangle descriptionTextRect = GetDescriptionTextRect(); - tokenTextRect.x = descriptionTextRect.x + descriptionTextRect.width + descriptionTextRightMargin; + FloatRectangle titleTextRect = GetTitleTextRect(); + tokenTextRect.x = titleTextRect.x + titleTextRect.width + titleTextRightMargin; } else { @@ -1620,6 +1628,7 @@ _TokenEditPresenter::SetInitialBounds(void) tokenTextRect.height = textObjectMaxHeight; SetTextBounds(tokenTextRect); + //set cursor bounds with tokenTextRect __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect); return r; @@ -1628,11 +1637,11 @@ _TokenEditPresenter::SetInitialBounds(void) _Token* pToken = null; // SetTextBounds from last token pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); - SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null"); + SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); float tempTextRectWidth = 0.0f; tempTextRectWidth = tokenEditBounds.width - pToken->displayRect.x - pToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); - if (tokenMinWidth > tempTextRectWidth) // Line change + if (tokenMinWidth > tempTextRectWidth && __pTokenEdit->IsFocusable() && __pTokenEdit->IsEnabled()) // Line change { tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); tokenTextRect.y = pToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing + textBoundsAlignValue; @@ -1647,6 +1656,7 @@ _TokenEditPresenter::SetInitialBounds(void) tokenTextRect.height = textObjectMaxHeight; SetTextBounds(tokenTextRect); + if (__pressedTokenIndex < 0) // Set cursor as global focused element if no token is selected { __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect); @@ -1661,19 +1671,19 @@ _TokenEditPresenter::SetInitialBounds(void) } result -_TokenEditPresenter::SetDescriptionTextRect(const FloatRectangle& rect) +_TokenEditPresenter::SetTitleTextRect(const FloatRectangle& rect) { result r = E_SUCCESS; - __descriptionTextRect = rect; + __titleTextRect = rect; return r; } FloatRectangle -_TokenEditPresenter::GetDescriptionTextRect() const +_TokenEditPresenter::GetTitleTextRect() const { - return __descriptionTextRect; + return __titleTextRect; } Rectangle @@ -1682,7 +1692,7 @@ _TokenEditPresenter::GetTextBounds(void) const 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."); + SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM)); _ControlOrientation orientation = __pTokenEdit->GetOrientation(); float tokenTextLeftMargin = 0.0f; @@ -1707,7 +1717,7 @@ _TokenEditPresenter::GetTextBoundsF(void) const 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."); + SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM)); _ControlOrientation orientation = __pTokenEdit->GetOrientation(); int tokenTextLeftMargin = 0; @@ -1772,19 +1782,19 @@ _TokenEditPresenter::CreateAnimationN(VisualElement& source) { VisualElementAnimation* pAnimation = null; VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup(); - SysTryReturn(NID_UI_CTRL, pAnimationGroup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pAnimationGroup, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pAnimationGroup->SetDuration(ANIMATION_DURATION_BOUNDS); if (__pTimingFunction == null) { __pTimingFunction = new (std::nothrow) SineTimingFunction(); - SysTryReturn(NID_UI_CTRL, __pTimingFunction, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, __pTimingFunction, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } if (pAnimationGroup != null) { VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); - SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pOpacityAnimation->SetPropertyName("opacity"); @@ -1797,7 +1807,7 @@ _TokenEditPresenter::CreateAnimationN(VisualElement& source) delete pOpacityAnimation; VisualElementPropertyAnimation* pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); - SysTryReturn(NID_UI_CTRL, pBoundsAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_CTRL, pBoundsAnimation, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pBoundsAnimation->SetPropertyName("bounds"); FloatRectangle startValue = source.GetBounds(); @@ -1821,7 +1831,7 @@ _TokenEditPresenter::CreateAnimationN(VisualElement& source) } result -_TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText) +_TokenEditPresenter::CalculateTitleTextRect(const String& titleText) { result r = E_SUCCESS; @@ -1833,6 +1843,9 @@ _TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText) float tokenTextLeftMargin = 0.0f; float tokenTextRightMargin = 0.0f; float tokenTitleWidth = 0.0f; + float titleTextSize = 0.0f; + Font* pFont = null; + float editFontSize = 0.0f; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); @@ -1843,40 +1856,53 @@ _TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText) GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TITLE_RECT_WIDTH, orientation, tokenTitleWidth); - int length = descriptionText.GetLength(); + int length = titleText.GetLength(); FloatDimension textSize; - wchar_t* pTempString = const_cast< wchar_t* >(descriptionText.GetPointer()); + wchar_t* pTempString = const_cast< wchar_t* >(titleText.GetPointer()); - SysAssertf(__pDescriptionTextTextObject != null, "The TextObject instance is null."); + SysAssertf(__pTitleTextObject != null, "The TextObject instance is null."); - __pDescriptionTextTextObject->RemoveAll(true); + __pTitleTextObject->RemoveAll(true); pSimpleText = new (std::nothrow) TextSimple(pTempString, length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL); - __pDescriptionTextTextObject->AppendElement(*pSimpleText); + __pTitleTextObject->AppendElement(*pSimpleText); - textSize = __pDescriptionTextTextObject->GetTextExtentF(0, length); - r = __pDescriptionTextTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); - r = __pDescriptionTextTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleTextSize); + + pFont = GetFont(); + SysTryReturnResult(NID_UI_CTRL, pFont != null, r, "Propagating."); + + editFontSize = GetTextSize(); + (_FontImpl::GetInstance(*pFont))->SetSize(titleTextSize); + + r = __pTitleTextObject->SetFont(pFont, 0, __pTitleTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + (_FontImpl::GetInstance(*pFont))->SetSize(editFontSize); - __descriptionTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); - __descriptionTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + textSize = __pTitleTextObject->GetTextExtentF(0, length); + r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + r = __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + + __titleTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + __titleTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); if (textSize.width > tokenTitleWidth) { textSize.width = tokenTitleWidth; - __pDescriptionTextTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + __pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); } - __descriptionTextRect.width = tokenTextLeftMargin + textSize.width + tokenTextRightMargin; - __descriptionTextRect.height = tokenHeight; - __pDescriptionTextTextObject->SetBounds(__descriptionTextRect); + __titleTextRect.width = tokenTextLeftMargin + textSize.width + tokenTextRightMargin; + __titleTextRect.height = tokenHeight; + __pTitleTextObject->SetBounds(__titleTextRect); - if (__pDescriptionTextTextObject->IsChanged()) + if (__pTitleTextObject->IsChanged()) { _EditPresenter::StopTitleSlidingTimer(); __isTitleSliding = false; } - r = __pDescriptionTextTextObject->Compose(); + r = __pTitleTextObject->Compose(); return r; } @@ -1898,95 +1924,85 @@ _TokenEditPresenter::IsGuideTextActivated(void) const } bool -_TokenEditPresenter::DrawDescriptionText(void) +_TokenEditPresenter::DrawTitleText(void) { result r = E_SUCCESS; - FloatRectangle tempDescriptionTextRect; - FloatRectangle descriptionTextRect(__descriptionTextRect); - Canvas* pDescriptionTextCanvas = null; + FloatRectangle tempTitleTextRect; + FloatRectangle titleTextRect(__titleTextRect); + Canvas* pTitleTextCanvas = null; Font* pDescriptionFont = null; TextObjectActionType titleAction; _VisualElement* pRootElement = null; - if (__pDescriptionTextTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName()) + if (__pTitleTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName()) { - float descriptionTextSize = 0.0f; - GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize); + float titleTextSize = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleTextSize); pDescriptionFont = GetFont(); if (pDescriptionFont != null) { float editFontSize = GetTextSize(); - (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(descriptionTextSize); + (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(titleTextSize); - r = __pDescriptionTextTextObject->SetFont(pDescriptionFont, 0, __pDescriptionTextTextObject->GetTextLength()); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. SetFont failed"); + r = __pTitleTextObject->SetFont(pDescriptionFont, 0, __pTitleTextObject->GetTextLength()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to set the description text font.", GetErrorMessage(E_SYSTEM)); (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(editFontSize); } } pRootElement = __pTokenEdit->GetVisualElement(); - SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); + SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); - if (__pDescriptionTextVisualElement == null) + if (__pTitleTextVisualElement == null) { - __pDescriptionTextVisualElement = new (std::nothrow) _VisualElement(); - SysTryCatch(NID_UI_CTRL, __pDescriptionTextVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - r = __pDescriptionTextVisualElement->Construct(); - SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] A system error has occurred. Failed to construct _VisualElement"); - __pDescriptionTextVisualElement->SetImplicitAnimationEnabled(false); - __pDescriptionTextVisualElement->SetShowState(true); + __pTitleTextVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, __pTitleTextVisualElement, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + r = __pTitleTextVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] A system error has occurred. Failed to construct _VisualElement", GetErrorMessage(E_SYSTEM)); + __pTitleTextVisualElement->SetImplicitAnimationEnabled(false); + __pTitleTextVisualElement->SetShowState(true); - r = pRootElement->AttachChild(*__pDescriptionTextVisualElement); + r = pRootElement->AttachChild(*__pTitleTextVisualElement); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } - descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue; - __pDescriptionTextVisualElement->SetBounds(descriptionTextRect); - UpdateTitleAccessibilityBounds(descriptionTextRect); // Update title accessibility bounds to same as DescriptionTextVisualElement bounds + titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + __pTitleTextVisualElement->SetBounds(titleTextRect); + UpdateTitleAccessibilityBounds(titleTextRect); // Update title accessibility bounds to same as TitleTextVisualElement bounds - pDescriptionTextCanvas = __pDescriptionTextVisualElement->GetCanvasN(); - if (pDescriptionTextCanvas == null) - { - SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to get canvas of an instance of _VisualElement."); - return true; - } + pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pTitleTextCanvas != null, , E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of description text _VisualElement instance.", GetErrorMessage(E_SYSTEM)); - tempDescriptionTextRect = __descriptionTextRect; - tempDescriptionTextRect.x = 0.0f; - tempDescriptionTextRect.y = 0.0f; + tempTitleTextRect = __titleTextRect; + tempTitleTextRect.x = 0.0f; + tempTitleTextRect.y = 0.0f; - titleAction = __pDescriptionTextTextObject->GetAction(); + titleAction = __pTitleTextObject->GetAction(); - pDescriptionTextCanvas->SetBackgroundColor(Color(0)); - pDescriptionTextCanvas->Clear(); - __pDescriptionTextTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pDescriptionTextTextObject->GetTextLength()); + pTitleTextCanvas->SetBackgroundColor(Color(0)); + pTitleTextCanvas->Clear(); + __pTitleTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pTitleTextObject->GetTextLength()); if (IsFocused()) { - if (__pDescriptionTextTextObject->GetTextLengthAt(0) < __pDescriptionTextTextObject->GetTextLength()) - { - if (titleAction != TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT) - { - __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); - __pDescriptionTextTextObject->Compose(); - } - } - else + + if (titleAction != TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT) { - if (titleAction != TEXT_OBJECT_ACTION_TYPE_NONE) - { - __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); - __pDescriptionTextTextObject->Compose(); - } + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + __pTitleTextObject->Compose(); } + // Draw title text + __pTitleTextObject->SetBounds(tempTitleTextRect); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + if (!__isTitleSliding) { _EditPresenter::StopTitleSlidingTimer(); - if (__pDescriptionTextTextObject->IsActionOn()) + if (__pTitleTextObject->IsActionOn()) { _EditPresenter::StartTitleSlidingTimer(); __isTitleSliding = true; @@ -1997,24 +2013,24 @@ _TokenEditPresenter::DrawDescriptionText(void) { if (titleAction != TEXT_OBJECT_ACTION_TYPE_ABBREV) { - __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); - __pDescriptionTextTextObject->Compose(); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->Compose(); } - } - // Draw title text - __pDescriptionTextTextObject->SetBounds(tempDescriptionTextRect); - __pDescriptionTextTextObject->Draw(*_CanvasImpl::GetInstance(*pDescriptionTextCanvas)); + // Draw title text + __pTitleTextObject->SetBounds(tempTitleTextRect); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + } - delete pDescriptionTextCanvas; + delete pTitleTextCanvas; return true; CATCH: - if (__pDescriptionTextVisualElement != null) + if (__pTitleTextVisualElement != null) { - __pDescriptionTextVisualElement->Destroy(); - __pDescriptionTextVisualElement = null; + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; } return false; @@ -2034,7 +2050,7 @@ _TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index) _Token* pToken = null; pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); - SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null"); + SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF(); FloatRectangle tokenRect = pToken->displayRect; @@ -2152,9 +2168,9 @@ _TokenEditPresenter::RecalculateTokenBounds(float position) InitializeTokenVisibilityAt(i); } - if (__pDescriptionTextTextObject->GetTextLength() != 0) + if (__pTitleTextObject->GetTextLength() != 0) { - __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue; + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; } __pTokenEdit->Invalidate(); @@ -2169,66 +2185,69 @@ result _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo) { result r = E_SUCCESS; - int currentYPosition = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).y; + float currentYPosition = touchinfo.GetCurrentPosition().y; - if (_FloatCompare(__prevScrollValue, 0.0f)) + if (!IsHorizontalDirection(touchinfo)) { - __prevScrollValue = currentYPosition; - } - else // Adjust moved y position to all tokens. - { - if (__isNeedToScroll) // Need to scroll + if (_FloatCompare(__prevScrollValue, 0.0f)) { - float tempDefference = __prevScrollValue - currentYPosition; - __prevScrollValue = currentYPosition; - __scrollValue -= tempDefference; - - if (__scrollValue < -__maxScrollValue) + } + else // Adjust moved y position to all tokens. + { + if (__isNeedToScroll) // Need to scroll { - __scrollValue = -__maxScrollValue; + float tempDefference = __prevScrollValue - currentYPosition; - return E_SUCCESS; - } + __prevScrollValue = currentYPosition; + __scrollValue -= tempDefference; - if (__scrollValue > 0.0f) - { - __scrollValue = 0.0f; + if (__scrollValue < -__maxScrollValue) + { + __scrollValue = -__maxScrollValue; - return E_SUCCESS; - } + return E_SUCCESS; + } - int tokenCount = GetTokenCount(); - CalculateTokenPositionFromIndex(0); - for (int i = 0; i < tokenCount; i++) - { - _Token* pToken = null; - pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + if (__scrollValue > 0.0f) + { + __scrollValue = 0.0f; - if (pToken != null) + return E_SUCCESS; + } + + int tokenCount = GetTokenCount(); + CalculateTokenPositionFromIndex(0); + for (int i = 0; i < tokenCount; i++) + { + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + TrimTokenAndAdjustEllipsisAt(i); + InitializeTokenVisibilityAt(i); + } + + if (__pTitleTextObject->GetTextLength() != 0) { - pToken->SetBounds(pToken->displayRect); + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; } - TrimTokenAndAdjustEllipsisAt(i); - InitializeTokenVisibilityAt(i); - } - if (__pDescriptionTextTextObject->GetTextLength() != 0) + __pTokenEdit->Invalidate(); + } + else { - __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue; + __prevScrollValue = 0.0f; + __scrollValue = 0.0f; } - - __pTokenEdit->Invalidate(); - } - else - { - __prevScrollValue = 0.0f; - __scrollValue = 0.0f; } - } - r = SetInitialBounds(); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); + } return r; } @@ -2242,6 +2261,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _ if (__trackTokenIndex != tokenIndex) { __isLongPressed = false; + return E_SUCCESS; //If already pressed on a token and released elsewhere. } int prevPressedTokenIndex = __pressedTokenIndex; @@ -2478,7 +2498,7 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition) } _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); - SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); float newScrollValue = 0.0f; @@ -2667,6 +2687,8 @@ void _TokenEditPresenter::SetAutoShrinkModeEnabled(bool enable) { __autoShrink = enable; + + return; } bool @@ -2676,15 +2698,17 @@ _TokenEditPresenter::IsAutoShrinkModeEnabled(void) const } void -_TokenEditPresenter::SetDescriptionText(String descriptionText) +_TokenEditPresenter::SetTitleText(String titleText) { - __descriptionText = descriptionText; + __titleText = titleText; + + return; } String -_TokenEditPresenter::GetDescriptionText(void) const +_TokenEditPresenter::GetTitleText(void) const { - return __descriptionText; + return __titleText; } int @@ -2701,7 +2725,7 @@ _TokenEditPresenter::CalculateVisibleTokenCount(void) { tempInitialBounds = intialBounds; _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); - SysTryReturn(NID_UI_CTRL, pToken != null, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, pToken != null, -1, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); FloatRectangle displayBounds = pToken->displayRect; if ((tempInitialBounds.y + displayBounds.y) > (tempInitialBounds.y + tempInitialBounds.height)) @@ -2746,7 +2770,7 @@ _TokenEditPresenter::OnFocusGained(void) if (!__isFocus) { - __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue; + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; __isFocus = true; } @@ -2762,13 +2786,6 @@ _TokenEditPresenter::OnFocusGained(void) CheckTokenScrolling(); } - TextObject* pTextObject = GetTextObject(); - if (pTextObject != null) - { - pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); - pTextObject->Compose(); - } - if (__pressedTokenIndex < 0) { StopCursorTimer(); @@ -2868,14 +2885,11 @@ _TokenEditPresenter::OnFocusLost(void) SetEditingTokenTextBounds(__editingTokenIndex, false); - __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue; + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; } - - TextObject* pTextObject = GetTextObject(); - if (pTextObject != null) + else { - pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); - pTextObject->Compose(); + ScrollPanelToCursorPosition(); } RemoveChildAccessibilityElements(); @@ -2991,7 +3005,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t _TouchInfo TouchInfo(touchinfo); _Token* pToken = null; - if (__editingTokenIndex >= 0) + if (__editingTokenIndex >= 0 && !_EditPresenter::IsDragAndDropStarted()) { pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); if (pToken != null) @@ -3011,6 +3025,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t __isTouchMoveInProgress = false; __trackTokenIndex = -1; + __pTokenEdit->Invalidate(); return false; } @@ -3019,6 +3034,8 @@ void _TokenEditPresenter::OnInputConnectionTextCommitted(InputConnection& source, const String& committedText) { OnTextCommitted(committedText); + + return; } void @@ -3074,6 +3091,9 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) pAccessibilityManager->RequestToDrawFocusUi(); } + //Adjust the scroll panel if already added so that the cursor is in the visible area. + ScrollPanelToCursorPosition(); + return; } @@ -3084,7 +3104,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) if (__editingTokenIndex >= 0) { pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - SysTryReturnVoidResult(NID_UI_CTRL, pToken, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null"); + SysTryReturnVoidResult(NID_UI_CTRL, pToken, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); pToken->ResetToken(GetText()); TrimTokenAndAdjustEllipsisAt(__editingTokenIndex); @@ -3146,6 +3166,8 @@ void _TokenEditPresenter::DeleteSurroundingText(InputConnection& source, int offset, int charCount) { OnSurroundingTextDeleted(offset, charCount); + + return; } void @@ -3163,10 +3185,10 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); _Token* pToken = null; _VisualElement* pTokenVisualElement = null; @@ -3176,7 +3198,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM)); if (pCursorVisualElement->GetParent() != pEditVisualElement) { @@ -3189,6 +3211,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) } } + _EditPresenter::SetTextSize(__editContentFontSize); RemoveTokenAt(__editingTokenIndex); CalculateTokenPositionFromIndex(__editingTokenIndex); @@ -3205,7 +3228,6 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) __pressedTokenIndex = -1; __editingTokenIndex = -1; __isEditingToken = false; - _EditPresenter::SetTextSize(__editContentFontSize); __isTokenEditingFinished = false; AdjustFlexibleHeight(); @@ -3214,10 +3236,10 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) else if (__pressedTokenIndex != -1) { _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."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get root visual element.", GetErrorMessage(E_SYSTEM)); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); _Token* pToken = null; _VisualElement* pTokenVisualElement = null; @@ -3227,7 +3249,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM)); if (pCursorVisualElement->GetParent() != pEditVisualElement) { @@ -3262,10 +3284,10 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) else { _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."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); _Token* pToken = null; _VisualElement* pTokenVisualElement = null; @@ -3276,7 +3298,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM)); pTokenVisualElement->RemoveAllAnimations(); } } @@ -3285,7 +3307,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM)); if (pCursorVisualElement->GetParent() != pEditVisualElement) { @@ -3422,6 +3444,8 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) } __pTokenEdit->Draw(); + + return; } bool @@ -3496,7 +3520,7 @@ _TokenEditPresenter::OnCursorTimerExpired(void) FloatRectangle cursorRect; _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); - SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null"); + SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); //Set Editing token bounds for text scroll and cursor position calculation (SetTextBounds should have been done prior to this) FloatRectangle cursorDspRect = _EditPresenter::GetTextBoundsF(); @@ -3508,10 +3532,10 @@ _TokenEditPresenter::OnCursorTimerExpired(void) } _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); Canvas* pCursorCanvas = pCursorVisualElement->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorCanvas != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorCanvas != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of cursor visual element.", GetErrorMessage(E_SYSTEM)); bool cursorEnable = IsCursorEnabled(); @@ -3537,6 +3561,8 @@ _TokenEditPresenter::OnCursorTimerExpired(void) { _EditPresenter::OnCursorTimerExpired(); } + + return; } bool @@ -3553,8 +3579,9 @@ bool _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) { __isTouchMoveInProgress = true; + float tempPrevScrollValue = __prevScrollValue; - if (GetTokenCount()) + if (GetTokenCount() && !_EditPresenter::IsDragAndDropStarted()) { //Scrolling is blocked when a popup is visible or when a text is blocked if (IsBlocked() || __isLongPressed) @@ -3602,7 +3629,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; float controlHeight = __pTokenEdit->GetBoundsF().height; - if (totalHeight > controlHeight) + if (totalHeight > controlHeight && (!IsHorizontalDirection(touchinfo))) { pScroll->SetScrollVisibility(true); } @@ -3613,6 +3640,12 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc } } + if ((__scrollValue < 0.0f && __scrollValue > -__maxScrollValue) || !tempPrevScrollValue) + { + _EditPresenter::OnTouchMoved(source, touchinfo); + return true; + } + return _EditPresenter::OnTouchMoved(source, touchinfo); } else @@ -3626,6 +3659,12 @@ void _TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) { __isAnimationInProgress = false; + + if (__isDestroyed) + { + return; + } + RemoveTokenAt(GetTokenCount() - 1); CalculateTokenPositionFromIndex(GetTokenCount() - 1); @@ -3655,6 +3694,7 @@ _TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation DrawToken(); __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + __transactionId = 0; return; } @@ -3678,19 +3718,21 @@ _TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn } else { - SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get presentation instance of visual element."); + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Failed to get presentation instance of visual element.", GetErrorMessage(E_SYSTEM)); } target.ReleasePresentationInstance(); + + return; } void _TokenEditPresenter::OnTimerExpired(Timer& timer) { Timer* onTimer = &timer; - Canvas* pDescriptionTextCanvas = null; + Canvas* pTitleTextCanvas = null; - if (onTimer == _EditPresenter::__pTitleSlidingTimer) + if (onTimer == __pTitleSlidingTimer) { if (!IsFocused()) { @@ -3699,21 +3741,21 @@ _TokenEditPresenter::OnTimerExpired(Timer& timer) return; } - FloatRectangle tempDescriptionTextRect = __descriptionTextRect; - tempDescriptionTextRect.x = 0.0f; - tempDescriptionTextRect.y = 0.0f; + FloatRectangle tempTitleTextRect = __titleTextRect; + tempTitleTextRect.x = 0.0f; + tempTitleTextRect.y = 0.0f; - pDescriptionTextCanvas = __pDescriptionTextVisualElement->GetCanvasN(); - SysTryReturnVoidResult(NID_UI_CTRL, pDescriptionTextCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pDescriptionTextCanvas is invalid!"); + pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pTitleTextCanvas, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - pDescriptionTextCanvas->SetBackgroundColor(Color(0)); - pDescriptionTextCanvas->Clear(); - __pDescriptionTextTextObject->SetBounds(tempDescriptionTextRect); - __pDescriptionTextTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pDescriptionTextCanvas)); - Rectangle descriptionTextRect = _CoordinateSystemUtils::ConvertToInteger(tempDescriptionTextRect); - pDescriptionTextCanvas->Show(descriptionTextRect); + pTitleTextCanvas->SetBackgroundColor(Color(0)); + pTitleTextCanvas->Clear(); + __pTitleTextObject->SetBounds(tempTitleTextRect); + __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + Rectangle titleTextRect = _CoordinateSystemUtils::ConvertToInteger(tempTitleTextRect); + pTitleTextCanvas->Show(titleTextRect); - delete pDescriptionTextCanvas; + delete pTitleTextCanvas; _EditPresenter::StartTitleSlidingTimer(); __isTitleSliding = true; @@ -3722,6 +3764,8 @@ _TokenEditPresenter::OnTimerExpired(Timer& timer) { _EditPresenter::OnTimerExpired(timer); } + + return; } result @@ -3839,7 +3883,7 @@ _TokenEditPresenter::AttachCursorToToken(void) if (__pressedTokenIndex != -1) { _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); + SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get edit visual element."); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); @@ -3875,10 +3919,10 @@ _TokenEditPresenter::DetachCursorFromToken(void) if (__pressedTokenIndex != -1) { _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); + SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); _Token* pToken = null; _VisualElement* pTokenVisualElement = null; @@ -3888,15 +3932,15 @@ _TokenEditPresenter::DetachCursorFromToken(void) 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."); + SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); if (pCursorVisualElement->GetParent() != pEditVisualElement) { r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); r = pEditVisualElement->AttachChild(*pCursorVisualElement); - SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); } } } @@ -3909,10 +3953,10 @@ _TokenEditPresenter::ExitTokenEditingMode(void) result r = E_SUCCESS; _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."); + SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); _VisualElement* pCursorVisualElement = GetCursorVisualElement(); - SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element."); + SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); _Token* pToken = null; _VisualElement* pTokenVisualElement = null; @@ -3922,7 +3966,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void) 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."); + SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM)); if (pCursorVisualElement->GetParent() != pEditVisualElement) { @@ -3944,18 +3988,18 @@ _TokenEditPresenter::ExitTokenEditingMode(void) inputTokenString = replacementString; } - r = RemoveTokenAt(__editingTokenIndex); - _EditPresenter::SetTextSize(__editContentFontSize); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + r = RemoveTokenAt(__editingTokenIndex); + if (inputTokenString.GetLength() > 0) { r = InsertTokenAt(__editingTokenIndex, inputTokenString); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex)); - SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); pToken->currTokenLength = inputTokenString.GetLength(); } @@ -3984,7 +4028,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void) if (inputTokenString.GetLength() <= 0) { - SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength()); + SysLog(NID_UI_CTRL, "[%s] Invalid argument is used. Token length is (%d)", GetErrorMessage(E_INVALID_ARG), inputTokenString.GetLength()); } return; @@ -4084,9 +4128,10 @@ _TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf { SetCursorDisabled(false); CheckTokenScrolling(); - __pTokenEdit->Invalidate(); } + __pTokenEdit->Invalidate(); + StartCursorTimer(); } @@ -4106,7 +4151,7 @@ _TokenEditPresenter::GetTextAccessibilityElementText(void) const for (int index = 0; index < readTokenCount; index++) { pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); - SysTryReturn(NID_UI_CTRL, pToken, tokenText, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); + SysTryReturn(NID_UI_CTRL, pToken, tokenText, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); if (index < (readTokenCount - 1)) { @@ -4153,12 +4198,12 @@ _TokenEditPresenter::AddChildAccessibilityElements(void) for (int index = 0; index < tokenCount; 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."); + SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); 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."); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); String labelText = pToken->GetText(); pAccessibilityElement->SetBounds(pToken->displayRect); @@ -4204,12 +4249,12 @@ _TokenEditPresenter::AppendTokenAccessibilityElement(void) _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); _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."); + SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); 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."); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); String labelText = pToken->GetText(); pAccessibilityElement->SetBounds(pToken->displayRect); @@ -4229,12 +4274,12 @@ _TokenEditPresenter::InsertTokenAccessibilityElementAt(int index) _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); _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."); + SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); 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."); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); String labelText = pToken->GetText(); pAccessibilityElement->SetBounds(pToken->displayRect); @@ -4276,7 +4321,7 @@ _TokenEditPresenter::UpdateTokenAccessibilityBounds(void) for (int index = 0; index < tokenCount; 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."); + SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) { @@ -4498,6 +4543,7 @@ _TokenEditPresenter::OnAccessibilityActionPerformed(const _AccessibilityContaine { if (pTextAccessibilityElement == &element) { + __pTokenEdit->SetFocused(true); if (__pTokenEdit->IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode. { _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); @@ -4622,11 +4668,11 @@ _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) if (__pTimingFunction == null) { __pTimingFunction = new (std::nothrow) SineTimingFunction(); - SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); - SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pOpacityAnimation->SetPropertyName("opacity"); pOpacityAnimation->SetStartValue(Variant(1.0f)); @@ -4636,7 +4682,7 @@ _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) pOpacityAnimation->SetTimingFunction(__pTimingFunction); VisualElementValueAnimation* pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation(); //deletion will happen in catch/ in Destroy animation - SysTryCatch(NID_UI_CTRL, pBoundsAnimation, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, pBoundsAnimation, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); pBoundsAnimation->SetTimingFunction(__pTimingFunction); startValue = source.GetBounds(); @@ -4651,7 +4697,7 @@ _TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) pBoundsAnimation->SetVisualElementAnimationTickEventListener(this); pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS); - AnimationTransaction::Begin(); + AnimationTransaction::Begin(__transactionId); source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation); source.AddAnimation("OpacityAnimation", *pOpacityAnimation); AnimationTransaction::Commit(); @@ -4664,4 +4710,148 @@ CATCH: return; } +result +_TokenEditPresenter::LoadTokenBgBitmap(TokenEditStatus status) +{ + result r = E_SUCCESS; + Color tokenColor = GetTokenEditColor(status); + Bitmap* pTokenBgBitmap = null; + + switch(status) + { + case TOKEN_EDIT_STATUS_NORMAL: + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pReplacedTokenBgNormalBitmap != null) + { + delete __pReplacedTokenBgNormalBitmap; + } + + __pReplacedTokenBgNormalBitmap = pTokenBgBitmap; + break; + case TOKEN_EDIT_STATUS_SELECTED: + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pReplacedTokenBgSelectedBitmap != null) + { + delete __pReplacedTokenBgSelectedBitmap; + } + + __pReplacedTokenBgSelectedBitmap = pTokenBgBitmap; + break; + case TOKEN_EDIT_STATUS_HIGHLIGHTED: + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pReplacedTokenBgHighlightedBitmap != null) + { + delete __pReplacedTokenBgHighlightedBitmap; + } + + __pReplacedTokenBgHighlightedBitmap = pTokenBgBitmap; + break; + case TOKEN_EDIT_STATUS_DISABLED: + r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pReplacedTokenBgDisabledBitmap != null) + { + delete __pReplacedTokenBgDisabledBitmap; + } + + __pReplacedTokenBgDisabledBitmap = pTokenBgBitmap; + break; + } + + return E_SUCCESS; +} + +result +_TokenEditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& /*canvas*/) +{ + if (IsViewModeEnabled(false) || !__pTokenEdit->IsEnabled() || !IsCurrentFocused()) + { + if (__pFocusRingVisualElement != null) + { + __pFocusRingVisualElement->Destroy(); + __pFocusRingVisualElement = null; + } + return E_SUCCESS; + } + + result r = E_SUCCESS; + Bitmap* pFocusRing = null; + Bitmap* pReplacementFocusRing = null; + Canvas* pCanvas = null; + Color color = __pTokenEdit->GetColor(EDIT_STATUS_HIGHLIGHTED); + _VisualElement* pControlVisualElement = __pTokenEdit->GetVisualElement(); + + if (IsCurrentFocused() && color.GetAlpha()) + { + Color focusColor; + GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, focusColor); + focusColor.SetAlpha(color.GetAlpha()); + + if (__pFocusRingVisualElement == null) + { + __pFocusRingVisualElement = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pFocusRingVisualElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pFocusRingVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pFocusRingVisualElement); + SysTryCatch(NID_UI_CTRL, pImpl, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 3); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFocusRingVisualElement->SetImplicitAnimationEnabled(false); + + pControlVisualElement->AttachChild(*__pFocusRingVisualElement); + } + + r = GET_BITMAP_CONFIG_N(EDIT::BG_RING_FOCUSED, BITMAP_PIXEL_FORMAT_ARGB8888, pFocusRing); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle editRect(0.0f, 0.0f, __pTokenEdit->GetBoundsF().width, __pTokenEdit->GetBoundsF().height); + + pReplacementFocusRing= _BitmapImpl::GetColorReplacedBitmapN(*pFocusRing, Color::GetColor(COLOR_ID_MAGENTA), focusColor); + SysTryCatch(NID_UI_CTRL, pReplacementFocusRing, , r = GetLastResult(), "Unable to allocate text buffer."); + + __pFocusRingVisualElement->SetBounds(editRect); + + pCanvas = __pFocusRingVisualElement->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pCanvas, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementFocusRing)) + { + pCanvas->DrawNinePatchedBitmap(editRect, *pReplacementFocusRing); + } + + __pFocusRingVisualElement->SetShowState(true); + + delete pFocusRing; + delete pReplacementFocusRing; + delete pCanvas; + } + + return r; + +CATCH: + + __pFocusRingVisualElement->Destroy(); + __pFocusRingVisualElement = null; + + delete pFocusRing; + delete pReplacementFocusRing; + + return r; +} + }}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Toolbar.cpp b/src/ui/controls/FUiCtrl_Toolbar.cpp index b01da91..30b5782 100644 --- a/src/ui/controls/FUiCtrl_Toolbar.cpp +++ b/src/ui/controls/FUiCtrl_Toolbar.cpp @@ -39,6 +39,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Graphics; using namespace Tizen::Ui; +using namespace Tizen::Base::Utility; namespace { @@ -61,15 +62,15 @@ public: FloatRectangle rect = element.GetAbsoluteBounds(); Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen(); int screenW = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height; - if(rect.x < 0.0f) + if (rect.x < 0.0f) { __pToolbar->GetPresenter()->AdjustItemPositionX(-(rect.x)); __pToolbar->Invalidate(true); } - else if(rect.x + rect.width > screenW) + else if (rect.x + rect.width > screenW) { float adjustX = 0.0f; - if(rect.x + rect.width > screenW) + if (rect.x + rect.width > screenW) { adjustX = -(rect.x + rect.width - screenW); } @@ -122,9 +123,11 @@ _Toolbar::_Toolbar(void) , __style(TOOLBAR_TITLE) , __transparent(false) , __isUserBackgroundBitmap(false) - , __highlightedItemIndex(0) - , __lastHighlightedItemIndex(0) + , __highlightedItemIndex(-1) + , __lastHighlightedItemIndex(-1) , __highlighted(false) + , __isEnterKeyPressed(false) + , __isAttachedToMainTree(false) , __titleTextArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __itemArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) , __pTitleTextElement(null) @@ -169,7 +172,7 @@ _Toolbar::_Toolbar(void) pContainer = GetAccessibilityContainer(); - if(pContainer) + if (pContainer) { pContainer->Activate(true); } @@ -192,6 +195,7 @@ _Toolbar::_Toolbar(void) _Toolbar::~_Toolbar(void) { + __isEnterKeyPressed = false; RemoveAllItems(); //__pMoreButton would be deleted in this function RemoveAllButtons(); @@ -284,7 +288,7 @@ _Toolbar::~_Toolbar(void) __pTitleTextElement = null; } - if(__pAccessibilityListener) + if (__pAccessibilityListener) { delete __pAccessibilityListener; __pAccessibilityListener = null; @@ -890,7 +894,7 @@ _Toolbar::GetBackgroundBitmap(void) const if (!pToolbar->__pToolbarBackgroundBitmap) { - if(__header == true) + if (__header == true) { r = GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pToolbar->__pToolbarBackgroundBitmap); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -914,7 +918,7 @@ _Toolbar::GetBackgroundEffectBitmap(void) const if (!pToolbar->__pToolbarBackgroundEffectBitmap) { - if(__header == true) + if (__header == true) { bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL); if (customTheme == false) @@ -1043,7 +1047,7 @@ _Toolbar::GetFirstEnabledItemIndex(void) const for (int i = 0; i < __itemCount; i++) { - if(__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { firstEnabledItemIndex = i; break; @@ -1262,6 +1266,11 @@ _Toolbar::InsertItemAt(int itemIndex, _Button* pButton) AddAccessibilityElement(pButton); + if (__highlightedItemIndex != -1 && itemIndex <= __highlightedItemIndex) + { + __highlightedItemIndex++; + } + return E_SUCCESS; } @@ -1389,41 +1398,13 @@ _Toolbar::RemoveAllButtons(void) { for (int i = 0; i < BUTTON_MAX; i++) { - _Button* pButtonItem = __pButtonItems[i]; - - if (pButtonItem != null) + if (i == LEFT_BUTTON) { - if (i == LEFT_BUTTON) - { - if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) - { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); - } - } - else if (i == RIGHT_BUTTON) - { - if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) - { - StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); - } - } - - if (pButtonItem->GetChildCount() != 0) - { - _Label* pTempBadgeIcon = dynamic_cast<_Label*>(pButtonItem->GetChild(0)); - SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon."); - - pButtonItem->DetachChild(*pTempBadgeIcon); - - delete pTempBadgeIcon; - pTempBadgeIcon = null; - } - - DetachChild(*pButtonItem); - delete pButtonItem; - pButtonItem = null; - - __pButtonItems[i] = null; + RemoveButtonAt(LEFT_BUTTON); + } + else if (i == RIGHT_BUTTON) + { + RemoveButtonAt(RIGHT_BUTTON); } } @@ -1433,37 +1414,14 @@ _Toolbar::RemoveAllButtons(void) result _Toolbar::RemoveAllItems(void) { - __itemCount = 0; - int itemCount = __pItems.size(); - _Button* pItem = null; - // frees item nodes from the memory if (itemCount > 0) { for (int i = itemCount - 1; i >= 0; i--) { - pItem = __pItems.at(i); - - if (pItem != null) - { - if (pItem->GetChildCount() != 0) - { - _Label* pTempBadgeIcon = dynamic_cast<_Label*>(pItem->GetChild(0)); - SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon."); - - pItem->DetachChild(*pTempBadgeIcon); - - delete pTempBadgeIcon; - pTempBadgeIcon = null; - } - - DetachChild(*pItem); - delete pItem; - - pItem = null; - } + RemoveItemAt(i); } } @@ -1511,6 +1469,65 @@ _Toolbar::RemoveButtonAt(ToolbarButton position) DetachChild(*__pButtonItems[position]); delete __pButtonItems[position]; __pButtonItems[position] = null; + + if (!__header || __style == TOOLBAR_TEXT) + { + if (position == LEFT_BUTTON) + { + if (__highlightedItemIndex == 0) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + else if (__highlightedItemIndex > 0) + { + __highlightedItemIndex--; + } + } + else // right button + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount + 1) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + } + else if (__highlightedItemIndex == __itemCount) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + } + } + else + { + if (position == LEFT_BUTTON) + { + if (__highlightedItemIndex == __itemCount) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount + 1) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + } + else if (__highlightedItemIndex == __itemCount) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + } + } } if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null) @@ -1549,6 +1566,15 @@ _Toolbar::RemoveItemAt(int itemIndex) delete pItem; pItem = null; + if (itemIndex == __highlightedItemIndex) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + else if (itemIndex < __highlightedItemIndex) + { + __highlightedItemIndex--; + } __itemCount--; if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null) @@ -1749,6 +1775,45 @@ _Toolbar::SetButtonColor(_ButtonStatus status, const Color& color) } } +void +_Toolbar::SetHighlightedState(ToolbarButton position) +{ + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (position == LEFT_BUTTON) + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + else + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else // Right button case + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__highlightedItemIndex == __itemCount + 1 ) + { + if (position == RIGHT_BUTTON) + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + else + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + +} + result _Toolbar::SetButtonEnabled(ToolbarButton position, bool enabled) { @@ -1757,7 +1822,30 @@ _Toolbar::SetButtonEnabled(ToolbarButton position, bool enabled) if (enabled) { - __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + if (_ControlManager::GetInstance() != null && _ControlManager::GetInstance()->GetFocusControl() != this) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + + if (__itemCount != 0) + { + if (__highlightedItemIndex >= __itemCount) + { + SetHighlightedState(position); + } + else + { + __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else + { + SetHighlightedState(position); + } + + SetFocusNavigateEnabled(true); + _AccessibilityElement* pElement = __pButtonItems[position]->GetAccessibilityContainer()->GetChildElement(0); if (pElement) { @@ -1768,6 +1856,58 @@ _Toolbar::SetButtonEnabled(ToolbarButton position, bool enabled) else { __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_DISABLED); + + bool AllItemDisabled = true; + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + AllItemDisabled = false; + break; + } + } + + bool AllButtonDisabled = false; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED + && __pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + else + { + AllButtonDisabled = true; + } + } + + if (AllItemDisabled == true && AllButtonDisabled == true) + { + SetFocusNavigateEnabled(false); + } + _AccessibilityElement* pElement = __pButtonItems[position]->GetAccessibilityContainer()->GetChildElement(0); if (pElement) { @@ -1839,7 +1979,7 @@ _Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon) float height = 0.0f; - GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height); + GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); _Label* pBadgeIconLabel = _Label::CreateLabelN(); @@ -1889,6 +2029,9 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) else { bool needToCreateNewIcon = true; + float sideMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin); if (childCount != 0) { @@ -1960,7 +2103,7 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); pLabel->SetTextColor(badgeIconTextNormalColor); - pLabel->SetMargin(10, 0, 5, 0); + pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f); __pButtonItems[position]->AttachChild(*pLabel); __pButtonItems[position]->SetChildAlwaysOnTop(*pLabel); @@ -1977,40 +2120,28 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) float fontSize = 0.0f; float height = 0.0f; float width = 0.0f; + float minWidth = 0.0f; - GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height); + GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth); - if (number < 10) - { - GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize); - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width); - } - else if (number < 100) - { - GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize); - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width); - } - else if (number < 1000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize); - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); - } - else if (number < 10000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize); - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); - } - else - { - GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON_2, GetOrientation(), fontSize); - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); - } - existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0, width, height)); existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); Integer tempNumber(number); existingBadgeIcon->SetText(tempNumber.ToString()); + + width = existingBadgeIcon->GetTextExtentSizeF(); + + if (width < minWidth) + { + width = minWidth; + } + + width += sideMargin * 2; + + existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0.0f, width, height)); } } @@ -2041,7 +2172,7 @@ _Toolbar::SetItemAt(int itemIndex, const _Button* pButton) SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < __itemCount), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The itemIndex is out of range."); - if (pButton->GetActionId() < TOOLBAR_ACTION_ID_MIN || pButton->GetActionId() > TOOLBAR_ACTION_ID_MAX) + if (pButton->GetActionId() < TOOLBAR_ACTION_ID_MIN) { SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The actionId is invalid."); return E_OUT_OF_RANGE; @@ -2212,6 +2343,8 @@ _Toolbar::SetItemEnabled(int itemIndex, bool enabled) SysTryReturnResult(NID_UI_CTRL, (null != __pItems.at(itemIndex)), E_INVALID_OPERATION, "[E_INVALID_OPERATION] No button item is at the position."); + result r = E_SUCCESS; + if (enabled) { _AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0); @@ -2220,7 +2353,25 @@ _Toolbar::SetItemEnabled(int itemIndex, bool enabled) pElement->SetStatus(L""); pElement->SetHintDisabled(false); } - return __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + + if (_ControlManager::GetInstance() != null && _ControlManager::GetInstance()->GetFocusControl() != this) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + + if (itemIndex == __highlightedItemIndex) + { + r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + else + { + r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + SetFocusNavigateEnabled(true); + + return r; } else { @@ -2230,7 +2381,61 @@ _Toolbar::SetItemEnabled(int itemIndex, bool enabled) pElement->SetStatus(L""); pElement->SetHintDisabled(true); } - return __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_DISABLED); + + r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_DISABLED); + + bool AllItemDisabled = true; + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + AllItemDisabled = false; + break; + } + } + + bool AllButtonDisabled = false; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED + && __pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + AllButtonDisabled = true; + } + } + else + { + AllButtonDisabled = true; + } + } + + if (AllItemDisabled == true && AllButtonDisabled == true) + { + SetFocusNavigateEnabled(false); + } + + return r; } return E_SUCCESS; @@ -2269,6 +2474,10 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number) } else { + float sideMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin); + if (__pItems.at(itemIndex)->GetChildCount() == 0) { _Label* pLabel = _Label::CreateLabelN(); @@ -2311,10 +2520,10 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number) delete pNumberedBadgeIconEffectBitmap; } - pLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); pLabel->SetTextColor(badgeIconTextNormalColor); - pLabel->SetMargin(0, 10); + pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f); __pItems.at(itemIndex)->AttachChild(*pLabel); __pItems.at(itemIndex)->SetChildAlwaysOnTop(*pLabel); @@ -2331,36 +2540,28 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number) float fontSize = 0.0f; float height = 0.0f; float width = 0.0f; + float minWidth = 0.0f; GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize); GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth); - if (number < 10) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width); - } - else if (number < 100) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); - } - else if (number < 1000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_3DIGIT, GetOrientation(), width); - } - else if (number < 10000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_4DIGIT, GetOrientation(), width); - } - else + existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + + Integer tempNumber(number); + existingBadgeIcon->SetText(tempNumber.ToString()); + + width = existingBadgeIcon->GetTextExtentSizeF(); + + if (width < minWidth) { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_5DIGIT, GetOrientation(), width); + width = minWidth; } + width += sideMargin * 2; + existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0.0f, width, height)); - existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); - Integer tempNumber(number); - existingBadgeIcon->SetText(tempNumber.ToString()); } } @@ -2387,7 +2588,10 @@ _Toolbar::SetItemSelected(int itemIndex, bool fire, bool adjust) PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex)); } - __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire); + if (currentSelectedItemIndex != __highlightedItemIndex || !__isEnterKeyPressed) + { + __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire); + } for (int i = 0; i < __itemCount; i++) { @@ -2437,8 +2641,13 @@ _Toolbar::SetItemSelected(int itemIndex, bool fire, bool adjust) if (currentSelectedItemIndex != -1 && __pItems.at(currentSelectedItemIndex) != null) { - __pItems.at(currentSelectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + if (currentSelectedItemIndex != __highlightedItemIndex) + { + __pItems.at(currentSelectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + __pItems.at(currentSelectedItemIndex)->ShowUnderlineBitmap(false); + __pItems.at(currentSelectedItemIndex)->Invalidate(); _AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0); if (pElement) @@ -2605,24 +2814,14 @@ _Toolbar::SetStyle(ToolbarStyle style) __descriptionText = L""; - __highlightedItemIndex = 0; - __lastHighlightedItemIndex = 0; + __highlightedItemIndex = -1; + __lastHighlightedItemIndex = -1; __highlighted = false; - if (__style == TOOLBAR_TITLE || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) - { - if(__pTitleTextElement) - { - __pTitleTextElement->SetLabel(L""); - } - } - else + if (__pTitleTextElement) { - if(__pTitleTextElement) - { - GetAccessibilityContainer()->RemoveElement(*__pTitleTextElement); - __pTitleTextElement = null; - } + GetAccessibilityContainer()->RemoveElement(*__pTitleTextElement); + __pTitleTextElement = null; } if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null) @@ -2778,20 +2977,8 @@ _Toolbar::SetTitleText(const String& text, HorizontalAlignment alignment) GetAccessibilityContainer()->AddElement(*__pTitleTextElement); } - if( __descriptionText.IsEmpty()) - { - __pTitleTextElement->SetLabel(__titleText); - __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF())); - } - else - { - __pTitleTextElement->SetLabel(__titleText + L"," + __descriptionText); - - FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF(); - FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF(); + __pTitleTextElement->SetBounds(__titleTextArea); - __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height)); - } __pTitleTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TITLE"); __pTitleTextElement->SetName(L"HeaderTitleText"); @@ -3223,6 +3410,8 @@ _Toolbar::OnAnimationStopped(const _Control& source) result _Toolbar::OnAttachedToMainTree(void) { + __isAttachedToMainTree = true; + return E_SUCCESS; } @@ -3257,7 +3446,7 @@ _Toolbar::AddAccessibilityElement(ToolbarButton position, _Button* pButton) pButtonElement = pButtonContainer->GetChildElement(L"ButtonText"); } - if(pButtonElement) + if (pButtonElement) { pButtonElement->SetName(name); @@ -3270,13 +3459,13 @@ void _Toolbar::AddAccessibilityElement(_Button* pButton) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - if(pContainer == null) + if (pContainer == null) { return; } int priorty = 0; - if(__header == true) + if (__header == true) { priorty = ACCESSIBILITY_PRIORITY_TOP; } @@ -3328,11 +3517,11 @@ _Toolbar::AddAccessibilityElement(_Button* pButton) pElement = pButtonContainer->GetChildElement(L"ButtonText"); } - if(pElement) + if (pElement) { pElement->SetName(name); pElement->SetTrait(trait); - if(style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE + if (style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_SEGMENTED || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) { @@ -3349,21 +3538,6 @@ void _Toolbar::OnBoundsChanged(void) { RearrangeItems(); - - if(__pTitleTextElement) - { - if( __descriptionText.IsEmpty()) - { - __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF())); - } - else - { - FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF(); - FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF(); - - __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height)); - } - } return; } @@ -3395,7 +3569,7 @@ _Toolbar::OnAncestorVisibleStateChanged(const _Control& control) void _Toolbar::OnDrawFocus(void) { - if (IsFocusModeStateEnabled() == false) + if (IsFocusModeStateEnabled() == true) { if (__itemCount == 0) { @@ -3547,6 +3721,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); } } else if (__highlightedItemIndex == __itemCount + 1) @@ -3554,6 +3729,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); } } } @@ -3564,6 +3740,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); } } } @@ -3577,6 +3754,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); } } } @@ -3591,6 +3769,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); } } } @@ -3605,6 +3784,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); } } else if (__highlightedItemIndex == __itemCount + 1) @@ -3612,6 +3792,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); } } } @@ -3622,6 +3803,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); } } } @@ -3635,6 +3817,7 @@ _Toolbar::OnFocusModeStateChanged(void) if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); } } } @@ -3643,13 +3826,32 @@ _Toolbar::OnFocusModeStateChanged(void) int selectedItemIndex = GetSelectedItemIndex(); - if(selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) + if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) { __pItems.at(selectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + __pItems.at(selectedItemIndex)->Invalidate(); } + } - Invalidate(true); + if (!IsFocusModeStateEnabled()) + { + __highlightedItemIndex = -1; + } + else + { + if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED + || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + __highlightedItemIndex = GetSelectedItemIndex(); + } + else // not segmented + { + __highlightedItemIndex = 0; + } + } + + //Invalidate(true);//fix title slide restart return; } // OnFocusModeStateChanged @@ -3670,6 +3872,24 @@ _Toolbar::OnFocusGained(const _Control& source) } else // not segmented { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else + { + __highlightedItemIndex = 0; + } + } + } + else + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { __highlightedItemIndex = 0; } } @@ -3687,6 +3907,24 @@ _Toolbar::OnFocusGained(const _Control& source) } else // not segmented { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else + { + __highlightedItemIndex = 0; + } + } + } + else + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { __highlightedItemIndex = 0; } } @@ -3711,7 +3949,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__highlightedItemIndex == __itemCount) { - if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); __lastHighlightedItemIndex = __highlightedItemIndex; @@ -3719,7 +3957,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) } else { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); __highlightedItemIndex++; @@ -3732,7 +3970,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); __lastHighlightedItemIndex = __highlightedItemIndex; @@ -3745,7 +3983,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__highlightedItemIndex == __itemCount) { - if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); __lastHighlightedItemIndex = __highlightedItemIndex; @@ -3760,7 +3998,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__highlightedItemIndex == __itemCount) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); __lastHighlightedItemIndex = __highlightedItemIndex; @@ -3772,7 +4010,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) } else // itemCount != 0 { - if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + if (__highlightedItemIndex != -1 && (__highlightedItemIndex < __itemCount) && __pItems.at(__highlightedItemIndex)) { if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { @@ -3793,7 +4031,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__pButtonItems[LEFT_BUTTON]) { - if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3805,7 +4043,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) { if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3818,7 +4056,7 @@ _Toolbar::OnHeaderFocusGained(const _Control& source) } else if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3842,7 +4080,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) { if (__pButtonItems[LEFT_BUTTON]) { - if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3854,7 +4092,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) { if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3867,7 +4105,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) } else if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3899,7 +4137,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) { if (__pButtonItems[LEFT_BUTTON]) { - if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3937,7 +4175,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) { if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -3981,7 +4219,7 @@ _Toolbar::OnFooterFocusGained(const _Control& source) { if (__pButtonItems[RIGHT_BUTTON]) { - if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); @@ -4110,7 +4348,7 @@ _Toolbar::OnFocusLost(const _Control& source) int selectedItemIndex = GetSelectedItemIndex(); - if(selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) + if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) { if (__pItems.at(selectedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) { @@ -4119,6 +4357,12 @@ _Toolbar::OnFocusLost(const _Control& source) } } + if (!__isEnterKeyPressed) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + Invalidate(true); return true; @@ -4134,6 +4378,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) if (IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT) { __highlighted = false; + __isEnterKeyPressed = false; if (__header == true && __style != TOOLBAR_TEXT) // right align { @@ -4855,6 +5100,7 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) else if (IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT) { __highlighted = false; + __isEnterKeyPressed = false; if (__header == true && __style != TOOLBAR_TEXT) // right align { @@ -5555,10 +5801,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pItems.at(__highlightedItemIndex)->Invalidate(); - __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex; __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5572,10 +5818,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[LEFT_BUTTON]->Invalidate(); - __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5588,10 +5834,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[RIGHT_BUTTON]->Invalidate(); - __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1; __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5620,10 +5866,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pItems.at(__highlightedItemIndex)->Invalidate(); - __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex; __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5637,10 +5883,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[LEFT_BUTTON]->Invalidate(); - __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5672,10 +5918,9 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pItems.at(__highlightedItemIndex)->Invalidate(); - __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex; __highlighted = true; + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5689,10 +5934,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[RIGHT_BUTTON]->Invalidate(); - __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5721,10 +5966,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pItems.at(__highlightedItemIndex)->Invalidate(); - __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex; __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5747,10 +5992,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[LEFT_BUTTON]->Invalidate(); - __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5763,10 +6008,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[RIGHT_BUTTON]->Invalidate(); - __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1; __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5782,10 +6027,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[LEFT_BUTTON]->Invalidate(); - __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5802,10 +6047,10 @@ _Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pButtonItems[RIGHT_BUTTON]->Invalidate(); - __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); - __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); } } } @@ -5840,22 +6085,14 @@ _Toolbar::OnDraw(void) { ClearLastResult(); - __pToolbarPresenter->Draw(); - - if(__pTitleTextElement) + if (__isAttachedToMainTree) { - if( __descriptionText.IsEmpty()) - { - __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF())); - } - else - { - FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF(); - FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF(); - - __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height)); - } + __isAttachedToMainTree = false; + AdjustToolbarBounds(); } + + __pToolbarPresenter->Draw(); + return; } @@ -5887,6 +6124,11 @@ bool _Toolbar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) { ClearLastResult(); + if (__isEnterKeyPressed) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } return __pToolbarPresenter->OnTouchPressed(source, touchinfo); } @@ -5922,6 +6164,7 @@ _Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) if (IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) { + __isEnterKeyPressed = true; if (__itemCount != 0) { if (__pButtonItems[LEFT_BUTTON]) @@ -7712,11 +7955,13 @@ _Toolbar::RearrangeItems(void) { GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight); + __titleTextArea.height = vmargin; } 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); + __titleTextArea.height = headerButtonItemHeight; } else { @@ -7957,6 +8202,11 @@ _Toolbar::RearrangeItems(void) __pToolbarPresenter->SetUsableAreaBounds(__titleTextArea); + if (__pTitleTextElement) + { + __pTitleTextElement->SetBounds(__titleTextArea); + } + if (0 == __itemCount) { return E_SUCCESS; @@ -8056,21 +8306,25 @@ _Toolbar::RearrangeHeaderSegmentedItems(void) if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button { 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], vmargin, blockWidth[1], segmentedItemHeight)); - __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2] + 1, segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2], segmentedItemHeight)); } else { 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], vmargin, blockWidth[1], segmentedItemHeight)); - __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] - 1, - vmargin, blockWidth[2] + 1, segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], + vmargin, blockWidth[2], segmentedItemHeight)); + } + + for (int i = 0; i < 3; i++) + { + __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF())); + } for (int i = 0; i < __itemCount; i++) @@ -8251,7 +8505,7 @@ _Toolbar::RearrangeFooterSegmentedItems(void) GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); } - else if ( __itemCount == 2) + else if (__itemCount == 2) { if (__pButtonItems[LEFT_BUTTON]) { @@ -8355,14 +8609,38 @@ _Toolbar::RearrangeFooterSegmentedItems(void) __itemArea.width -= (itemButtonRightGap + iconSize + rightMargin); } - iconSize = 0; leftMargin = 0; itemButtonLeftGap = 0; } - blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3; - blockWidth[1] += 1; + int width = 0; + if (fmod(__itemArea.width, __itemCount) == 0) + { + + blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / __itemCount; + } + else + { + width = __itemArea.width / __itemCount; + blockWidth[0] = blockWidth[1] = blockWidth[2] = width; + int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f); + while (balanceWidth > 0) + { + for (int i = 0; i < __itemCount; i++) + { + if (balanceWidth > 0) + { + blockWidth[i] += 0.1f; + balanceWidth = balanceWidth - 1; + } + else + { + break; + } + } + } + } if (__pButtonItems[LEFT_BUTTON]) { @@ -8370,15 +8648,15 @@ _Toolbar::RearrangeFooterSegmentedItems(void) { __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)); + __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth, segmentedItemHeight)); } else { __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)); + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight)); } } else @@ -8388,17 +8666,23 @@ _Toolbar::RearrangeFooterSegmentedItems(void) __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (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)); + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - 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], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], - (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 1, segmentedItemHeight)); + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight)); } } + for (int i = 0; i < 3; i++) + { + __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF())); + + } + for (int i = 0; i < __itemCount ; i++) { if (__pItems.at(i)->GetChildCount() != 0) @@ -8514,12 +8798,44 @@ _Toolbar::RearrangeTabItmes(void) } else if (__itemCount == 3) { - itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3; - itemWidth[1] += 1; + + int width = 0; + if (fmod(__itemArea.width, __itemCount) == 0) + { + + itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3; + } + else + { + width = __itemArea.width / __itemCount; + itemWidth[0] = itemWidth[1] = itemWidth[2] = width; + int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f); + while (balanceWidth > 0) + { + for (int i = 0; i < __itemCount; i++) + { + if (balanceWidth > 0) + { + itemWidth[i] += 0.1f; + balanceWidth = balanceWidth - 1; + } + else + { + break; + } + } + } + } __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)); + __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2], segmentedItemHeight)); + + for (int i = 0; i < 3; i++) + { + __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF())); + + } GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26 @@ -8683,7 +8999,7 @@ _Toolbar::RearrangeButtonItems(void) RealignItem(__pItems.at(0), textExtentSize_0); } - else if(__itemCount == 2) + else if (__itemCount == 2) { float textExtentSize_0 = __pItems.at(0)->GetTextExtentSizeF(); float textExtentSize_1 = __pItems.at(1)->GetTextExtentSizeF(); @@ -8784,8 +9100,33 @@ _Toolbar::RearrangeButtonItems(void) } } - blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3; - blockWidth[1] += 1; + int width = 0; + if (fmod(__itemArea.width, __itemCount) == 0) + { + + blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / __itemCount; + } + else + { + width = __itemArea.width / __itemCount; + blockWidth[0] = blockWidth[1] = blockWidth[2] = width; + int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f); + while (balanceWidth > 0) + { + for (int i = 0; i < __itemCount; i++) + { + if (balanceWidth > 0) + { + blockWidth[i] += 0.1f; + balanceWidth = balanceWidth - 1; + } + else + { + break; + } + } + } + } if (__pButtonItems[LEFT_BUTTON]) { @@ -8793,15 +9134,15 @@ _Toolbar::RearrangeButtonItems(void) { __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)); + __pItems.at(2)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1], + (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight)); } else { __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)); + (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight)); } } else @@ -8811,17 +9152,23 @@ _Toolbar::RearrangeButtonItems(void) __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)); + (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight)); } else { __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)); + (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight)); } } + for (int i = 0; i < 3; i++) + { + __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF())); + + } + for (int i = 0; i < __itemCount; i++) { if (__pItems.at(i)->GetChildCount() != 0) @@ -8895,7 +9242,14 @@ _Toolbar::RearrangeButtonItems(void) } } - GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetOrientation(), fontSize);//32 + if (__style == TOOLBAR_TITLE) // item 1, HEADER_STYLE_TITLE_BUTTON + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 + } + else + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetOrientation(), fontSize); //32 + } for (int i = 0; i < __itemCount; i++) { @@ -8922,7 +9276,6 @@ _Toolbar::RearrangeButtonItems(void) } } - //__pItems.at(i)->SetMargin(__pItems.at(i)->GetLeftMarginF(), 0.0f, __pItems.at(i)->GetRightMarginF(), 0.0f); __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD); __pItems.at(i)->SetMultilineTextSize(multilineFontSize); } @@ -9056,7 +9409,7 @@ _Toolbar::SetPropertyDescriptionText(const Variant& text) r = __pToolbarPresenter->SetDescriptionText(__descriptionText); - if(__pTitleTextElement) + if (__pTitleTextElement) { if (text.IsEmpty()) { @@ -9096,7 +9449,7 @@ _Toolbar::SetPropertyTitleText(const Variant& text) { __titleText = text.ToString(); - if(__pTitleTextElement) + if (__pTitleTextElement) { __pTitleTextElement->SetLabel(__titleText); } @@ -10127,8 +10480,10 @@ _Toolbar::SetTitleNumberedBadgeIcon(int number) Bitmap* pColorReplacedBitmap = null; Color badgeIconBgNormalColor; Color badgeIconTextNormalColor; + float sideMargin = 0.0f; GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconBitmap); + GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin); bool customTheme = IS_CUSTOM_BITMAP(HEADER::BADGE_ICON_BG_NORMAL); if (customTheme == false) @@ -10157,45 +10512,36 @@ _Toolbar::SetTitleNumberedBadgeIcon(int number) delete pNumberedBadgeIconEffectBitmap; } - __pTitleBadgeIcon->SetTextHorizontalAlignment(ALIGNMENT_RIGHT); + __pTitleBadgeIcon->SetTextHorizontalAlignment(ALIGNMENT_CENTER); __pTitleBadgeIcon->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); __pTitleBadgeIcon->SetTextColor(badgeIconTextNormalColor); - __pTitleBadgeIcon->SetMargin(0, 10); + __pTitleBadgeIcon->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f); float fontSize = 0.0f; float height = 0.0f; float width = 0.0f; + float minWidth = 0.0f; GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize); GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth); - if (number < 10) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width); - } - else if (number < 100) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width); - } - else if (number < 1000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_3DIGIT, GetOrientation(), width); - } - else if (number < 10000) - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_4DIGIT, GetOrientation(), width); - } - else - { - GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_5DIGIT, GetOrientation(), width); - } - - __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, width, height)); __pTitleBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); Integer tempNumber(number); __pTitleBadgeIcon->SetText(tempNumber.ToString()); + width = __pTitleBadgeIcon->GetTextExtentSizeF(); + + if (width < minWidth) + { + width = minWidth; + } + + width += sideMargin * 2; + + __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, width, height)); + AttachChild(*__pTitleBadgeIcon); SetChildAlwaysOnTop(*__pTitleBadgeIcon); } diff --git a/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp index bd21ad0..36e84e0 100644 --- a/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp @@ -236,7 +236,7 @@ _ToolbarPresenter::Draw(void) DrawDescriptionText(); - if(!__titleText.IsEmpty()) + if (!__titleText.IsEmpty()) { __fontSize = fontSize; @@ -264,7 +264,7 @@ _ToolbarPresenter::Draw(void) { int firstEnabledItemIndex = __pToolbar->GetFirstEnabledItemIndex(); - if(firstEnabledItemIndex != -1) + if (firstEnabledItemIndex != -1) { __pToolbar->SetItemSelected(firstEnabledItemIndex, true, false); } @@ -311,10 +311,14 @@ _ToolbarPresenter::DrawDivider(void) { GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); } - else + else if (__pToolbar->IsHeader()) //All header styles { GET_SHAPE_CONFIG(HEADER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); } + else + { + GET_SHAPE_CONFIG(FOOTER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); + } FloatRectangle bounds(0.0f, 0.0f, __pToolbar->GetBoundsF().width, __pToolbar->GetBoundsF().height); @@ -333,7 +337,7 @@ _ToolbarPresenter::DrawDivider(void) } } - Canvas * pCanvas = null; + Canvas* pCanvas = null; int Z_ORDER_GROUP_CONTROL = 2001; if (__pDividerVe == null) @@ -646,6 +650,7 @@ _ToolbarPresenter::DrawBackground(void) } delete pReColorSubTitleEffectBitmap; + delete pSubTitleEffectBitmap; } delete pCanvas; @@ -684,7 +689,7 @@ _ToolbarPresenter::DrawDescriptionText(void) __descriptionRect.y = __titleRect.y + __titleRect.height; - if(__titleText.IsEmpty()) + if (__titleText.IsEmpty()) { __descriptionRect.width = __toolbarUsableArea.width; } @@ -716,7 +721,7 @@ _ToolbarPresenter::DrawDescriptionText(void) void _ToolbarPresenter::DrawEditItem(const FloatPoint& point) { - if (__pEditItem == null ) + if (__pEditItem == null) { return; } @@ -749,10 +754,14 @@ _ToolbarPresenter::DrawDividerLine(const FloatPoint& point, Canvas* pCanvas) { GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); } - else + else if (__pToolbar->IsHeader()) //All header styles { GET_SHAPE_CONFIG(HEADER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); } + else //footer + { + GET_SHAPE_CONFIG(FOOTER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); + } if (__pToolbar->IsHeader() == true) { @@ -889,7 +898,7 @@ _ToolbarPresenter::DrawItems(void) if (pTitleIcon) { - totalWidth += (pTitleIcon->GetWidthF() + usableArea.x); + totalWidth += (pTitleIcon->GetWidthF() + iconRightMargin); } @@ -953,13 +962,13 @@ _ToolbarPresenter::DrawItems(void) __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + iconRightMargin; __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; - if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER) + if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER) { - leftMargin = (__titleRect.width - titleTextDimension.width) / 2 - leftMargin; + leftMargin = (__titleRect.width - titleTextDimension.width) / 2; } - else if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_RIGHT) + else if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_RIGHT) { - leftMargin = __titleRect.width - titleTextDimension.width - leftMargin * 3; + leftMargin = __titleRect.width - titleTextDimension.width - iconRightMargin * 2; } pCanvas->DrawBitmap(FloatPoint(leftMargin, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); @@ -977,7 +986,7 @@ _ToolbarPresenter::DrawItems(void) titleBadgeIconTopMargin)); } - __titleRect.width -= (pTitleIcon->GetWidthF() + usableArea.x); + __titleRect.width -= (pTitleIcon->GetWidthF() + iconRightMargin); } else { @@ -1004,11 +1013,11 @@ _ToolbarPresenter::DrawItems(void) { pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth)); - if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) { leftMargin = (leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize)) / 2; } - else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) { leftMargin = leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize); } @@ -1028,11 +1037,11 @@ _ToolbarPresenter::DrawItems(void) { pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth)); - if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) { leftMargin = usableArea.width / 2; } - else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) { leftMargin = usableArea.width - pTitleIcon->GetWidthF(); } @@ -1041,11 +1050,11 @@ _ToolbarPresenter::DrawItems(void) } else { - if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) { leftMargin = (usableArea.width - (processingAnimationIconGap + processingAnimationIconSize))/ 2; } - else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) { leftMargin = usableArea.width - (processingAnimationIconGap + processingAnimationIconSize); } @@ -1138,7 +1147,12 @@ _ToolbarPresenter::SetDescriptionText(const String& description) return E_OUT_OF_MEMORY; } __pDescriptionTextObject->Construct(); + TextSimple* pSimpleText = new (std::nothrow) TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f)); + __pDescriptionTextObject->AppendElement(*pSimpleText); __pDescriptionTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); __pDescriptionTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER); @@ -1228,9 +1242,13 @@ _ToolbarPresenter::SetTitleText(const String& title, HorizontalAlignment alignme } __pTitleTextObject->Construct(); __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + TextSimple* pSimpleText = new (std::nothrow) TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); - __pTitleTextObject->AppendElement(*pSimpleText); + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f)); + + __pTitleTextObject->AppendElement(*pSimpleText); __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); __titleSliding = false; @@ -1863,7 +1881,7 @@ _ToolbarPresenter::OnLongPressGestureDetected(void) } __pEditItem = _Label::CreateLabelN(); - SysTryCatch(NID_UI_CTRL, __pEditItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); + SysTryCatch(NID_UI_CTRL, __pEditItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); Canvas* pCanvas = pButton->GetCanvasN(); SysTryCatch(NID_UI_CTRL, pCanvas, , E_INVALID_STATE, "[E_INVALID_STATE] Unable to retrieve a Canvas."); @@ -2264,7 +2282,7 @@ _ToolbarPresenter::AdjustItemPositionX(float distance) itemBounds = __pToolbar->GetItem(0)->GetBoundsF(); if (itemBounds.x + distance > 0.0f) { - distance = itemBounds.x - distance; + distance = 0.0f; } } else @@ -2272,7 +2290,7 @@ _ToolbarPresenter::AdjustItemPositionX(float distance) itemBounds = __pToolbar->GetItem(itemCount - 4)->GetBoundsF(); if (itemBounds.x + distance < 0.0f) { - distance = itemBounds.x - distance; + distance = 0.0f; } } diff --git a/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp b/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp index bd25e9b..f9070a1 100644 --- a/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp +++ b/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp @@ -79,11 +79,11 @@ _UiFastScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { // cast to IFastScrollListener _IUiFastScrollListener* pFastScrollListener = dynamic_cast <_IUiFastScrollListener*>(&listener); - SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[E_INVALID_ARG] listener type is invalid."); + SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[%s] Invalid argument is used. Listener type is invalid.", GetErrorMessage(E_INVALID_ARG)); // cast to __UiFastScrollEventArg _UiFastScrollEventArg* pArg = (_UiFastScrollEventArg*) const_cast (&arg); - SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] Event argument type is invalid."); + SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[%s] Invalid argument is used. Event argument type is invalid.", GetErrorMessage(E_INVALID_ARG)); pFastScrollListener->OnUiFastScrollIndexSelected(*pArg->GetSource(), const_cast (pArg->GetIndex())); } diff --git a/src/ui/controls/FUiCtrl_UiScrollEvent.cpp b/src/ui/controls/FUiCtrl_UiScrollEvent.cpp index c525b3e..c58b239 100644 --- a/src/ui/controls/FUiCtrl_UiScrollEvent.cpp +++ b/src/ui/controls/FUiCtrl_UiScrollEvent.cpp @@ -51,7 +51,7 @@ _UiScrollEvent::Construct(const Tizen::Ui::_Control& source) { ClearLastResult(); result r = _Event::Initialize(); - SysTryReturn(NID_UI, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI, (r == E_SUCCESS), r, "Propagating."); // set event source __pSource = const_cast <_Control*>(&source); @@ -76,11 +76,11 @@ void _UiScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) { _IScrollEventListener* pScrollEventListener = dynamic_cast <_IScrollEventListener*>(&listener); - SysTryReturnVoidResult(NID_UI_CTRL, (pScrollEventListener != null), E_INVALID_ARG, "The invalid listener was given."); + SysTryReturnVoidResult(NID_UI_CTRL, (pScrollEventListener != null), E_INVALID_ARG, "[%s] Invalid argument is used. The listener type is not valid.", GetErrorMessage(E_INVALID_ARG)); // cast Argument const _UiScrollEventArg* pArg = dynamic_cast (&arg); - SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, "The invalid Event Argument was given."); + SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG)); switch (pArg->GetEventType()) { @@ -97,7 +97,7 @@ _UiScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) pScrollEventListener->OnScrollJumpToTop(*pArg->GetSource()); break; default: - SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "The invalid Event Argument was given."); + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG)); break; } } diff --git a/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp b/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp index b09e3ad..352aa6c 100644 --- a/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp +++ b/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp @@ -50,7 +50,7 @@ _UiScrollEventArg* _UiScrollEventArg::GetScrollEventArgN(const _Control& source) { _UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_STOPPED, source); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } @@ -59,7 +59,7 @@ _UiScrollEventArg* _UiScrollEventArg::GetScrollJumpToTopEventArgN(const _Control& source) { _UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_JUMP_TO_TOP, source); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } @@ -68,7 +68,7 @@ _UiScrollEventArg* _UiScrollEventArg::GetScrollEventArgN(const _Control& source, float scrollPosition) { _UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED, source, scrollPosition); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } @@ -77,7 +77,7 @@ _UiScrollEventArg* _UiScrollEventArg::GetScrollEventArgN(const _Control& source, ScrollEndEvent scrollType) { _UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_END_REACHED, source, -1.0f, scrollType); - SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); return pEventArg; } diff --git a/src/ui/controls/font.png b/src/ui/controls/font.png new file mode 100644 index 0000000..d94b04d --- /dev/null +++ b/src/ui/controls/font.png @@ -0,0 +1,1166 @@ +// +// 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 FUiCtrl_Frame.cpp + * @brief This is the implementation file for the _Frame class. + */ + +#include +#include +#include +#include +#include +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiEventManager.h" +#include "FUi_ControlManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_TouchManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_FramePresenter.h" +#include "FUiCtrl_FrameEvent.h" +#include "FUiCtrl_IFrameEventListener.h" +#include "FUiCtrl_IFormActivationChangeEventListener.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_EflLayer.h" +#include "FUi_AccessibilityManager.h" + +using namespace Tizen::App; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +const wchar_t* _ACTIVATE_FRAME = L"ActivateFrame"; + +_Frame::_Frame(void) + : __pFramePresenter(null) + , __pFrameEvent(null) + , __floatingBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __floatingOrientation(_CONTROL_ORIENTATION_PORTRAIT) + , __showMode(FRAME_SHOW_MODE_FULL_SCREEN) + , __restore(false) + , __minimized(false) + , __activated(false) + , __constructed(false) + , __rotation(false) + , __changingBoundsEnabled(true) + , __skipSetBounds(false) + , __pFormActivationChangeEventListener(null) +{ + _FramePresenter* pPresenter = new (std::nothrow) _FramePresenter(*this); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + __floatingBounds.width = screen.width; + __floatingBounds.height = screen.height; + + __pFrameEvent = _FrameEvent::CreateInstanceN(*this); + SysTryCatch(NID_UI_CTRL, __pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetPresenter(*pPresenter); + SetClipChildrenEnabled(false); + + ClearLastResult(); + + return; + +CATCH: + delete pPresenter; + pPresenter = null; +} + +_Frame::~_Frame(void) +{ + if (__pFrameEvent) + { + delete __pFrameEvent; + __pFrameEvent = null; + } + + delete __pFramePresenter; + __pFramePresenter = null; + + ClearLastResult(); +} + +_Frame* +_Frame::CreateFrameN(void) +{ + result r = E_SUCCESS; + _RootVisualElement* pRootVE = null; + _EflLayer* pLayer = null; + int appType = _AppInfo::GetAppType(); + + _Frame* pFrame = new (std::nothrow) _Frame; + SysTryCatch(NID_UI_CTRL, pFrame, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + if (appType & _APP_TYPE_IME_APP) + { + SysLog(NID_UI_CTRL, "[Ime Rotation]"); + r = pFrame->CreateRootVisualElement(_WINDOW_TYPE_SUB); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pFrame->CreateRootVisualElement(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pRootVE = pFrame->GetRootVisualElement(); + SysAssert(pRootVE); + + pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + SysAssert(pLayer); + + if (!(appType & _APP_TYPE_IME_APP)) + { + pLayer->SetOpacity(1); + } + + pFrame->AcquireHandle(); + + GetEcoreEvasMgr()->GetEcoreEvas()->SetDragAndDropEnabled(*pFrame); +#if defined(PARTIAL_SCREEN) + GetEcoreEvasMgr()->GetEcoreEvas()->SetPartialScreenEnabled(*pFrame); +#endif + + SetLastResult(E_SUCCESS); + + return pFrame; + +CATCH: + delete pFrame; + + return null; +} + +result +_Frame::SetPresenter(const _FramePresenter& framePresenter) +{ + __pFramePresenter = const_cast <_FramePresenter*>(&framePresenter); + + return E_SUCCESS; +} + +void +_Frame::OnDraw(void) +{ + if (__pFramePresenter) + { + __pFramePresenter->Draw(); + } +} + +void +_Frame::OnActivated(void) +{ + SysLog(NID_UI, "activated(%d)", __activated); + + _Window::OnActivated(); + + _Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm == null) + { + return; + } + + pCurrentForm->AddIndicatorObject(); + pCurrentForm->ActivateIndicator(); + + SetFocusWindowActivationChecked(true); + _Control* pFocusControl = pCurrentForm->GetFocusControl(); + if (pFocusControl) + { + pFocusControl->SetFocused(); + } + else + { + pCurrentForm->SetFocused(); + } + SetFocusWindowActivationChecked(false); + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); +} + + +void +_Frame::OnDeactivated(void) +{ + SysLog(NID_UI, "deactivated(%d)", __activated); + + _Window::OnDeactivated(); + + _Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm == null) + { + return; + } + + pCurrentForm->DeactivateIndicator(); + +} + + +bool +_Frame::OnNotifiedN(const _Control& source, IList* pArgs) +{ + SysTryReturn(NID_UI_CTRL, pArgs, false, E_SYSTEM, "[E_SYSTEM] pArgs is null.") + + String* pType = dynamic_cast (pArgs->GetAt(0)); + SysTryReturn(NID_UI_CTRL, pType, false, E_SYSTEM, "[E_SYSTEM] pType is null.") + + if (*pType == L"VisibilityEvent") + { + int obscured = 0; + + Integer* pObscured = dynamic_cast(pArgs->GetAt(1)); + if (pObscured == null) + { + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + + obscured = pObscured->ToInt(); + if (obscured == 0) + { + SetNativeWindowActivated(true); + __activated = true; + OnFrameActivated(); + } + else + { + SetNativeWindowActivated(false); + __activated = false; + OnFrameDeactivated(); + } + + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + else if (*pType == _ACTIVATE_FRAME) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + pEcoreEvas->ActivateWindow(*this); + } + + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + + return false; +} + +void +_Frame::OnFrameActivated(void) +{ + int childcount = GetChildCount(); + + for (int i = 0 ; i < childcount ; i++) + { + _Control* pChild = GetChild(i); + _Form* pForm = dynamic_cast<_Form*>(pChild); + if (pForm) + { + pForm->MoveOverlayRegion(true); + } + } + + // Fire Event. + IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_ACTIVATED); + __pFrameEvent->Fire(*pArg); + + if (GetChildCount() < 1) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas"); + + if (GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) + { + pEcoreEvas->SetIndicatorShowState(*GetRootWindow(), false); + } + } + _Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm) + { + _Control* pFocusTraversalControl = pCurrentForm->GetFocusTraversalControl(); + if (pFocusTraversalControl) + { + pFocusTraversalControl->OnTraversalControlFocusGained(); + } + } +} + +void +_Frame::OnFrameDeactivated(void) +{ + int childcount = GetChildCount(); + + for (int i = 0 ; i < childcount ; i++) + { + _Control* pChild = GetChild(i); + _Form* pForm = dynamic_cast<_Form*>(pChild); + if (pForm) + { + pForm->MoveOverlayRegion(false); + } + } + + // Fire Event. + IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_DEACTIVATED); + __pFrameEvent->Fire(*pArg); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->SetTouchCanceled(null); + } +} + +void +_Frame::OnFrameMinimized(void) +{ + IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_MINIMIZED); + __pFrameEvent->Fire(*pArg); +} + +void +_Frame::OnFrameRestored(void) +{ + __minimized = false; + + IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_RESTORED); + __pFrameEvent->Fire(*pArg); +} + +void +_Frame::SetCurrentForm(const _Form* pForm) +{ + result r = E_SUCCESS; + + SysTryReturnVoidResult(NID_UI_CTRL, pForm != null, E_INVALID_ARG, "[E_INVALID_ARG] Form to become a new current form is null"); + _Form* pNewForm = const_cast<_Form*>(pForm); + + _Form* pCurrentForm = GetCurrentForm(); + pNewForm->AddIndicatorObject(); + + if (pCurrentForm != null) + { + if (pCurrentForm != pForm) + { + // Change order + r = MoveChildToTop(*pForm); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + pNewForm->MoveOverlayRegion(true); + + pCurrentForm->SetVisibleState(false); + pCurrentForm->MoveOverlayRegion(false); + + pCurrentForm->OnFormDeactivated(); + + if (__pFormActivationChangeEventListener) + { + __pFormActivationChangeEventListener->OnFormDeactivated(*pCurrentForm); + } + } + } + + pNewForm->SetVisibleState(true); + pNewForm->OnFormActivated(); + _Control* pFocus = pNewForm->GetFocusControl(); + if (pFocus) + { + pFocus->SetFocused(); + } + else + { + pNewForm->SetFocused(); + } + _Control* pFocusTraversalControl = pNewForm->GetFocusTraversalControl(); + if (pFocusTraversalControl) + { + pFocusTraversalControl->OnTraversalControlFocusGained(); + } + pNewForm->SetUpdateLayoutState(true); + + if (__pFormActivationChangeEventListener) + { + __pFormActivationChangeEventListener->OnFormActivated(*pNewForm); + } + + SetLastResult(E_SUCCESS); + + return; +} + +_Form* +_Frame::GetCurrentForm(void) const +{ + _Form* pCurrentForm = null; + int controlCount = GetChildCount(); + + if (controlCount > 0) + { + for (int i = controlCount; i > 0; i--) + { + pCurrentForm = dynamic_cast<_Form*>(GetChild(i - 1)); + SysTryReturn(NID_UI_CTRL, pCurrentForm != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + if (pCurrentForm->IsVisible()) + { + break; + } + } + } + + return pCurrentForm; +} + +bool +_Frame::IsOrientationRoot(void) const +{ + return true; +} + +void +_Frame::SetRotation(bool rotation) +{ + __rotation = rotation; +} + +void +_Frame::AddFrameEventListener(const _IFrameEventListener& listener) +{ + __constructed = true; + + result r = __pFrameEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_Frame::RemoveFrameEventListener(const _IFrameEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pFrameEvent) + { + r = __pFrameEvent->RemoveListener(listener); + } + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_Frame::SetFormActivationChangeEventListener(const _IFormActivationChangeEventListener* plistener) +{ + __pFormActivationChangeEventListener = const_cast<_IFormActivationChangeEventListener*>(plistener); +} + + +void +_Frame::SetFloatingBounds(const FloatRectangle& rect) +{ + __floatingBounds = rect; +} + +void +_Frame::SetFloatingBounds(const Rectangle& rect) +{ + __floatingBounds = _CoordinateSystemUtils::ConvertToFloat(rect); +} + +void +_Frame::SetFloatingOrientation(_ControlOrientation orientation) +{ + if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + __floatingOrientation = orientation; + } +} + +result +_Frame::SetShowMode(FrameShowMode showMode) +{ + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "The method cannot proceed due to a severe system error."); + + if (showMode == FRAME_SHOW_MODE_MINIMIZED) + { + if (__minimized == true) + { + return E_SUCCESS; + } + + pEcoreEvas->MinimizeWindow(*GetRootWindow()); + __minimized = true; + + return E_SUCCESS; + } + else + { + if (__minimized == true) + { + return E_SYSTEM; + } + } + + bool changeMode = true; + + if ((showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + _Form* pCurrentForm = GetCurrentForm(); + + if (pCurrentForm) + { + if (pCurrentForm->GetFormStyle() & _FORM_STYLE_INDICATOR) + { + changeMode = false; + } + } + } + + SysTryReturnResult(NID_UI_CTRL, changeMode == true, E_SYSTEM, "The method cannot proceed due to a severe system error."); + + int oldShowMode = __showMode; + __showMode = showMode; + + // depend on WM. + // App decides floating bounds directly. +/* + if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + _Form* pCurForm = GetCurrentForm(); + if (pCurForm) + { + orientation = pCurForm->GetOrientation(); + } + else + { + orientation = GetOrientation(); + } + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__floatingOrientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y); + FloatPoint curPoint(prevPoint.x, prevPoint.y); + float ratio = screenSize.width / screenSize.height; + + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x * ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y / ratio; + } + + __floatingBounds.x = curPoint.x; + __floatingBounds.y = curPoint.y; + } + } + else + { + if (__floatingOrientation == _CONTROL_ORIENTATION_PORTRAIT) + { + FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y); + FloatPoint curPoint(prevPoint.x, prevPoint.y); + float ratio = screenSize.width / screenSize.height; + + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x / ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y * ratio; + } + + __floatingBounds.x = curPoint.x; + __floatingBounds.y = curPoint.y; + } + } + } +*/ + + result r = E_SUCCESS; + Rectangle floatingBounds = _CoordinateSystemUtils::ConvertToInteger(__floatingBounds); + switch (__showMode) + { + case FRAME_SHOW_MODE_FULL_SCREEN: + if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) + { + r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (oldShowMode != FRAME_SHOW_MODE_FULL_SCREEN) + { + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + + __restore = true; + + if (__skipSetBounds == false) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); + } + else + { + SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width)); + } + } + + __restore = false; + } + + SetChangedPositionByUser(false); + + break; + case FRAME_SHOW_MODE_PARTIAL_SCREEN: + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set floating bounds(%d, %d, %d, %d).", + GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height); + if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) + { + r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN) + { + SetBounds(__floatingBounds); + } + else if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) + { + pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(__floatingBounds)); + } + + break; + case FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING: + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set floating bounds(%d, %d, %d, %d).", + GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height); + if (oldShowMode != FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING) + { + r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN) + { + if (IsChangedPositionByUser() == true) + { + SetBounds(__floatingBounds); + } + else + { + SetSize(FloatDimension(__floatingBounds.width, __floatingBounds.height)); + } + } + + break; + default: + break; + } + + if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + _Form* pCurForm = GetCurrentForm(); + if (pCurForm) + { + __floatingOrientation = pCurForm->GetOrientation(); + } + else + { + __floatingOrientation = GetOrientation(); + } + } + + return E_SUCCESS; +} + +FrameShowMode +_Frame::GetShowMode(bool minimize) const +{ + if (minimize) + { + if (__minimized == true) + { + return FRAME_SHOW_MODE_MINIMIZED; + } + else + { + return __showMode; + } + } + else + { + return __showMode; + } +} + +bool +_Frame::IsFrameActivated(void) const +{ + return __activated; +} + +void +_Frame::OnChildAttached(const _Control& child) +{ + _Form* pCurrentForm = GetCurrentForm(); + + if (pCurrentForm == &child) + { + int controlCount = GetChildCount(); + + if (controlCount > 1) + { + _Control* pOldCurrentForm = GetChild(controlCount - 2); + SysTryReturnVoidResult(NID_UI_CTRL, pOldCurrentForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pOldCurrentForm->SetVisibleState(false); + } + } +} + +void +_Frame::OnChildDetached(const _Control& child) +{ + int controlCount = GetChildCount(); + + if (controlCount > 0) + { + _Control* pCurrentForm = GetChild(controlCount - 1); + SysTryReturnVoidResult(NID_UI_CTRL, pCurrentForm, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCurrentForm->SetVisibleState(true); + } + else + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas"); + pEcoreEvas->SetIndicatorShowState(*GetRootWindow(), false); + } +} + +result +_Frame::OnBoundsChanging(const FloatRectangle& bounds) +{ + int appType = _AppInfo::GetAppType(); + if (appType & _APP_TYPE_IME_APP) + { + SysLog(NID_UI_CTRL, "[Ime Rotation]"); + return E_SUCCESS; + } + + if (__restore == false) + { + __floatingBounds = bounds; + } + + if ((__showMode == FRAME_SHOW_MODE_FULL_SCREEN) && (__restore == false)) + { + if (__constructed == false) + { + return E_SUCCESS; + } + else + { + if (__rotation == true) + { + return E_SUCCESS; + } + else + { + return E_UNSUPPORTED_OPERATION; + } + } + } + + if (__changingBoundsEnabled == false) + { + return E_SUCCESS; + } + + if (__restore == true) + { + return E_SUCCESS; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + bool changePosition = IsChangedPositionByUser(); + SysLog(NID_UI_CTRL, "[WM ROTATION][WIN 0x%x] IsChangedPositionByUser = %d", GetNativeHandle(), changePosition); + pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds), (changePosition ? false : true)); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + +result +_Frame::OnAttached(void) +{ + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysAssert(pEcoreEvas); + + pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), true); + + return E_SUCCESS; +} + +void +_Frame::OnBackgroundColorChanged(Color& backgroundColor) +{ + _RootVisualElement* pRootVE = GetRootVisualElement(); + SysAssert(pRootVE); + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + SysAssert(pLayer); + + byte alpha = backgroundColor.GetAlpha(); + float opacity = static_cast(alpha) / 255.0f; + + pLayer->SetOpacity(opacity); + + // Restore + FrameShowMode showMode = GetShowMode(false); + __skipSetBounds = true; + SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN); + __skipSetBounds = false; + + SetShowMode(showMode); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + Orientation mode = ORIENTATION_PORTRAIT; + + _Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm) + { + _FormImpl* pFormImpl = static_cast<_FormImpl*>(pCurrentForm->GetUserData()); + if (pFormImpl) + { + mode = pFormImpl->GetOrientation(); + } + } + else + { + _FrameImpl* pFrameImpl = static_cast<_FrameImpl*>(GetUserData()); + if (pFrameImpl) + { + mode = pFrameImpl->GetOrientation(); + } + } + + switch (mode) + { + case ORIENTATION_PORTRAIT: + pEcoreEvas->SetWindowPreferredRotation(*this, 0, true); + break; + case ORIENTATION_LANDSCAPE: + pEcoreEvas->SetWindowPreferredRotation(*this, 270, true); + break; + case ORIENTATION_PORTRAIT_REVERSE: + pEcoreEvas->SetWindowPreferredRotation(*this, 180, true); + break; + case ORIENTATION_LANDSCAPE_REVERSE: + pEcoreEvas->SetWindowPreferredRotation(*this, 90, true); + break; + case ORIENTATION_AUTOMATIC: + { + pEcoreEvas->SetWindowPreferredRotation(*this, -1); + int autoRotation[3] = {0, 90, 270}; + pEcoreEvas->SetWindowAvailabledRotation(*this, autoRotation, 3, true); + } + break; + case ORIENTATION_AUTOMATIC_FOUR_DIRECTION: + { + pEcoreEvas->SetWindowPreferredRotation(*this, -1); + int autoFourRotation[4] = {0, 90, 180, 270}; + pEcoreEvas->SetWindowAvailabledRotation(*this, autoFourRotation, 4, true); + } + break; + default: + break; + } +} + +void +_Frame::ResetFocusList(void) +{ + Tizen::Ui::Controls::_Form* pCurrentForm = GetCurrentForm(); + if (pCurrentForm) + { + pCurrentForm->ResetFocusList(); + } +} + +_Control* +_Frame::GetFocusControl(const _Control* pControl) const +{ + const _Form* pForm = null; + _Frame* pFrame = null; + const _Control* pTempControl = pControl; + while(pTempControl) + { + pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl)); + + if (pForm) + { + pFrame = dynamic_cast<_Frame*>(pForm->GetParent()); + if (pFrame) + { + break; + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + if (pForm) + { + return pForm->GetFocusControl(); + } + return null; +} + +_Control* +_Frame::GetCurrentFocusControl(void) const +{ + _Form* pForm = GetCurrentForm(); + if (pForm) + { + return pForm->GetFocusControl(); + } + return null; +} +void +_Frame::SetFocusControl(const _Control* pControl , bool on) +{ + SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] The pControl cannot be NULL."); + _ControlManager* pControlMgr = _ControlManager::GetInstance(); + SysAssert(pControlMgr); + _Form* pForm = null; + _Form* pCurrentForm = GetCurrentForm(); + _Frame* pFrame = null; + const _Control* pTempControl = pControl; + bool isCurrentForm = false; + + while(pTempControl) + { + pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl)); + + if (pForm) + { + pFrame = dynamic_cast<_Frame*>(pForm->GetParent()); + if (pFrame) + { + break; + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + + if (pForm == pCurrentForm) + { + isCurrentForm = true; + } + + if (pForm) + { + if (on) + { + pForm->SetFocusControl(pControl); + if (isCurrentForm && pFrame && pFrame->IsActivated()) + { + pControlMgr->SetFocusControl(*pControl); + } + } + else + { + pControlMgr->SetFocusControl(*this, false); + pForm->SetFocused(); + } + } +} + +void +_Frame::SetChangingBoundsEnabled(bool enable) +{ + __changingBoundsEnabled = enable; +} + +void +_Frame::SetPartialScreenEnabled(bool enable) +{ +#if defined(PARTIAL_SCREEN) + _RootVisualElement* pRootVE = GetRootVisualElement(); + if (pRootVE) + { + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + if (pLayer) + { + pLayer->SetConfigured(true); + SysLog(NID_UI_CTRL, "[WM ROTATION]

[WIN 0x%x] enable = %d", GetNativeHandle(), enable); + } + } +#endif + + if (enable == true) + { + __showMode = FRAME_SHOW_MODE_PARTIAL_SCREEN; + } + else + { + SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN); + } +} + +Tizen::Base::Collection::IListT<_Control*>* +_Frame::GetFocusList(void) const +{ + _Form* pForm = GetCurrentForm(); + if (pForm) + { + return pForm->GetFocusList(); + } + return null; +} + +_Control* +_Frame::GetFocusTraversalControl(_Control* pControl) const +{ + _Form* pForm = null; + _Control* pTempControl = pControl; + _Frame* pFrame = null; + while(pTempControl) + { + pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl)); + + if (pForm) + { + pFrame = dynamic_cast<_Frame*>(pForm->GetParent()); + if (pFrame) + { + break; + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + + if (pForm) + { + return pForm->GetFocusTraversalControl(); + } + return null; +} + +void +_Frame::SetFocusTraversalControl(_Control* pControl, bool on) +{ + _Form* pForm = null; + _Control* pTempControl = pControl; + _Frame* pFrame = null; + while(pTempControl) + { + pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl)); + + if (pForm) + { + pFrame = dynamic_cast<_Frame*>(pForm->GetParent()); + if (pFrame) + { + break; + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + else + { + pTempControl = pTempControl->GetParent(); + } + } + + if (pForm) + { + if (on) + { + pForm->SetFocusTraversalControl(pControl); + } + else + { + pForm->SetFocusTraversalControl(pForm); + } + } +} + +bool +_Frame::IsChildAttachable(_Control& child) const +{ + return (dynamic_cast<_Form*>(&child) != null); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/effects/FUiEffects_EffectErrorMessages.cpp b/src/ui/effects/FUiEffects_EffectErrorMessages.cpp index 8380605..f4960af 100644 --- a/src/ui/effects/FUiEffects_EffectErrorMessages.cpp +++ b/src/ui/effects/FUiEffects_EffectErrorMessages.cpp @@ -27,7 +27,7 @@ const char* _UiEffectError::NOT_CONSTRUCTED_MANAGER = "Effect Manager is not ful const char* _UiEffectError::NO_EFFECT_FILE = "Specified Effect file doesn't exist: %s"; const char* _UiEffectError::EFFECT_FILE_ERROR = "Error in Effect File \"%s\" in Line %i: %s"; const char* _UiEffectError::FEED_TOUCH_IS_BLOCKED = "For effect [%i, %s] TOUCH_EVENTs are blocked"; -const char* _UiEffectError::OUT_OF_MEMORY = "Memory is insufficient"; +const char* _UiEffectError::OUT_OF_MEMORY = "[E_OUT_OF_MEMORY] Memory allocation failed"; const char* _UiEffectError::NO_EFFECT = "Effect with specified name [%s] doesn't exist"; const char* _UiEffectError::LISTENER_IS_NOT_ASSIGNED = "For Effect with name [%s] EventListener is not assigned"; const char* _UiEffectError::PROVIDER_IS_NOT_ASSIGNED = "For Effect with name [%s] ResourceProvider is not assigned"; diff --git a/src/ui/effects/FUiEffects_EffectImpl.cpp b/src/ui/effects/FUiEffects_EffectImpl.cpp index cd412e9..3b2959a 100644 --- a/src/ui/effects/FUiEffects_EffectImpl.cpp +++ b/src/ui/effects/FUiEffects_EffectImpl.cpp @@ -613,7 +613,7 @@ void _EffectImpl::InitializeEffect(void) { Tizen::App::App* pApp = Tizen::App::App::GetInstance(); - SysTryReturnVoidResult(NID_UI_EFFECT, pApp != null, E_FILE_NOT_FOUND, "Effects. The pointer to application instance equals null"); + SysTryReturnVoidResult(NID_UI_EFFECT, pApp != null, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] The pointer to application instance equals null"); std::wstring tempWStr = std::wstring((pApp->GetAppRootPath()).GetPointer()); tempWStr += L"data/"; std::string dataDirStr(tempWStr.begin(), tempWStr.end()); @@ -647,7 +647,7 @@ _EffectImpl::InitializeEffect(void) SysAssertf(resultInsert.second == true, _UiEffectError::INTERNAL_ERROR); bool isLuaError = (__pModel->GetState() != _EFFECT_STATE_RUNNABLE); - SysTryReturnVoidResult(NID_UI_EFFECT, !isLuaError, E_PARSING_FAILED, _UiEffectError::LUA_RUNTIME_ERROR); + SysTryReturnVoidResult(NID_UI_EFFECT, !isLuaError, E_PARSING_FAILED,"[E_PARSING_FAILED] %s", _UiEffectError::LUA_RUNTIME_ERROR); } }}} // Tizen::Ui::Effects diff --git a/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp b/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp index 7506437..415be17 100644 --- a/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp +++ b/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp @@ -1783,7 +1783,7 @@ EffectParser::CreateModelSurface(XmlElement& xmlElement) id, iterationCount, modelSpeed, environmentResistance, __currentGravityForce, __currentGravityForceValue, groundLevel); SysTryCatchLabel(NID_UI_EFFECT, newModelSurface != null, result = false, CATCH1, E_OUT_OF_MEMORY, - "Effects. [E_OUT_OF_MEMORY] NOT CREATED: ModelSurface\n" + "Effects. [E_OUT_OF_MEMORY] Memory allocation is failed. NOT CREATED: ModelSurface\n" "Effects. Building a model failed: an object of ModelSurface hasn't been created"); __currentGravityForce = Vec3f(0, 0, 0); diff --git a/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp index 6626a84..8b2eaab 100644 --- a/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp +++ b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp @@ -163,7 +163,7 @@ EffectRenderer::CreateSurface(EGLNativeWindowType wnd) void EffectRenderer::DeleteSurface(EGLSurface surface) { - SysTryReturnVoidResult(NID_UI_EFFECT, surface != EGL_NO_SURFACE, E_OPERATION_FAILED, "DeleteSurface EGL_NO_SURFACE"); + SysTryReturnVoidResult(NID_UI_EFFECT, surface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] DeleteSurface EGL_NO_SURFACE"); eglDestroySurface(__eglDisplay, surface); diff --git a/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp b/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp index f058e9d..bf66849 100644 --- a/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp +++ b/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp @@ -46,7 +46,7 @@ using namespace std; static int SetMetatable(lua_State* tolua_S, const char* type, const char* operation, lua_CFunction func) { char ctype[128] = "const "; - strcat(ctype,type); + strncat(ctype, type, sizeof(ctype)-1); const char* types[2] = {type, ctype}; for (short i = 0; i < 2; ++i) diff --git a/src/ui/inc/FUiAnim_EflLayer.h b/src/ui/inc/FUiAnim_EflLayer.h index b69e4ae..1c1a192 100644 --- a/src/ui/inc/FUiAnim_EflLayer.h +++ b/src/ui/inc/FUiAnim_EflLayer.h @@ -36,6 +36,7 @@ #include "FUiAnim_NativeLayer.h" //#define USE_WORKAROUND +//#define XWINDOW_DEBUG namespace Tizen { namespace Ui { namespace Animations { @@ -51,6 +52,9 @@ public: virtual result OnConstructed(void); virtual result SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + virtual result SetPosition(const Tizen::Graphics::FloatPoint& point); + virtual result SetSize(const Tizen::Graphics::FloatDimension& size); + void HasUpdatedWindowSize(const Tizen::Graphics::FloatDimension&); virtual Tizen::Graphics::FloatRectangle GetBounds(void) const; virtual result SetShowState(bool show); virtual bool GetShowState(void) const; @@ -60,13 +64,10 @@ public: void SetOpacity(float opacity); float GetOpacity(void); - result SetOrientationChanged(void); - result SetInternalBounds(void); + result SetOrientationChanged(int orientation); void SetOwner(_EflLayer* pOwner); - int GetRotation(void); - _RootVisualElement* GetRootVisualElement(void) const { return _pRootVisualElement; @@ -111,6 +112,21 @@ public: _isMapped = map; } + bool IsMapped(void) + { + return _isMapped; + } + + void SetConfigured(bool configure) + { + _isConfigured = configure; + } + + bool IsConfigured(void) + { + return _isConfigured; + } + protected: result Initialize(Evas_Object* pWindow); virtual result Configure(_RootVisualElement& rootElement); @@ -127,6 +143,7 @@ protected: bool _isMainType; bool _needRender; bool _isMapped; + bool _isConfigured; bool _needForceManualRender; static int _countOfLayer; Ecore_Event_Handler* _pOnWindowDamagedHandler; @@ -137,6 +154,7 @@ private: bool __isWinObject; Tizen::Graphics::FloatRectangle __bounds; _EflLayerConfiguration* _pConfiguration; + int __orientation; }; }}} //namespace Tizen { namespace Ui { namespace Animations diff --git a/src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h b/src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h old mode 100755 new mode 100644 diff --git a/src/ui/inc/FUiAnim_NativeLayer.h b/src/ui/inc/FUiAnim_NativeLayer.h index 6fa952f..f044173 100644 --- a/src/ui/inc/FUiAnim_NativeLayer.h +++ b/src/ui/inc/FUiAnim_NativeLayer.h @@ -100,6 +100,24 @@ public: virtual result SetBounds(const Tizen::Graphics::FloatRectangle& bounds) = 0; /** + * Sets the position of this instance. + * + * @since 2.0 + * + * @return An error code + */ + virtual result SetPosition(const Tizen::Graphics::FloatPoint& point) = 0; + + /** + * Sets the size of this instance. + * + * @since 2.0 + * + * @return An error code + */ + virtual result SetSize(const Tizen::Graphics::FloatDimension& size) = 0; + + /** * Gets the position and the size of this instance. * * @since 2.0 diff --git a/src/ui/inc/FUiAnim_VisualElement.h b/src/ui/inc/FUiAnim_VisualElement.h index c531c37..78e2e47 100644 --- a/src/ui/inc/FUiAnim_VisualElement.h +++ b/src/ui/inc/FUiAnim_VisualElement.h @@ -120,6 +120,9 @@ public: */ virtual bool OnPrepareDraw(void); + result SetPosition(const Tizen::Graphics::FloatPoint& point); + result SetSize(const Tizen::Graphics::FloatDimension& size); + result SetClipToParent(bool clipToParent); result SetBackBufferEnabled(bool enable); result SetSurfaceOpaque(bool isSurfaceOpaque); diff --git a/src/ui/inc/FUiAnim_VisualElementImpl.h b/src/ui/inc/FUiAnim_VisualElementImpl.h index 9cd7fea..09fbd64 100644 --- a/src/ui/inc/FUiAnim_VisualElementImpl.h +++ b/src/ui/inc/FUiAnim_VisualElementImpl.h @@ -996,7 +996,7 @@ private: _VisualElementCoordinateSystem::MakeIntegralDimension(width, height); } - result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds); + result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds, bool& sizeChanged); result SetZPositionI(float zPosition); result SetShowOpacityI(float showOpacity); result SetShowStateI(bool show); diff --git a/src/ui/inc/FUiCtrl_Animation.h b/src/ui/inc/FUiCtrl_Animation.h index 1b1a489..b72a9e6 100644 --- a/src/ui/inc/FUiCtrl_Animation.h +++ b/src/ui/inc/FUiCtrl_Animation.h @@ -75,6 +75,7 @@ public: result Stop(void); result Pause(void); AnimationStatus GetStatus(void) const; + bool IsInternalAnimation(); virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); virtual void OnDraw(void); @@ -82,18 +83,21 @@ public: virtual void OnBoundsChanged(void); virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); - static _Animation* CreateAnimationN(void); + static _Animation* CreateAnimationN(bool isFramework = false); + bool IsAttachedToMainTree(void); private: _Animation(const _Animation& rhs); _Animation& operator =(const _Animation& rhs); private: + static bool __isInternalAnimation; _AnimationPresenter* __pAnimationPresenter; Tizen::Ui::Control* __pControlAnimation; _AnimationEvent* __pAnimationEvent; Tizen::Base::Collection::IList* __pAnimationFrames; Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + bool __isAttachedToMainTree; }; // _Animation diff --git a/src/ui/inc/FUiCtrl_AnimationPresenter.h b/src/ui/inc/FUiCtrl_AnimationPresenter.h index 9ceaae0..4ea9f03 100644 --- a/src/ui/inc/FUiCtrl_AnimationPresenter.h +++ b/src/ui/inc/FUiCtrl_AnimationPresenter.h @@ -76,6 +76,7 @@ private: bool __isTimerRunning; Tizen::Ui::Animations::_VisualElement* __pVisualElement; bool __lazyDecode; + bool __isPlayCalledBeforeAttach; }; // _AnimationPresenter diff --git a/src/ui/inc/FUiCtrl_Button.h b/src/ui/inc/FUiCtrl_Button.h index 5ec08ce..db484ad 100644 --- a/src/ui/inc/FUiCtrl_Button.h +++ b/src/ui/inc/FUiCtrl_Button.h @@ -257,6 +257,7 @@ public: result SetTabTextSlide(bool tabTextSlide); bool IsTabTextSlide(void) const; + bool IsButtonStatusSelected(void) const; protected: result SetPresenter(const _ButtonPresenter& buttonPresenter); diff --git a/src/ui/inc/FUiCtrl_ButtonItemImpl.h b/src/ui/inc/FUiCtrl_ButtonItemImpl.h index 6f971af..b4a9593 100644 --- a/src/ui/inc/FUiCtrl_ButtonItemImpl.h +++ b/src/ui/inc/FUiCtrl_ButtonItemImpl.h @@ -32,7 +32,6 @@ namespace Tizen { namespace Ui { namespace Controls { static const int BUTTON_ITEM_ACTION_ID_MIN = 0; -static const int BUTTON_ITEM_ACTION_ID_MAX = INT_MAX; static const int BUTTON_ITEM_MAX_STATE_COUNT = 4; class _ButtonItemImpl diff --git a/src/ui/inc/FUiCtrl_ButtonPresenter.h b/src/ui/inc/FUiCtrl_ButtonPresenter.h index 0047e5e..4ccb5fa 100644 --- a/src/ui/inc/FUiCtrl_ButtonPresenter.h +++ b/src/ui/inc/FUiCtrl_ButtonPresenter.h @@ -123,6 +123,7 @@ private: bool __touchMoveHandled; bool __lazyDecode; bool __showUnderlineBitmap; + bool __isKeyPressed; Tizen::Graphics::Font* __pFont; Tizen::Graphics::_Text::TextObject* __pTextObject; diff --git a/src/ui/inc/FUiCtrl_CheckButton.h b/src/ui/inc/FUiCtrl_CheckButton.h index 0deb2a9..2dc2381 100644 --- a/src/ui/inc/FUiCtrl_CheckButton.h +++ b/src/ui/inc/FUiCtrl_CheckButton.h @@ -163,8 +163,6 @@ public: virtual bool OnFocusLost(const _Control& source); public: - result LoadDefaultBackgroundBitmap(void); - result SetSelected(bool select); bool IsSelected(void) const; @@ -228,6 +226,8 @@ public: GroupStyle GetGroupStyle(void) const; _CheckButtonStatus GetCheckButtonStatus(void) const; + result LoadDefaultBitmap(void); + Tizen::Graphics::Bitmap* GetMarkBgBitmap(_CheckButtonStatus checkButtonStatus) const; Tizen::Graphics::Bitmap* GetMarkBitmap(_CheckButtonStatus checkButtonStatus) const; @@ -314,10 +314,10 @@ private: Tizen::Graphics::Color __highlightedColor; Tizen::Graphics::Color __selectedColor; - Tizen::Graphics::Bitmap* __pMarkBgNormalBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pMarkBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; Tizen::Graphics::Bitmap* __pMarkBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; - Tizen::Graphics::Bitmap* __pOnOffBgNormalBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pOnOffBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; Tizen::Graphics::Bitmap* __pOnOffBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; Tizen::Graphics::Bitmap* __pOnOffSlidingBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; diff --git a/src/ui/inc/FUiCtrl_ColorPickerPresenter.h b/src/ui/inc/FUiCtrl_ColorPickerPresenter.h index 78200ac..cbf14e1 100644 --- a/src/ui/inc/FUiCtrl_ColorPickerPresenter.h +++ b/src/ui/inc/FUiCtrl_ColorPickerPresenter.h @@ -154,7 +154,7 @@ private: _ColorPickerComponentType GetTouchActionType(const Tizen::Graphics::FloatPoint& position) const; - result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false, bool isHandlerBitmap = false); _ColorPickerPresenter(_ColorPicker& colorPicker); diff --git a/src/ui/inc/FUiCtrl_ContextMenu.h b/src/ui/inc/FUiCtrl_ContextMenu.h index dd70adb..d68a911 100644 --- a/src/ui/inc/FUiCtrl_ContextMenu.h +++ b/src/ui/inc/FUiCtrl_ContextMenu.h @@ -44,7 +44,6 @@ namespace Tizen { namespace Ui { namespace Controls const int CONTEXT_MENU_ITEM_STATUS_COUNT = 3; const int MAX_CONTEXTMENU_LIST_SHOW_ITEM = 4; -const int MAX_CONTEXTMENU_ICON_SHOW_ITEM = 5; enum ContextMenuCoreStyle { @@ -181,6 +180,7 @@ public: Tizen::Ui::Controls::_ActionEvent* GetActionEvent(void) const; const Tizen::Graphics::Bitmap* GetArrowNormalBitmap(ContextMenuCoreDropPosition dropPosition) const; const Tizen::Graphics::Bitmap* GetArrowEffectBitmap(ContextMenuCoreDropPosition dropPosition) const; + Tizen::Graphics::Bitmap* GetPressedBitmap(void); const Tizen::Graphics::Bitmap* GetBackgroundNormalBitmap(void) const; const Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(void) const; ContextMenuCoreDropPosition GetDropPosition(void) const; @@ -193,6 +193,8 @@ public: virtual void OnFrameMinimized(const Tizen::Ui::Controls::_Frame& source); virtual void OnFrameRestored(const Tizen::Ui::Controls::_Frame& source); virtual void OnDraw(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo); @@ -232,6 +234,7 @@ public: Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(const int mainIndex) const; void AddAccessibilityElement(const _AccessibilityElement& element); + void SetAllAccessibilityElement(void); _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const; _ContextMenuItemInfo FindItem(int index) const; @@ -246,7 +249,6 @@ private: result LoadBitmap(void); result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color); void AdjustDropPosition(void); - void SetAllAccessibilityElement(void); void RemoveAllAccessibilityElement(void); private: @@ -278,6 +280,7 @@ private: Tizen::Graphics::Bitmap* __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_MAX]; Tizen::Graphics::Bitmap* __pBackgroundNormalBitmap; Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap; + Tizen::Graphics::Bitmap* __pPressedBitmap; enum ContextMenuCoreDropPosition __dropPosition; Tizen::Ui::Controls::_Frame* __pCurrentFrame; enum _ControlOrientation __layout; diff --git a/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h b/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h index d10be74..0178b84 100644 --- a/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h +++ b/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h @@ -59,9 +59,9 @@ public: virtual result Draw(void); virtual result DrawBackground(Tizen::Graphics::Canvas* pCanvas); virtual result DrawArrow(Tizen::Graphics::Canvas* pCanvas); - virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); - virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); - virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); virtual result DeleteItem(int index); virtual result DeleteItemAll(void); virtual int CalculateShowItemCount(void); @@ -84,6 +84,8 @@ public: virtual bool IsChildControlFocusManage(void) const; virtual void OnDrawFocus(void); virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); virtual void OnFontChanged(Tizen::Graphics::Font* pFont); virtual void OnFontInfoRequested(unsigned long& style, float& size); @@ -93,7 +95,7 @@ public: virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position); virtual _ContextMenuItemInfo FindItem(int index); virtual result SetTopDrawnItemIndex(int index); - virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false); private: void LoadShape(void); @@ -104,7 +106,7 @@ private: Tizen::Graphics::FloatDimension AdjustItemLayoutTabStyle(void); bool IsLayoutBitmapOnly(void); - _ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + _ContextMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); result DrawItem(Tizen::Graphics::Canvas* pCanvas); result DrawLine(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatPoint point1, Tizen::Graphics::FloatPoint point2, bool drawVLine); void SetItemSize(_ContextMenuItem* pItem); @@ -158,6 +160,7 @@ private: bool __enterKeyPressed; bool __backKeyPressed; int __focusedIndex; + bool __focusLost; }; // _ContextMenuGridPresenter }}} // Tizen::Ui: Control diff --git a/src/ui/inc/FUiCtrl_ContextMenuItem.h b/src/ui/inc/FUiCtrl_ContextMenuItem.h index d9e0108..171fceb 100644 --- a/src/ui/inc/FUiCtrl_ContextMenuItem.h +++ b/src/ui/inc/FUiCtrl_ContextMenuItem.h @@ -101,6 +101,8 @@ public: void SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect); Tizen::Graphics::FloatRectangle GetPressedDrawRect(void) const; + void SetPressedItemColor(Tizen::Graphics::Color color); + void SetParentScrollEnable(bool enable); bool GetParentScrollEnable() const; @@ -109,7 +111,6 @@ public: int Release(void); void SetAndInvalidate(bool flag); - const Tizen::Graphics::Bitmap* GetMagentaBgBitmap(void) const; virtual void OnBoundsChanged(void); // draw @@ -159,7 +160,8 @@ private: float __textSize; Tizen::Base::String __text; Tizen::Graphics::Bitmap* __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_MAX]; - Tizen::Graphics::Bitmap* __pMagentaBgBitmap; + Tizen::Graphics::Bitmap* __pNormalBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedBgBitmap; Tizen::Graphics::FloatDimension __size; Tizen::Graphics::FloatRectangle __drawRect; Tizen::Graphics::FloatRectangle __pressedDrawRect; diff --git a/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h b/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h index 0ccff3a..b13afdc 100644 --- a/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h +++ b/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h @@ -83,7 +83,9 @@ public: virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); virtual bool IsChildControlFocusManage(void) const; - virtual void OnFocusModeStateChanged(void); + virtual void ResetFocus(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); virtual void OnFontChanged(Tizen::Graphics::Font* pFont); virtual void OnFontInfoRequested(unsigned long& style, float& size); @@ -93,7 +95,7 @@ public: virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position); virtual _ContextMenuItemInfo FindItem(int index); virtual result SetTopDrawnItemIndex(int index); - virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false); private: void LoadShape(void); @@ -102,7 +104,7 @@ private: void AdjustItemPosition(void); Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void); - _ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + _ContextMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; void CalculateItemMaximumWidth(void); @@ -152,6 +154,7 @@ private: bool __enterKeyPressed; bool __backKeyPressed; int __focusedIndex; + bool __focusLost; }; // _ContextMenuListPresenter }}} // Tizen::Ui: Control diff --git a/src/ui/inc/FUiCtrl_DateTimeBar.h b/src/ui/inc/FUiCtrl_DateTimeBar.h index dd577fb..a280ac4 100644 --- a/src/ui/inc/FUiCtrl_DateTimeBar.h +++ b/src/ui/inc/FUiCtrl_DateTimeBar.h @@ -134,6 +134,9 @@ public: virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){} virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){} + void ChangeLayout(void); + void ClearPreviousText(void); + private: _DateTimeBar(void); diff --git a/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h b/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h index 1b6d791..49eaab3 100644 --- a/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h +++ b/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h @@ -98,6 +98,9 @@ public: virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + void ChangeLayout(void); + void ClearPreviousText(void); + private: result AddItem(int actionId); result InsertItems(int actionId); @@ -151,6 +154,8 @@ private: _FlickAnimation __flickAnimation; Tizen::Base::String __selectedText; Tizen::Base::String __focusedText; + Tizen::Base::String __prevFocusedText; + Tizen::Base::String __prevSelectedText; static const int FLICK_ANIMATION_TIMER_PERIOD = 10; static const int FLICK_ANIMATION_FPS_DATE_TIME_BAR = 30; @@ -172,6 +177,7 @@ private: int __focusedValue; static const int UPDATE_ITEM_COUNT = 6; bool __isFlickCanceled; + bool __isChangeLayout; }; // _DateTimeBarPresenter diff --git a/src/ui/inc/FUiCtrl_Edit.h b/src/ui/inc/FUiCtrl_Edit.h old mode 100755 new mode 100644 index 004a3ca..8e1a951 --- a/src/ui/inc/FUiCtrl_Edit.h +++ b/src/ui/inc/FUiCtrl_Edit.h @@ -51,12 +51,15 @@ #include "FUi_TouchLongPressGestureDetector.h" #include "FUi_TouchTapGestureDetector.h" #include "FUiCtrl_ExpandableEditAreaEvent.h" +#include "FUiCtrl_Frame.h" #include "FUiCtrl_IActionEventListener.h" #include "FUiCtrl_IExpandableEditAreaEventListener.h" +#include "FUiCtrl_IFormActivationChangeEventListener.h" #include "FUiCtrl_IKeypadEventListener.h" #include "FUiCtrl_ITextBlockEventListener.h" #include "FUiCtrl_ITextEventListener.h" #include "FUiCtrl_ILanguageEventListener.h" +#include "FUiCtrl_IScrollEventListener.h" #include "FUiCtrl_IScrollPanelEventListener.h" #include "FUiCtrl_IUiLinkEventListener.h" #include "FUiCtrl_KeypadEvent.h" @@ -69,6 +72,8 @@ namespace Tizen { namespace Ui { class _AccessibilityElement; +class _DragAndDropItem; + }} // Tizen::Ui namespace Tizen { namespace Ui { namespace Animations @@ -130,15 +135,12 @@ enum EditAccessibilityElementType const int EDIT_STYLE_SINGLE_LINE = 0x00000001; const int EDIT_STYLE_NORMAL = 0x00000002; -const int EDIT_STYLE_BORDER = 0x00000004; const int EDIT_STYLE_TITLE_LEFT = 0x00000010; const int EDIT_STYLE_TITLE_TOP = 0x00000020; const int EDIT_STYLE_PASSWORD = 0x00000100; const int EDIT_STYLE_VIEWER = 0x00000200; const int EDIT_STYLE_NOSCROLL = 0x00000400; const int EDIT_STYLE_CLEAR = 0x00001000; -const int EDIT_STYLE_ICON_EMBEDDED = 0x00010000; -const int EDIT_STYLE_DASHBOARD_EMBEDDED = 0x00100000; const int EDIT_STYLE_FLEXIBLE = 0x01000000; const int EDIT_STYLE_TOKEN = 0x02000000; const int EDIT_COLOR_OPACITY = 100; @@ -146,8 +148,6 @@ const int EDIT_AREA_DEFAULT_LIMIT_LENGTH = 1000; const int EDIT_FIELD_DEFAULT_LIMIT_LENGTH = 100; const int EDIT_COLOR_MAX = 4; -const int EDIT_TEXT_COLOR_MAX = 4; -const int EDIT_MARGIN_COUNT_MAX = 2; const float DEFAULT_LINE_SPACE = 1.0f; /** @@ -172,7 +172,9 @@ class _OSP_EXPORT_ _Edit , public _ITouchLongPressGestureEventListener , public _ITouchTapGestureEventListener , public IClipboardPopupEventListener + , public _IFormActivationChangeEventListener , public _IEditTextFilter + , public _IScrollEventListener , virtual public Tizen::System::ISettingEventListener { public: @@ -336,12 +338,9 @@ public: Tizen::Graphics::Bitmap* GetBackgroundBitmap(EditStatus status) const; result LoadDefaultBackgroundBitmap(GroupStyle groupStyle); result ReplaceDefaultBackgroundBitmapForSearchBar(void); - void SetSearchFieldFocus(bool state); - bool IsSearchFieldFocused(void) const; Tizen::Graphics::Bitmap* GetDefaultBackgroundBitmap(EditStatus status) const; bool IsCustomDefaultBackgroundBitmap(EditStatus status) const; Tizen::Graphics::Bitmap* GetDefaultBackgroundEffectBitmap(void) const; - Tizen::Graphics::Bitmap* GetDefaultFocusBitmap(void) const; void GetBlockRange(int& start, int& end) const; Tizen::Graphics::Color GetBlockTextColor(void) const; Tizen::Graphics::Color GetColor(EditStatus status) const; @@ -433,6 +432,7 @@ public: bool IsTextEventEnabled(void) const; virtual void SetAutoShrinkModeEnabled(bool enable); virtual bool IsAutoShrinkModeEnabled(void) const; + bool IsTouchMoving(void) const; result PasteText(void); result ReleaseTextBlock(void); @@ -460,6 +460,9 @@ public: result AttachScrollPanelEvent(void); result DetachScrollPanelEvent(void); + result AddClipboardShowTriggerEventListener(void); + result RemoveClipboardShowTriggerEventListener(void); + result SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int newLineCount = 0); result SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus eventstatus); result SendLanguageEvent(Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode); @@ -499,9 +502,25 @@ public: virtual void OnAncestorEnableStateChanged(const _Control& control); virtual void OnAncestorVisibleStateChanged(const _Control& control); virtual void OnSettingChanged(Tizen::Base::String& key); - virtual void OnDrawFocus(void); + virtual _Window* OnDragAndDropBeginning(void); + virtual void OnDragAndDropDropping(void); + + virtual void OnDragAndDropEntered(void); + virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position); + virtual void OnDragAndDropLeft(void); + virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem); + + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {}; + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + + virtual void OnFormActivated(const Tizen::Ui::Controls::_Form& source); + virtual void OnFormDeactivated(const Tizen::Ui::Controls::_Form& source); + virtual void OnFormActivating(const Tizen::Ui::Controls::_Form& source); + virtual void OnFormDeactivating(const Tizen::Ui::Controls::_Form& source); + _EditPresenter* GetPresenter(void) const; Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const; bool IsInternalFocused(void) const; @@ -544,7 +563,6 @@ private: //Default Bitmap Tizen::Graphics::Bitmap* __pDefaultBackgroundBitmap[EDIT_COLOR_MAX]; Tizen::Graphics::Bitmap* __pDefaultBackgroundEffectBitmap; - Tizen::Graphics::Bitmap* __pDefaultFocusBitmap; Tizen::Ui::_TouchFlickGestureDetector* __pGestureFlick; Tizen::Ui::_TouchLongPressGestureDetector* __pGestureLongPress; @@ -564,11 +582,11 @@ private: bool __isAccessibilityCreated; bool __isFullScreenKeypadEdit; bool __internalFocus; + _Frame* __pCurrentFrame; bool __isDestroyed; IEditTextFilter* __pTextFilter; Tizen::Graphics::FloatRectangle __previousBounds; bool __isTouchMoving; - bool __isSearchFieldFocused; bool __isTextEventEnabled; }; // _Edit diff --git a/src/ui/inc/FUiCtrl_EditCopyPasteManager.h b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h index 56ee14a..534de36 100644 --- a/src/ui/inc/FUiCtrl_EditCopyPasteManager.h +++ b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h @@ -85,9 +85,9 @@ public: public: void CreateCopyPastePopup(void); void CreateHandle(void); + void CreateHandle(int start, int end, int startRowIndex, int startColumnIndex, int endRowIndex, int endColumnIndex); void Show(void); bool CheckHandleBounds(const Tizen::Graphics::FloatPoint& point); - bool CheckHandlePosition(bool leftHandle, int cursorPosition); void RefreshBlock(bool isLeftHandle = false); Tizen::Graphics::FloatRectangle GetCursorBoundsF(bool isAbsRect) const; int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& touchPoint) const; @@ -95,7 +95,7 @@ public: int GetCursorPosition(void) const; int GetHandlerCursorPosition(HandlerType handlerType) const; void SendTextBlockEvent(void); - void Release(void); + void ReleaseHandle(void); void ReleaseCopyPastePopup(void); bool IsCopyPastePopup(const _Control& control) const; bool IsCopyPasteHandle(const _Control& control) const; @@ -120,6 +120,8 @@ public: Tizen::Graphics::FloatRectangle GetEditVisibleAreaF(void) const; _ContextMenu* GetCopyPastePopup(void) const; void GetHandlerRowColumnIndex(bool singleHandler, bool leftHandler, int& rowIndex, int& columnIndex) const; + void DestroyCopyPasteMagnifier(void); + void CreateCopyPasteMagnifier(void); private: _EditCopyPasteManager(const _EditCopyPasteManager& value); _EditCopyPasteManager& operator =(const _EditCopyPasteManager& value); @@ -135,8 +137,6 @@ 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 ee824bd..71c635a 100644 --- a/src/ui/inc/FUiCtrl_EditDate.h +++ b/src/ui/inc/FUiCtrl_EditDate.h @@ -26,12 +26,15 @@ #define _FUI_CTRL_INTERNAL_EDITDATE_H_ #include +#include #include "FUi_Control.h" #include "FUi_UiTouchEvent.h" #include "FUiCtrl_IDateTimeChangeEventListener.h" #include "FUiCtrl_DateTimeChangeEvent.h" #include "FUiCtrl_IActionEventListener.h" #include "FUiCtrl_DateTimeBar.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_ScrollPanelEvent.h" namespace Tizen { namespace Ui { @@ -46,9 +49,11 @@ class _OSP_EXPORT_ _EditDate : public _Control , public _IDateTimeChangeEventListener , public _IActionEventListener + , public Tizen::Ui::Animations::IAnimationTransactionEventListener , virtual public Tizen::Base::Runtime::IEventListener , virtual public _IUiEventListener , virtual public _IUiEventPreviewer + , public _IScrollEventListener , virtual public Tizen::System::ISettingEventListener { DECLARE_CLASS_BEGIN(_EditDate, _Control); @@ -147,6 +152,18 @@ public: void OnAncestorEnableStateChanged(const _Control& control); void OnAncestorVisibleStateChanged(const _Control& control); + // Tizen::Ui::Animations::IAnimationTransactionEventListener + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + + void InitializeParentPanel(void); + + //_ScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {}; + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + private: _EditDate(void); @@ -174,6 +191,8 @@ private: bool __isCalledBoundsChanged; bool __isXmlBoundsExist; static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f; + _ScrollPanel* __pParentPanel; + bool __isEnterKeyPressed; }; // _EditDate }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditDatePresenter.h b/src/ui/inc/FUiCtrl_EditDatePresenter.h index 9de6de3..d3a9fbc 100644 --- a/src/ui/inc/FUiCtrl_EditDatePresenter.h +++ b/src/ui/inc/FUiCtrl_EditDatePresenter.h @@ -28,7 +28,6 @@ #include #include "FUi_Control.h" #include "FUiCtrl_DateTimeDefine.h" -#include "FUiAnimIVisualElementAnimationStatusEventListener.h" namespace Tizen { namespace Ui { namespace Controls { @@ -38,7 +37,6 @@ class _DateTimeModel; class _EditDatePresenter : public Tizen::Base::Object - , Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener { public: _EditDatePresenter(void); @@ -85,12 +83,9 @@ 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){} - virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){} + virtual bool OnKeyReleased(const _Control& source, const _KeyCode& keyCode); + void EndTransaction(void); private: _EditDatePresenter(const _EditDatePresenter&); _EditDatePresenter& operator =(const _EditDatePresenter&); @@ -104,7 +99,7 @@ private: result DrawTitle(Tizen::Graphics::Canvas& canvas); result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, _DateTimeId boxId = DATETIME_ID_NONE); result DrawContentBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, _DateTimeId displayBoxId); - result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false); _DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const; private: @@ -149,6 +144,7 @@ private: static const int __dividerCount = 2; bool __isEnterKeyPressed; bool __isFocused; + int __transactionId; }; // _EditDatePresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditFieldImpl.h b/src/ui/inc/FUiCtrl_EditFieldImpl.h old mode 100755 new mode 100644 diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h old mode 100755 new mode 100644 index 5b0b1de..49a16ce --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -45,8 +45,6 @@ namespace Tizen { namespace Ui { namespace Controls { const int EDIT_SCROLLFRAME_MAX = 5; const int EDIT_PASSWORD_BUFFER_MAX = 1024; -const int SCROLL_STYLE_VERTICAL = 2; -const int ANIMATION_DURATION = 333; enum _EditFooterVisibleStatus { @@ -98,17 +96,6 @@ class _Frame; class _Scroll; class _ScrollPanel; -class _EditAnimationProvider - : public Tizen::Ui::Animations::VisualElementAnimationProvider -{ -public: - _EditAnimationProvider(void); - - virtual ~_EditAnimationProvider(void); - - virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& source, const Tizen::Base::String& property); -}; // _EditAnimationProvider - class _EditPresenter : public Tizen::Base::Object @@ -141,7 +128,7 @@ public: virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem); virtual result SetInitialBounds(void); - virtual result Draw(Tizen::Graphics::Canvas& canvas); + virtual result Draw(void); virtual result DrawCursor(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::FloatRectangle& cursorRect, bool isCursorOpaque); virtual result DrawScrollBar(void); virtual void ChangeToUnbindState(bool removeFocus); @@ -274,8 +261,8 @@ public: result AppendCharacter(const Tizen::Base::Character& character); result AppendText(const Tizen::Base::String& text); result BeginTextBlock(void); - result CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorBounds); - result CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds); + result CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorBounds, bool clipCursorHeight = true); + result CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds, bool clipCursorHeight = true); virtual result ChangeLayout(_ControlOrientation orientation); virtual result ChangeLayout(_ControlRotation rotation); result ClearText(void); @@ -309,6 +296,7 @@ public: Tizen::Graphics::_Text::TextObject* GetTextObject(void) const; EditStatus GetCurrentStatus(void); result ScrollContents(float moveY); + result ScrollContentsOnKey(const Tizen::Ui::_KeyCode keyCode); virtual void DrawText(void); void DrawTextBlockLine(Canvas& canvas); virtual bool IsGuideTextActivated(void) const; @@ -346,7 +334,21 @@ public: result SetPasswordVisible(bool visible); bool IsPasswordVisible(void) const; bool IsClearIconPressed(void) const; - result DrawFocusRing(Tizen::Graphics::Canvas& canvas); + virtual result DrawFocusRing(Tizen::Graphics::Canvas& canvas); + void DrawDragAndDropVisualCue(void); + void ResetDragAndDrop(void); + bool IsDragAndDropStarted(void) const; + + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + + virtual _Window* OnDragAndDropBeginning(void); + virtual void OnDragAndDropDropping(void); + + virtual void OnDragAndDropEntered(void); + virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position); + virtual void OnDragAndDropLeft(void); + virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem); protected: void StopTitleSlidingTimer(void); @@ -380,6 +382,8 @@ protected: _Scroll* GetScrollBar(void) const; _Edit* GetEditView(void) const; bool AdjustRTLTextAlignment(const _EditTextType textType); + void RestoreCopyPasteManager(void); + bool IsHorizontalDirection(const _TouchInfo& touchInfo); private: virtual void OnEditCopyPasteStatusChanged(CoreCopyPasteStatus status, CoreCopyPasteAction action); @@ -399,6 +403,7 @@ private: void InitializeParentPanel(void); result InitializeEditFieldClientRect(void); result SetInitialEditFieldBounds(void); + result AdjustTextBounds(bool clearIconVisible); virtual result AdjustFlexibleHeight(void); result SetKeypadCommandButton(const Tizen::Graphics::FloatRectangle& bounds); result SetTitleTextSlidingAction(Tizen::Graphics::_Text::TextObjectActionType action); @@ -420,7 +425,6 @@ private: result DrawTextForEntireFontSetting(Tizen::Graphics::Canvas& canvas); result DrawTitleText(void); result MoveCursor(const Tizen::Graphics::FloatRectangle& fromRect, const Tizen::Graphics::FloatRectangle& toRect); - bool IsHorizontalDirection(const _TouchInfo& touchInfo); result ScrollContentsOnFlick(void); result ChangePasswordToEchoCharacter(wchar_t* dspStrBuffer, wchar_t echoChar); // todo : move to PastePasswordEchoCharacter @@ -483,6 +487,7 @@ private: Tizen::Graphics::Font* __pFont; Tizen::Ui::Animations::_VisualElement* __pCursorVisualElement; + Tizen::Ui::Animations::_VisualElement* __pDragAndDropCueVisualElement; Tizen::Ui::Animations::_VisualElement* __pTextVisualElement; Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement; @@ -536,6 +541,7 @@ private: bool __isTouchMoving; bool __isTouchPressed; bool __isClearIconPressed; + bool __isClearIconVisible; bool __isCursorOpaque; bool __isTouchReleaseSkipped; bool __isViewerModeEnabled; @@ -571,8 +577,6 @@ private: _EditTextStatus __ContentTextStatus; - _EditAnimationProvider* __pEditVEDelegator; - bool __isAutoShrinkEnabled; GroupStyle __groupStyle; @@ -597,7 +601,9 @@ private: bool __isPasswordVisible; bool __needToCreateCopyPastePopup; FloatRectangle __calculatedCursorBounds; - + bool __dragAndDropStarted; + Tizen::Base::String __dragAndDropString; + bool __isTouchLongPressed; }; // _EditPresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditTime.h b/src/ui/inc/FUiCtrl_EditTime.h index a444ac2..8e5a076 100644 --- a/src/ui/inc/FUiCtrl_EditTime.h +++ b/src/ui/inc/FUiCtrl_EditTime.h @@ -26,13 +26,16 @@ #define _FUI_CTRL_INTERNAL_EDITTIME_H_ #include +#include #include "FUi_Control.h" #include "FUi_UiTouchEvent.h" +#include "FUi_IAccessibilityListener.h" #include "FUiCtrl_IDateTimeChangeEventListener.h" #include "FUiCtrl_DateTimeChangeEvent.h" #include "FUiCtrl_IActionEventListener.h" -#include "FUi_IAccessibilityListener.h" #include "FUiCtrl_DateTimeBar.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_ScrollPanelEvent.h" namespace Tizen { namespace Ui { @@ -48,9 +51,11 @@ class _OSP_EXPORT_ _EditTime , public _IDateTimeChangeEventListener , public _IActionEventListener , public _IAccessibilityListener + , public Tizen::Ui::Animations::IAnimationTransactionEventListener , virtual public Tizen::Base::Runtime::IEventListener , virtual public _IUiEventListener , virtual public _IUiEventPreviewer + , public _IScrollEventListener , virtual public Tizen::System::ISettingEventListener { @@ -145,6 +150,19 @@ public: virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); + + // Tizen::Ui::Animations::IAnimationTransactionEventListener + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + + void InitializeParentPanel(void); + + //_ScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {}; + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + private: _EditTime(void); @@ -168,6 +186,8 @@ private: bool __isCalledBoundsChanged; bool __isXmlBoundsExist; static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f; + _ScrollPanel* __pParentPanel; + bool __isEnterKeyPressed; }; // _EditTime }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_EditTimePresenter.h b/src/ui/inc/FUiCtrl_EditTimePresenter.h index b5e94b3..e6b515b 100644 --- a/src/ui/inc/FUiCtrl_EditTimePresenter.h +++ b/src/ui/inc/FUiCtrl_EditTimePresenter.h @@ -28,7 +28,6 @@ #include #include "FUi_Control.h" #include "FUiCtrl_DateTimeDefine.h" -#include "FUiAnimIVisualElementAnimationStatusEventListener.h" namespace Tizen { namespace Ui { namespace Controls { @@ -38,7 +37,6 @@ class _DateTimeModel; class _EditTimePresenter : public Tizen::Base::Object - , Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener { public: _EditTimePresenter(const Tizen::Base::String& title); @@ -76,7 +74,7 @@ public: bool OnFocusLost(const _Control& source); void OnFocusModeStateChanged(void); bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); - bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + bool OnKeyReleased(const _Control& source, const _KeyCode& 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); @@ -89,11 +87,10 @@ public: void UpdateTimeFormat(void); void UpdateLastSelectedValue(_DateTimeId boxId, bool __isTouchPressed); - virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally); - virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){} - virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){} result DrawFocus(void); + void EndTransaction(void); + private: _EditTimePresenter(const _EditTimePresenter&); @@ -109,7 +106,7 @@ private: result DrawColon(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds); _DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const; result LoadResource(void); - result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false); float GetTimeElementWidth(void) const; private: @@ -166,6 +163,7 @@ private: bool __isEditTimeInitialized; bool __isEnterKeyPressed; bool __isFocused; + int __transactionId; }; // _EditTimePresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_FastScrollPresenter.h b/src/ui/inc/FUiCtrl_FastScrollPresenter.h index 4ff0999..0e0cef6 100644 --- a/src/ui/inc/FUiCtrl_FastScrollPresenter.h +++ b/src/ui/inc/FUiCtrl_FastScrollPresenter.h @@ -85,7 +85,7 @@ private: Tizen::Graphics::Color __popupBgColor; Tizen::Graphics::Color __popupTextColor; - Tizen::Graphics::Dimension __indexSizeMin; + Tizen::Graphics::FloatDimension __indexSizeMin; Tizen::Graphics::FloatDimension __popupSize; float __indexMarginTop; diff --git a/src/ui/inc/FUiCtrl_FlickAnimation.h b/src/ui/inc/FUiCtrl_FlickAnimation.h index 079e5d9..43c59dc 100644 --- a/src/ui/inc/FUiCtrl_FlickAnimation.h +++ b/src/ui/inc/FUiCtrl_FlickAnimation.h @@ -27,10 +27,6 @@ const int DEVICE_SIZE_HORIZONTAL = 56; // LCD Width (mm) const int DEVICE_SIZE_VERTICAL = 93; // LCD Hight (mm) -const int FLICK_ANIMATION_FPS_LIST = 300; // List FPS -const int FLICK_ANIMATION_SENSITIVITY_LIST = 150; // List Animation Sensitivity -const int FLICK_ANIMATION_FPS_ICONLIST = 60; // IconList FPS -const int FLICK_ANIMATION_SENSITIVITY_ICONLIST = 30;// IconList Animation Sensitivity const int FLICK_ANIMATION_FPS_PANEL = 30; // Panel FPS const int FLICK_ANIMATION_SENSITIVITY_PANEL = 30; // Panel Animation Sensitivity diff --git a/src/ui/inc/FUiCtrl_FooterImpl.h b/src/ui/inc/FUiCtrl_FooterImpl.h index 1d2ce55..5a3d712 100644 --- a/src/ui/inc/FUiCtrl_FooterImpl.h +++ b/src/ui/inc/FUiCtrl_FooterImpl.h @@ -37,12 +37,8 @@ namespace Tizen { namespace Ui { namespace Controls class _PublicActionEvent; const int FOOTER_MAX_STATE_COUNT = 7; -const int FOOTER_BUTTON_MAX_STATE_COUNT = 4; const int FOOTER_MAX_ITEM_COUNT_WITH_BUTTON = 3; -const int FOOTER_BUTTON_MAX_COUNT = 3; -const int FOOTER_ITEM_MAX_COUNT = 15; const int FOOTER_ACTION_ID_MIN = 0; -const int FOOTER_ACTION_ID_MAX = INT_MAX; const int FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999; class _FooterImpl @@ -169,6 +165,8 @@ public: private: result CheckItemValidate(const FooterItem& item); + result CheckItemExceed(const FooterItem& item); + _Button* ConvertButtonItem(const ButtonItem& buttonItem); _Button* ConvertFooterItem(const FooterItem& footerItem); diff --git a/src/ui/inc/FUiCtrl_FooterItemImpl.h b/src/ui/inc/FUiCtrl_FooterItemImpl.h index b59d528..a77d2e7 100644 --- a/src/ui/inc/FUiCtrl_FooterItemImpl.h +++ b/src/ui/inc/FUiCtrl_FooterItemImpl.h @@ -32,7 +32,6 @@ namespace Tizen { namespace Ui { namespace Controls { static const int FOOTER_ITEM_ACTION_ID_MIN = 0; -static const int FOOTER_ITEM_ACTION_ID_MAX = INT_MAX; static const int FOOTER_ITEM_MAX_STATE_COUNT = 5; class _FooterItemImpl diff --git a/src/ui/inc/FUiCtrl_Form.h b/src/ui/inc/FUiCtrl_Form.h index 795b73d..aa8af3b 100644 --- a/src/ui/inc/FUiCtrl_Form.h +++ b/src/ui/inc/FUiCtrl_Form.h @@ -188,9 +188,6 @@ public: void SetIndicatorAutoHide(bool portrait, bool landscape); result SetIndicatorOpacity(_IndicatorOpacity opacity); - virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); @@ -220,6 +217,9 @@ public: void SetFormOrientationStatusEventListener(Tizen::Ui::Controls::_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener); Tizen::Ui::OrientationStatus GetFormOrientationStatus(void) const; + void ActivateIndicator(void); + void DeactivateIndicator(void); + //callback virtual void OnDraw(void); virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); @@ -227,7 +227,8 @@ public: virtual void OnBoundsChanged(void); virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); virtual void OnVisibleStateChanged(void); - void OnFormActivated(void); + virtual void OnFormActivated(void); + virtual void OnFormDeactivated(void); // Focus UI Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const; @@ -239,6 +240,8 @@ public: _Control* GetFocusControl(void) const; void SetFocusControl(const _Control* pControl); + void SetPartialScreenEnabled(bool enable); + // Accessor protected: result SetPresenter(const _FormPresenter& formPresenter); @@ -259,6 +262,7 @@ private: _IFormMenuEventListener* __pFormMenuEventListener; unsigned long __formStyle; + unsigned long __oldFormStyle; _ActionEvent* __pActionEvent; _Toolbar* __pHeader; @@ -327,4 +331,4 @@ private: }}} // Tizen::Ui::Controls -#endif // _FUI_CTRL_INTERNAL_FORM_H_ +#endif // _FUI_CTRL_INTERNAL_FORM_H_ \ No newline at end of file diff --git a/src/ui/inc/FUiCtrl_Frame.h b/src/ui/inc/FUiCtrl_Frame.h index 9fdccf4..ba41822 100644 --- a/src/ui/inc/FUiCtrl_Frame.h +++ b/src/ui/inc/FUiCtrl_Frame.h @@ -34,6 +34,14 @@ class _IFrameEventListener; class _IFormActivationChangeEventListener; class _Form; +enum _FormStatus +{ + _FORM_STATUS_ACTIVATING = 0, + _FORM_STATUS_DEACTIVATING, + _FORM_STATUS_ACTIVATED, + _FORM_STATUS_DEACTIVATED, +}; + /** * @class _Frame * @brief @@ -54,6 +62,8 @@ public: // Callbacks virtual void OnDraw(void); virtual void OnActivated(void); + virtual void OnDeactivated(void); + virtual void OnChildAttaching(const Tizen::Ui::_Control& child); virtual void OnChildAttached(const Tizen::Ui::_Control& child); virtual void OnChildDetached(const Tizen::Ui::_Control& child); virtual bool OnNotifiedN(const Tizen::Ui::_Control& source, Tizen::Base::Collection::IList* pArgs); @@ -76,7 +86,8 @@ public: // Event listeners void AddFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener); void RemoveFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener); - void SetFormActivationChangeEventListener(const Tizen::Ui::Controls::_IFormActivationChangeEventListener* plistener); + result AddFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener); + result RemoveFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener); // Floating void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect); @@ -99,6 +110,7 @@ public: // Internal void SetChangingBoundsEnabled(bool enable); + void SetPartialScreenEnabled(bool enable); protected: result SetPresenter(const _FramePresenter& framePresenter); @@ -108,6 +120,9 @@ private: _Frame(const _Frame&); _Frame& operator =(const _Frame&); + virtual bool IsChildAttachable(_Control& child) const; + result FireFormActivationChangeEvent(_Form* pForm, _FormStatus status); + // Attribute private: _FramePresenter* __pFramePresenter; @@ -121,7 +136,8 @@ private: bool __constructed; bool __rotation; bool __changingBoundsEnabled; - _IFormActivationChangeEventListener* __pFormActivationChangeEventListener; + bool __skipSetBounds; + Tizen::Base::Collection::LinkedListT * __pFormActivationChangeEventListeners; }; // _Frame }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_Gallery.h b/src/ui/inc/FUiCtrl_Gallery.h index a8ba6e3..255fc94 100644 --- a/src/ui/inc/FUiCtrl_Gallery.h +++ b/src/ui/inc/FUiCtrl_Gallery.h @@ -143,6 +143,10 @@ public: virtual void OnSettingChanged(Tizen::Base::String& key); + virtual bool OnFocusGained(const _Control& source); + virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusLost(const _Control& source); + private: _Gallery(void); result Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor); diff --git a/src/ui/inc/FUiCtrl_GroupedListViewImpl.h b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h index e87cd80..c3cd48b 100644 --- a/src/ui/inc/FUiCtrl_GroupedListViewImpl.h +++ b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h @@ -128,7 +128,7 @@ public: result RefreshList(int groupIndex, int itemIndex, int elementId); - result UpdateList(void); + result UpdateList(bool isRestoreAnnexFocusValue = false); result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; @@ -282,6 +282,7 @@ private: bool __redrawListView; bool __isOrientationChanged; + bool __isUpdateListCalled; bool __needReloadItems; class _GroupedListViewPropagatedTouchEventListener; diff --git a/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h index 28fe906..1bf5576 100644 --- a/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h +++ b/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h @@ -101,6 +101,8 @@ private: void SetItemLazyDeletion(_ListViewItem* pItem); + _IListItemCommon* GetDefaultItem(void); + // Variable private: IGroupedListViewItemProvider* __pGroupedListViewProvider; @@ -117,6 +119,8 @@ private: _ListViewItem* __pItemNeedsLazyDeletion; _ListViewItem* __pLazyDeletionItem; bool __usingFloatingPoint; + + _IListItemCommon* __pDefaultItem; }; // _GroupedListViewItemProviderAdaptor }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_HeaderImpl.h b/src/ui/inc/FUiCtrl_HeaderImpl.h index 4947346..54f1cb1 100644 --- a/src/ui/inc/FUiCtrl_HeaderImpl.h +++ b/src/ui/inc/FUiCtrl_HeaderImpl.h @@ -36,15 +36,11 @@ namespace Tizen { namespace Ui { namespace Controls class _PublicActionEvent; const int HEADER_MAX_ITEM_COUNT_WITH_BUTTON = 3; -const int HEADER_BUTTON_MAX_COUNT = 2; const int HEADER_ITEM_MAX_COUNT = 4; -const int HEADER_MAX_WAITING_ANIMATION_POSITION = 3; const int HEADER_TITLE_BUTTON_STYLE_MAX_ITEM_COUNT = 1; const int HEADER_TAB_STYLE_MAX_ITEM_COUNT = 15; const int HEADER_ACTION_ID_MIN = 0; -const int HEADER_ACTION_ID_MAX = INT_MAX; const int HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999; -const int HEADER_MORE_BUTTON_ACTION_ID = 500; class _HeaderImpl : public _ControlImpl @@ -200,6 +196,8 @@ public: private: result CheckItemValidate(const HeaderItem& item); + result CheckItemExceed(const HeaderItem& item); + ToolbarStyle ConvertHeaderStyle(HeaderStyle style); _Button* ConvertButtonItem(const ButtonItem& buttonItem); diff --git a/src/ui/inc/FUiCtrl_HeaderItemImpl.h b/src/ui/inc/FUiCtrl_HeaderItemImpl.h index f39ef26..76d2f04 100644 --- a/src/ui/inc/FUiCtrl_HeaderItemImpl.h +++ b/src/ui/inc/FUiCtrl_HeaderItemImpl.h @@ -32,7 +32,6 @@ namespace Tizen { namespace Ui { namespace Controls { static const int HEADER_ITEM_ACTION_ID_MIN = 0; -static const int HEADER_ITEM_ACTION_ID_MAX = INT_MAX; static const int HEADER_ITEM_MAX_STATE_COUNT = 5; class _HeaderItemImpl diff --git a/src/ui/inc/FUiCtrl_IContextMenuPresenter.h b/src/ui/inc/FUiCtrl_IContextMenuPresenter.h index 503ebe3..e76b5e8 100644 --- a/src/ui/inc/FUiCtrl_IContextMenuPresenter.h +++ b/src/ui/inc/FUiCtrl_IContextMenuPresenter.h @@ -94,6 +94,10 @@ public: virtual bool IsChildControlFocusManage(void) const { return false; }; virtual void OnDrawFocus(void) {}; virtual void OnFocusModeStateChanged(void) {}; + virtual bool OnFocusGained(const _Control& source){return true;} + virtual bool OnFocusLost(const _Control& source){return true;} + + virtual void CalculateItemMaximumWidth(void) {}; virtual void OnFontChanged(Tizen::Graphics::Font* pFont) = 0; virtual void OnFontInfoRequested(unsigned long& style, float& size) = 0; @@ -103,7 +107,7 @@ public: virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) = 0; virtual _ContextMenuItemInfo FindItem(int index) = 0; virtual result SetTopDrawnItemIndex(int index) = 0; - virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap) = 0; + virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false) = 0; }; //_IContextMenuPresenter } // Control diff --git a/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h b/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h index 3c73d2c..ede0498 100644 --- a/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h +++ b/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h @@ -38,11 +38,11 @@ class _FormImpl; * @brief This interface implements the listener for the form activation chage event. * @since 2.0 * - * The listener interface for receiving form activation chage event. + * The listener interface for receiving form activation change event. * */ class _IFormActivationChangeEventListener - : public Tizen::Base::Runtime::IEventListener + : virtual public Tizen::Base::Runtime::IEventListener { public: /** @@ -55,6 +55,8 @@ public: virtual void OnFormActivated(const Tizen::Ui::Controls::_Form& source) = 0; virtual void OnFormDeactivated(const Tizen::Ui::Controls::_Form& source) = 0; + virtual void OnFormActivating(const Tizen::Ui::Controls::_Form& source) = 0; + virtual void OnFormDeactivating(const Tizen::Ui::Controls::_Form& source) = 0; }; // _IFormActivationChangeEventListener diff --git a/src/ui/inc/FUiCtrl_IconListItem.h b/src/ui/inc/FUiCtrl_IconListItem.h index 30a9d61..a5cb144 100644 --- a/src/ui/inc/FUiCtrl_IconListItem.h +++ b/src/ui/inc/FUiCtrl_IconListItem.h @@ -69,7 +69,7 @@ public: static _IconListItem* CreateIconListItemN(IconListViewItem* pIconListViewItem); // _ListItemCommon - virtual bool DrawItem(Tizen::Graphics::FloatRectangle& rect, ListItemState isFocused, int itemIndex = -1); + virtual bool DrawItem(Tizen::Graphics::FloatRectangle& rect, ListItemState isFocused, int itemIndex = -1, bool overwriteItemBG = false); virtual void SetChecked(bool checked); virtual void SetItemIndex(int groupIndex, int itemIndex); virtual void GetItemIndex(int& groupIndex, int& itemIndex) const; diff --git a/src/ui/inc/FUiCtrl_IconListPresenter.h b/src/ui/inc/FUiCtrl_IconListPresenter.h index 50f5265..b93d51e 100644 --- a/src/ui/inc/FUiCtrl_IconListPresenter.h +++ b/src/ui/inc/FUiCtrl_IconListPresenter.h @@ -199,6 +199,7 @@ public: virtual void OnFontChanged(Tizen::Graphics::Font* pFont); virtual void OnFocusModeStateChanged(void); virtual void OnDrawFocus(void); + virtual void OnFocusLost(void); Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); // Tizen::Ui::_IKeyEventPreviewer @@ -364,6 +365,8 @@ private: void DrawFocusUi(int focusUiIndex); bool SetFocusUiIndexVerticalScrollList(const _KeyInfo& keyInfo); bool SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo); + + void ChangeScrollBarVisibility(float viewRange, float scrollRange); // Attribute private: static const int DEFAULT_GROUP_INDEX = 0; diff --git a/src/ui/inc/FUiCtrl_IconListView.h b/src/ui/inc/FUiCtrl_IconListView.h index 88b6b04..78f86cc 100644 --- a/src/ui/inc/FUiCtrl_IconListView.h +++ b/src/ui/inc/FUiCtrl_IconListView.h @@ -153,6 +153,8 @@ public: result SetScrollStyle(IconListViewScrollStyle scrollStyle); + IconListViewScrollStyle GetScrollStyle(void) const; + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); const Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; @@ -313,6 +315,7 @@ public: virtual void OnFontChanged(Tizen::Graphics::Font* pFont); virtual void OnFocusModeStateChanged(void); virtual void OnDrawFocus(void); + virtual bool OnFocusLost(const _Control& source); virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); // Tizen::Ui::_IKeyEventListenerPreviewer diff --git a/src/ui/inc/FUiCtrl_Indicator.h b/src/ui/inc/FUiCtrl_Indicator.h index 4890b65..120d71a 100644 --- a/src/ui/inc/FUiCtrl_Indicator.h +++ b/src/ui/inc/FUiCtrl_Indicator.h @@ -24,9 +24,11 @@ #define _FUI_CTRL_INTERNAL_INDICATOR_H_ #include +#include #include "FUi_Control.h" #include "FUi_EcoreEvas.h" #include "FUiAnim_ControlVisualElement.h" +#include "FUi_ITouchEventListener.h" namespace Tizen { namespace Ui { namespace Animations { @@ -44,6 +46,8 @@ namespace Tizen { namespace Ui { namespace Controls class _Indicator : public Tizen::Ui::Animations::_ControlVisualElement , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::_ITouchEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener { public: _Indicator(void); @@ -70,14 +74,30 @@ public: void SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation); void SetWindow(Tizen::Ui::_Window* pWindow); + result ShowIndicatorEffect(bool down, int duration); + void RemoveIndicatorAnimations(void); + + void Activate(void); + void Deactivate(void); + void OnChangeLayout(_ControlOrientation orientation); result OnAttachedToMainTree(void); virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); static void OnDisconnected(Ecore_Evas *pEe); static void OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size); + static Eina_Bool OnClientMessageReceived(void* pData, int type, void* pEvent); virtual Animations::HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point); + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target); + virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount); + virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally); + private: _Indicator(const _Indicator& value); _Indicator& operator =(const _Indicator& value); @@ -86,6 +106,7 @@ private: Evas_Object* __pPortraitIndicatorEvasObject; Evas_Object* __pLandscapeIndicatorEvasObject; Tizen::Base::Runtime::Timer* __pConnectionTimer; + Tizen::Base::Runtime::Timer* __pAnimationTimer; Tizen::Ui::Animations::_VisualElement* __pPortraitVisualElement; Tizen::Ui::Animations::_VisualElement* __pLandscapeVisualElement; Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement; @@ -95,7 +116,13 @@ private: bool __landscapeautohide; _IndicatorOpacity __opacity; Tizen::Ui::_ControlOrientation __orientation; + Tizen::Graphics::FloatPoint __startTouchPoint; + bool __animating; + bool __touchPressed; + int __pointId; + int __quickpanelOpened; + Ecore_Event_Handler* __pClientMessageReceived; }; // _Indicator }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_Keypad.h b/src/ui/inc/FUiCtrl_Keypad.h index 41ddf22..658330a 100644 --- a/src/ui/inc/FUiCtrl_Keypad.h +++ b/src/ui/inc/FUiCtrl_Keypad.h @@ -112,6 +112,9 @@ public: virtual bool IsLayoutChangable(void) const; + virtual void OnActivated(void); + virtual void OnDeactivated(void); + private: _Keypad(void); _Keypad(const _Keypad&); diff --git a/src/ui/inc/FUiCtrl_Label.h b/src/ui/inc/FUiCtrl_Label.h index f737138..f623b09 100644 --- a/src/ui/inc/FUiCtrl_Label.h +++ b/src/ui/inc/FUiCtrl_Label.h @@ -123,6 +123,9 @@ public: float GetRightMarginF(void) const; float GetBottomMarginF(void) const; + int GetTextExtentSize(void) const; + float GetTextExtentSizeF(void) const; + Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const; protected: diff --git a/src/ui/inc/FUiCtrl_ListViewImpl.h b/src/ui/inc/FUiCtrl_ListViewImpl.h index 72a9934..15abe4b 100644 --- a/src/ui/inc/FUiCtrl_ListViewImpl.h +++ b/src/ui/inc/FUiCtrl_ListViewImpl.h @@ -125,7 +125,7 @@ public: result RefreshList(int index, int elementId); - result UpdateList(void); + result UpdateList(bool isRestoreAnnexFocusValue = false); int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; @@ -261,6 +261,7 @@ private: bool __redrawListView; bool __isOrientationChanged; + bool __isUpdateListCalled; bool __needReloadItems; class _ListViewPropagatedTouchEventListener; diff --git a/src/ui/inc/FUiCtrl_ListViewItem.h b/src/ui/inc/FUiCtrl_ListViewItem.h index 8e34b11..386d152 100644 --- a/src/ui/inc/FUiCtrl_ListViewItem.h +++ b/src/ui/inc/FUiCtrl_ListViewItem.h @@ -238,6 +238,9 @@ public: // Timer Callback API void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + //TextSlide + virtual void ResetTextSlide(void); + private: _ListViewItem(const _ListViewItem& rhs); @@ -280,8 +283,6 @@ private: void OnTextSlideTimerExpired(void); - void ResetTextSlide(void); - // UiLink bool ParseCutlinkText(_ListViewItemElementText* pText); @@ -292,11 +293,12 @@ private: bool ResetCutlinkFocus(void); virtual void SetAccessibilityElement(void); + virtual Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void); virtual void SetAccessibilityElementLabel(void); virtual void SetAccessibilityElementTrait(void); virtual void SetAccessibilityElementValue(void); - + private: static const int TEXT_SLIDING_TIMER_DURATION = 60; diff --git a/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h index 709f926..2ed5ef4 100644 --- a/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h +++ b/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h @@ -88,6 +88,8 @@ private: void SetItemLazyDeletion(_ListViewItem* pItem); + _IListItemCommon* GetDefaultItem(void); + // Variable private: IListViewItemProvider* __pListViewProvider; @@ -101,6 +103,7 @@ private: _ListViewItem* __pItemNeedsLazyDeletion; _ListViewItem* __pLazyDeletionItem; bool __usingFloatingPoint; + _IListItemCommon* __pDefaultItem; }; // _ListViewItemProviderAdaptor }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_OptionMenu.h b/src/ui/inc/FUiCtrl_OptionMenu.h index 7dc760b..747ae76 100644 --- a/src/ui/inc/FUiCtrl_OptionMenu.h +++ b/src/ui/inc/FUiCtrl_OptionMenu.h @@ -25,12 +25,12 @@ #include #include +#include #include "FUi_Window.h" #include "FUiCtrl_OptionMenuPresenter.h" #include "FUiCtrl_ActionEvent.h" #include "FUiCtrl_IActionEventListener.h" #include "FUiCtrl_IFrameEventListener.h" - #include "FUiCtrl_ScrollPanel.h" namespace Tizen { namespace Ui { @@ -72,6 +72,7 @@ class _OSP_EXPORT_ _OptionMenu , virtual public _IUiEventPreviewer , public _IAccessibilityListener , virtual public _IFrameEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener { DECLARE_CLASS_BEGIN(_OptionMenu, _Control); DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); @@ -114,6 +115,9 @@ public: static _OptionMenu* CreateOptionMenuN(void); public: + void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally); + void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){}; + void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){}; result Install(void); result Initialize(void); result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); @@ -174,6 +178,8 @@ public: virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + void CloseAnimation(int actionID); + void OpenAnimation(); virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); @@ -202,6 +208,7 @@ public: Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(const int mainIndex) const; void AddAccessibilityElement(const _AccessibilityElement& element); + void SetAllAccessibilityElement(void); _OptionMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const; _OptionMenuItemInfo FindItem(int index) const; @@ -214,7 +221,7 @@ public: virtual bool OnFocusGained(const _Control& source); virtual bool OnFocusLost(const _Control& source); virtual void OnDrawFocus(void); - virtual void OnFocusModeStateChanged(void); + virtual void ResetFocus(void); protected: result SetPresenter(const _OptionMenuPresenter& OptionMenuPresenter); @@ -222,7 +229,6 @@ protected: private: result LoadBitmap(void); result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color); - void SetAllAccessibilityElement(void); void RemoveAllAccessibilityElement(void); _OptionMenu(const _OptionMenu& rhs); @@ -235,6 +241,13 @@ private: bool __isMaxVisibleCountSet; bool __isFocused; int __currentFocusedIndex; + int __selectedActionID; + bool __isAnimating; + + static const int ANIMATION_DURATION = 333; + + Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pBoundsTimingFunction; + Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pOpacityTimingFunction; // attribute for position fo the window Tizen::Graphics::FloatRectangle __windowRect; // OptionMenu window in the whole screen area diff --git a/src/ui/inc/FUiCtrl_OptionMenuItem.h b/src/ui/inc/FUiCtrl_OptionMenuItem.h old mode 100755 new mode 100644 index 06fe7d6..b5a9df7 --- a/src/ui/inc/FUiCtrl_OptionMenuItem.h +++ b/src/ui/inc/FUiCtrl_OptionMenuItem.h @@ -98,6 +98,8 @@ public: result SetBitmap(OptionMenuItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); const Tizen::Graphics::Bitmap* GetBitmap(OptionMenuItemDrawingStatus status) const; + void SetPressedItemColor(Tizen::Graphics::Color color); + void SetSize(Tizen::Graphics::FloatDimension size); Tizen::Graphics::FloatDimension GetSize(void) const; @@ -118,7 +120,6 @@ public: int Release(void); void SetAndInvalidate(bool flag); - const Tizen::Graphics::Bitmap* GetMagentaBgBitmap(void) const; virtual void OnBoundsChanged(void); // draw @@ -181,7 +182,8 @@ private: float __textSize; Tizen::Base::String __text; Tizen::Graphics::Bitmap* __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_MAX]; - Tizen::Graphics::Bitmap* __pMagentaBgBitmap; + Tizen::Graphics::Bitmap* __pNormalBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedBgBitmap; Tizen::Graphics::Bitmap* __pArrowBitmap; Tizen::Graphics::Bitmap* __pArrowPressedBitmap; Tizen::Graphics::FloatDimension __size; diff --git a/src/ui/inc/FUiCtrl_OptionMenuModel.h b/src/ui/inc/FUiCtrl_OptionMenuModel.h old mode 100755 new mode 100644 diff --git a/src/ui/inc/FUiCtrl_OptionMenuPresenter.h b/src/ui/inc/FUiCtrl_OptionMenuPresenter.h index 155a58a..509a3f2 100644 --- a/src/ui/inc/FUiCtrl_OptionMenuPresenter.h +++ b/src/ui/inc/FUiCtrl_OptionMenuPresenter.h @@ -27,13 +27,15 @@ #include #include #include +#include +#include #include #include #include "FUi_Control.h" +#include "FUiAnim_VisualElement.h" #include "FUiCtrl_OptionMenu.h" #include "FUiCtrl_OptionMenuModel.h" -#include "FUiAnim_VisualElement.h" namespace Tizen { namespace Ui { namespace Controls { @@ -43,6 +45,20 @@ class _OptionMenuModel; class _OptionMenuItem; class _ListItem; +class SineThirtyThreeTimingFunction + : public Tizen::Ui::Animations::IVisualElementAnimationTimingFunction +{ +public: + float CalculateProgress(float timeProgress) const; +}; // SineTimingFunction + +class SineSixtyTimingFunction + : public Tizen::Ui::Animations::IVisualElementAnimationTimingFunction +{ +public: + float CalculateProgress(float timeProgress) const; +}; // SineTimingFunction + struct _OptionMenuItemInfo { bool bListItem; @@ -123,7 +139,7 @@ private: void AdjustItemPosition(void); Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void); - _OptionMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, + _OptionMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool isSubItem = false); int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; diff --git a/src/ui/inc/FUiCtrl_OverlayAgent.h b/src/ui/inc/FUiCtrl_OverlayAgent.h index 1443c2e..69dd11c 100644 --- a/src/ui/inc/FUiCtrl_OverlayAgent.h +++ b/src/ui/inc/FUiCtrl_OverlayAgent.h @@ -25,6 +25,7 @@ #ifndef _FUI_INTERNAL_OVERLAY_AGENT_H_ #define _FUI_INTERNAL_OVERLAY_AGENT_H_ +#define _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER #include #include @@ -48,6 +49,11 @@ class VisualElementSurface; namespace Tizen { namespace Ui { namespace Controls { +static const int _OVERLAY_AGENT_PIXMAP_MAX = 3; +typedef unsigned int (*GetPixmapCallback)(void *userData); +typedef void (*GetPixmapErrorCallback)(unsigned int* pPixmap, void* userData); + +class _OverlayAgent; enum OverlayAgentEvaluationOption { @@ -92,17 +98,45 @@ enum _OverlayAgentStyle _OVERLAY_AGENT_STYLE_PANEL_GL }; +enum _PixmapState +{ + _PIXMAP_STATE_FREE = 0, + _PIXMAP_STATE_DEQUEUE = 1, + _PIXMAP_STATE_ENQUEUE, +}; + +struct _OverlayAgentPixmap +{ + Pixmap __nativePixmap; + long long __timeStamp; + _PixmapState __pixmapState; +}; + +typedef struct +{ + int __displayMode; + Tizen::Graphics::Rectangle __displayBounds; +}_UserProperties; + +typedef struct +{ + _UserProperties __userProperties; + void* __pInstance; + GetPixmapCallback __pPixmapCallback; + GetPixmapErrorCallback __pPixmapErrorCallback; +}_UserData; + class _OverlayAgent { public: static _OverlayAgent* CreateInstanceN(_OverlayAgentStyle style, const _Control& parentControl, const Tizen::Graphics::FloatRectangle& logicalBounds, const Tizen::Graphics::Rectangle& physicalBounds); ~_OverlayAgent(void); - result CreatePixmap(const Tizen::Graphics::Rectangle& physicalBounds); + result CreatePixmap(const Tizen::Graphics::Rectangle& physicalBounds, int pixmapIndex = 0); + result CreateAdditionalPixmap(void); void UngrabXvPort(void); result Draw(void); - Pixmap GetPixmap(void) const; Evas_Object* GetRendererImageObject(void) const; Tizen::Graphics::FloatRectangle GetBounds(void) const; @@ -112,10 +146,14 @@ public: result SetRotation(_OverlayAgentRotation rotation); result SetDestination(const Tizen::Graphics::FloatDimension& dimension); result SetAspectRatio(bool enable); - result SetRendererFlushNeeded(void); - + result SetRendererFlushNeeded(unsigned int index); bool IsValidDestinationDimension(const Tizen::Graphics::FloatDimension& dimension) const; + void SetBufferFree(int index); + Pixmap GetPixmap(int index) const; + unsigned int GetFreeBuffer(void); + static unsigned int GetFreeBuffer(void* userData); + static void PixmapErrorCallback(unsigned int* pPixmap, void* userData); // static utilities static result EvaluateBounds(OverlayAgentEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified); @@ -140,10 +178,14 @@ private: result PutXvImage(void); result PutEvasImage(void); + int FindFreeBuffer(void); static int GetValueFromRegistry(const Tizen::Base::String& key); private: - const static int _OVERLAYAGENT_XV_PORT = 100; +#ifdef _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER + static const long long _DEQUEUE_THRESHOLD_EVENT_TIME = 700; +#endif + static const int _OVERLAY_AGENT_XV_PORT = 100; class _OverlayVisualElement : public Tizen::Ui::Animations::_VisualElement @@ -157,7 +199,7 @@ private: Evas_Object* GetImageObject(void) const; void SetImageObject(Evas_Object* pImageObject); void SetImageObjectShowStateChanged(void); - + private: void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); @@ -168,7 +210,7 @@ private: static void OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info); private: - Tizen::Base::Runtime::Timer* __pTimer; + Tizen::Base::Runtime::Timer* __pOverlayTimer; Evas_Object* __pImageObject; bool __showStateChanged; }; @@ -193,9 +235,17 @@ private: Tizen::Base::ByteBuffer* __pConvertedSourceBuffer; //(GL-Backend) Renderer Pixmap - Ecore_X_Damage __pixmapDamageHandle; + Tizen::Ui::Animations::VisualElementSurface* __pSurfaceForPixmap; + Evas_Object* __pImageObjectForPixmap; + _OverlayAgentPixmap __pixmap[_OVERLAY_AGENT_PIXMAP_MAX]; + Ecore_X_Damage __pixmapDamageHandle[_OVERLAY_AGENT_PIXMAP_MAX]; Ecore_Event_Handler* __pPixmapEventHandler; - Pixmap __pixmap; + int __currentReadingPixmap; + bool __stopReadingPixmap; + + _UserData __pixmapCallBackData; + Tizen::Base::Runtime::Mutex* __pMutex; + long long __prevTime; //(GL-Backend) Xv Property int __xvPort; @@ -204,7 +254,7 @@ private: //(GL-Backend) XvPort variable static int __baseXvPort; - static bool __isPortGrabbed[_OVERLAYAGENT_XV_PORT]; + static bool __isPortGrabbed[_OVERLAY_AGENT_XV_PORT]; // static util variable static int __overlayAgentCount; diff --git a/src/ui/inc/FUiCtrl_OverlayRegionImpl.h b/src/ui/inc/FUiCtrl_OverlayRegionImpl.h index e563b18..3ff036b 100644 --- a/src/ui/inc/FUiCtrl_OverlayRegionImpl.h +++ b/src/ui/inc/FUiCtrl_OverlayRegionImpl.h @@ -107,6 +107,7 @@ public: void GoForeground(void); void GoBackground(void); + void SetShowState(bool show); static result IsValidBounds(const Tizen::Graphics::Rectangle& physicalBounds); static result SetPixelFormatList(void); diff --git a/src/ui/inc/FUiCtrl_Popup.h b/src/ui/inc/FUiCtrl_Popup.h index 1b5e865..996f10b 100644 --- a/src/ui/inc/FUiCtrl_Popup.h +++ b/src/ui/inc/FUiCtrl_Popup.h @@ -37,7 +37,6 @@ class _AccessibilityElement; namespace Tizen { namespace Ui { namespace Controls { -class _Indicator; class _PopupPresenter; enum PopupModalResult @@ -81,7 +80,6 @@ public: Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; - _Indicator* GetIndicator(void) const; Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void); Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void); @@ -157,7 +155,6 @@ protected: Tizen::Graphics::Color _titleTextColor; - Tizen::Graphics::Bitmap* _pBgBitmap; Tizen::Graphics::Bitmap* _pComposedBgBitmap; Tizen::Graphics::Bitmap* _pOutlineBitmap; Tizen::Graphics::Bitmap* _pComposedTitleBitmap; @@ -170,8 +167,6 @@ private: Tizen::Graphics::FloatRectangle __bounds; PopupModalResult __popupResult; - - _Indicator* __pIndicator; }; // _Popup diff --git a/src/ui/inc/FUiCtrl_ProgressPresenter.h b/src/ui/inc/FUiCtrl_ProgressPresenter.h index 9d13a99..7a52abd 100644 --- a/src/ui/inc/FUiCtrl_ProgressPresenter.h +++ b/src/ui/inc/FUiCtrl_ProgressPresenter.h @@ -61,8 +61,6 @@ private: _Progress* __pProgress; _ProgressModel* __pProgressModel; - Tizen::Graphics::Bitmap* __pResourceBitmap; - Tizen::Graphics::Bitmap* __pResourceBarBgBitmap; Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap; Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap; Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap; diff --git a/src/ui/inc/FUiCtrl_ScrollPanel.h b/src/ui/inc/FUiCtrl_ScrollPanel.h index 49e66d8..8bc5be7 100644 --- a/src/ui/inc/FUiCtrl_ScrollPanel.h +++ b/src/ui/inc/FUiCtrl_ScrollPanel.h @@ -195,6 +195,8 @@ public: bool IsPageScrollFlickMoveLimitedOnePage(void) const; + bool IsScrollAnimationRunning(void) const; + // store SIP keypad binding control const _Control* GetControlKeypadBinding(void) const; void SetControlKeypadBinding(const _Control* pControl); diff --git a/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h index b5526bc..0421d98 100644 --- a/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h +++ b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h @@ -151,6 +151,8 @@ public: float CalculatePagingScrollPosition(float position) const; void StopScrollBarLoadEffectTimer(void); + bool IsScrollAnimationRunning(void) const; + protected: // Update Layout virtual void UpdateLayout(void); @@ -160,8 +162,6 @@ protected: Tizen::Graphics::FloatPoint GetPreviousTouchPosition(void) const; Tizen::Graphics::FloatPoint GetCurrentTouchPosition(void) const; - bool IsScrollAnimationRunning(void) const; - float GetScrollPositionInternal(void) const; bool IsModelUpdating(void) const; @@ -214,6 +214,7 @@ private: // scroll to ... bool IsControlOutOfView(const _Control& control) const; void ScrollToControlWhenOutOfView(const _Control& control); + void ScrollToFocusedControl(void); // scroll bar load effect void DoScrollBarLoadEffect(void); diff --git a/src/ui/inc/FUiCtrl_SearchBar.h b/src/ui/inc/FUiCtrl_SearchBar.h index 9c79088..2a011a0 100644 --- a/src/ui/inc/FUiCtrl_SearchBar.h +++ b/src/ui/inc/FUiCtrl_SearchBar.h @@ -27,18 +27,18 @@ #include #include "FUi_Control.h" +#include "FUi_IAccessibilityListener.h" #include "FUiCtrl_Button.h" #include "FUiCtrl_Edit.h" +#include "FUiCtrl_KeypadEvent.h" +#include "FUiCtrl_LanguageEvent.h" +#include "FUiCtrl_SearchBarEvent.h" #include "FUiCtrl_IActionEventListener.h" #include "FUiCtrl_IKeypadEventListener.h" #include "FUiCtrl_ILanguageEventListener.h" #include "FUiCtrl_ITextBlockEventListener.h" #include "FUiCtrl_ITextEventListener.h" #include "FUiCtrl_ISearchBarEventListener.h" -#include "FUiCtrl_KeypadEvent.h" -#include "FUiCtrl_LanguageEvent.h" -#include "FUiCtrl_SearchBarEvent.h" -#include "FUi_IAccessibilityListener.h" const int SEARCHBAR_COLOR_MAX = 3; const int SEARCHBAR_BUTTON_COLOR_MAX = 4; @@ -137,6 +137,7 @@ public: static _SearchBar* CreateSearchBarN(void); result Initialize(bool enableSearchBarButton = true, CoreKeypadAction keypadAction = CORE_KEYPAD_ACTION_SEARCH); Tizen::Ui::_Control* GetContent(void) const; + result DetachContent(Tizen::Ui::_Control* pContent); result SetContent(const Tizen::Ui::_Control* pContent); result UpdateContentArea(bool invalidate = true); result SetContentAreaVisible(bool visible, bool isCalledByApp = false); @@ -235,7 +236,9 @@ public: void SetFocusCallbackParameter(bool state); bool IsFocusCallbackToBeFired(void) const; + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(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); @@ -260,6 +263,7 @@ public: virtual bool OnFocusLost(const _Control& source); virtual void OnDrawFocus(void); virtual bool IsChildControlFocusManage(void) const; + virtual void OnAncestorEnableStateChanged(const _Control& control); virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); @@ -308,6 +312,7 @@ private: bool __isButtonTextChangedByApp; bool __contentVisibilitySetByApp; bool __isFocusUiInitialized; + bool __isTouchMoved; CoreKeypadAction __keypadAction; diff --git a/src/ui/inc/FUiCtrl_SearchBarImpl.h b/src/ui/inc/FUiCtrl_SearchBarImpl.h index 6c79ac1..a20d48a 100644 --- a/src/ui/inc/FUiCtrl_SearchBarImpl.h +++ b/src/ui/inc/FUiCtrl_SearchBarImpl.h @@ -27,16 +27,16 @@ #include #include "FUi_ControlImpl.h" +#include "FUiCtrl_PublicKeypadEvent.h" +#include "FUiCtrl_PublicLanguageEvent.h" +#include "FUiCtrl_PublicSearchBarEvent.h" +#include "FUiCtrl_SearchBar.h" #include "FUiCtrl_IActionEventListener.h" #include "FUiCtrl_IKeypadEventListener.h" #include "FUiCtrl_ILanguageEventListener.h" #include "FUiCtrl_ITextBlockEventListener.h" #include "FUiCtrl_ITextEventListener.h" #include "FUiCtrl_ISearchBarEventListener.h" -#include "FUiCtrl_PublicKeypadEvent.h" -#include "FUiCtrl_PublicLanguageEvent.h" -#include "FUiCtrl_PublicSearchBarEvent.h" -#include "FUiCtrl_SearchBar.h" namespace Tizen { namespace Ui { namespace Controls diff --git a/src/ui/inc/FUiCtrl_SearchBarPresenter.h b/src/ui/inc/FUiCtrl_SearchBarPresenter.h index a943388..47a99e4 100644 --- a/src/ui/inc/FUiCtrl_SearchBarPresenter.h +++ b/src/ui/inc/FUiCtrl_SearchBarPresenter.h @@ -113,7 +113,6 @@ private: Tizen::Graphics::Bitmap* __pReplacedSearchFieldNormalBitmap; Tizen::Graphics::Bitmap* __pReplacedSearchFieldDisabledBitmap; Tizen::Graphics::Bitmap* __pReplacedSearchBarBitmap; - Tizen::Graphics::Bitmap* __pSearchBarBitmap; Tizen::Graphics::Bitmap* __pSearchFieldEffectBitmap; Tizen::Graphics::Bitmap* __pSearchBarEffectBitmap; Tizen::Graphics::Color __currentBgColor; diff --git a/src/ui/inc/FUiCtrl_Slider.h b/src/ui/inc/FUiCtrl_Slider.h index 67a7a30..11d519f 100644 --- a/src/ui/inc/FUiCtrl_Slider.h +++ b/src/ui/inc/FUiCtrl_Slider.h @@ -147,6 +147,7 @@ public: virtual void OnFontInfoRequested(unsigned long& style, float& size); virtual void OnAncestorEnableStateChanged(const _Control& control); virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnVisibleStateChanged(void); // accessibility listener virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} diff --git a/src/ui/inc/FUiCtrl_SliderOverlay.h b/src/ui/inc/FUiCtrl_SliderOverlay.h index 97fee64..adf442d 100644 --- a/src/ui/inc/FUiCtrl_SliderOverlay.h +++ b/src/ui/inc/FUiCtrl_SliderOverlay.h @@ -59,8 +59,6 @@ private: private: - static const int SLIDER_OVERLAY_SINGLE_DIGIT = 1; - Tizen::Graphics::FloatRectangle __sliderRect; Tizen::Graphics::FloatRectangle __sliderTouchRect; Tizen::Graphics::FloatRectangle __sliderOverlayRect; diff --git a/src/ui/inc/FUiCtrl_SliderPresenter.h b/src/ui/inc/FUiCtrl_SliderPresenter.h index de7c7b2..1219158 100644 --- a/src/ui/inc/FUiCtrl_SliderPresenter.h +++ b/src/ui/inc/FUiCtrl_SliderPresenter.h @@ -38,7 +38,6 @@ class _SliderOverlay; class _SliderPresenter : public Tizen::Base::Object - , public Tizen::Base::Runtime::ITimerEventListener { public: virtual ~_SliderPresenter(void); @@ -69,15 +68,16 @@ 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); + void OnAncestorEnableStateChanged(const _Control& control); + void OnAncestorVisibleStateChanged(const _Control& control); + void OnVisibleStateChanged(void); + static _SliderPresenter* CreateInstanceN(const _Slider& slider); result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color); void SetFocusMode(bool focusmode); bool GetFocusMode(void); - virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); private: int CalculateSliderValue(float positionX, float offsetX); @@ -112,12 +112,6 @@ private: Tizen::Base::Runtime::Timer* __pSlideTimer; - Tizen::Graphics::Bitmap* __pResourceBgTopBitmap; - Tizen::Graphics::Bitmap* __pResourceBgMiddleBitmap; - Tizen::Graphics::Bitmap* __pResourceBgBottomBitmap; - Tizen::Graphics::Bitmap* __pResourceBgSingleBitmap; - - Tizen::Graphics::Bitmap* __pBgTopBitmap; Tizen::Graphics::Bitmap* __pBgMiddleBitmap; Tizen::Graphics::Bitmap* __pBgBottomBitmap; @@ -129,8 +123,6 @@ private: Tizen::Graphics::Bitmap* __pBgBottomEffectBitmap; Tizen::Graphics::Bitmap* __pBgSingleEffectBitmap; - Tizen::Graphics::Bitmap* __pResourceBarBitmap; - Tizen::Graphics::Bitmap* __pResourceBarBgBitmap; Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap; Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap; Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap; @@ -158,9 +150,9 @@ private: Tizen::Graphics::Font* __pFont; Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + Tizen::Graphics::_Text::TextObject* __pHandleTextObject; int __handleX; - int __prevSliderValue; int __handleOffset; bool __isSliderPressed; bool __isSetValue; @@ -175,10 +167,6 @@ private: float __fontSize; float __barOffset; - bool __isTimerRunning; - - Tizen::Graphics::FloatPoint __currentPosition; - static const int __timerValue = 5; }; // _SliderPresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_SplitPanelPresenter.h b/src/ui/inc/FUiCtrl_SplitPanelPresenter.h index d9a7060..78c3b6c 100644 --- a/src/ui/inc/FUiCtrl_SplitPanelPresenter.h +++ b/src/ui/inc/FUiCtrl_SplitPanelPresenter.h @@ -46,9 +46,10 @@ enum _SplitPanelAnimationDirection _SPLIT_PANEL_ANIMATION_MAX }; -const long ANIMATION_DURATION = 1000; const float ANIMATION_ALPHA_HIDE = 0.0; const float ANIMATION_ALPHA_SHOW = 1.0; +const long ANIMATION_DURATION_MIN = 250; +const long ANIMATION_DURATION_MAX = 1000; class _SplitPanelPresenter : public Tizen::Base::Object @@ -110,7 +111,8 @@ private: Tizen::Ui::Control* GetPaneControl(SplitPanelPaneOrder paneOrder); Tizen::Ui::Animations::AnimationTransactionStatus GetTransactionStatus(void); Tizen::Graphics::FloatRectangle GetRestorePaneBounds(SplitPanelPaneOrder paneOrder); - Tizen::Ui::Animations::VisualElementPropertyAnimation* GetVisualElementAnimation(Tizen::Base::String propertyName); + Tizen::Ui::Animations::VisualElementPropertyAnimation* GetVisualElementAnimation(Tizen::Base::String propertyName, int destination); + long GetAnimationDuration(int destination); private: _SplitPanelPresenter(const _SplitPanelPresenter& value); diff --git a/src/ui/inc/FUiCtrl_TabPresenter.h b/src/ui/inc/FUiCtrl_TabPresenter.h index 4b3591a..2565112 100644 --- a/src/ui/inc/FUiCtrl_TabPresenter.h +++ b/src/ui/inc/FUiCtrl_TabPresenter.h @@ -186,9 +186,6 @@ private: void SetFirstLoadedItemIndex(void); void SetLastLoadedItemIndex(void); -// void StartScrollingEffect(void); -// void SetOpacityVisualElement(float xPosition); - virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); private: @@ -218,14 +215,10 @@ private: int __editItemIndex; - //Tizen::Graphics::Bitmap* __pVerticalLineBitmap; + Tizen::Graphics::Bitmap* __pHorizontalLineBitmap; -// Tizen::Graphics::Bitmap* __pFrontScrollingEffectBitmap; -// Tizen::Graphics::Bitmap* __pRearScrollingEffectBitmap; -// Tizen::Graphics::Bitmap* __pScrollingEffectBitmap; Tizen::Graphics::Bitmap* __pFocusBitmap; -// Tizen::Ui::Animations::_VisualElement* __pScrollingEffectVe; Tizen::Base::Runtime::Timer* __pFlickAnimationTimer; Tizen::Base::Runtime::Timer* __pScrollAnimationTimer; @@ -269,11 +262,8 @@ private: int __firstLoadedItemIndex; int __lastLoadedItemIndex; -// bool __isScrollEffectEnded; -// bool __isScrollEffectStarted; int __timerCount; bool __isTouchMove; -// int __scrollFlag; float __tabMinimumSize; int __fontChangeItemCount; diff --git a/src/ui/inc/FUiCtrl_TableView.h b/src/ui/inc/FUiCtrl_TableView.h index 3bc6707..6321f25 100644 --- a/src/ui/inc/FUiCtrl_TableView.h +++ b/src/ui/inc/FUiCtrl_TableView.h @@ -104,6 +104,12 @@ public: //Focus virtual bool OnFocusGained(const _Control& source); + bool OnTraversalControlFocusGained(void); + bool OnTraversalControlFocusLost(void); + void SetFocusItemOnPressedState(int groupIndex, int itemIndex); + + //Accessibility + void SetCurrentAccessibilityIndex(int groupIndex, int itemIndex); // gestureListener Callback API virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); @@ -116,10 +122,11 @@ public: result SetReorderModeEnabled(bool enable); //Restore list Focus - void RestoreFocus(bool isRestoreFocus); void SetAnnexFocused(bool isAnnexFocused); + bool IsAnnexFocused(void); void SetTableViewFocused(bool focusStatus); bool IsTableViewFocused(void); + result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const; _FastScroll* GetFastScrollBar(void) const; result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); @@ -151,7 +158,7 @@ public: result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation = true); result RefreshAllItems(void); - result UpdateTableView(void); + result UpdateTableView(bool isRestoreAnnexFocusValue = false); result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; @@ -230,14 +237,18 @@ public: void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex); + Tizen::Ui::_Control* GetParentFormOrWindow(void) const; + virtual void OnDraw(void); virtual void OnBoundsChanged(void); + virtual void OnChangeLayout(_ControlOrientation orientation); virtual void OnChildAttached(const _Control& child); virtual void OnChildDetached(const _Control& child); result SetTableViewStatusChanged(bool changed); - + void SetFocusDuringOrientationChange(void); + void RestoreEditCopyPasteManager(void); // VE Value Animation Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const; diff --git a/src/ui/inc/FUiCtrl_TableViewItem.h b/src/ui/inc/FUiCtrl_TableViewItem.h index a93e30a..c195849 100644 --- a/src/ui/inc/FUiCtrl_TableViewItem.h +++ b/src/ui/inc/FUiCtrl_TableViewItem.h @@ -251,15 +251,18 @@ public: bool IsAnnexOnOffSliding(void); static float GetAnnexWidth(TableViewAnnexStyle style); - void FireItemTouchReleased(void); + void FireItemTouchReleased(bool isTouchRelease = true); void FireItemTouchPressed(void); void SetSimpleLastItemEnabled(bool enable); + void SetSectionItem(bool isSectionItem); void SetTouchPressOnScroll(bool isTouch); bool IsTouchPressOnScroll(void) const; + void DrawFocusOnInternalItem(_Control* pChildControl); + // Accessibility virtual void SetAccessibilityElement(void); - Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void); + virtual Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void); virtual result OnAttachedToMainTree(void); @@ -301,11 +304,13 @@ public: virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusModeStateChanged(void); bool SetItemTapSoundEnabled(bool tapSoundEnabled); bool GetItemTapSoundEnabled(void); void DrawAnnexFocus(void); + void ResetItemState(void); virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); @@ -318,6 +323,8 @@ public: //Accessibility void SetPublicLabelUpdate(bool resetPublicLabelUpdate); + //TextSlide + virtual void ResetTextSlide(void); protected: _TableViewItem(float nItemHeight); @@ -331,9 +338,9 @@ protected: TableViewItemPressedControl GetPressedControl(void); result StartTouchPressedTimer(const _Control& source, const _TouchInfo& touchinfo); - void StopTouchPressedTimer(void); + void StopTouchPressedTimer(bool forceStop = false); result StartTouchReleasedTimer(void); - void StopTouchReleasedTimer(void); + void StopTouchReleasedTimer(bool forceStop = false); void OnAncestorInputEnableStateChanged(const _Control& control); @@ -383,11 +390,14 @@ private: result CreateOnOffButton(void); result CreateDetailButton(void); - _Label* GetLabelCore(Label* label); + _Label* GetLabelCore(Label* pLabel); _Control* GetPreviousFocusChildControl(const _Control& source); _Control* GetNextFocusChildControl(const _Control& source); + Tizen::Base::String GetChildAccessibilityLabelContent(const _Control& source); + void DeactivateChildAccessibilityContainer(const _Control& source); + private: void* __pAppInfo; int __refCount; @@ -477,6 +487,7 @@ private: bool __isTabSoundPlayed; bool __isSelectedDetailButton; bool __isSimpleLastItem; + bool __isSectionItem; bool __isTouchPressOnScroll; bool __isTouchCancelOnPressRelease; @@ -492,7 +503,7 @@ private: static const float BACKGROUND_DIMMED_OPACITY = 0.7f; static const float BACKGROUND_DISABLED_OPACITY = 0.3f; static const int DEFAULT_CAPTURED_CONTROL_COUNT = 10; - static const int CHECKED_ANIMATION_DURATION = 30; + static const int CHECKED_ANIMATION_DURATION = 10; static const int TOUCH_PRESSED_DURATION = 100; static const int TOUCH_RELEASED_DURATION = 30; static const int MAX_CHECKED_COUNT = 10; diff --git a/src/ui/inc/FUiCtrl_TableViewPresenter.h b/src/ui/inc/FUiCtrl_TableViewPresenter.h index 446b5f5..3c8100f 100644 --- a/src/ui/inc/FUiCtrl_TableViewPresenter.h +++ b/src/ui/inc/FUiCtrl_TableViewPresenter.h @@ -101,6 +101,25 @@ struct _TableViewSectionStringAlignment bool operator!= (const _TableViewSectionStringAlignment& rhs) const; }; +struct _TableViewItemHeight +{ + int groupIndex; + int itemIndex; + float itemHeight; + bool isFooterItem; + + _TableViewItemHeight(void) + : groupIndex(0) + , itemIndex(-1) + , itemHeight(0) + , isFooterItem(false) + { + } + + bool operator== (const _TableViewItemHeight& rhs) const; + bool operator!= (const _TableViewItemHeight& rhs) const; +}; + struct _TableViewScrollToItemTag { int groupIndex; @@ -153,6 +172,7 @@ public: // event handler for window event virtual void OnBoundsChanged(void); virtual result Draw(void); + virtual void OnChangeLayout(_ControlOrientation orientation); // Touch Event Previewer virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo); @@ -201,7 +221,7 @@ public: result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation); result RefreshAllItems(void); - result UpdateTableView(void); + result UpdateTableView(bool isRestoreAnnexFocusValue); result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; result GetItemFromPosition(const Tizen::Graphics::FloatPoint& position, TableViewItemTag& itemPos) const; @@ -232,10 +252,11 @@ public: result SetLeftMargin(float leftMargin); //Restore Focus - void RestoreFocus(bool isRestoreFocus); void SetAnnexFocused(bool isAnnexFocused); + bool IsAnnexFocused(void); void SetTableViewFocused(bool focusStatus); bool IsTableViewFocused(void); + result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const; bool IsItemChecked(int groupIndex, int itemIndex) const; result SetItemChecked(int groupIndex, int itemIndex, bool checked); @@ -285,6 +306,16 @@ public: void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex); + void SetFocusDuringOrientationChange(void); + bool OnTraversalControlFocusGained(void); + bool OnTraversalControlFocusLost(void); + void SetFocusItemOnPressedState(int groupIndex, int itemIndex); + void SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos); + void RestoreEditCopyPasteManager(void); + void ChangeScrollBarVisibility(float viewRange, float scrollRange); + + void SetCurrentAccessibilityIndex(int groupIndex, int itemIndex); + protected: virtual float ScrollToInternal(float targetPosition); virtual void FadeInScrollBar(void); @@ -364,6 +395,7 @@ private: float GetItemHeight(TableViewItemTag itemTag) const; float SetItemHeight(TableViewItemTag itemTag, float height); bool CreateItemHeightList(float defaultGroupItemHeight, float defaultItemHeight); + bool RestoreItemHeightList(float defaultGroupItemHeight, float defaultItemHeight); void DeleteItemHeightList(void); void PresetItemHeightList(void); bool RefreshItemHeightList(int groupIndex, int itemIndex, TableViewRefreshType refreshType); @@ -410,6 +442,8 @@ private: TableViewItemTag __sweptItemTag; TableViewItemTag __focusItemTag; + TableViewItemTag __focusItemTagOnTraversal; + TableViewItemTag __accessibilityTag; TableViewItemTag __reservedScrollItemIndex; TableViewScrollItemAlignment __reservedScrollItemAlignment; @@ -420,7 +454,7 @@ private: _TableViewReorderInfo __reorderInfo; - Tizen::Base::Collection::ArrayListT __itemHeightList; + Tizen::Base::Collection::ArrayListT<_TableViewItemHeight> __itemHeightList; Tizen::Base::Collection::ArrayListT<_TableViewSectionStringAlignment> __sectionAlignmentList; float __itemTotalHeight; @@ -444,6 +478,11 @@ private: _TableViewScrollToItemTag __scrollToItemTag; + bool __isOrientationChanged; + bool __isFocusedDuringOrientationChange; + bool __isUpdatingTableView; + bool __isUpdateTableViewCalledDuringTts; + static const int TABLEVIEW_MAX_ITEM_COUNT = 30; static const int REORDER_SCROLL_ANIMATION_TIMER_DURATION = 10; static const float REORDER_SCROLL_ANIMATION_DISTANCE; diff --git a/src/ui/inc/FUiCtrl_TokenEditPresenter.h b/src/ui/inc/FUiCtrl_TokenEditPresenter.h index 8d5e8ea..1ef65be 100644 --- a/src/ui/inc/FUiCtrl_TokenEditPresenter.h +++ b/src/ui/inc/FUiCtrl_TokenEditPresenter.h @@ -59,7 +59,7 @@ public: result Initialize(const _Control& control); - virtual result Draw(Tizen::Graphics::Canvas& canvas); + virtual result Draw(void); result MakeToken(const Tizen::Base::String& tokenString); @@ -87,7 +87,7 @@ public: virtual result SetInitialBounds(void); - result CalculateDescriptionTextRect(const Tizen::Base::String& titleText); + result CalculateTitleTextRect(const Tizen::Base::String& titleText); virtual void OnCursorTimerExpired(void); @@ -101,9 +101,9 @@ public: bool IsAutoShrinkModeEnabled(void) const; - void SetDescriptionText(Tizen::Base::String descriptionText); + void SetTitleText(Tizen::Base::String titleText); - Tizen::Base::String GetDescriptionText(void) const; + Tizen::Base::String GetTitleText(void) const; Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const; @@ -157,7 +157,7 @@ public: virtual void ResetTextBounds(void); virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); - Tizen::Graphics::FloatRectangle GetDescriptionTextRect(void) const; + Tizen::Graphics::FloatRectangle GetTitleTextRect(void) const; String GetTextAccessibilityElementText(void) const; void RefreshAccessibilityElements(void); result AddChildAccessibilityElements(void); @@ -181,14 +181,16 @@ public: int GetFocusedTokenIndex(void) const; void PrepareFocusUiMode(void); void PerformRemoveTokenAnimation(Tizen::Ui::Animations::VisualElement& source); + result LoadTokenBgBitmap(TokenEditStatus status); + virtual result DrawFocusRing(Tizen::Graphics::Canvas&); private: bool DrawToken(int count = -1); Tizen::Graphics::Color GetTokenEditColor(const TokenEditStatus status) const; Tizen::Graphics::Color GetTokenEditTextColor(const TokenEditStatus status) const; result InitializeTokenVisibilityAt(int index); - bool DrawDescriptionText(void); - result SetDescriptionTextRect(const Tizen::Graphics::FloatRectangle& rect); + bool DrawTitleText(void); + result SetTitleTextRect(const Tizen::Graphics::FloatRectangle& rect); result TrimTokenAndAdjustEllipsisAt(int index); int GetTokenIndexFromCoordinate(const Tizen::Graphics::FloatPoint point) const; result SetEditingTokenTextBounds(int index, bool isSetText = true); @@ -198,7 +200,7 @@ private: result CheckTokenScrolling(bool scrollToCursorPosition = false); result SetTokenVisualElementBounds(int index, const Tizen::Graphics::FloatRectangle& bounds); int CalculateVisibleTokenCount(void); - result InitializeDescriptionText(void); + result InitializeTitleText(void); bool CheckCopyPastePopupShowStatus(void); result ChangeInternalLayout(_ControlOrientation orientation); float GetMaxTextHeight(void); @@ -212,11 +214,13 @@ private: Tizen::Base::String __delimiter; - Tizen::Graphics::Bitmap* __pTokenBgBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgNormalBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgSelectedBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgHighlightedBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgDisabledBitmap; Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap; - Tizen::Graphics::Bitmap* __pTokenBgPressedEffectBitmap; - Tizen::Graphics::Bitmap* __pTokenBgReplacementFocusBitmap; - Tizen::Graphics::Bitmap* __pTokenBgFocusEffectBitmap; + Tizen::Graphics::Bitmap* __pTokenBgSelectedEffectBitmap; + Tizen::Graphics::Bitmap* __pTokenBgHighlightedEffectBitmap; int __pressedTokenIndex; @@ -229,11 +233,13 @@ private: bool __isEditModeEnabled; - Tizen::Ui::Animations::_VisualElement* __pDescriptionTextVisualElement; + Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement; - Tizen::Graphics::_Text::TextObject* __pDescriptionTextTextObject; + Tizen::Ui::Animations::_VisualElement* __pFocusRingVisualElement; - Tizen::Graphics::FloatRectangle __descriptionTextRect; + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + + Tizen::Graphics::FloatRectangle __titleTextRect; bool __isTokenEditingFinished; @@ -249,7 +255,7 @@ private: bool __autoShrink; - Tizen::Base::String __descriptionText; + Tizen::Base::String __titleText; bool __isPopupVisible; @@ -263,7 +269,7 @@ private: const Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pTimingFunction; - Tizen::Graphics::FloatRectangle __descriptionTextRectForScroll; + Tizen::Graphics::FloatRectangle __titleTextRectForScroll; float __previousTitleWidth; @@ -305,6 +311,10 @@ private: bool __accessibilityFocusIn; + int __transactionId; + + bool __isDestroyed; + }; // _TokenEditPresenter }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_Toolbar.h b/src/ui/inc/FUiCtrl_Toolbar.h index 67d7943..9f97889 100644 --- a/src/ui/inc/FUiCtrl_Toolbar.h +++ b/src/ui/inc/FUiCtrl_Toolbar.h @@ -55,8 +55,6 @@ class _ActionEvent; const int TOOLBAR_BUTTON_MAX_STATE_COUNT = 4; const int TOOLBAR_ITEM_MAX_STATE_COUNT = 5; const int TOOLBAR_ACTION_ID_MIN = 0; -const int TOOLBAR_ACTION_ID_MAX = (int) 0x7FFFFFFF; -const int TOOLBAR_MORE_BUTTON_ID = -2; const int TAB_ITEM_MAX = 15; const int SEGMENTED_ITEM_MAX = 4; @@ -279,6 +277,8 @@ public: result SetButtonColor(_ButtonStatus status, const Tizen::Graphics::Color& color); + void SetHighlightedState(ToolbarButton position); + result SetButtonEnabled(ToolbarButton position, bool enabled); result SetButtonTextColor(_ButtonStatus status, const Tizen::Graphics::Color& color); @@ -507,7 +507,6 @@ private: bool __isButtonTextColorSetByUser[TOOLBAR_BUTTON_MAX_STATE_COUNT]; - HorizontalAlignment __titleTextAlignment; std::vector<_Button*> __pItems; @@ -538,6 +537,10 @@ private: bool __highlighted; + bool __isEnterKeyPressed; + + bool __isAttachedToMainTree; + Tizen::Graphics::FloatRectangle __titleTextArea; Tizen::Graphics::FloatRectangle __itemArea; diff --git a/src/ui/inc/FUi_AccessibilityGesture.h b/src/ui/inc/FUi_AccessibilityGesture.h index edcc7aa..24c5308 100644 --- a/src/ui/inc/FUi_AccessibilityGesture.h +++ b/src/ui/inc/FUi_AccessibilityGesture.h @@ -54,6 +54,9 @@ enum _AccessibilityGestureType _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_PANNING_FINISHED, _ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED, _ACCESSIBILITY_GESTURE_TYPE_VALUE_DECREASED, + _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV, + _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT, + _ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT, _ACCESSIBILITY_GESTURE_TYPE_END }; diff --git a/src/ui/inc/FUi_AccessibilityTtsPlayer.h b/src/ui/inc/FUi_AccessibilityTtsPlayer.h index d8e38a4..27823d1 100644 --- a/src/ui/inc/FUi_AccessibilityTtsPlayer.h +++ b/src/ui/inc/FUi_AccessibilityTtsPlayer.h @@ -85,12 +85,14 @@ private: private: bool __initialized; - bool __activated; + bool __activated; + bool __extra; tts_h __ttsHandle; int __localeIdx; tts_speed_e __speed; AccessibilityScreenReaderStatus __status; Tizen::Base::String __grammar; + Tizen::Base::String __readingContents; Tizen::Locales::Locale* __pCurrentLocale; Tizen::Base::Collection::IList* __pSupportedLocaleList; _AccessibilityManager* __pManager; diff --git a/src/ui/inc/FUi_Control.h b/src/ui/inc/FUi_Control.h index f588e99..5f7f4fb 100644 --- a/src/ui/inc/FUi_Control.h +++ b/src/ui/inc/FUi_Control.h @@ -41,6 +41,7 @@ #include "FUi_INotificationEventListener.h" #include "FUi_PropertyBase.h" #include "FUi_TouchGestureDetector.h" +#include "FUi_DragAndDropEvent.h" #include "FGrp_FontImpl.h" namespace Tizen { namespace Base { namespace Collection { @@ -66,6 +67,8 @@ namespace Tizen { namespace Ui { class _Window; class _DataBindingContext; class _AccessibilityContainer; +class _DragAndDropItem; +class _IDragAndDropEventListener; class _IControlDelegate { @@ -96,6 +99,7 @@ public: virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize) = 0; virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize) = 0; virtual void OnParentBoundsChanged(const _Control& parent) = 0; + virtual void OnChildAttaching(const _Control& child) = 0; virtual void OnChildAttached(const _Control& child) = 0; virtual void OnChildDetaching(const _Control& child) = 0; virtual void OnChildDetached(const _Control& child) = 0; @@ -119,6 +123,13 @@ public: virtual bool IsChildControlFocusManage(void) const = 0; virtual void OnFocusableStateChanged(bool focusalbeState) = 0; virtual void OnFocusModeStateChanged(void) = 0; + virtual _Window* OnDragAndDropBeginning(void) = 0; + virtual void OnDragAndDropDropping(void) = 0; + virtual void OnDragAndDropEntered(void) = 0; + virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position) = 0; + virtual void OnDragAndDropLeft(void) = 0; + virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) = 0; + virtual bool IsAnimating(void) const = 0; }; class _IPropagatedTouchEventListener @@ -132,10 +143,12 @@ public: virtual void OnTouchReleaseHandled(const _Control& control) = 0; virtual void OnTouchMoveHandled(const _Control& control) = 0; virtual void OnTouchCancelHandled(const _Control& control) = 0; + virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return false;} virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0; virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0; virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0; virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} }; class _IPropagatedKeyEventListener @@ -211,20 +224,16 @@ public: virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); - virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo); + virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo); virtual bool OnFocusGained(const _Control& source); virtual bool OnFocusLost(const _Control& source); + virtual bool OnTraversalControlFocusGained(void); + virtual bool OnTraversalControlFocusLost(void); virtual bool OnPreviewNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); // [ToDo] Make the notification id as enumeration. virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); @@ -254,6 +263,7 @@ public: virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize); virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize); virtual void OnParentBoundsChanged(const _Control& parent); + virtual void OnChildAttaching(const _Control& child); virtual void OnChildAttached(const _Control& child); virtual void OnChildDetaching(const _Control& child); virtual void OnChildDetached(const _Control& child); @@ -291,7 +301,6 @@ public: bool IsAncestorOf(const _Control& control) const; bool IsAttachedToMainTree(void) const; _Window* GetRootWindow(void) const; - void InvalidateHierarchyRootWindow(void); void Accept(Visitor& visitor); void Accept(Visitor& visitor) const; @@ -387,9 +396,9 @@ public: Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const; Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const; void SetDrawWhenVisible(bool draw); - bool IsDrawWhenVisible(void); + bool IsDrawWhenVisible(void) const; void SetTerminatingOrder(bool postOrderTraversal); - bool IsPostOrderTraversal(void); + bool IsPostOrderTraversal(void) const; // Font result SetFont(const Tizen::Base::String& fontName); @@ -424,7 +433,7 @@ public: bool IsNativeObjectFocusable(void) const; void SetNativeObjectFocusable(bool focusable); void SetFocusWindowActivationChecked(bool isChecked); - bool IsFocusWindowActivationChecked(void); + bool IsFocusWindowActivationChecked(void) const; // Focus UI void SetPreviousFocus(_Control* pPreviousFocus); @@ -433,7 +442,7 @@ public: _Control* GetNextFocus() const; void DrawFocus(void); Tizen::Base::Collection::IListT<_Control*>* GetFocusListN(void) const; - void RemoveFocusRing(void); + void RemoveFocusRing(bool needToDelete = false); bool HasFocusRing(void); bool IsFocusModeStateEnabled(void) const; void SetFocusNavigateEnabled(bool enable); @@ -462,6 +471,8 @@ public: result SetPosition(const Tizen::Graphics::FloatPoint& position); result SetSize(const Tizen::Graphics::Dimension& size); result SetSize(const Tizen::Graphics::FloatDimension& size); + bool IsChangedPositionByUser(void) const; + void SetChangedPositionByUser(bool change); Tizen::Graphics::Dimension GetMinimumSize(void) const; Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const; @@ -482,11 +493,11 @@ public: Tizen::Graphics::FloatRectangle GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) 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); + bool IsCalledSetClientBounds(void) const; virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); + void InvalidateHierarchyAbsoluteBounds(_Control& control); bool Contains(const Tizen::Graphics::Point& point) const; bool Contains(const Tizen::Graphics::FloatPoint& point) const; @@ -575,47 +586,80 @@ public: Animations::_VisualElement* GetVisualElement(void) const; void PrintDescription(bool printChildren, int level); + void PrintBacktrace(bool printChildren, bool newBacktrace); + +// DragAndDrop + void DragAndDropBegin(const _DragAndDropItem& dragAndDropItem); + void DragAndDropDrop(void); + void DragAndDropCancel(void); + _Window* GetDragWindow(void) const; + _Control* GetDragSourceControl(void) const; + bool IsDragAndDropSource(void) const; + result AddDragAndDropEventListener(const _IDragAndDropEventListener& listener); + result RemoveDragAndDropEventListener(const _IDragAndDropEventListener& listener); + + virtual _Window* OnDragAndDropBeginning(void); + virtual void OnDragAndDropDropping(void); + virtual void OnDragAndDropEntered(void); + virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position); + virtual void OnDragAndDropLeft(void); + virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem); + + virtual bool IsAnimating(void) const; + + result AdjustAbsoluteBounds(void); protected: _Control(void); void DisposeControl(void); void AcquireHandle(void); void SetDataBindingContext(_DataBindingContext* pDataBindingContext); + void DoBacktrace(Tizen::Base::Collection::ArrayListT* pBacktraceList); + void SetDestroying(bool destroying); + bool IsDestroying(void) const; private: _Control(const _Control& rhs); _Control& operator =(const _Control& rhs); + void Invalidate(_Control& control); + void InvalidateHierarchyRootWindow(_Control& control); + bool IsAncestorOf(const _Control& control, const _Control& ancestor) const; + void ChangeLayout(_Control& control, _ControlOrientation orientation); + void ChangeLayout(_Control& control, _ControlRotation rotation); + void ReleaseHandle(void); + virtual bool IsChildAttachable(_Control& child) const; bool IsInSizeRange(const Tizen::Graphics::Dimension& size) const; bool IsInSizeRange(const Tizen::Graphics::FloatDimension& size) const; result AdjustSizeToRange(void); result SetBoundsInternal(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks); - result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks); + result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool animating = false); result UpdateBoundsOfVisualElement(const Tizen::Graphics::FloatRectangle& controlBounds); - result AdjustAbsoluteBounds(void); + result AdjustAbsoluteBounds(_Control& control, bool update = true); result StartAttaching(_Control& child, _ControlArea area); result EndAttaching(_Control& child); void SetParent(_Control* pParent); - bool IsCalledCallAttachingToMainTree(void); + bool IsCalledCallAttachingToMainTree(void) const; void SetCalledCallAttachingToMainTree(bool isAttaching); - bool IsCalledCallPreAttachedToMainTree(void); + bool IsCalledCallPreAttachedToMainTree(void) const; void SetCalledCallPreAttachedToMainTree(bool isAttached); - bool IsCalledCallAttachedToMainTree(void); + bool IsCalledCallAttachedToMainTree(void) const; void SetCalledCallAttachedToMainTree(bool isAttached); result CallOnAttachingToMainTree(_Control& control); result CallOnPreAttachedToMainTree(_Control& control); result CallOnAttachedToMainTree(_Control& control); result CallOnDetachingFromMainTree(_Control& control); - void CallOnAncestorVisibleStateChanged(void); - void CallOnAncestorEnableStateChanged(void); - void CallOnAncestorInputEnableStateChanged(void); + void CallOnAncestorVisibleStateChanged(_Control& control); + void CallOnAncestorEnableStateChanged(_Control& control); + void CallOnAncestorInputEnableStateChanged(_Control& control); void SetLayer(_ControlLayer layer); int PrintDescription(bool printChildren, int depth, int level); + int PrintBacktrace(bool printChildren, int depth, bool newBacktrace); _ITouchEventPreviewer* GetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>) const; _IKeyEventPreviewer* GetEventPreviewer(_IntToType<_UI_EVENT_KEY>) const; @@ -632,6 +676,9 @@ private: void SetEventListener(_IntToType<_UI_EVENT_FOCUS>, _IFocusEventListener* pListener); void SetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventListener* pListener); +// DragAndDrop + void FireDragAndDropEvent(_DragAndDropState dragState, Tizen::Graphics::FloatPoint& dragPosition, _DragAndDropItem* pDragItem); + // Focus Ui void MakeFocusList(const _Control* pControl, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const; void MakeChildContainerFocusList(const _Control* pControl, int startIndex, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const; @@ -681,6 +728,7 @@ private: bool __isFocusMode; bool __isNavigatable; bool __isFocusWindowActivationChecked; + bool __isChangedPositionByUser; class ControlVisualElementContentProvider; ControlVisualElementContentProvider* __pVisualElementContentProvider; @@ -740,6 +788,9 @@ private: _Control* __pPreviousFocus; _Control* __pNextFocus; + _Window* __pDragWindow; + bool __isDragAndDropSource; + struct _VisualElementDeleter { void operator()(Tizen::Ui::Animations::VisualElement* pVisualElement) @@ -751,6 +802,10 @@ private: } }; std::unique_ptr __pFocusVisualElement; + std::unique_ptr > __pNewBacktrace; + std::unique_ptr > __pDeleteBacktrace; + + std::unique_ptr<_DragAndDropEvent> __pDragAndDropEvent; friend class _Window; friend class _ControlManager; diff --git a/src/ui/inc/FUi_ControlImpl.h b/src/ui/inc/FUi_ControlImpl.h index 1183a10..ad5764d 100644 --- a/src/ui/inc/FUi_ControlImpl.h +++ b/src/ui/inc/FUi_ControlImpl.h @@ -148,6 +148,7 @@ public: virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize); virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize); virtual void OnParentBoundsChanged(const _Control& parent); + virtual void OnChildAttaching(const _Control& child); virtual void OnChildAttached(const _Control& child); virtual void OnChildDetaching(const _Control& child); virtual void OnChildDetached(const _Control& child); @@ -188,27 +189,29 @@ public: virtual bool OnTouchReleased(const _ControlImpl& source, const _TouchInfo& touchinfo); virtual bool OnTouchMoved(const _ControlImpl& source, const _TouchInfo& touchinfo); virtual bool OnTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchinfo); + virtual bool OnTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchinfo); virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _ControlImpl& source, const _TouchInfo& touchInfo); virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _ControlImpl& source, const _TouchInfo& touchInfo); virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _ControlImpl& source, const _TouchInfo& touchInfo); virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchInfo); - - virtual _UiTouchEventDelivery OnPreviewMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo); - - virtual bool OnMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo); - virtual bool OnMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo); + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchInfo); virtual bool OnFocusGained(const _ControlImpl& source); virtual bool OnFocusLost(const _ControlImpl& source); + virtual bool OnTraversalControlFocusGained(void); + virtual bool OnTraversalControlFocusLost(void); virtual bool OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs); virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs); + virtual Tizen::Ui::_Window* OnDragAndDropBeginning(void); + virtual void OnDragAndDropDropping(void); + virtual void OnDragAndDropEntered(void); + virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position); + virtual void OnDragAndDropLeft(void); + virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem); + virtual bool IsAnimating(void) const; + // Control Hierarchy bool IsAttachedToMainTree(void) const; _ContainerImpl* GetParent(void) const; @@ -287,7 +290,7 @@ public: result SetBounds(const Tizen::Graphics::Rectangle& bounds, bool callBoundsChangeCallbacks = true); result SetBounds(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks = true); result SetBoundsAndUpdateLayout(const Tizen::Graphics::Rectangle& bounds); - result SetBoundsAndUpdateLayoutF(const Tizen::Graphics::FloatRectangle& bounds); + result SetBoundsAndUpdateLayout(const Tizen::Graphics::FloatRectangle& bounds); result SetPosition(const Tizen::Graphics::Point& position); result SetPosition(const Tizen::Graphics::FloatPoint& position); result SetSize(const Tizen::Graphics::Dimension& size); @@ -391,6 +394,9 @@ public: float GetTouchPressThreshold(void) const; int GetTouchPressThresholdPixel(void) const; + bool IsDestroying(void) const; + void SetDestroyingFlag(bool destroying); + protected: _ControlImpl(Control* pPublic, _Control* pCore); static result CheckConstruction(_Control* pCore, _ControlImpl* pImpl); // Use this in the Factory methods. @@ -457,6 +463,7 @@ private: bool __inputEventConsumed; bool __focusableChangable; + bool __destroying; class CoreEventListener; CoreEventListener* __pCoreEventListener; diff --git a/src/ui/inc/FUi_ControlManager.h b/src/ui/inc/FUi_ControlManager.h index 2453f2a..9e08397 100644 --- a/src/ui/inc/FUi_ControlManager.h +++ b/src/ui/inc/FUi_ControlManager.h @@ -61,6 +61,8 @@ public: _Control* Release(const _ControlHandle& handle); _Control* GetObject(const _ControlHandle& handle); const _Control* GetObject(const _ControlHandle& handle) const; + _Control* GetObject(int handle); + const _Control* GetObject(int handle) const; int GetUsedHandleCount(void) const; // Operations @@ -111,7 +113,7 @@ public: bool TakeFocusFromControl(const _Control& control); // Queries - _Control* GetTopmostTouchedControl(const Tizen::Graphics::Point& point); + _Control* GetTopmostTouchedControl(const Tizen::Graphics::Point& point, bool activation = false); _Window* GetCurrentFrame(void) const; bool IsFrameActivated(void) const; @@ -170,6 +172,26 @@ private: virtual void OnSettingChanged(Tizen::Base::String& key); + class _HistoryInfo + { + public: + _HistoryInfo(_Control* pControl); + ~_HistoryInfo(void); + + void SetBacktrace(Tizen::Base::Collection::ArrayListT& backtrace); + + private: + _HistoryInfo(const _HistoryInfo& rhs); + _HistoryInfo& operator =(const _HistoryInfo& rhs); + + private: + _Control* __pControl; + int __backtraceCount; + void** __pBacktrace; + }; + + void AddHistory(Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* pHistoryList, _HistoryInfo* pHistoryInfo); + private: Tizen::Base::_ObjectManagerT <_Control> __objectManager; Tizen::Base::Collection::LinkedListT<_Window*>* __pWindowList; @@ -196,6 +218,9 @@ private: int __screenDpi; _Window* __pClipboardOwner; std::unique_ptr > __pControlManagerEventListenerList; + + Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pNewHistory; + Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pDeleteHistory; }; // _ControlManager }} // Tizen::Ui diff --git a/src/ui/inc/FUi_DragAndDropEvent.h b/src/ui/inc/FUi_DragAndDropEvent.h new file mode 100644 index 0000000..86653da --- /dev/null +++ b/src/ui/inc/FUi_DragAndDropEvent.h @@ -0,0 +1,74 @@ +// +// 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_DragAndDropEvent.h + * @brief This is the header file containing the declaration of the _DragAndDropEvent class. + * + * This header file contains the declarations of the _DragAndDropEvent class. + */ + +#ifndef _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_ +#define _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_ + +#include +#include +#include "FUi_IDragAndDropEventListener.h" + +namespace Tizen { namespace Ui +{ +enum _DragAndDropState +{ + _DRAG_AND_DROP_STATE_BEGINNING, + _DRAG_AND_DROP_STATE_DROPPING, + _DRAG_AND_DROP_STATE_ENTERED, + _DRAG_AND_DROP_STATE_MOVED, + _DRAG_AND_DROP_STATE_LEFT, + _DRAG_AND_DROP_STATE_DROPPED, + _DRAG_AND_DROP_STATE_CANCELED, +}; + +class _Control; +class _DragAndDropItem; + +class _DragAndDropEvent + : public Tizen::Base::Runtime::_Event +{ +public: + static _DragAndDropEvent* CreateInstanceN(const _Control& source); + static Tizen::Base::Runtime::IEventArg* CreateDragAndDropEventArgN(const _Control& source, _DragAndDropState state, Tizen::Graphics::FloatPoint& point, _DragAndDropItem* pItem); + + virtual ~_DragAndDropEvent(void); + + const _Control* GetSource(void) const; + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _DragAndDropEvent(const _Control& source); + + _DragAndDropEvent(const _DragAndDropEvent& rhs); + _DragAndDropEvent& operator =(const _DragAndDropEvent& rhs); + +private: + const _Control* __pSource; +}; // _DragAndDropEvent + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_DragAndDropItem.h b/src/ui/inc/FUi_DragAndDropItem.h new file mode 100644 index 0000000..fc36e2b --- /dev/null +++ b/src/ui/inc/FUi_DragAndDropItem.h @@ -0,0 +1,60 @@ +// +// 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_DragAndDropItem.h + * @brief This is the header file for the _DragAndDropItem class. + * + * This header file contains the declarations of the %_DragAndDropItem class. + */ + +#ifndef _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_ +#define _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_ + +#include + +namespace Tizen { namespace Ui +{ + +enum _DragAndDropType +{ + _DRAG_AND_DROP_TYPE_TEXT = 0x0001, +}; + +class _OSP_EXPORT_ _DragAndDropItem + : public Tizen::Base::Object +{ +public: + static _DragAndDropItem* CreateInstanceN(_DragAndDropType type, const Tizen::Base::String& data); + virtual ~_DragAndDropItem(void); + + _DragAndDropType GetDataType(void) const; + Tizen::Base::String GetData(void) const; + +private: + _DragAndDropItem(_DragAndDropType type, const Tizen::Base::String& data); + _DragAndDropItem(const _DragAndDropItem& rhs); + _DragAndDropItem& operator =(const _DragAndDropItem& rhs); + +private: + _DragAndDropType __type; + Tizen::Base::String __data; +}; // _DragAndDropItem + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_ diff --git a/src/ui/inc/FUi_EcoreEvas.h b/src/ui/inc/FUi_EcoreEvas.h index dec9c1d..aeadcc3 100644 --- a/src/ui/inc/FUi_EcoreEvas.h +++ b/src/ui/inc/FUi_EcoreEvas.h @@ -118,11 +118,13 @@ public: bool IsWindowActivationEnabled(const _Window& window); void SetWindowLevel(const _Window& window, _WindowLevel level); _WindowLevel GetWindowLevel(const _Window& window) const; - void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds); - void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds); + void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds, bool resizeOnly = false); + void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds, bool resizeOnly = false); void SetWindowVisibleState(const _Window& window, bool visibleState); void AllowSetWindowBounds(bool allow); bool IsWindowVisible(const _Window& window); + Tizen::Graphics::Rectangle GetWindowBounds(const _Window& window) const; + void SetPartialScreenEnabled(const _Window& window); result SetEventPropagation(const _Control& control, bool enable); result SetFocus(const _Control& control, bool focus); @@ -141,6 +143,18 @@ public: bool IsAccessibilityScreenReaderActivated(void); + void SetDragAndDropEnabled(const _Window& window); + result DragAndDropBegin(const _Window& window, const Tizen::Base::String& string); + result DragAndDropDrop(const _Window& window); + Tizen::Graphics::Point GetDropPosition(void); + Tizen::Base::String GetDropData(void); + void SetDragAndDropState(bool state); + bool GetDragAndDropState(void) const; + void SetDragAndDropSourceHandle(_ControlHandle handle); + _ControlHandle GetDragAndDropSourceHandle(void) const; + void SetDragAndDropTargetHandle(_ControlHandle handle); + _ControlHandle GetDragAndDropTargetHandle(void) const; + // [ToDo] Remove API bool GetFloatingMode(void) const; Tizen::Graphics::Rectangle GetIndicatorBounds(const _Window& window) const; @@ -187,6 +201,19 @@ private: const _Control* __pFrame; bool __changeBounds; bool __openClipboard; + + Ecore_Event_Handler* __pDragAndDropEnter; + Ecore_Event_Handler* __pDragAndDropPosition; + Ecore_Event_Handler* __pDragAndDropLeave; + Ecore_Event_Handler* __pDragAndDropDrop; + Ecore_Event_Handler* __pDragAndDropSelection; + Ecore_Event_Handler* __pDragAndDropFinish; + Ecore_Event_Handler* __pDragAndDropStatus; + + Tizen::Base::String __dropData; + bool __dragAndDropState; + _ControlHandle __dragAndDropSourceHandle; + _ControlHandle __dragAndDropTargetHandle; }; // _EcoreEvas }} // Tizen::Ui diff --git a/src/ui/inc/FUi_FocusManagerImpl.h b/src/ui/inc/FUi_FocusManagerImpl.h index 79ee018..7130e98 100644 --- a/src/ui/inc/FUi_FocusManagerImpl.h +++ b/src/ui/inc/FUi_FocusManagerImpl.h @@ -96,8 +96,10 @@ public: static void ReleaseInstance(void); bool IsFocusModeStateEnabled(void) const; + void SetFocusModeStateEnabled(bool enabled); bool IsForwardDirection(void) const; bool IsFocusable(_Control* pControl) const; + bool IsFocusControlListControl(_Control* pControl) const; private: /** @@ -132,7 +134,6 @@ private: void StartFocusTraversal(_Control* pControl, FocusDirection focusDirection); int GetNextIndex(int currentIndex, FocusDirection focusDirection, const Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const; _Control* FindTraversalControlFromChild(_Control* pControl); - bool IsFocusControlListControl(_Control* pControl) const; private: static _FocusManagerImpl* __pInstance; diff --git a/src/ui/inc/FUi_IDragAndDropEventListener.h b/src/ui/inc/FUi_IDragAndDropEventListener.h new file mode 100644 index 0000000..eb3872c --- /dev/null +++ b/src/ui/inc/FUi_IDragAndDropEventListener.h @@ -0,0 +1,96 @@ +// +// 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_IDragAndDropEventListener.h + * @brief This is the header file for the %_IDragAndDropEventListener interface. + * + * This header file contains the declarations of the %_IDragAndDropEventListener interface. @n + * If the item event is generated, a method of this interface will be called. @n + * The applications that perform tasks related to the item event, must call methods of this interface. + */ + +#ifndef _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_ + +#include +#include +#include "FUi_DragAndDropItem.h" + +namespace Tizen { namespace Ui +{ +class _Control; + +class _OSP_EXPORT_ _IDragAndDropEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_IDragAndDropEventListener(void) {} + + virtual void OnDragAndDropBeginning(const _Control& source) = 0; + virtual void OnDragAndDropDropping(const _Control& source) = 0; + virtual void OnDragAndDropEntered(const _Control& source) = 0; + virtual void OnDragAndDropMoved(const _Control& source, const Tizen::Graphics::FloatPoint& dragPosition) = 0; + virtual void OnDragAndDropLeft(const _Control& source) = 0; + virtual void OnDragAndDropDropped(const _Control& source, const _DragAndDropItem& item) = 0; + virtual void OnDragAndDropCanceled(const _Control& source) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + virtual void _IDragAndDropEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + virtual void _IDragAndDropEventListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + virtual void _IDragAndDropEventListener_Reserved3(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + virtual void _IDragAndDropEventListener_Reserved4(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + virtual void _IDragAndDropEventListener_Reserved5(void) {} +}; // _IDragAndDropEventListener + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchEventListener.h b/src/ui/inc/FUi_ITouchEventListener.h index c381591..ae8ce7a 100644 --- a/src/ui/inc/FUi_ITouchEventListener.h +++ b/src/ui/inc/FUi_ITouchEventListener.h @@ -33,7 +33,6 @@ namespace Tizen { namespace Ui class _Control; class _TouchInfo; -class _MouseInfo; /** * @interface _ITouchEventListener @@ -46,7 +45,6 @@ class _MouseInfo; */ class _ITouchEventListener : virtual public _IUiEventListener - , virtual public Tizen::Base::Runtime::IEventListener { // Operation public: @@ -97,13 +95,7 @@ public: */ virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; - virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo){return false;} - - virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo){return false;} - - virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo){return false;} - - virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo){return false;} + virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return false;} }; // _ITouchEventListener }} // Tizen::Ui diff --git a/src/ui/inc/FUi_ITouchEventPreviewer.h b/src/ui/inc/FUi_ITouchEventPreviewer.h index a1843f0..516f4af 100644 --- a/src/ui/inc/FUi_ITouchEventPreviewer.h +++ b/src/ui/inc/FUi_ITouchEventPreviewer.h @@ -34,7 +34,6 @@ namespace Tizen { namespace Ui class _Control; class _TouchInfo; -class _MouseInfo; /** * @interface _ITouchEventPreviewer @@ -47,7 +46,6 @@ class _MouseInfo; */ class _ITouchEventPreviewer : virtual public _IUiEventPreviewer - , virtual public Tizen::Base::Runtime::IEventListener { // Operation public: @@ -98,13 +96,7 @@ public: */ virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; - virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} - - virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} - - virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} - - virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;} }; // _ITouchEventPreviewer }} // Tizen::Ui diff --git a/src/ui/inc/FUi_IUiEventManager.h b/src/ui/inc/FUi_IUiEventManager.h index da702a2..8da9e79 100644 --- a/src/ui/inc/FUi_IUiEventManager.h +++ b/src/ui/inc/FUi_IUiEventManager.h @@ -49,6 +49,7 @@ public: virtual result UnregisterKeyEventHandler(const _Control& control) = 0; virtual result UnregisterTouchEventHandler(const _Control& control) = 0; virtual result PostEvent(const _UiEvent& event) = 0; + virtual void ClearEventQueue(void) = 0; }; // _IUiEventManager }} // Tizen::Ui diff --git a/src/ui/inc/FUi_ModalLoopManager.h b/src/ui/inc/FUi_ModalLoopManager.h index d3a84f7..12a7675 100644 --- a/src/ui/inc/FUi_ModalLoopManager.h +++ b/src/ui/inc/FUi_ModalLoopManager.h @@ -64,6 +64,7 @@ public: int BeginMainLoop(unsigned long timeOut, int exitCode); int EndMainLoop(int exitCode, bool endAllLoops); int GetLastExitCode(void); + void SetLastExitCode(int lastExitCode); virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); diff --git a/src/ui/inc/FUi_ResourceColorPickerConfig.h b/src/ui/inc/FUi_ResourceColorPickerConfig.h index bd8aad5..dbf8147 100644 --- a/src/ui/inc/FUi_ResourceColorPickerConfig.h +++ b/src/ui/inc/FUi_ResourceColorPickerConfig.h @@ -58,7 +58,7 @@ DECLARE_UI_CONFIG(COLORPICKER); DECLARE_DIMENSION_CONFIG(DEFAULT_SIZE, 1); DECLARE_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 2); //Shape config - DECLARE_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 1); + DECLARE_SHAPE_CONFIG(LEFT_RIGHT_MARGIN, 1); DECLARE_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 2); DECLARE_SHAPE_CONFIG(BAR_TOP_MARGIN, 3); DECLARE_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 4); @@ -71,6 +71,7 @@ DECLARE_UI_CONFIG(COLORPICKER); DECLARE_SHAPE_CONFIG(BAR_WIDTH, 11); DECLARE_SHAPE_CONFIG(DIVIDER_MARGIN, 12); DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 13); + DECLARE_SHAPE_CONFIG(HEIGHT, 14); //Fixed Value config DECLARE_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1); DECLARE_END_UI_CONFIG(COLORPICKER); diff --git a/src/ui/inc/FUi_ResourceConfigLoader.h b/src/ui/inc/FUi_ResourceConfigLoader.h index 9e993a3..336db29 100644 --- a/src/ui/inc/FUi_ResourceConfigLoader.h +++ b/src/ui/inc/FUi_ResourceConfigLoader.h @@ -36,7 +36,7 @@ namespace Tizen { namespace Base { namespace Tizen { namespace Ui { namespace _Resource { -typedef bool (*_Init_Func)(MapContainer& table, const Tizen::Base::String& mode); +typedef bool (*_Init_Func)(MapContainer& table, const Tizen::Base::String& mode, bool bPreInit); class ConfigLoader { diff --git a/src/ui/inc/FUi_ResourceConfigMacro.h b/src/ui/inc/FUi_ResourceConfigMacro.h index 433bd16..1d3ad80 100644 --- a/src/ui/inc/FUi_ResourceConfigMacro.h +++ b/src/ui/inc/FUi_ResourceConfigMacro.h @@ -273,10 +273,10 @@ static const int __DIMMINGLAYER__ = 40; }\ }\ };\ - static void AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version);\ - static bool Initialize(MapContainer & table, const Tizen::Base::String & mode)\ + static void AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version, bool bPreInit);\ + static bool Initialize(MapContainer & table, const Tizen::Base::String & mode, bool bPreInit)\ {\ - AddConfig(table, mode, GetAPIVersion());\ + AddConfig(table, mode, GetAPIVersion(), bPreInit);\ return true;\ };\ static const int _VALUE_ = TypeDefined::__##x##__ << 24; @@ -298,7 +298,7 @@ extern int _SCREEN_HEIGHT_;\ }}\ namespace Tizen { namespace Ui { namespace _Resource\ {\ -void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version)\ +void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version, bool bPreInit)\ { #define START_UI_CONFIG_API_VERSION(ver)\ @@ -313,14 +313,16 @@ void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode #define END_UI_CONFIG_MODE(_mode)\ } -#define ADD_DIMENSION_CONFIG(key, width, height) AddDimensionConfig(table, key##_DIMENSION, width, height); -#define ADD_COLOR_CONFIG(key, value) AddColorConfig(table, key##_COLOR, #value);\ +#define ADD_DIMENSION_CONFIG(key, width, height) if(!bPreInit)AddDimensionConfig(table, key##_DIMENSION, width, height); +#define ADD_COLOR_CONFIG(key, value) if(bPreInit)AddColorConfig(table, key##_COLOR, #value);\ -#define ADD_SHAPE_CONFIG(key, value) AddShapeConfig(table, key##_SHAPE, value); -#define ADD_FIXED_VALUE_CONFIG(key, value) AddFixedValueConfig(table, key##_FIXED_VALUE, value); -#define ADD_IMAGE_CONFIG(key, value) AddImageConfig(table, key##_IMAGE, #value); +#define ADD_SHAPE_CONFIG(key, value) if(!bPreInit)AddShapeConfig(table, key##_SHAPE, value); +#define ADD_FIXED_VALUE_CONFIG(key, value) if(!bPreInit)AddFixedValueConfig(table, key##_FIXED_VALUE, value); +#define ADD_IMAGE_CONFIG(key, value) if(bPreInit)AddImageConfig(table, key##_IMAGE, #value); #define START_ANIMATION_CONFIG(key)\ + if(bPreInit)\ + {\ Map* pAnimationMap = table.GetAnimationMap();\ if (pAnimationMap != null)\ {\ @@ -339,7 +341,7 @@ void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_ANIMATION);\ pItem->SetRawDataAnimation(pList);\ pAnimationMap->Add(key##_ANIMATION, pItem);\ - } + }} #define END_UI_CONFIG(control)\ };\ diff --git a/src/ui/inc/FUi_ResourceEditConfig.h b/src/ui/inc/FUi_ResourceEditConfig.h index 426240b..276376d 100644 --- a/src/ui/inc/FUi_ResourceEditConfig.h +++ b/src/ui/inc/FUi_ResourceEditConfig.h @@ -124,6 +124,9 @@ DECLARE_UI_CONFIG(EDIT); DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, 43) DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_X, 44) DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, 45) + DECLARE_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_WIDTH, 46) + DECLARE_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_HEIGHT, 47) + DECLARE_END_UI_CONFIG(EDIT); #endif //_FUI_RESOURCE_EDIT_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceFooterConfig.h b/src/ui/inc/FUi_ResourceFooterConfig.h index d2c85e0..d77672e 100644 --- a/src/ui/inc/FUi_ResourceFooterConfig.h +++ b/src/ui/inc/FUi_ResourceFooterConfig.h @@ -317,6 +317,8 @@ DECLARE_UI_CONFIG(FOOTER); DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 44); DECLARE_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 45); DECLARE_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 46); + DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 47); + DECLARE_DIMENSION_CONFIG(SOFTKEY_RECT, 1); DECLARE_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 2); diff --git a/src/ui/inc/FUi_ResourceFormConfig.h b/src/ui/inc/FUi_ResourceFormConfig.h index d575c84..b67ca4b 100644 --- a/src/ui/inc/FUi_ResourceFormConfig.h +++ b/src/ui/inc/FUi_ResourceFormConfig.h @@ -30,6 +30,7 @@ DECLARE_UI_CONFIG(FORM); DECLARE_SHAPE_CONFIG(INDICATOR_HEIGHT, 2) DECLARE_SHAPE_CONFIG(INDICATOR_MINIMIZE_WIDTH, 3) DECLARE_SHAPE_CONFIG(INDICATOR_MINIMIZE_HEIGHT, 4) + DECLARE_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 5) DECLARE_END_UI_CONFIG(FORM); #endif //_FUI_RESOURCE_FORM_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceHeaderConfig.h b/src/ui/inc/FUi_ResourceHeaderConfig.h index 2da5abb..0b2b501 100644 --- a/src/ui/inc/FUi_ResourceHeaderConfig.h +++ b/src/ui/inc/FUi_ResourceHeaderConfig.h @@ -231,8 +231,8 @@ DECLARE_UI_CONFIG(HEADER); DECLARE_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 13); DECLARE_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 14); DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE, 15); - DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 16); - DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 17); + //DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 16); + //DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 17); DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 18); DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 19); DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_DESCRIPTION, 20); @@ -267,12 +267,12 @@ DECLARE_UI_CONFIG(HEADER); DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 49); DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 50); DECLARE_SHAPE_CONFIG(BADGE_HEIGHT, 51); - DECLARE_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 52); - DECLARE_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 53); - DECLARE_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 54); - DECLARE_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 55); - DECLARE_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 56); - DECLARE_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 57); + //DECLARE_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 52); + //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 53); + //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 54); + //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 55); + //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 56); + //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 57); DECLARE_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 58); DECLARE_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 59); DECLARE_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_MARGIN, 60); @@ -299,7 +299,8 @@ DECLARE_UI_CONFIG(HEADER); //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_SHAPE_CONFIG(BADGE_MIN_WIDTH, 84); + DECLARE_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 85); DECLARE_END_UI_CONFIG(HEADER); diff --git a/src/ui/inc/FUi_ResourceManager.h b/src/ui/inc/FUi_ResourceManager.h index 9d4fec5..d62c571 100644 --- a/src/ui/inc/FUi_ResourceManager.h +++ b/src/ui/inc/FUi_ResourceManager.h @@ -58,6 +58,7 @@ namespace Tizen { namespace Ui { namespace _Resource class StringLoader; class ConfigLoader; class MapContainer; +class ConfigParser; }}} namespace Tizen { namespace Ui @@ -122,11 +123,6 @@ enum _ResourceFeedbackPattern _RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP }; // enum _ResourceFeedbackPattern - namespace Controls { namespace __Internal - { - const int OVERLAY_REGION_MIN_LENGTH = 16; - }}//Tizen::Ui::Controls::__Internal - #define GET_SHAPE_CONFIG(shapeId, orientation, x)\ Tizen::Ui::_ResourceManager::GetInstance()->GetShape(Tizen::Ui::_Resource::_##shapeId##_SHAPE, orientation, x) @@ -166,8 +162,9 @@ enum _ResourceFeedbackPattern class _OSP_EXPORT_ _ResourceManager { public: + static void PreInitialize(void); static _ResourceManager* GetInstance(void); - result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap); + result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, const Tizen::Graphics::Color& 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); @@ -194,7 +191,9 @@ private: ~_ResourceManager(void); static void CreateInstance(void); + void PostInitialize(void); void DoPostInitialization(void); + void SelectConfigTable(void); _ResourceManager(const _ResourceManager& rhs); _ResourceManager& operator =(const _ResourceManager& rhs); @@ -207,14 +206,14 @@ 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, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap); + result GetBitmapInternalN(const Tizen::Base::String& fileName, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, const Tizen::Graphics::Color& 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); result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Tizen::Graphics::FloatDimension& value); result LoadThemeInformation(Tizen::Base::String& systemTheme, Tizen::Base::String& userTheme); bool InitializeTheme(_Resource::MapContainer& mapContainer); - void LoadConfig(const Tizen::Base::String& resolution, _Resource::MapContainer& mapContainer, int width, int height); + void LoadConfig(const Tizen::Base::String& resolution, _Resource::MapContainer& mapContainer, int width, int height, bool preInit); _Resource::MapContainer* GetMapContainer(MapContainerType type); void SetSystemColor(void); Tizen::Base::String FindImagePath(const Tizen::Base::String& fileName, int& findFolder, bool isCustom); @@ -233,6 +232,7 @@ private: }; _Resource::StringLoader* __pStringLoader; + _Resource::ConfigParser* __pParser; _Resource::MapContainer* __pMapContainer[MAP_CONTAINER_TYPE_MAX]; Tizen::Graphics::_ICoordinateSystemTransformer* __pTransformer; Tizen::Base::String __appBasePortraitMode; @@ -245,6 +245,8 @@ private: Tizen::Base::String __userTheme; bool __appliedUserTheme; bool __initializeFeedback; + bool __preInitialize; + bool __postInitialize; int __appBaseWidth; int __appBaseHeight; int __targetWidth; diff --git a/src/ui/inc/FUi_ResourceMap.h b/src/ui/inc/FUi_ResourceMap.h index f83508e..28a01db 100644 --- a/src/ui/inc/FUi_ResourceMap.h +++ b/src/ui/inc/FUi_ResourceMap.h @@ -97,50 +97,6 @@ public: __charKey= null; __pRefCount = null; } - /* - ResourceKey& operator =(int value) - { - if(__intKey == value) - { - return *this; - } - if (*__pRefCount == 1) - { - delete[] __charKey; - delete __pRefCount; - } - else - { - --(*__pRefCount); - } - __charKey= null; - __pRefCount = null - __intKey = value; - return *this; - } - - ResourceKey& operator =(char* value) - { - if (strcmp(__charKey, value) == 0) - { - return *this; - } - else - { - __intKey = 0; - if (__bAllocate && __charKey) - { - delete [] __charKey; - } - int len = strlen(value); - __charKey = new (std::nothrow) char [len+1]; - strcpy(__charKey, value); - __charKey[len] = '\0'; - __bAllocate = true; - } - return *this; - } -*/ ResourceKey(const ResourceKey& rhs) :__intKey(0) , __hash(0) @@ -226,7 +182,7 @@ public: return hash; } -private: +//private: int __intKey; int __hash; char* __charKey; @@ -713,6 +669,22 @@ public: SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); __modifiedItemTable.Construct(0,0,*__pProvider, *__pComparer); } + + virtual result Add(const ResourceKey& key, ResourceItem*& value) + { + result r = E_SYSTEM; + bool exist = false; + Tizen::Base::Collection::HashMapT::ContainsKey(key,exist); + if(exist == false) + { + r = Tizen::Base::Collection::HashMapT::Add(key,value); + } + else + { + r = E_SUCCESS; + } + return r; + } virtual ~Map(void) { result r = E_SUCCESS; diff --git a/src/ui/inc/FUi_ResourceMapContainer.h b/src/ui/inc/FUi_ResourceMapContainer.h index 23f7473..d2997b0 100644 --- a/src/ui/inc/FUi_ResourceMapContainer.h +++ b/src/ui/inc/FUi_ResourceMapContainer.h @@ -66,6 +66,8 @@ public: Map* GetShapeMap(void) const; Map* GetAnimationMap(void) const; Map* GetPalette(void) const; + Map* GetPalette(const Tizen::Base::String& name) const; + void SetPalette(const Tizen::Base::String& name); void SetVersion(const Tizen::Base::String& information); Tizen::Base::String GetVersion(void); void SetThemeName(const Tizen::Base::String& ThemeName); @@ -86,7 +88,11 @@ private: Map* __pImageMap; Map* __pShapeMap; Map* __pAnimationMap; + Map* __pBlackPalette; + Map* __pWhitePalette; + Map* __pDefaultPalette; Map* __pPalette; + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; Tizen::Base::Collection::IComparerT* __pComparer; diff --git a/src/ui/inc/FUi_ResourceOptionMenuConfig.h b/src/ui/inc/FUi_ResourceOptionMenuConfig.h index 9214e04..614e2bd 100644 --- a/src/ui/inc/FUi_ResourceOptionMenuConfig.h +++ b/src/ui/inc/FUi_ResourceOptionMenuConfig.h @@ -72,6 +72,7 @@ DECLARE_UI_CONFIG(OPTIONMENU); 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_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 28); DECLARE_END_UI_CONFIG(OPTIONMENU); diff --git a/src/ui/inc/FUi_ResourceTabBarConfig.h b/src/ui/inc/FUi_ResourceTabBarConfig.h index 734c9b9..d6c2eb5 100644 --- a/src/ui/inc/FUi_ResourceTabBarConfig.h +++ b/src/ui/inc/FUi_ResourceTabBarConfig.h @@ -51,8 +51,8 @@ DECLARE_UI_CONFIG(TABBAR); DECLARE_SHAPE_CONFIG(ITEM_MAX_WIDTH, 7); DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 8); DECLARE_SHAPE_CONFIG(HEIGHT, 9); - DECLARE_SHAPE_CONFIG(ITEM_COUNT_MAX, 10); - DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 11); + DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 10); + DECLARE_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 1); DECLARE_END_UI_CONFIG(TABBAR); #endif //_FUI_RESOURCE_TAB_BAR_CONFIG_H_ diff --git a/src/ui/inc/FUi_TouchManager.h b/src/ui/inc/FUi_TouchManager.h index 333f67d..ddf22ac 100644 --- a/src/ui/inc/FUi_TouchManager.h +++ b/src/ui/inc/FUi_TouchManager.h @@ -175,6 +175,8 @@ class _Control; class _TouchEventArg; class _ITouchEventListener; +const int DEVICE_COUNT = 999; + class _OSP_EXPORT_ _TouchManager { public: @@ -388,6 +390,10 @@ public: _Control* GetChangedTouchableTarget(void); + void SetListenerOnly(int pointId, bool listenerOnly); + + bool IsListenerOnly(int pointId) const; + private: /** * This is the default class constructor. @@ -426,6 +432,7 @@ private: bool __captureAllowOwnerBounds; bool __isSendingDelayedEvent; bool __touchCanceledOnGestureSuccess; + bool __listenerOnly[DEVICE_COUNT]; _Control* __changedTouchableTarget; }; // _TouchManager diff --git a/src/ui/inc/FUi_TouchTapGestureDetector.h b/src/ui/inc/FUi_TouchTapGestureDetector.h index 8a732e2..2bfecc0 100644 --- a/src/ui/inc/FUi_TouchTapGestureDetector.h +++ b/src/ui/inc/FUi_TouchTapGestureDetector.h @@ -68,6 +68,10 @@ public: virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + void EnableToDeleteTimer(bool deleteTimer); + void ResetGestureTimerManager(void); + bool IsTouchCanceled(void) const; + private: _TouchTapGestureDetector(const _TouchTapGestureDetector& value); _TouchTapGestureDetector& operator =(const _TouchTapGestureDetector& value); @@ -78,11 +82,11 @@ private: int __tapCount; int __interval; int __touchCount; - float __oneTapMoveAllowance; - bool __oneTapIsInBounds; unsigned int __maxPointId; Tizen::Graphics::FloatPoint __oneTapStartPoint; _TouchGestureTimerManager* __pGestureTimerManager; + bool __deleteTimer; + bool __touchCanceled; class _TapInfo; Tizen::Base::Collection::ArrayListT<_TapInfo*>* __pTapInfoList; diff --git a/src/ui/inc/FUi_Types.h b/src/ui/inc/FUi_Types.h index 00b4ace..2342df4 100644 --- a/src/ui/inc/FUi_Types.h +++ b/src/ui/inc/FUi_Types.h @@ -23,6 +23,8 @@ #include #include +#define PARTIAL_SCREEN // Temp + namespace Tizen { namespace Ui { diff --git a/src/ui/inc/FUi_UiBuilderConfig.h b/src/ui/inc/FUi_UiBuilderConfig.h index ae5dddd..0e602f0 100644 --- a/src/ui/inc/FUi_UiBuilderConfig.h +++ b/src/ui/inc/FUi_UiBuilderConfig.h @@ -24,7 +24,6 @@ #ifndef _FUI_INTERNAL_UI_BUILDER_CONFIG_H_ #define _FUI_INTERNAL_UI_BUILDER_CONFIG_H_ -const int UIBUILDER_CONTROL_TEXT_MAX_LENGTH = 1000; const int UIBUILDER_CONTROL_ELEMENT_NUMBER = 100; const int UIBUILDER_CONTROL_MAX_COUNT = 100; diff --git a/src/ui/inc/FUi_UiEventManager.h b/src/ui/inc/FUi_UiEventManager.h index a885a7d..41e6282 100644 --- a/src/ui/inc/FUi_UiEventManager.h +++ b/src/ui/inc/FUi_UiEventManager.h @@ -86,6 +86,8 @@ public: result GenerateKeyEvent(KeyState keyState, _KeyCode keyCode, _KeyModifier keyModifier, bool async = true); result GenerateTouchEvent(_TouchStatus touchStatus, int x, int y, bool async = true); + void ClearEventQueue(void); + _IUiEventManager* GetEventManager(void) const; private: diff --git a/src/ui/inc/FUi_UiTouchEvent.h b/src/ui/inc/FUi_UiTouchEvent.h index 63c9ddf..fb53d13 100644 --- a/src/ui/inc/FUi_UiTouchEvent.h +++ b/src/ui/inc/FUi_UiTouchEvent.h @@ -43,7 +43,15 @@ enum _TouchStatus _TOUCH_FOCUS_IN = TOUCH_FOCUS_IN, /**< Touch focus-in event type */ _TOUCH_FOCUS_OUT = TOUCH_FOCUS_OUT, /**< Touch focus-out event type */ _TOUCH_CANCELED = TOUCH_CANCELED, /**< Touch canceled event type */ - _WHEEL_MOVED = TOUCH_CANCELED+1, /**< Touch moved event type */ + _TOUCH_WHEELED = TOUCH_CANCELED+1, /**< Touch wheeled event type */ +}; + +enum _TouchButtons +{ + _TOUCH_BUTTON_NONE = 0, + _TOUCH_BUTTON_LEFT, + _TOUCH_BUTTON_WHEEL, + _TOUCH_BUTTON_RIGHT }; enum _MouseButtons @@ -58,8 +66,8 @@ class _OSP_EXPORT_ _TouchInfo { public: _TouchInfo(void); - _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp); - _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp); + _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE); + _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE); _TouchInfo(const _TouchInfo& rhs); _TouchInfo& operator =(const _TouchInfo& rhs); ~_TouchInfo(void); @@ -91,68 +99,19 @@ public: bool IsFlicked(void) const; long long GetTimeStamp(void) const; - void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp); - void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp); - -private: - unsigned long __pointId; - _TouchStatus __touchStatus; - Tizen::Graphics::FloatPoint __currentPosition; - bool __isFlicked; - long long __timeStamp; -}; // _TouchInfo - -class _OSP_EXPORT_ _MouseInfo -{ -public: - _MouseInfo(void); - _MouseInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, const bool isFlick, long long timeStamp); - _MouseInfo(const _MouseInfo& rhs); - _MouseInfo& operator =(const _MouseInfo& rhs); - ~_MouseInfo(void); - -public: - /** - * This method returns the touch status. - * - * @since 2.0 - * @return The touch status - */ - _TouchStatus GetTouchStatus(void) const; - - /** - * This method returns the current position of the touch event. - * - * @since 2.0 - * @return The current position of the touch event - */ - Tizen::Graphics::FloatPoint GetCurrentPosition(void) const; - - /** - * This method returns the touch pointId. - * - * @since 2.0 - * @return The touch pointId - */ - unsigned long GetPointId(void) const; - int GetZAxis(void) const; - - int GetButtons(void) const; - - bool IsFlicked(void) const; - long long GetTimeStamp(void) const; - void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, int zAxis, int buttons, bool isFlick, long long timeStamp); - void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, bool isFlick, long long timeStamp); + unsigned int GetButtons(void) const; + void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE); + void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE); private: unsigned long __pointId; _TouchStatus __touchStatus; Tizen::Graphics::FloatPoint __currentPosition; - int __zAxis; - int __buttons; bool __isFlicked; long long __timeStamp; + int __zAxis; + unsigned int __buttons; }; // _TouchInfo class _ITouchEventListener; @@ -210,58 +169,6 @@ private: std::tr1::shared_ptr > __pForcedControlList; }; // _UiTouchEvent -/** -* This is internal. If used in an application, the application can get rejected during the certification process. -* @class _UiMouseEvent -* @brief This class impliments _UiMouseEvent and -* fire the Window Event object of a Ui Control. -*/ -class _OSP_EXPORT_ _UiMouseEvent - : public _UiEvent -{ -// Lifecycle -public: - /** - * This is the default class constructor. - * - */ - _UiMouseEvent(const _UiObjectHandle& destination, const _MouseInfo& mouseInfo, _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE, const _UiObjectHandle& source = _UiObjectHandle()); - _UiMouseEvent(const _UiMouseEvent& rhs); - - /** - * This is the default class destructor. - * - */ - virtual ~_UiMouseEvent(void); - -public: - _UiMouseEvent& operator =(const _UiMouseEvent& rhs); - -public: - const _MouseInfo* GetTouchInfo(void) const; - -private: - virtual _UiMouseEvent* CloneN(void) const; - virtual _UiEventType GetEventType(void) const; - virtual bool IsEventEnabled(const _Control& control) const; - virtual result OnPreviewEventProcessing(const _Control& control, bool& isFiltered); - virtual result OnEventProcessing(const _Control& control, bool& isFiltered); - virtual result OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered); - virtual result OnEventHandled(const _Control& control); - -private: - result ProcessGesture(const _Control& control, bool& isFiltered); - result FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered); - result FirePreviewListener(const _ITouchEventPreviewer* pListener, const _Control* pControl, bool& isFiltered); - Tizen::Graphics::FloatPoint GetRelativePoint(const _Control& control, const Tizen::Graphics::FloatPoint& point) const; - result ResetTouchInfo(const _Control* pControl, const _MouseInfo& mouseInfo); - bool ExistGlobalGesture(void); - -private: - _MouseInfo __mouseInfo; - std::tr1::shared_ptr > __pForcedControlList; -}; - }} // Tizen::Ui #endif //_FUI_INTERNAL_UI_TOUCH_EVENT_H_ diff --git a/src/ui/inc/FUi_Window.h b/src/ui/inc/FUi_Window.h index 6d523c3..db01d0b 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 __destroying; Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement; Tizen::Ui::Animations::_NativeLayer* __pLayer; diff --git a/src/ui/layout/FUi_LayoutRelativeLayout.cpp b/src/ui/layout/FUi_LayoutRelativeLayout.cpp old mode 100755 new mode 100644 diff --git a/src/ui/resource/FUi_ResourceColorPickerConfig.cpp b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp index 3fc337b..657fb2e 100644 --- a/src/ui/resource/FUi_ResourceColorPickerConfig.cpp +++ b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp @@ -57,15 +57,8 @@ START_UI_CONFIG(COLORPICKER); ADD_IMAGE_CONFIG(SATURATION_BAR__LANDSCAPE_NORMAL, #00_color_picker_saturation_h.png); ADD_IMAGE_CONFIG(BAR_BG_LANDSCAPE_NORMAL, #00_color_picker_custom_color_h.png); - START_UI_CONFIG_MODE(800x480); - { - ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 800, 225); - } - END_UI_CONFIG_MODE(800x480); - START_UI_CONFIG_MODE(720x1280); { - ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 16); ADD_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 19); ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 26); ADD_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 15); @@ -78,7 +71,8 @@ START_UI_CONFIG(COLORPICKER); ADD_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1); ADD_SHAPE_CONFIG(BAR_WIDTH, 477); ADD_SHAPE_CONFIG(DIVIDER_MARGIN, 16); - ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 656); + ADD_SHAPE_CONFIG(LEFT_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(HEIGHT, 336); ADD_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 45, 45); ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 688, 336); } @@ -86,9 +80,7 @@ START_UI_CONFIG(COLORPICKER); START_UI_CONFIG_MODE(1280x720); { - ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 184); ADD_SHAPE_CONFIG(BAR_WIDTH, 702); - ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 1216); ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 1248, 336); } END_UI_CONFIG_MODE(1280x720); diff --git a/src/ui/resource/FUi_ResourceEditConfig.cpp b/src/ui/resource/FUi_ResourceEditConfig.cpp index e7ada32..fa25e06 100644 --- a/src/ui/resource/FUi_ResourceEditConfig.cpp +++ b/src/ui/resource/FUi_ResourceEditConfig.cpp @@ -102,8 +102,8 @@ START_UI_CONFIG(EDIT); ADD_SHAPE_CONFIG(FIELD_BOTTOM_MARGIN, 0); ADD_SHAPE_CONFIG(FIELD_TEXT_LEFT_MARGIN, 16); ADD_SHAPE_CONFIG(FIELD_TEXT_RIGHT_MARGIN, 16); - ADD_SHAPE_CONFIG(FIELD_TEXT_TOP_MARGIN, 10); - ADD_SHAPE_CONFIG(FIELD_TEXT_BOTTOM_MARGIN, 10); + ADD_SHAPE_CONFIG(FIELD_TEXT_TOP_MARGIN, 3); + ADD_SHAPE_CONFIG(FIELD_TEXT_BOTTOM_MARGIN, 3); ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_LEFT_MARGIN, 16); ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_RIGHT_MARGIN, 16); ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_TOP_MARGIN, 10); @@ -135,6 +135,8 @@ START_UI_CONFIG(EDIT); ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, 70); ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_X, 18); ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, 18); + ADD_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_WIDTH, 300); + ADD_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_HEIGHT, 40); ADD_DIMENSION_CONFIG(MIN_SIZE, 48, 60); ADD_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 48, 102); diff --git a/src/ui/resource/FUi_ResourceFooterConfig.cpp b/src/ui/resource/FUi_ResourceFooterConfig.cpp index dcefd9c..e7c2e39 100644 --- a/src/ui/resource/FUi_ResourceFooterConfig.cpp +++ b/src/ui/resource/FUi_ResourceFooterConfig.cpp @@ -333,8 +333,8 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(WIDTH, 720); ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 0); - ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 24); - ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 20); + ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32); ADD_SHAPE_CONFIG(FOOTER_ITEM_FONT_SIZE, 32); ADD_SHAPE_CONFIG(FOOTER_ITEM_ICON_SIZE, 63); ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, 63); @@ -347,12 +347,12 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_HEIGHT, 72); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_LEFT_MARGIN, 6); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_TOP_MARGIN, 6); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 26); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 32); ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30); ADD_SHAPE_CONFIG(SEGMENTED_ICON_TEXT_GAP, 20); ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MAX, 496); @@ -374,6 +374,7 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(SOFTKEY_1_LEFT_MARGIN, 8); ADD_SHAPE_CONFIG(SOFTKEY_ICON_SIZE, 92); ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 78); ADD_DIMENSION_CONFIG(SOFTKEY_RECT, 144, 117); ADD_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 207, 117); ADD_DIMENSION_CONFIG(SOFTKEY_DISPLAY_RECT_WITH_TEXT, 196, 92); @@ -385,8 +386,8 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(WIDTH, _SCREEN_HEIGHT_); ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 0); - ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 24); - ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 20); + ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32); ADD_SHAPE_CONFIG(FOOTER_ITEM_FONT_SIZE, 32); ADD_SHAPE_CONFIG(FOOTER_ITEM_ICON_SIZE, 63); ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, 63); @@ -399,12 +400,12 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_HEIGHT, 72); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_LEFT_MARGIN, 6); ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_TOP_MARGIN, 6); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 26); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 24); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 24); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 24); - ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 20); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 32); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 32); ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30); ADD_SHAPE_CONFIG(SEGMENTED_ICON_TEXT_GAP, 54); ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MAX, 1012); @@ -426,6 +427,7 @@ START_UI_CONFIG(FOOTER); ADD_SHAPE_CONFIG(SOFTKEY_1_LEFT_MARGIN, 8); ADD_SHAPE_CONFIG(SOFTKEY_ICON_SIZE, 92); ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 65); ADD_DIMENSION_CONFIG(SOFTKEY_RECT, 144, 117); ADD_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 207, 117); ADD_DIMENSION_CONFIG(SOFTKEY_DISPLAY_RECT_WITH_TEXT, 196, 92); diff --git a/src/ui/resource/FUi_ResourceFormConfig.cpp b/src/ui/resource/FUi_ResourceFormConfig.cpp index 97d9af3..b7b5d9f 100644 --- a/src/ui/resource/FUi_ResourceFormConfig.cpp +++ b/src/ui/resource/FUi_ResourceFormConfig.cpp @@ -39,11 +39,13 @@ START_UI_CONFIG(FORM); START_UI_CONFIG_MODE(720x1280); ADD_SHAPE_CONFIG(INDICATOR_WIDTH, 720); ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 60); + ADD_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 40); END_UI_CONFIG_MODE(720x1280); START_UI_CONFIG_MODE(1280x720); ADD_SHAPE_CONFIG(INDICATOR_WIDTH, _SCREEN_HEIGHT_); ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 60); + ADD_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 40); END_UI_CONFIG_MODE(1280x720); START_UI_CONFIG_MODE(1280x720); diff --git a/src/ui/resource/FUi_ResourceHeaderConfig.cpp b/src/ui/resource/FUi_ResourceHeaderConfig.cpp index 1ae5974..1a5336d 100644 --- a/src/ui/resource/FUi_ResourceHeaderConfig.cpp +++ b/src/ui/resource/FUi_ResourceHeaderConfig.cpp @@ -283,9 +283,9 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(RIGHT_MARGIN, 26); ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 50); - ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 44); - ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 44); - ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 42); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 42); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 30); ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32); ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32); ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30); @@ -297,8 +297,8 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 30);//720x1280 ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 30); ADD_SHAPE_CONFIG(BADGE_FONT_SIZE, 26); - ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20); - ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16); + //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20); + //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16); ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 96); ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 4); @@ -349,12 +349,14 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); ADD_SHAPE_CONFIG(BADGE_HEIGHT, 54); - ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45); - ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50); - ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64); - ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78); - ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92); - ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106); + //ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106); + ADD_SHAPE_CONFIG(BADGE_MIN_WIDTH, 30); + ADD_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 12); ADD_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 2); ADD_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 3); @@ -401,8 +403,8 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 30); ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 30); ADD_SHAPE_CONFIG(BADGE_FONT_SIZE, 26); - ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20); - ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16); + //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20); + //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16); ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 91); ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 7.5); @@ -410,7 +412,7 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_SEGMENTED_ITEM, 0); ADD_SHAPE_CONFIG(TITLE_HEIGHT_WITH_SEGMENTED_ITEM, 70); ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_SEGMENTED_ITEM, 70); - ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 30); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 34); ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH_WITH_TEXT, 183); @@ -453,12 +455,14 @@ START_UI_CONFIG(HEADER); ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); ADD_SHAPE_CONFIG(BADGE_HEIGHT, 54); - ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45); - ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50); - ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64); - ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78); - ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92); - ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106); + //ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92); + //ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106); + ADD_SHAPE_CONFIG(BADGE_MIN_WIDTH, 30); + ADD_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 12); ADD_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 2); ADD_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 3); diff --git a/src/ui/resource/FUi_ResourceListConfig.cpp b/src/ui/resource/FUi_ResourceListConfig.cpp index fe2b6aa..a3beed9 100644 --- a/src/ui/resource/FUi_ResourceListConfig.cpp +++ b/src/ui/resource/FUi_ResourceListConfig.cpp @@ -41,7 +41,7 @@ START_UI_CONFIG(LIST); ADD_IMAGE_CONFIG(BUTTON_EXPAND_OPENED_EFFECT, #00_button_expand_opened_ef.png); START_UI_CONFIG_MODE(720x1280); - ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 38); + ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 36); ADD_DIMENSION_CONFIG(LIST_MIN_SIZE, 90, 72); ADD_DIMENSION_CONFIG(GROUPEDLIST_MIN_SIZE, 270, 144); ADD_FIXED_VALUE_CONFIG(LIST_ITEM_MAX_COUNT, 99); diff --git a/src/ui/resource/FUi_ResourceListViewConfig.cpp b/src/ui/resource/FUi_ResourceListViewConfig.cpp index 0bb6264..5ee52e8 100644 --- a/src/ui/resource/FUi_ResourceListViewConfig.cpp +++ b/src/ui/resource/FUi_ResourceListViewConfig.cpp @@ -27,7 +27,7 @@ START_UI_CONFIG(LISTVIEW); END_UI_CONFIG_MODE(480x800); START_UI_CONFIG_MODE(720x1280); - ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 32); + ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 36); ADD_SHAPE_CONFIG(EMPTY_LIST_HORIZONTAL_SPACING, 38); ADD_SHAPE_CONFIG(ITEM_DEFAULT_HEIGHT, 90); ADD_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 44); @@ -41,8 +41,8 @@ START_UI_CONFIG(LISTVIEW); ADD_SHAPE_CONFIG(GROUPITEM_ELEMENT_LEFT_MARGIN, 26); ADD_SHAPE_CONFIG(GROUPITEM_ELEMENT_SPACING, 16); ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_HEIGHT, 4); - ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_LEFT_MARGIN, 0); - ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_BOTTOM_MARGIN, 14); + ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_LEFT_MARGIN, 0); + ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_BOTTOM_MARGIN, 0); ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN_ONE, 117); ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN, 16); ADD_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_HEIGHT, 74); diff --git a/src/ui/resource/FUi_ResourceMapContainer.cpp b/src/ui/resource/FUi_ResourceMapContainer.cpp index 81b6f6c..8c20f38 100644 --- a/src/ui/resource/FUi_ResourceMapContainer.cpp +++ b/src/ui/resource/FUi_ResourceMapContainer.cpp @@ -46,6 +46,9 @@ MapContainer::MapContainer(void) , __pImageMap(null) , __pShapeMap(null) , __pAnimationMap(null) + , __pBlackPalette(null) + , __pWhitePalette(null) + , __pDefaultPalette(null) , __pPalette(null) , __pProvider(null) , __pComparer(null) @@ -73,8 +76,12 @@ MapContainer::~MapContainer(void) __pShapeMap = null; delete __pAnimationMap; __pAnimationMap = null; - delete __pPalette; - __pPalette = null; + delete __pBlackPalette; + __pBlackPalette = null; + delete __pWhitePalette; + __pWhitePalette = null; + delete __pDefaultPalette; + __pDefaultPalette = null; delete __pProvider; __pProvider = null; delete __pComparer; @@ -92,9 +99,15 @@ MapContainer::CreateMap(_ResourceType type) __pColorMap = new (std::nothrow) Map(type); SysTryReturnVoidResult(NID_UI, __pColorMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); __pColorMap->Construct(500, 0.75f, *__pProvider, *__pComparer); - __pPalette = new (std::nothrow) Map(type); - SysTryReturnVoidResult(NID_UI, __pPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); - __pPalette->Construct(100, 0.75f, *__pProvider, *__pComparer); + __pBlackPalette = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pBlackPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pWhitePalette = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pWhitePalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pDefaultPalette = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pDefaultPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pDefaultPalette->Construct(100, 0.75f, *__pProvider, *__pComparer); + __pWhitePalette->Construct(100, 0.75f, *__pProvider, *__pComparer); + __pBlackPalette->Construct(100, 0.75f, *__pProvider, *__pComparer); } break; case RESOURCE_TYPE_DIMENSION: @@ -153,9 +166,17 @@ MapContainer::InitializeMap(_ResourceType type) { __pColorMap->Initialize(); } - if (__pPalette != null) + if (__pBlackPalette != null) { - __pPalette->Initialize(); + __pBlackPalette->Initialize(); + } + if (__pWhitePalette != null) + { + __pWhitePalette->Initialize(); + } + if (__pDefaultPalette != null) + { + __pDefaultPalette->Initialize(); } break; case RESOURCE_TYPE_DIMENSION: @@ -193,6 +214,46 @@ MapContainer::InitializeMap(_ResourceType type) } } Map* +MapContainer::GetPalette(const String& name) const +{ + if(name == L"black") + { + return __pBlackPalette; + } + else if(name == L"white") + { + return __pWhitePalette; + } + else if(name == L"default") + { + return __pDefaultPalette; + } + else + { + return null; + } +} +void +MapContainer::SetPalette(const String& name) +{ + if(name == L"black") + { + __pPalette = __pBlackPalette; + } + else if(name == L"white") + { + __pPalette = __pWhitePalette; + } + else if(name == L"default") + { + __pPalette = __pDefaultPalette; + } + else + { + SysAssert(0); + } +} +Map* MapContainer::GetPalette(void) const { return __pPalette; diff --git a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp old mode 100755 new mode 100644 diff --git a/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp index 1a92f09..9ef6b35 100644 --- a/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp +++ b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp @@ -84,6 +84,7 @@ START_UI_CONFIG(OPTIONMENU); 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); + ADD_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 40); } END_UI_CONFIG_MODE(720x1280); diff --git a/src/ui/resource/FUi_ResourcePopupConfig.cpp b/src/ui/resource/FUi_ResourcePopupConfig.cpp old mode 100755 new mode 100644 diff --git a/src/ui/resource/FUi_ResourceSearchBarConfig.cpp b/src/ui/resource/FUi_ResourceSearchBarConfig.cpp index ce8a0a0..ae1c604 100644 --- a/src/ui/resource/FUi_ResourceSearchBarConfig.cpp +++ b/src/ui/resource/FUi_ResourceSearchBarConfig.cpp @@ -67,8 +67,8 @@ START_UI_CONFIG(SEARCHBAR); { ADD_SHAPE_CONFIG(HORIZONTAL_MARGIN, 16); ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 10); - ADD_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 18); - ADD_SHAPE_CONFIG(ICON_HORIZONTAL_MARGIN, 18); + ADD_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 16); + ADD_SHAPE_CONFIG(ICON_HORIZONTAL_MARGIN, 16); ADD_SHAPE_CONFIG(ICON_WIDTH, 45); ADD_SHAPE_CONFIG(ICON_HEIGHT, 45); ADD_SHAPE_CONFIG(MIN_HEIGHT, 86); @@ -79,7 +79,7 @@ START_UI_CONFIG(SEARCHBAR); ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 66); ADD_SHAPE_CONFIG(BUTTON_LEFT_MARGIN, 10); ADD_SHAPE_CONFIG(BUTTON_RIGHT_MARGIN, 16); - ADD_SHAPE_CONFIG(EDIT_TEXT_SIZE, 32); + ADD_SHAPE_CONFIG(EDIT_TEXT_SIZE, 38); ADD_SHAPE_CONFIG(BUTTON_TEXT_SIZE, 30); } END_UI_CONFIG_MODE(720x1280); diff --git a/src/ui/resource/FUi_ResourceSliderConfig.cpp b/src/ui/resource/FUi_ResourceSliderConfig.cpp index 58bbe97..b7bd5c7 100644 --- a/src/ui/resource/FUi_ResourceSliderConfig.cpp +++ b/src/ui/resource/FUi_ResourceSliderConfig.cpp @@ -87,20 +87,20 @@ START_UI_CONFIG(SLIDER); 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, 30); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 22); ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 12); ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 16); ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 32); ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 49); - ADD_SHAPE_CONFIG(OVERLAY_WIDTH, 90); - ADD_SHAPE_CONFIG(OVERLAY_HEIGHT, 99); - ADD_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 81); + ADD_SHAPE_CONFIG(OVERLAY_WIDTH, 72); + ADD_SHAPE_CONFIG(OVERLAY_HEIGHT, 90); + ADD_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 72); ADD_SHAPE_CONFIG(OVERLAY_BOTTOM_MARGIN, 0); - ADD_SHAPE_CONFIG(OVERLAY_MARGIN, 12); + ADD_SHAPE_CONFIG(OVERLAY_MARGIN, 0); - ADD_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 72); + ADD_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 40); ADD_SHAPE_CONFIG(NUMBER_SIZE, 58); ADD_SHAPE_CONFIG(TEXT_SIZE, 28); diff --git a/src/ui/resource/FUi_ResourceStringLoader.cpp b/src/ui/resource/FUi_ResourceStringLoader.cpp index 65b5b14..c08dd7c 100644 --- a/src/ui/resource/FUi_ResourceStringLoader.cpp +++ b/src/ui/resource/FUi_ResourceStringLoader.cpp @@ -25,7 +25,6 @@ using namespace Tizen::Base; namespace { -const char* const SLP_SYSTEM_DOMAIN ="sys_string"; const char* const OSP_DOMAIN ="osp"; } diff --git a/src/ui/resource/FUi_ResourceTabBarConfig.cpp b/src/ui/resource/FUi_ResourceTabBarConfig.cpp index dbc8cab..d8937c8 100644 --- a/src/ui/resource/FUi_ResourceTabBarConfig.cpp +++ b/src/ui/resource/FUi_ResourceTabBarConfig.cpp @@ -56,8 +56,9 @@ START_UI_CONFIG(TABBAR); ADD_SHAPE_CONFIG(ITEM_MAX_WIDTH, 444); ADD_SHAPE_CONFIG(ITEM_HEIGHT, 72); ADD_SHAPE_CONFIG(HEIGHT, 90); - ADD_SHAPE_CONFIG(ITEM_COUNT_MAX, 100); ADD_SHAPE_CONFIG(ARROW_MARGIN, 8); + + ADD_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 100); END_UI_CONFIG_MODE(720x1280); } END_UI_CONFIG(TABBAR); diff --git a/src/ui/resource/FUi_ResourceTableViewConfig.cpp b/src/ui/resource/FUi_ResourceTableViewConfig.cpp index a556ac8..eeb6042 100644 --- a/src/ui/resource/FUi_ResourceTableViewConfig.cpp +++ b/src/ui/resource/FUi_ResourceTableViewConfig.cpp @@ -147,7 +147,7 @@ START_UI_CONFIG(TABLEVIEW); ADD_SHAPE_CONFIG(GROUPITEM_BAR_TOP_MARGIN, 4); ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_HEIGHT, 4); ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_LEFT_MARGIN, 0); - ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 14); + ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 0); ADD_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 51); ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1); ADD_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 0); diff --git a/src/ui/scenes/FUiScenesSceneManager.cpp b/src/ui/scenes/FUiScenesSceneManager.cpp index 2f23c88..3accb2d 100644 --- a/src/ui/scenes/FUiScenesSceneManager.cpp +++ b/src/ui/scenes/FUiScenesSceneManager.cpp @@ -77,8 +77,7 @@ SceneManager::Construct(void) result r = E_SUCCESS; __pSceneManagerImpl = new (std::nothrow) _SceneManagerImpl; - SysTryReturnResult(NID_UI_SCENES, __pSceneManagerImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", - GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryReturnResult(NID_UI_SCENES, __pSceneManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); r = __pSceneManagerImpl->Construct(); SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); -- 2.7.4